aboutsummaryrefslogtreecommitdiff
path: root/background
diff options
context:
space:
mode:
authortdback <tyler@tdback.net>2024-12-04 18:50:37 -0500
committertdback <tyler@tdback.net>2024-12-04 18:50:37 -0500
commit58347fdfe21315ad3ccc0bd7c4703a8ec7aae797 (patch)
tree393fe8d69962e070c522e889b672ee9e97a88207 /background
initial commit to new repo
Diffstat (limited to 'background')
-rwxr-xr-xbackground14
1 files changed, 14 insertions, 0 deletions
diff --git a/background b/background
new file mode 100755
index 0000000..6729237
--- /dev/null
+++ b/background
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+# background: Set the background using `feh`.
+
+IMAGES="$HOME/.local/backgrounds"
+
+if [ "$1" = "-r" ]; then
+ feh --bg-scale --randomize "$IMAGES"
+ exit
+fi
+
+SELECTED=$(find "$IMAGES" -type f -printf '%f\n' | fzf)
+
+[ -n "$SELECTED" ] && feh --bg-scale "$IMAGES/$SELECTED"