You are not logged in.
So I can get XMonad to play (somewhat) nicely with two screens. It's working okay, but I really don't like the default settings for how you switch around in 2 screens. So, is there a way to bind workspaces 1,2,3,4 to one screen and workspaces 5,6,7,8,9 to another screen?
My other question with this, is would this be problematic with the fact that this is a laptop, and it will not always have another screen attached? I know I can just keep 2 configs and switch them, just didnt know if XMonad was smart to this.
Last edited by lifeafter2am (2009-06-28 08:38:09)
#binarii @ irc.binarii.net
Matrix Server: https://matrix.binarii.net
-------------
Allan -> ArchBang is not supported because it is stupid.
Offline
Ok, so after some reading, it seems that if I turn off greedyView then it should do almost what I am looking for. I looked through the FAQ and modified my xmonad.hs file accordingly:
} `additionalKeys`
[ ((mod4Mask .|. shiftMask, xK_z), spawn "xscreensaver-command -lock")
, ((controlMask, xK_Print), spawn "sleep 0.2; scrot -s")
, ((0, xK_Print), spawn "scrot")
, ((mod4Mask, xK_a), sendMessage MirrorShrink)
, ((mod4Mask, xK_z), sendMessage MirrorExpand)
]
[ (otherModMasks ++ "M-" ++ [key], action tag)
| (tag, key) <- zip myWorkspaces "123456789"
, (otherModMasks, action) <- [ ("", windows . W.view) -- was W.greedyView
, ("S-", windows . W.shift)]
]
But I get this when compiling:
[1 of 1] Compiling Main ( .xmonad/xmonad.hs, interpreted )
.xmonad/xmonad.hs:56:8:
Couldn't match expected type `t -> [((ButtonMask, KeySym), X ())]'
against inferred type `[a]'
In the second argument of `additionalKeys', namely
`[((mod4Mask .|. shiftMask, xK_z),
spawn "xscreensaver-command -lock"),
((controlMask, xK_Print), spawn "sleep 0.2; scrot -s"),
((0, xK_Print), spawn "scrot"),
((mod4Mask, xK_a), sendMessage MirrorShrink),
((mod4Mask, xK_z), sendMessage MirrorExpand)]
[(otherModMasks ++ "M-" ++ [key], action tag) |
(tag, key) <- zip myWorkspaces "123456789",
(otherModMasks, action) <- [("", windows . view),
("S-", windows . shift)]]'
In the second argument of `($)', namely
`defaultConfig
{manageHook = manageDocks <+> manageHook defaultConfig,
terminal = "urxvt", borderWidth = 0, normalBorderColor = "#000000",
focusedBorderColor = "#3399ff", layoutHook = customLayout,
logHook = dynamicLogWithPP $ myDzenPP dzenSbar, modMask = mod4Mask}
`additionalKeys`
[((mod4Mask .|. shiftMask, xK_z),
spawn "xscreensaver-command -lock"),
((controlMask, xK_Print), spawn "sleep 0.2; scrot -s"),
((0, xK_Print), spawn "scrot"),
((mod4Mask, xK_a), sendMessage MirrorShrink),
((mod4Mask, xK_z), sendMessage MirrorExpand)]
[(otherModMasks ++ "M-" ++ [key], action tag) |
(tag, key) <- zip myWorkspaces "123456789",
(otherModMasks, action) <- [("", windows . view),
("S-", windows . shift)]]'
In the expression:
xmonad
$ defaultConfig
{manageHook = manageDocks <+> manageHook defaultConfig,
terminal = "urxvt", borderWidth = 0, normalBorderColor = "#000000",
focusedBorderColor = "#3399ff", layoutHook = customLayout,
logHook = dynamicLogWithPP $ myDzenPP dzenSbar, modMask = mod4Mask}
`additionalKeys`
[((mod4Mask .|. shiftMask, xK_z),
spawn "xscreensaver-command -lock"),
((controlMask, xK_Print), spawn "sleep 0.2; scrot -s"),
((0, xK_Print), spawn "scrot"),
((mod4Mask, xK_a), sendMessage MirrorShrink),
((mod4Mask, xK_z), sendMessage MirrorExpand)]
[(otherModMasks ++ "M-" ++ [key], action tag) |
(tag, key) <- zip myWorkspaces "123456789",
(otherModMasks, action) <- [("", windows . view),
("S-", windows . shift)]]
Failed, modules loaded: none.
Prelude> :q
Leaving GHCi.
Most of the errors I usually understand, but I don't understand this one.
#binarii @ irc.binarii.net
Matrix Server: https://matrix.binarii.net
-------------
Allan -> ArchBang is not supported because it is stupid.
Offline
Ok, so after chilling in the IRC channel I got some answers to this and got it working. vav even updated the FAQ for using it within the main additional keys like I am.
} `additionalKeys`
([ ((mod4Mask .|. shiftMask, xK_z), spawn "xscreensaver-command -lock")
, ((controlMask, xK_Print), spawn "sleep 0.2; scrot -s")
, ((0, xK_Print), spawn "scrot")
, ((mod4Mask, xK_a), sendMessage MirrorShrink)
, ((mod4Mask, xK_z), sendMessage MirrorExpand)
]
++
--
-- mod-[1..9], Switch to workspace N
-- mod-shift-[1..9], Move client to workspace N
--
[((m .|. mod4Mask, k), windows $ f i)
| (i, k) <- zip (myWorkspaces) [xK_1 .. xK_9]
, (f, m) <- [(W.view, 0), (W.shift, shiftMask)]])
BIG shout out to vav on the IRC channel for helping me with this and the 100 other things I asked him.
#binarii @ irc.binarii.net
Matrix Server: https://matrix.binarii.net
-------------
Allan -> ArchBang is not supported because it is stupid.
Offline