OSC 9 and/or 777 notifications #224

Closed
opened 11 months ago by dnkl · 1 comments
dnkl commented 11 months ago
Owner

Add support for (desktop) notifications.

  • OSC 9: ESC ] 9 ; [message] \a
  • OSC 777: ESC ] 777 ; notify ; [title] ; [body] \a

OSC 9 is ITerm2 Growl notifications, and OSC 777 is URxvt.

There's also https://gitlab.freedesktop.org/terminal-wg/specifications/-/issues/13, but like everything there, it doesn't appear to be going anywhere...

Not sure if we should choose one, or just implement both. The escapes themselves are simple enough.

As for what to do with them, I'm picturing something very simple: the user specifies a command in foot.ini that will be run by foot when it receives an OSC 9/777.

Example:

notify=notify-send -a foot $title $body

Note: while it may often be possible to call notify-send directly from the client application, having support for this in the terminal means we can have notifications over remote connections (e.g. SSH).

Add support for (desktop) notifications. * OSC 9: `ESC ] 9 ; [message] \a` * OSC 777: `ESC ] 777 ; notify ; [title] ; [body] \a` OSC 9 is _ITerm2 Growl notifications_, and OSC 777 is _URxvt_. There's also https://gitlab.freedesktop.org/terminal-wg/specifications/-/issues/13, but like everything there, it doesn't appear to be going anywhere... Not sure if we should choose one, or just implement both. The escapes themselves are simple enough. As for what to _do_ with them, I'm picturing something very simple: the user specifies a command in `foot.ini` that will be run by foot when it receives an OSC 9/777. Example: ``` notify=notify-send -a foot $title $body ``` Note: while it may often be possible to call `notify-send` directly from the client application, having support for this in the terminal means we can have notifications over remote connections (e.g. SSH).
dnkl added this to the 1.6.0 milestone 11 months ago
dnkl added the
enhancement
label 11 months ago
dnkl self-assigned this 11 months ago
dnkl added a new dependency 11 months ago
Poster
Owner

Going with OSC 777;notify only for now. OSC 9 (from iTerm2) conflicts with ConEmu (https://conemu.github.io/en/AnsiEscapeCodes.html#ConEmu_specific_OSC). While we technically could check if title is numeric, and if so ignore it, it's probably better to stick to OSC 777 only.

Going with OSC 777;notify only for now. OSC 9 (from iTerm2) conflicts with ConEmu (https://conemu.github.io/en/AnsiEscapeCodes.html#ConEmu_specific_OSC). While we technically could check if `title` is numeric, and if so ignore it, it's probably better to stick to OSC 777 only.
dnkl referenced this issue from a commit 11 months ago
dnkl closed this issue 11 months ago
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Blocks
#197 1.6.0
dnkl/foot
Loading…
There is no content yet.