theme cycle trigger waybar theme

This commit is contained in:
samantha42
2026-04-19 09:12:58 +02:00
parent 22eb9ddc46
commit 69bbc15cb2
6 changed files with 202 additions and 158 deletions

20
waybar/switch-theme.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/bin/bash
# ~/.config/waybar/switch-theme.sh
THEME_DIR="$HOME/.config/waybar/themes"
STYLE="$HOME/.config/waybar/style.css"
THEME="$1" # e.g. dark, light, catppuccin
if [ -z "$THEME" ]; then
echo "Usage: switch-theme.sh <theme-name>"
exit 1
fi
if [ ! -f "$THEME_DIR/$THEME.css" ]; then
echo "Theme '$THEME' not found in $THEME_DIR"
exit 1
fi
ln -sf "$THEME_DIR/$THEME.css" "$STYLE"
pkill -SIGUSR2 waybar
echo "Switched to $THEME"