From 60c3adfa168481dbf15ad03d746639450edb395c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20B=C3=BCtow?= <1224732+snonux@users.noreply.github.com> Date: Fri, 20 Jun 2025 10:09:58 +0300 Subject: feat: color started tasks and add start/stop hotkeys --- internal/task/task.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'internal/task/task.go') diff --git a/internal/task/task.go b/internal/task/task.go index 67cb677..20a4f48 100644 --- a/internal/task/task.go +++ b/internal/task/task.go @@ -88,6 +88,16 @@ func SetStatus(id int, status string) error { return run(strconv.Itoa(id), "modify", "status:"+status) } +// Start begins the task with the given id. +func Start(id int) error { + return run(strconv.Itoa(id), "start") +} + +// Stop stops the task with the given id. +func Stop(id int) error { + return run(strconv.Itoa(id), "stop") +} + // SetPriority changes the priority of the task with the given id. func SetPriority(id int, priority string) error { return run(strconv.Itoa(id), "modify", "priority:"+priority) -- cgit v1.2.3