mirror of
https://github.com/kristoferssolo/solorice.git
synced 2026-02-04 06:32:03 +00:00
Update 2025-09-30
Update 2025-09-30 Update 2025-09-30
This commit is contained in:
14
local/bin/swap-wallpaper
Normal file
14
local/bin/swap-wallpaper
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
WALLPAPER_DIR="$HOME/Pictures/wallpapers/PoE2/3880x2160/"
|
||||
|
||||
if pgrep -x "Hyprland" >/dev/null; then
|
||||
CURRENT_WALL=$(hyprctl hyprpaper listloaded)
|
||||
WALLPAPER=$(fd --type file --exclude "$(basename "$CURRENT_WALL")" . "$WALLPAPER_DIR" | shuf -nz 1)
|
||||
hyprctl hyprpaper reload ,"$WALLPAPER"
|
||||
else
|
||||
WALLPAPER=$(fd --type file . "$WALLPAPER_DIR" | shuf -n 1)
|
||||
pkill swaybg 2>/dev/null || true
|
||||
swaybg -m fill -i "$WALLPAPER" &
|
||||
disown
|
||||
fi
|
||||
Reference in New Issue
Block a user