Squidly
Squidly

Reputation: 2717

How can I bind a key to switch to a specific workspace in XMonad?

I'm running a two headed setup, and I'd very much like to bind like M-i to switch the left monitor's workspace to workspace 5, and the right monitor's workspace to workspace 6.

I've taken a look through Xmonad.Actions, but I couldn't see what I was looking for.

Something like

xmonad `additionalKeysP` [("M-i", switchToWorkspaces)]

where switchToWorkspace is the function I'm after

Upvotes: 4

Views: 1496

Answers (1)

Daniel Wagner
Daniel Wagner

Reputation: 153332

Use XMonad.Actions.OnScreen:

windows (greedyViewOnScreen 0 "5" . greedyViewOnScreen 1 "6")

Upvotes: 4

Related Questions