about summary refs log tree commit diff
path: root/src/XMonad/Actions/PerConditionKeys.hs
diff options
context:
space:
mode:
authorAzat Bahawi <azahi@teknik.io>2020-11-20 23:13:14 +0300
committerAzat Bahawi <azahi@teknik.io>2020-11-20 23:13:14 +0300
commit4181e8c47883dc456db4310f42212262d5a8ad1a (patch)
tree5c4f279b290b2cd8a2ac14488bfa2e7b7df12c85 /src/XMonad/Actions/PerConditionKeys.hs
parentSync submodules (diff)
bump dependencies + brittany/cabal-fmt
Diffstat (limited to '')
-rw-r--r--src/XMonad/Actions/PerConditionKeys.hs24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/XMonad/Actions/PerConditionKeys.hs b/src/XMonad/Actions/PerConditionKeys.hs
index b84b942..09372cd 100644
--- a/src/XMonad/Actions/PerConditionKeys.hs
+++ b/src/XMonad/Actions/PerConditionKeys.hs
@@ -8,25 +8,27 @@
 --
 
 module XMonad.Actions.PerConditionKeys
-    ( XCond(..)
-    , chooseAction
-    , bindOn
-    ) where
+  ( XCond(..)
+  , chooseAction
+  , bindOn
+  ) where
 
 import           Data.List
 import           XMonad
-import qualified XMonad.StackSet as S
+import qualified XMonad.StackSet               as S
 
 data XCond = WS | LD
 
 chooseAction :: XCond -> (String -> X ()) -> X ()
 chooseAction WS f = withWindowSet (f . S.currentTag)
-chooseAction LD f = withWindowSet (f . description . S.layout . S.workspace . S.current)
+chooseAction LD f =
+  withWindowSet (f . description . S.layout . S.workspace . S.current)
 
 bindOn :: XCond -> [(String, X ())] -> X ()
 bindOn xc bindings = chooseAction xc chooser
-    where chooser x = case find ((x ==) . fst) bindings of
-                           Just (_, action) -> action
-                           Nothing          -> case find (("" ==) . fst) bindings of
-                                                    Just (_, action) -> action
-                                                    Nothing          -> return ()
+ where
+  chooser x = case find ((x ==) . fst) bindings of
+    Just (_, action) -> action
+    Nothing          -> case find (("" ==) . fst) bindings of
+      Just (_, action) -> action
+      Nothing          -> return ()

Consider giving Nix/NixOS a try! <3