From fa789c43a667f50c14fa8238c51af5bcd7ab5aa7 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Tue, 6 Jan 2026 01:45:28 +0900 Subject: [PATCH] rwho: only show active users by default --- src/bin/rwho.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bin/rwho.rs b/src/bin/rwho.rs index 72ce4e8..c7775c1 100644 --- a/src/bin/rwho.rs +++ b/src/bin/rwho.rs @@ -40,6 +40,10 @@ async fn main() -> anyhow::Result<()> { .context("Failed to send rwho request")? .map_err(|e| anyhow::anyhow!("Server returned an error for rwho request: {:?}", e))?; + if !args.all { + reply.retain(|(_, user)| user.idle_time.num_minutes() <= 11); + } + reply.sort_by(|(host, user), (host2, user2)| { user.user_id .cmp(&user2.user_id)