Refactor config.fish to use functions moved to functions folder

This commit is contained in:
mitchell 2020-08-09 18:59:14 -04:00
parent b5e93105d6
commit 47a88f93d1
10 changed files with 125 additions and 121 deletions

View file

@ -0,0 +1,10 @@
function push_tasks -a token user -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
end