Re: [dev] wmii - key events are not read unless they are repeated

2011-05-12 Thread Ben Smith
> the event handler code seemed to be pausing on the line: > > line = "$(echo $line | sed 's/^[^ ]* //' | tr -d '\n')" > > Simply commenting it out fixed the problem, what is this lines purpose? > The problem was with the whitespace on either side of the '=', I'm still not sure if this command is

Re: [dev] wmii - key events are not read unless they are repeated

2011-05-08 Thread Ben Smith
I have got it to work, not sure why though... the event handler code seemed to be pausing on the line: line = "$(echo $line | sed 's/^[^ ]* //' | tr -d '\n')" Simply commenting it out fixed the problem, what is this lines purpose? And should it be fixed in the User Guide? I really should learn s

Re: [dev] wmii - key events are not read unless they are repeated

2011-05-08 Thread Ben Smith
> Interesting, I suppose you could try omitting the daemonizing logic: > > Mod4-p) ls / | wimenu ;; > Still the same behaviour I think it is something to do with splitting the event line up into parts... I put an echo at the start of the while loop that reads each event line: # Open /event for

Re: [dev] wmii - key events are not read unless they are repeated

2011-05-08 Thread Suraj N. Kurapati
On Sun 08 May 2011 06:13:28 PM PDT, Ben Smith wrote: > the menu is not displayed at all and I get a message... > wmiir: fatal: setsid: can't exec: No such file or directory > > If I add "eval exec" to the line it works after two presses > Mod4-p) > eval exec wmiir setsid "ls / | wimenu

Re: [dev] wmii - key events are not read unless they are repeated

2011-05-08 Thread Ben Smith
> You should be aware that this user guide describes the setup of a wmiirc > from scratch. If you just want to customize the existing one, you can do so > by using a ~/.wmii/wmiirc_local (the recommended, but not overly well > documented way) or by copying /etc/wmii/wmiirc (or wherever yours is) to

Re: [dev] wmii - key events are not read unless they are repeated

2011-05-08 Thread Ben Smith
> > # Run program > Mod4-p) > wmiir setsid "ls / | wimenu -s 0" > ;; > With this code the menu is not displayed at all and I get a message... wmiir: fatal: setsid: can't exec: No such file or directory If I add "eval exec" to the line it works after two presses Mod4-p) ev

Re: [dev] wmii - key events are not read unless they are repeated

2011-05-08 Thread Thomas Dahms
On Sun, 08 May 2011 07:54:33 +0200, Ben Smith wrote: I'm on arch linux with the wmii installed from community which is version 3.9.2-1 and I'm following the customizing section of the users guide. You should be aware that this user guide describes the setup of a wmiirc from scratch. If you

Re: [dev] wmii - key events are not read unless they are repeated

2011-05-08 Thread Suraj N. Kurapati
On Sun 08 May 2011 05:10:37 PM PDT, Ben Smith wrote: > I have also removed all the proglist stuff, and have tried with > the other key that i have written a handler for (Mod4-h) and it > also requires being pressed twice Let's try a simpler handler logic: # Run program Mod4-p) wmiir set

Re: [dev] wmii - key events are not read unless they are repeated

2011-05-08 Thread Ben Smith
Thanks for the quick reply, but I still can't seem to get it to work When I do the changes as you say, and after pressing Mod4-p twice it just lists proglist_cache. So I add the '$' sign eval exec wmiir setsid "$(echo $proglist_cache | wimenu -s 0)" & And it still requires Mod4-p to be pressed

Re: [dev] wmii - key events are not read unless they are repeated

2011-05-07 Thread Suraj N. Kurapati
On Sun 08 May 2011 03:54:33 PM PDT, Ben Smith wrote: > the programs list does not appear until its pressed a few times, > or another action if called. That's because your program list is being re-computed every time you press Mod4-p. To fix this, compute the program list once and cache it in memo

[dev] wmii - key events are not read unless they are repeated

2011-05-07 Thread Ben Smith
Hi, I'm starting to get into scripting wmii and am having a little trouble reading key events, e.g. the programs list does not appear until its pressed a few times, or another action if called. This is also my first adventure into scripting. I'm on arch linux with the wmii installed from communi