gardesk/gar / 78c6ca7

Browse files

Update session script and desktop entry for installer

- gar-session.sh: Dynamic binary path lookup instead of hardcoded
- gar.desktop: Update default path to /usr/local/share/gar
Authored by mfwolffe <wolffemf@dukes.jmu.edu>
SHA
78c6ca73bd2a851a9757d66b8183fb323bcfb747
Parents
e0f66b3
Tree
efd9fa4

2 changed files

StatusFile+-
M gar-session.sh 22 2
M gar.desktop 3 2
gar-session.shmodified
@@ -1,7 +1,27 @@
11
 #!/bin/bash
22
 # gar session wrapper - sets up environment before starting gar
3
+# This script is typically installed to /usr/local/share/gar/gar-session.sh
34
 
4
-GAR_DIR="$(cd "$(dirname "$0")" && pwd)"
5
+# Find gar binary - check common locations
6
+GAR_BIN="${GAR_BIN:-}"
7
+if [ -z "$GAR_BIN" ]; then
8
+    for path in /usr/local/bin/gar /usr/bin/gar "$HOME/.local/bin/gar"; do
9
+        if [ -x "$path" ]; then
10
+            GAR_BIN="$path"
11
+            break
12
+        fi
13
+    done
14
+fi
15
+
16
+# Fallback to PATH lookup
17
+if [ -z "$GAR_BIN" ] || [ ! -x "$GAR_BIN" ]; then
18
+    GAR_BIN="$(command -v gar 2>/dev/null || true)"
19
+fi
20
+
21
+if [ -z "$GAR_BIN" ] || [ ! -x "$GAR_BIN" ]; then
22
+    echo "ERROR: gar binary not found. Please ensure gar is installed." >&2
23
+    exit 1
24
+fi
525
 
626
 # Optional: configure monitor layout
727
 # Uncomment and customize for your setup:
@@ -51,4 +71,4 @@ export GAR_LOG=info
5171
 # (Legacy polybar launch removed - use gar.bar config instead)
5272
 
5373
 # Start gar
54
-exec /home/mfwolffe/GithubOrgs/tenseleyFlow/gar/target/release/gar
74
+exec "$GAR_BIN"
gar.desktopmodified
@@ -1,6 +1,7 @@
11
 [Desktop Entry]
22
 Name=gar
3
-Comment=Tiling window manager with smart splits
4
-Exec=/home/mfwolffe/GithubOrgs/tenseleyFlow/gar/gar-session.sh
3
+Comment=gar tiling window manager - modular X11 desktop
4
+Exec=/usr/local/share/gar/gar-session.sh
55
 Type=XSession
66
 DesktopNames=gar
7
+Keywords=tiling;window;manager;wm;x11;