#route #notifications #desktop #remote #run #place

app notif

route remote notifications to current desktop

13 releases

0.0.13 Jul 20, 2020
0.0.12 Apr 8, 2020
0.0.10 Mar 3, 2020
0.0.8 Feb 25, 2020

#186 in GUI

Download history 14/week @ 2021-04-10 31/week @ 2021-04-17 6/week @ 2021-04-24 15/week @ 2021-05-01 1/week @ 2021-05-08 14/week @ 2021-05-15 13/week @ 2021-06-05 2/week @ 2021-06-26 4/week @ 2021-07-03 3/week @ 2021-07-10 17/week @ 2021-07-17 16/week @ 2021-07-24

67 downloads per month

GPL-2.0 license

24KB
472 lines

I use this to route notifications from remote machines to the current desktop I'm using.

A central instance notif route receives notifications and forwards them to the currently active notifier. A notifier is run with notif notify on a desktop machine and displays received notifications. notif send is used in place of a local notify-send.

Example:

  • remote machine A: notif route
  • laptop1: notif notify
  • laptop2: notif notify
  • remote machine B: notif send -u critical "something noteworthy" "just happened"

Laptop2's notifier will receive & feed the notification to the desktop's notification manager and you'll see "@machineB: something noteworthy just happened". Send a SIGUSR2 to laptop1's notifier and it will receive future notifications.

For this to happen notif looks for a config file in ~/.notif, /etc/notif, or as an argument notif -c <file>: localhost example. Notif can generate config files for multiple hosts: for 5 clients & a server with curve certificates for each:

notif generate topo 10.99.0.1:9961 10.99.0.1:9962 5

On a desktop I use notif notify with this script: this ensures that the machine that has most recently unlocked X session will receive the notifications.

xscreensaver-command -watch | while read xs; do
  case "$xs" in
    LOCK*)
      # pause dunst so notifications don't appear over xscreensaver
      # pause notif so notifications queue up on server & will be routed later (maybe to another desktop)
      svc-s6 -1 $s6/notif || killall -s SIGUSR1 dunst
      svc-s6 -1 $s6/dunst || killall -s SIGUSR1 notif
      ;;
    UNBLANK*)
      # have notif send a SEIZE message to become the active notifier. resume dunst.
      svc-s6 -2 $s6/notif || killall -s SIGUSR2 dunst
      svc-s6 -2 $s6/dunst || killall -s SIGUSR2 notif
      ;;
  esac
done

I use this with this kind of things:

Dependencies

~9.5MB
~145K SLoC