Re: [dwm] cycling tags, again...

From: Anselm R. Garbe <arg_AT_10kloc.org>
Date: Thu, 31 Aug 2006 11:46:35 +0200

On Thu, Aug 31, 2006 at 11:06:38AM +0200, Sander van Dijk wrote:
> On 8/31/06, Jukka Salmi <j+dwm_AT_2006.salmi.ch> wrote:
> >What about functions for viewing the previous/next tags for all tags
> >currently selected? Example: dwm is configured to have five tags.
> >You're viewing tags 2 and 4. After calling viewnext() you'd be viewing
> >tags 3 and 5; calling viewprev() would have resulted in tags 1 and 3
> >being viewed. The attached patch does what I'm trying to explain.
>
> I think that's kind of arbitrary; You could just as well select the
> next tag counting from the rightmost or leftmost of the currently
> selected tags. None of these make much more sense than the others. The
> reason for this is that in a wm that allows multitag selection,
> viewnext() anh viewprev() apply only to the the very specific
> (cornercase?) situation where only one tag is selected for view. The
> sanest way to do it would probably be to allow viewnext() and
> viewprev() only when in a context where they have meaning (= when only
> one tag is selected for viewing), but that would be so specific that
> it doesn't really have a place in dwm main I believe, sorry...

You could also do

        j = random() % ntags;
        for(i = 0; i < ntags; i++)
                seltags[i] = i == j;

Regards,

-- 
 Anselm R. Garbe  ><><  www.ebrag.de  ><><  GPG key: 0D73F361
Received on Thu Aug 31 2006 - 11:46:35 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 14:30:45 UTC