JWMenu is a small, configurable menu runner built on top of
rofi.
Menus are defined declaratively using TOML configuration files and may contain arbitrary levels of nested submenus. Each menu entry can either execute a command or open another submenu.
It can be used to build system menus, power menus, application launchers, or any other structured rofi-based workflows.
Read more about why I created JWMenu.
- Hierarchical menus with arbitrary nesting
- Declarative configuration using TOML
- Supports multiple independent menus via separate configuration files
- Minimal runtime dependencies
nix run github:jonwin1/jwmenu -- path/to/menu.tomlor
git clone https://github.com/jonwin1/jwmenu.git
cd jwmenu
nix run . -- path/to/menu.tomlgit clone https://github.com/jonwin1/jwmenu.git
cd jwmenu
nix buildBuilds the executable result/bin/jwmenu.
Add it as an input in your flake.nix:
inputs = {
# ...
jwmenu = {
url = "github:jonwin1/jwmenu";
inputs.nixpkgs.follows = "nixpkgs";
};
};And add the package to environment.systemPackages or home.packages:
inputs.jwmenu.packages.${system}.defaultRebuild your configuration and jump to Usage.
rofi- A C17-compatible compiler
git clone https://github.com/jonwin1/jwmenu.git
cd jwmenu
makeThis will produce the jwmenu binary in the project root.
jwmenu path/to/menu.tomlThe menu is defined using a TOML file with nested tables.
[config]
label = "Example Menu"
[[config.menu]]
label = " Simple command"
command = "notify-send Simple"
[[config.menu]]
label = " Multiline command"
command = """
echo Hello
notify-send Hello
"""
[[config.menu]]
label = " Submenu →"
[[config.menu.submenu]]
label = "nested item"
command = "notify-send 'Hello from submenu'"See more examples in config/.
- Each menu entry has a
label - An entry with a
commandexecutes that command - An entry without a
commandis treated as a submenu - Selecting a command closes the entire menu stack
- Pressing
Esccloses the current menu level
.
├── config/ # Example menus
│ └── ...
├── lib/
│ ├── tomlc17.c # TOML parsing library
│ └── tomlc17.h
├── LICENSES/
│ └── ...
├── src/
│ ├── config.c # TOML parsing
│ ├── config.h
│ ├── main.c # Entry point
│ ├── menu.c # Menu logic and rofi interaction
│ ├── menu.h
│ ├── util.c # Helper functions
│ └── util.h
├── flake.lock # Flake dependencies lock
├── flake.nix # Nix package and devshell definition
├── Makefile
├── README.md
└── REUSE.toml
This project is licensed under the MIT License. See LICENSES/MIT.txt.