mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
notify: if there's a symbolic icon name, use it
even if there's no graphical ID set.
In other words, if there *is* a graphical ID, use the icon cache. Only
if there is no graphical ID in the notification request do we fallback
to the symbolic name. This means no icon will be displayed if there's
no matching icon in the cache.
Some examples. You can either pre-load the cache (with inline PNG
data, a symbolic name, or both):
printf '\e]99;g=123:n=firefox:p=icon:e=1;<PNG data>\e\\'
printf '\e]99;g=123;this is a notification\e\\'
or
printf '\e]99;n=firefox;this is a notification\e\\'
This commit is contained in:
parent
fabfef9c82
commit
55a4e59ef9
1 changed files with 2 additions and 0 deletions
2
notify.c
2
notify.c
|
|
@ -187,6 +187,8 @@ notify_notify(struct terminal *term, struct notification *notif)
|
|||
break;
|
||||
}
|
||||
}
|
||||
} else if (notif->icon_symbolic_name != NULL) {
|
||||
icon_name_or_path = notif->icon_symbolic_name;
|
||||
}
|
||||
|
||||
bool track_notification = notif->focus || notif->report;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue