Core-only static C (musl-gcc) rewrites of Omarchy's 24/7 daemons, hot-path IPC/keybinds, and local hardware/stability fixes.
Why not?
I opened btop, saw a bash script + gdbus + socat + systemd-inhibit + Python casually eating 4–31 MB of my RAM each just to sit there doing nothing, and took it personally lol.
So I rewrote the things that actually stay resident or fire on every keypress in C and statically linked them with musl-gcc.
This repo intentionally does not try to rewrite all ~680 upstream scripts in /usr/share/omarchy/bin/.
Rewriting rare one-shot scripts (install, remove, theme, refresh, restart, agent, menu toggles, etc.) buys almost zero RAM or latency while creating endless maintenance churn every time omarchy update lands. Instead, omarchy-bin focuses strictly on three things:
- 24/7 background daemons & their direct helpers — where replacing
bash/python3/gdbus/socat/systemd-inhibitsaves ~86+ MB of resident memory and eliminates idle wakeups. - High-frequency hot-path IPC & keybinds — shell IPC (
omarchy-shell), volume/brightness keys, OSD/notifications, and monitor hotplug/clamshell handling (plus their direct inner callees so hot paths stay 100% static C without falling back tobash+jqmid-call). - Intentional local fixes & custom helpers (
[OMARCHY-CUSTOM-KEEP]) — hardware/driver workarounds (like the NVIDIA half-unplugged HDMI ghost watchdog and external USB SSDHintSystemautomounting), crash/race hardenings, and custom Hyprland/shell helpers.
Everything else (~645 upstream scripts) falls straight through PATH to stock /usr/share/omarchy/bin/ untouched, keeping omarchy update effortless.
Live measured metrics (PSS from /proc/<pid>/smaps_rollup, 0 wakeups idle except the NVIDIA HDMI DDC probe):
| Daemon | Stock Omarchy | omarchy-bin (static musl) |
|---|---|---|
omarchy-idle-screensaver (screensaver.py) |
~31.5 MB (python3 + PyGObject + Gio/GLib) |
~104 KB PSS (1 proc, raw session D-Bus, 0 wakeups) |
omarchy-hyprland-monitor-watch (docked) |
~18.2 MB (2× bash + socat + gdbus) |
~164 KB PSS (1 proc, .socket2 + netlink + raw system D-Bus, ~0.16–0.29% CPU) |
omarchy-drive-automount |
~13.3 MB (3 procs: bash + gdbus) |
~88 KB PSS (1 proc, raw system D-Bus InterfacesAdded, 0 wakeups) |
omarchy-system-sleep-monitor |
~12.0 MB (3 procs: systemd-inhibit + bash + dbus-monitor) |
~84 KB PSS (1 proc, raw system D-Bus Inhibit, 0 wakeups) |
omarchy-crash-watch (omarchy-crash-watch.service) |
~7.6 MB (2× bash + jq per event) |
~160 KB PSS (pure C JSON parser, 0 wakeups) |
omarchy-launch-shell |
~4.0 MB (bash supervisor) |
~92 KB PSS (static C supervisor, 0 wakeups) |
omarchy-hyprland-monitor-clamshell |
~110 ms (bash + awk + sed + jq) |
~5 ms (pure C, no jq/awk/sed) |
~86+ MB of idle bash/Python/gdbus/socat overhead squished down to ~692 KB PSS across all 6 resident daemons. Worth it? Probably not. Satisfying? Extremely.
src/holds standalone 1-to-1.crewrites matching/usr/share/omarchy/bin/scripts, plus sharedsrc/common.handsrc/json.h.custom/holds non-/usr/share/omarchy/bin/C tools (shell plugin service rewrites and custom Hyprland helpers).
src/:omarchy-launch-shell,omarchy-hyprland-monitor-watch,omarchy-drive-automount,omarchy-system-sleep-monitor,omarchy-system-sleep-lock,omarchy-crash-watch,omarchy-notification-waitcustom/:omarchy-idle-screensaver,omarchy-clipboard-capture,omarchy-clipboard-persist,omarchy-clipboard-sweep
src/:omarchy,omarchy-hyprland-monitor-internal,omarchy-hyprland-monitor-internal-mirror,omarchy-hyprland-workspace-layout-togglecustom/:full-width-toggle
- Shell IPC, OSD & notifications:
omarchy-shell,omarchy-notification-send,omarchy-osd,omarchy-i18n - Volume & brightness keys (+ direct callees):
omarchy-audio-output-volume,omarchy-audio-output-sink,omarchy-brightness-display,omarchy-brightness-display-ddc,omarchy-hyprland-monitor-focused,omarchy-hw-display - Monitor hotplug & clamshell (+ direct callees):
omarchy-hyprland-monitor-clamshell,omarchy-hyprland-monitor-external-active,omarchy-hyprland-monitor-modeless,omarchy-hyprland-monitor-laptop,omarchy-hyprland-monitor-identity,omarchy-hyprland-reload-guard,omarchy-hyprland-toggle,omarchy-restart-hyprctl,omarchy-hw-laptop,omarchy-hw-laptop-closed,omarchy-hw-external-monitors,omarchy-hw-clamshell,omarchy-system-lid-inhibit
Every intentional divergence from stock /usr/share/omarchy/bin/ (hardware/driver workarounds, stability hardenings, or custom behavior) is annotated in source with /* [OMARCHY-CUSTOM-KEEP: <slug>] ... */. Scan them anytime before syncing against an upstream update:
grep -rn 'OMARCHY-CUSTOM-KEEP' src/ custom/Requires musl (pacman -S musl):
# Build all core binaries atomically into ~/.local/bin/
make -j$(nproc)
# Rebuild a single tool
make omarchy-drive-automount
# Revert a single tool back to stock Omarchy
rm ~/.local/bin/<tool-name>Nothing in /usr/share/omarchy/ is touched, so omarchy update won't wipe anything.
Omarchy's default envs.lua forces /usr/share/omarchy/bin to the front of PATH. Add this to the bottom of ~/.config/hypr/hyprland.lua (after require("default.hypr.omarchy")):
-- Keep ~/.local/bin ahead of /usr/share/omarchy/bin so personal overrides
-- take precedence cleanly.
do
local local_bin = (os.getenv("HOME") or "") .. "/.local/bin"
local omarchy_bin = (os.getenv("OMARCHY_PATH") or "/usr/share/omarchy") .. "/bin"
local kept = { local_bin, omarchy_bin }
for entry in (os.getenv("PATH") or "/usr/local/bin:/usr/bin"):gmatch("[^:]+") do
if entry ~= local_bin and entry ~= omarchy_bin then
table.insert(kept, entry)
end
end
hl.env("PATH", table.concat(kept, ":"))
endThen reload Hyprland (or reboot for startup daemons to pick it up):
hyprctl reloadThese systemd user units hardcode /usr/bin/.... Override them with user drop-ins:
~/.config/systemd/user/omarchy-sleep-lock.service.d/override.conf:
[Service]
ExecStart=
ExecStart=%h/.local/bin/omarchy-system-sleep-monitor~/.config/systemd/user/omarchy-crash-watch.service.d/override.conf:
[Service]
ExecStart=
ExecStart=%h/.local/bin/omarchy-crash-watch~/.config/systemd/user/omarchy-clock-resync.service.d/override.conf:
[Service]
ExecStart=
ExecStart=%h/.local/bin/omarchy-shell -q omarchy.clock resyncThen reload and restart the services:
systemctl --user daemon-reload
systemctl --user restart omarchy-sleep-lock.service omarchy-crash-watch.serviceClone the built-in idle service plugin so upgrades never overwrite it:
omarchy plugin clone omarchy.idleThen in ~/.config/omarchy/plugins/<username>.idle/Service.qml, replace the screensaverInhibitService command:
command: [Quickshell.env("HOME") + "/.local/bin/omarchy-idle-screensaver"]And restart the shell:
omarchy restart shellClone the built-in clipboard plugin so wl-paste --watch runs static C instead of bash + perl + python3:
omarchy plugin clone omarchy.clipboardThen in ~/.config/omarchy/plugins/<username>.clipboard/Clipboard.qml, point captureScript, persistScript, and sweepScript at ~/.local/bin/omarchy-clipboard-{capture,persist,sweep}, and restart the shell (omarchy restart shell).
Unlike the 1-to-1 /usr/share/omarchy/bin rewrites above, full-width-toggle is a custom Hyprland helper (upstream Omarchy binds SUPER + ALT + F directly to hl.dsp.window.fullscreen({ mode = "maximized" }), which locks focus movement in scrolling mode).
Rebind it in ~/.config/hypr/bindings.lua:
o.rebind("SUPER + ALT + F", "Full width", "full-width-toggle")