My slstatus configuration
Não pode escolher mais do que 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.

hostname.c 185 B

123456789101112131415
  1. #include <err.h>
  2. #include <unistd.h>
  3. #include "util.h"
  4. const char *
  5. hostname(void)
  6. {
  7. if (gethostname(buf, sizeof(buf)) == -1) {
  8. warn("hostname");
  9. return NULL;
  10. }
  11. return buf;
  12. }