From bac32dfe100f4f205544b3824ee15c0fb5e8d023 Mon Sep 17 00:00:00 2001 From: Hektor Misplon Date: Sun, 4 Jun 2023 15:17:37 +0200 Subject: [PATCH] Shift to workspace based on window name --- .xmonad/xmonad.hs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.xmonad/xmonad.hs b/.xmonad/xmonad.hs index fbbdf48..e7826b6 100644 --- a/.xmonad/xmonad.hs +++ b/.xmonad/xmonad.hs @@ -102,6 +102,13 @@ myManageHook = className =? "flameshot" --> doRectFloat (W.RationalRect 0.1 0.1 0.8 0.8) ] +myDynamicManageHook :: ManageHook +myDynamicManageHook = + composeAll + [ + title =? "Zettelkasten — Firefox Developer Edition" --> doShift "1_sh" + ] + -- layoutHook myLayoutHook = showWName' myShowWNameConfig $ @@ -149,7 +156,7 @@ myConfig = startupHook = myStartupHook, manageHook = myManageHook <+> manageHook def, layoutHook = avoidStruts myLayoutHook, - handleEventHook = handleEventHook def <> Hacks.windowedFullscreenFixEventHook + handleEventHook = dynamicPropertyChange "WM_NAME" myDynamicManageHook <> handleEventHook def <> Hacks.windowedFullscreenFixEventHook } `removeKeysP` myRemoveKeysP `additionalKeysP` myKeysP