forked from Axenide/Ax-Shell
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuninstall.sh
More file actions
31 lines (25 loc) · 775 Bytes
/
uninstall.sh
File metadata and controls
31 lines (25 loc) · 775 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
#!/bin/bash
echo "This will permanently delete Ax-Shell cache, configuration, and remove its entry from hyprland.conf."
read -p "Are you sure you want to continue? [y/N] " confirm
if [[ "$confirm" != "y" && "$confirm" != "Y" ]]; then
echo "Aborted."
exit 1
fi
rm -rf ~/.cache/ax-shell
rm -rf ~/.config/Ax-Shell
conf_file=~/.config/hypr/hyprland.conf
tmp_file=$(mktemp)
awk '
BEGIN { found_comment=0 }
{
if ($0 ~ /# Ax-Shell/) {
found_comment=1
next
}
if (found_comment && $0 ~ /source[[:space:]]*=[[:space:]]*~\/\.config\/Ax-Shell\/config\/hypr\/ax-shell\.conf/) {
found_comment=0
next
}
print
}' "$conf_file" > "$tmp_file" && mv "$tmp_file" "$conf_file"
echo "Ax-Shell data and config removed successfully."