https://wiki.archlinux.org/api.php?action=feedcontributions&user=NetherCat&feedformat=atomArchWiki - User contributions [en]2024-03-28T09:23:39ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Dmenu&diff=303159Dmenu2014-03-04T19:42:45Z<p>NetherCat: corrected the link to AUR package dmenu-xft</p>
<hr />
<div>{{DISPLAYTITLE:dmenu}}<br />
[[Category:Application launchers]]<br />
[[da:dmenu]]<br />
[[es:Dmenu]]<br />
[[zh-CN:Dmenu]]<br />
[http://tools.suckless.org/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.<br />
== Installation ==<br />
<br />
[[Pacman|Install]] {{Pkg|dmenu}} from the [[official repositories]]. If you want the latest development pull, install {{AUR|dmenu-git}}.<br />
<br />
You may run dmenu with<br />
<br />
$ dmenu_run<br />
<br />
For dmenu various patches exist that extend the default functionality. Consider installing one of the following packages:<br />
<br />
* {{AUR|dmenu-xft-height}}: Xft font support and setting a custom height for the bar using -h <pixels> flag<br />
* {{AUR|dmenu-xft}}: Xft font support<br />
* {{AUR|dmenu-xft-mouse-height}}: Xft font support, custom height, and mouse support<br />
* {{AUR|dmenu-xft-transparency}}: Xft font support and transparency<br />
<br />
== Configuration ==<br />
<br />
Now, you will want to attach the {{Ic|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 {{Pkg|xbindkeys}}. See the [[Hotkeys]] article for more information.<br />
Also, it is helpful to [[Prelink]] dmenu.<br />
<br />
=== Displaying Custom Items ===<br />
<br />
Custom items may be shown by piping them into dmenu. For example:<br />
<br />
$ echo -e "first\nsecond\nthird" | dmenu<br />
<br />
=== Fonts ===<br />
<br />
dmenu can be patched to allow using xft [[fonts]] which do not seem to be working with the version from upstream. The patched version can be found in the {{AUR|dmenu-xft}} package from the [[AUR]]. Using this version, fonts like Droid Sans Mono can be set.<br />
<br />
$ dmenu_run -fn 'Droid Sans Mono-9'<br />
<br />
=== Support for custom aliases ===<br />
dmenu does not support custom aliases located for instance in {{ic|~/.bash_aliases}} or {{ic|~/.zsh_aliases}}. If you want to have support for aliases, run {{ic|dmenu_run_aliases}} from {{AUR|dmenu-aliases}} and make sure to have your aliases stored in one of the two user config files above.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Strange segfaulting ===<br />
<br />
If executing {{Ic|dmenu_run}} results in an error similar to this:<br />
<br />
{{bc|<br />
$ dmenu_run<br />
/usr/bin/dmenu_run: line 15: 1879 Segmentation fault dmenu "$@" < "$cache"<br />
}}<br />
<br />
And running dmenu crashes like the following:<br />
<br />
{{bc|<br />
$ echo "blahblahblah" | dmenu<br />
no locale support<br />
Segmentation fault<br />
}}<br />
<br />
Make sure {{Ic|$LANG}} is set to something valid. For example, this problem may occur if one needs to set {{Ic|$LANG}} to {{ic|en_US.UTF_8}} or something similar in {{ic|/etc/locale.conf}} (see [[Locale.conf#Setting_system-wide_locale|locale.conf]]).<br />
<br />
Keep in mind that the value contained in {{Ic|$LANG}} must be uncommented in {{ic|/etc/locale.gen}} and generated via [[Locale.conf#Enabling_necessary_locales|locale-gen]] as well.<br />
<br />
== See Also ==<br />
* [http://tools.suckless.org/dmenu dmenu] &ndash; The official dmenu website<br />
* [http://dmwit.com/yeganesh Yeganesh] &ndash; a light wrapper that reorders commands based on popularity. Written in Haskell <br />
* [https://bitbucket.org/dehun/xboomx xboomx] &ndash; yet another light wrapper that reorders commands based on popularity. Written in Python. Minimal dependencies<br />
* {{AUR|j4-dmenu-desktop}} (AUR) &ndash; Very fast dmenu application launcher<br />
* {{AUR|dmenu-launch}} (AUR) &ndash; A simple Dmenu-based application launcher. Launches binaries and XDG shortcuts.<br />
* {{AUR|fyr}} (AUR) &ndash; Manages menus of application launchers, either executables or desktop files. Also opens files with launchers, desktop files, or applications associated by MIME-type. Dmenu-driven.<br />
* {{AUR|goa}} (AUR) &ndash; Opens files with any desktop application or executable, chosen from a menu of all possibilities found in standard locations on the system. Dmenu-driven.<br />
* [https://bbs.archlinux.org/viewtopic.php?id=80145 Dmenu Hacking thread ] &ndash; Dmenu hacking thread in arch linux forums. An overview of scripts is provided in the [https://github.com/orschiro/dmenu-scripts-collection dmenu_scripts collection].<br />
* {{AUR | dswitcher-git}} (AUR) &ndash; Dmenu-based window switcher that works regardless of workspace or minimization.</div>NetherCat