Patch: add ewmhDesktopsEventHookCustom to XMonad.Hooks.EwmhDesktops.hs to sort workspaces

Hello, I have attached a patch to add a generalized version of ewmhDesktopsEventHook called ewmhDesktopsEventHookCustom that works as ewmhDesktopsLogHookCustom for ewmhDesktopsLogHook: it let you pass a function that will be applied to the workspace list. The reason of this patch is that if you use ewmhDesktopsLogHook with a special sort function then an external workspace viewer will show the workspaces in custom order. But if you interact with them, then the interaction will work on the normal order. So if you use a sort function on the LogHook then you need the same sort function in the EventHook. For example, before this patch I had problems with the workspace viewer of the gnome panel. This is an example on how to use it: -- sort function workspacesort = sortBy $ \a b -> tag a `compare` tag b -- custom log hook ewmhDesktopsLogHookCustom workspacesort -- custom event hook ewmhDesktopsEventHookCustom workspacesort Mario Pastorelli
participants (1)
-
Mario Pastorelli