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

10 lines
258 B
Nix
Raw Normal View History

2024-06-14 21:48:43 +01:00
{ 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"%"}')] "
2024-06-14 21:48:43 +01:00
'')
];
}