agsdotfilesdotshyprlandhyprland-configricerofirofi-configshell-scriptsswwwwallustwaybarwaybar-modulewaybar-themes
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
941 B
37 lines
941 B
#!/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_script=$HOME/.config/hypr/scripts/PywalSwww.sh |
|
pywal_refresh=$HOME/.config/hypr/scripts/Refresh.sh |
|
pywal_dunst=$HOME/.config/hypr/scripts/PywalDunst.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_STEP=2 |
|
export SWWW_TRANSITION_TYPE=random |
|
|
|
# This controls (in seconds) when to switch to the next image |
|
INTERVAL=900 |
|
|
|
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_script && $pywal_refresh && $pywal_dunst |
|
sleep $INTERVAL |
|
|
|
done |
|
done
|
|
|