diff options
Diffstat (limited to '')
| -rwxr-xr-x | scripts/set_background | 11 | ||||
| -rwxr-xr-x | scripts/set_random | 3 | ||||
| -rwxr-xr-x | scripts/wallpapermenu | 3 |
3 files changed, 7 insertions, 10 deletions
diff --git a/scripts/set_background b/scripts/set_background index be75486..b9c8b80 100755 --- a/scripts/set_background +++ b/scripts/set_background @@ -5,12 +5,11 @@ if test (count $argv) -lt 1; or not test -f $argv[1] end wallust run $argv[1] -Ts; and begin - set -U IMG $argv[1] - echo "IMG=$IMG" > ~/.config/scripts/IMG.env - niri msg action do-screen-transition - wallust -q run $IMG - systemctl --user restart swaybg.service - makoctl reload + niri msg action do-screen-transition + set -U IMG $argv[1] & + wallust -q run $IMG & + killall swaybg ; swaybg -i $IMG & + makoctl reload & notify-send -i $IMG "Wallust" "Changed wallpaper and palette." end; or begin notify-send -i $argv[1] -u critical "Wallust" "Failed to change palette" diff --git a/scripts/set_random b/scripts/set_random index 894361c..52dbab4 100755 --- a/scripts/set_random +++ b/scripts/set_random @@ -6,9 +6,8 @@ if test (count $argv) -lt 1; or not test -d $argv[1] end ~/.config/scripts/set_background ( - for file in (fd . $argv[1] -t f) + for file in (fd . $argv[1] -t f -d 1) if test -z $IMG; or test $file != $IMG echo (math (random) % 1000)":$file" end end | sort -n | head -n 1 | cut -d ':' -f2) - diff --git a/scripts/wallpapermenu b/scripts/wallpapermenu index 85ed1d1..1ddf308 100755 --- a/scripts/wallpapermenu +++ b/scripts/wallpapermenu @@ -3,9 +3,8 @@ if test -z $argv[1] echo "Provide a directory" else - set dir $argv[1] set chosen ( - for file in (find $dir -type f) + for file in (fd . $argv[1] -t f -d 1) if test -z $IMG; or test $file != $IMG echo -en "$file\0icon\x1fthumbnail://$file\n" end |
