mirror of
https://github.com/mitchell/dotfiles.git
synced 2025-12-17 12:27:22 +00:00
Refactor push_tasks and add send_push,timetask functions
This commit is contained in:
parent
5e8e764238
commit
2f5438dc21
3 changed files with 22 additions and 8 deletions
|
|
@ -1,10 +1,4 @@
|
|||
function push_tasks -a token user -d 'Push tasks as a notification to your phone'
|
||||
function push_tasks -d 'Push tasks as a notification to your phone'
|
||||
set tasks (task +READY export | jq 'sort_by(.urgency) | reverse | map(@text "\(.description)\nLink: \(.link)") | join("\n\n")')
|
||||
set payload "{\"token\":\"$token\",\"user\":\"$user\",\"title\":\"Tasks\",\"message\":$tasks}"
|
||||
|
||||
curl \
|
||||
-X POST \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d $payload \
|
||||
https://api.pushover.net/1/messages.json
|
||||
send_push $tasks
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue