aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/scripts/OverviewToggle.sh
blob: 1868398404b894a806f9e610ced6622b49b38437 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage