zmen

x11 application launcher using cairo and xcb

clone: git clone https://git.smichalk.dev/repos/zmen.git

files log refs master

README

# zmen

A small application launcher written in Zig.

## Description

zmen is a simple, lightweight application launcher for X11 inspired by dmenu. 
It uses XCB and Cairo for rendering with fewer than 700 lines of code.

- Tab completion for commands
- Minimal memory footprint
- Fast command scanning from standard executable paths
- Clean Zig implementation with no external dependencies other than X11 libraries and libcairo

## Installation

Requirements:
- Zig compiler (tested with 0.12.0)
- libxcb1-dev
- libcairo2-dev
- libxcb-keysyms1-dev
- libx11-dev

```
git clone this repository
cd zmen
zig build
```

Or build directly:

```
zig build-exe main.zig -lc -lxcb -lcairo -lxcb-keysyms -lX11
```

## Usage

Run zmen:

```
./zmen
```
Recommended: bind to a key combination in your window manager config.

### Keybindings

- Type to search for commands
- Tab - Complete the suggested command
- Right arrow - Accept one character of suggestion
- Return - Execute the command
- Escape - Clear input or exit

## Configuration

Edit the source code directly. Simple configuration options:

```zig
const font_size = 25.0;
const bh = 30;           // Bar height
const font = "Iosevka";  // Font name
const prompt = "run:";   // Prompt character
```

## LICENSE
Released under MIT license.

recent commits

split state, remove arraylist (heap allocation) to fixed buffer instead. IIIlllIIIllI · 2026-05-31
code refactor IIIlllIIIllI · 2026-01-04
refactor code IIIlllIIIllI · 2026-01-04
change app -> zmen for clarity, re-work spawn/launch semantics and drop /bin/sh completely. IIIlllIIIllI · 2025-12-19
change app -> zmen for clarity, re-work spawn/launch semantics and drop /bin/sh completely. IIIlllIIIllI · 2025-12-19
create c.zig for import, proper color struct for better color palette assignment. SM · 2025-05-10
rdme SM · 2025-05-10
v0.1 SM · 2025-05-10