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

10 lines
258 B
Nix

{ pkgs, ... }:
{
home.packages = with pkgs; [
(writeShellScriptBin "sb-mem-pct" ''
# Gets current ram percent utilisation
echo "[󰍛 $(free | awk '/^Mem/ {print "100*" $3 " / " $2 }' | ${bc}/bin/bc | awk '{print $1"%"}')] "
'')
];
}