divzeroweb

2f30.org website
git clone git://git.2f30.org/divzeroweb
Log | Files | Refs | README | LICENSE

commit 809bc81285e10797852fc33054ccc9aa5de2319b
parent 5821223e3ffee919fd87422d4f6fed539fb10c29
Author: lostd <lostd@2f30.org>
Date:   Tue, 15 Nov 2016 11:00:36 +0000

Add guide on remote notifications

Diffstat:
MMakefile | 3++-
Mguides.md | 1+
Aguides/irc-notify.md | 44++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 47 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile @@ -20,7 +20,8 @@ PAGES = $(MENUPAGES) \ guides/irix-sgi-o2.html \ guides/openbsd-httpd-cgit.html \ guides/openbsd-gateway.html \ - guides/openbsd-dedibox.html + guides/openbsd-dedibox.html \ + guides/irc-notify.html EXTRA = css divzerokey.png favicon.ico index.html \ lectures/resources diff --git a/guides.md b/guides.md @@ -13,3 +13,4 @@ Just some notes on various useful tasks. * [openbsd-httpd-cgit](guides/openbsd-httpd-cgit.html): Configuring httpd, slowcgi and cgit on OpenBSD * [openbsd-gateway](guides/openbsd-gateway.html): Setting up a home gateway with OpenBSD + other goodies * [openbsd-dedibox](guides/openbsd-dedibox.html): Installing OpenBSD on Dedibox SC 2016 + * [irc-notify](guides/irc-notify.html): Delivering remote notifications for fun and profit diff --git a/guides/irc-notify.md b/guides/irc-notify.md @@ -0,0 +1,44 @@ +# Delivering remote notifications for fun and profit + +The simple notification system explained here is based on the urgency +hint for the window manager and the terminal bell escape sequence. The +programs involved are the window manager, terminal emulator, terminal +multiplexer if you use one, and your remote IRC client. For this setup +we will be using: + +- dwm +- xterm / rxvt-unicode +- tmux +- irssi + +Other combinations of software are obviously possible. First thing is +to make XTerm or URxvt translate the bell to an urgency hint. Put in +your `~/.Xresources`: + + XTerm*bellIsUrgent: yes + URxvt*urgentOnBell: yes + +Don't forget to update you resource database by running `xrdb ~/.Xresources`. +By default DWM inverts the colors of the workspace icon when it receives +the urgency hint from an application on that workspace. To test how it +appears you can open a new (now configured) terminal emulator and ring +the bell: + + sleep 1 && printf '\x07' + +The sleep is just to give you time to switch to another workspace. +To make tmux pass bells through for all windows, even those not in focus +add to `~/.tmux.conf` (note that this is usually the remote host config +you want here): + + set -g bell-action any + +Finally, to make Irssi set the bell on private messages and nick highlights: + + /set bell_beeps ON + /set beep_msg_level MSGS HILIGHT + /save + +Cheers! + +lostd@ and sin@