aboutsummaryrefslogtreecommitdiffstats
path: root/xmonad.hs
diff options
context:
space:
mode:
authorla-ninpre <leobrekalini@gmail.com>2021-09-29 23:33:14 +0300
committerla-ninpre <leobrekalini@gmail.com>2021-09-29 23:33:14 +0300
commitb2a08c034c2f1f2e96f70a607e01e035c8021470 (patch)
tree42fe5904574b7c2dcbb28aaf9ce8374ea27d446e /xmonad.hs
parent06dc0307fb49ff82b51de1f631304338a2a2b344 (diff)
downloadxmonad-config-b2a08c034c2f1f2e96f70a607e01e035c8021470.tar.gz
xmonad-config-b2a08c034c2f1f2e96f70a607e01e035c8021470.zip
minor refactoring
Diffstat (limited to 'xmonad.hs')
-rw-r--r--xmonad.hs35
1 files changed, 11 insertions, 24 deletions
diff --git a/xmonad.hs b/xmonad.hs
index 09329a7..a5d304b 100644
--- a/xmonad.hs
+++ b/xmonad.hs
@@ -18,9 +18,8 @@ import System.IO (hPutStrLn)
import System.Exit (exitSuccess)
import Data.Char (isSpace, toUpper)
-import Data.Maybe (fromJust)
+import Data.Maybe (fromJust, isJust)
import Data.Monoid
-import Data.Maybe (isJust)
import Data.Tree
import Data.List
import qualified Data.Map as M
@@ -120,18 +119,6 @@ myWindowCountLogger :: Logger
myWindowCountLogger = gets $ Just . show . length . W.integrate' . W.stack
. W.workspace . W.current . windowset
-myTestLogger :: Logger
-myTestLogger = gets $ Just . xmobarColor (myColor "yellow") "" . intercalate " "
- . \s -> ( let w = windowset $ s
- ws = map W.workspace (W.current w : W.visible w) ++ W.hidden w
- t = map (wrap "<fn=3>" "</fn>") . map W.tag $ ws
- l = map length
- . map W.integrate'
- . map W.stack $ ws
- in zipWith (++) t $ map mySuperscript l
- )
-
-
-- * grid select
--
-- $gridSelect
@@ -163,7 +150,7 @@ myGridConfig colorizer = (buildDefaultGSConfig myColorizer)
, gs_cellpadding = 6
, gs_originFractX = 0.5
, gs_originFractY = 0.5
- , gs_font = (myFonts !! 0)
+ , gs_font = head myFonts
}
-- | spawn selected programs with grid select
@@ -175,7 +162,7 @@ spawnSelected' lst = gridselect conf lst >>= flip whenJust spawn
, gs_cellpadding = 6
, gs_originFractX = 0.5
, gs_originFractY = 0.5
- , gs_font = (myFonts !! 0)
+ , gs_font = head myFonts
}
-- * layouts
@@ -217,7 +204,7 @@ tall = renamed [Replace "tall"]
floats = renamed [Replace "floats"]
$ smartBorders
$ limitWindows 20
- $ simplestFloat
+ simplestFloat
threeCol = renamed [Replace "threeCol"]
$ smartBorders
@@ -229,7 +216,7 @@ threeCol = renamed [Replace "threeCol"]
-- | setting colors for tabs layout and tabs sublayout.
myTabTheme = def
- { fontName = (myFonts !! 0)
+ { fontName = head myFonts
, activeColor = myColor "gray4"
, inactiveColor = myColor "gray0"
, activeBorderColor = myColor "gray4"
@@ -260,7 +247,7 @@ myLayoutHook = avoidStruts
-- when you change workspaces.
myShowWNameTheme :: SWNConfig
myShowWNameTheme = def
- { swn_font = (myFonts !! 1)
+ { swn_font = myFonts !! 1
, swn_fade = 0.7
, swn_bgcolor = myColor "bg"
, swn_color = myColor "fg"
@@ -275,7 +262,7 @@ myShowWNameTheme = def
-- actual workspace list is in "LaNinpreConfig".
-- | workspace indices to use with hotkeys
-myWorkspaceIndices = M.fromList $ zipWith (,) myWorkspaces [1..]
+myWorkspaceIndices = M.fromList $ zip myWorkspaces [1..]
-- ** clickable workspace wrapper
--
@@ -319,9 +306,9 @@ myKeys =
, ("M-p h", spawn "dm-hub") -- hub of all scripts to choose one
-- Useful programs to have a keybinding for launch
- , ("M-<Return>", spawn (myTerminal))
- , ("M-e", spawn (myFileMgr))
- , ("M-w", spawn (myBrowser))
+ , ("M-<Return>", spawn myTerminal)
+ , ("M-e", spawn myFileMgr)
+ , ("M-w", spawn myBrowser)
, ("M-i", spawn (myTerminal
++ " --class alacritty,amfora -e "
++ myGeminiClient))
@@ -449,7 +436,7 @@ main = do
, modMask = myModMask
, terminal = myTerminal
, startupHook = myStartupHook
- , layoutHook = showWName' myShowWNameTheme $ myLayoutHook
+ , layoutHook = showWName' myShowWNameTheme myLayoutHook
, workspaces = myWorkspaces
, borderWidth = myBorderWidth
, normalBorderColor = myNormColor