agsdotfilesdotshyprlandhyprland-configricerofirofi-configshell-scriptsswwwwallustwaybarwaybar-modulewaybar-themes
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
1.1 KiB
58 lines
1.1 KiB
#!/bin/bash |
|
|
|
# ACTUAL THEME |
|
THEMEIS=$(realpath ~/.config/waybar/style.css | sed 's/.*-\(.*\)\.css/\1/') |
|
|
|
# Array for the styles |
|
STYLES=( |
|
"Purple" |
|
"Crimson" |
|
"Golden-Noir" |
|
"Simple-Pink" |
|
"pywal" |
|
"dark" |
|
"light" |
|
"Black-&-White" |
|
"colors" |
|
"colors-border" |
|
"colors-line" |
|
"colorful" |
|
"Catppuccin-Mocha" |
|
"Catppuccin-Latte" |
|
"Transparent" |
|
) |
|
|
|
# Build ROFI |
|
SELECTED_STYLE=$(printf "%s\n" "${STYLES[@]}" | rofi -dmenu -config ~/.config/rofi/config-waybar.rasi "${#STYLES[@]}") |
|
|
|
# Check if rofi is already running |
|
if pidof rofi > /dev/null; then |
|
pkill rofi |
|
exit 0 |
|
fi |
|
|
|
# Verify the selected theme |
|
if [[ " ${STYLES[@]} " =~ " $SELECTED_STYLE " ]]; then |
|
SWITCHTO="${SELECTED_STYLE}" |
|
else |
|
echo "Invalid selection" |
|
exit 1 |
|
fi |
|
|
|
# APPLY THEME |
|
THEMEFILE="$HOME/.config/waybar/style/${SWITCHTO}.css" |
|
if [ -f "$THEMEFILE" ]; then |
|
ln -sf "$THEMEFILE" "$HOME/.config/waybar/style.css" |
|
else |
|
echo "Error: $THEMEFILE not found" |
|
exit 1 |
|
fi |
|
|
|
# Restart relevant processes |
|
for process in waybar mako dunst; do |
|
if pidof "$process" > /dev/null; then |
|
pkill "$process" |
|
fi |
|
done |
|
|
|
exec ~/.config/hypr/scripts/Refresh.sh
|
|
|