[dwm] How many tags do I use?

From: Anselm R. Garbe <arg_AT_suckless.org>
Date: Wed, 22 Nov 2006 16:03:10 +0100

Hi there,

when thinking about an algorithm which keeps all orders for any
set of viewed tags correctly on revisits, I only found the
solution to cache all non-empty combinations of subsets of tags
which have been viewed so far.

In worst case this means the power set of tags without the empty
set, basically 2^ntags - 1. For 4 tags this means 15, for 5 tags
this means 31, ..., for 10 tags this means 1023, and so on.

With the remark that using all possible subsets seems to be a
pathological assumption, I consider to implement this algorithm
(which would result in a different data structure for organizing
 clients).

But before I do that, maybe someone else has an idea for a more
elegant solution?

Background:

Currently the first tag index of a client window is defined as
the client weight (==position) in the global client list.

Now assume following constellation:

Client1 is tagged with: 1
Client2 is tagged with: 1, 2
Client3 is tagged with: 2

If you view tag 1, you will see Client1 and Client2.
If you view tag 2, you will see Client2 and Client3.

Assumed all clients are managed, if you zoom Client3 when
viewing tag 2, and after that you are going to view tag 1 and go
back, the layout when viewing tag 2 changes and Client2 is
zoomed again (appears first), although the correct client is
focused (because of the global focus stack).

The reason for this phenomenon is, that the order of clients
within a tag which is viewed, is related to the global client
order, and Client2 has a lesser weight (1) than Client3, thus
this effect happens.

With the above proposed cache for any subset-combination on
demand, this could be solved. However, my instinct tells me,
there must be a simplier solution for the problem. Atm my mind
is unable to see this solution.

Regards,

-- 
 Anselm R. Garbe >< http://suckless.org/~arg/ >< GPG key: 0D73F361
Received on Wed Nov 22 2006 - 16:03:10 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 14:32:39 UTC