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/OverviewToggle.sh | 37 ++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 14 deletions(-) mode change 100644 => 100755 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 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 -- cgit v1.2.3