summaryrefslogtreecommitdiff
path: root/internal/task
diff options
context:
space:
mode:
authorPaul Bütow <1224732+snonux@users.noreply.github.com>2025-06-20 20:39:33 +0300
committerPaul Bütow <1224732+snonux@users.noreply.github.com>2025-06-20 20:39:33 +0300
commita123b739d3f042a23e4fb801a67ff19b1d11ec76 (patch)
treeb8cf4504515044776bd732d00ee31a523c562e58 /internal/task
parentd596388ebe915d164a9df22dae57be5f9fc2e465 (diff)
Add done and delete hotkeys
Diffstat (limited to 'internal/task')
-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 fb07333..f860b16 100644
--- a/internal/task/task.go
+++ b/internal/task/task.go
@@ -121,6 +121,16 @@ func Stop(id int) error {
return run(strconv.Itoa(id), "stop")
}
+// Done marks the task with the given id as completed.
+func Done(id int) error {
+ return run(strconv.Itoa(id), "done")
+}
+
+// Delete removes the task with the given id.
+func Delete(id int) error {
+ return run(strconv.Itoa(id), "delete")
+}
+
// 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)