Custom waybar module to show the process with the highest CPU usage
Run:
# make
and install the binary with:
# make install
Within your waybar config, define a custom module, for example:
"custom/hcu": {
"format": "{}",
"interval": 1,
"max-length": 20,
"exec": "~/.config/waybar/hcu"
},
Then add "custom/hcu" to modules-left, modules-right, or modules-center.