From 45b440b89aaff708a7192e09853b6d48cc4c1876 Mon Sep 17 00:00:00 2001 From: xero Date: Thu, 1 Jan 2015 20:16:54 -0500 Subject: herbstluftwm panel update to ram calc for free update --- herbstluftwm/.config/herbstluftwm/autostart | 2 +- herbstluftwm/.config/herbstluftwm/panel.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'herbstluftwm') diff --git a/herbstluftwm/.config/herbstluftwm/autostart b/herbstluftwm/.config/herbstluftwm/autostart index d639e93..7d512e2 100755 --- a/herbstluftwm/.config/herbstluftwm/autostart +++ b/herbstluftwm/.config/herbstluftwm/autostart @@ -134,7 +134,7 @@ hc set frame_bg_transparent 1 hc set frame_transparent_width 0 hc set frame_gap 8 -hc attr theme.active.color '#6A8C8C' +hc attr theme.active.color '#000000' #6A8C8C hc attr theme.normal.color '#222222' hc attr theme.urgent.color '#000000' hc attr theme.inner_width 0 diff --git a/herbstluftwm/.config/herbstluftwm/panel.sh b/herbstluftwm/.config/herbstluftwm/panel.sh index 0c325a8..bda262f 100755 --- a/herbstluftwm/.config/herbstluftwm/panel.sh +++ b/herbstluftwm/.config/herbstluftwm/panel.sh @@ -164,8 +164,8 @@ hc pad $monitor $panel_height cpu=`mpstat | awk '$3 ~ /CPU/ { for(i=1;i<=NF;i++) { if ($i ~ /%idle/) field=i } } $3 ~ /all/ { print 100 - $field }'` cpu="^fg($xicon)^i(/usr/share/icons/stlarch_icons/cpu1.xbm) ^fg($xtitle)cpu ^fg($xfg)$cpu^fg($xext)%" #memory - mem=`free -om | awk '/Mem:/ {print int(($3 - $7 - $6) / $2 * 100)}'` - mem="^fg($xicon)^i(/usr/share/icons/stlarch_icons/mem1.xbm) ^fg($xtitle)ram ^fg($xfg)$mem^fg($xext)%" + mem=`free | awk '/Mem:/ {print int($3/$2 * 100.0)}'` + mem="^fg($xicon)^i(/usr/share/icons/stlarch_icons/mem1.xbm) ^fg($xtitle)ram ^fg($xfg)$mem^fg($xext)%" #battery bat=`cat /sys/class/power_supply/BAT1/capacity` batstat=`cat /sys/class/power_supply/BAT1/status` -- cgit v1.2.1