From 7441f2cb05b6916ff7cb08a8c0f14b7ff865a1b1 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Sun, 2 Nov 2025 17:23:53 -0500 Subject: feat: Add smart AGS/Quickshell fallback with OverviewToggle wrapper Implements a robust fallback mechanism for desktop overview functionality that handles both AGS and Quickshell installations gracefully. Changes: - Add OverviewToggle.sh wrapper script that tries Quickshell first, falls back to AGS if unavailable or broken - Update UserKeybinds.conf with new SUPER+A binding to OverviewToggle.sh - Preserve original AGS and Quickshell keybinds as commented references - Simplify copy.sh logic to enable both AGS and QS simultaneously - Remove conflicting keybind toggle logic from copy.sh Benefits: - Users can have both AGS and Quickshell installed simultaneously - Automatic fallback when one tool is broken or unavailable - Quickshell preferred (tried first) as it's more performant - Graceful degradation with user notification if neither available - Auto-starts AGS if installed but not running - Compatible with existing upgrade.sh and ComposeHyprConfigs.sh workflow Technical details: - OverviewToggle.sh checks for running processes before attempting toggle - Uses hyprctl dispatch for Quickshell's global dispatcher - Falls back to ags -t 'overview' with rofi cleanup for AGS - Shows desktop notification if neither tool is available - Script auto-made executable via existing chmod in copy.sh (line 1027) Addresses: Issue where AGS and Quickshell have had recent stability problems, requiring manual keybind switching between them --- config/hypr/scripts/OverviewToggle.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 config/hypr/scripts/OverviewToggle.sh (limited to 'config/hypr/scripts/OverviewToggle.sh') diff --git a/config/hypr/scripts/OverviewToggle.sh b/config/hypr/scripts/OverviewToggle.sh new file mode 100644 index 00000000..18683984 --- /dev/null +++ b/config/hypr/scripts/OverviewToggle.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash +# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ # +# Overview toggle wrapper - tries quickshell first, falls back to AGS + +# Try quickshell first if installed +if command -v qs >/dev/null 2>&1; then + # Check if quickshell is running + if pgrep -x qs >/dev/null 2>&1; then + # Try to toggle quickshell overview + hyprctl dispatch global quickshell:overviewToggle 2>/dev/null && exit 0 + fi +fi + +# Fall back to AGS if quickshell failed or isn't available +if command -v ags >/dev/null 2>&1; then + # Check if AGS is running, start it if not + if ! pgrep -x ags >/dev/null 2>&1; then + ags & + sleep 0.5 + fi + # Toggle AGS overview + pkill rofi || true + ags -t 'overview' 2>/dev/null && exit 0 +fi + +# If we get here, neither worked +notify-send "Overview" "Neither Quickshell nor AGS is available" -u low 2>/dev/null || true +exit 1 -- cgit v1.2.3 From f992b375bfaf76e82df939ac16502755984db53e Mon Sep 17 00:00:00 2001 From: Don Williams Date: Mon, 3 Nov 2025 22:27:24 -0500 Subject: scripts is config/hypr/scripts weren't executable On branch development Your branch is up to date with 'origin/development'. Changes to be committed: modified: scripts/Battery.sh modified: scripts/ComposeHyprConfigs.sh modified: scripts/OverviewToggle.sh modified: scripts/sddm_wallpaper.sh --- config/hypr/scripts/Battery.sh | 0 config/hypr/scripts/ComposeHyprConfigs.sh | 0 config/hypr/scripts/OverviewToggle.sh | 37 +++++++++++++++++++------------ config/hypr/scripts/sddm_wallpaper.sh | 0 4 files changed, 23 insertions(+), 14 deletions(-) mode change 100644 => 100755 config/hypr/scripts/Battery.sh mode change 100644 => 100755 config/hypr/scripts/ComposeHyprConfigs.sh mode change 100644 => 100755 config/hypr/scripts/OverviewToggle.sh mode change 100644 => 100755 config/hypr/scripts/sddm_wallpaper.sh (limited to 'config/hypr/scripts/OverviewToggle.sh') diff --git a/config/hypr/scripts/Battery.sh b/config/hypr/scripts/Battery.sh old mode 100644 new mode 100755 diff --git a/config/hypr/scripts/ComposeHyprConfigs.sh b/config/hypr/scripts/ComposeHyprConfigs.sh old mode 100644 new mode 100755 diff --git a/config/hypr/scripts/OverviewToggle.sh b/config/hypr/scripts/OverviewToggle.sh old mode 100644 new mode 100755 index 18683984..21c2da34 --- a/config/hypr/scripts/OverviewToggle.sh +++ b/config/hypr/scripts/OverviewToggle.sh @@ -1,26 +1,35 @@ #!/usr/bin/env bash # /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ # -# Overview toggle wrapper - tries quickshell first, falls back to AGS +# Overview toggle wrapper - tries Quickshell first, falls back to AGS -# Try quickshell first if installed +set -euo pipefail + +# 1) Try Quickshell via Hyprland global dispatch (works if QS is running and listening) +if hyprctl dispatch global quickshell:overviewToggle >/dev/null 2>&1; then + exit 0 +fi + +# If QS isn't running, try starting it and retry once if command -v qs >/dev/null 2>&1; then - # Check if quickshell is running - if pgrep -x qs >/dev/null 2>&1; then - # Try to toggle quickshell overview - hyprctl dispatch global quickshell:overviewToggle 2>/dev/null && exit 0 + qs >/dev/null 2>&1 & + sleep 0.6 + if hyprctl dispatch global quickshell:overviewToggle >/dev/null 2>&1; then + exit 0 fi fi -# Fall back to AGS if quickshell failed or isn't available +# 2) Fall back to AGS template if command -v ags >/dev/null 2>&1; then - # Check if AGS is running, start it if not - if ! pgrep -x ags >/dev/null 2>&1; then - ags & - sleep 0.5 - fi - # Toggle AGS overview pkill rofi || true - ags -t 'overview' 2>/dev/null && exit 0 + if ags -t 'overview' >/dev/null 2>&1; then + exit 0 + fi + # If it failed, try starting AGS daemon then call the template + ags >/dev/null 2>&1 & + sleep 0.6 + if ags -t 'overview' >/dev/null 2>&1; then + exit 0 + fi fi # If we get here, neither worked diff --git a/config/hypr/scripts/sddm_wallpaper.sh b/config/hypr/scripts/sddm_wallpaper.sh old mode 100644 new mode 100755 -- cgit v1.2.3 From f9e882782d23b2869cd272841af12f7e0ce2ad37 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Fri, 14 Nov 2025 12:10:46 -0500 Subject: hyprctl dispatch returned success w/o QS installed On branch development Your branch is up to date with 'origin/development'. Changes to be committed: modified: config/hypr/scripts/OverviewToggle.sh --- config/hypr/scripts/OverviewToggle.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'config/hypr/scripts/OverviewToggle.sh') diff --git a/config/hypr/scripts/OverviewToggle.sh b/config/hypr/scripts/OverviewToggle.sh index 21c2da34..2737234c 100755 --- a/config/hypr/scripts/OverviewToggle.sh +++ b/config/hypr/scripts/OverviewToggle.sh @@ -5,11 +5,15 @@ set -euo pipefail # 1) Try Quickshell via Hyprland global dispatch (works if QS is running and listening) -if hyprctl dispatch global quickshell:overviewToggle >/dev/null 2>&1; then - exit 0 +# Only attempt this if a Quickshell process is running; otherwise Hyprland will +# still return success for the dispatch and we'll never fall back to AGS. +if pgrep -x quickshell >/dev/null 2>&1; then + if hyprctl dispatch global quickshell:overviewToggle >/dev/null 2>&1; then + exit 0 + fi fi -# If QS isn't running, try starting it and retry once +# If QS isn't running, but the CLI exists, try starting it and retry once if command -v qs >/dev/null 2>&1; then qs >/dev/null 2>&1 & sleep 0.6 -- cgit v1.2.3