Skip to content

Send notifications from a remote server to the host

License

Notifications You must be signed in to change notification settings

Silcet/notify-remote

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

notify-remote

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.

Getting started

  1. Install dependencies:

    0.1. Install Rust

    0.2. Install protobuf compiler, needed by the grpc-protobuf crate

  2. Clone, build and install the project (❤️ cargo):

    cargo install --git https://github.com/Silcet/notify-remote.git --branch main
  3. 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>).

  4. 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.

  5. 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

TODO

  • Add tests
  • Add more fileds to the notification (relevance, icon, etc..)
  • Add authentication
  • Handle notification errors without panic

About

Send notifications from a remote server to the host

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published