Created
August 21, 2025 10:38
-
-
Save mpickering/216b2fd4cd4c0f34695efd4d1b5610ca to your computer and use it in GitHub Desktop.
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:Fira Mono:pixelsize=14:antialias=true:hinting=true" | |
, borderColor = "black" | |
, border = TopB | |
, bgColor = "black" | |
, fgColor = "grey" | |
, position = TopW L 100 | |
, commands = [ Run Weather "EGGD" ["-t","<tempC>C","-L","18","-H","25","--normal","green","--high","red","--low","lightblue"] 36000 | |
, Run Network "eth0" ["-L","0","-H","32","--normal","green","--high","red"] 10 | |
, Run Network "eth1" ["-L","0","-H","32","--normal","green","--high","red"] 10 | |
, Run Cpu ["-L","3","-H","50","--normal","green","--high","red"] 10 | |
, Run Memory ["-t","Mem: <usedratio>%"] 10 | |
, Run Swap [] 10 | |
, Run Com "uname" ["-s","-r"] "" 36000 | |
, Run Date "%a %b %_d %Y %H:%M:%S" "date" 10 | |
, Run StdinReader | |
] | |
, sepChar = "%" | |
, alignSep = "}{" | |
, template = "%StdinReader% | %cpu% | %memory% * %swap% | %eth0% - %eth1% }{<fc=#ee9a00>%date%</fc> | %uname% | %EGGD% " | |
} | |
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 XMonad | |
import XMonad.Hooks.DynamicLog | |
import XMonad.Hooks.ManageDocks | |
import XMonad.Util.Run(spawnPipe) | |
import XMonad.Util.EZConfig(additionalKeys) | |
import System.IO | |
import XMonad.Util.Run | |
import XMonad.Actions.DynamicProjects | |
import XMonad.Actions.CycleRecentWS | |
import qualified Data.Map as M | |
import Data.IORef | |
import XMonad.Hooks.EwmhDesktops | |
main = do | |
xmproc <- spawnPipe "xmobar /home/matt/.xmobarrc" | |
xmonad $ ewmh $ dynamicProjects projects $ docks $ def | |
{ manageHook = manageDocks <+> manageHook defaultConfig | |
, layoutHook = avoidStruts $ layoutHook defaultConfig | |
, logHook = dynamicLogWithPP xmobarPP | |
{ ppOutput = hPutStrLn xmproc | |
, ppTitle = xmobarColor "green" "" . shorten 50 | |
, ppHidden = const "" | |
} | |
, terminal = "urxvt" | |
, keys = myKeys <+> keys def | |
} | |
myKeys conf@(XConfig {XMonad.modMask = modm}) | |
= M.fromList [((0, xK_Print), spawn "/home/matt/.xmonad/select-screenshot") | |
, ((modm, xK_space), switchProjectPrompt def) | |
, ((modm, xK_slash), shiftToProjectPrompt def) | |
, ((modm, xK_r), renameProjectPrompt def) | |
, ((modm, xK_n ), sendMessage NextLayout) | |
, ((modm, xK_Tab), cycleRecentWS [xK_Alt_L] xK_Tab xK_grave) | |
, ((modm, xK_1), switchProject webProj) ] | |
webProj = projects !! 0 | |
projects :: [Project] | |
projects = | |
[ Project { projectName = "web" | |
, projectDirectory = "~/" | |
, projectStartHook = Just $ do spawn "firefox" | |
}, | |
Project { projectName = "mail" | |
, projectDirectory = "~/" | |
, projectStartHook = Just $ do spawn "thunderbird" | |
}, | |
Project { projectName = "scratch" | |
, projectDirectory = "~/" | |
, projectStartHook = Just $ do spawn "urxvt" | |
} | |
] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment