Created
February 23, 2014 13:49
-
-
Save tamasmajor/9171733 to your computer and use it in GitHub Desktop.
This file contains 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:Roboto-11:Light" | |
, bgColor = "black" | |
, fgColor = "grey" | |
, position = Top | |
, commands = [ Run Weather "LHUD" ["-t"," <tempC>°C","-L","64","-H","77","--normal","green","--high","red","--low","lightblue"] 3600 | |
, Run Cpu ["-L","3","-H","50","--normal","green","--high","red"] 10 | |
, Run Memory ["-t","Mem: <usedratio>%"] 10 | |
, Run Network "eth0" ["-L","0","-H","32","--normal","green","--high","red"] 10 | |
, Run Swap [] 10 | |
, Run Date "%a %b %_d %l:%M" "date" 10 | |
, Run StdinReader | |
] | |
, sepChar = "%" | |
, alignSep = "}{" | |
, template = "%StdinReader% }{ %cpu% | %memory% | %eth0% | <fc=#ee9a00>%date%</fc> | %LHUD% " | |
} |
This file contains 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 Graphics.X11.ExtraTypes.XF86 | |
import System.IO | |
import XMonad.Actions.Volume | |
import Data.Map (fromList) | |
import Data.Monoid (mappend) | |
main = do | |
xmproc <- spawnPipe "/usr/bin/xmobar ~/.xmobarrc" | |
xmonad $ defaultConfig | |
{ keys = | |
keys defaultConfig `mappend` | |
\c -> fromList [ | |
((0, xK_F9), lowerVolume 4 >> return ()), | |
((0, xK_F10), raiseVolume 4 >> return ()) | |
] | |
, manageHook = manageDocks <+> manageHook defaultConfig | |
, layoutHook = avoidStruts $ layoutHook defaultConfig | |
, logHook = dynamicLogWithPP xmobarPP | |
{ ppOutput = hPutStrLn xmproc | |
, ppTitle = xmobarColor "green" "" . shorten 50 | |
} | |
, modMask = mod4Mask -- Rebind Mod to the Windows key | |
} `additionalKeys` | |
[ ((mod4Mask .|. shiftMask, xK_z), spawn "xscreensaver-command -lock") | |
, ((controlMask, xK_Print), spawn "sleep 0.2; scrot -s") | |
, ((0, xK_Print), spawn "scrot") | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment