Browse Source

cpu load indicator fixed

master
Ivan Polyakov 2 years ago
parent
commit
3c443195d1
  1. 10
      .xinitrc

10
.xinitrc

@ -2,13 +2,11 @@
setxkbmap -option 'grp:alt_shift_toggle' -option 'caps:swapescape' 'dvorak,ru' setxkbmap -option 'grp:alt_shift_toggle' -option 'caps:swapescape' 'dvorak,ru'
while true; do while true; do
XROOTNAME=$(cat <<-END XROOTNAME="RAM: $(free -m | grep '^Mem' | awk '{print $3"MB"}') |"
RAM: $(free -m | grep '^Mem' | awk '{print $3"MB"}') | XROOTNAME="$XROOTNAME CPU: $(mpstat | awk '$13 ~ /[0-9.]+/ { print 100 - $13"%" }') |"
CPU: $(mpstat | awk '$12 ~ /[0-9.]+/ { print 100 - $12"%" }') | XROOTNAME="$XROOTNAME $(date +"%F %R")"
$( date +"%F %R" )
END
)
xsetroot -name "$XROOTNAME" xsetroot -name "$XROOTNAME"
sleep 20s sleep 20s
done & done &

Loading…
Cancel
Save