A fast Wayland application launcher with fuzzy search and vim-style navigation.
- C 96.6%
- CMake 3.4%
WHAT: zurin_command() now appends a trailing '\n' to every IPC request, writes it in a loop (EINTR + partial writes), and reads the reply in a loop until EOF or the caller's buffer limit, with EINTR handling and a local ~6s deadline, instead of a single blocking read(). WHY: the zurin compositor's IPC protocol is newline-delimited (zurin/src/ipc.c): without the '\n' the request is never dispatched and the compositor only answers 'ERR: timeout' after its 5s timer. The JSON parse then fails, item_count == 0, and zmenu exits without creating any surface. A single read() could also return only a fragment of larger 'apps' responses, and a dead socket could hang the menu forever. |
||
|---|---|---|
| include | ||
| protocols | ||
| src | ||
| .gitignore | ||
| CMakeLists.txt | ||
| LICENSE | ||
| README.md | ||
ZMenu
A fast, minimal menu application for the Zurin Wayland compositor.
Features
- Zurin Integration - Shows apps from Zurin config by default
- TOML Menus - Custom menus in
~/.config/zmenu/custom/ - JSON Support - Dynamic menus via command-line arguments
- dmenu Mode - Read items from stdin
- Fuzzy Filtering - Type to filter, scored by prefix/substring match
- Keyboard Navigation - vim-style (j/k) and arrow keys
Dependencies
- wayland-client
- wayland-protocols
- xkbcommon
Building
mkdir build && cd build
cmake ..
make -j$(nproc)
sudo make install
Usage
# Show Zurin configured apps (default)
zmenu
# Load custom TOML menu
zmenu --menu ~/.config/zmenu/custom/apps.toml
# Load from JSON
zmenu --json '{"items":[{"name":"Firefox","command":"firefox"}]}'
TOML Menu Format
[[menu]]
name = "Firefox"
command = "firefox"
[[menu]]
name = "Terminal"
command = "kitty"
Zurin Integration
Add to ~/.config/zurin/config.toml:
[apps]
menu = "zmenu"
Keyboard Controls
| Key | Action |
|---|---|
| ↑/↓ or j/k | Navigate items |
| Enter | Select |
| Escape | Cancel |
| Tab/Shift+Tab | Next/Previous |
| Backspace | Delete character |
| Typing | Filter items |
License
GNU General Public License v3.0 - see LICENSE