-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuninstall.sh
More file actions
executable file
·59 lines (46 loc) · 1.34 KB
/
Copy pathuninstall.sh
File metadata and controls
executable file
·59 lines (46 loc) · 1.34 KB
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
56
57
58
59
#!/bin/bash
loading_bar() {
local duration=$1
local message=$2
echo -n "$message"
for ((i=0; i<duration; i++)); do
echo -n "."
sleep 0.2
done
echo " Done."
}
clear
APP_NAME="Black_Wind"
APP_DIR="$HOME/.local/share/apps/Black_wind"
DESKTOP_FILE="$HOME/.local/share/applications/${APP_NAME}.desktop"
loading_bar 4 "Removing application files"
if [ -d "$APP_DIR" ]; then
rm -rf "$APP_DIR"
echo "🗑️ Removed $APP_DIR"
else
echo "ℹ️ Application directory not found: $APP_DIR"
fi
clear
loading_bar 3 "Removing desktop entry"
if [ -f "$DESKTOP_FILE" ]; then
rm "$DESKTOP_FILE"
echo "🗑️ Removed $DESKTOP_FILE"
else
echo "ℹ️ Desktop file not found: $DESKTOP_FILE"
fi
clear
loading_bar 2 "Updating desktop database"
update-desktop-database "$HOME/.local/share/applications/"
clear
loading_bar 3 "Removing from GNOME favorites"
CURRENT_FAVS=$(gsettings get org.gnome.shell favorite-apps)
if [[ $CURRENT_FAVS == *"$APP_NAME.desktop"* ]]; then
NEW_FAVS=$(echo "$CURRENT_FAVS" | sed "s/'$APP_NAME.desktop',\? *//g")
gsettings set org.gnome.shell favorite-apps "$NEW_FAVS"
echo "✅ Removed $APP_NAME from GNOME favorites"
else
echo "ℹ️ $APP_NAME not found in GNOME favorites"
fi
clear
flatpak run com.google.Chrome "https://github.com/iaceene/Black_Window" > /dev/null 2>&1 &
echo -e "\n✅ Uninstallation complete."