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

From: Ben Smith <bensmith87_AT_gmail.com>
Date: Fri, 13 May 2011 08:46:21 +1000

> 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 required as $line is not used after it? It seems to
work with and without this command.

Some other problems I've found with the example script in the user guide

   - The second last case in the event switch is not finished with a ';;'
   - The click menu event needs 'wmiir' to be added

ClientMouseDown) # ClientMouseDown <Client ID> <Button>
        [ $2 = 3 ] && clickmenu \
            "Delete:wmiir xwrite /client/$1/ctl kill" \
            "Kill:wmiir xwrite /client/$1/ctl slay";;

   - The left bar mouse down event should have an action for the 1st button
   to select the view (not really a problem)

LeftBarMouseDown) # LeftBarMouseDown <Button> <Bar Name>
        wmiir xwrite /ctl view $2

   - The delete_view function has not been written
   - The !notice bar is never created
   - The action for Mod4-d should be

wmiir xwrite /tag/sel/ctl colmode sel default-max;;

   - I had some error with the 'which' statement in the Mod4-a action

And I have a good start on my own configuration file, I'll put it up just
incase someone is interested, it has mpd, gmail, a clock and a volume widget
that are all mouse controlled, hotkeys to come.
I think it is neat, but as its my first bash script I might have done
something really stupid.
wmiirc is available http://pastebin.com/NyXk2PNA
and a screen dump http://tinypic.com/r/2mp0k6h/7
Received on Fri May 13 2011 - 00:46:21 CEST

This archive was generated by hypermail 2.2.0 : Fri May 13 2011 - 00:48:04 CEST