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

20 lines
563 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.

#!/usr/bin/env bash
# Директория с обоями
HOUR="date '+%k'"
if [[ $HOUR -gt 7 && $HOUR -lt 18 ]]; then
WALLPAPER_DIR="$HOME/Pictures/wall/light"
else
WALLPAPER_DIR="$HOME/Pictures/wall/dark"
fi
# Выбор случайного файла
RANDOM_WALLPAPER=$(find "$WALLPAPER_DIR" -type f | shuf -n 1)
# Плавная смена (с анимацией fade)
swww img "$RANDOM_WALLPAPER" \
--transition-type "random" \
--transition-step 2 \
--transition-duration 3 \
--transition-fps 60 # Кадры в секунду \