Files
dotfiles/.config/hypr/scripts/hyprpaper_reload_1.sh
Archie Fox 06b8ee8caf Init commit
2025-06-08 06:59:19 +03:00

29 lines
936 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
WALLPAPER_DIR="$HOME/Pictures/wall/"
TEMP_DIR="/tmp/hyprpaper_fade"
mkdir -p "$TEMP_DIR"
# Выбор случайного обоа
NEW_WALLPAPER=$(find "$WALLPAPER_DIR" -type f | shuf -n 1)
TEMP_WALLPAPER="$TEMP_DIR/fade_temp.jpg"
# Создаем временное размытое изображение для перехода
convert "$NEW_WALLPAPER" -blur 0x8 "$TEMP_WALLPAPER"
# Загружаем размытую версию
hyprctl hyprpaper preload "$TEMP_WALLPAPER"
hyprctl hyprpaper wallpaper "eDP-1,$TEMP_WALLPAPER"
# Плавно возвращаем четкость (анимация)
for i in {8..0}; do
convert "$NEW_WALLPAPER" -blur 0x"$i" "$TEMP_WALLPAPER"
hyprctl hyprpaper wallpaper "eDP-1,$TEMP_WALLPAPER"
sleep 0.05
done
# Фиксируем финальное изображение
hyprctl hyprpaper preload "$NEW_WALLPAPER"
hyprctl hyprpaper wallpaper "eDP-1,$NEW_WALLPAPER"