Closed frederickjh closed 3 years ago
For passing the message to your custom command you can do it like this:
set -U __done_notification_command "yourcommand --subject \$title --body \$message myphone"
Perhaps it could be documented.
That just leaves adding some config params for disabling the SSH/window checks.
Done in v1.15.0
In #36 it was pointed out that Done does not send message when working on a remote server.
This feature request is to allow the user to use a custom command to allow sending the done message to them. Getting notification message to popup on remote machines is problematic at best.
However there are a number of push and chat services such as PushBullet and Telegram that have APIs that allow one to quickly put together a Fish function or shell script that sends out a message. I have created some of these that I can add to the end of a long running command, however I sometimes forget to add the notification function command after my long running command, ie.
sleep 300; telegram-me
and then of course do not get notified.Looking at the
done
code there are numerous checks to make sure that the terminal window is not in the foreground and that this is not a SSH session.Done also appears to have the option to run a custom command to notify, but it seems no way to pass the done message to that custom command.
To do list get notifications while ssh into a remote server.
In my original comment on #36, I suggested that variables could be set for some of these but I think that a configuration file for
done
might be a better idea for setting the above three items.If the
done
project also wants to include sample Fish functions for some of the push and chat services, I could help out by creating on for Telegram.After the above is finished the user could install
done
on the remote server then configure it to disable foreground checking, disable SSH checking, and set the custom command that done will call and pass the message to so that it can be delivered.