aboutsummaryrefslogtreecommitdiff
path: root/scripts/set_random
blob: 6c4a76d79f9ffc0a6cd1cfc3368f92836259d65b (plain) (blame)
1
2
3
4
5
6
7
8
#!/usr/bin/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)"