From ff614fe40888d2afbcbffc0b471d841750d77dab Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Tue, 24 Jul 2018 10:44:07 +0200 Subject: Hide borders in custom scratchpad placements Host-dependency continues to leak, thinking about isolation possibilities --- gui/conf/xmonad.hs | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'gui') diff --git a/gui/conf/xmonad.hs b/gui/conf/xmonad.hs index f7865c4..4a25938 100644 --- a/gui/conf/xmonad.hs +++ b/gui/conf/xmonad.hs @@ -68,14 +68,15 @@ dropDownLarge = floatRectTop $ 18/20 sideBarLeft = floatRectLeft $ 1/3 sideBarRight = floatRectRight $ 1/3 -scratchpads = [ NS "terminal" "kitty --class=scratchterm" (className =? "scratchterm") - (customFloating dropDown) - , NS "browser" "firefox" (className =? "Firefox") - (customFloating dropDownLarge) - , NS "documentation" "zeal" (className =? "Zeal") - (customFloating dropDown) - , NS "messaging" "telegram-desktop" (className =? "TelegramDesktop") - (customFloating sideBarRight) ] +scratchpads host = + [ NS "terminal" "kitty --class=scratchterm" (className =? "scratchterm") + (customFloating $ hideScreenBorder host dropDown) + , NS "browser" "firefox" (className =? "Firefox") + (customFloating $ hideScreenBorder host dropDownLarge) + , NS "documentation" "zeal" (className =? "Zeal") + (customFloating $ hideScreenBorder host dropDown) + , NS "messaging" "telegram-desktop" (className =? "TelegramDesktop") + (customFloating $ hideScreenBorder host sideBarRight) ] hostSpecificKeybindings host = case host of "asterix" -> [ ("M-i b" , showNotification "Battery" @@ -110,9 +111,9 @@ commonKeybindings host = , ("M-a" , gotoMenuConfig windowBringerDmenuConfig) , ("M-S-a" , bringMenuConfig windowBringerDmenuConfig) -- scratchpads - , ("M-b" , namedScratchpadAction scratchpads "browser") - , ("M-d" , namedScratchpadAction scratchpads "documentation") - , ("M-m" , namedScratchpadAction scratchpads "messaging") ] ++ + , ("M-b" , namedScratchpadAction (scratchpads host) "browser") + , ("M-d" , namedScratchpadAction (scratchpads host) "documentation") + , ("M-m" , namedScratchpadAction (scratchpads host) "messaging") ] ++ -- workspace selection [ (p ++ [k] , windows $ f i) | (i, k) <- zip Main.workspaces ['1' .. '9'] , (p, f) <- [ ("M-" , greedyView) @@ -157,11 +158,11 @@ customEventHook = do handleEventHook def fullscreenEventHook -customManageHook = composeOne +customManageHook host = composeOne [ hasRole "GtkFileChooserDialog" -?> doRectFloat dropDown , isDialog -?> doCenterFloat , transience - , pure True -?> insertPosition Below Newer <+> namedScratchpadManageHook scratchpads ] + , pure True -?> insertPosition Below Newer <+> namedScratchpadManageHook (scratchpads host) ] where hasRole x = stringProperty "WM_WINDOW_ROLE" =? x @@ -181,11 +182,11 @@ main = do , mouseBindings = customMousebindings , startupHook = return () >> checkKeymap def (customKeybindings host) , handleEventHook = customEventHook - , manageHook = customManageHook + , manageHook = customManageHook host , logHook = customLogHook , layoutHook = availableLayouts } `additionalKeys` - [ ((noModMask, xK_Menu) , namedScratchpadAction scratchpads "terminal") ] + [ ((noModMask, xK_Menu) , namedScratchpadAction (scratchpads host) "terminal") ] nonEmptyWS = WSIs $ return (\w -> nonNSP w && nonEmpty w) where nonNSP (Workspace tag _ _) = tag /= "NSP" -- cgit v1.2.3