diff options
Diffstat (limited to 'scripts/wallpapermenu')
| -rwxr-xr-x | scripts/wallpapermenu | 20 |
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 |
