Refactor wallpaper_shuffle
[khome.git] / home / bin / wallpaper_shuffle
index 1fd851a..0c05d15 100755 (executable)
@@ -2,20 +2,4 @@
 
 set -e
 
-path=$(
-    find \
-        $@ \
-        -type f \
-    | awk '
-        {
-            paths[i++] = $0
-        }
-
-        END {
-            srand()
-            j = int(i * rand())
-            print paths[j]
-        }'
-)
-printf "$path\n" >&2
-feh --bg-scale "$path"
+feh --bg-scale "$(find "$DIR_WALLPAPERS" -type f | randline)"
This page took 0.031246 seconds and 4 git commands to generate.