diff options
author | toni <toni@devlap.local> | 2014-10-13 16:00:57 +0200 |
---|---|---|
committer | toni <toni@devlap.local> | 2014-10-13 16:00:57 +0200 |
commit | 6143e0b310f2b7ec00fae78fd57134826339cbb0 (patch) | |
tree | 1fa98bedf0e915cb12161ea11e6600eae3d0e1bf /configs | |
parent | a3550702293b2965683f7379ea9232526f666b61 (diff) |
added msi xmobar stuff
Diffstat (limited to 'configs')
-rwxr-xr-x | configs/xmobar_bat_msi.sh | 14 | ||||
-rwxr-xr-x | configs/xmobar_cputemp_msi.sh | 18 | ||||
-rw-r--r-- | configs/xmobarrc_msi | 21 |
3 files changed, 53 insertions, 0 deletions
diff --git a/configs/xmobar_bat_msi.sh b/configs/xmobar_bat_msi.sh new file mode 100755 index 0000000..9bb413f --- /dev/null +++ b/configs/xmobar_bat_msi.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +echo -n "BAT:" +OUT=$(acpi -b | sed -n 's/Battery 0:\(.*\), \(.*\)%\(.*\)/\2/p') + +if [ $OUT -lt 80 ]; then + echo "<fc=#00FF00>$OUT</fc>%" +elif [ $OUT -lt 50 ]; then + echo "<fc=#FFFF00>$OUT</fc>%" +elif [ $OUT -lt 10 ]; then + echo "<fc=#FF0000>$OUT</fc>%" +else + echo "$OUT%" +fi diff --git a/configs/xmobar_cputemp_msi.sh b/configs/xmobar_cputemp_msi.sh new file mode 100755 index 0000000..45c9bc0 --- /dev/null +++ b/configs/xmobar_cputemp_msi.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +if [ "x$1" = "xCPU" ]; then + TYP="CPU" + OUT=$(sensors | sed -n 's/^Core 0:\s*+\(.*\).0°C\s*(\(.*\)/\1/p') +elif [ "x$1" = "xMB" ]; then + TYP="MB" + OUT=$(sensors | sed -n 's/^temp3:\s*+\(.*\).0°C\s*(\(.*\)/\1/p') +fi + +if [ $OUT -gt 70 ]; then + echo "$TYP: <fc=#FF0000>$OUT</fc>°C" +elif [ $OUT -gt 60 ]; then + echo "$TYP: <fc=#FFFF00>$OUT</fc>°C" +else + echo "$TYP: <fc=#00FF00>$OUT</fc>°C" +fi +exit $? diff --git a/configs/xmobarrc_msi b/configs/xmobarrc_msi new file mode 100644 index 0000000..2ac3ce5 --- /dev/null +++ b/configs/xmobarrc_msi @@ -0,0 +1,21 @@ +Config { font = "-misc-fixed-*-*-*-*-18-*-*-*-*-*-*-*" + , bgColor = "black" + , border = NoBorder + , borderColor = "black" + , fgColor = "grey" + , position = TopW L 100 + , commands = [ Run Com "~/.xmobar_cputemp.sh" ["CPU"] "ctmp" 100 + , Run Com "~/.xmobar_cputemp.sh" ["MB"] "mtmp" 100 + , Run Com "~/.xmobar_bat.sh" ["BAT"] "bat" 100 + , Run Network "eth0" ["-L","0","-H","32","--normal","green","--high","red"] 20 + , Run Network "wlan0" ["-L","0","-H","32","--normal","green","--high","red"] 20 + , Run Cpu ["-L","15","-H","50","--normal","green","--high","red"] 20 + , Run Memory ["Mem: %"] 200 + , Run Swap [] 200 + , Run Date "%a %b (%V) %_d %Y %H:%M:%S" "date" 20 + , Run StdinReader + ] + , sepChar = "%" + , alignSep = "}{" + , template = "%StdinReader% }{ %ctmp% %mtmp% | %cpu% | %bat% | %memory% | %eth0% | %wlan0% | %date%" + } |