theme cycle trigger waybar theme
This commit is contained in:
20
waybar/switch-theme.sh
Executable file
20
waybar/switch-theme.sh
Executable 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"
|
||||
Reference in New Issue
Block a user