[xmonad] darcs patch: New module XMonad.Actions.GroupNavigation

adam vogt vogt.adam at gmail.com
Fri May 7 11:58:16 EDT 2010


Hello Norbert,

I have a couple suggestions to improve the API (which is sort of
orthogonal to Brent's idea to merge with CycleWS):

> +                                        nextMatch
> +                                      , prevMatch
> +                                      , nextMatchOrDo
> +                                      , prevMatchOrDo
> +                                      , nextMatchWithThis
> +                                      , prevMatchWithThis
> +                                      , historyHook
> +                                      , recent
> +                                      , recentMatch
> +                                      , recentMatchOrDo

The number of functions here could be reduced by about half if you have instead:

] data MatchDir = Next | Prev | Recent
] match :: MatchDir -> X ()
] matchOrDo :: MatchDir -> X () -> X ()
] ...

Then people may use  `match Next', instead of `nextMatch' which isn't
much longer.

I'm not sure about substituting the  _OrDo, and _WithThis functions
with a single function that takes more parameters.

The reason those `rotate' functions are missing from the standard
library is because they are inefficient. This shouldn't matter for
this module, but if we had 100s of windows, it would be important to
use Data.Sequence instead of lists.

Lastly, documentation and examples should be improved: the type
signature of nextMatchWithThis doesn't suggest that you can use
nextMatchWithThis className etc.

--
Adam


On Fri, May 7, 2010 at 9:39 AM, Norbert Zeh <nzeh at cs.dal.ca> wrote:
> Fri May  7 15:32:26 CEST 2010  Norbert Zeh <nzeh at cs.dal.ca>
>  * New module XMonad.Actions.GroupNavigation
>
>  This module allows the navigation of windows by groups, where a group is
>  defined as the set of all windows satisfying a specified boolean query.
>
>  The first set of functions simply allows the cyclic forward/backward traversal
>  of the list of windows in a group, possibly performing a custom action if the
>  group is empty.
>
>  The second set of functions adds a facility to keep track of the focus history
>  of all windows and uses this history to allow jumping to the most recent window
>  in a given group.
>
> _______________________________________________
> xmonad mailing list
> xmonad at haskell.org
> http://www.haskell.org/mailman/listinfo/xmonad
>
>


More information about the xmonad mailing list