summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@opera.com>2026-01-13 16:24:23 +0100
committerJoel Klinghed <the_jk@opera.com>2026-01-13 16:24:23 +0100
commite4ff7863410438af9a401dd2d8a3bb4fef78c9cc (patch)
tree083f0804894ebc615e429e6f20661f5961b4bf45
parentcceecc0c075c988383c6c78ad7600baefbebcd85 (diff)
monitor: Ctrl-R new sets all to idleHEADmain
Ctrl-D instead removes all sessions.
-rw-r--r--src/monitor.cc12
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);
}
}