docs: document XKB layout indicator, live session replacement, and ANODE DE/WM identity

This commit is contained in:
Luxferre committed 2026-11-26 12:55:11 +02:00
1 parent 158345c168
commit 72b05b650e
5 files changed
+64 -5

No files matched your search

+6
View File
@@ -33,3 +33,9 @@ In `src/dwm/dwm.c`:
1. `anode-session` exports `XDG_CURRENT_DESKTOP=ANODE`, `XDG_SESSION_DESKTOP=anode`, `DESKTOP_SESSION=anode`, and optional `ANODE_SESSION_PROFILE`, seeds `~/.config/anode/autostart` and `~/.config/anode/autostart.d/`, and starts a background waiter polling `_NET_SUPPORTING_WM_CHECK` before invoking `anode-autostart start`.
2. `anode-autostart` evaluates declarative files (`autostart` + optional `autostart.<profile>` + `include` graph via POSIX `awk`), then on `start` evaluates `autostart.d/` drop-ins and `ANODE`-filtered XDG `.desktop` entries with user-over-system basename masking.
3. `src/dwm/dwm.c` triggers `anode-autostart reload` (running only `exec_always`) from interactive `reloadxres` (`Mod4 + Shift + r`, `arg->i = 1`) and post-`SIGHUP` `execvp` restart (`ANODE_DWM_RESTARTED=1`), while `SIGUSR1` and `XA_RESOURCE_MANAGER` pass `NULL` so live theme/DPI reloads never cause autostart loops.
## Live replacement, desktop identity & XKB status
1. **ICCCM `WM_S<screen>` takeover & fallback**: `src/dwm/dwm.c` (`acquirewm`, `--replace`) claims `WM_S<screen>` on `wmcheckwin`, broadcasts `MANAGER`, exits cleanly on `SelectionClear`, and waits up to 5 s for `prev_owner` destruction and `SubstructureRedirectMask`. `scripts/anode-replace` pairs this with a 1.5 s UID-checked `_NET_WM_PID` `SIGTERM` fallback for non-ICCCM WMs.
2. **EWMH/XDG desktop identity**: `dwm` publishes `_NET_WM_NAME = "ANODE WM"`, `XA_WM_NAME = "ANODE WM"`, and `_NET_WM_PID`, while `anode-session` and `anode-replace` clear stale foreign DE variables, export `XDG_CURRENT_DESKTOP=ANODE`, and update DBus/systemd user activation environments so system tools such as `fastfetch` report `Desktop Environment: ANODE` and `Window Manager: ANODE WM (X11)`.
3. **Zero-poll XKB layout indicator**: `src/daemons/anode-statusd.c` selects `XkbNewKeyboardNotifyMask | XkbMapNotifyMask | XkbNamesNotifyMask` and `XkbGroupStateMask`-filtered `XkbStateNotify` events on the X11 fd, resolving lowercase layout codes via `src/common/anode_xkb_parse.h` (live XKB symbols -> `_XKB_RULES_NAMES` -> group names) to place `<xkb>` directly left of the datetime.