20 lines
444 B
Bash
Executable File
20 lines
444 B
Bash
Executable File
#!/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" |