From 0e9ddbb0bf0cd34500155ea4b03de2e2a38d8ab2 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Mon, 16 Mar 2020 23:33:42 +0100 Subject: Well I'm using Arch again --- slstatus/components/user.c | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 slstatus/components/user.c (limited to 'slstatus/components/user.c') diff --git a/slstatus/components/user.c b/slstatus/components/user.c deleted file mode 100644 index 71a0c9d..0000000 --- a/slstatus/components/user.c +++ /dev/null @@ -1,32 +0,0 @@ -/* See LICENSE file for copyright and license details. */ -#include -#include -#include -#include - -#include "../util.h" - -const char * -gid(void) -{ - return bprintf("%d", getgid()); -} - -const char * -username(void) -{ - struct passwd *pw; - - if (!(pw = getpwuid(geteuid()))) { - warn("getpwuid '%d':", geteuid()); - return NULL; - } - - return bprintf("%s", pw->pw_name); -} - -const char * -uid(void) -{ - return bprintf("%d", geteuid()); -} -- cgit v1.2.3