diff options
-rw-r--r-- | lib/xmonad.hs | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/lib/xmonad.hs b/lib/xmonad.hs index ef6a072..4cab7e6 100644 --- a/lib/xmonad.hs +++ b/lib/xmonad.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE LambdaCase #-} {- Docs: @@ -11,6 +12,7 @@ Docs: -} +import Data.Functor ((<&>)) import Graphics.X11.ExtraTypes.XF86 import XMonad import XMonad.Actions.CopyWindow @@ -49,12 +51,13 @@ darkTheme = Colors } getColorsFromXtheme :: IO Colors -getColorsFromXtheme = do - x <- readFile "/home/ben/.local/share/xtheme" - return $ case filter (/= '\n') x of - "light" -> lightTheme - "dark" -> darkTheme - _ -> darkTheme +getColorsFromXtheme = + readFile "/home/ben/.local/share/xtheme" + <&> filter (/= '\n') + >>= \case + "light" -> return lightTheme + "dark" -> return darkTheme + _ -> return darkTheme nixBin :: String nixBin = "/home/ben/.nix-profile/bin/" @@ -125,15 +128,15 @@ myLayout theme = avoidStruts $ ||| Mirror twopane ||| emptyBSP ||| goldenSpiral - ||| Spiral L Dwindle.CW (3/2) (11/10) -- L means the non-main windows are put to the left. + ||| Spiral R Dwindle.CW (3/2) (11/10) -- L means the non-main windows are put to the left. where -- The last parameter is fraction to multiply the slave window heights -- with. Useless here. tiled = addSpace $ ResizableTall nmaster delta ratio [] - -- In this layout the second pane will only show the focused window. - twopane = addSpace $ TwoPane delta ratio -- The default number of windows in the master pane nmaster = 1 + -- In this layout the second pane will only show the focused window. + twopane = addSpace $ TwoPane delta ratio -- Default proportion of screen occupied by master pane ratio = 1/2 -- Percent of screen to increment by when resizing panes |