You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
517 B
26 lines
517 B
#!/bin/sh |
|
|
|
WALLPAPER="$HOME/pictures/wallpaper.jpg" |
|
|
|
# Overwrite wallpaper with new image if provided |
|
[ -n "$1" ] && cp "$1" "$WALLPAPER" |
|
|
|
# Set wallpaper |
|
if [ "$WAYLAND" = true ]; then |
|
pkill hyprpaper |
|
setsid -f hyprpaper |
|
|
|
# Wait until hyprpaper is available |
|
while true; do |
|
output=$(hyprctl hyprpaper) |
|
if ! echo "$output" | grep -q ".sock"; then |
|
break |
|
fi |
|
sleep 0.1 |
|
done |
|
|
|
hyprctl hyprpaper preload "$WALLPAPER" |
|
hyprctl hyprpaper wallpaper ",$WALLPAPER" |
|
else |
|
feh --no-fehbg --bg-fill "$WALLPAPER" |
|
fi
|
|
|