ADD dynamic workspace for unwieldy F5VPN thingy
This commit is contained in:
parent
2a866f9877
commit
5745a2e49f
|
@ -173,10 +173,24 @@ xsaneDynamicWorkspace = DynWorkspace
|
|||
t = "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 = [ xsaneDynamicWorkspace
|
||||
, wmDynamicWorkspace
|
||||
, gimpDynamicWorkspace
|
||||
, f5vpnDynamicWorkspace
|
||||
]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
|
||||
module XMonad.Internal.Concurrent.DynamicWorkspaces
|
||||
( DynWorkspace(..)
|
||||
, appendShift
|
||||
, appendViewShift
|
||||
, removeDynamicWorkspace
|
||||
, runWorkspaceMon
|
||||
|
@ -175,9 +176,18 @@ spawnOrSwitch tag cmd = do
|
|||
-- | Managehook
|
||||
-- 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 = 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 tag = liftX (appendWorkspace tag) >> viewShift tag
|
||||
|
||||
|
|
Loading…
Reference in New Issue