My slstatus configuration
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 

28 righe
494 B

  1. /* See LICENSE file for copyright and license details. */
  2. #if defined(__linux__)
  3. #include <stdint.h>
  4. #include <stdio.h>
  5. #include "../util.h"
  6. const char *
  7. entropy(void)
  8. {
  9. uintmax_t num;
  10. if (pscanf("/proc/sys/kernel/random/entropy_avail", "%ju", &num)
  11. != 1) {
  12. return NULL;
  13. }
  14. return bprintf("%ju", num);
  15. }
  16. #elif defined(__OpenBSD__) | defined(__FreeBSD__)
  17. const char *
  18. entropy(void)
  19. {
  20. /* Unicode Character 'INFINITY' (U+221E) */
  21. return "\xe2\x88\x9e";
  22. }
  23. #endif