Add scratchpad and fix floating.
This commit is contained in:
parent
a613c33712
commit
def66dc28a
@ -6,6 +6,7 @@ import qualified XMonad.StackSet as W
|
|||||||
-- Actions
|
-- Actions
|
||||||
import XMonad.Actions.CycleWS (toggleWS')
|
import XMonad.Actions.CycleWS (toggleWS')
|
||||||
import XMonad.Actions.MouseResize
|
import XMonad.Actions.MouseResize
|
||||||
|
import XMonad.Actions.SinkAll (sinkAll)
|
||||||
|
|
||||||
-- Data
|
-- Data
|
||||||
import qualified Data.Map as M
|
import qualified Data.Map as M
|
||||||
@ -98,6 +99,7 @@ myScratchPads = [ NS "terminal" spawnTerm findTerm manageTerm
|
|||||||
, NS "wiki" spawnWiki findWiki manageWiki
|
, NS "wiki" spawnWiki findWiki manageWiki
|
||||||
, NS "notes" spawnNotes findNotes manageNotes
|
, NS "notes" spawnNotes findNotes manageNotes
|
||||||
, NS "profanity" spawnProfanity findProfanity manageProfanity
|
, NS "profanity" spawnProfanity findProfanity manageProfanity
|
||||||
|
, NS "godot" spawnGodot findGodot manageGodot
|
||||||
]
|
]
|
||||||
where
|
where
|
||||||
spawnTerm = myTerminal ++ " --class scratchpad,scratchpad"
|
spawnTerm = myTerminal ++ " --class scratchpad,scratchpad"
|
||||||
@ -132,6 +134,14 @@ myScratchPads = [ NS "terminal" spawnTerm findTerm manageTerm
|
|||||||
w = 0.8
|
w = 0.8
|
||||||
t = 0.9 -h
|
t = 0.9 -h
|
||||||
l = 0.9 -w
|
l = 0.9 -w
|
||||||
|
spawnGodot = myTerminal ++ " --class godot,godot -e nvim --listen /tmp/godot.pipe"
|
||||||
|
findGodot = className =? "godot"
|
||||||
|
manageGodot = customFloating $ W.RationalRect l t w h
|
||||||
|
where
|
||||||
|
h = 0.8
|
||||||
|
w = 0.8
|
||||||
|
t = 0.9 -h
|
||||||
|
l = 0.9 -w
|
||||||
|
|
||||||
|
|
||||||
--Makes setting the spacingRaw simpler to write. The spacingRaw module adds a configurable amount of space around windows.
|
--Makes setting the spacingRaw simpler to write. The spacingRaw module adds a configurable amount of space around windows.
|
||||||
@ -227,6 +237,7 @@ myKeys = \c -> mkKeymap c $
|
|||||||
, ("M-s w", namedScratchpadAction myScratchPads "wiki") -- Toggle scratchpad
|
, ("M-s w", namedScratchpadAction myScratchPads "wiki") -- Toggle scratchpad
|
||||||
, ("M-s n", namedScratchpadAction myScratchPads "notes") -- Toggle scratchpad
|
, ("M-s n", namedScratchpadAction myScratchPads "notes") -- Toggle scratchpad
|
||||||
, ("M-s p", namedScratchpadAction myScratchPads "profanity") -- Toggle scratchpad
|
, ("M-s p", namedScratchpadAction myScratchPads "profanity") -- Toggle scratchpad
|
||||||
|
, ("M-s g", namedScratchpadAction myScratchPads "godot") -- Toggle scratchpad
|
||||||
, ("M-1", viewDesktop 0) -- Check workspace 1
|
, ("M-1", viewDesktop 0) -- Check workspace 1
|
||||||
, ("M-2", viewDesktop 1) -- Check workspace 2
|
, ("M-2", viewDesktop 1) -- Check workspace 2
|
||||||
, ("M-3", viewDesktop 2) -- Check workspace 3
|
, ("M-3", viewDesktop 2) -- Check workspace 3
|
||||||
@ -254,6 +265,7 @@ myKeys = \c -> mkKeymap c $
|
|||||||
, ("M-C-7", shiftAndView 6) -- Send window and check workspace 7
|
, ("M-C-7", shiftAndView 6) -- Send window and check workspace 7
|
||||||
, ("M-C-8", shiftAndView 7) -- Send window and check workspace 8
|
, ("M-C-8", shiftAndView 7) -- Send window and check workspace 8
|
||||||
, ("M-C-9", shiftAndView 8) -- Send window and check workspace 9
|
, ("M-C-9", shiftAndView 8) -- Send window and check workspace 9
|
||||||
|
, ("M-f", sinkAll) -- Nuke solution for simplestFloat layout
|
||||||
]
|
]
|
||||||
where
|
where
|
||||||
toggleFloat w = windows (\s -> if M.member w (W.floating s)
|
toggleFloat w = windows (\s -> if M.member w (W.floating s)
|
||||||
|
Loading…
Reference in New Issue
Block a user