2020-12-06 10:05:30 +01:00
|
|
|
|
#!/usr/bin/env sh
|
|
|
|
|
|
|
|
|
|
# From Kehet
|
|
|
|
|
## https://gist.github.com/Kehet/5ba8a530e52ea3a0ae251d756faef680
|
|
|
|
|
|
|
|
|
|
# Rofi colors
|
|
|
|
|
black="#000000"
|
|
|
|
|
blue="#0094cc"
|
|
|
|
|
|
|
|
|
|
# Display pending tasks list and get title from the choosen one
|
2021-10-06 10:13:41 +02:00
|
|
|
|
TITLE=$(task status:pending export | jq -r 'sort_by( -.urgency )[] | [ (.id|tostring), .description ] | join(" ")' |
|
2020-12-06 10:05:30 +01:00
|
|
|
|
rofi -location 2 -no-auto-select -i -dmenu -p "Task" -color-enabled -color-normal "${black},${blue},${black},${blue},${black}" -color-window "${black},${black}" |
|
|
|
|
|
cut --delimiter=" " --field=2)
|
|
|
|
|
|
|
|
|
|
[ -z "${TITLE}" ] && echo "Cancelled." && exit 0
|
|
|
|
|
|
|
|
|
|
# Start task with pomodorrior script (task end after 25 minutes)
|
|
|
|
|
pomodorrior "${TITLE}" && exit 0
|
|
|
|
|
|
|
|
|
|
exit 255
|