diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2024-09-28 17:28:58 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2024-09-28 17:28:58 +0800 |
| commit | 53d423e71bc809f6930eff652d3373f97d55b276 (patch) | |
| tree | 693e1eb0be7a1a7df1555fc54f17ba899a313abd | |
| parent | d04379cd1fe0dbdd605a5c54f63e77db11693673 (diff) | |
update(mpvpaper): updated live wallpaper path, replaced for loop with '*'(builtin method)
| -rwxr-xr-x | mpvpaper.sh | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/mpvpaper.sh b/mpvpaper.sh index 474a361..e733892 100755 --- a/mpvpaper.sh +++ b/mpvpaper.sh @@ -1,8 +1,8 @@ #!/bin/bash -XDG_PICTURES_DIR="${XDG_PICTURES_DIR:-$HOME/Pictures}" +XDG_VIDEOS_DIR="${XDG_VIDEOS_DIR:-$HOME/Videos}" XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}" XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" -WALLPAPERS="$XDG_PICTURES_DIR/live-wallpapers/" +WALLPAPERS="$XDG_VIDEOS_DIR/wallpapers/" # colors RED='\033[0;31m' @@ -24,9 +24,10 @@ while true; do # wallust run --skip-sequences $current_bg # wallust run --backend kmeans --skip-sequences $current_bg & # using cache now killall mpvpaper - for output in $(hyprctl monitors | grep "Monitor" | awk '{print $2}'); do - mpvpaper --auto-pause --mpv-options="hwdec=auto --no-audio --loop" --fork "$output" "$current_bg" - done + # for output in $(hyprctl monitors | grep "Monitor" | awk '{print $2}'); do + # mpvpaper --auto-pause --mpv-options="hwdec=auto --no-audio --loop" --fork "$output" "$current_bg" + mpvpaper --auto-pause --mpv-options="hwdec=auto --no-audio --loop" --fork "*" "$current_bg" + # done wallust run --backend full --skip-sequences "$XDG_CACHE_HOME/$(basename $current_bg).png" & echo "$XDG_CACHE_HOME/$(basename $current_bg).png" @@ -38,8 +39,9 @@ while true; do echo "$wallpappath" > "$XDG_CACHE_HOME/current.bg" # update hyprlock - killall -SIGUSR2 hyprlock + killall -USR2 hyprlock + # generates cache for next wallpaper ( prime-run ffmpeg -hwaccel cuda -i "$wallpappath" -y "$XDG_CACHE_HOME/$(basename $wallpappath).png"; nice -n 20 wallust run --backend full --skip-templates --skip-sequences "$XDG_CACHE_HOME/$(basename $wallpappath).png" ) & nice -n 20 sleep $DELAY |
