scripts reorganize
This commit is contained in:
19
scripts/WMScripts/changewall.fish
Executable file
19
scripts/WMScripts/changewall.fish
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env fish
|
||||
|
||||
# This script switches the wallpaper to a random image found under ~/Pictures/wallpapers
|
||||
# Supports i3, Hyprland, and Sway.
|
||||
|
||||
|
||||
switch "$XDG_CURRENT_DESKTOP"
|
||||
case i3
|
||||
feh --bg-fill (find ~/Pictures/wallpapers -type f -regextype posix-extended -iregex "/(.*/)*[^\.]*\.(png|jpe?g|webp)" | sort -R | head -n1)
|
||||
case sway Hyprland
|
||||
swaybg -i (find ~/Pictures/wallpapers -type f | sort -R | head -n1) &
|
||||
set newpid $last_pid
|
||||
sleep 0.2
|
||||
for pid in (pgrep -x swaybg)
|
||||
if test $pid -ne $last_pid
|
||||
kill $pid
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user