Following this blogpost: https://eshapard.github.io/code/a-separate-taskwarrior-configuration-for-ideas.html I think it is a really good idea to try this out. At first I was collecting ideas in my regular taskwarrior repository -- this was no good as every task list was flooded by somedays and maybes which would never leave. But I still wanted to have a nice repository to collect all my ideas in. So, the second strategy was to have one big (markdown) file which would simply collect all my ideas. But now I was doubling and tripling them up because the list was so long, and it was more of a chore to find where to put everything than just a quick 'idea add'. This may be the best of both worlds: making use of the nice interface to a task database using the full strength of taskwarrior querying, without cluttering up my main task repository. The workflow is exactly as with regular taskwarrior, only the executable is not called `task` (or `t` in my case) but `idea`. So you e.g. add an idea with `idea add`, or query all diy ideas with `idea +diy`. Just like regular taskwarrior.
47 lines
1.2 KiB
Bash
47 lines
1.2 KiB
Bash
#!/usr/bin/env sh
|
|
|
|
# invoking t starts the task shell
|
|
# passing arguments along passes them straight through to taskwarrior instead
|
|
t() {
|
|
# check for existence of tasksh before doing this whole song and dance
|
|
if type tasksh >/dev/null 2>&1 && [ "$#" -eq 0 ]; then
|
|
tasksh
|
|
else
|
|
task "$@"
|
|
fi
|
|
}
|
|
|
|
# copy the `task` zsh completions over to my little alias 😉
|
|
# FIXME: this is not very pretty and not super portable (needs ps) but
|
|
# works for now. from here: https://unix.stackexchange.com/a/72564/414758
|
|
if echo "$SHELL" | grep -q zsh; then
|
|
if exist task && [ "$(ps -p $$ -o comm --no-headers)" = "zsh" ]; then compdef t=task; fi
|
|
fi
|
|
|
|
alias ta="task add"
|
|
alias tal="task log"
|
|
alias tan="task annotate"
|
|
|
|
alias tn="task next +READY"
|
|
alias td="task +TODAY or +OVERDUE"
|
|
alias tun="task next urgency \> 4"
|
|
|
|
if exist timew; then
|
|
alias tra="task active && timew"
|
|
else
|
|
alias tra="task active"
|
|
fi
|
|
alias tdd="task end.after:today all" # done doday
|
|
alias tdy="task end.after:yesterday all" # done yesterday-today
|
|
alias tdw="task end.after:today-1wk completed" # done this week
|
|
|
|
alias tad="task +ACTIVE done"
|
|
alias tas="task +ACTIVE stop"
|
|
|
|
alias to="task note"
|
|
|
|
#---
|
|
|
|
idea() {
|
|
task rc.data.location="$TASK_DATA_IDEA" "$@"
|
|
}
|