mirror of
https://github.com/zebrajr/dotfiles.git
synced 2025-12-06 00:20:05 +01:00
added random local wallpaper via hyprpaper
This commit is contained in:
parent
1a172f2e5f
commit
a21694b1c6
|
|
@ -23,3 +23,4 @@ exec-once = syncthing --no-browser &
|
|||
|
||||
# Wallpaper
|
||||
exec-once = hyprpaper
|
||||
exec-once = systemctl --user start random_hyprpaper.timer
|
||||
|
|
|
|||
0
config/hypr/hyprpaper.conf
Normal file
0
config/hypr/hyprpaper.conf
Normal file
4
config/hypr/scripts/config
Normal file
4
config/hypr/scripts/config
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
# Example for Wallpaper Directories
|
||||
# All sub directories are included
|
||||
#WALLPAPER_DIR="/mnt/data/Zebra/Photos/Edited"
|
||||
|
||||
13
config/hypr/scripts/random_hyprpaper.sh
Executable file
13
config/hypr/scripts/random_hyprpaper.sh
Executable file
|
|
@ -0,0 +1,13 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Source the config file from the same directory as the script
|
||||
SCRIPT_DIR=$(dirname "$0")
|
||||
source "$SCRIPT_DIR/config"
|
||||
|
||||
CURRENT_WALL=$(hyprctl hyprpaper listloaded)
|
||||
|
||||
# Get a random wallpaper that is not the current one
|
||||
WALLPAPER=$(find "$WALLPAPER_DIR" -type f ! -name "$(basename "$CURRENT_WALL")" | shuf -n 1)
|
||||
|
||||
# Apply the selected wallpaper
|
||||
hyprctl hyprpaper reload ,"$WALLPAPER"
|
||||
6
config/systemd/user/random_hyprpaper.service
Normal file
6
config/systemd/user/random_hyprpaper.service
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
[Unit]
|
||||
Description=Set a random wallpaper with waypaper
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=%h/.config/hypr/scripts/random_hyprpaper.sh
|
||||
16
config/systemd/user/random_hyprpaper.timer
Normal file
16
config/systemd/user/random_hyprpaper.timer
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
[Unit]
|
||||
Description=Set a random wallpaper every minute
|
||||
|
||||
[Timer]
|
||||
Persistent=true
|
||||
# Every Minute
|
||||
#OnCalendar=*:0/1
|
||||
|
||||
# Every 30 Minutes
|
||||
OnCalendar=*:0/30
|
||||
|
||||
# Every Hour
|
||||
#OnCalendar=*:00
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
Loading…
Reference in New Issue
Block a user