ENH make VMs go to their own workspace
This commit is contained in:
parent
93e145f1d4
commit
5ca70435e9
39
xmonad.hs
39
xmonad.hs
|
@ -20,7 +20,7 @@ import XMonad.Actions.Volume
|
||||||
import XMonad.Hooks.EwmhDesktops
|
import XMonad.Hooks.EwmhDesktops
|
||||||
import XMonad.Hooks.ManageDocks
|
import XMonad.Hooks.ManageDocks
|
||||||
-- import XMonad.Layout.IndependentScreens
|
-- import XMonad.Layout.IndependentScreens
|
||||||
-- import XMonad.Hooks.ManageHelpers
|
import XMonad.Hooks.ManageHelpers
|
||||||
-- import XMonad.Layout.BinarySpacePartition (emptyBSP)
|
-- import XMonad.Layout.BinarySpacePartition (emptyBSP)
|
||||||
-- import XMonad.Layout.NoBorders (noBorders)
|
-- import XMonad.Layout.NoBorders (noBorders)
|
||||||
-- import XMonad.Layout.ResizableTile (ResizableTall(..))
|
-- import XMonad.Layout.ResizableTile (ResizableTall(..))
|
||||||
|
@ -43,10 +43,10 @@ main = do
|
||||||
$ def { terminal = myTerm
|
$ def { terminal = myTerm
|
||||||
, modMask = myModMask
|
, modMask = myModMask
|
||||||
, layoutHook = avoidStruts $ layoutHook def
|
, layoutHook = avoidStruts $ layoutHook def
|
||||||
, manageHook = manageDocks <+> manageHook def
|
, manageHook = myManageHook <+> manageDocks <+> manageHook def
|
||||||
, handleEventHook = docksEventHook <+> handleEventHook def
|
, handleEventHook = docksEventHook <+> handleEventHook def
|
||||||
, startupHook = docksStartupHook <+> startupHook def
|
, startupHook = docksStartupHook <+> startupHook def
|
||||||
-- , workspaces = withScreens 2 ["name1", "name2"]
|
, workspaces = myWorkspaces
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Start xmonad using the main desktop configuration with a few
|
-- Start xmonad using the main desktop configuration with a few
|
||||||
|
@ -65,6 +65,9 @@ main = do
|
||||||
-- ]
|
-- ]
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
myWorkspaces = map show [0..9 :: Int] ++ ["VM"]
|
||||||
|
|
||||||
-- | Customize layouts.
|
-- | Customize layouts.
|
||||||
--
|
--
|
||||||
-- This layout configuration uses two primary layouts, 'ResizableTall'
|
-- This layout configuration uses two primary layouts, 'ResizableTall'
|
||||||
|
@ -85,22 +88,15 @@ main = do
|
||||||
-- , font = "xft:monospace:size=9"
|
-- , font = "xft:monospace:size=9"
|
||||||
-- }
|
-- }
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
myManageHook = composeOne
|
||||||
-- | Manipulate windows as they are created. The list given to
|
-- virtualbox seems to do whatever the "VirtualBoxVM" class
|
||||||
-- @composeOne@ is processed from top to bottom. The first matching
|
-- window does, and as such I guess we only need to match that
|
||||||
-- rule wins.
|
[ -- className =? "VirtualBox Machine" -?> doShift "3"
|
||||||
--
|
className =? "VirtualBoxVM" -?> doShift "VM" <+> doFloat
|
||||||
-- Use the `xprop' tool to get the info you need for these matches.
|
-- , className =? "URxvt" -?> doFloat
|
||||||
-- For className, use the second value that xprop gives you.
|
, className =? "mpv" -?> doFloat
|
||||||
-- myManageHook = composeOne
|
, isDialog -?> doCenterFloat
|
||||||
-- [ className =? "Pidgin" -?> doFloat
|
]
|
||||||
-- , className =? "XCalc" -?> doFloat
|
|
||||||
-- , className =? "mpv" -?> doFloat
|
|
||||||
-- , isDialog -?> doCenterFloat
|
|
||||||
|
|
||||||
-- -- Move transient windows to their parent:
|
|
||||||
-- , transience
|
|
||||||
-- ]
|
|
||||||
|
|
||||||
-- themes
|
-- themes
|
||||||
myFont = "xft:DejaVu Sans:size=11:autohint=false"
|
myFont = "xft:DejaVu Sans:size=11:autohint=false"
|
||||||
|
@ -228,12 +224,15 @@ myKeys c =
|
||||||
-- ] ++
|
-- ] ++
|
||||||
|
|
||||||
mkNamedSubmap c "Workspaces"
|
mkNamedSubmap c "Workspaces"
|
||||||
[ (mods ++ show i, addName (msg ++ " " ++ show i) $ windows $ f w)
|
-- NOTE this assumes that there are workspaces bound to numbers
|
||||||
|
([ (mods ++ show i, addName (msg ++ " " ++ show i) $ windows $ f w)
|
||||||
| (w, i) <- zip (XMonad.workspaces c) [1..] :: [(String, Int)]
|
| (w, i) <- zip (XMonad.workspaces c) [1..] :: [(String, Int)]
|
||||||
, (mods, msg, f) <-
|
, (mods, msg, f) <-
|
||||||
[ ("M-", "switch to workspace", W.view)
|
[ ("M-", "switch to workspace", W.view)
|
||||||
, ("M-S-", "move client to workspace", W.shift)]
|
, ("M-S-", "move client to workspace", W.shift)]
|
||||||
] ++
|
] ++
|
||||||
|
[ ("M-v", addName "switch to VM workspace" $ windows $ W.view "VM")
|
||||||
|
]) ++
|
||||||
|
|
||||||
mkNamedSubmap c "Screens"
|
mkNamedSubmap c "Screens"
|
||||||
[ ("M-l", addName "move up screen" nextScreen)
|
[ ("M-l", addName "move up screen" nextScreen)
|
||||||
|
|
Loading…
Reference in New Issue