diff options
| author | Don Williams <don.e.williams@gmail.com> | 2026-01-16 20:09:29 -0500 |
|---|---|---|
| committer | Don Williams <don.e.williams@gmail.com> | 2026-01-16 20:09:29 -0500 |
| commit | 6339bc47664bdd30895c1026ae025b82e3a96f55 (patch) | |
| tree | 3f5e22b4c61ab87c376781a0e47a5b39f9d3a973 /config/hypr/scripts | |
| parent | 4b8270e5a24ecbb27693e30eec5d9a2d75442d88 (diff) | |
Notification missing icon, failing silently
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: config/hypr/scripts/Kool_Quick_Settings.sh
Diffstat (limited to 'config/hypr/scripts')
| -rwxr-xr-x | config/hypr/scripts/Kool_Quick_Settings.sh | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/config/hypr/scripts/Kool_Quick_Settings.sh b/config/hypr/scripts/Kool_Quick_Settings.sh index 9dacd7c6..2a36ea3b 100755 --- a/config/hypr/scripts/Kool_Quick_Settings.sh +++ b/config/hypr/scripts/Kool_Quick_Settings.sh @@ -22,7 +22,11 @@ UserScripts="$HOME/.config/hypr/UserScripts" # Function to show info notification show_info() { - notify-send -i "$iDIR/info.png" "Info" "$1" + if [[ -f "$iDIR/info.png" ]]; then + notify-send -i "$iDIR/info.png" "Info" "$1" + else + notify-send "Info" "$1" + fi } # Function to toggle Rainbow Borders script availability and refresh UI components toggle_rainbow_borders() { @@ -148,9 +152,8 @@ rainbow_borders_menu() { sed -i '1i EFFECT_TYPE="'"$mode"'"' "$rainbow_script" fi fi - # Re-read to confirm - current=$(grep -E '^EFFECT_TYPE=' "$rainbow_script" 2>/dev/null | sed -E 's/^EFFECT_TYPE="?([^"]*)"?/\1/') - [[ -z "$current" ]] && current="unknown" + # Set current to chosen mode + current="$mode" ;; *) return ;; @@ -161,6 +164,11 @@ rainbow_borders_menu() { "$refresh_script" >/dev/null 2>&1 & fi + # Apply mode immediately (in case refresh doesn't trigger it) + if [[ "$current" != "disabled" && -x "$rainbow_script" ]]; then + "$rainbow_script" >/dev/null 2>&1 & + fi + # Notify only if changed (friendly display) if [[ "$current" != "$previous" ]]; then local new_display="$current" |
