Changing workspaces on both physical screens

Hello, I am using xmonad on my Linux laptop and pdfpc (https://pdfpc.github.io/) for presentation. pdfpc uses two windows, one with current slide, next slides, notes etc. and the other one with the presentation only. I usually use workspace 8 on my laptop with the window with notes and workspace 9 on the projector with the presentation window. I sometimes switch workspaces to show code snippets in emacs etc. and I want to be able to quickly restore the "pdfpc" workspaces. I use the following binding: ((modMask .|. shiftMask , xK_p), (do windows (W.view "9"); swapNextScreen; windows (W.view "8"))) which may not be the most elegant solution :) Is there a more "haskell" way to do the same thing? Best, Christophe -- Christophe Garion GPG: 1982 15B2 64AC 3C34 532D BF19 6CD6 246C 62DA 5A7F

This looks fine to me. If you want something a bit more general you could try using http://hackage.haskell.org/package/xmonad-contrib-0.15/docs/XMonad-Actions-D... which lets you set up named groups of workspaces so you can quickly switch to them. It is designed to let you do this *dynamically* but there's no reason you couldn't create a "static" group in your startupHook. -Brent On Thu, Dec 13, 2018 at 5:17 AM Christophe Garion < tofgarion+xmonad@runbox.com> wrote:
Hello,
I am using xmonad on my Linux laptop and pdfpc (https://pdfpc.github.io/) for presentation. pdfpc uses two windows, one with current slide, next slides, notes etc. and the other one with the presentation only. I usually use workspace 8 on my laptop with the window with notes and workspace 9 on the projector with the presentation window.
I sometimes switch workspaces to show code snippets in emacs etc. and I want to be able to quickly restore the "pdfpc" workspaces. I use the following binding:
((modMask .|. shiftMask , xK_p), (do windows (W.view "9"); swapNextScreen; windows (W.view "8")))
which may not be the most elegant solution :)
Is there a more "haskell" way to do the same thing?
Best,
Christophe
-- Christophe Garion GPG: 1982 15B2 64AC 3C34 532D BF19 6CD6 246C 62DA 5A7F _______________________________________________ xmonad mailing list xmonad@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad

On Sat, Dec 15 2018 at 09:22:27 PM, Brent Yorgey
This looks fine to me. If you want something a bit more general you could try using
http://hackage.haskell.org/package/xmonad-contrib-0.15/docs/XMonad-Actions-D...
which lets you set up named groups of workspaces so you can quickly switch to them. It is designed to let you do this *dynamically* but there's no reason you couldn't create a "static" group in your startupHook.
Yes, that's a good idea! Thanks, Christophe -- Christophe Garion GPG: 1982 15B2 64AC 3C34 532D BF19 6CD6 246C 62DA 5A7F
participants (2)
-
Brent Yorgey
-
Christophe Garion