#!/bin/bash

[[ -z $DISPLAY ]] && exit 1;

exec 0<&-

sup ssh -o BatchMode=yes caju 'socat unix-connect:notify.sock stdout' |
	while read heading message; do
		if [[ -n $heading ]]; then
			notify-send --hint=int:transient:1 -c "weechat" --app-name "weechat" -t 5000 -- "${heading}" "${message}";
		fi
	done