Files
linux-config/configs/i3blocks-scripts/cpu_usage
Kevin Mok 5c8764c056 Fixed wifi block, wrote own CPU usage script
Closes #40. Also added file listing USB OS's and made change-sink handle
both DAC names.
2018-12-10 02:11:56 -05:00

9 lines
236 B
Bash
Executable File

#!/bin/bash
. "/home/kevin/.cache/wal/colors.sh"
idle="$(mpstat 1 1 -P ALL | sed -n -e '4{p;q}' | awk '{print $NF}')"
used=$(echo 100 - "$idle" | bc)
used_rounded=$(printf %.0f "$used")
printf "%s%%\n\n%s\n" "$used_rounded" "$color7"