[dev] wmii and floating controls

From: Nick Guenther <kousue_AT_gmail.com>
Date: Thu, 19 Nov 2009 22:25:40 -0500

I'm using wmii3.5 on OpenBSD and no matter how hard I look I can't
find a way to control if a window is floating or not.

I can do this fine:
$ wmiir xwrite /client/sel/ctl Fullscreen on
$ wmiir xwrite /client/sel/ctl Fullscreen off

But:
$ wmiir xwrite /client/sel/ctl Floating off
wmiir: fatal: cannot write file '/client/sel/ctl': bad command
$ wmiir xwrite /client/sel/ctl Float off
wmiir: fatal: cannot write file '/client/sel/ctl': bad command

I did discover the tagrules trick (which I feel lame for 'discovering'
since it is right under my nose in the default wmiirc) of putting a
line in /tagrules that reads '/<regex matching client type>.*/ -> ~'
but I don't necessarily want /all/ my instances of whatever given
program I want to float to work this way (a friend suggested I use
xargs to set the WM_CLASS of any window I do want to manage this way
to some unique string, but that's a kludge at best).

It seems like the only way to control the floating state is
$ wmiir xwrite /tag/sel/ctl send sel toggle
None of these work (though I wouldn't expect them to; I don't
understand why if Fullscreen is a client property, that floating is a
view property):
$ wmiir xwrite /tag/sel/ctl send sel on
wmiir: fatal: cannot write file '/tag/sel/ctl': bad value
$ wmiir xwrite /tag/sel/ctl send sel off
wmiir: fatal: cannot write file '/tag/sel/ctl': bad value
$ wmiir xwrite /tag/sel/ctl send sel floating
wmiir: fatal: cannot write file '/tag/sel/ctl': bad value
$ wmiir xwrite /tag/sel/ctl send sel '~'
wmiir: fatal: cannot write file '/tag/sel/ctl': bad value

If you're curious my use case is this: I've implemented
http://hashapass.com as a keyboard shortcut, and use GNOME's zenity to
get the param/pass combo from the user (dmenu would be slicker but it
doesn't supporting hiding the password); for some reason all zenity
windows launched by my keyboard shortcut end up tiled, though all ones
launched by dmenu or from a terminal don't. What I'd like to do is
pick up the CreateClient event and float it only if the created client
is the one I just started from my script.

On a theory I even tried setting it's tag to "~" but wmii just ignored me:
$ echo -n '~' | wmiir write /client/sel/tags
$ wmiir read /client/sel/tags
1$

I've read the latest doc that comes with the 3.9beta (wmii.pdf) and
though the commands have changed, it seems that there still is only a
way to toggle a window in and out of floating.

So is there something I'm missing? Is this planned for inclusion in a
future release? Else, can I request this as a feature?
And an obligatory thanks for wmii! I've been using it since 2.x and it
makes me happy how natural it all is.
-Nick
Received on Fri Nov 20 2009 - 03:25:40 UTC

This archive was generated by hypermail 2.2.0 : Fri Nov 20 2009 - 03:36:02 UTC