aboutsummaryrefslogtreecommitdiffstats
path: root/copy.sh
diff options
context:
space:
mode:
authorDon Williams <don.e.williams@gmail.com>2025-11-02 17:23:53 -0500
committerDon Williams <don.e.williams@gmail.com>2025-11-02 17:23:53 -0500
commit7441f2cb05b6916ff7cb08a8c0f14b7ff865a1b1 (patch)
tree26097b0f6063f1f388ca3f1882049ef055a50bb7 /copy.sh
parent4687cfc8c6786ebaae169e19219f1cf9f3be982d (diff)
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
Diffstat (limited to 'copy.sh')
-rwxr-xr-xcopy.sh21
1 files changed, 7 insertions, 14 deletions
diff --git a/copy.sh b/copy.sh
index 762af601..b4e958a9 100755
--- a/copy.sh
+++ b/copy.sh
@@ -259,38 +259,31 @@ if command -v blueman-applet >/dev/null 2>&1; then
grep -qx 'exec-once = blueman-applet' "$OVERLAY_SA" || echo 'exec-once = blueman-applet' >>"$OVERLAY_SA"
fi
-# Check if ags is installed edit ags behaviour on configs
+# Check if ags is installed and enable it
if command -v ags >/dev/null 2>&1; then
+ echo "${INFO} AGS detected - enabling in startup and refresh scripts" 2>&1 | tee -a "$LOG"
OVERLAY_SA="config/hypr/UserConfigs/Startup_Apps.conf"
mkdir -p "$(dirname "$OVERLAY_SA")"
touch "$OVERLAY_SA"
grep -qx 'exec-once = ags' "$OVERLAY_SA" || echo 'exec-once = ags' >>"$OVERLAY_SA"
sed -i '/#ags -q && ags &/s/^#//' config/hypr/scripts/RefreshNoWaybar.sh
sed -i '/#ags -q && ags &/s/^#//' config/hypr/scripts/Refresh.sh
-
- # Uncomment the ags overview keybind
- sed -i '/^#bind = \$mainMod, A, exec, pkill rofi || true && ags -t '\''overview'\''/s/^#//' config/hypr/UserConfigs/UserKeybinds.conf
-
- # Comment the quickshell line if not already commented
- sed -i '/^\s*bind\s*=\s*\$mainMod,\s*A,\s*global,\s*quickshell:overviewToggle/{s/^\s*/#/}' config/hypr/UserConfigs/UserKeybinds.conf
fi
-# Check if quickshell is installed; edit quickshell behaviour on configs
+# Check if quickshell is installed and enable it
if command -v qs >/dev/null 2>&1; then
+ echo "${INFO} Quickshell detected - enabling in startup and refresh scripts" 2>&1 | tee -a "$LOG"
OVERLAY_SA="config/hypr/UserConfigs/Startup_Apps.conf"
mkdir -p "$(dirname "$OVERLAY_SA")"
touch "$OVERLAY_SA"
grep -qx 'exec-once = qs' "$OVERLAY_SA" || echo 'exec-once = qs' >>"$OVERLAY_SA"
sed -i '/#pkill qs && qs &/s/^#//' config/hypr/scripts/RefreshNoWaybar.sh
sed -i '/#pkill qs && qs &/s/^#//' config/hypr/scripts/Refresh.sh
-
- # Uncomment the quickshell keybind line
- sed -i "/^#bind = \$mainMod, A, global, quickshell:overviewToggle/s/^#//" config/hypr/UserConfigs/UserKeybinds.conf
-
- # Ensure the ags overview keybind is commented
- sed -i "/^\s*bind\s*=\s*\\\$mainMod,\s*A,\s*exec,\s*pkill rofi\s*||\s*true\s*&&\s*ags\s*-t\s*'overview'/{s/^\s*/#/}" config/hypr/UserConfigs/UserKeybinds.conf
fi
+# Note: The SUPER+A keybind now uses OverviewToggle.sh which automatically
+# tries quickshell first and falls back to AGS, so both can be installed
+
printf "\n%.0s" {1..1}
# Checking if neovim or vim is installed and offer user if they want to make as default editor
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage