Re: [dev] wmii and floating controls

From: Kris Maglione <>
Date: Thu, 19 Nov 2009 23:28:14 -0500

On Thu, Nov 19, 2009 at 10:25:40PM -0500, Nick Guenther wrote:
>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.

Please, for the love of god (ken), don't use wmii 3.5. It's 4
years old already and probably shouldn't have even been
released. Isn't 3.6 available for OpenBSD?

>I can do this fine:
>$ wmiir xwrite /client/sel/ctl Fullscreen on
>$ wmiir xwrite /client/sel/ctl Fullscreen off
>$ 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

Whether a client is floating varies from view to view, it's not
a property of the client itself. The only reason that Fullscreen
doesn't work the same way is that EWMH requires otherwise.

>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>.*/ -> ~'

It's also documented in the man page...

>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):

See above.

>$ wmiir xwrite /tag/sel/ctl send sel '~'
>wmiir: fatal: cannot write file '/tag/sel/ctl': bad value

This works in newer versions, but as mentioned above, 3.5 is
ancient. If you want to find out whether a client is floating,
read /tag/sel/index and see if it's in the '~' area.

>If you're curious my use case is this: I've implemented
> 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);

I'd use ssh-askpass or pinentry. It's interesting that you use
dmenu, since wmii 3.5 didn't (and 3.9 doesn't).

>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.

This is indeed strange, but I'd expect tagrules to do exactly
what you want. In newer versions, I'd suggest wihack, although
I'm reminded it lacks a man page...

>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

It doesn't actually show up in the tags file, but it has the
same effect.

>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?

See above.

>And an obligatory thanks for wmii! I've been using it since 2.x and it
>makes me happy how natural it all is.

Thanks, that's always nice to hear.

Kris Maglione
An organisation that treats its programmers as morons will soon have
programmers that are willing and able to act like morons only.
	--Bjarne Stroustrup
Received on Fri Nov 20 2009 - 04:28:14 UTC

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