Correcting some errors regarding scratchpads in xmonad.

This commit is contained in:
Derek Taylor
2019-03-01 20:13:10 -06:00
parent 6118be148a
commit 373135ef7a
2 changed files with 28 additions and 18 deletions

View File

@@ -86,7 +86,7 @@ main = do
xmproc0 <- spawnPipe "xmobar -x 0 /home/dt/.config/xmobar/xmobarrc2" -- xmobar mon 2 xmproc0 <- spawnPipe "xmobar -x 0 /home/dt/.config/xmobar/xmobarrc2" -- xmobar mon 2
xmproc1 <- spawnPipe "xmobar -x 1 /home/dt/.config/xmobar/xmobarrc1" -- xmobar mon 1 xmproc1 <- spawnPipe "xmobar -x 1 /home/dt/.config/xmobar/xmobarrc1" -- xmobar mon 1
xmproc2 <- spawnPipe "xmobar -x 2 /home/dt/.config/xmobar/xmobarrc0" -- xmobar mon 0 xmproc2 <- spawnPipe "xmobar -x 2 /home/dt/.config/xmobar/xmobarrc0" -- xmobar mon 0
xmonad $ ewmh desktopConfig xmonad $ ewmh $ desktopConfig
{ manageHook = ( isFullscreen --> doFullFloat ) <+> manageDocks <+> myManageHook <+> manageHook desktopConfig { manageHook = ( isFullscreen --> doFullFloat ) <+> manageDocks <+> myManageHook <+> manageHook desktopConfig
, logHook = dynamicLogWithPP xmobarPP , logHook = dynamicLogWithPP xmobarPP
{ ppOutput = \x -> hPutStrLn xmproc0 x >> hPutStrLn xmproc1 x >> hPutStrLn xmproc2 x { ppOutput = \x -> hPutStrLn xmproc0 x >> hPutStrLn xmproc1 x >> hPutStrLn xmproc2 x
@@ -192,7 +192,8 @@ myKeys =
, ("M-S-<KP_Subtract>", shiftTo Prev nonNSP >> moveTo Prev nonNSP) -- Shifts focused window to previous workspace , ("M-S-<KP_Subtract>", shiftTo Prev nonNSP >> moveTo Prev nonNSP) -- Shifts focused window to previous workspace
-- Scratchpads -- Scratchpads
, ("M-S-<Return>", namedScratchpadAction myScratchPads "terminal") , ("M-C-<Return>", namedScratchpadAction myScratchPads "terminal")
, ("M-C-c", namedScratchpadAction myScratchPads "cmus")
-- Main Run Apps -- Main Run Apps
, ("M-<Return>", spawn myTerminal) , ("M-<Return>", spawn myTerminal)
@@ -306,17 +307,24 @@ floats = renamed [Replace "floats"] $ limitWindows 20 $ simplestFloat
---SCRATCHPADS ---SCRATCHPADS
------------------------------------------------------------------------ ------------------------------------------------------------------------
myScratchPads = [ NS "terminal" spawnTerm findTerm manageTerm ] myScratchPads = [ NS "terminal" spawnTerm findTerm manageTerm
, NS "cmus" spawnCmus findCmus manageCmus
]
where where
spawnTerm = myTerminal ++ " -n scratchpad" spawnTerm = myTerminal ++ " -n scratchpad"
findTerm = resource =? "scratchpad" findTerm = resource =? "scratchpad"
manageTerm = customFloating $ W.RationalRect l t w h -- and I'd like it fixed using the geometry below manageTerm = customFloating $ W.RationalRect l t w h
where where
-- reusing these variables is ok since they're confined to their own h = 0.9
-- where clauses w = 0.9
h = 0.9 -- height, 10% t = 0.95 -h
w = 0.9 -- width, 100% l = 0.95 -w
t = 0.95 -h -- bottom edge spawnCmus = myTerminal ++ " -n cmus 'cmus'"
l = 0.95 -w -- centered left/right findCmus = resource =? "cmus"
manageCmus = customFloating $ W.RationalRect l t w h
where
h = 0.9
w = 0.9
t = 0.95 -h
l = 0.95 -w

2
.zshrc
View File

@@ -117,3 +117,5 @@ alias rr='curl -s -L https://raw.githubusercontent.com/keroserene/rickrollrc/mas
# dotfile git alias # dotfile git alias
alias config='/usr/bin/git --git-dir=/home/dt/dotfiles --work-tree=/home/dt' alias config='/usr/bin/git --git-dir=/home/dt/dotfiles --work-tree=/home/dt'
zstyle ':completion:*' completer _expand_alias _complete _ignored