Skip to content
/ rnotify Public

Forwarding remote notifications to a local machine

Notifications You must be signed in to change notification settings

ondras/rnotify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rnotify

This is a tiny script that forwards messages to a (local) notification daemon. Client side simply dumps all data to port 1337, server side listens (netcat) and passes received stuff to notify-send. Startup and server reloading is managed via systemd unit file.

Prerequisites

  • netcat
  • systemd (local machine)
  • notify-send (local machine)

Installation

  1. Clone the repo (all relevant machines):

    git clone git@github.com:ondras/rnotify.git
    
  2. Symlink the rnotify.service to your per-user systemd configuration directory (only the local machine):

    cd rnotify
    mkdir -p ~/.config/systemd/user
    ln -s `pwd`/rnotify.service ~/.config/systemd/user
    systemctl --user daemon-reload

Running

  1. Start the listening service:

    systemctl --user start rnotify
  2. Test it locally:

    ./rnotify-send "This is a test"
  3. Create a forwarding tunnel to another machine:

    ssh -R 1337:0:1337 user@host
  4. Test it remotely:

    user@host> ./rnotify-send "This is a remote test"

WeeChat integration

/script install notify_send.pl
/set plugins.var.perl.notify_send.command "/path/to/rnotify/rnotify-send $type $name $message"