feat: add idle_commands config option

This commit is contained in:
CJ van den Berg 2025-12-06 21:50:33 +01:00
parent 719eed4cfd
commit b87a58accc
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
2 changed files with 4 additions and 0 deletions

View file

@ -318,6 +318,9 @@ fn handle_input_idle(self: *Self) void {
var buf: [32]u8 = undefined;
const m = tp.message.fmtbuf(&buf, .{"input_idle"}) catch return;
_ = self.send_widgets(tp.self_pid(), m) catch return;
const idle_cmds = self.config_.idle_commands orelse return;
for (idle_cmds) |cmd|
command.executeName(cmd, .{}) catch |e| self.logger.print_err("idlerun", "idle run command '{s}' failed: {t}", .{ cmd, e });
}
fn update_input_idle_timer(self: *Self) void {