forked from end-4/dots-hyprland
-
Notifications
You must be signed in to change notification settings - Fork 0
/
uninstall.sh
executable file
·50 lines (38 loc) · 2.37 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
#!/usr/bin/env bash
cd "$(dirname "$0")"
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 beed 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 "$HOME/.config/$i"
done
v rm -rf "$HOME/.local/bin/fuzzel-emoji"
##############################################################################################################################
# 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 and input groups and remove yay packages
printf '\e[36mRemoving user from video and input groups and removing packages...\n\e[97m'
user=$(whoami)
v sudo deluser "$user" video
v sudo deluser "$user" input
##############################################################################################################################
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 adw-gtk3-git brightnessctl cava foot fuzzel gjs gojq gradience-git grim gtk-layer-shell hyprland-git lexend-fonts-git libdbusmenu-gtk3 plasma-browser-integration playerctl python-build python-material-color-utilities python-poetry python-pywal ripgrep sassc swww slurp starship swayidle hyprlock-git tesseract ttf-jetbrains-mono-nerd ttf-material-symbols-variable-git ttf-space-mono-nerd typescript webp-pixbuf-loader wl-clipboard wlogout yad ydotool
printf '\e[36mUninstall Complete.\n\e[97m'