aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorbrockar <martinnguzman.mg@gmail.com>2025-11-22 23:23:55 -0300
committerbrockar <martinnguzman.mg@gmail.com>2025-11-22 23:23:55 -0300
commitc575e0672a6a3f7f7e841c9b2ba6b2a97fb4c53f (patch)
treea1b02c986bb592125e2261bc8f1104689edda564 /config
parentbc4dc7b09675607e30d82fba71a220ef24f86187 (diff)
new: UserConfigsSwitches.sh
Script to manage UserConfigs
Diffstat (limited to 'config')
-rwxr-xr-xconfig/hypr/scripts/UserConfigsSwitcher.sh56
1 files changed, 56 insertions, 0 deletions
diff --git a/config/hypr/scripts/UserConfigsSwitcher.sh b/config/hypr/scripts/UserConfigsSwitcher.sh
new file mode 100755
index 00000000..ad1d4e63
--- /dev/null
+++ b/config/hypr/scripts/UserConfigsSwitcher.sh
@@ -0,0 +1,56 @@
+#!/usr/bin/env bash
+# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
+# Script to manage UserConfigs and UserConfigsBak
+
+HYPR_CONFIG_DIR="$HOME/.config/hypr"
+USER_CONFIGS="$HYPR_CONFIG_DIR/UserConfigs"
+USER_CONFIGS_BAK="$HYPR_CONFIG_DIR/UserConfigsBak"
+
+if [ -d "$USER_CONFIGS" ] && [ ! -d "$USER_CONFIGS_BAK" ]; then
+ echo "Moving UserConfigs to UserConfigsBak..."
+ mv "$USER_CONFIGS" "$USER_CONFIGS_BAK"
+ echo "Done. Your UserConfigs are now in UserConfigsBak."
+elif [ ! -d "$USER_CONFIGS" ] && [ -d "$USER_CONFIGS_BAK" ]; then
+ echo "Moving UserConfigsBak to UserConfigs..."
+ mv "$USER_CONFIGS_BAK" "$USER_CONFIGS"
+ echo "Done. Your backup has been restored to UserConfigs."
+elif [ -d "$USER_CONFIGS" ] && [ -d "$USER_CONFIGS_BAK" ]; then
+ echo "Both UserConfigs and UserConfigsBak exist."
+ echo "Please choose what to do:"
+ PS3="Enter your choice: "
+ select option in "Backup current UserConfigs (move to UserConfigsBak)" "Restore backup (move UserConfigsBak to UserConfigs)" "Swap them" "Do nothing"; do
+ case $REPLY in
+ 1)
+ echo "Backing up UserConfigs..."
+ rm -rf "$USER_CONFIGS_BAK"
+ mv "$USER_CONFIGS" "$USER_CONFIGS_BAK"
+ echo "Done. UserConfigs moved to UserConfigsBak."
+ break
+ ;;
+ 2)
+ echo "Restoring backup..."
+ rm -rf "$USER_CONFIGS"
+ mv "$USER_CONFIGS_BAK" "$USER_CONFIGS"
+ echo "Done. UserConfigsBak moved to UserConfigs."
+ break
+ ;;
+ 3)
+ echo "Swapping..."
+ mv "$USER_CONFIGS" "$HYPR_CONFIG_DIR/UserConfigs.tmp"
+ mv "$USER_CONFIGS_BAK" "$USER_CONFIGS"
+ mv "$HYPR_CONFIG_DIR/UserConfigs.tmp" "$USER_CONFIGS_BAK"
+ echo "Done. UserConfigs and UserConfigsBak have been swapped."
+ break
+ ;;
+ 4)
+ echo "No changes made."
+ break
+ ;;
+ *)
+ echo "Invalid option. Please try again."
+ ;;
+ esac
+ done
+else
+ echo "Neither UserConfigs nor UserConfigsBak directory found. Nothing to do."
+fi
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage