Re: [wmii] scripting wmii geometry

From: David Morris <lists_AT_morris-clan.net>
Date: Tue, 3 Jun 2008 19:51:19 -0600

On Tue, Jun 3, 2008 at 4:09 PM, sofeng <sofengboe_AT_gmail.com> wrote:
> Is there a way to set the wmii column widths to a preset
> value (e.g. 80+20 or 50+50) dynamically? I would like to
> be able to press a key combination and set the column
> widths to a specified preset value (e.g. 80+20), then
> press another key combo to get to another preset value
> (e.g. 50+50). I see what appears to be geometry
> information using "wmiir read /tag/sel/index". But it is
> not writable, so I cannot change it. Is there a command to
> set geometries to a specified value?

A task I'm tackling right now in a new python configuration
(I got sick of both bash and rc 'features').

You need to update the generic column rules in the
'/colrules' file. I *think* the rules are written like:

    /regex_pattern/ -> width+width+width+....

Where each width is a percentage. Patterns correspond to
tag names.

You can specify multiple rules for the same "pattern", each
with a different number of columns.

Unfortunately, you cannot "append" to the list...only write
a new list, so in the key binding you must read

> Also, I have a somewhat related question: Is there a way
> to save current client sizes in default mode so I can
> preserve the geometries when switching between stacked and
> default modes?

Also on my to-do list for my new python configuration...

The best way I've found is to save current window sizes by
reading the layout of the column before you switch out of
"default" view. Then when switching to "stacked" view, you
can re-apply those sizes using the 'grow' command and
providing it resize amounts in pixels.

--David
Received on Wed Jun 04 2008 - 03:51:21 UTC

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