diff options
| author | mirenn <me@mirenn.dev> | 2026-04-29 21:12:05 +0200 |
|---|---|---|
| committer | mirenn <me@mirenn.dev> | 2026-07-27 15:55:03 +0200 |
| commit | 8501a38d7c3bbc2e99466e6658be134c72d4f47a (patch) | |
| tree | 6b2fba6a3d5cb34ff647499185e12887658df24f /scripts/set_random | |
| parent | 4bb14d12ba7dda8f222622b670d5dcd0a1618a24 (diff) | |
| download | dotfiles-8501a38d7c3bbc2e99466e6658be134c72d4f47a.tar.gz dotfiles-8501a38d7c3bbc2e99466e6658be134c72d4f47a.zip | |
changed wallpapermenu script
Diffstat (limited to 'scripts/set_random')
| -rwxr-xr-x | scripts/set_random | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/scripts/set_random b/scripts/set_random index 52dbab4..6c4a76d 100755 --- a/scripts/set_random +++ b/scripts/set_random @@ -5,9 +5,4 @@ if test (count $argv) -lt 1; or not test -d $argv[1] exit 1 end -~/.config/scripts/set_background ( - 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) +~/.config/scripts/set_background "$(fd -a -t f -d 1 -E "$(basename "$IMG")" -e jpg -e png -e webp . "$argv[1]" | shuf -n1)" |
