My slstatus configuration
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 

18 linhas
257 B

  1. #include <err.h>
  2. #include <stdlib.h>
  3. #include "util.h"
  4. const char *
  5. load_avg(const char *fmt)
  6. {
  7. double avgs[3];
  8. if (getloadavg(avgs, 3) < 0) {
  9. warnx("Failed to get the load avg");
  10. return NULL;
  11. }
  12. return bprintf(fmt, avgs[0], avgs[1], avgs[2]);
  13. }