#!/bin/zsh DATETIME=`date +"%d %b(%A) %H:%M"` get_cpu_load() { read cpu a b c previdle rest < /proc/stat prevtotal=$((a+b+c+previdle)) sleep 0.5 read cpu a b c idle rest < /proc/stat total=$((a+b+c+idle)) cpu=$((100*( (total-prevtotal) - (idle-previdle) ) / (total-prevtotal) )) echo -e "CPU: $cpu%" } get_cpu_temp() { CEL=$'\xc2\xb0C' temp=$( cat /sys/devices/virtual/thermal/thermal_zone0/temp ) temp=`expr $temp / 1000` echo "TEMP: " $temp$CEL } get_disk_usage() { root=$(df -h / | awk 'NR==2 {print $4 "/" $2}') home=$(df -h /home | awk 'NR==2 {print $4 "/" $2}') echo "ROOT:" $root " %{B-} " "%{B#E6739F} HOME:" $home " " } get_mem_usage() { mem=$(free -m | grep Mem: | awk '{print$3 / $2 * 100}') printf "MEM: %.0f %%" $mem } get_mute_status() { vol=$(pamixer --get-volume-human) if [ $vol = "muted" ] then echo "%{B#F15BB5}%{F#232627} muted" fi } get_weather() { echo $(