-
Notifications
You must be signed in to change notification settings - Fork 3
/
uninstall.sh
executable file
·48 lines (39 loc) · 1.29 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
#! /usr/bin/env bash
SRC_DIR=$(cd $(dirname $0) && pwd)
THEME_NAME=Lavanda
ROOT_UID=0
# Destination directory
LATTE_DIR="$HOME/.config/latte"
if [ "$UID" -eq "$ROOT_UID" ]; then
AURORAE_DIR="/usr/share/aurorae/themes"
SCHEMES_DIR="/usr/share/color-schemes"
PLASMA_DIR="/usr/share/plasma/desktoptheme"
LOOKFEEL_DIR="/usr/share/plasma/look-and-feel"
KVANTUM_DIR="/usr/share/Kvantum"
WALLPAPER_DIR="/usr/share/wallpapers"
else
AURORAE_DIR="$HOME/.local/share/aurorae/themes"
SCHEMES_DIR="$HOME/.local/share/color-schemes"
PLASMA_DIR="$HOME/.local/share/plasma/desktoptheme"
LOOKFEEL_DIR="$HOME/.local/share/plasma/look-and-feel"
KVANTUM_DIR="$HOME/.config/Kvantum"
WALLPAPER_DIR="$HOME/.local/share/wallpapers"
fi
check_and_remove() {
if ls $1 1> /dev/null 2>&1; then
rm -rfv $1
fi
}
uninstall() {
local name=${1}
check_and_remove "${AURORAE_DIR}/${name}*"
check_and_remove "${PLASMA_DIR}/${name}*"
check_and_remove "${SCHEMES_DIR}/${name}*"
check_and_remove "${LOOKFEEL_DIR}/com.github.vinceliuice.${name}*"
check_and_remove "${KVANTUM_DIR}/${name}*"
check_and_remove "${WALLPAPER_DIR}/${name}*"
check_and_remove "${LATTE_DIR}/${name}.layout.latte"
}
echo "Uninstalling '${THEME_NAME} kde themes'..."
uninstall "${name:-${THEME_NAME}}"
echo "Uninstall finished..."