From e4ff7863410438af9a401dd2d8a3bb4fef78c9cc Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Tue, 13 Jan 2026 16:24:23 +0100 Subject: monitor: Ctrl-R new sets all to idle Ctrl-D instead removes all sessions. --- src/monitor.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/monitor.cc') diff --git a/src/monitor.cc b/src/monitor.cc index 067a69a..60bccb2 100644 --- a/src/monitor.cc +++ b/src/monitor.cc @@ -302,6 +302,13 @@ class Ui : public Server::Delegate { update_lines(); draw(); break; + case Action::REFRESH: + for (auto& pair : sessions_) { + pair.second.state = State::IDLE; + } + update_lines(); + draw(); + break; } } @@ -324,6 +331,7 @@ class Ui : public Server::Delegate { RESIZE, NOTIFY, RESET, + REFRESH, }; struct Line { @@ -410,6 +418,10 @@ class Ui : public Server::Delegate { } if ((e->state & XCB_MOD_MASK_CONTROL) && str == "\x12" /* Ctrl + R */) { + post(Action::REFRESH); + } + if ((e->state & XCB_MOD_MASK_CONTROL) && + str == "\x04" /* Ctrl + D */) { post(Action::RESET); } } -- cgit v1.2.3-70-g09d2