aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/migrate-hypr-to-lua.sh
diff options
context:
space:
mode:
authorDon Williams <don.e.williams@gmail.com>2026-07-22 02:44:02 -0400
committerPinapelz <yukais@pinapelz.com>2026-08-29 21:40:35 -0700
commit0d081f3aa56a0a137b1f00c83b1e7cb6dea79500 (patch)
treea07e7f6fb0fe034f4e5d41144e7f42caa81df377 /scripts/migrate-hypr-to-lua.sh
parent724c31c02cf8f6a46040fa17ce0b5902708bee2b (diff)
Moved default config kitty/ghostty to UserConfigs
Updated scripts and set eclusion in lua mgiration script to preseve them Signed-off-by: Don Williams <don.e.williams@gmail.com> On branch development Your branch is up to date with 'origin/development'. Changes to be committed: modified: CHANGELOG.md modified: config/hypr/scripts/DarkLight.sh modified: config/hypr/scripts/Ghostty_themes.sh modified: config/hypr/scripts/Kitty_themes.sh modified: scripts/migrate-hypr-to-lua.sh
Diffstat (limited to 'scripts/migrate-hypr-to-lua.sh')
-rwxr-xr-xscripts/migrate-hypr-to-lua.sh27
1 files changed, 25 insertions, 2 deletions
diff --git a/scripts/migrate-hypr-to-lua.sh b/scripts/migrate-hypr-to-lua.sh
index a3e4c78c..0a127688 100755
--- a/scripts/migrate-hypr-to-lua.sh
+++ b/scripts/migrate-hypr-to-lua.sh
@@ -53,6 +53,13 @@ SRC_USER_LUA_TEMPLATES_DIR="$SRC_HYPR_DIR/UserConfigs"
DEST_LUA_ENTRY="$DEST_HYPR_DIR/hyprland.lua"
DEST_LUA_ENTRY_DISABLED="$DEST_HYPR_DIR/hyprland.lua.disable"
SOURCE_LUA_ENTRY=""
+USER_CONFIGS_PRESERVED_CONFS=(
+ "kitty.conf"
+ "ghostty.conf"
+ "hyprview-layout.conf"
+ "LaptopDisplay.conf"
+ "WorkSpaceRules.conf"
+)
usage() {
cat <<USAGE
@@ -137,6 +144,8 @@ restore_latest_conf_backup() {
local legacy_root="$target_dir/$LEGACY_CONFIGS_DIR_NAME"
local moved=0
local file
+ local basename
+ local keep
local archives=()
[ -d "$target_dir" ] || return 0
@@ -2210,13 +2219,27 @@ move_conf_files_to_legacy() {
local source_dir="$1"
local legacy_dir="$2"
local label="$3"
+ shift 3
+ local -a preserved_confs=("$@")
local moved=0
local file
+ local basename
+ local keep
+ local preserved
[ -d "$source_dir" ] || return 0
mkdir -p "$legacy_dir"
while IFS= read -r -d '' file; do
+ basename="$(basename "$file")"
+ keep=0
+ for preserved in "${preserved_confs[@]}"; do
+ if [ "$basename" = "$preserved" ]; then
+ keep=1
+ break
+ fi
+ done
+ [ "$keep" -eq 1 ] && continue
mv "$file" "$legacy_dir/"
moved=1
done < <(find "$source_dir" -maxdepth 1 -type f -name '*.conf' -print0)
@@ -2253,11 +2276,11 @@ print_conversion_coverage_summary() {
[INFO] - $DEST_HYPR_DIR/hyprlock.conf, hyprlock-1080p.conf, hyprlock-2k.conf
[INFO] - $DEST_HYPR_DIR/hyprland.conf (fallback/non-Lua entrypoint)
[INFO] - $DEST_HYPR_DIR/Monitor_Profiles/*.conf and $DEST_HYPR_DIR/animations/*.conf (preset profiles)
+[INFO] - $USER_CONFIGS_DIR/kitty.conf, $USER_CONFIGS_DIR/ghostty.conf, $USER_CONFIGS_DIR/hyprview-layout.conf
[INFO] - $USER_CONFIGS_DIR/LaptopDisplay.conf and $USER_CONFIGS_DIR/WorkSpaceRules.conf (legacy/helper files)
SUMMARY
}
-
-move_conf_files_to_legacy "$USER_CONFIGS_DIR" "$USER_CONFIGS_LEGACY_DIR" "$USER_CONFIGS_DIR"
+move_conf_files_to_legacy "$USER_CONFIGS_DIR" "$USER_CONFIGS_LEGACY_DIR" "$USER_CONFIGS_DIR" "${USER_CONFIGS_PRESERVED_CONFS[@]}"
move_conf_files_to_legacy "$CONFIGS_DIR" "$CONFIGS_LEGACY_DIR" "$CONFIGS_DIR"
print_conversion_coverage_summary
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage