mirror of
https://github.com/mitchell/dotfiles.git
synced 2025-12-17 12:27:22 +00:00
Refactor config.fish to use functions moved to functions folder
This commit is contained in:
parent
b5e93105d6
commit
47a88f93d1
10 changed files with 125 additions and 121 deletions
10
.config/fish/functions/push_tasks.fish
Normal file
10
.config/fish/functions/push_tasks.fish
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue