summaryrefslogtreecommitdiff
path: root/lib/xmonad.hs
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2020-04-04 19:30:44 -0700
committerBen Sima <ben@bsima.me>2020-04-04 19:30:44 -0700
commit907d14bb1d911c0e575bf2e864ef20338d82beae (patch)
tree64daf596334606bcbb14f684d8ee1c4e279a74e0 /lib/xmonad.hs
parentf7876dd831587ee999d52cc419d8446f9869ab09 (diff)
Just some cleanup refactoring
Diffstat (limited to 'lib/xmonad.hs')
-rw-r--r--lib/xmonad.hs21
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