diff options
| author | Caroline Larimore <caroline@larimo.re> | 2024-06-16 01:03:48 -0700 |
|---|---|---|
| committer | Caroline Larimore <caroline@larimo.re> | 2024-06-16 01:03:48 -0700 |
| commit | 0a70d802c7504d2e1ba65b7a8fb914ea5c005a4c (patch) | |
| tree | a0018ced2aff8b2276764975ac3d3ff4278b4d48 /home | |
| parent | 1fa5e4f368e7514ce84c605efb30aefc952e7f73 (diff) | |
Replace polybar cpu/mem with script
Diffstat (limited to 'home')
| -rw-r--r-- | home/polybar.nix | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/home/polybar.nix b/home/polybar.nix index bc3211a..b1c54ba 100644 --- a/home/polybar.nix +++ b/home/polybar.nix @@ -56,7 +56,7 @@ module.margin = 1; modules = { - left = "cpu memory music"; + left = "stat music"; center = "i3"; right = "wlan eth filesystem keyboard xkeyboard pulseaudio date"; }; @@ -92,6 +92,20 @@ }; }; + "module/stat" = { + type = "custom/script"; + + exec = "vmstat -n 1 | awk '{printf \"%.0f%% %.2f GiB\\\\n\", 100-$15, (31998756-($4+$5+$6))/1024/1024};fflush()'"; + tail = true; + + format = { + prefix = { + text = " "; + foreground = "#${c.accent}"; + }; + }; + }; + "module/i3" = { type = "internal/i3"; |