19 lines
889 B
Bash
Executable File

#!/bin/bash
wallpaperDir=/home/ganome/Pictures/GWallpapers
PREVWP1=$(hyprctl hyprpaper listactive | awk -F"=" '{print $2}' | head -n1)
PREVWP2=$(hyprctl hyprpaper listactive | awk -F"=" '{print $2}' | tail -n1)
WP1=$(find $wallpaperDir -name '*' | awk '!/.git/' | tail -n +2 | shuf -n 1)
WP2=$(find $wallpaperDir -name '*' | awk '!/.git/' | tail -n +2 | shuf -n 1)
cd $HOME/Pictures/GWallpapers/
#swww img --transition-type random --transition-step 30 $(find $wallpaperDir -name '*' | awk '!/.git/' | tail -n +2 | shuf -n 1)
#swww img --transition-type random --transition-step 16 --transition-fps 255 $(find $wallpaperDir -name '*' | awk '!/.git/' | tail -n +2 | shuf -n 1)
hyprctl hyprpaper preload $WP1
hyprctl hyprpaper wallpaper DP-1,$WP1
hyprctl hyprpaper unload $PREVWP1
hyprctl hyprpaper preload $WP2
hyprctl hyprpaper wallpaper HDMI-A-1,$WP2
hyprctl hyprpaper unload $PREVWP2