aboutsummaryrefslogtreecommitdiff
path: root/scripts/wallpapermenu
diff options
context:
space:
mode:
authormirenn <me@mirenn.dev>2025-12-02 08:54:27 +0100
committermirenn <me@mirenn.dev>2026-03-20 10:24:05 +0100
commitc71d4a46983880a94d8c4e53dbbc99ebd9325381 (patch)
tree96f908c8eccf11d19d77c37c333ed56aa4a437d5 /scripts/wallpapermenu
parent6afc74f542553c7cd439d943e916d6aaef3e71d3 (diff)
downloaddotfiles-c71d4a46983880a94d8c4e53dbbc99ebd9325381.tar.gz
dotfiles-c71d4a46983880a94d8c4e53dbbc99ebd9325381.zip
xd
Diffstat (limited to '')
-rwxr-xr-xscripts/wallpapermenu20
1 files changed, 12 insertions, 8 deletions
diff --git a/scripts/wallpapermenu b/scripts/wallpapermenu
index c90ff7c..85ed1d1 100755
--- a/scripts/wallpapermenu
+++ b/scripts/wallpapermenu
@@ -1,11 +1,15 @@
#!/usr/bin/fish
-set dir "$HOME/Pictures/Backgrounds/"
-set chosen (
- for file in (find $dir -type f)
- if test -z $img; or test $file != $img
- echo -en "$file\0icon\x1fthumbnail://$file\n"
- end
- end | rofi -dmenu -p " " -show-icons -theme ~/.config/rofi/wallpapermenu.rasi)
+if test -z $argv[1]
+ echo "Provide a directory"
+else
+ set dir $argv[1]
+ set chosen (
+ for file in (find $dir -type f)
+ if test -z $IMG; or test $file != $IMG
+ echo -en "$file\0icon\x1fthumbnail://$file\n"
+ end
+ end | rofi -dmenu -p " " -show-icons -theme ~/.config/rofi/wallpapermenu.rasi)
-~/.config/scripts/set_background (echo $chosen)
+ ~/.config/scripts/set_background (echo $chosen)
+end