My slstatus configuration
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

24 lines
443 B

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