mirror of
https://github.com/javalsai/lidm.git
synced 2025-09-03 11:48:00 +02:00
feat: add users and sessions discovery
- also add clangd multi-file intellisense
This commit is contained in:
22
src/main.c
22
src/main.c
@@ -1,3 +1,23 @@
|
||||
#include <pwd.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <sessions.h>
|
||||
#include <users.h>
|
||||
|
||||
int main() {
|
||||
return 2;
|
||||
struct users_list *users = get_human_users();
|
||||
struct sessions_list *sessions = get_avaliable_sessions();
|
||||
|
||||
printf("users(%hu) sessions(%hu)\n", users->length, sessions->length);
|
||||
|
||||
for (uint i = 0; i < users->length; i++)
|
||||
printf("u[%d]: %s %s\n", i, users->users[i].username,
|
||||
users->users[i].display_name);
|
||||
|
||||
for (uint i = 0; i < sessions->length; i++)
|
||||
printf("s[%d]: %s %s\n", i, sessions->sessions[i].name,
|
||||
sessions->sessions[i].path);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user