[wmii] snap: 20060307

From: Anselm R. Garbe <garbeam_AT_wmii.de>
Date: Tue, 7 Mar 2006 18:52:47 +0100

Hi there,

I created a new snap which contains the new tagging mechanism
and the discussed changes to column layout (except the exclusive
flag revival, it will appear later).

To use this snap you have to understand how it works, because
all you know about workspaces (pages) is not(!) true anymore.

Each client has a 'tags' file in its namespace, ie:

mmv; wmiir read /ws/sel/sel/
---w------- garbeam garbeam 0 Tue Mar 7 18:23:53 2006 ctl
--rw------- garbeam garbeam 13 Tue Mar 7 18:23:53 2006 geom
--r-------- garbeam garbeam 35 Tue Mar 7 18:23:53 2006 name
--rw------- garbeam garbeam 1 Tue Mar 7 18:23:53 2006 tags

This file contains space-separated tags, to which the client is
related. By default wmii provides numeric tags (1...9), which
can be applied on the fly to any client using the
$MODKEY-[1...9] shortcut. If no clients exists "1" is used as
fallback default tag, though this will be configurable in
/def/tag with next snap.

Pressing $MODKEY-2 for instance will replace the existing tag of
the selected client with "2". If the currently constructed
workspace does not match "2", the client will be hidden. If you
want to see all clients which are tagged with "2" you press
$MODKEY-Shift-2. Same applies for all other $MODKEY-Shift-[1..9]
shortcuts.

Assumed, you want that a client appeares in two workspaces, you
can apply two space-separated tags to its tags file, though
there are no shortcuts to achieve this, ie:

echo -n '1 2'| wmiir write /ws/sel/sel/tags

This will make the selected client visible on both constructed
workspaces matching tag '1' and '2' ($MODKEY-Shift-1 and
$MODKEY-Shift-2).

You can look at following shots to see this scenario from
yesterday evening on my box:

http://wmii.de/shots/20060307a.png
http://wmii.de/shots/20060307b.png

On the other hand you can also do:

echo -n select 1 2 | wmiir write /ctl

This will create a workspace which matches all clients
containing the tags '1' and '2'. Though this handling is not
well tested at the moment and will slightly change, because I
want to use regex(2) matching instead in future for this
purpose. Thus use this feature only as experimental feature.

The filesystem has changed as well, to represent the new
mechanism in a more natural way as follows:

/clients is a directory which contains all(!) clients managed by
wmii. This is necessary to address clients which are not visible
in the current workspace.

/ws is a shortcut directory to point to the current workspace
which you see.

/tags shows all unique tags which have been applied to any
all clients.

/cache is a directory which contains all workspaces which have
been constructed. The lifetime of a workspace begins with the
first selection and ends if the last client disappears, which
matches the tag of such workspace. This means, that /cache might
never show all tags which can be found in /tags or that /cache
shows even more, once you select a workspace like '1 2' (the
above sample). So, cache is only an indicator for all workspaces
which contain clients and which have been constructed already.

To understand the /cache namespace, you have to consider
following exmaple:

Assumed you started two terminals with the default tag "1", now
you apply tag "2" with $MODKEY-2 to the selected client, it will
disappear, because tag "1" is still selected (tagging does not
imply that a new ws is constructed already for several reasons
already discussed with Uriel on this list, see the archive for
details).

If you now perform:

mmv; wmiir read /cache
d-r-x------ garbeam garbeam 0 Tue Mar 7 18:45:47 2006 1

you won't see an entry of a workspace called "2", because it has
not been constructed until you select such workspace for the
first time with ie $MODKEY-Shift-2.

If you perform above command again, that ws will be listed in
/cache:

mmv; wmiir read /cache
d-r-x------ garbeam garbeam 0 Tue Mar 7 18:47:17 2006 1
d-r-x------ garbeam garbeam 0 Tue Mar 7 18:47:17 2006 2

This should be easy to understand what contents are listed in
cache. The /tags namespace is updated immediately instead if you
tag a client. This namespace can be used to checkout which tags
you can match. Attempting to match a tag which does not exist,
has no effect and will stick you to the existing tag-ws.

The column layout has been simplified now. You create new
columns with $MODKEY-n if at least a client exists. Empty columns
are destroyed automatically. You apply stacking with $MODKEY-s,
equal with $MODKEY-equal and max with $MODKEY-m. Navigation is
straiht-forwardly done with $MODKEY-{h,j,k,l,Tab}.

/def/inc has been removed, because I found a proper way to use
as maximum available space as possible in layouts (even if
clients request incremental resizing). You only get mininmal
gaps which we can live with.

You can download this snap from:

http://wmii.de/snaps/wmii-20060307.tar.gz

Have fun and regards,

-- 
 Anselm R. Garbe  ><><  www.ebrag.de  ><><  GPG key: 0D73F361
Received on Tue Mar 07 2006 - 18:52:47 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 16:00:46 UTC