mirror of
https://gitlab.com/dwt1/dotfiles.git
synced 2026-04-23 19:40:24 +10:00
Splitting XMonad config into multiple files.
This commit is contained in:
34
.xmonad/lib/Custom/MyScratchpads.hs
Normal file
34
.xmonad/lib/Custom/MyScratchpads.hs
Normal 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
|
||||
|
||||
Reference in New Issue
Block a user