forked from Dulus-Ai/Dulus-bar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·41 lines (34 loc) · 1.54 KB
/
Copy pathsetup.sh
File metadata and controls
executable file
·41 lines (34 loc) · 1.54 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env bash
# setup.sh (macOS / Linux) — install deps and make ./dulusbar executable.
set -euo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$ROOT"
PY="${PYTHON:-python3}"
echo "[setup] Dulus Bar root: $ROOT"
command -v "$PY" >/dev/null 2>&1 || { echo "[setup] $PY not found"; exit 1; }
echo "[setup] installing dependencies..."
"$PY" -m pip install -r requirements.txt
"$PY" -m pip install -e . || echo "[setup] editable install skipped (PYTHONPATH still works)"
chmod +x "$ROOT/dulusbar" || true
# macOS gets a native SwiftUI/AppKit notch surface. Python remains the agent
# event hub; PyQt is retained as a safe fallback and for Windows/Linux.
if [[ "$(uname -s)" == "Darwin" ]]; then
if command -v swift >/dev/null 2>&1; then
echo "[setup] building native macOS notch surface..."
swift build -c release --package-path "$ROOT/macos"
else
echo "[setup] warning: Swift toolchain not found; macOS will use the Qt fallback."
echo "[setup] install Xcode Command Line Tools with: xcode-select --install"
fi
fi
# Linux window activation needs wmctrl or xdotool for jump-to-terminal.
if [[ "$(uname -s)" == "Linux" ]]; then
if ! command -v wmctrl >/dev/null 2>&1 && ! command -v xdotool >/dev/null 2>&1; then
echo "[setup] tip: install 'wmctrl' or 'xdotool' for click-to-focus terminal (X11)."
fi
fi
echo ""
echo "[setup] done. Run:"
echo " ./dulusbar # bar + Dulus"
echo " ./dulusbar --island-only # just the bar"
echo " dulusbar # (if pip -e install succeeded) just the bar"