Skip to content

OSC-99 desktop notifications: icons #7657

@dnkl

Description

@dnkl

As mentioned in https://sw.kovidgoyal.net/kitty/desktop-notifications/, icons are not yet supported:

It is possible to extend this escape code to allow specifying an icon for the notification, however, given that some platforms, such as legacy versions of macOS, don’t allow displaying custom images on a notification, it was decided to leave it out of the spec for the time being.

I'm implementing OSC-99 in foot (PR), and I'm also including icon support. Since you seem open to adding it to the spec, here I am :)

For foot, I decided to make it dead simple. The parameter is I (upper case i). We only support symbolic icon names. No filenames, paths (absolute or relative), and no inline pixel data.

I don't see foot ever supporting paths/filenames, but would be open to the spec allowing it.

Inline pixel data is perhaps more interesting. But honestly, given that this is a notification protocol, and not an image protocol, I thought it overkill. But, if there is a chance you want it in the spec, now or in the future, it would be good to consider how it would be encoded. I'm thinking base64 encoded, with another parameter that signals whether the icon is a symbolic name, or pixel data (i.e. somewhat similar to e + p).

What are your thoughts?

Example:

printf '\e]99;I=firefox;Notification with a firefox icon\e\\`

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions