From def66dc28abf437acf723790bb4b145cac37c187 Mon Sep 17 00:00:00 2001 From: CronyAkatsuki Date: Wed, 7 Feb 2024 22:18:21 +0100 Subject: [PATCH] Add scratchpad and fix floating. --- .config/xmonad/xmonad.hs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.config/xmonad/xmonad.hs b/.config/xmonad/xmonad.hs index 7f9e84c..f7f8b9c 100644 --- a/.config/xmonad/xmonad.hs +++ b/.config/xmonad/xmonad.hs @@ -6,6 +6,7 @@ import qualified XMonad.StackSet as W -- Actions import XMonad.Actions.CycleWS (toggleWS') import XMonad.Actions.MouseResize +import XMonad.Actions.SinkAll (sinkAll) -- Data import qualified Data.Map as M @@ -98,6 +99,7 @@ myScratchPads = [ NS "terminal" spawnTerm findTerm manageTerm , NS "wiki" spawnWiki findWiki manageWiki , NS "notes" spawnNotes findNotes manageNotes , NS "profanity" spawnProfanity findProfanity manageProfanity + , NS "godot" spawnGodot findGodot manageGodot ] where spawnTerm = myTerminal ++ " --class scratchpad,scratchpad" @@ -132,6 +134,14 @@ myScratchPads = [ NS "terminal" spawnTerm findTerm manageTerm w = 0.8 t = 0.9 -h 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. @@ -227,6 +237,7 @@ myKeys = \c -> mkKeymap c $ , ("M-s w", namedScratchpadAction myScratchPads "wiki") -- Toggle scratchpad , ("M-s n", namedScratchpadAction myScratchPads "notes") -- 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-2", viewDesktop 1) -- Check workspace 2 , ("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-8", shiftAndView 7) -- Send window and check workspace 8 , ("M-C-9", shiftAndView 8) -- Send window and check workspace 9 + , ("M-f", sinkAll) -- Nuke solution for simplestFloat layout ] where toggleFloat w = windows (\s -> if M.member w (W.floating s)