Send notifications from a server to your host computer over GRPC and leverage your native notification system.
This project contains both the server and client scripts needed.
-
Install dependencies:
0.1. Install Rust
0.2. Install protobuf compiler, needed by the grpc-protobuf crate
-
Clone, build and install the project (❤️ cargo):
cargo install --git https://github.com/Silcet/notify-remote.git --branch main
-
Run the server locally:
It will be served in port
5001
if no other port is specified.notify-remote-server -p <port>
This will print the current IP of the host. Note it down for later (<host-ip>).
-
Copy the client over to your remote worker:
Use scp for example:
scp ~/.cargo/bin/notify-remote <user>@<remote-worker-ip>:<path>
Remember to place the binary in a folder in the
$PATH
or add the placement folder to the$PATH
. -
Run
notify-remote
after a long-running command:sleep 5; notify-remote --ip <host-ip> "Summary of the notification" "Body of the notification"
This example will pop a notification in your host after 5 seconds with the chosen summary and body
- Add tests
- Add more fileds to the notification (relevance, icon, etc..)
- Add authentication
- Handle notification errors without panic