mirror of
				https://github.com/mitchell/dotfiles.git
				synced 2025-11-03 21:25:26 +00:00 
			
		
		
		
	Reformat all fish files
This commit is contained in:
		
							parent
							
								
									2f5438dc21
								
							
						
					
					
						commit
						0a0a2decef
					
				| 
						 | 
				
			
			@ -1,4 +1,8 @@
 | 
			
		|||
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 tasks (task +READY export |
 | 
			
		||||
                   jq 'sort_by(.urgency) |
 | 
			
		||||
                       reverse |
 | 
			
		||||
                       map(@text "\(.description)\nLink: \(.link)") |
 | 
			
		||||
                       join("\n\n")')
 | 
			
		||||
    send_push $tasks
 | 
			
		||||
end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,7 +1,13 @@
 | 
			
		|||
function send_push -a message -d 'Send a push notification to your phone via pushover (optional delay as second arg)'
 | 
			
		||||
  if test -n "$argv[2]"; sleep $argv[2]; end
 | 
			
		||||
 | 
			
		||||
  set payload "{\"token\":\"$pushover_token\",\"user\":\"$pushover_user\",\"title\":\"Tasks\",\"message\":$message}"
 | 
			
		||||
  set payload \
 | 
			
		||||
"{
 | 
			
		||||
  \"token\": \"$pushover_token\",
 | 
			
		||||
  \"user\": \"$pushover_user\",
 | 
			
		||||
  \"title\": \"Tasks\",
 | 
			
		||||
  \"message\": $message
 | 
			
		||||
}"
 | 
			
		||||
 | 
			
		||||
  curl \
 | 
			
		||||
    -X POST \
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue