diff options
| author | Don Williams <don.e.williams@gmail.com> | 2025-11-05 02:32:31 -0500 |
|---|---|---|
| committer | Don Williams <don.e.williams@gmail.com> | 2025-11-05 02:32:31 -0500 |
| commit | a35eb612dda901c5d14d559e55e64c0b1e93eae4 (patch) | |
| tree | 5e5e739971ae2440dd02764099d99fc87fb07c72 /copy.sh | |
| parent | 5fc91179274f7dceed62e24aad274a600d082f22 (diff) | |
fix(startup): preserve KeybindsLayoutInit in composed Startup_Apps; harden hyprlock 12h edits\n\n- ComposeHyprConfigs.sh: ignore disabling /KeybindsLayoutInit.sh\n- copy.sh migration: filter KeybindsLayoutInit from Startup_Apps.disable\n- copy.sh: target existing hyprlock template, avoid sed errors
Diffstat (limited to 'copy.sh')
| -rwxr-xr-x | copy.sh | 22 |
1 files changed, 17 insertions, 5 deletions
@@ -414,11 +414,19 @@ while true; do sed -i 's#^\(\s*\)\("format": "{:%a %d | %H:%M}",\) #\1//\2#g' config/waybar/Modules 2>&1 | tee -a "$LOG" # for hyprlock - sed -i 's/^\s*text = cmd\[update:1000\] echo "\$(date +"%H")"/# &/' config/hypr/hyprlock.conf 2>&1 | tee -a "$LOG" - sed -i 's/^\(\s*\)# *text = cmd\[update:1000\] echo "\$(date +"%I")" #AM\/PM/\1 text = cmd\[update:1000\] echo "\$(date +"%I")" #AM\/PM/' config/hypr/hyprlock.conf 2>&1 | tee -a "$LOG" + HYPRLOCK_FILE="config/hypr/hyprlock.conf" + if [ ! -f "$HYPRLOCK_FILE" ] && [ -f "config/hypr/hyprlock-1080p.conf" ]; then + HYPRLOCK_FILE="config/hypr/hyprlock-1080p.conf" + fi + if [ -f "$HYPRLOCK_FILE" ]; then + sed -i 's/^\s*text = cmd\[update:1000\] echo "\$(date +"%H")"/# &/' "$HYPRLOCK_FILE" 2>&1 | tee -a "$LOG" + sed -i 's/^\(\s*\)# *text = cmd\[update:1000\] echo "\$(date +"%I")" #AM\/PM/\1 text = cmd\[update:1000\] echo "\$(date +"%I")" #AM\/PM/' "$HYPRLOCK_FILE" 2>&1 | tee -a "$LOG" - sed -i 's/^\s*text = cmd\[update:1000\] echo "\$(date +"%S")"/# &/' config/hypr/hyprlock.conf 2>&1 | tee -a "$LOG" - sed -i 's/^\(\s*\)# *text = cmd\[update:1000\] echo "\$(date +"%S %p")" #AM\/PM/\1 text = cmd\[update:1000\] echo "\$(date +"%S %p")" #AM\/PM/' config/hypr/hyprlock.conf 2>&1 | tee -a "$LOG" + sed -i 's/^\s*text = cmd\[update:1000\] echo "\$(date +"%S")"/# &/' "$HYPRLOCK_FILE" 2>&1 | tee -a "$LOG" + sed -i 's/^\(\s*\)# *text = cmd\[update:1000\] echo "\$(date +"%S %p")" #AM\/PM/\1 text = cmd\[update:1000\] echo "\$(date +"%S %p")" #AM\/PM/' "$HYPRLOCK_FILE" 2>&1 | tee -a "$LOG" + else + echo "${WARN} hyprlock template not found; skipping 12H lock format edits" 2>&1 | tee -a "$LOG" + fi echo "${OK} 12H format set on waybar clocks succesfully." 2>&1 | tee -a "$LOG" @@ -854,7 +862,11 @@ compose_overlay_from_backup() { grep -E '^\s*exec-once\s*=' "$base_file" | sed -E 's/^\s+//;s/\s+$//' | sort -u >"$base_file.tmp.exec" comm -23 "$old_user_file.tmp.exec" "$base_file.tmp.exec" >"$new_user_file" # treat commented exec-once in old user as disables - grep -E '^\s*#\s*exec-once\s*=' "$old_user_file" | sed -E 's/^\s*#\s*exec-once\s*=\s*//' | sed -E 's/^\s+//;s/\s+$//' | sort -u >"$disable_file" + grep -E '^\s*#\s*exec-once\s*=' "$old_user_file" \ + | sed -E 's/^\s*#\s*exec-once\s*=\s*//' \ + | sed -E 's/^\s+//;s/\s+$//' \ + | grep -Ev '^\$scriptsDir/KeybindsLayoutInit\.sh$' \ + | sort -u >"$disable_file" rm -f "$old_user_file.tmp.exec" "$base_file.tmp.exec" elif [ "$type" = "windowrules" ]; then # additions |
