Skip to content

Instantly share code, notes, and snippets.

Avatar

David J Patrick linuxcaffe

View GitHub Profile
@linuxcaffe
linuxcaffe / on-launch_stopstarted.sh
Created Jun 1, 2019 — forked from wbsch/on-launch_stopstarted.sh
Taskwarrior hook that stops all active tasks when "task FILTER start" is run. PoC for https://bug.tasktools.org/browse/TW-1712
View on-launch_stopstarted.sh
#!/usr/bin/env bash
# Stops all previously active tasks on "task FILTER start"
#
# Only pending tasks are checked/stopped. If you really want to stop
# started tasks that are completed/deleted, remove the status:pending
# filter. Note that this will decrease performance, and should not
# be necessary.
tw_command=""
for i in "$@"; do
View on-add_annotate.py
#!/usr/bin/env python3
#
# Save as on-add_annotate.py in hooks directory, then:
# $ chmod +x ~/.task/hooks/on-add_annotate.py
#
# Anything after "annotate:" in a new task's description is added as an
# annotation:
# $ task add this is the description annotate:this is an annotation
import json
@linuxcaffe
linuxcaffe / on-exit_git.py
Created Nov 24, 2016 — forked from wbsch/on-exit_git.py
Proof of concept for a Taskwarrior on-exit hook that manages a git repository in ~/.task
View on-exit_git.py
#!/usr/bin/env python
#
# PoC: Manage a git repository in ~/.task that gets updated on changes.
# Only pending.data and completed.data are included by default.
# You can use "git add" to add whatever files you want to track in your
# task folder.
#
# Inspired by https://gist.github.com/Unode/9366218
#
# Works with any Taskwarrior version that supports hooks.
@linuxcaffe
linuxcaffe / on-add_inline_tags.py
Last active Sep 4, 2015 — forked from wbsch/on-add_inline_tags.py
Proof of concept for a Taskwarrior on-add hook that allows for "inline tags" when adding tasks
View on-add_inline_tags.py
#!/usr/bin/env python
#
# PoC for "inline tags", as described in TW-1357
# https://bug.tasktools.org/browse/TW-1357
#
# Turns
# $ task add I saw @bob in the @garden
# Into the equivalent of
# $ task add I saw bob in the garden +bob +garden
You can’t perform that action at this time.