Skip to content

Instantly share code, notes, and snippets.

@Kehet
Last active January 11, 2020 00:26
Show Gist options
  • Save Kehet/5ba8a530e52ea3a0ae251d756faef680 to your computer and use it in GitHub Desktop.
Save Kehet/5ba8a530e52ea3a0ae251d756faef680 to your computer and use it in GitHub Desktop.
Rofi helper for taskwarrior (requires jq)
#!/usr/bin/env sh
ID=$(task export | jq -r 'sort_by( -.urgency )[] | [ (.id|tostring), .description ] | join(" ")' |
rofi -no-auto-select -i -dmenu -p "Task" |
cut -f 1)
[ -z "$ID" ] && echo "Cancelled." && exit
ACTION=$(printf "start\nstop\nedit\ndone" | rofi -no-auto-select -i -dmenu -p "Action")
[ -z "$ACTION" ] && echo "Cancelled." && exit
task "$ID" "$ACTION"
@Kehet
Copy link
Author

Kehet commented Jan 11, 2020

$ task version

task 2.5.1 built for linux
Copyright (C) 2006 - 2016 P. Beckingham, F. Hernandez.

Taskwarrior may be copied only under the terms of the MIT license, which may be found in the Taskwarrior source kit.

Documentation for Taskwarrior can be found using 'man task', 'man taskrc', 'man task-color', 'man task-sync' or at http://taskwarrior.org

$ jq -V
jq-1.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment