docs: make README more concise and user-oriented

This commit is contained in:
Luxferre committed 2026-11-26 17:39:05 +02:00
1 parent d0ef9c66ef
commit be7e3a3155
1 file changed
+42 -47
+42 -47
View File
@@ -1,69 +1,64 @@
# ANODE — A Nicely Optimized Desktop Environment
ANODE is a lightweight, keyboard-first, cross-Unix X11 desktop environment for **Linux, FreeBSD, OpenBSD, and NetBSD**. It aims for low memory footprint, zero busy-polling daemons, unified `.xth` theming across every toolkit, first-class XEmbed/EWMH systray integration, fractional DPI scaling, and optional touch / virtual keyboard support.
ANODE is a lightweight, keyboard-first X11 desktop environment for **Linux, FreeBSD, OpenBSD, and NetBSD**. It brings together a customized tiling window manager, unified dark/light theming, fractional DPI scaling across toolkits, and built-in everyday system controls with minimal overhead.
## Key features
## What's included
- **Patched window & core X11 stack**:
- **DWM (`6.5-anode`)**: Pango/HarfBuzz status & title bar (`Fira Code` + `DejaVuSansM Nerd Font`) with a vector 3-bar launcher button (no Nerd Font icon dependency), first-class 32-bit ARGB XEmbed systray (`_NET_SYSTEM_TRAY_S<screen>`, `XEMBED_INFO` state, empty-tray unmap, `ReparentNotify` undocking, multi-monitor relocation), EWMH dock struts (`_NET_WM_WINDOW_TYPE_DOCK`, `_NET_WM_STRUT_PARTIAL`, `_NET_WORKAREA`), per-tag/grid layouts (`[]=`, `[M]`, `><>`, `###`), clickable bar regions, `Super_L` quick-tap support, `ANODE WM` EWMH identity, ICCCM `WM_S<screen>` `--replace` handoff, `SIGHUP` live restart, and `SIGUSR1`/`XA_RESOURCE_MANAGER` live theme & DPI reload with environment/cursor propagation.
- **dmenu (`5.3-anode`)**: Pango/HarfBuzz rendering, fuzzy matching, touch/pointer navigation, XFixes/XI2 pointer auto-hiding, dynamic `.Xresources` & fractional scale sizing (`-l 0` full-height row fill and exact `-l N` row height), and `anode-launcher` XDG + Flatpak desktop entry integration (`--list`, symlinks, `[Desktop Action ...]` sub-entries, localization, `TryExec`, `Path=`, `Terminal=`, and `DBusActivatable=`).
- **st (`0.9.2-anode`)**: HarfBuzz programming ligatures (`Fira Code`, defaulting to `size=13` scaled via live `Xft.dpi`), dirty-cell rendering cache, focus-gated cursor blink, explicit `St.font` override precedence with `~/.config/anode/Xresources.local`, `SIGUSR1` live reload, and portable Linux/BSD PTY handling.
- **Unified `.xth` theme & fractional DPI scaling engine**:
- 22 normalized 96-DPI `.xth` themes (`data/themes/*.xth`) pairing `Fira Code` monospace (`theme.fontFace` for ANODE-native components and third-party monospace slots) with `Roboto` non-monospace UI typography (`theme.uiFontFace` for third-party toolkits, automatically falling back to `Noto Sans` when `Roboto` is unavailable).
- `anode-apply-scale` & `anode-apply-theme` treat `scale.conf` as authoritative over stale session environment variables and synchronize `.Xresources`, `xrdb`, `dwm`, `dmenu`, `st`, `libgemui` dialogs, `anode-vkbd`, `dunst` (`scale = 1` + `Fira Code` pixel font sizing) — keeping ANODE-native components on `Fira Code` — alongside third-party toolkits using `Roboto` / `Noto Sans` UI fonts and `Fira Code` monospace slots: GTK-2, GTK-3, GTK-4 / `libadwaita` (built-in Adwaita/Default `resource:///...` inheritance with color-only overrides and dark/light auto-detection), `xsettingsd` (with discrete Xcursor size tiers and balanced `Gdk/WindowScalingFactor`, `Gdk/UnscaledDPI`, and `Xft/DPI` while keeping `GDK_SCALE`/`GDK_DPI_SCALE` unset so GTK and Chromium/Electron avoid double-scaling), Fontconfig `60-anode-fonts.conf` (`sans-serif` -> `Roboto`/`Noto Sans`, `monospace` -> `Fira Code`), `gsettings`, Qt5 & Qt6 (`QT_QPA_PLATFORMTHEME=gtk3:qt6ct:qt5ct` following GTK-3 with synced `qt5ct`/`qt6ct` `general=` UI / `fixed=` monospace fonts & palettes), Kvantum, and Tk (`gtkTtk`) without double-scaling.
- **GemUI toolkit (`libgemui`) & desktop utilities**:
- `anode-net`: Wi-Fi (`nmcli` / `wpa_cli` / BSD `ifconfig`), POSIX `getifaddrs` interfaces, Bluetooth (`bluetoothctl`), and DNS presets/custom nameservers (`anode-dnsctl`).
- `anode-audio`: PipeWire (`wpctl`), PulseAudio (`pactl`), ALSA (`amixer`), OpenBSD `sndioctl`, and OSS audio mixer & profile/stream control.
- `anode-display`: Native `libXrandr` output/mode/rotation control, brightness slider, fractional scale selector (`0.50x–4.00x` + auto EDID), and touch-mode toggle.
- `anode-datetime`: Live clock, NTP status (`chronyc`/`timedatectl`), IANA timezone search & setter (`anode-tzctl`).
- `anode-power`: Battery/AC telemetry (Linux sysfs, FreeBSD `sysctl`, OpenBSD `apm`), brightness & volume sliders, power profiles, utility launcher grid, and lock / suspend / hibernate / reboot / power off actions (`anode-power-ctl`).
- `anode-themes`: Interactive `.xth` theme switcher with live color swatches and `Fira Code` ligature preview.
- `anode-lock`: Fullscreen X11 screen locker (maintaining stacking priority above the system tray and bar while permitting `anode-vkbd`) with `anode-checkpw` (`shadow.h` / BSD `getpwnam`, `/sbin/unix_chkpwd` non-root fallback, and root-only `chmod 4755` installation in `Makefile`).
- `anode-media-key`: Multimedia key dispatcher for volume, mic mute, brightness, MPRIS/MPD/mpv media playback, screenshots, airplane toggle, suspend, and virtual keyboard toggling.
- `anode-vkbd`: Optional EWMH dock multi-layer touch virtual keyboard (`QWERTY`, `Shift`, `Sym`, `Nav`) injecting XTest keystrokes without stealing focus.
- **Event-driven status & policy daemons**:
- `anode-statusd`: `poll()` + self-pipe + XKB group/keymap events (text-only lowercase layout indicator left of datetime) + CPU/RAM usage telemetry + minute-aligned timer.
- `anode-touchd`: XI2 multitouch edge-swipe gesture recognizer.
- `anode-powerd`: Idle dim / lock / suspend policy daemon (`XScreenSaverQueryInfo` when available; defaults `5 m` dim with `max(0.35, 45%)` floor, `10 m` lock, `30 m` battery suspend, `~/.config/anode/power.conf` overrides, and brightness restore on wake/exit).
- **gtkTtk 0.9 port**:
- Native GTK2-backed Ttk/Tkinter widget theme with full `[0.5, 4.0]` fractional DPI scaling and BSD library paths.
- **Session-specific autostart**:
- `anode-autostart`: i3-style `exec`, UID- and `XDG_SESSION_ID`/D-Bus-session-aware `exec_once`, `exec_always`, `--no-startup-id`, and `include` directives, per-profile `autostart.<profile>` files, `autostart.d/` drop-ins, and `ANODE`-filtered XDG `.desktop` entries wired into `anode-session` and DWM reload/restart.
## Dependencies
- **Build-time**: POSIX `make`, C11/C99 compiler (`cc`), `pkg-config`, X11 development headers (`x11`, `xext`, `xft`, `xinerama`, `xrandr`, `xfixes`, `xi`, `xtst`, optionally `xscrnsaver`), `fontconfig`, `freetype2`, `harfbuzz`, `cairo`, `pango`, `pangoxft`, `pangocairo`, and `libcrypt` (`-lcrypt` where separate). Optional for `gtkTtk`: C++ compiler, `gtk+-2.0`, `tcl`, `tk`, and Tk private `ttkTheme.h`.
- **Runtime (optional tools auto-detected)**: `xrdb`, `xprop`, `xrandr`, `xsettingsd`, `fc-list`, `gsettings`, `dunst`, `notify-send`, `scrot`/`import`/`maim`, `wpctl`/`pactl`/`amixer`/`sndioctl`, `nmcli`/`wpa_cli`, `bluetoothctl`, `playerctl`/`mpc`, `chronyc`, `doas`/`sudo`/`pkexec`, and **Roboto** (or **Noto Sans**) + **Fira Code** + **DejaVuSansM Nerd Font**.
- **Window manager, launcher & terminal**: A customized `dwm` setup with workspace layouts, a clickable status bar, and an XEmbed system tray, paired with `dmenu`, the `anode-launcher` desktop/Flatpak app menu, and the `st` terminal featuring `Fira Code` ligatures.
- **Unified themes & fonts**: 22 built-in themes (`data/themes/*.xth`) synced across ANODE, GTK 2/3/4, Qt 5/6, Electron/Chromium apps, Tk (`gtkTtk`), and Dunst notifications — keeping ANODE tools and monospace slots on `Fira Code` while giving third-party apps `Roboto` (or `Noto Sans` when unavailable).
- **Fractional DPI scaling**: Scale cleanly from `0.50x` to `4.00x` (or `auto` from monitor EDID/DPI) across X11, fonts, cursors, GTK, Qt, and Electron/Chromium without double-scaling.
- **Built-in desktop utilities**: Fast native panels for power & control center (`anode-power`), Wi-Fi/Bluetooth/DNS (`anode-net`), audio (`anode-audio`), displays & scaling (`anode-display`), date & timezone (`anode-datetime`), themes (`anode-themes`), screen locking (`anode-lock`), multimedia keys (`anode-media-key`), and an optional touch keyboard (`anode-vkbd`) with edge-swipe gestures (`anode-touchd`).
- **Session autostart & live switching**: Familiar i3-style autostart config (`~/.config/anode/autostart`), session profiles, XDG autostart entries, and safe session switching via `anode-replace`.
## Build & install
```sh
# Build all core targets (uses WITH_GTKTTK=auto by default)
make
# Optional overrides:
make PREFIX=/opt/anode CC=clang WITH_GTKTTK=1
make DESTDIR=/tmp/stage PREFIX=/usr/local install
sudo make XSESSIONSDIR=/usr/share/xsessions install
```
Start ANODE from `.xinitrc` (`exec /usr/local/bin/anode-session`) or via a display manager selecting the installed `ANODE` XSession (`XSESSIONSDIR/anode.desktop`, default `PREFIX/share/xsessions/anode.desktop`; pass `XSESSIONSDIR=/usr/share/xsessions` when installing into system display managers such as LightDM). Passing `--profile NAME` (or setting `ANODE_SESSION_PROFILE`) selects a session profile for autostart.
- Pass `PREFIX=/opt/anode`, `CC=clang`, or `WITH_GTKTTK=1` to customize the build (`WITH_GTKTTK=auto` is enabled by default).
- Omit `XSESSIONSDIR=...` if you launch from `~/.xinitrc` (`exec /usr/local/bin/anode-session`) instead of a system display manager like LightDM.
- To switch from an existing X11 session, run `anode-replace` (or `anode-replace --switch-session` under a display manager). Pass `--profile NAME` to `anode-session` or `anode-replace` to enable profile-specific autostart rules.
## Live session replacement & desktop identity
## Everyday shortcuts & commands
Run `anode-replace` inside a running session to switch to ANODE cleanly. When the active window manager (such as `i3`) is the direct session child of a display manager (for instance LightDM), `anode-replace` detects the session leader so it does not tear down the X server and trigger a logout/re-login; use `sudo make XSESSIONSDIR=/usr/share/xsessions install` followed by `anode-replace --switch-session` (or pass `--keep-panels` / `--force` where appropriate). Inside ANODE itself or session-managed DEs, `anode-replace` performs a live ICCCM `WM_S<screen>` handoff (falling back to `_NET_WM_PID`), scrubs conflicting DE variables, exports `XDG_CURRENT_DESKTOP=ANODE`, and `dwm` advertises `_NET_WM_NAME = "ANODE WM"` so system tools such as `fastfetch` report `Desktop Environment: ANODE` and `Window Manager: ANODE WM (X11)` instead of `dwm`. See [docs/SESSION.md](docs/SESSION.md) for full replacement, identity, and XKB status indicator details.
Default modifier key is `Super` (`Mod4`).
## Session autostart
| Shortcut | Action |
|---|---|
| `Super + Return` | Open terminal (`st`) |
| `Super + p` / `Super + Space` | Open application & Flatpak launcher (`anode-launcher`) |
| `Super + c` | Open control center & power (`anode-power`) |
| `Super + d` | Open display & scaling settings (`anode-display`) |
| `Super + t` | Open theme & font switcher (`anode-themes`) |
| `Super + n` | Open network, Wi-Fi & Bluetooth settings (`anode-net`) |
| `Super + a` | Open audio mixer & profiles (`anode-audio`) |
| `Super + Shift + l` | Lock screen (`anode-lock`) |
| `Super + Shift + r` | Reload `.Xresources`, theme, scale, and `exec_always` autostart entries |
`anode-session` invokes `anode-autostart start` once DWM advertises `ANODE WM` via `_NET_SUPPORTING_WM_CHECK`, seeding `~/.config/anode/autostart` from `PREFIX/share/anode/autostart` on first launch. Supported directives follow i3 conventions (`exec`, `exec_once`, `exec_always`, `--no-startup-id`, `include`), alongside per-profile files (`~/.config/anode/autostart.<profile>`), drop-in scripts or `.desktop` entries in `~/.config/anode/autostart.d/`, and `ANODE`-filtered XDG autostart entries. Pressing `Mod4 + Shift + r` or sending `SIGHUP` to DWM reloads `.Xresources`/theme/DPI and triggers `anode-autostart reload` (re-running `exec_always` entries). See [docs/AUTOSTART.md](docs/AUTOSTART.md) for full directive, profile, and XDG precedence details.
Themes and display scaling can also be changed from the command line:
```sh
anode-apply-theme LynxLair
anode-apply-scale 1.50
```
See [docs/KEYBINDINGS.md](docs/KEYBINDINGS.md) for all window management bindings, media keys, and touchscreen edge gestures.
## Dependencies
- **Build-time**: POSIX `make`, C compiler (`cc`), `pkg-config`, X11 headers (`x11`, `xext`, `xft`, `xinerama`, `xrandr`, `xfixes`, `xi`, `xtst`, optionally `xscrnsaver`), `fontconfig`, `freetype2`, `harfbuzz`, `cairo`, `pango`, `pangoxft`, `pangocairo`, and `libcrypt`. Optional for `gtkTtk`: C++ compiler, `gtk+-2.0`, `tcl`, `tk`, and Tk private `ttkTheme.h`.
- **Runtime (optional tools auto-detected)**: `xrdb`, `xprop`, `xrandr`, `xsettingsd`, `fc-list`, `gsettings`, `dunst`, `notify-send`, `scrot`/`import`/`maim`, `wpctl`/`pactl`/`amixer`/`sndioctl`, `nmcli`/`wpa_cli`, `bluetoothctl`, `playerctl`/`mpc`, `chronyc`, `doas`/`sudo`/`pkexec`, plus **Fira Code**, **Roboto** (or **Noto Sans**), and **DejaVuSansM Nerd Font**.
## Documentation & tests
- [Session management & status bar](docs/SESSION.md)
- [Session autostart](docs/AUTOSTART.md)
- [Architecture](docs/ARCHITECTURE.md)
- [Keybindings](docs/KEYBINDINGS.md)
- [Keybindings & touch gestures](docs/KEYBINDINGS.md) — full shortcut and swipe reference.
- [Session management & status bar](docs/SESSION.md) — `anode-replace`, display manager handoff, and status bar layout.
- [Session autostart](docs/AUTOSTART.md) — `exec` / `exec_once` / `exec_always`, profiles, and XDG autostart.
- [Architecture](docs/ARCHITECTURE.md) — component map, DPI scaling math, and X11 implementation details.
Run verification suite (requires Python 3 and `Xvfb` for X11 integration checks):
Run the test suite (uses Python 3 and `Xvfb` for X11 integration checks):
```sh
make test