-`Makefile` & `scripts/detect-env.sh`: Strict `.POSIX:` single build orchestration probing OS headers, `-lcrypt` vs `<crypt.h>`, `-lrt`, `-lutil`, `XScrnSaver`, and optional `gtk+-2.0`/`tcl`/`tk` headers cleanly into `build/flags.sh`.
-`Xft.dpi = round(96 * S)` (`anode-apply-scale auto` honors explicit `xdpyinfo` server DPI outside `[94, 98]` before falling back to physical XRandR EDID dimensions)
-`ANODE_SCALE = S`, `theme.baseFontSize = round(15 * S)`, and discrete standard Xcursor sizes (`16`, `24`, `32`, `48`, `64` mapped from `24 * S`); `~/.config/anode/scale.conf` takes precedence over stale session environment variables during live updates, while `anode-apply-scale` and `dwm` propagate updated scaling environment variables across `X11`, `D-Bus`, and newly spawned child processes.
- **GTK-2 / GTK-3 / GTK-4 / xsettingsd / Fontconfig**: `GDK_SCALE = (S < 1.75) ? 1 : round(S)`, `GDK_DPI_SCALE = 1 / GDK_SCALE`, `ADW_DISABLE_PORTAL=1`, unscaled logical non-monospace UI point sizes (`theme.uiFontFace`, `Roboto` with automatic `Noto Sans` fallback, `round((baseFontSize / S) * 0.65)`, e.g. `10pt`) because `Xft.dpi` is active (`Xft/DPI` remains omitted from `xsettingsd.conf` to avoid double-scaling), generated `~/.themes/ANODE-<name>/gtk-{3.0,4.0}/gtk.css` themes inherit GTK's built-in Adwaita/Default stylesheets via `resource:///...``@import` (auto-detecting dark vs light from `theme.isDark` or `theme.bgMain` luminance) with color-only overrides so native widget/menu spacing and borders stay intact, color-only `@define-color` overrides in `~/.config/gtk-{3.0,4.0}/gtk.css`, Fontconfig `$XDG_CONFIG_HOME/fontconfig/conf.d/60-anode-fonts.conf` aliasing `sans-serif` to `Roboto`/`Noto Sans` and `monospace` to `Fira Code`, `gsettings` synchronization (`org.gnome.desktop.interface`) when active, `gtk-cursor-theme-size = Xcursor.size` for GTK-2, and `Gtk/CursorThemeSize` / `gtk-cursor-theme-size = round(Xcursor.size / GDK_SCALE)` for `xsettingsd` and GTK-3/4.
- **Dunst notifications**: `anode-sync-dunst-theme` pins `scale = 1`, pre-scales geometry by `S`, and uses pixel font sizing (`Roboto <baseFontSize>px`, or `Noto Sans` when `Roboto` is unavailable) so `Xft.dpi` never double-scales notifications.
- **User `.Xresources` & terminal overrides**: `anode-apply-theme` sets `st.font` to `Fira Code:size=13`, preserves explicit `St.*` resource lines across theme switches, and appends `$XDG_CONFIG_HOME/anode/Xresources.local`, while `st` defaults to `Fira Code:size=13`, honors explicit `St.font` overrides over `st.font`, and resolves `size=` fonts against live `Xft.dpi`.
- **Qt5 / Qt6**: `QT_QPA_PLATFORMTHEME=gtk3:qt6ct:qt5ct` (Qt follows ANODE's active GTK-3 theme first, with synced palettes and `general=Roboto,10` / `fixed=Fira Code,10` typography in `~/.config/qt5ct/` and `~/.config/qt6ct/` as fallback), `QT_AUTO_SCREEN_SCALE_FACTOR=0`, `QT_ENABLE_HIGHDPI_SCALING=1`, `QT_SCALE_FACTOR_ROUNDING_POLICY=PassThrough`, `QT_SCALE_FACTOR=S`, and `QT_FONT_DPI=96`.
- **Tk / Tkinter (`gtkTtk`)**: `*TkTheme: gtkTtk`, Tk scaling normalized against `ANODE_SCALE` / `Xft.dpi`, using `Roboto` (or `Noto Sans` fallback) for standard UI fonts (`TkDefaultFont`, `TkTextFont`, `TkMenuFont`, `TkHeadingFont`) and `Fira Code` for `TkFixedFont`.
1. Acquires screen-specific `_NET_SYSTEM_TRAY_S<screen>` using a 32-bit ARGB `TrueColor` visual (when available, falling back cleanly to screen default visual) and publishes `_NET_SYSTEM_TRAY_VISUAL` and `_NET_SYSTEM_TRAY_ORIENTATION = 0`.
2. Tracks XEmbed `_XEMBED_INFO` flags bit `data[1]` (`XEMBED_MAPPED`), preserves `SubstructureNotifyMask`, emits `XEMBED_WINDOW_ACTIVATE` / `XEMBED_WINDOW_DEACTIVATE (2)`, unmaps the tray window when empty (`0` mapped icons), maps `systray->win` via `XMapWindow` configured directly `Above``m->barwin` (never `XMapRaised` over fullscreen windows or `anode-lock`), undocks cleanly on `ReparentNotify`/`UnmapNotify`/`DestroyNotify`, centers & re-scales icons on `SIGUSR1` / `XA_RESOURCE_MANAGER`, and relocates cleanly across monitors.
3. Monitors `_NET_WM_WINDOW_TYPE_DOCK` windows (`_NET_WM_STRUT_PARTIAL` / `_NET_WM_STRUT`), including `override_redirect` docks such as `anode-vkbd`, adjusting monitor workarea bounds (`wx, wy, ww, wh`) and publishing root `_NET_WORKAREA`.
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`.
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.
1.**ICCCM `WM_S<screen>` takeover & fallback**: `src/dwm/dwm.c` (`acquirewm`, `--replace`) claims `WM_S<screen>` on `wmcheckwin`, broadcasts `MANAGER`, exits cleanly with status `75` on `SelectionClear` (so `anode-session` keeps the session alive while monitoring the new WM), 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` (or UID-filtered `_NET_WM_NAME`) `SIGTERM` fallback for non-ICCCM WMs, `--switch-session` one-shot `~/.xprofile` handoff for active LightDM sessions, and DM session-leader safety checks.
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)`.