blob: 52dbab44b5ef9405e71e27be4b313ecbc4eafe6b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#!/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 (
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)
|