A collection of my blocklets for i3blocks.
A simple bash script to calculate and return the current CPU usage in percent. Requires only top, grep, and awk. It should work on most linux distros out of the box. It assumes you to have 4 CPUs.
[cpu_usage]
command=$SCRIPT_DIR/cpu_usage
interval=10
label=CPU
Designed to work with MOC (Music on Console) but can easyly be adapted to several palyers. Returns the currently played filename or "none" if nothing is playing. Adds mouse controlls to the blocklet.
[music]
command=$SCRIPT_DIR/music
interval=10
label=♫