A Wayland tiling compositor β entirely crafted by AI, zero human-written code.
Features Β· Quick Start Β· Configuration Β· Architecture
π€ This entire project β every line of Rust, every algorithm, every bug fix β was written by xbot, an autonomous AI coding agent.
No human has written, edited, or even reviewed a single line of source code in this repository. From the initial
cargo initto the 7,000+ lines of compositor logic, from GPU auto-detection to the lock screen's PAM authentication β it's all AI.100% AI. 0% human code. This is what an AI agent can build when given a real systems programming challenge.
- πͺ 4 Layout Presets β MasterStack, Columns, Center, Grid. Per-workspace layout.
Super+Spaceto cycle. - π₯οΈ 9 Workspaces β
Super+1throughSuper+9. Move windows withSuper+Shift+1-9. - π Scratchpad Terminal β `Super+`` toggles a quake-style dropdown terminal overlay.
- π Built-in App Launcher β
Super+Dopens a searchable app menu from XDG.desktopfiles. - π Lock Screen β
Super+Esclocks with 5 randomized animated styles. PAM password authentication. - πΈ Screenshot β
Super+Pcaptures via GPU framebuffer, area selection overlay, clipboard support. - π Notifications β DBus toast overlay (
org.freedesktop.Notifications) with fade animations. - π¨ Wallpapers β Gradient, solid color, or image. Cycle with
Super+W. - πΌοΈ Fullscreen β
Super+Fper-window fullscreen. - β¨οΈ XWayland β Full X11 app support (Feishu, Chrome, Edge, etc.). Input method popups work.
- π Window Rules β Auto-assign apps to workspaces and layouts via
config.toml. - π― Cross-GPU β Auto-detects NVIDIA / AMD / Intel, sets appropriate environment variables.
- β¨ Window Animations β Smooth workspace switch slide (200ms ease-out cubic).
- π€ Input Method β
fcitx5/ibusintegration. Configurable via config.
| Requirement | Details |
|---|---|
| OS | Linux with DRM/KMS |
| GPU | NVIDIA proprietary / AMD / Intel |
| Display Manager | GDM, SDDM, or LightDM (logind-backed) |
| NVIDIA | nvidia-drm.modeset=1 kernel parameter required |
libseat/ logind for session management- OpenGL ES 3.x (via GPU driver)
- A terminal emulator (default:
foot) - Input method (optional):
fcitx5oribus libpamfor lock screen authentication
cargo build --release --bin anchorsudo cp scripts/anchor.desktop /usr/share/wayland-sessions/The anchor-session wrapper auto-detects:
- GPU type (NVIDIA/AMD/Intel) and sets appropriate env vars
- Project directory via
dirnameβ no hardcoded paths - Input method from
config.toml(fcitx/ibus/none)
Copy config.toml to ~/.config/anchor/config.toml or edit in project root.
kill $(pgrep -f "target/release/anchor")
# DM will auto-restart the session[colors]
background = "#0d0d1a"
focus_border = "#7aa2f7"
unfocus_border = "#24253a"
[bar]
enabled = true
height = 48
[layout]
border_width = 4
gap = 14
margin = 6
[terminal]
command = "foot"
[input_method]
method = "fcitx" # "fcitx", "ibus", or "none"
[gpu]
vendor = "auto" # "auto" | "nvidia" | "amd" | "intel"
device = "" # "/dev/dri/card1" or empty for auto
[[window_rule]]
app_id = "firefox"
workspace = 1
layout = "master-stack"
[[window_rule]]
app_id = "code"
workspace = 2
layout = "columns"| Key | Action |
|---|---|
Super+Return |
Open terminal |
Super+Q |
Close window |
Super+D |
App launcher |
Super+F |
Fullscreen |
Super+Space |
Cycle layout |
Super+` |
Toggle scratchpad |
Super+P |
Screenshot |
Super+W |
Next wallpaper |
Super+Esc |
Lock screen |
Super+1-9 |
Switch workspace |
Super+Shift+1-9 |
Move window to workspace |
Super+Shift+Esc |
Quit |
10-step layered pipeline, rendered via GlesRenderer (GPU OpenGL ES):
Step 1: Wallpaper (gradient / solid / image texture)
Step 2: Window content (all elements, single draw call)
Step 2.5: IM popup (Wayland input method)
Step 3: Window decorations (border lines, focused/unfocused)
Step 4: Scratchpad (opaque overlay + border + content)
Step 4.5: X11 OR windows (input method popups, tooltips)
Step 5: Headbar (workspace indicators, clock, date, CPU/MEM)
Step 6: Notifications (toast overlay)
Step 7: App launcher (search + list)
Step 8: Cursor
Step 9: Screenshot area selection overlay
Step 10: Screenshot capture (framebuffer copy)
src/
main.rs β Compositor loop, App struct, keyboard/mouse handling, GPU auto-detect
workspace.rs β Workspace struct, WindowSlot enum, unified render order
lock.rs β Lock screen state machine (PAM auth, shake animation, random styles)
launcher.rs β Built-in app launcher (XDG .desktop scanning, search filter)
scratchpad.rs β Quake-style dropdown terminal state machine
xwayland.rs β XWayland support (X11 app compatibility)
config.rs β TOML config parsing (includes GPU config section)
text_render.rs β fontdue-based TTF text rendering
auth.rs β PAM authentication via FFI
wallpaper.rs β Wallpaper loading and caching
cursor.rs β XCursor theme loading and rendering
notify.rs β DBus notification listener
screenshot.rs β Screenshot capture (area selection, DRM framebuffer dump)
block_linear.rs β Block-linear memory layout helpers (NVIDIA)
layout/
geom.rs β Layout geometry (presets, split direction, slot calculation)
decorations.rs β Window border decorations
headbar.rs β Top bar (workspace indicators, clock, date, CPU/MEM)
wallpaper.rs β Wallpaper rendering (gradient grid, animated glow spots)
notifications.rs β Toast notification rendering
launcher.rs β Launcher overlay rendering
lock_screen.rs β Lock screen rendering (5 animated styles + dim overlay)
scripts/
anchor-session β DM session wrapper (auto-detects GPU, sets env vars)
anchor-launcher β App launcher script (fallback)
| Vendor ID | GPU | Notes |
|---|---|---|
0x10de |
NVIDIA | Requires nvidia-drm.modeset=1. Auto-sets GBM backend env vars. |
0x1002 |
AMD | Works out of box with Mesa/amdgpu. |
0x8086 |
Intel | Works out of box with Mesa/i915. |
GPU selection priority: TITAN_GPU env var β config.toml device β vendor preference + auto-detect β first available card.
- No layer-shell β External overlays (wmenu, waybar) won't work. Built-in alternatives provided.
- No xdg-decoration protocol β CSD must be disabled in terminal config (e.g.,
foot.ini). - NVIDIA block-linear β Minor pixel distortion at sub-pixel scales (AMD/Intel unaffected).
This project is a demonstration of autonomous AI software engineering.
Every line of code in Anchor was written by xbot β an open-source AI coding agent.
| Metric | Value |
|---|---|
| Total lines of Rust | ~7,000+ |
| Human-written lines | 0 |
| Source files | 20+ |
| Features shipped | 15+ |
| GPU vendors supported | 3 (NVIDIA, AMD, Intel) |
The entire development history β architecture decisions, bug fixes, NVIDIA driver quirks, multi-monitor edge cases β lives in the commit log. No human guidance beyond high-level feature requests.
Built with β€οΈ by xbot β the AI that ships real systems software.
MIT