Last active
May 5, 2022 22:26
-
-
Save macizomedia/1416fa4061d794257397c2a427770e53 to your computer and use it in GitHub Desktop.
xmonad setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Config | |
| { font = "xft:Liberation Mono-8:regular", | |
| bgColor = "#323232", | |
| fgColor = "#EEEEEC", | |
| position = Static {xpos = 0, ypos = 0, width = 1920, height = 21}, | |
| lowerOnStart = True, | |
| commands = | |
| [ Run Network "wlan0" ["-L", "0", "-H", "32", "--normal", "#8ae234", "--high", "red"] 10, | |
| Run Network "ppp0" ["-L", "0", "-H", "32", "--normal", "#8ae234", "--high", "red"] 10, | |
| Run Network "eth1" ["-L", "0", "-H", "100", "--normal", "#8ae234", "--high", "red"] 10, | |
| Run Cpu ["-L", "3", "-H", "50", "--normal", "#8ae234", "--high", "red", "-t", "<bar>"] 10, | |
| --, Run Memory ["-t","Mem: <usedratio>%"] 10 | |
| --, Run Swap [] 10 | |
| Run Battery ["-L", "10", "-H", "90", "--low", "red", "--normal", "#8ae234", "--high", "#729fcf", "-t", "BAT: <left>"] 100, | |
| Run Date "%a %d.%m %H:%M" "date" 10, | |
| Run StdinReader | |
| ], | |
| sepChar = "%", | |
| alignSep = "}{", | |
| template = "%StdinReader% }{| %cpu% | %wlan0% <fc=lightblue>|</fc> %battery% | <fc=#34e2e2>%date%</fc>" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import qualified Data.Map as M | |
| import XMonad | |
| import XMonad.Config.Desktop | |
| import XMonad.Hooks.DynamicLog | |
| import XMonad.Hooks.ManageDocks | |
| import XMonad.Layout.Decoration | |
| import XMonad.Layout.LayoutModifier (ModifiedLayout) | |
| import XMonad.Layout.NoBorders | |
| import XMonad.Layout.Renamed | |
| import XMonad.Layout.ResizableTile | |
| import XMonad.Layout.Spacing | |
| import XMonad.Layout.Spiral | |
| import XMonad.Layout.Tabbed | |
| import XMonad.Layout.ThreeColumns | |
| import qualified XMonad.StackSet as W | |
| import XMonad.Util.EZConfig (additionalKeys) | |
| import XMonad.Util.Run | |
| myWorkspaces = ["α", "β", "γ", "δ", "ε", "ζ", "η", "θ", "ι", "κ"] | |
| mySpacing :: Integer -> l a -> ModifiedLayout Spacing l a | |
| mySpacing i = spacingRaw False (Border 0 i 0 i) True (Border i 0 i 0) True | |
| tall = | |
| renamed [Replace "Tall"] $ | |
| mySpacing 90 $ | |
| ResizableTall 1 (3 / 100) (1 / 2) [] | |
| wide = | |
| renamed [Replace "Wide"] $ | |
| mySpacing 65 $ | |
| Mirror (Tall 1 (3 / 100) (1 / 2)) | |
| full = | |
| renamed [Replace "Full"] $ | |
| mySpacing | |
| 0 | |
| Full | |
| myLayout = | |
| smartBorders myDefaultLayout | |
| where | |
| myDefaultLayout = | |
| avoidStruts | |
| ( tall | |
| ||| tabbed shrinkText tabConfig | |
| ||| full | |
| ||| wide | |
| ||| spiral (6 / 7) | |
| ) | |
| ||| ThreeColMid 1 (3 / 100) (1 / 2) | |
| tabConfig = | |
| def | |
| { activeBorderColor = "#7C7C7C", | |
| activeTextColor = "#CEFFAC", | |
| activeColor = "#000000", | |
| inactiveBorderColor = "#7C7C7C", | |
| inactiveTextColor = "#EEEEEE", | |
| inactiveColor = "#000000" | |
| } | |
| myLogHook xmproc = | |
| dynamicLogWithPP $ | |
| xmobarPP | |
| { ppOutput = hPutStrLn xmproc, | |
| ppCurrent = xmobarColor "lightblue" "#282828" . wrap "[" "]", | |
| ppHiddenNoWindows = xmobarColor "#777777" "" . noScratchPad, | |
| ppHidden = noScratchPad, | |
| ppTitle = xmobarColor "lightgreen" "" . shorten 80, | |
| ppSep = " | " | |
| } | |
| where | |
| noScratchPad ws = if ws == "NSP" then "" else ws | |
| main = do | |
| xmproc <- spawnPipe "/usr/bin/xmobar /home/mmcs/.xmonad/xmobarrc" | |
| xmonad $ | |
| docks | |
| def | |
| { terminal = "alacritty", | |
| workspaces = myWorkspaces, | |
| layoutHook = avoidStruts $ smartBorders myLayout, | |
| normalBorderColor = "#D3D7CF", | |
| focusedBorderColor = "#729FCF", | |
| logHook = myLogHook xmproc | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment