diff options
| -rw-r--r-- | .config/i3/config##c.desktop,h.maus | 7 | ||||
| -rwxr-xr-x | .local/bin/done | 47 | ||||
| -rw-r--r-- | .taskrc##c.desktop,h.maus | 12 |
3 files changed, 64 insertions, 2 deletions
diff --git a/.config/i3/config##c.desktop,h.maus b/.config/i3/config##c.desktop,h.maus index 2889398..7254417 100644 --- a/.config/i3/config##c.desktop,h.maus +++ b/.config/i3/config##c.desktop,h.maus | |||
| @@ -43,8 +43,11 @@ font pango:Iosevka 11 | |||
| 43 | # bindings # | 43 | # bindings # |
| 44 | ############## | 44 | ############## |
| 45 | 45 | ||
| 46 | # done, {task,timew}warrior control suite | ||
| 47 | bindcode $mod+42 exec --no-startup-id ~/.local/bin/done | ||
| 48 | |||
| 46 | # type the contents of the clipboard with mod+p | 49 | # type the contents of the clipboard with mod+p |
| 47 | bindcode --release $mod+27 exec --no-startup-id /home/yigit/.local/bin/type_clipboard.sh | 50 | bindcode --release $mod+27 exec --no-startup-id ~/.local/bin/type_clipboard.sh |
| 48 | 51 | ||
| 49 | # launch emoji picker with mod+c | 52 | # launch emoji picker with mod+c |
| 50 | bindcode $mod+54 exec --no-startup-id rofimoji --skin-tone neutral | 53 | bindcode $mod+54 exec --no-startup-id rofimoji --skin-tone neutral |
| @@ -77,7 +80,7 @@ bindcode $mod+Shift+20 move scratchpad | |||
| 77 | bindcode $mod+20 scratchpad show | 80 | bindcode $mod+20 scratchpad show |
| 78 | 81 | ||
| 79 | # pause notifications for a while with mod+shift+y | 82 | # pause notifications for a while with mod+shift+y |
| 80 | bindcode $mod+Shift+32 exec /home/yigit/.local/bin/toggle_notifications.sh | 83 | bindcode $mod+Shift+32 exec ~/.local/bin/toggle_notifications.sh |
| 81 | 84 | ||
| 82 | # shortcuts for frequent programs | 85 | # shortcuts for frequent programs |
| 83 | 86 | ||
diff --git a/.local/bin/done b/.local/bin/done new file mode 100755 index 0000000..f2641f2 --- /dev/null +++ b/.local/bin/done | |||
| @@ -0,0 +1,47 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | # we `start` tasks through taskwarrior which uses a hook to start them in | ||
| 4 | # timewarrior | ||
| 5 | |||
| 6 | # DONE: START: get the tasks for the current context, start using rofi selection | ||
| 7 | # DONE: STOP: get the current task (task active output), either pause it (task $1 stop) or complete it (task $1 done) | ||
| 8 | # DONE: DONE: ask how the task went, timew @1 annotate '[1-5]' | ||
| 9 | |||
| 10 | function say_cancel { notify-send "cancelling, no action taken" "" --app-name="done" --icon="dialog-cancel"; } | ||
| 11 | |||
| 12 | if ACTIVE_TASK=$(task active); then | ||
| 13 | |||
| 14 | task_id=$(echo "${ACTIVE_TASK}" | head -n4 | tail -n1 | cut -d' ' -f1) | ||
| 15 | task_description=$(echo "${ACTIVE_TASK}" | head -n4 | tail -n1 | cut -d' ' -f2-) | ||
| 16 | |||
| 17 | if choice=$(printf "done\npause" | rofi -dmenu -p "${task_description}" -lines 2 -no-custom); then | ||
| 18 | |||
| 19 | if [[ ${choice} == "done" ]]; then | ||
| 20 | task "done" "${task_id}" | ||
| 21 | notify-send "👏👏👏 good work there" "task ${task_description} is complete" --app-name="done" --icon="checkmark" | ||
| 22 | |||
| 23 | if annot=$(printf "5 - perfect flow\n4 - progress, still\n3 - rather be somewhere else\n2 - ugh\n1 - not even" | rofi -dmenu -p "${task_description}" -lines 5 -no-custom); then | ||
| 24 | timew "@1" annotate "${annot:0:1}" | ||
| 25 | fi | ||
| 26 | |||
| 27 | elif [[ ${choice} == "pause" ]]; then | ||
| 28 | task "stop" "${task_id}" | ||
| 29 | notify-send "🛑 let's put a pause on this" "stopping task ${task_description}" --app-name="done" --icon="dialog-apply" | ||
| 30 | else | ||
| 31 | echo "this is impossible..." | ||
| 32 | exit 1 | ||
| 33 | fi | ||
| 34 | else | ||
| 35 | say_cancel | ||
| 36 | fi | ||
| 37 | else | ||
| 38 | if wanna_start=$(printf '%s' "$(task custom_done | tail -n +4 | head -n -2)" | rofi -dmenu -p 'select a task' -i -no-custom); then | ||
| 39 | task_id=$(echo "${wanna_start}" | xargs | cut -d' ' -f1) | ||
| 40 | task_description=$(echo "${wanna_start}" | xargs | cut -d' ' -f2-) | ||
| 41 | |||
| 42 | task "start" "${task_id}" | ||
| 43 | notify-send "good luck then" "🤓 ${task_description} now" --app-name="done" --icon="go-next" | ||
| 44 | else | ||
| 45 | say_cancel | ||
| 46 | fi | ||
| 47 | fi | ||
diff --git a/.taskrc##c.desktop,h.maus b/.taskrc##c.desktop,h.maus index dbd9024..cea901b 100644 --- a/.taskrc##c.desktop,h.maus +++ b/.taskrc##c.desktop,h.maus | |||
| @@ -91,6 +91,18 @@ report.next.filter = +UNBLOCKED status:pending and +next | |||
| 91 | report.next.labels = ID,Active,Age,Urgency,Deps,P,Project,Tag,Recur,S,Due,Until,Description,Brainpower | 91 | report.next.labels = ID,Active,Age,Urgency,Deps,P,Project,Tag,Recur,S,Due,Until,Description,Brainpower |
| 92 | report.next.sort = brainpower-,priority-,urgency- | 92 | report.next.sort = brainpower-,priority-,urgency- |
| 93 | 93 | ||
| 94 | ### bin/done selection | ||
| 95 | report.custom_done.description = Brief next task list | ||
| 96 | report.custom_done.columns = id,description,due.remaining | ||
| 97 | report.custom_done.filter = +UNBLOCKED status:pending and +next | ||
| 98 | report.custom_done.labels = ID,Description,Due | ||
| 99 | report.custom_done.sort = brainpower-,priority-,urgency- | ||
| 100 | |||
| 101 | ### override 'active' report | ||
| 102 | report.active.description = Current task | ||
| 103 | report.active.labels = ID,Description | ||
| 104 | report.active.columns = id,description | ||
| 105 | |||
| 94 | calendar.details=full | 106 | calendar.details=full |
| 95 | taskd.credentials=me\/yigit sever\/765df4a2-6c6c-408b-a266-17117e944f4e | 107 | taskd.credentials=me\/yigit sever\/765df4a2-6c6c-408b-a266-17117e944f4e |
| 96 | taskd.certificate=\/home\/yigit\/.local\/share\/task\/maus.cert.pem | 108 | taskd.certificate=\/home\/yigit\/.local\/share\/task\/maus.cert.pem |
