color cpu and memory based on usage

nixos
Moritz Böhme 2022-03-07 12:05:47 +01:00
parent eb17617025
commit e8bcc43cdb
No known key found for this signature in database
GPG Key ID: 213820E2795F5CF5
1 changed files with 18 additions and 4 deletions

View File

@ -118,8 +118,15 @@
"module/cpu" = { "module/cpu" = {
type = "internal/cpu"; type = "internal/cpu";
interval = 2; interval = 2;
format-prefix = " "; format = "<ramp-load><label>";
format-prefix-foreground = colors.red;
ramp-load-0 = " ";
ramp-load-0-foreground = colors.green;
ramp-load-1 = " ";
ramp-load-1-foreground = colors.orange;
ramp-load-2 = " ";
ramp-load-2-foreground = colors.red;
label = "%percentage:2%%"; label = "%percentage:2%%";
}; };
"module/time" = { "module/time" = {
@ -148,8 +155,15 @@
"module/memory" = { "module/memory" = {
type = "internal/memory"; type = "internal/memory";
interval = 2; interval = 2;
format-prefix = " "; format = "<ramp-used><label>";
format-prefix-foreground = colors.green;
ramp-used-0 = " ";
ramp-used-0-foreground = colors.green;
ramp-used-1 = " ";
ramp-used-1-foreground = colors.orange;
ramp-used-2 = " ";
ramp-used-2-foreground = colors.red;
ramp-used-3 = " ";
label = "%gb_used%"; label = "%gb_used%";
}; };