From 80021afcb29332cfddbd8f7d24a107298064383c Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Tue, 22 Nov 2022 23:50:50 -0700 Subject: Remove Swallow. It does not work well and is counter-productive --- src/Rahm/Desktop/Swallow.hs | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 src/Rahm/Desktop/Swallow.hs (limited to 'src/Rahm') diff --git a/src/Rahm/Desktop/Swallow.hs b/src/Rahm/Desktop/Swallow.hs deleted file mode 100644 index 2674232..0000000 --- a/src/Rahm/Desktop/Swallow.hs +++ /dev/null @@ -1,34 +0,0 @@ -module Rahm.Desktop.Swallow - ( swallowHook, - setSwallowEnabled, - isSwallowEnabled, - toggleSwallowEnabled, - ) -where - -import Data.Monoid (All) -import XMonad -import XMonad.Hooks.WindowSwallowing -import XMonad.Util.ExtensibleState as XS - -data DisableSwallow = DisableSwallow Bool deriving (Show) - -swallowHook :: Event -> X All -swallowHook = swallowEventHook (className =? "Alacritty") $ - liftX $ do - (DisableSwallow disable) <- XS.get - return (not disable) - -isSwallowEnabled :: X Bool -isSwallowEnabled = do - (DisableSwallow b) <- XS.get - return (not b) - -setSwallowEnabled :: Bool -> X () -setSwallowEnabled enable = XS.modify $ const $ DisableSwallow $ not enable - -toggleSwallowEnabled :: X () -toggleSwallowEnabled = (setSwallowEnabled . not) =<< isSwallowEnabled - -instance ExtensionClass DisableSwallow where - initialValue = DisableSwallow True -- cgit