Replies: 1 comment
-
This guide will help you set up automatic wallpaper rotation with synchronized theme changes for your Hyprland setup using systemd. What This Does
PrerequisitesYour wallpapers should be in your Pictures directory:
Your AGS configuration should be in:
Setup Steps
mkdir -p ~/.config/systemd/user/
nano ~/.config/systemd/user/wallpaper-change.service Add this content: [Unit]
Description=Change wallpaper and generate colors periodically
After=graphical-session.target
[Service]
Type=oneshot
Environment=DISPLAY=:0
Environment=WAYLAND_DISPLAY=wayland-1
Environment=XDG_RUNTIME_DIR=/run/user/%U
Environment=PATH=/usr/local/bin:/usr/bin:/bin
Environment=XDG_CONFIG_HOME=%h/.config
Environment=XDG_CACHE_HOME=%h/.cache
Environment=XDG_STATE_HOME=%h/.local/state
Environment=HOME=%h
ExecStart=/bin/bash -c '\
WALL=$(fd . "$(xdg-user-dir PICTURES)/Wallpapers/" -e .png -e .jpg -e .svg | shuf -n1) && \
%h/.config/ags/scripts/color_generation/switchwall.sh "$WALL" && \
sleep 2 && \
%h/.config/ags/scripts/color_generation/switchcolor.sh "$(cat %h/.local/state/ags/user/color.txt)"'
[Install]
WantedBy=graphical-session.target
nano ~/.config/systemd/user/wallpaper-change.timer Add this content: [Unit]
Description=Change wallpaper every 30 minutes
[Timer]
OnBootSec=1min
OnUnitActiveSec=30min
Unit=wallpaper-change.service
[Install]
WantedBy=timers.target
# Reload systemd
systemctl --user daemon-reload
# Enable the timer to start at boot
systemctl --user enable wallpaper-change.timer
# Start the timer
systemctl --user start wallpaper-change.timer Verification
systemctl --user status wallpaper-change.timer
systemctl --user start wallpaper-change.service
journalctl --user -u wallpaper-change.service -f Customization
Troubleshooting
Additional Notes
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
To be able to choose a set of wallpapers and have them rotate instead of just one.
Beta Was this translation helpful? Give feedback.
All reactions