Regenerated
This commit is contained in:
+290
-288
File diff suppressed because it is too large
Load Diff
@@ -2430,6 +2430,8 @@ in
|
|||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${homeDir}/Wallpapers/scripts/workspace-wallpapers.sh";
|
ExecStart = "${homeDir}/Wallpapers/scripts/workspace-wallpapers.sh";
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
|
StandardOutput=journal;
|
||||||
|
StandardError=journal;
|
||||||
};
|
};
|
||||||
|
|
||||||
wantedBy = [ "default.target" ];
|
wantedBy = [ "default.target" ];
|
||||||
|
|||||||
@@ -2,22 +2,26 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
echo "Running as $(whoami)"
|
echo "Running as $(whoami)"
|
||||||
currentuser=$(whoami) # or set manually
|
currentuser=$(whoami) # or set manually
|
||||||
currentprofile=/run/current-system/sw/bin
|
currentpath=/run/current-system/sw/bin
|
||||||
|
|
||||||
|
while [ ! -S "$IPC_SOCKET" ]; do
|
||||||
|
echo "Waiting for Hyprland socket..."
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
|
||||||
# -----------------------------
|
# -----------------------------
|
||||||
# Configuration
|
# Configuration
|
||||||
# -----------------------------
|
# -----------------------------
|
||||||
PICTURES_DIR="$HOME/Wallpapers/pictures"
|
PICTURES_DIR="$HOME/Wallpapers/pictures"
|
||||||
NAMESPACE="main" # Fixed swww namespace
|
NAMESPACE="main" # Fixed swww namespace
|
||||||
MONITOR=$($currentprofile/hyprctl monitors -j | $currentprofile/jq -r '.[0].name')
|
MONITOR=$($currentpath/hyprctl monitors -j | $currentpath/jq -r '.[0].name')
|
||||||
|
|
||||||
# -----------------------------
|
# -----------------------------
|
||||||
# Start swww-daemon if not running
|
# Start swww-daemon if not running
|
||||||
# -----------------------------
|
# -----------------------------
|
||||||
if ! pgrep -x swww-daemon >/dev/null; then
|
if ! pgrep -x $currentpath/swww-daemon >/dev/null; then
|
||||||
echo "Starting swww-daemon..."
|
echo "Starting swww-daemon..."
|
||||||
$currentprofile/swww-daemon --namespace "$NAMESPACE" &
|
$currentpath/swww-daemon --namespace "$NAMESPACE" &
|
||||||
sleep 0.5 # give socket time to appear
|
sleep 0.5 # give socket time to appear
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -36,11 +40,11 @@ fi
|
|||||||
IPC_SOCKET="$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock"
|
IPC_SOCKET="$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock"
|
||||||
echo "Listening for workspace events on $IPC_SOCKET..."
|
echo "Listening for workspace events on $IPC_SOCKET..."
|
||||||
|
|
||||||
socat -u UNIX-CONNECT:"$IPC_SOCKET" STDOUT | while read -r line; do
|
$currentpath/socat -u UNIX-CONNECT:"$IPC_SOCKET" STDOUT | while read -r line; do
|
||||||
if [[ "$line" =~ workspace\#([0-9]+) ]]; then
|
if [[ "$line" =~ workspace\#([0-9]+) ]]; then
|
||||||
WS="${BASH_REMATCH[1]}"
|
WS="${BASH_REMATCH[1]}"
|
||||||
RAND_IMAGE="${IMAGES[RANDOM % ${#IMAGES[@]}]}"
|
RAND_IMAGE="${IMAGES[RANDOM % ${#IMAGES[@]}]}"
|
||||||
echo "Workspace $WS active → setting wallpaper: $RAND_IMAGE"
|
echo "Workspace $WS active → setting wallpaper: $RAND_IMAGE"
|
||||||
$currentprofile/swww img "$RAND_IMAGE" --resize stretch --transition-type random --namespace "$WS"
|
$currentpath/swww img "$RAND_IMAGE" --resize stretch --transition-type random --namespace "$WS"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -69,6 +69,8 @@ in
|
|||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${homeDir}/Wallpapers/scripts/workspace-wallpapers.sh";
|
ExecStart = "${homeDir}/Wallpapers/scripts/workspace-wallpapers.sh";
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
|
StandardOutput=journal;
|
||||||
|
StandardError=journal;
|
||||||
};
|
};
|
||||||
|
|
||||||
wantedBy = [ "default.target" ];
|
wantedBy = [ "default.target" ];
|
||||||
|
|||||||
Reference in New Issue
Block a user