Files
dtos-dotfiles/.xmonad/lib/Custom/MyScratchpads.hs
2020-07-14 11:54:05 -05:00

35 lines
1.2 KiB
Haskell

module Custom.MyScratchpads where
import XMonad
import Custom.MyVariables
import XMonad.Util.NamedScratchpad
import qualified XMonad.StackSet as W
------------------------------------------------------------------------
-- SCRATCHPADS
------------------------------------------------------------------------
-- Allows to have several floating scratchpads running different applications.
-- Import Util.NamedScratchpad. Bind a key to namedScratchpadSpawnAction.
myScratchPads :: [NamedScratchpad]
myScratchPads = [ NS "terminal" spawnTerm findTerm manageTerm
, NS "mocp" spawnMocp findMocp manageMocp
]
where
spawnTerm = myTerminal ++ " -n scratchpad"
findTerm = resource =? "scratchpad"
manageTerm = customFloating $ W.RationalRect l t w h
where
h = 0.9
w = 0.9
t = 0.95 -h
l = 0.95 -w
spawnMocp = myTerminal ++ " -n mocp 'mocp'"
findMocp = resource =? "mocp"
manageMocp = customFloating $ W.RationalRect l t w h
where
h = 0.9
w = 0.9
t = 0.95 -h
l = 0.95 -w