feat: autofreeze script for swww when window is selected + a toggle;

refactor: cpufreq does not save notifications anymore;
feat: 3GHz option for cpufreq;
feat: Script for controlling power profile + bind;
refactor: removed hyprpaper, replaced with swww;
refactor: no longer affecting border radius in gamemode;
fix: grayscale filter;
feat: toggle automatic wallpaper switching;
This commit is contained in:
2025-10-05 15:29:30 +03:00
parent edb6817582
commit 4e688c7c83
12 changed files with 182 additions and 66 deletions

View File

@@ -4,28 +4,6 @@ WALLPAPER_DIR="$HOME/Pictures/Wallpapers/current/"
INTRO_DIR="$HOME/Pictures/Wallpapers/intro/"
DELAY=5m
intro() {
if [ -z "$(ls -A "$WALLPAPER_DIR")" ]; then
echo "Current wallpaper folder is empty, nothing to do"
sleep 1
exit 0
fi
WALLPAPER=$(find "$INTRO_DIR" -type l | shuf -n 1)
while true; do
if hyprctl hyprpaper reload ,"$WALLPAPER"; then
sleep 1.5
break
fi
sleep 0.1
done
}
random_wallpaper() {
# Check if folder is not empty
if [ -z "$(ls -A "$WALLPAPER_DIR")" ]; then
@@ -39,33 +17,24 @@ random_wallpaper() {
WALLPAPER=$(find "$WALLPAPER_DIR" -type l ! -name "$(basename "$CURRENT_WALL")" | shuf -n 1)
# Apply the selected wallpaper
hyprctl hyprpaper reload $1,"$WALLPAPER"
swww img -o $1 "$WALLPAPER"
if [ $? -ne 0 ]; then
echo "The previous command failed."
# Handle the error here
hyprpaper &
sleep 1
hyprctl hyprpaper reload ,"$WALLPAPER"
return 1
fi
echo "Set random wallpaper to $WALLPAPER"
sleep 5
echo "Set random wallpaper for $1 to $WALLPAPER"
}
loop() {
sleep 1
while true; do
hyprctl hyprpaper listactive
if [ $? == 0 ]; then
break
if [ ! $(cat $HOME/.config/hypr/conditions/lock_wallpaper) -eq 1 ]; then
random_wallpaper "eDP-1" &
sleep 1
random_wallpaper "HDMI-A-1" &
fi
sleep 1
done
while true; do
hyprctl hyprpaper unload all
# TODO: get monitors dynamically
random_wallpaper "eDP-1"
random_wallpaper "HDMI-A-1"
sleep "$DELAY"
done
}