[xmonad] Dual screen workspaces stay where they are

Nick Urbanik nick.urbanik at optusnet.com.au
Wed Nov 10 22:22:52 EST 2010

Dear Folks,

Thanks for a nice windowing system.  (it's really just a ruse to get
me to learn Haskell!)

I use two screens, and am used to the idea that on one pair of
screens, I have windows open relating to one activity.

I would really like desktops to stay where they are, so I see just the
ones I care about at one time.  Unfortunately, it seems that when I
change workspaces, I drag some other things with me as I go around,
and I get horribly lost.  I want to see the browser only when I press
Meta-3 (and Meta-4, I think) for example, and when I press other key
combinations, I go to those other workspaces, where I was doing
something completely different.  I seem to be chasing my emacs
windows around the place, and things don't seem to stay where I put

Am I just confused, or is there a software solution to this problem?
Or should I ask for a refund on that lobotomy?

Here is my xmonad.hs:
import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.EZConfig(additionalKeys)
import System.IO

myManageHook = composeAll
     [ className =? "Gimp"      --> doFloat
     , className =? "Vncviewer" --> doFloat
main = do
     xmproc <- spawnPipe "xmobar"
     xmonad $ defaultConfig {
         terminal = "Terminal"
         , manageHook = manageDocks <+> myManageHook -- make sure to include myManageHook definition from above
                         <+> manageHook defaultConfig
         , layoutHook = avoidStruts  $  layoutHook defaultConfig
         , logHook = dynamicLogWithPP $ xmobarPP
                         { ppOutput = hPutStrLn xmproc
                         , ppTitle = xmobarColor "green" "" . shorten 50
         , modMask = mod4Mask     -- Rebind Mod to the Windows key
         } `additionalKeys`
         [ ((mod4Mask .|. shiftMask, xK_z), spawn "xscreensaver-command -lock")
         , ((controlMask, xK_Print), spawn "sleep 0.2; scrot -s")
         , ((0, xK_Print), spawn "scrot")

I also am using xmobar.
Nick Urbanik http://nicku.org 808-71011 nick.urbanik at optusnet.com.au
GPG: 7FFA CDC7 5A77 0558 DC7A 790A 16DF EC5B BB9D 2C24  ID: BB9D2C24
I disclaim, therefore I am.

More information about the xmonad mailing list