#!/bin/sh cpu_count=4 low=25 high=75 icon=󰻠 icon_low=󰒲 icon_mid=󰜎 icon_high=󱅝 avg_load=$(uptime | cut -d, -f4 | cut -d: -f2) percent=$(echo "result = $avg_load / $cpu_count * 100; scale=0; result / 1" | bc -l) printf $icon [ $percent -lt $low ] && printf $icon_low [ $percent -ge $low ] && [ $percent -lt $high ] && printf $icon_mid [ $percent -ge $high ] && printf $icon_high printf " %s%%\n" $percent