From 949fd81f3f6fe89b297261b9d3c839423d172ba5 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Fri, 30 Jan 2026 08:07:08 -0500 Subject: NixOS relative pathing wasn't working `cwd` issues ``` [OK] You have chosen < 1440p resolution. sed: can't read config/kitty/kitty.conf: No such file or directory [NOTE] By default, KooL's Dots are configured in 24H clock format. [ACTION] Do you want to change to 12H (AM/PM) clock format? (y/n): y sed: can't read config/waybar/Modules: No such file or directory sed: can't read config/waybar/Modules: No such file or directory sed: can't read config/waybar/Modules: No such file or directory sed: can't read config/waybar/Modules: No such file or directory sed: can't read config/waybar/Modules: No such file or directory sed: can't read config/waybar/Modules: No such file or directory sed: can't read config/waybar/Modules: No such file or directory sed: can't read config/waybar/Modules: No such file or directory sed: can't read config/waybar/Modules: No such file or directory [WARN] hyprlock template not found; skipping 12H lock format edits [NOTE] Express mode: skipping SDDM 12H edits to avoid sudo prompts. [OK] 12H format set on waybar clocks succesfully. [INFO] - copying dotfiles first part cp: cannot stat 'config/fastfetch': No such file or directory [OK] - Copy completed for fastfetch [INFO] Found kitty config found in ~/.config/ [ACTION] Do you want to replace kitty config? (y/n): y [NOTE] - Backed up kitty to /home/dwilliams/.config/kitty-backup-back-up_0130_0800. cp: cannot stat 'config/kitty': No such file or directory [OK] - Replaced kitty with new configuration. [INFO] Found rofi config found in ~/.config/ [ACTION] Do you want to replace rofi config? (y/n): y [NOTE] - Backed up rofi to /home/dwilliams/.config/rofi-backup-back-up_0130_0800. cp: cannot stat 'config/rofi': No such file or directory [OK] - Replaced rofi with new configuration. ``` On branch development Your branch is up to date with 'origin/development'. Changes to be committed: modified: copy.sh modified: scripts/lib_apps.sh modified: scripts/lib_copy.sh modified: scripts/lib_prompts.sh --- scripts/lib_copy.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'scripts/lib_copy.sh') diff --git a/scripts/lib_copy.sh b/scripts/lib_copy.sh index 331c6906..dd83007e 100644 --- a/scripts/lib_copy.sh +++ b/scripts/lib_copy.sh @@ -3,6 +3,7 @@ copy_phase1() { local log="$1" + local base="${DOTFILES_DIR:-.}" local dirs="fastfetch kitty rofi swaync" for DIR2 in $dirs; do local DIRPATH="$HOME/.config/$DIR2" @@ -16,7 +17,7 @@ copy_phase1() { BACKUP_DIR=$(get_backup_dirname) mv "$DIRPATH" "$DIRPATH-backup-$BACKUP_DIR" 2>&1 | tee -a "$log" echo -e "${NOTE:-[NOTE]} - Backed up $DIR2 to $DIRPATH-backup-$BACKUP_DIR." 2>&1 | tee -a "$log" - cp -r "config/$DIR2" "$HOME/.config/$DIR2" 2>&1 | tee -a "$log" + cp -r "$base/config/$DIR2" "$HOME/.config/$DIR2" 2>&1 | tee -a "$log" echo -e "${OK:-[OK]} - Replaced $DIR2 with new configuration." 2>&1 | tee -a "$log" if [ "$DIR2" = "rofi" ]; then if [ -d "$DIRPATH-backup-$BACKUP_DIR/themes" ]; then @@ -39,7 +40,7 @@ copy_phase1() { esac done else - cp -r "config/$DIR2" "$HOME/.config/$DIR2" 2>&1 | tee -a "$log" + cp -r "$base/config/$DIR2" "$HOME/.config/$DIR2" 2>&1 | tee -a "$log" echo -e "${OK:-[OK]} - Copy completed for ${YELLOW:-}$DIR2${RESET:-}" 2>&1 | tee -a "$log" fi done @@ -47,6 +48,7 @@ copy_phase1() { copy_waybar() { local log="$1" + local base="${DOTFILES_DIR:-.}" local DIRW="waybar" local DIRPATHw="$HOME/.config/$DIRW" if [ -d "$DIRPATHw" ]; then @@ -58,7 +60,7 @@ copy_waybar() { BACKUP_DIR=$(get_backup_dirname) cp -r "$DIRPATHw" "$DIRPATHw-backup-$BACKUP_DIR" 2>&1 | tee -a "$log" echo -e "${NOTE:-[NOTE]} - Backed up $DIRW to $DIRPATHw-backup-$BACKUP_DIR." 2>&1 | tee -a "$log" - rm -rf "$DIRPATHw" && cp -r "config/$DIRW" "$DIRPATHw" 2>&1 | tee -a "$log" + rm -rf "$DIRPATHw" && cp -r "$base/config/$DIRW" "$DIRPATHw" 2>&1 | tee -a "$log" for file in "config" "style.css"; do symlink="$DIRPATHw-backup-$BACKUP_DIR/$file" target_file="$DIRPATHw/$file" @@ -103,13 +105,14 @@ copy_waybar() { esac done else - cp -r "config/$DIRW" "$DIRPATHw" 2>&1 | tee -a "$log" + cp -r "$base/config/$DIRW" "$DIRPATHw" 2>&1 | tee -a "$log" echo -e "${OK:-[OK]} - Copy completed for ${YELLOW:-}$DIRW${RESET:-}" 2>&1 | tee -a "$log" fi } copy_phase2() { local log="$1" + local base="${DOTFILES_DIR:-.}" local DIR="btop cava hypr Kvantum qt5ct qt6ct swappy wallust wlogout" for DIR_NAME in $DIR; do local DIRPATH="$HOME/.config/$DIR_NAME" @@ -118,8 +121,8 @@ copy_phase2() { BACKUP_DIR=$(get_backup_dirname) mv "$DIRPATH" "$DIRPATH-backup-$BACKUP_DIR" 2>&1 | tee -a "$log" fi - if [ -d "config/$DIR_NAME" ]; then - cp -r "config/$DIR_NAME/" "$HOME/.config/$DIR_NAME" 2>&1 | tee -a "$log" + if [ -d "$base/config/$DIR_NAME" ]; then + cp -r "$base/config/$DIR_NAME/" "$HOME/.config/$DIR_NAME" 2>&1 | tee -a "$log" echo "${OK:-[OK]} - Copy of config for ${YELLOW:-}$DIR_NAME${RESET:-} completed!" 2>&1 | tee -a "$log" else echo "${ERROR:-[ERROR]} - Directory config/$DIR_NAME does not exist to copy." 2>&1 | tee -a "$log" -- cgit v1.2.3 From bb701a20280ab0049a8b31f502c2f6d2992ad940 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Wed, 4 Feb 2026 15:04:12 -0500 Subject: Fresh install option did not reset wallpaper On branch development Your branch is up to date with 'origin/development'. Changes to be committed: modified: scripts/lib_copy.sh --- scripts/lib_copy.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'scripts/lib_copy.sh') diff --git a/scripts/lib_copy.sh b/scripts/lib_copy.sh index dd83007e..58fbe066 100644 --- a/scripts/lib_copy.sh +++ b/scripts/lib_copy.sh @@ -149,7 +149,15 @@ restore_hypr_assets() { echo -e "\n${NOTE:-[NOTE]} Restoring ${SKY_BLUE:-}Animations & Monitor Profiles${RESET:-} into ${YELLOW:-}$HYPR_DIR${RESET:-}..." - local DIR_B=("Monitor_Profiles" "animations" "wallpaper_effects") + # Fresh installs should apply repo defaults; do not restore a previous wallpaper. + # RUN_MODE is set by copy.sh (install|upgrade|express) and is visible here. + local DIR_B=("Monitor_Profiles" "animations") + if [ "${RUN_MODE:-}" != "install" ]; then + DIR_B+=("wallpaper_effects") + else + echo "${NOTE:-[NOTE]} Fresh install: skipping restore of wallpaper_effects so default wallpaper applies." 2>&1 | tee -a "$log" + fi + for DIR_RESTORE in "${DIR_B[@]}"; do local BACKUP_SUBDIR="$BACKUP_HYPR_PATH/$DIR_RESTORE" if [ -d "$BACKUP_SUBDIR" ]; then -- cgit v1.2.3