[xmonad] Workspace ordering and DynamicWorkspaces (+ patch)

adam vogt vogt.adam at gmail.com
Mon Jan 7 03:55:51 CET 2013


On Sun, Jan 6, 2013 at 6:27 PM, Hans Chen <hanswchen at gmail.com> wrote:
> I use DynamicWorkspaces with a few predefined workspaces. The problem is
> that when creating a new workspace, it gets sorted before my predefined
> workspaces and thus I can't always have e.g. "web" on Mod+1.
>
> When searching for this issue I found the following patch:
> http://www.haskell.org/pipermail/xmonad/2012-July/012810.html
> I've been using it successfully since then, and in my opinion this new
> behavior makes much more sense. My question is, does anyone know why the
> patch hasn't been merged yet? Is there anything I can do to get it merged?
>
> Note that I don't have anything to do with the patch, all credits goes to
> the original author Matthew Hague.

Hi Hans,

It helps to point out that you find the patch to be useful, since
the change isn't unequivocally "better". For example, the
workspace ordering I have (due XMonad.Actions.TopicSpace) puts
the most recently used workspaces first. That's closer to what
the current ordering getSortByIndex does than Matthew's patch. So
I wouldn't be surprised if there are people who prefer the
current behavior.

So we can choose to do:

 0. nothing
 1. apply Matthew's patch as-is

Making the result of getSortByIndex configurable by one of these
methods:

 2. store the function using XMonad.Util.ExtensibleState, which
    can set to the right one using a startupHook (or elsewhere).
 3. passing the actual function as a parameter (or as part of
    another argument like XMonad.Hooks.DynamicLog.PP)
 4. something else?

Another note is that some other modules will be affected
(benefit?) by the change to getSortByIndex:

  Actions/CycleWS.hs
  Actions/WorkspaceNames.hs
  Actions/SwapWorkspaces.hs
  Hooks/EwmhDesktops.hs
  Hooks/DynamicLog.hs
  Prompt/Workspace.hs


Unless there are some objections, I will apply the patch (option
1) in a week.

--
Adam



More information about the xmonad mailing list