mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-16 19:54:02 +00:00
feat(config): fish configs
This commit is contained in:
26
config/fish/functions/remind.fish
Normal file
26
config/fish/functions/remind.fish
Normal file
@@ -0,0 +1,26 @@
|
||||
# @halostatue/fish-macos/functions/remind.fish:v7.0.0
|
||||
|
||||
function remind --description 'Add a reminder to Reminders.app'
|
||||
is_mac 'mountain lion'
|
||||
or return 1
|
||||
|
||||
has_app Reminders
|
||||
or return 1
|
||||
|
||||
if set --query argv
|
||||
set --function text $argv
|
||||
else
|
||||
set --function text (cat - | sed -e 's/$/<br>/')
|
||||
end
|
||||
|
||||
test -z $text
|
||||
and return 0
|
||||
|
||||
echo $text : text
|
||||
|
||||
echo 'tell application "Reminders"
|
||||
tell the default list
|
||||
make new reminder with properties {name: "'$text'"}
|
||||
end tell
|
||||
end tell' | osascript >/dev/null
|
||||
end
|
||||
Reference in New Issue
Block a user