Splitting XMonad config into multiple files.

This commit is contained in:
Derek Taylor
2020-07-14 11:54:05 -05:00
parent e8facc6b13
commit f4f27efb37
6 changed files with 752 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
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