Skip to content

Instantly share code, notes, and snippets.

@EndangeredMassa
Created September 14, 2012 21:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EndangeredMassa/3724851 to your computer and use it in GitHub Desktop.
Save EndangeredMassa/3724851 to your computer and use it in GitHub Desktop.
XMonad Config Files
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> "
}
#!/bin/bash
temp1=`cat /sys/devices/platform/coretemp.0/temp2_input`
echo `expr $temp1 / 1000`
#!/bin/bash
str=`amixer sget Master`
str1=${str#Simple*\[}
v1=${str1%%]*]}
echo $v1
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