Re: [wmii] Preparation for 3.7 Release.

From: sqweek <sqweek_AT_gmail.com>
Date: Sat, 7 Jun 2008 20:18:57 +0800

On Fri, May 30, 2008 at 5:15 AM, Kris Maglione <jg_AT_suckless.org> wrote:
> On Thu, May 29, 2008 at 05:15:29PM +0800, sqweek wrote:
>>
>> * Event-Notice: nice idea, dicey implementation... I implemented
>> something similar as a seperate action awhile back, that would
>> remember the last 10 messages and cycle on mouse clicks. Never got
>> around to sharing (or using) it.
>
> Yeah, the implementation is... wierd. I just ripped it out of one of my
> scripts, because it seemed general enough to be useful (it's in my volume
> changer, for instance). I don't want anything fancier, but something less
> 'dicey' would be great, if anyone wants to provide it. It works, as is.
>
>> * LBarMenu-3-Delete: Guess what function got unbound as soon as I noticed
>> it? :P
>> The generalised menu interface is kind of nice though.
>
> It actually turns out to be useful. I'll take it out of the base rc.wmii if
> enough other people think it should go. It's pretty long.

 It's the placement I was really objecting to, not the functionality.
Being able to delete a tag with a single accidental mouse click is not
my idea of a good time. Even bit me in the ass after I removed it,
which is probably related to the duplication of functions in the
environment. I should submit an issue for that, but if I start up
"9term rc" I can do this:

% env |grep Key-Mod4-1
fn#Key-Mod4-1={wmiir xwrite /ctl view `{gettag `{echo $1|sed 's/.*-//'}}}
fn#Key-Mod4-1={wmiir xwrite /ctl view `{gettag `{echo $1|sed 's/.*-//'}}}

 #ok, why is there two?

% fn Key-Mod4-1
% env |grep Key-Mod4-1
fn#Key-Mod4-1={wmiir xwrite /ctl view `{gettag `{echo $1|sed 's/.*-//'}}}

 #undef the function, still one left

% Key-Mod4-1
Key-Mod4-1: No such file or directory

 #not that it works... but what if:

% rc
% Key-Mod4-1
rc: null list in concatenation

>> fn wi_readevent {
>> wmiir read /event
>> }
>>
>> What. The. Hell. wi_readevent is referenced exactly once, for those
>> wondering.
>> I suspect this is half the point - hide details of the 9p interface
>> behind a "nice" rc interface.
>
> Nope, that's not it at all. That actually probably shouldn't be there, but I
> needed it for one of my scripts that has a timer, and sends Tick events
> periodically. I was thinking about adding that to wmii.rc.

 It doesn't need to be in wmii.rc at all.

while(sleep 5) echo Tick |wmiir write /event&

 I've been tossing the idea around in my head of going even further
with this approach, and handling events in a seperate process to keys.
Then you could even do something stupid like drop all the key code in
wmii and use something like xhotkey. :)

>> But isn't that the exact point of 9p? To
>> hide the details of X11 and window management behind a "nice" 9p
>> interface? The mere existance of wmii.rc just screams at me "Why, WHY?
>> Why do we need this extra level of indirection?" The obvious
>> conclusion is that our current 9p interface sucks, but I wonder if
>> there aren't other factors...
>
> It's not about indirection, it's about verbosity. I got tired of seeing
> "wmiir read /foo/bar | awk '{some other crap}'" repeated. wmii.rc is only
> meant to capture common idioms. It probably needs to be scaled back a bit.

 Right, but /why/ is awk '{some other crap}' repeated everywhere?
Because the interface/tools suck.
 We grep -v all the time on an ls /tags because for some reason there
is a /tags/sel. Not really needed if you think about it: wmiirc is
already watching for FocusTag, standalone scripts can easily sed /ctl,
and for interactive use the user is pretty likely to know which tag
they're on and can just type that in.

> I haven't read uriel's reply to this. I suspect that I should just delete
> it.

 Harsh, but fai... actually no, not fair at all.

-sqweek
(Yes I'm slow.)
Received on Sat Jun 07 2008 - 14:19:01 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 16:43:59 UTC