[Xmonad] Dmenu utility

Tim hobbs tim.thelion at gmail.com
Tue Aug 7 14:55:37 EDT 2007

Hello, I know a lot of people use dmenu with xmonad, so I want to
share a one line shell script that I wrote for it which makes it
significantly more powerfull.
This shell script takes a path argument, and pipes the odd numbered
lines to dmenu, it then runs the even numbered line that comes after
the odd numbered line selected.  This allows verbose shell commands to
have nice looking names(a line pair might look like):
urxvt -e "w3m /home/timothy/s/doc/other/haskell/libraries/index.html"
It also allows for doing submenu's easilly as you can have a line pair like:
dmenu-verbose /home/timothy/etc/docs

Attached are the files dmenu-verbose(the shell script) and programs(my
main dmenu file) and docs(a submenu).
Installisation is easy,
1) Download dmenu-verbose.
2) Go to the directory to which you downloaded it and type:
chmod 755 dmenu-verbose #makes it executable
sudo cp dmenu-verbose /bin/ #puts it in your path
3) Modify your dmenu file to have each command listed twice, with the
first line of each pair being easy to read rather than needing to be a
shell command.
4) Change the line in your Config.hs;
, ((modMask,               xK_p     ), spawn "exe=`dmenu_path | dmenu`
&& eval \"exec $exe\"") -- @@ Launch     dmenu
, ((modMask .|. shiftMask,               xK_r     ), spawn
"dmenu-verbose /home/timothy/etc/programs")
remembering to make that be the path to YOUR dmenu file.
5) Rebuild and restart xmonad.

tim.thelion at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dmenu-verbose
Type: application/octet-stream
Size: 94 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/xmonad/attachments/20070807/52195512/dmenu-verbose.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: programs
Type: application/octet-stream
Size: 501 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/xmonad/attachments/20070807/52195512/programs.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: docs
Type: application/octet-stream
Size: 0 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/xmonad/attachments/20070807/52195512/docs.obj

More information about the Xmonad mailing list