Created
September 14, 2012 21:09
-
-
Save EndangeredMassa/3724851 to your computer and use it in GitHub Desktop.
XMonad Config Files
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:Bitstream Vera Sans Mono:size=9:bold:antialias=true" | |
, bgColor = "#000000" | |
, fgColor = "grey" | |
, position = Static { xpos = 0 , ypos = 0, width = 1680, height = 16 } | |
, commands = [ Run Cpu ["-L","3","-H","50","--normal","green","--high","red"] 10 | |
, Run Network "eth0" ["-L","0","-H","70","--normal","green","--high","red"] 10 | |
, Run Memory ["-t","Mem: <usedratio>%"] 10 | |
, Run Com "~/.xmonad/scripts/cputemp.sh" [] "cpuTemp" 10 | |
, Run Date "%a %b %_d %l:%M" "date" 10 | |
, Run Com "~/.xmonad/scripts/volume.sh" [] "volume" 10 | |
, Run StdinReader | |
] | |
, sepChar = "%" | |
, alignSep = "}{" | |
, template = " %StdinReader%}{ <fc=grey>%cpu% </fc> <fc=red>%cpuTemp%</fc>°C<fc=grey> ~ %memory% ~ %eth0%</fc> ~ <fc=#ee9a00>%date%</fc> ~ Vol: <fc=green>%volume%</fc> " | |
} |
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
#!/bin/bash | |
temp1=`cat /sys/devices/platform/coretemp.0/temp2_input` | |
echo `expr $temp1 / 1000` |
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
#!/bin/bash | |
str=`amixer sget Master` | |
str1=${str#Simple*\[} | |
v1=${str1%%]*]} | |
echo $v1 |
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.Layout.Spacing | |
import XMonad.Hooks.DynamicLog | |
import XMonad.Hooks.ManageDocks | |
import XMonad.Util.Run | |
import System.IO | |
import System.Process | |
import XMonad.Hooks.FadeInactive | |
myLogHook :: X () | |
myLogHook = fadeInactiveLogHook fadeAmount | |
where fadeAmount = 0.5 | |
startup = do | |
spawn "feh --bg-scale ~/Pictures/blue.jpg" | |
spawn "nm-applet &" | |
spawn "trayer --edge top --align right --SetDockType true --SetPartialStrut true --expand true --width 1 --height 12 --transparent true --tint 0x000000 &" | |
myLayout = avoidStruts (tiled ||| Mirror tiled ||| Full) | |
where | |
-- default tiling algorithm partitions the screen into two panes | |
tiled = spacing 14 $ Tall nmaster delta ratio | |
-- The default number of windows in the master pane | |
nmaster = 1 | |
-- Default proportion of screen occupied by master pane | |
ratio = 2/3 | |
-- Percent of screen to increment by when resizing panes | |
delta = 5/100 | |
-- Define amount and names of workspaces | |
myWorkspaces = ["1:main","2:chat","3:misc"] | |
main = do | |
xmproc <- spawnPipe "/usr/bin/xmobar ~/.xmonad/.xmobarrc" | |
xmonad $ defaultConfig | |
{ borderWidth = 0 | |
, manageHook = manageDocks <+> manageHook defaultConfig | |
, logHook = do | |
myLogHook | |
dynamicLogWithPP xmobarPP | |
{ ppOutput = hPutStrLn xmproc | |
, ppTitle = xmobarColor "blue" "" . shorten 50 | |
, ppLayout = const "" -- to disable the layout info on xmobar | |
} | |
, layoutHook = myLayout | |
, workspaces = myWorkspaces | |
, startupHook = startup | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment