From 21cc68d49e94f3a385afc2bf59c5f7d88f9ad802 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Tue, 8 Dec 2020 19:19:55 +0100 Subject: osc: implement urxvt’s “OSC 777;notify” MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit OSC 777 is URxvt’s generic escape to send commands to its perl extensions. The first parameter is the name of the extension, followed by its arguments. OSC 777;notify is a, if not well established, at least a fairly well known escape sequence to request a (desktop) notification. The syntax is: \e]777;notify;;<body>\e\\ Neither title nor body is escaped in any way, meaning they should not contain a ‘;’. Foot will split title from body at the *first* ‘;’. Any remaining ‘;’ characters are treated as part of ‘body’. Instead of adding built-in support for the freedesktop notification specification (which would require us to link against at least dbus), add a new config option to foot.ini: ‘notify’. This option specifies the command to execute when a notification is received. ‘${title}’ and ‘${body}’ can be used anywhere, in any combination, and as many times as you want, in any of the command arguments. The default value is ‘notify-send -a foot -i foot ${title} ${body}’ --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 62a7a90a..1563aed1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -86,6 +86,9 @@ means foot can be PGO:d in e.g. sandboxed build scripts. See * `DECSET` escape to modify the `escape` key to send `\E[27;1;27~` instead of `\E`: `CSI ? 27127 h` enables the new behavior, `CSI ? 27127 l` disables it (the default). +* OSC 777;notify: desktop notifications. Use in combination with the + new **notify** option in `foot.ini` + (https://codeberg.org/dnkl/foot/issues/224). ### Changed -- cgit v1.3