Ratpoison and dmenu

I came across dmenu while setting up Musca. This nifty utility which takes a list of strings as input and creates a menu from it. Why use it?

  • Super fast in providing auto complete suggestions for the list of strings
  • Better looks and more customizable than the default ratbar

It is quite easy to set dmenu for invoking shell commands(and for choosing windows too) from within ratpoison. Here’s the relevant ratpoisonrc stuff:

    ## Dmenu magic
    # Rat shell
    unbind exclam
    bind exclam exec $(dmenu_path | dmenu -i -nb '#000000' -nf '#777777' -sb '#770000' -sf '#ffffff' -fn '-*-dina-medium-r-normal-*-12-*-*-*-*-*-*-*' -p '> ')
    # Rat windows select
    unbind w
    bind w exec $(ratpoison -c "select `ratpoison -c "windows" | dmenu -i -nb '#000000' -nf '#777777' -sb '#770000' -sf '#ffffff' -fn '-*-dina-medium-r-normal-*-12-*-*-*-*-*-*-*' -p ':: ' | awk '{print $1}'`")

Some good references:

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s