Skip to content

Commit e0ace35

Browse files
author
nnyyxxxx
committed
Add Kitty revert functionality & keep synergy
1 parent 5fb59e9 commit e0ace35

File tree

4 files changed

+42
-6
lines changed

4 files changed

+42
-6
lines changed

tabs/applications-setup/alacritty-setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ setupAlacritty() {
2626
}
2727

2828
revertAlacritty() {
29-
echo "Reverting Alacritty setup..."
29+
echo "Reverting Alacritty configuration..."
3030
if [ -d "${HOME}/.config/alacritty-bak" ]; then
3131
rm -rf "${HOME}/.config/alacritty"
3232
mv "${HOME}/.config/alacritty-bak" "${HOME}/.config/alacritty"

tabs/applications-setup/kitty-setup.sh

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,42 @@ setupKitty() {
2525
wget -O "${HOME}/.config/kitty/nord.conf" https://github.com/ChrisTitusTech/dwm-titus/raw/main/config/kitty/nord.conf
2626
}
2727

28-
checkEnv
29-
checkEscalationTool
30-
setupKitty
28+
revertKitty() {
29+
echo "Reverting Kitty configuration..."
30+
CONFIG_DIR="${HOME}/.config/kitty"
31+
32+
if [ -d "${CONFIG_DIR}" ]; then
33+
rm -rf "${CONFIG_DIR}"
34+
echo "Kitty configuration reverted."
35+
36+
if command_exists kitty; then
37+
printf "Do you want to uninstall Kitty as well? (y/N): "
38+
read uninstall_choice
39+
if [ "$uninstall_choice" = "y" ] || [ "$uninstall_choice" = "Y" ]; then
40+
case ${PACKAGER} in
41+
pacman)
42+
$ESCALATION_TOOL "${PACKAGER}" -R --noconfirm kitty
43+
;;
44+
*)
45+
$ESCALATION_TOOL "${PACKAGER}" remove -y kitty
46+
;;
47+
esac
48+
echo "Kitty uninstalled."
49+
fi
50+
fi
51+
else
52+
echo "No Kitty configuration found. Nothing to revert."
53+
fi
54+
}
55+
56+
run() {
57+
checkEnv
58+
checkEscalationTool
59+
setupKitty
60+
}
61+
62+
revert() {
63+
checkEnv
64+
checkEscalationTool
65+
revertKitty
66+
}

tabs/applications-setup/rofi-setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ setupRofi() {
3131
}
3232

3333
revertRofi() {
34-
echo "Reverting Rofi setup..."
34+
echo "Reverting Rofi configuration..."
3535
CONFIG_DIR="$HOME/.config/rofi"
3636

3737
if [ -d "${CONFIG_DIR}" ]; then

tabs/applications-setup/zsh-setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ EOL
4747
}
4848

4949
revertZSH() {
50-
echo "Reverting ZSH setup..."
50+
echo "Reverting ZSH configuration..."
5151
CONFIG_DIR="$HOME/.config/zsh"
5252

5353
if [ -d "${CONFIG_DIR}" ]; then

0 commit comments

Comments
 (0)