Skip to content

leriart/axctl.c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

axctl.c

Universal IPC daemon and CLI for Wayland compositors
C rewrite — 33× smaller, 6× leaner, starts in 1 ms


Why axctl.c?

A line-by-line C port of axctl (Go), rebuilt for zero-overhead deployment on embedded and low-resource systems.

Go axctl.c
Binary ~6 MB ~180 KB
RAM (daemon idle) ~20-30 MB ~3-5 MB
Startup ~50-100 ms ~1 ms
Threads (idle) 8-12 3-5
Dependencies none (static) libjson-c, libwayland-client
Hot-reload poll inotify (instant)
Config output .conf .conf + .lua
Keybinds ambxst JSON ambxst + TOML (hot-reload)

Install

# Arch
sudo pacman -S json-c wayland
# Debian/Ubuntu
sudo apt install libjson-c-dev libwayland-dev pkg-config
# Fedora
sudo dnf install json-c-devel wayland-devel pkg-config

git clone https://github.com/Leriart/axctl.c.git
cd axctl.c && make && sudo make install

Usage

axctl daemon                  # auto-detects Hyprland / Niri / Mango
axctl subscribe               # real-time event stream

axctl window focus-dir l      # focus left
axctl workspace switch 3      # jump to workspace 3
axctl config apply "$json"    # push config from Ambxst / NothingLess

The daemon listens on /tmp/axctl-<uid>.sock. TOML config at ~/.config/axctl/config.toml is loaded on start and hot-reloaded on save via inotify — no restart needed.


What it does

  • 3 compositor backends — Hyprland (socket + Lua dispatch), Niri (JSON-RPC), Mango (Wayland)
  • 60+ RPC methods — windows, workspaces, monitors, layout, keybinds, idle, system
  • Config generation — single TOML source → .conf + .lua files per compositor
  • Idle protocolsext_idle_notify_v1, zwp_idle_inhibit_v1, systemd-inhibit
  • Thread-safe state cachepthread_rwlock, push-based event broadcast to subscribers
  • Keybind pipeline — parses Ambxst JSON + TOML keybinds, generates compositor-native bind syntax with full modifier, flag, and Lua support

Credits

Leriart — C port · Axenide — original Ambxst & axctl · outfoxxed — Quickshell


axctl.c — AGPLv3 · See LICENSE

About

Universal IPC daemon and CLI for Wayland compositors. C port of the original axctl (Go), built for lower resource usage and zero-overhead deployment.

Resources

License

Stars

Watchers

Forks

Contributors