summaryrefslogtreecommitdiff
path: root/internal/task/task.go
diff options
context:
space:
mode:
authorPaul Bütow <1224732+snonux@users.noreply.github.com>2025-06-20 10:10:11 +0300
committerGitHub <noreply@github.com>2025-06-20 10:10:11 +0300
commite1c235b796417681b16292d7c3bc1c52a5d92ce4 (patch)
treefb00d9c0b1e56d501928e17513c3ec288db59133 /internal/task/task.go
parentb425dd80c4f8b060f4c67cb2f2eb9fec9183d519 (diff)
parent60c3adfa168481dbf15ad03d746639450edb395c (diff)
Merge pull request #17 from snonux/codex/fix-active-row-display-and-add-hotkeys
Add start/stop hotkeys and row color
Diffstat (limited to 'internal/task/task.go')
-rw-r--r--internal/task/task.go10
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)