Rmenu is a lightweight and fast application launcher and menu generator for Windows, heavily inspired by dmenu
from the suckless.org tools. It reads a list of items from standard input or command-line arguments, allows the user to efficiently search and select an item, and prints the selected item to standard output. This makes it a powerful component for scripting and creating custom workflows.
dmenu
Philosophy: Reads items fromstdin
(one per line) or from the-e
argument (comma-separated by default), prints selected item tostdout
. Exits with code 0 on selection, 1 on Escape.- Highly Customizable:
- Colors (background, foreground, selected, border)
- Fonts (name, size, weight)
- Dimensions (width, height, padding, border width, item height)
- Positioning (predefined layouts or detailed x/y coordinates)
- Flexible Layouts:
- Predefined layouts:
top-fullwidth
,bottom-fullwidth
,center-dialog
,top-left
,top-right
,bottom-left
,bottom-right
. - Custom positioning using percentages or absolute pixel values.
- Predefined layouts:
- Command-Line Overrides: Most configuration options can be overridden via CLI arguments.
- Configuration File: Uses a simple
config.ini
file (located at%APPDATA%\\rmenu\\config.ini
by default). - Lightweight and Fast: Built in Rust for performance.
- Case Insensitive/Sensitive Search: Configurable behavior.
- Customizable Prompt: Display a custom prompt text.
- Silent Mode: Suppress all diagnostic output to
stderr
.
The easiest way to get rmenu
is to download the latest pre-compiled binary from the Releases Page.
- Go to the Releases Page.
- Download the
rmenu.exe
file from the latest release. - Place
rmenu.exe
in a directory that is part of your system's PATH environment variable (e.g.,C:\\Windows
, or a custom tools directory). This will allow you to runrmenu
from any command prompt.
If you prefer to build rmenu
from source, you'll need Rust installed.
- Install Rust: If you don't have Rust, get it from rust-lang.org.
- Clone the repository:
git clone https://github.com/SynrgStudio/rmenu.git cd rmenu
- Build:
- For a debug build:
The executable will be in
cargo build
target/debug/rmenu.exe
. - For a release (optimized) build:
The executable will be in
cargo build --release
target/release/rmenu.exe
.
- For a debug build:
- (Optional) Copy the resulting
rmenu.exe
to a directory in your PATH.
Rmenu can be invoked from the command line (e.g., PowerShell, CMD).
- Provide items via
stdin
:echo "Option 1`nOption 2`nAnother Option" | rmenu.exe
- Provide items via
-e
argument (comma-separated by default):rmenu.exe -e "Item A,Item B,Item C"
- Use a prompt:
rmenu.exe -p "Choose your destiny:" -e "Path 1,Path 2"
- Use a predefined layout:
Get-ChildItem -File | Select-Object -ExpandProperty Name | rmenu.exe --layout top-fullwidth --prompt "Select a file:"
You can get a full list of options by running rmenu.exe --help
:
rmenu - A simple dmenu-like launcher for Windows
Usage: rmenu [OPTIONS]
Input Options:
-e, --elements <LIST> List of items (delimiter in config.ini, default: ',').
If not provided, rmenu reads from stdin (one per line).
-p, --prompt <TEXT> Text to display as prompt.
Configuration and Behavior Options:
-c, --config <PATH> Path to the configuration file (config.ini).
-s, --silent Suppress all error/diagnostic messages (stderr).
-h, --help Show this help.
Geometry and Layout Options (override config.ini):
--layout <NAME> Apply a predefined layout. Options:
custom, top-fullwidth, bottom-fullwidth, center-dialog,
top-left, top-right, bottom-left, bottom-right.
If 'custom' or omitted, detailed values are used.
--x-pos <POS> X position. E.g., '100' (pixels) or 'r0.5' (relative).
--y-pos <POS> Y position. E.g., '0' or 'r0.3'.
--width-percent <FLOAT> Width as a percentage of screen (0.0-1.0).
--max-width <PX> Maximum width in pixels.
--height <PX> Height of the input bar in pixels.
--item-height <PX> Height of each list item in pixels.
--padding <PX> Internal padding in pixels.
--border-width <PX> Border width in pixels.
Rmenu can be extensively customized using a configuration file.
By default, rmenu
looks for a configuration file at %APPDATA%\\rmenu\\config.ini
. If it's not found, rmenu
will use default values and attempt to create a default config.ini
at that location on its first run (if it has write permissions).
You can specify a custom path to a configuration file using the -c
or --config
command-line option.
The config.ini
file is structured into sections:
[Colors]
background = #282C34
foreground = #ABB2BF
selected_background = #3A3F4B
selected_foreground = #E6E6E6
border = #21252B
[Dimensions]
# Available layouts: custom, top-fullwidth, bottom-fullwidth, center-dialog, top-left, top-right, bottom-left, bottom-right
default_layout = custom
# The following values are used if default_layout is 'custom' or not defined,
# and if not overridden by command-line arguments.
width_percent = 0.6
max_width = 1000
height = 32
item_height = 28
x_position = r0.5
y_position = r0.3
padding = 8
border_width = 1
[Font]
name = Consolas
size = 15
weight = 400 ; (e.g., 400 for Normal, 700 for Bold)
[Behavior]
case_sensitive = false
instant_selection = false ; (If true, selecting an item with arrow keys and then typing further will immediately confirm the current selection - Not yet implemented)
max_items = 10 ; Maximum number of items to display in the list
element_delimiter = , ; Delimiter for items passed via -e argument
Note on instant_selection
: This feature is planned but not yet fully implemented.
Colors are specified in hexadecimal RGB format (e.g., #RRGGBB
).
#282C34
(Dark bluish-gray)#FF0000
(Red)
For x_position
and y_position
:
- Absolute pixels:
100
(100 pixels from the left/top edge) - Relative to screen center:
r0.5
(centers the window along that axis based on screen dimension).r0.3
would position it at 30% of the screen dimension, centered.
Rmenu's power comes alive when used in scripts. Here are a few basic examples for PowerShell:
1. Simple Choice:
$choice = "Yes`nNo`nMaybe" | rmenu.exe --prompt "Make a choice:"
if ($choice) {
Write-Host "You chose: $choice"
}
2. Launch an Application:
$apps = @{
"Notepad" = "notepad.exe";
"Calculator" = "calc.exe"
}
$selection = $apps.Keys | rmenu.exe --prompt "Launch:"
if ($selection -and $apps.ContainsKey($selection)) {
Start-Process $apps[$selection]
}
3. Select a File from Current Directory:
$selectedFile = Get-ChildItem -File | Select-Object -ExpandProperty Name | rmenu.exe --prompt "Open file:" --layout top-fullwidth
if ($selectedFile) {
Invoke-Item ".\$selectedFile"
}
(For more detailed PowerShell examples, see POWERSHELL_EXAMPLES.md
)
Contributions are welcome! Whether it's bug reports, feature requests, or code contributions:
- Fork the repository.
- Create a new branch for your feature or bug fix:
git checkout -b feature/your-feature-name
orbugfix/issue-fix
. - Make your changes.
- Test your changes thoroughly.
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin feature/your-feature-name
- Create a new Pull Request.
Please try to follow the existing code style and add comments where necessary. If you're adding a new feature, consider adding tests if applicable.