-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathuninstall.sh
More file actions
executable file
·34 lines (28 loc) · 1004 Bytes
/
Copy pathuninstall.sh
File metadata and controls
executable file
·34 lines (28 loc) · 1004 Bytes
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
#!/bin/bash
# Uninstaller for LBrightness (lbright)
set -e
echo "=== Uninstalling LBrightness ==="
# Stop and disable systemd user service
systemctl --user stop lbright.service 2>/dev/null || true
systemctl --user disable lbright.service 2>/dev/null || true
# Remove binary and service unit
rm -f "$HOME/.local/bin/lbright"
rm -f "$HOME/.config/systemd/user/lbright.service"
systemctl --user daemon-reload
if [[ "$1" == "-y" ]]; then
rm -rf "$HOME/.config/lbrightness"
rm -rf "$HOME/.local/state/lbrightness"
echo "Removed configuration and state files."
else
echo -n "Do you want to delete user configuration (~/.config/lbrightness)? (y/N): "
read -r -t 10 REPLY || REPLY="n"
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
rm -rf "$HOME/.config/lbrightness"
rm -rf "$HOME/.local/state/lbrightness"
echo "Removed configuration and state files."
else
echo "Kept configuration at ~/.config/lbrightness."
fi
fi
echo "Uninstallation complete!"