diff options
Diffstat (limited to 'config/hypr/scripts/OverviewToggle.sh')
| -rwxr-xr-x | config/hypr/scripts/OverviewToggle.sh | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/config/hypr/scripts/OverviewToggle.sh b/config/hypr/scripts/OverviewToggle.sh index 14470eb0..456ccef1 100755 --- a/config/hypr/scripts/OverviewToggle.sh +++ b/config/hypr/scripts/OverviewToggle.sh @@ -9,15 +9,18 @@ set -euo pipefail -# 1) Try Quickshell via IPC (works if QS is running and listening) -if pgrep -x qs >/dev/null 2>&1; then - if qs ipc -c overview call overview toggle >/dev/null 2>&1; then - exit 0 +QS_OVERVIEW_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/quickshell/overview" + +# 1) Prefer Quickshell when installed and configured +if command -v qs >/dev/null 2>&1 && [ -d "$QS_OVERVIEW_DIR" ]; then + # Try Quickshell via IPC (works if QS is running and listening) + if pgrep -x qs >/dev/null 2>&1; then + if qs ipc -c overview call overview toggle >/dev/null 2>&1; then + exit 0 + fi fi -fi -# If QS isn't running, but the CLI exists, try starting it and retry once -if command -v qs >/dev/null 2>&1; then + # If QS isn't running, try starting it and retry once qs -c overview >/dev/null 2>&1 & sleep 0.6 if qs ipc -c overview call overview toggle >/dev/null 2>&1; then |
