aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortoni <matzeton@googlemail.com>2017-01-27 00:42:05 +0100
committertoni <matzeton@googlemail.com>2017-01-27 00:42:05 +0100
commit7fabe28b9f468f6bc5ca286e14ea94f4173a0a8a (patch)
treea032c033aaabdce5fce5e0ca372f9880153eadb3
parentc1d5f7df946feaba653db4c4326f04c4282ca6d9 (diff)
xmobar net position, cputemp.sh color fix
-rwxr-xr-xconfigs/xmobar_cputemp.sh14
-rw-r--r--configs/xmobarrc20
2 files changed, 18 insertions, 16 deletions
diff --git a/configs/xmobar_cputemp.sh b/configs/xmobar_cputemp.sh
index 8af1b47..05f9f19 100755
--- a/configs/xmobar_cputemp.sh
+++ b/configs/xmobar_cputemp.sh
@@ -1,19 +1,19 @@
#!/bin/sh
if [ "x$1" = "xCPU" ]; then
- OUT=$(sensors | sed -n 's/^CPU Temperature:\s*+\(.*\)°C\s*(\(.*\)/\1/p')
+ OUT=$(sensors | sed -n 's/^CPU Temperature:\s*+\(.*\)\..*°C\s*(\(.*\)/\1/p')
elif [ "x$1" = "xMB" ]; then
- OUT=$(sensors | sed -n 's/^MB Temperature:\s*+\(.*\)°C\s*(\(.*\)/\1/p')
+ OUT=$(sensors | sed -n 's/^MB Temperature:\s*+\(.*\)\..*°C\s*(\(.*\)/\1/p')
else
exit 1
fi
-if [ $OUT -ge 60 ]; then
+if [ $OUT -le 60 ]; then
+ echo "$OUT°C"
+elif [ $OUT -le 75 ]; then
echo "<fc=#00FF00>$OUT</fc>°C"
-elif [ $OUT -ge 67 ]; then
+elif [ $OUT -le 85 ]; then
echo "<fc=#FFFF00>$OUT</fc>°C"
-elif [ $OUT -ge 75 ]; then
- echo "<fc=#FF0000>$OUT</fc>°C"
else
- echo "$OUT°C"
+ echo "<fc=#FF0000>$OUT</fc>°C"
fi
diff --git a/configs/xmobarrc b/configs/xmobarrc
index 59759db..58cafdc 100644
--- a/configs/xmobarrc
+++ b/configs/xmobarrc
@@ -4,14 +4,16 @@ Config { font = "-misc-fixed-*-*-*-*-18-*-*-*-*-*-*-*"
, borderColor = "black"
, fgColor = "grey"
, position = TopW L 100
- , commands = [ Run Com "~/.xmobar_hddusage.sh read" ["IO_R"] "ior" 10
- , Run Com "~/.xmobar_hddusage.sh write" ["IO_W"] "iow" 10
- , Run Com "~/.xmobar_gputemp.sh" ["GPU"] "gtmp" 100
- , Run Com "~/.xmobar_gputemp.sh mem" ["GPU"] "gmem" 100
- , Run Com "~/.xmobar_cputemp.sh" ["CPU"] "ctmp" 100
- , Run Com "~/.xmobar_cputemp.sh" ["MB"] "mtmp" 100
- , Run Network "eth0" ["-L","0","-H","32","--normal","green","--high","red"] 10
- , Run Network "eth1" ["-L","0","-H","32","--normal","green","--high","red"] 10
+ , commands = [
+ Run Com "./.xmobar_hddusage.sh" ["sda","read"] "sdar" 10
+ , Run Com "./.xmobar_hddusage.sh" ["sda","write"] "sdaw" 10
+ , Run Com "./.xmobar_hddusage.sh" ["sdb","read"] "sdbr" 10
+ , Run Com "./.xmobar_hddusage.sh" ["sdb","write"] "sdbw" 10
+ , Run Com "./.xmobar_gputemp.sh" ["GPU"] "gtmp" 100
+ , Run Com "./.xmobar_gputemp.sh" ["MEM"] "gmem" 100
+ , Run Com "./.xmobar_cputemp.sh" ["CPU"] "ctmp" 100
+ , Run Com "./.xmobar_cputemp.sh" ["MB"] "mtmp" 100
+ , Run Network "br0" ["-L","0","-H","32","--normal","green","--high","red"] 10
, Run Cpu ["-L","15","-H","50","--normal","green","--high","red"] 20
, Run Memory ["Mem: %"] 200
, Run Swap [] 200
@@ -20,5 +22,5 @@ Config { font = "-misc-fixed-*-*-*-*-18-*-*-*-*-*-*-*"
]
, sepChar = "%"
, alignSep = "}{"
- , template = "%StdinReader% }{ ioR: %ior% | ioW: %iow% | GPU: %gtmp% %gmem% | CPU: %ctmp% | MB: %mtmp% | %cpu% | %memory% | %eth0% | %eth1% | %date%"
+ , template = "%StdinReader% }{ %br0% | SDA: %sdar%/%sdaw% | SDB: %sdbr%/%sdbw% | %gtmp%%gmem% | CPU: %ctmp% | MB: %mtmp% | %cpu% | %memory% | %date%"
}