diff options
| author | brockar <martinnguzman.mg@gmail.com> | 2025-11-13 20:28:51 -0300 |
|---|---|---|
| committer | brockar <martinnguzman.mg@gmail.com> | 2025-11-13 20:28:51 -0300 |
| commit | 0dfd893ea1f310714c3ec2c79a17692b52ff4c43 (patch) | |
| tree | 36a4f436ed174f209f0c00d09b62818f276ec239 /config/hypr/scripts/OverviewToggle.sh | |
| parent | 8fa285acf93e1f95080a60a03b00f57bac827a63 (diff) | |
| parent | 872b09fa88825ec5631ba3cdc21e0e717ec241ee (diff) | |
Merge remote-tracking branch 'origin/development' into br-userconfigs
Diffstat (limited to 'config/hypr/scripts/OverviewToggle.sh')
| -rwxr-xr-x | config/hypr/scripts/OverviewToggle.sh | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/config/hypr/scripts/OverviewToggle.sh b/config/hypr/scripts/OverviewToggle.sh new file mode 100755 index 00000000..21c2da34 --- /dev/null +++ b/config/hypr/scripts/OverviewToggle.sh @@ -0,0 +1,37 @@ +#!/usr/bin/env bash +# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ # +# Overview toggle wrapper - tries Quickshell first, falls back to AGS + +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 + qs >/dev/null 2>&1 & + sleep 0.6 + if hyprctl dispatch global quickshell:overviewToggle >/dev/null 2>&1; then + exit 0 + fi +fi + +# 2) Fall back to AGS template +if command -v ags >/dev/null 2>&1; then + pkill rofi || true + 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 +notify-send "Overview" "Neither Quickshell nor AGS is available" -u low 2>/dev/null || true +exit 1 |
