-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuninstall.sh
More file actions
executable file
·61 lines (54 loc) · 1.8 KB
/
uninstall.sh
File metadata and controls
executable file
·61 lines (54 loc) · 1.8 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash
set -e
# ghostty-ambient uninstaller
# Usage: curl -fsSL https://raw.githubusercontent.com/gezibash/ghostty-ambient/main/uninstall.sh | bash
echo "Uninstalling ghostty-ambient..."
echo
# Detect platform
OS="$(uname -s)"
case "$OS" in
Darwin) PLATFORM="macos" ;;
Linux) PLATFORM="linux" ;;
*) PLATFORM="unknown" ;;
esac
# Stop daemon using CLI if available
if command -v ghostty-ambient &> /dev/null; then
echo "Stopping daemon..."
ghostty-ambient --stop 2>/dev/null || true
fi
# Remove daemon config files
if [ "$PLATFORM" = "macos" ]; then
PLIST_FILE="$HOME/Library/LaunchAgents/com.ghostty-ambient.daemon.plist"
if [ -f "$PLIST_FILE" ]; then
launchctl unload "$PLIST_FILE" 2>/dev/null || true
rm -f "$PLIST_FILE"
echo "Daemon config removed."
fi
elif [ "$PLATFORM" = "linux" ]; then
SERVICE_FILE="$HOME/.config/systemd/user/ghostty-ambient.service"
if [ -f "$SERVICE_FILE" ]; then
systemctl --user stop ghostty-ambient 2>/dev/null || true
systemctl --user disable ghostty-ambient 2>/dev/null || true
rm -f "$SERVICE_FILE"
systemctl --user daemon-reload
echo "Daemon config removed."
fi
fi
# Uninstall the package
if command -v uv &> /dev/null; then
echo "Uninstalling via uv..."
uv tool uninstall ghostty-ambient 2>/dev/null || true
elif command -v pipx &> /dev/null; then
echo "Uninstalling via pipx..."
pipx uninstall ghostty-ambient 2>/dev/null || true
elif command -v pip &> /dev/null; then
echo "Uninstalling via pip..."
pip uninstall -y ghostty-ambient 2>/dev/null || true
fi
echo
echo "Uninstall complete."
echo
echo "Note: Your learned preferences are preserved in:"
echo " ~/.config/ghostty-ambient/history.json"
echo
echo "To remove all data: rm -rf ~/.config/ghostty-ambient"