diff options
| author | la-ninpre <leobrekalini@gmail.com> | 2021-09-29 23:33:14 +0300 |
|---|---|---|
| committer | la-ninpre <leobrekalini@gmail.com> | 2021-09-29 23:33:14 +0300 |
| commit | b2a08c034c2f1f2e96f70a607e01e035c8021470 (patch) | |
| tree | 42fe5904574b7c2dcbb28aaf9ce8374ea27d446e | |
| parent | 06dc0307fb49ff82b51de1f631304338a2a2b344 (diff) | |
| download | xmonad-config-b2a08c034c2f1f2e96f70a607e01e035c8021470.tar.gz xmonad-config-b2a08c034c2f1f2e96f70a607e01e035c8021470.zip | |
minor refactoring
| -rw-r--r-- | lib/LaNinpreConfig.hs | 2 | ||||
| -rw-r--r-- | xmonad.hs | 35 |
2 files changed, 12 insertions, 25 deletions
diff --git a/lib/LaNinpreConfig.hs b/lib/LaNinpreConfig.hs index 9be4f74..2d85c91 100644 --- a/lib/LaNinpreConfig.hs +++ b/lib/LaNinpreConfig.hs @@ -94,7 +94,7 @@ fontXft :: String -- ^ font family fontXft font style size = intercalate ":" [ "xft" , font , style - , "size=" ++ (show size) + , "size=" ++ show size , "antialias=true" , "hinting=true" ] @@ -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 |
