diff options
Diffstat (limited to 'config/hypr/scripts')
| -rwxr-xr-x | config/hypr/scripts/ThemeChanger.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/config/hypr/scripts/ThemeChanger.sh b/config/hypr/scripts/ThemeChanger.sh index 3f55cce4..f42fb406 100755 --- a/config/hypr/scripts/ThemeChanger.sh +++ b/config/hypr/scripts/ThemeChanger.sh @@ -86,6 +86,21 @@ if wallust theme -- "${choice}"; then # Small cushion before refresh to mirror wallpaper flow sleep 0.2 + # Normalize Rofi selection colors to use the palette's accent (color12) + rofi_colors="$HOME/.config/rofi/wallust/colors-rofi.rasi" + if [ -f "$rofi_colors" ]; then + accent_hex=$(sed -n 's/^\s*color12:\s*\(#[0-9A-Fa-f]\{6\}\).*/\1/p' "$rofi_colors" | head -n1) + [ -z "$accent_hex" ] && accent_hex=$(sed -n 's/^\s*color13:\s*\(#[0-9A-Fa-f]\{6\}\).*/\1/p' "$rofi_colors" | head -n1) + if [ -n "$accent_hex" ]; then + sed -i -E "s|^(\s*selected-normal-background:\s*).*$|\1$accent_hex;|" "$rofi_colors" + sed -i -E "s|^(\s*selected-active-background:\s*).*$|\1$accent_hex;|" "$rofi_colors" + sed -i -E "s|^(\s*selected-urgent-background:\s*).*$|\1$accent_hex;|" "$rofi_colors" + sed -i -E "s|^(\s*selected-normal-foreground:\s*).*$|\1#000000;|" "$rofi_colors" + sed -i -E "s|^(\s*selected-active-foreground:\s*).*$|\1#000000;|" "$rofi_colors" + sed -i -E "s|^(\s*selected-urgent-foreground:\s*).*$|\1#000000;|" "$rofi_colors" + fi + fi + # Refresh bars/menus after files are ready if [ -x "$HOME/.config/hypr/scripts/Refresh.sh" ]; then "$HOME/.config/hypr/scripts/Refresh.sh" >/dev/null 2>&1 || true |
