view workspace key shortcuts

This is probably a stupid question, and I expect you xmonad hackers will know the answer in an instant. I have workspaces which are called by a mix of names and numbers, like so: myWorkspaces = ["www", "2", "3", "mail", "gimp"] ++ map show [6..9] Now, I know we already have default keymappings which allow you to quickly view (or send windows to) workspaces by their number. So, yes, I can already type Mod-1 and get to the "www" workspace, Mod-4 and get to the "mail" workspace. And, yes, I already have the Xmonad.Actions.Commands plugin installed, which I have set up to give a menu of workspaces when one hits the right key-combo. However, what I would like to do is have a simple key-combo which will get me *directly* to a given workspace, such as Mod4-m to take me to the "mail" workspace, and so on; I want to be able to have meaningful shortcuts, not just numbers. But I haven't been able to figure out what the correct command is to bind to the keymap. I've made guesses, but they're all illegal Haskell; no surprise, because I don't know Haskell. (Some day, but not now). I mean, I know I need to add someCommand to my key-list, but what? , ((mod4Mask, xK_m), someCommand someOptions) Help? Kathryn Andersen -- _--_|\ | Kathryn Andersen http://www.katspace.com / \ | \_.--.*/ | GenFicCrit mailing list http://www.katspace.com/gen_fic_crit/ v | ------------| Melbourne -> Victoria -> Australia -> Southern Hemisphere Maranatha! | -> Earth -> Sol -> Milky Way Galaxy -> Universe

However, what I would like to do is have a simple key-combo which will get me *directly* to a given workspace, such as Mod4-m to take me to the "mail" workspace, and so on; I want to be able to have meaningful shortcuts, not just numbers.
But I haven't been able to figure out what the correct command is to bind to the keymap. I've made guesses, but they're all illegal Haskell; no surprise, because I don't know Haskell. (Some day, but not now).
I mean, I know I need to add someCommand to my key-list, but what?
, ((mod4Mask, xK_m), someCommand someOptions)
I think the command you are looking for is windows $ W.view "mail" assuming that you have somewhere at the top of your config import qualified XMonad.StackSet as W Does that help? -Brent

On Thu, Jan 29, 2009 at 07:38:40AM -0500, Brent Yorgey wrote:
I mean, I know I need to add someCommand to my key-list, but what?
, ((mod4Mask, xK_m), someCommand someOptions)
I think the command you are looking for is
windows $ W.view "mail"
assuming that you have somewhere at the top of your config
import qualified XMonad.StackSet as W
Does that help?
Yes! Perfect! Thank you. Kathryn Andersen -- _--_|\ | Kathryn Andersen http://www.katspace.com / \ | \_.--.*/ | GenFicCrit mailing list http://www.katspace.com/gen_fic_crit/ v | ------------| Melbourne -> Victoria -> Australia -> Southern Hemisphere Maranatha! | -> Earth -> Sol -> Milky Way Galaxy -> Universe
participants (2)
-
Brent Yorgey
-
Kathryn Andersen