Regenerated
This commit is contained in:
@@ -1,19 +1,23 @@
|
||||
#!/run/current-system/sw/bin/bash
|
||||
set -euo pipefail
|
||||
echo "Running as $(whoami)"
|
||||
currentuser=$(whoami) # or set manually
|
||||
currentprofile=/run/current-system/sw/bin
|
||||
|
||||
|
||||
# -----------------------------
|
||||
# Configuration
|
||||
# -----------------------------
|
||||
PICTURES_DIR="$HOME/Wallpapers/pictures"
|
||||
NAMESPACE="main" # Fixed swww namespace
|
||||
MONITOR=$(hyprctl monitors -j | jq -r '.[0].name') # First monitor
|
||||
MONITOR=$($currentprofile/hyprctl monitors -j | $currentprofile/jq -r '.[0].name')
|
||||
|
||||
# -----------------------------
|
||||
# Start swww-daemon if not running
|
||||
# -----------------------------
|
||||
if ! pgrep -x swww-daemon >/dev/null; then
|
||||
echo "Starting swww-daemon..."
|
||||
swww-daemon --namespace "$NAMESPACE" &
|
||||
$currentprofile/swww-daemon --namespace "$NAMESPACE" &
|
||||
sleep 0.5 # give socket time to appear
|
||||
fi
|
||||
|
||||
@@ -37,6 +41,6 @@ socat -u UNIX-CONNECT:"$IPC_SOCKET" STDOUT | while read -r line; do
|
||||
WS="${BASH_REMATCH[1]}"
|
||||
RAND_IMAGE="${IMAGES[RANDOM % ${#IMAGES[@]}]}"
|
||||
echo "Workspace $WS active → setting wallpaper: $RAND_IMAGE"
|
||||
swww img "$RAND_IMAGE" --resize stretch --transition-type random --namespace "$WS"
|
||||
$currentprofile/swww img "$RAND_IMAGE" --resize stretch --transition-type random --namespace "$WS"
|
||||
fi
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user