-
-
Notifications
You must be signed in to change notification settings - Fork 271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
X.H.EwmhDesktops: Add remap argument to the custom log hook #105
Conversation
It’s been 9 years that I wrote that, and hardly less that touched it. I don’t claim any particular ownership here :-) I also don’t think I created the generalized hook (what does it do?). So I officially have no opinion here :-) |
@nomeata Ahh yeah, looks like @shepheb Is actually the original author of the custom log hook. Any thoughts (I'm aware this was 8 years ago). |
So, there should be |
Yeah, I suppose that works, although it is a bit untidy. It seems like a big part of the issue is that the custom function is a [WindowSpace] -> [WindowSpace] Why not simply make it WindowSpace -> WindowSpace, unless someone wanted the ability to filter or otherwise add other windowspaces. what if, for example, the function removes the current workspace... then the head function in your suggested change would blow up. |
Is could be used for filtering out internal workspaces like "NSP" used for named scratchpads. I've created a discussion(#90) about getting rid of "NSP" which requires many hacks like this for compatibility(and still has some issues like clicking "minimized" scratchpad on a panel brings the NSP workspace). If repo owners agree with my point about NSP, this and many other hacks will not be required. But as for now I still prefer not changing signature because there already exists a function for changing |
Am I to understand that EWMH is now the only acceptable way to do anything? On Thu, Nov 3, 2016 at 10:51 PM, Bogdan Sinitsyn notifications@github.com
brandon s allbery kf8nh sine nomine associates |
No, it's not the only acceptable way of course. But I think that using internal workspace isn't a good way because it requires many hacks in modules that are not related to NamedScratchpad and should know as less as possible about its existance. The main idea of #90 is not to use EWMH but keep minimized scrathpads not in internal workspace but in some global state. This does not differ from (partially?)EWMH-compliant minimization, that's why I suggested to use minimization for scratchpads. |
101df75
to
74c44a7
Compare
Closed in favor of #122 |
This makes it easier to use transforms that need some state, e.g. XMonad.Actions.WorkspaceNames could provide this. Related: xmonad#105 Related: xmonad#122
This makes it easier to use transforms that need some state, e.g. XMonad.Actions.WorkspaceNames could provide this. Related: xmonad#105 Related: xmonad#122 Related: f271d59 ("X.A.WorkspaceNames: Provide workspaceListTransform for EwmhDesktops")
This makes it easier to use transforms that need some state, e.g. XMonad.Actions.WorkspaceNames could provide this. Related: xmonad#105 Related: xmonad#122 Related: f271d59 ("X.A.WorkspaceNames: Provide workspaceListTransform for EwmhDesktops")
This makes it easier to use transforms that need some state, e.g. XMonad.Actions.WorkspaceNames could provide this. Related: xmonad#105 Related: xmonad#122 Related: f271d59 ("X.A.WorkspaceNames: Provide workspaceListTransform for EwmhDesktops")
Turns out that renaming workspaces in the transform is a bad idea in the `ewmhDesktopsEventHook'` as W.view is then unable to find the workspace. This was somewhat usable before we introduced the unified `ewmh'` config combinator as one would only rename in the transform passed to `ewmhDesktopsLogHookCustom`, but with the unified config, we actually need to separate renames from sorting/reordering, otherwise switching workspaces by pagers or wmctrl doesn't work. Related: xmonad#105 Related: xmonad#122 Related: f271d59 ("X.A.WorkspaceNames: Provide workspaceListTransform for EwmhDesktops")
This makes it easier to use transforms that need some state, e.g. XMonad.Actions.WorkspaceNames could provide this. Related: xmonad#105 Related: xmonad#122 Related: f271d59 ("X.A.WorkspaceNames: Provide workspaceListTransform for EwmhDesktops")
Turns out that renaming workspaces in the transform is a bad idea in the `ewmhDesktopsEventHook'` as W.view is then unable to find the workspace. This was somewhat usable before we introduced the unified `ewmh'` config combinator as one would only rename in the transform passed to `ewmhDesktopsLogHookCustom`, but with the unified config, we actually need to separate renames from sorting/reordering, otherwise switching workspaces by pagers or wmctrl doesn't work. Related: xmonad#105 Related: xmonad#122 Related: f271d59 ("X.A.WorkspaceNames: Provide workspaceListTransform for EwmhDesktops")
This makes it easier to use transforms that need some state, e.g. XMonad.Actions.WorkspaceNames could provide this. Related: xmonad#105 Related: xmonad#122 Related: f271d59 ("X.A.WorkspaceNames: Provide workspaceListTransform for EwmhDesktops")
Turns out that renaming workspaces in the transform is a bad idea in the `ewmhDesktopsEventHook'` as W.view is then unable to find the workspace. This was somewhat usable before we introduced the unified `ewmh'` config combinator as one would only rename in the transform passed to `ewmhDesktopsLogHookCustom`, but with the unified config, we actually need to separate renames from sorting/reordering, otherwise switching workspaces by pagers or wmctrl doesn't work. Related: xmonad#105 Related: xmonad#122 Related: f271d59 ("X.A.WorkspaceNames: Provide workspaceListTransform for EwmhDesktops")
This makes it easier to use transforms that need some state, e.g. XMonad.Actions.WorkspaceNames could provide this. Related: xmonad#105 Related: xmonad#122 Related: f271d59 ("X.A.WorkspaceNames: Provide workspaceListTransform for EwmhDesktops")
Turns out that renaming workspaces in the transform is a bad idea in the `ewmhDesktopsEventHook'` as W.view is then unable to find the workspace. This was somewhat usable before we introduced the unified `ewmh'` config combinator as one would only rename in the transform passed to `ewmhDesktopsLogHookCustom`, but with the unified config, we actually need to separate renames from sorting/reordering, otherwise switching workspaces by pagers or wmctrl doesn't work. Related: xmonad#105 Related: xmonad#122 Related: f271d59 ("X.A.WorkspaceNames: Provide workspaceListTransform for EwmhDesktops")
This makes it easier to use transforms that need some state, e.g. XMonad.Actions.WorkspaceNames could provide this. Related: xmonad#105 Related: xmonad#122 Related: f271d59 ("X.A.WorkspaceNames: Provide workspaceListTransform for EwmhDesktops")
Turns out that renaming workspaces in the transform is a bad idea in the `ewmhDesktopsEventHook'` as W.view is then unable to find the workspace. This was somewhat usable before we introduced the unified `ewmh'` config combinator as one would only rename in the transform passed to `ewmhDesktopsLogHookCustom`, but with the unified config, we actually need to separate renames from sorting/reordering, otherwise switching workspaces by pagers or wmctrl doesn't work. Related: xmonad#105 Related: xmonad#122 Related: f271d59 ("X.A.WorkspaceNames: Provide workspaceListTransform for EwmhDesktops")
This makes it easier to use transforms that need some state, e.g. XMonad.Actions.WorkspaceNames could provide this. Related: xmonad#105 Related: xmonad#122 Related: f271d59 ("X.A.WorkspaceNames: Provide workspaceListTransform for EwmhDesktops")
Turns out that renaming workspaces in the transform is a bad idea in the `ewmhDesktopsEventHook'` as W.view is then unable to find the workspace. This was somewhat usable before we introduced the unified `ewmh'` config combinator as one would only rename in the transform passed to `ewmhDesktopsLogHookCustom`, but with the unified config, we actually need to separate renames from sorting/reordering, otherwise switching workspaces by pagers or wmctrl doesn't work. Related: xmonad#105 Related: xmonad#122 Related: f271d59 ("X.A.WorkspaceNames: Provide workspaceListTransform for EwmhDesktops")
This makes it easier to use transforms that need some state, e.g. XMonad.Actions.WorkspaceNames could provide this. Related: xmonad#105 Related: xmonad#122 Related: f271d59 ("X.A.WorkspaceNames: Provide workspaceListTransform for EwmhDesktops")
…ctrl -s) Turns out that renaming workspaces in the transform is a bad idea in the `ewmhDesktopsEventHook'` as W.view is then unable to find the workspace. This was somewhat usable before we introduced the unified `ewmh'` config combinator as one would only rename in the transform passed to `ewmhDesktopsLogHookCustom`, but with the unified config, we actually need to separate renames from sorting/reordering, otherwise switching workspaces by pagers or wmctrl doesn't work. Related: xmonad#105 Related: xmonad#122 Related: f271d59 ("X.A.WorkspaceNames: Provide workspaceListTransform for EwmhDesktops")
…tering and renaming Now that we have `XMonad.Util.ExtensibleConf`, users can comfortably use the `ewmh` combinator and still customize workspace ordering, filter out scratchpads and expose altered workspace names. To make this all work nicely, we introduce not one, but two configuration options: a sort/filter function and a rename function. This is because renaming and sorting in one go makes it hard (perhaps even impossible) to decide which workspace to switch to upon receipt of a _NET_CURRENT_DESKTOP request from a pager or wmctrl/xdotool. (The only reason this wasn't a problem before is because one could pass the renaming function to `ewmhDesktopsLogHookCustom` only, not `ewmhDesktopsEventHookCustom`, which is a confusing hack as can be seen in the related closed pull requests.) Related: xmonad#238 Related: xmonad#105 Related: xmonad#122
Related: xmonad#105 Related: xmonad#122 Related: f271d59 ("X.A.WorkspaceNames: Provide workspaceListTransform for EwmhDesktops")
…tering and renaming Now that we have `XMonad.Util.ExtensibleConf`, users can comfortably use the `ewmh` combinator and still customize workspace ordering, filter out scratchpads and expose altered workspace names. To make this all work nicely, we introduce not one, but two configuration options: a sort/filter function and a rename function. This is because renaming and sorting in one go makes it hard (perhaps even impossible) to decide which workspace to switch to upon receipt of a _NET_CURRENT_DESKTOP request from a pager or wmctrl/xdotool. (The only reason this wasn't a problem before is because one could pass the renaming function to `ewmhDesktopsLogHookCustom` only, not `ewmhDesktopsEventHookCustom`, which is a confusing hack as can be seen in the related closed pull requests.) Related: xmonad#238 Related: xmonad#105 Related: xmonad#122
Related: xmonad#105 Related: xmonad#122 Related: f271d59 ("X.A.WorkspaceNames: Provide workspaceListTransform for EwmhDesktops")
…tering and renaming Now that we have `XMonad.Util.ExtensibleConf`, users can comfortably use the `ewmh` combinator and still customize workspace ordering, filter out scratchpads and expose altered workspace names. To make this all work nicely, we introduce not one, but two configuration options: a sort/filter function and a rename function. This is because renaming and sorting in one go makes it hard (perhaps even impossible) to decide which workspace to switch to upon receipt of a _NET_CURRENT_DESKTOP request from a pager or wmctrl/xdotool. (The only reason this wasn't a problem before is because one could pass the renaming function to `ewmhDesktopsLogHookCustom` only, not `ewmhDesktopsEventHookCustom`, which is a confusing hack as can be seen in the related closed pull requests.) Related: xmonad#238 Related: xmonad#105 Related: xmonad#122
Related: xmonad#105 Related: xmonad#122 Related: f271d59 ("X.A.WorkspaceNames: Provide workspaceListTransform for EwmhDesktops")
…tering and renaming Now that we have `XMonad.Util.ExtensibleConf`, users can comfortably use the `ewmh` combinator and still customize workspace ordering, filter out scratchpads and expose altered workspace names. To make this all work nicely, we introduce not one, but two configuration options: a sort/filter function and a rename function. This is because renaming and sorting in one go makes it hard (perhaps even impossible) to decide which workspace to switch to upon receipt of a _NET_CURRENT_DESKTOP request from a pager or wmctrl/xdotool. (The only reason this wasn't a problem before is because one could pass the renaming function to `ewmhDesktopsLogHookCustom` only, not `ewmhDesktopsEventHookCustom`, which is a confusing hack as can be seen in the related closed pull requests.) Related: xmonad#238 Related: xmonad#105 Related: xmonad#122
Related: xmonad#105 Related: xmonad#122 Related: f271d59 ("X.A.WorkspaceNames: Provide workspaceListTransform for EwmhDesktops")
…tering and renaming Now that we have `XMonad.Util.ExtensibleConf`, users can comfortably use the `ewmh` combinator and still customize workspace ordering, filter out scratchpads and expose altered workspace names. To make this all work nicely, we introduce not one, but two configuration options: a sort/filter function and a rename function. This is because renaming and sorting in one go makes it hard (perhaps even impossible) to decide which workspace to switch to upon receipt of a _NET_CURRENT_DESKTOP request from a pager or wmctrl/xdotool. (The only reason this wasn't a problem before is because one could pass the renaming function to `ewmhDesktopsLogHookCustom` only, not `ewmhDesktopsEventHookCustom`, which is a confusing hack as can be seen in the related closed pull requests.) Related: xmonad#238 Related: xmonad#105 Related: xmonad#122
Related: xmonad#105 Related: xmonad#122 Related: f271d59 ("X.A.WorkspaceNames: Provide workspaceListTransform for EwmhDesktops")
…tering and renaming Now that we have `XMonad.Util.ExtensibleConf`, users can comfortably use the `ewmh` combinator and still customize workspace ordering, filter out scratchpads and expose altered workspace names. To make this all work nicely, we introduce not one, but two configuration options: a sort/filter function and a rename function. This is because renaming and sorting in one go makes it hard (perhaps even impossible) to decide which workspace to switch to upon receipt of a _NET_CURRENT_DESKTOP request from a pager or wmctrl/xdotool. (The only reason this wasn't a problem before is because one could pass the renaming function to `ewmhDesktopsLogHookCustom` only, not `ewmhDesktopsEventHookCustom`, which is a confusing hack as can be seen in the related closed pull requests.) Related: xmonad#238 Related: xmonad#105 Related: xmonad#122
Related: xmonad#105 Related: xmonad#122 Related: f271d59 ("X.A.WorkspaceNames: Provide workspaceListTransform for EwmhDesktops")
One might wonder why the additional argument to
ewmhDesktopsLogHookCustom
thatis added in this pull request is necessary -- it seems that the existing
argument, that allows arbitrary transformations of the workspaces should be
enough to rename the existing workspaces with something like the following:
(If you wish to reproduce this error, you may wish to use a simpler function to
change the workspace tag; one that simply appends some character to the end of
the workspace name would do.)
The issue is that when this transformation is applied, the ewmh hooks do not
properly set the current active workspace. The reason for this is that the way
that the way that the current workspace is determined uses the current window
set which has the untransformed versions of the current workspaces
(relevant line is here).
I suspect that there is a more elegant way to handle this issue (perhaps by
using a version of the s (the WindowSet) that has the remapped WindowSpaces? Any
way, I just wanted to put this out there to see what other peoples thoughts
about this are.