Re: Sticky Windows with CopyWindows & DynamicWorkspaceGroups on Xinerama multihead setup
Hi Alexis --
First off, sorry for not CC'ing the mailing list. Dunno how that happened; they're back in the loop.
I haven't played with workspace groups very much, so I'm going to take a guess about how they work. Let me know if I'm wrong. My guess is this: you have a collection of workspace groups, which is just a list of workspaces. When you switch to a group, this changes which workspace is visible on all the screens in some deterministic way -- e.g. switching to group ["foo", "bar", "baz"], the left screen is always showing workspace "foo", middle screen "bar", right screen "baz". (I don't care if this is the actual mapping -- so long as the mapping is always the same.)
Then, you have a window on one of the screens, and you always want it to be visible on that screen, even when you change workspace groups.
I have two more assumption, which is that you are only ever changing workspaces by changing workspace groups; and that any given workspace only appears in one group.
If all these assumptions are correct, then one solution to your problem would be simply to copy the window of interest to the appropriate workspaces (rather than using `copyToAll`). You can use `copy` to copy to a single other workspace, and `foldr` to copy to a collection of workspaces:
All that remains for you is to find out which are the right workspaces to copy to. That involves checking which workspace is currently focused, and which other workspaces are in the same "position" in your groups. We can help you craft this code, though we'll need to see your existing config to give good advice.
On Mon, Jun 22, 2015 at 2:00 PM, Alexis de BRUYN <[hidden email]> wrote:
Thanks for your answer.
I have 3 monitors in Xinerama mode with 3 workspace groups. I am using viewWSGroup  to navigate through my workspace groups. Sometimes I want to set a window to be visible to all my workspace groups (so when I do a viewWSGroup, I always want to see this particular window).
Long times ago, I used Gnome in a similar multihead setup, I was able to right clic on a window and mark it as visible on all workspaces (the 3 monitors were seen as one workspace, which is not with Xmonad, but I am trying to reproduce this behaviour with DynamicWorkspaceGroups). So when I changed the workspace, I was able to see my window.
X's architecture makes it impossible to show a window on the screen in
two different locations (e.g. on two different screens) without
compositing. xmonad doesn't know anything about compositing. The
behavior you are seeing is xmonad doing its best to reconcile your
request (show this window on all workspaces, and show several workspaces
at once) with what it knows how to do (pick a subset of the windows it
knows about and put at most one place).
What exactly do you want sticky windows to do? I could imagine many
behaviors one could want that mesh with the "only appears once"
restriction, with varying levels of code required on your part.
If you really want it to appear on both screens, you're out of luck with