sync + bin: Added wallpaperctl script

This commit is contained in:
GaspardCulis 2024-04-03 15:27:56 +02:00
parent 2e6097530f
commit e2a1c5132c
No known key found for this signature in database
GPG key ID: BC18146756955609
2 changed files with 22 additions and 0 deletions

21
bin/wallpaperctl Executable file
View file

@ -0,0 +1,21 @@
#!/bin/bash
if [[ $# -lt 1 ]] || [[ ! $1 = @(daemon|change) ]]; then
echo "Usage:
$0 daemon|change"
exit 1
fi
export SWWW_TRANSITION=wipe
export SWWW_TRANSITION_ANGLE=$RANDOM
export SWWW_TRANSITION_FPS=60
wallpapers_dir=~/Images/Wallpapers/enabled
if [[ "$1" = "daemon" ]]; then
exec swww-daemon
elif [[ "$1" = "change" ]]; then
img=$(find "$wallpapers_dir" -type f,l -exec realpath {} \; | shuf -n 1)
echo "$img"
exec swww img "$img"
fi

1
sync
View file

@ -68,6 +68,7 @@ synced_files = [
("bin/x11-toggle-primary-gpu", "~/.local/bin/x11-toggle-primary-gpu"), ("bin/x11-toggle-primary-gpu", "~/.local/bin/x11-toggle-primary-gpu"),
("bin/uwu-launcher", "~/.local/bin/uwu-launcher"), ("bin/uwu-launcher", "~/.local/bin/uwu-launcher"),
("bin/eww-bard", "~/.local/bin/eww-bard"), ("bin/eww-bard", "~/.local/bin/eww-bard"),
("bin/wallpaperctl", "~/.local/bin/wallpaperctl"),
# Submodules # Submodules
("Ahurac-dotfiles/bin/ssh-fwd", "~/.local/bin/ssh-fwd"), ("Ahurac-dotfiles/bin/ssh-fwd", "~/.local/bin/ssh-fwd"),
] ]