feat: random wallpapers
This commit is contained in:
@@ -27,9 +27,12 @@ $privateBrowser = zen-browser --private-window
|
||||
# Autostart necessary processes (like notifications daemons, status bars, etc.)
|
||||
# Or execute your favorite apps at launch like this:
|
||||
|
||||
exec-once = waybar & hyprpaper & hypridle &
|
||||
exec-once = systemctl --user startexec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP hyprpaper.service
|
||||
exec-once = hyprsunset
|
||||
# Le essential hyprland crap
|
||||
exec-once = hyprpaper & waybar & hypridle & hyprsunset &
|
||||
exec-once = sleep 1 && ~/.config/hypr/scripts/random_wallpaper.sh
|
||||
|
||||
|
||||
# exec-once = systemctl --user startexec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP hyprpaper.service
|
||||
exec-once = libinput-gestures
|
||||
exec-once = copyq --start-server
|
||||
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
|
||||
@@ -85,7 +88,7 @@ general {
|
||||
border_size = 3
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors
|
||||
col.active_border = rgba(E96375ff) rgba(EB75DDff) 45deg
|
||||
col.active_border = rgba(E96375ff) rgba(9E2238ff) 45deg
|
||||
col.inactive_border = rgba(4B535Bff) # rgba(595959aa)
|
||||
|
||||
# Set to true enable resizing windows by clicking and dragging on borders and gaps
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
preload = /home/greg/Pictures/Wallpapers/art-sakura-sea-volcano-pink.jpg
|
||||
wallpaper = eDP-1,/home/greg/Pictures/Wallpapers/art-sakura-sea-volcano-pink.jpg
|
||||
wallpaper = HDMI-A-1,/home/greg/Pictures/Wallpapers/art-sakura-sea-volcano-pink.jpg
|
||||
ipc = off
|
||||
wallpaper = eDP-1,/home/greg/Pictures/Wallpapers/japanese-seashore-house-fullmoon-pink.jpeg
|
||||
wallpaper = HDMI-A-1,/home/greg/Pictures/Wallpapers/japanese-seashore-house-fullmoon-pink.jpeg
|
||||
ipc = on
|
||||
|
||||
32
hypr/scripts/random_wallpaper.sh
Executable file
32
hypr/scripts/random_wallpaper.sh
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
WALLPAPER_DIR="$HOME/Pictures/Wallpapers/current/"
|
||||
DELAY=5m
|
||||
|
||||
random_wallpaper() {
|
||||
# Check if folder is not empty
|
||||
if [ -z "$(ls -A "$WALLPAPER_DIR")" ]; then
|
||||
echo "Current wallpaper folder is empty, nothing to do"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
CURRENT_WALL=$(hyprctl hyprpaper listloaded)
|
||||
|
||||
# Get a random wallpaper that is not the current one
|
||||
WALLPAPER=$(find "$WALLPAPER_DIR" -type l ! -name "$(basename "$CURRENT_WALL")" | shuf -n 1)
|
||||
|
||||
# Apply the selected wallpaper
|
||||
hyprctl hyprpaper unload all
|
||||
hyprctl hyprpaper reload ,"$WALLPAPER"
|
||||
|
||||
echo "Set random wallpaper to $WALLPAPER"
|
||||
}
|
||||
|
||||
loop() {
|
||||
while true; do
|
||||
random_wallpaper
|
||||
sleep "$DELAY"
|
||||
done
|
||||
}
|
||||
|
||||
loop
|
||||
Reference in New Issue
Block a user