ADD dynamic workspace for unwieldy F5VPN thingy
This commit is contained in:
parent
2a866f9877
commit
5745a2e49f
|
@ -173,10 +173,24 @@ xsaneDynamicWorkspace = DynWorkspace
|
||||||
t = "XSANE"
|
t = "XSANE"
|
||||||
c = "Xsane"
|
c = "Xsane"
|
||||||
|
|
||||||
|
f5vpnDynamicWorkspace :: DynWorkspace
|
||||||
|
f5vpnDynamicWorkspace = DynWorkspace
|
||||||
|
{ dwName = "F5Vpn"
|
||||||
|
, dwTag = t
|
||||||
|
, dwClass = c
|
||||||
|
, dwHook = [ className =? c -?> appendShift t ]
|
||||||
|
, dwKey = 'i'
|
||||||
|
, dwCmd = Just skip
|
||||||
|
}
|
||||||
|
where
|
||||||
|
t = "F5VPN"
|
||||||
|
c = "F5 VPN"
|
||||||
|
|
||||||
allDWs :: [DynWorkspace]
|
allDWs :: [DynWorkspace]
|
||||||
allDWs = [ xsaneDynamicWorkspace
|
allDWs = [ xsaneDynamicWorkspace
|
||||||
, wmDynamicWorkspace
|
, wmDynamicWorkspace
|
||||||
, gimpDynamicWorkspace
|
, gimpDynamicWorkspace
|
||||||
|
, f5vpnDynamicWorkspace
|
||||||
]
|
]
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
|
|
||||||
module XMonad.Internal.Concurrent.DynamicWorkspaces
|
module XMonad.Internal.Concurrent.DynamicWorkspaces
|
||||||
( DynWorkspace(..)
|
( DynWorkspace(..)
|
||||||
|
, appendShift
|
||||||
, appendViewShift
|
, appendViewShift
|
||||||
, removeDynamicWorkspace
|
, removeDynamicWorkspace
|
||||||
, runWorkspaceMon
|
, runWorkspaceMon
|
||||||
|
@ -175,9 +176,18 @@ spawnOrSwitch tag cmd = do
|
||||||
-- | Managehook
|
-- | Managehook
|
||||||
-- Move windows to new workspace if they are part of a dynamic workspace
|
-- Move windows to new workspace if they are part of a dynamic workspace
|
||||||
|
|
||||||
|
-- shamelessly ripped off from appendWorkspace (this analogue doesn't exist)
|
||||||
|
appendHiddenWorkspace :: String -> X ()
|
||||||
|
appendHiddenWorkspace = addHiddenWorkspaceAt (flip (++) . return)
|
||||||
|
|
||||||
viewShift :: WorkspaceId -> ManageHook
|
viewShift :: WorkspaceId -> ManageHook
|
||||||
viewShift = doF . liftM2 (.) W.view W.shift
|
viewShift = doF . liftM2 (.) W.view W.shift
|
||||||
|
|
||||||
|
-- NOTE: need to appendHidden because the regular append function will shift
|
||||||
|
-- to the new workspace, which I don't want for this one
|
||||||
|
appendShift :: String -> ManageHook
|
||||||
|
appendShift tag = liftX (appendHiddenWorkspace tag) >> doF (W.shift tag)
|
||||||
|
|
||||||
appendViewShift :: String -> ManageHook
|
appendViewShift :: String -> ManageHook
|
||||||
appendViewShift tag = liftX (appendWorkspace tag) >> viewShift tag
|
appendViewShift tag = liftX (appendWorkspace tag) >> viewShift tag
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue