r/swaywm • u/Significant-Sea-7238 • 7h ago
Utility Getting a notch-style island to behave on sway: layer-shell, a spacer surface and sway's IPC
Openbar shows your coding agent sessions (Claude Code, Codex and others) in a small island at the top of the screen, where you answer their permission prompts. The Linux build runs natively on sway, and a few parts took some work.
A Wayland client can't place itself, stay on top or reserve space, so the island is a gtk-layer-shell surface on the top layer, and a separate empty surface along the top edge holds the exclusive zone so maximized windows stay under it. gtk-layer-shell is looked up at runtime instead of linked, so X11 needs nothing new and a compositor without it gets a normal window. Wayland also says nothing about other apps' windows, so hiding over fullscreen apps and Open (focusing the session's terminal) go through sway's IPC on $SWAYSOCK.
GPL-3.0: https://github.com/MF-DEEV/Openbar



