diff options
| author | Joel Klinghed <the_jk@opera.com> | 2026-01-13 16:24:23 +0100 |
|---|---|---|
| committer | Joel Klinghed <the_jk@opera.com> | 2026-01-13 16:24:23 +0100 |
| commit | e4ff7863410438af9a401dd2d8a3bb4fef78c9cc (patch) | |
| tree | 083f0804894ebc615e429e6f20661f5961b4bf45 /src/monitor.cc | |
| parent | cceecc0c075c988383c6c78ad7600baefbebcd85 (diff) | |
Ctrl-D instead removes all sessions.
Diffstat (limited to 'src/monitor.cc')
| -rw-r--r-- | src/monitor.cc | 12 |
1 files changed, 12 insertions, 0 deletions
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); } } |
