|0.1.4||Feb 20, 2022|
|0.1.3||Feb 12, 2022|
|0.1.2||Jan 25, 2022|
|0.1.1||Jan 9, 2022|
|0.1.0||Jan 8, 2022|
#923 in Filesystem
DMenu in Rust
This repo contains a wrapper around dmenu(1), inspired by Nathaniel Maia's
It also shows .desktop files, similar to rofi. You could see it as suckless
rofi. This is not a rewrite of DMenu in Rust. DMenu is fast enough by itself,
and there are already some excellent patches to really make it your own.
Why rewrite it in Rust?
Speed. I changed the original script to use the .desktop files title.
That slowed the script down by a lot. It takes .5 seconds to load, which is not
enough for me as a full-time rofi user to make the switch. Rofi is almost
instantaneous, because of the caching it performs.
dmenu_path also caches,
which makes it start up very fast. I cannot use
stest though, because I need a
key-value storage (title -> desktop filename).
There are some quirks in .desktop files, it's easier to shell out to gtk. Most people have it installed anyways.
- rustc 1.59.0-nightly (e012a191d 2022-01-06)
- dmenu (use the navhistory patch)
- gtk-launch (in gtk3) (optional: for desktop files) Install dependencies using:
sudo pacman -S rustup dmenu gtk3 rustup toolchain install nightly-2022-01-06
pacman commands only work on Arch Linux, find the appropriate commands
for your distro in your distro's documentation. Windows and Mac aren't
supported, as DMenu doesn't work on those OS's.
Use dmenu with the "navhistory" patch. If you don't know how to do this, use my dmenu repo: https://github.com/dtomvan/dmenu
git clone https://github.com/dtomvan/dmenu_drun cargo install --path dmenu_drun
-d to exclude desktop files (if you didn't install gtk-launch).
-p to exclude
By default, both desktop files and
$PATH are enabled.
Maybe in the future I will include these features:
-l [lang]flag for localization.
Localization in desktop files works as follows:
- Use the user's locale from
$LANG (the one in your /etc/locale.conf)
This locale will be used to find localized names (if possible) in the
See also: https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s05.html