Commit | Line | Data |
---|---|---|
d0266656 SK |
1 | #! /bin/sh |
2 | ||
3 | set -e | |
4 | ||
5 | path=$( | |
6 | find \ | |
7 | $@ \ | |
8 | -type f \ | |
9 | | awk ' | |
10 | { | |
11 | paths[i++] = $0 | |
12 | } | |
13 | ||
14 | END { | |
15 | srand() | |
16 | j = int(i * rand()) | |
17 | print paths[j] | |
18 | }' | |
19 | ) | |
20 | printf "$path\n" >&2 | |
21 | feh --bg-scale "$path" |