Skip to content

Instantly share code, notes, and snippets.

@sinarf
Created March 27, 2020 04:59
Show Gist options
  • Save sinarf/ab2b556e749f16c98b74cd3fe5ec52e8 to your computer and use it in GitHub Desktop.
Save sinarf/ab2b556e749f16c98b74cd3fe5ec52e8 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
#
# @author Michel Blavin
# Basic Taskwarrior hook that sends a notification to# basic Taskwarrior that sends a notification on task add.
import sys
import json
import subprocess
import logging as log
task = json.loads(sys.stdin.readline())
log.debug("Received task: " + str(task))
subprocess.Popen(
["notify-send", "Task [" + task['status'] + "]: \n" + task['description']])
sys.exit(0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment