diff options
Diffstat (limited to 'mirenn/home/files/dotfiles/.config/scripts/set_random')
| -rwxr-xr-x | mirenn/home/files/dotfiles/.config/scripts/set_random | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mirenn/home/files/dotfiles/.config/scripts/set_random b/mirenn/home/files/dotfiles/.config/scripts/set_random new file mode 100755 index 0000000..33cf267 --- /dev/null +++ b/mirenn/home/files/dotfiles/.config/scripts/set_random @@ -0,0 +1,8 @@ +#!/usr/bin/env fish + +if test (count $argv) -lt 1; or not test -d $argv[1] + echo "Usage: $(status filename) <dir>" + exit 1 +end + +~/.config/scripts/set_background "$(fd -a -t f -d 1 -E "$(basename "$IMG")" -e jpg -e png -e webp . "$argv[1]" | shuf -n1)" |
