summaryrefslogtreecommitdiff
path: root/scripts/change_wallpaper
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/change_wallpaper')
-rwxr-xr-xscripts/change_wallpaper6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/change_wallpaper b/scripts/change_wallpaper
index 11bf82c..64aa9b5 100755
--- a/scripts/change_wallpaper
+++ b/scripts/change_wallpaper
@@ -8,5 +8,9 @@ wallpaper=$(ls "$wallpaper_dir" | dmenu -p "Wallpaper: " -i -l 16)
cd ~/pictures
rm -f wallpaper
ln -s "wallpapers/$wallpaper" wallpaper
-xwallpaper --zoom ~/pictures/wallpaper &
+if [ -z "WAYLAND_DISPLAY" ]; then
+ xwallpaper --zoom ~/pictures/wallpaper &
+else
+ swaymsg 'output * background ~/pictures/wallpaper fill'
+fi
cd - > /dev/null