From 2781082f1085757a0cfb929ba37de968726ec751 Mon Sep 17 00:00:00 2001 From: "eric.marin" Date: Tue, 2 Dec 2025 08:54:27 +0100 Subject: xd --- scripts/wallpapermenu | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'scripts/wallpapermenu') 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 -- cgit v1.2.3