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:09:58 +0300
committerPaul Bütow <1224732+snonux@users.noreply.github.com>2025-06-20 10:09:58 +0300
commit60c3adfa168481dbf15ad03d746639450edb395c (patch)
treefb00d9c0b1e56d501928e17513c3ec288db59133 /internal/task/task.go
parentb425dd80c4f8b060f4c67cb2f2eb9fec9183d519 (diff)
feat: color started tasks and add start/stop hotkeys
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)