Add folds for hooks

master
Hektor Misplon 2024-03-30 16:26:32 +01:00
parent f98b19f0b1
commit 09812befdc
Signed by: hektor
GPG Key ID: 5151AF79E723F21C
1 changed files with 10 additions and 4 deletions

View File

@ -67,12 +67,13 @@ shiftAndView = doF . liftM2 (.) W.greedyView W.shift
-- Hooks {{{ -- Hooks {{{
-- startupHook -- startupHook {{{
myStartupHook = myStartupHook =
do do
spawn "killall polybar && polybar -r" spawn "killall polybar && polybar -r"
-- }}}
-- manageHook -- manageHook {{{
myManageHook :: ManageHook myManageHook :: ManageHook
myManageHook = myManageHook =
composeAll composeAll
@ -94,15 +95,17 @@ myManageHook =
className =? "KeePassXC" --> doRectFloat (W.RationalRect 0.1 0.1 0.8 0.8), className =? "KeePassXC" --> doRectFloat (W.RationalRect 0.1 0.1 0.8 0.8),
className =? "flameshot" --> doRectFloat (W.RationalRect 0.1 0.1 0.8 0.8) className =? "flameshot" --> doRectFloat (W.RationalRect 0.1 0.1 0.8 0.8)
] ]
-- }}}
-- dynamicManageHook {{{
myDynamicManageHook :: ManageHook myDynamicManageHook :: ManageHook
myDynamicManageHook = myDynamicManageHook =
composeAll composeAll
[ [
title =? "Zettelkasten — Firefox Developer Edition" --> doShift "1_sh" title =? "Zettelkasten — Firefox Developer Edition" --> doShift "1_sh"
] ]
-- }}}
-- TODO: Replace showWName by dunst notification
myShowWNameConfig :: SWNConfig myShowWNameConfig :: SWNConfig
myShowWNameConfig = myShowWNameConfig =
def def
@ -112,7 +115,7 @@ myShowWNameConfig =
swn_bgcolor = "#cccccc" swn_bgcolor = "#cccccc"
} }
-- layoutHook -- layoutHook {{{
myLayoutHook = myLayoutHook =
showWName' myShowWNameConfig $ showWName' myShowWNameConfig $
ifWider smallWidth ( ifWider smallWidth (
@ -134,11 +137,14 @@ myLayoutHook =
nmaster = 1 nmaster = 1
ratio = 1 / 2 ratio = 1 / 2
delta = 4 / 100 delta = 4 / 100
-- }}}
-- handleEventHook {{{
myHandleEventHook = myHandleEventHook =
onXPropertyChange "WM_NAME" myDynamicManageHook onXPropertyChange "WM_NAME" myDynamicManageHook
<> handleEventHook def <> handleEventHook def
<> Hacks.windowedFullscreenFixEventHook <> Hacks.windowedFullscreenFixEventHook
-- }}}
-- }}} -- }}}