summaryrefslogtreecommitdiff
path: root/.zsh_functions_taskwarrior
diff options
context:
space:
mode:
authorHendrik Jaeger <git-commit@henk.geekmail.org>2016-09-25 00:02:32 +0200
committerHendrik Jaeger <git-commit@henk.geekmail.org>2016-09-25 00:02:32 +0200
commit52e3d2e3163d4a40b9b87810963b55ceaeeaa14a (patch)
treeaa3f68a9ecf58eeb0455c83dd8b3d1a7c3573d7b /.zsh_functions_taskwarrior
parentd443352c96f036858b34c4827d8690ed69c04709 (diff)
Taskwarrior and media convenience
Diffstat (limited to '.zsh_functions_taskwarrior')
-rw-r--r--.zsh_functions_taskwarrior43
1 files changed, 43 insertions, 0 deletions
diff --git a/.zsh_functions_taskwarrior b/.zsh_functions_taskwarrior
new file mode 100644
index 0000000..3431d85
--- /dev/null
+++ b/.zsh_functions_taskwarrior
@@ -0,0 +1,43 @@
+in () {
+ task add +in $@
+}
+
+# taskwarrior
+tickle () {
+ deadline=$1
+ shift
+ in +tickle wait:$deadline $@
+}
+
+think () {
+ tickle +1d $@
+}
+
+rnd () {
+ task add +rnd +in $@
+}
+
+webpage_title (){
+ wget -qO- "$*" | hxselect -s '\n' -c 'title' 2>/dev/null
+}
+
+read_and_review (){
+ local link="$1"
+ local title=$(webpage_title $link)
+ echo $title
+ local descr="\"Read and review: $title\""
+ local id=$(task add +in +read "$descr" | sed -n 's/Created task \(.*\)./\1/p')
+ task "$id" annotate "$link"
+}
+
+rnr () {
+ read_and_review $@
+}
+
+watch_and_review (){
+ task add +in +watch $@
+}
+
+wnr () {
+ watch_and_review $@
+}