]> git.netwichtig.de Git - user/henk/vcsh/zsh.git/blob - .zsh_functions_taskwarrior
customize fzf: use tmux and fdfind
[user/henk/vcsh/zsh.git] / .zsh_functions_taskwarrior
1 in () {
2     if [ $# -eq 0 ]; then
3         task in
4     else
5         task add +in $@
6     fi
7 }
8
9 # taskwarrior
10 tickle () {
11     deadline=$1
12     shift
13     in +tickle wait:$deadline $@
14 }
15
16 think () {
17     tickle +1d $@
18 }
19
20 rnd () {
21     task add +rnd +in $@
22 }
23
24 webpage_title (){
25     wget -qO- "$*" | hxselect -s '\n' -c  'title' 2>/dev/null
26 }
27
28 read_and_review (){
29     local link="$1"
30     local title=$(webpage_title $link)
31     echo $title
32     local descr="\"Read and review: $title\""
33     local id=$(task add +in +read "$descr" | sed -n 's/Created task \(.*\)./\1/p')
34     task "$id" annotate "$link"
35 }
36
37 rnr () {
38     read_and_review $@
39 }
40
41 watch_and_review (){
42     task add +in +watch $@
43 }
44
45 wnr () {
46     watch_and_review $@
47 }