Issue 432 in xmonad: Module for linking workspaces in a multihead setup

Status: New Owner: ---- New issue 432 by que...@gmail.com: Module for linking workspaces in a multihead setup http://code.google.com/p/xmonad/issues/detail?id=432 Hey, I just wanted to share some of the functions I have written for linking workspaces. The idea is that the module maintains a list of workspaces that are linked together. Whenever one switches to one of these workspaces, the other monitors are switched to the linked ones. Maybe it's of interest to someone else. It would be nice if it could be added to contrib. Best regards, Jan Attachments: linkWorkspaces.patch 60.6 KB

Updates: Status: Patch Labels: Component-Contrib Comment #1 on issue 432 by vogt.a...@gmail.com: Module for linking workspaces in a multihead setup http://code.google.com/p/xmonad/issues/detail?id=432 (No comment was entered for this change.)

Comment #2 on issue 432 by kubaracz...@gmail.com: Module for linking workspaces in a multihead setup http://code.google.com/p/xmonad/issues/detail?id=432 What could be the "shift' and 'view' in the example xmonad.hs? That seems to be unknown in my config... Also, how do you define which workspaces are linked? or is it just the 9 standard ones are zipped by two?

Comment #3 on issue 432 by que...@gmail.com: Module for linking workspaces in a multihead setup http://code.google.com/p/xmonad/issues/detail?id=432 The linking is dynamic... see toggleLinkWorkspaces... view and shift xmonad standard functions... they are implemented in X.StackSet.

Comment #4 on issue 432 by kubaracz...@gmail.com: Module for linking workspaces in a multihead setup http://code.google.com/p/xmonad/issues/detail?id=432 Ah yes, good.. Sorry for the X.StackSet, had it imported as W However I get " Couldn't match expected type `X ()' against inferred type `W.StackSet WorkspaceId l a s sd -> W.StackSet WorkspaceId l a s sd' In the first argument of `switchWS', namely `W.view' In the expression: switchWS W.view message In the expression: (switchWS W.view message, 0) " which i don't understand ;( What I did is I set: messages = defaultMessageConf which should use noMessages (if I am correct). This, however brings the said error... Any idea about this?

Comment #5 on issue 432 by que...@gmail.com: Module for linking workspaces in a multihead setup http://code.google.com/p/xmonad/issues/detail?id=432 probably it should read switchWS (\y -> windows $ W.view y) message sorry about the bug in the documentation.

Comment #6 on issue 432 by kubaracz...@gmail.com: Module for linking workspaces in a multihead setup http://code.google.com/p/xmonad/issues/detail?id=432 Could you perhaps update the documentation then? To be honest I do not know where to put your update :/

Comment #7 on issue 432 by que...@gmail.com: Module for linking workspaces in a multihead setup http://code.google.com/p/xmonad/issues/detail?id=432 See attached an updated version of the patch. It contains a "bugfix" for the documentation. And does not give you anymore type errors. Attachments: linkWorkspaces.patch 61.3 KB

Comment #8 on issue 432 by kubaracz...@gmail.com: Module for linking workspaces in a multihead setup http://code.google.com/p/xmonad/issues/detail?id=432 hm... This however gets stuck at: xmonad.hs:89:28: No instance for (Enum WorkspaceId) arising from the arithmetic sequence `1 .. ' at xmonad.hs:89:28-33 Possible fix: add an instance declaration for (Enum WorkspaceId) In the first argument of `zip', namely `[1 .. ]' In the expression: zip ([1 .. ]) ([xK_1 .. xK_9]) In a stmt of a list comprehension: (i, k) <- zip ([1 .. ]) ([xK_1 .. xK_9]) xmonad.hs:89:29: No instance for (Num WorkspaceId) arising from the literal `1' at xmonad.hs:89:29 Possible fix: add an instance declaration for (Num WorkspaceId) In the expression: 1 In the first argument of `zip', namely `[1 .. ]' In the expression: zip ([1 .. ]) ([xK_1 .. xK_9]) Please check the file for errors. Maybe I am doing something not right? ??

Comment #9 on issue 432 by que...@gmail.com: Module for linking workspaces in a multihead setup http://code.google.com/p/xmonad/issues/detail?id=432 Looks like I'm generalizing too much from my config. Sorry about that. As workspaces are note enumerable by default, it should read (XMonad.workspaces conf) instead of [1..] here. The variable conf has to be the XConfig, see Xmonad/Config.hs.

Comment #10 on issue 432 by que...@gmail.com: Module for linking workspaces in a multihead setup http://code.google.com/p/xmonad/issues/detail?id=432 Here again the updated patch. Thanks for testing. Attachments: linkWorkspaces.patch 61.3 KB

Comment #11 on issue 432 by kubaracz...@gmail.com: Module for linking workspaces in a multihead setup http://code.google.com/p/xmonad/issues/detail?id=432 Hm... now it does compile (BTW, the latest patch does not contain the change you mentioned), but it does not do anything (it seems). I guess the usage should be: - two screens are visible (say [3][4]) i press mod+p (as in your config) - i change at least one of the screens (say now i have [5][6]) - i press mod+3, both 3 and 4 jump to place. Right? If so, then it does not do it yet :) K

Comment #12 on issue 432 by que...@gmail.com: Module for linking workspaces in a multihead setup http://code.google.com/p/xmonad/issues/detail?id=432 Somehow darcs is screwed. It just won't let me record any further changes :/ Well I just add the module here then. Could you maybe post your config? That way I might check what is going wrong... Attachments: LinkWorkspaces.hs 7.7 KB

Comment #13 on issue 432 by kubaracz...@gmail.com: Module for linking workspaces in a multihead setup http://code.google.com/p/xmonad/issues/detail?id=432 Hey, thats it: Quite simple I hope :) Attachments: xmonad.hs 3.3 KB

Comment #14 on issue 432 by que...@gmail.com: Module for linking workspaces in a multihead setup http://code.google.com/p/xmonad/issues/detail?id=432 I experimented a bit with your config and here are two things I noticed: First, the module seems to be working better together with greedyView instead of view. Second, something went wrong in your key configuration. I attach a modified version of your config, where the linking works for me. Attachments: xmonad.hs 3.1 KB

Comment #15 on issue 432 by kubaracz...@gmail.com: Module for linking workspaces in a multihead setup http://code.google.com/p/xmonad/issues/detail?id=432 Hey, Thanks a lot, that indeed works! Finally :D Now its a time for a feature request: The linking works when switching to a workspace that was originally the linking 'master'. However, switching to linked 'slave' does not bring the master back. Is this on purpose? Also, it would be cool to store which of the linked workspaces was where, although that can probably be done with another module, or is not a wanted behavior. What I mean exactly is being on the right screen of a dual-screen setup you hit [5], where [5] is a workspace that was originally on the left screen. This brings the [5] on the left side and the [5,slave] on the right screen... Thanks again! Kuba

Comment #16 on issue 432 by que...@gmail.com: Module for linking workspaces in a multihead setup http://code.google.com/p/xmonad/issues/detail?id=432 This is actually intentional. For the slave part you might use a hack like modifying your binding that executes toggleLinkWorkspaces and use onScreen from Independent screens to execute toggleLinkworkspaces on both screens. Storing the screen needs a bit more coding. You might change the WorkspaceMap in the module, such that it stores the screen as well. That way you could preserve the mapping between workspaces and screens.

Comment #17 on issue 432 by kubaracz...@gmail.com: Module for linking workspaces in a multihead setup http://code.google.com/p/xmonad/issues/detail?id=432 Ok, cool! Thanks again for this useful module. K

Updates: Status: Fixed Comment #18 on issue 432 by vogt.a...@gmail.com: Module for linking workspaces in a multihead setup http://code.google.com/p/xmonad/issues/detail?id=432 After quite a bit of delay, this module is finally in contrib. -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings
participants (1)
-
codesite-noreply@google.com