Difference between revisions of "Dmenu"
(→Troubleshooting: Added fix instructions for a problem when scripts are not loaded, but they are in $PATH)
m (→Scripts in $PATH not loaded: Minor cosmetic fix)
|Line 60:||Line 60:|
Delete ~/.cache/dmenu_cache and restart X.
Delete ~/.cache/dmenu_cacheand restart X.
== See Also ==
== See Also ==
Revision as of 10:30, 8 September 2013
zh-CN:Dmenu dmenu is a fast and lightweight dynamic menu for X. It reads arbitrary text from stdin, and creates a menu with one item for each line. The user can then select an item, through the arrow keys or typing a part of the name, and the line is printed to stdout. dmenu_run is a wrapper that ships with the dmenu distribution that allows its use as an application launcher.
You may run dmenu with
Now, you will want to attach the
dmenu_run command to a keystroke combination. This can be done either via your window manager or desktop environment configuration, or with a program like . See the Hotkeys article for more information.
Also, it is helpful to Prelink dmenu.
Displaying Custom Items
Custom items may be shown by piping them into dmenu. For example:
$ echo -e "first\nsecond\nthird" | dmenu
dmenu can be patched to allow using xft fonts which don't seem to be working with the version from upstream. The patched version can be found in the AUR package from the AUR. Using this version, fonts like Droid Sans Mono can be set.
$ dmenu_run -fn 'Droid Sans Mono-9'
dmenu_run results in an error similar to this:
$ dmenu_run /usr/bin/dmenu_run: line 15: 1879 Segmentation fault dmenu "$@" < "$cache"
And running dmenu crashes like the following:
$ echo "blahblahblah"
$LANG is set to something valid. For example, this problem may occur if one needs to set
en_US.UTF_8 or something similar in
/etc/locale.conf (see locale.conf).
Keep in mind that the value contained in
$LANG must be uncommented in
/etc/locale.gen and generated via locale-gen as well.
Scripts in $PATH not loaded
This happens because dmenu doesn't inherit environment set in
~/.bashrc. To fix this, put the export line in
~/.cache/dmenu_cache and restart X.
- dmenu – The official dmenu website
- Yeganesh – a light wrapper that reorders commands based on popularity. Written in Haskell
- xboomx – yet another light wrapper that reorders commands based on popularity. Written in Python. Minimal dependencies
- dmenu-launch (AUR) – A simple Dmenu-based application launcher. Launches binaries and XDG shortcuts.
- Dmenu Hacking thread – Dmenu hacking thread in arch linux forums.