fix: Alt+Tab an Noctalia Window-Switcher verdrahtet

This commit is contained in:
humocs-man committed 2026-10-05 17:25:05 +02:00
1 parent d0c757a104
commit 0ca77f021c
2 files changed
+24

No files matched your search

+17
View File
@@ -254,6 +254,23 @@ if [[ -f "${ENV_FILE}" ]] && ! grep -q '^XCURSOR_THEME=' "${ENV_FILE}"; then
printf '%s\n' 'XCURSOR_SIZE=24' 'XCURSOR_THEME=Adwaita' >> "${ENV_FILE}"
echo "migriert: XCURSOR-Vars in ${ENV_FILE} ergaenzt (Backup .bak)"
fi
# Migration: Noctalia Window-Switcher auf Alt+Tab (statt labwc-Default aus
# <default />). Seed ueberschreibt Bestehendes nie, daher gezielt vor A-F4
# einfuegen, falls noch kein A-Tab-Keybind existiert.
if [[ -f "${RC_XML}" ]] && ! grep -q 'key="A-Tab"' "${RC_XML}"; then
cp -n "${RC_XML}" "${RC_XML}.bak" 2>/dev/null || true
read -r -d '' SWITCHER_BLOCK <<'EOF' || true
<!-- Noctalia: Window-Switcher (Alt+Tab). Explizit verdrahtet, damit NICHT
labwcs eigener Switcher aus <default /> greift. `hold`: kurzer Tap
wechselt direkt zum vorherigen Fenster, Halten + Tab navigiert. -->
<keybind key="A-Tab">
<action name="Execute" command="noctalia msg window-switcher hold" />
</keybind>
EOF
awk -v block="${SWITCHER_BLOCK}" '{ if (!done && $0 ~ /<keybind key="A-F4">/) { print block; done=1 } print }' "${RC_XML}" > "${RC_XML}.new" \
&& mv "${RC_XML}.new" "${RC_XML}"
echo "migriert: Noctalia Window-Switcher (A-Tab) in ${RC_XML} ergaenzt (Backup .bak)"
fi
if [[ -f "${RC_XML}" ]] && ! grep -q 'key=".*Print' "${RC_XML}"; then
cp -n "${RC_XML}" "${RC_XML}.bak" 2>/dev/null || true
read -r -d '' PRINT_BLOCK <<'EOF' || true