Re: [dwm] lost keyboard with dmenu

From: Premysl Hruby <dfenze_AT_gmail.com>
Date: Mon, 19 May 2008 11:48:02 +0200

On (19/05/08 11:16), pancake wrote:
> I usually install new versions of applications in my PREFIX, and dmenu
> needs to update most of time the cache. When this happens, dmenu takes
> the keyboard input and it's impossible to open a terminal or type things
> in a chat, etc..
>
> The 'esc' key is not handled directly, so you have to wait until the
> running program finishes.
>
> This is quite anoying, I understand that I should do something like
> a static cache updated by me manually, and I will not suffer this
> problem.
>
> But maybe sounds reasonable to make dmenu not capturing the keyboard
> until something is readed from stdin. Just to make it more responsive.
>

You can simple edit your dmenu_run script to achieve this.

Something like:
dmenu_path > /dev/null
exe=`dmenu_path | dmenu ${1+"$@"}` && exec $exe

(of course, there still chance, that something in $PATH will change just
between that calls to dmenu_path)

or you can save output of dmenu_path to variable/tempfile, and then
output it to dmenu.

(point of this is to NOT directly pipe dmenu_path output to dmenu)

-Ph

-- 
Premysl "Anydot" Hruby, http://www.redrum.cz/
Received on Mon May 19 2008 - 11:48:10 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:40:48 UTC