mirror of
https://gitlab.com/dwt1/dotfiles.git
synced 2026-04-22 02:50:24 +10:00
35 lines
1.2 KiB
Haskell
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
|
|
|