-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuninstall.sh
More file actions
executable file
·33 lines (26 loc) · 857 Bytes
/
Copy pathuninstall.sh
File metadata and controls
executable file
·33 lines (26 loc) · 857 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
#!/bin/bash
# Uninstall script for Killswitch Session Manager
if [ "$EUID" -ne 0 ]; then
echo "Please, run with sudo."
exit 1
fi
echo "Deleting executable files..."
rm -f /usr/local/bin/killswitch-session
rm -f /usr/local/bin/killswitch-switcher
echo "Deleting killswitch.desktop session file..."
rm -f /usr/share/wayland-sessions/killswitch.desktop
REAL_USER=${SUDO_USER:-$USER}
USER_HOME=$(eval echo ~$REAL_USER)
USER_CONFIG_DIR="$USER_HOME/.config/killswitch"
USER_STATE_DIR="$USER_HOME/.local/state/killswitch"
echo "Deleting files of session state..."
rm -rf "$USER_STATE_DIR"
echo "Delete your settings (config.sh)? [y/N]"
read -r response
if [[ "$response" =~ ^([yY][eE][sS]|[yY])$ ]]; then
rm -rf "$USER_CONFIG_DIR"
echo "Config deleted."
else
echo "Config stored in $USER_CONFIG_DIR"
fi
echo "Killswitch succesully deleted!"