aboutsummaryrefslogtreecommitdiff
path: root/laptop/.config/hypr/scripts/randomize-wallpaper.sh
diff options
context:
space:
mode:
Diffstat (limited to 'laptop/.config/hypr/scripts/randomize-wallpaper.sh')
-rwxr-xr-xlaptop/.config/hypr/scripts/randomize-wallpaper.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/laptop/.config/hypr/scripts/randomize-wallpaper.sh b/laptop/.config/hypr/scripts/randomize-wallpaper.sh
new file mode 100755
index 0000000..116763b
--- /dev/null
+++ b/laptop/.config/hypr/scripts/randomize-wallpaper.sh
@@ -0,0 +1,11 @@
+#!/usr/bin/bash
+
+WALLPAPER_DIR="$HOME/wallpapers"
+
+# Get a random wallpaper
+WALLPAPER=$(find $WALLPAPER_DIR -type f | shuf -n 1)
+
+# Create a symlink to the new random wallpaper
+SYMLINK=$WALLPAPER_DIR/.current
+rm $SYMLINK
+ln -s $WALLPAPER $SYMLINK