Moves from i3 to hypr
This commit is contained in:
parent
6f069d32e1
commit
a186edca69
380 changed files with 23450 additions and 27796 deletions
39
.config/hypr/UserScripts/WallpaperAutoChange.sh
Executable file
39
.config/hypr/UserScripts/WallpaperAutoChange.sh
Executable file
|
|
@ -0,0 +1,39 @@
|
|||
#!/bin/bash
|
||||
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
|
||||
# source https://wiki.archlinux.org/title/Hyprland#Using_a_script_to_change_wallpaper_every_X_minutes
|
||||
|
||||
# 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
|
||||
|
||||
wallust_refresh=$HOME/.config/hypr/scripts/RefreshNoWaybar.sh
|
||||
|
||||
focused_monitor=$(hyprctl monitors | awk '/^Monitor/{name=$2} /focused: yes/{print name}')
|
||||
|
||||
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 -o $focused_monitor "$img"
|
||||
$wallust_refresh
|
||||
sleep $INTERVAL
|
||||
|
||||
done
|
||||
done
|
||||
Loading…
Add table
Add a link
Reference in a new issue