stumpwm-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [STUMP] group-format-map and window-format-map


From: Matt Spear
Subject: Re: [STUMP] group-format-map and window-format-map
Date: Thu, 17 Mar 2011 01:18:15 -0700

That sounds good, I've attached a patch for the window (same logic as
yours), and changed the char I had in group-map-number to elt (same
for window).  I am not 100% sure the windowlist and grouplist string
search make perfect sense with this.  Is it wiser to have a similar
search algorithm for them (if so it is prolly worth cleaning the
select-group and select-window into a macro that they'd use too)?

Thanks!!!!
Matt Spear
address@hidden



On Thu, Mar 17, 2011 at 12:29 AM, Ben Spencer <address@hidden> wrote:
> On Wed, Mar 16, 2011 at 10:10:00PM -0700, Matt Spear wrote:
>> Fixed the 0 index not existing.  Fixed the group map.  Removed the
>> print.  Made the #\n default to the X-map-number (and fixed doc).
>
> Thanks, pushed.
>
>
>> It would be nice to integrate this further, but there are some
>> subtelities.  The gselect command allows selecting a group via a
>> substring, and in the general case the group-number-map map will be
>> non-digits (as I have it now). Maybe the gselect command will default
>> to the map index if it is a single character and exists in the
>> group-number-map, otherwise will attempt a substring search on the
>> groups?
>
> I'd rather not assume that the map index is a single character - in
> fact, if we were to change CHAR to ELT in group-map-number it could be
> anything, eg:
>
> (setf *group-number-map* #("foo" "bar" "baz"))
>
> or perhaps more usefully:
>
> (setf *group-number-map* #(1 2 3 4 5 6 7 8 9 10))
>
>
> What if we just check against group-map-number before looking for a
> partial match?  If I have groups like this:
>
> a*Default
> b+Float
> c-Blah
> d-Test
>
> And I hit 'd' in gselect, I would probably want the 'Test' group (I'd
> use completion if I wanted Default).
>
> Patch attached.  It's probably less efficient than the previous
> version but I doubt anybody has enough groups for it to matter.
>
>
> Ben
>
> _______________________________________________
> Stumpwm-devel mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/stumpwm-devel
>
>

Attachment: window-map.2.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]