From 5a934c37cf5299ed6e28d6c7c0e14c8991a4a2a7 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 6 Sep 2020 18:59:56 +0200 Subject: [PATCH] Userland: Remove "LOGIN@" column from "w" since it's not really useful Maybe we can bring this back once we have remote logins, or at least make it optional then. At the moment, it's not very interesting. --- Userland/w.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Userland/w.cpp b/Userland/w.cpp index bf0a2afe49..55f86f6a61 100644 --- a/Userland/w.cpp +++ b/Userland/w.cpp @@ -44,15 +44,14 @@ int main() auto now = time(nullptr); - printf("\033[1m%-10s %-12s %-16s %-20s %-6s\033[0m\n", - "USER", "TTY", "FROM", "LOGIN@", "IDLE"); + printf("\033[1m%-10s %-12s %-16s %-6s\033[0m\n", + "USER", "TTY", "FROM", "IDLE"); json.value().as_object().for_each_member([&](auto& tty, auto& value) { const JsonObject& entry = value.as_object(); auto uid = entry.get("uid").to_u32(); auto pid = entry.get("pid").to_i32(); (void)pid; auto from = entry.get("from").to_string(); - auto login_at = entry.get("login_at").to_string(); auto* pw = getpwuid(uid); String username; @@ -72,11 +71,10 @@ int main() } } - printf("%-10s %-12s %-16s %-20s %-6s\n", + printf("%-10s %-12s %-16s %-6s\n", username.characters(), tty.characters(), from.characters(), - login_at.characters(), idle_string.characters()); }); return 0;