nixos/home/common/optional/desktop/dwm/scripts/sb-cpu-pct.nix

9 lines
186 B
Nix

{ pkgs, ... }:
{
home.packages = with pkgs; [
(writeShellScriptBin "sb-cpu-pct" ''
echo $(top -bn 1 |grep "Cpu(s)" | awk '{print $2+$6 "%"}' | sed "s/\..//g")
'')
];
}