FollieHiyuki-dotfiles/home/.local/bin/info/cpu
2021-02-13 19:28:59 +03:00

6 lines
111 B
Bash
Executable File

#!/bin/sh
idle=$(printf "%.0f\n" "$(mpstat 1 1 | sed '1,4d;s/.* //')")
cpu=$(( 100 - idle ))
echo "$cpu%"