From d79dceffc1b3d920392fd82430929370f6995fb5 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 15 Mar 2025 22:40:55 +0200 Subject: jo --- dotfiles/scripts/taskwarriorfeeder.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dotfiles/scripts/taskwarriorfeeder.rb b/dotfiles/scripts/taskwarriorfeeder.rb index 80784c4..28018d4 100644 --- a/dotfiles/scripts/taskwarriorfeeder.rb +++ b/dotfiles/scripts/taskwarriorfeeder.rb @@ -109,8 +109,9 @@ def task_schedule!(id, due, dry) run! "task modify #{id} due:#{due}", dry end +# Randomly schedule all unscheduled tasks but the ones with the +unsched tag def unscheduled_tasks - lines = `task due: 2>/dev/null`.split("\n").drop(1) + lines = `task -unsched due: 2>/dev/null`.split("\n").drop(1) lines.pop lines.map { |line| line.split.first }.each do |id| yield id if id.to_i.positive? -- cgit v1.2.3