diff options
| author | JaKooLit <jimmielovejay.com> | 2024-01-01 15:13:32 +0900 |
|---|---|---|
| committer | JaKooLit <jimmielovejay.com> | 2024-01-01 15:13:32 +0900 |
| commit | 16621bef0e8e3419f82389ba841b97db40a555b1 (patch) | |
| tree | 01d154902acde99d3e110072259a9d72f1eee4af /config/hypr/UserScripts/WallpaperRandom.sh | |
| parent | 978cb01c7794ca6aabc613810b23698f94fad298 (diff) | |
- Breaking Changes.
- Quick Edit script moved to user scripts - I understand some users wants to use other editor
- RofiBeats moved to user scripts - This is because users wants their own stations :)
- RofiBeats keybinds changed to SUPER SHIFT M keybind
- Keybinds to change layout SUPER ALT L
- Wlogout Script adjusted with 4K.
- Wallpaper Scripts are moved to UserScripts. This is because if users has a different location of wallpapers and also wants a different animations
Diffstat (limited to 'config/hypr/UserScripts/WallpaperRandom.sh')
| -rwxr-xr-x | config/hypr/UserScripts/WallpaperRandom.sh | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/config/hypr/UserScripts/WallpaperRandom.sh b/config/hypr/UserScripts/WallpaperRandom.sh new file mode 100755 index 00000000..13bd2995 --- /dev/null +++ b/config/hypr/UserScripts/WallpaperRandom.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +# This script will randomly go through the files of a directory, setting it +# up as the wallpaper at regular intervals +# +# NOTE: this script uses bash (not POSIX shell) for the RANDOM variable + +pywal_refresh=$HOME/.config/hypr/scripts/RefreshNoWaybar.sh + +if [[ $# -lt 1 ]] || [[ ! -d $1 ]]; then + echo "Usage: + $0 <dir containing images>" + exit 1 +fi + +# Edit below to control the images transition +export SWWW_TRANSITION_FPS=60 +export SWWW_TRANSITION_TYPE=simple + +# This controls (in seconds) when to switch to the next image +INTERVAL=1800 + +while true; do + find "$1" \ + | while read -r img; do + echo "$((RANDOM % 1000)):$img" + done \ + | sort -n | cut -d':' -f2- \ + | while read -r img; do + swww img "$img" + $pywal_refresh + sleep $INTERVAL + + done +done |
