Custom ansi sequence for notifies

Christian Birchinger joker at netswarm.net
Mon Jul 8 12:23:06 CEST 2013


Hello

To avoid weird ssh back channels piping text into notify-send,
i experimented with a simple perl function that interprets a
custom ansi sequence:

sub on_osc_seq {
	my ($term, $op, $args) = @_;
	return () unless $op eq 56;
	my ($title, $text) = split ';', $args, 2;
	system('notify-send', '-i', 'terminal', $title, $text);
	()
}

# TEST normal: printf "\033]56;TITLE;TEXT\007"
# TEST tmux:   printf '\033Ptmux;\033\033]56;TITLE;TEXT\007\033\\'

Using "Glib::Object::Introspection" instead of system() would be
probably better, but i wanted a proof of concept first.

The real question is, what ansi sequence should i use? I've tried
and failed looking up information.

Is there some kind of "private" range i could use? I went for 56
because it was listed as "Reserved" on the Wikipedia page, but
that's probably not the right way to decide on what code i should
use.

I know it's not stricly a rxvt-unicode question, but maybe there
is already a range it uses for own stuff (i.e. font settings).

thanks
Christian




More information about the rxvt-unicode mailing list