Regenerated

This commit is contained in:
2026-03-29 21:14:24 +00:00
parent 5d15469a00
commit 1361879ac8
5 changed files with 298 additions and 445 deletions
@@ -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