-
Notifications
You must be signed in to change notification settings - Fork 311
/
uninstall.sh
executable file
·55 lines (43 loc) · 2.28 KB
/
uninstall.sh
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
#!/usr/bin/env bash
cd "$(dirname "$0")"
source ./scriptdata/environment-variables
function v() {
echo -e "[$0]: \e[32mNow executing:\e[0m"
echo -e "\e[32m$@\e[0m"
"$@"
}
printf 'Hi there!\n'
printf 'This script 1. will uninstall [end-4/dots-hyprland > illogical-impulse] dotfiles\n'
printf ' 2. will try to revert *mostly everything* installed using install.sh, so it'\''s pretty destructive\n'
printf ' 3. has not been tested, use at your own risk.\n'
printf ' 4. will show all commands that it runs.\n'
printf 'Ctrl+C to exit. Enter to continue.\n'
read -r
set -e
##############################################################################################################################
# Undo Step 3: Removing copied config and local folders
printf '\e[36mRemoving copied config and local folders...\n\e[97m'
for i in ags fish fontconfig foot fuzzel hypr mpv wlogout "starship.toml" rubyshot
do v rm -rf "$XDG_CONFIG_HOME/$i"
done
v rm -rf "$XDG_BIN_HOME/fuzzel-emoji"
v rm -rf "$XDG_CACHE_HOME/ags"
v sudo rm -rf "$XDG_STATE_HOME/ags"
##############################################################################################################################
# Undo Step 2: Uninstall AGS - Disabled for now, check issues
# echo 'Uninstalling AGS...'
# sudo meson uninstall -C ~/ags/build
# rm -rf ~/ags
##############################################################################################################################
# Undo Step 1: Remove added user from video, i2c, and input groups and remove yay packages
printf '\e[36mRemoving user from video, i2c, and input groups and removing packages...\n\e[97m'
user=$(whoami)
v sudo gpasswd -d "$user" video
v sudo gpasswd -d "$user" i2c
v sudo gpasswd -d "$user" input
v sudo rm /etc/modules-load.d/i2c-dev.conf
##############################################################################################################################
read -p "Do you want to uninstall packages used by the dotfiles?\nCtrl+C to exit, or press Enter to proceed"
# Removing installed yay packages and dependencies
v yay -Rns hyprland-git illogical-impulse-{audio,backlight,basic,fonts-themes,gnome,gtk,microtex,portal,pymyc-aur,python,screencapture,widgets} plasma-browser-integration
printf '\e[36mUninstall Complete.\n\e[97m'