diff options
| author | Paul Bütow <1224732+snonux@users.noreply.github.com> | 2025-06-20 10:09:58 +0300 |
|---|---|---|
| committer | Paul Bütow <1224732+snonux@users.noreply.github.com> | 2025-06-20 10:09:58 +0300 |
| commit | 60c3adfa168481dbf15ad03d746639450edb395c (patch) | |
| tree | fb00d9c0b1e56d501928e17513c3ec288db59133 /internal/task/task.go | |
| parent | b425dd80c4f8b060f4c67cb2f2eb9fec9183d519 (diff) | |
feat: color started tasks and add start/stop hotkeys
Diffstat (limited to 'internal/task/task.go')
| -rw-r--r-- | internal/task/task.go | 10 |
1 files changed, 10 insertions, 0 deletions
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) |
