aboutsummaryrefslogtreecommitdiff
path: root/notify.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2024-07-24 13:59:52 +0000
committerDaniel Eklöf <daniel@ekloef.se>2024-07-24 13:59:52 +0000
commit37ab3b1603ce3697d69d28129b5941dac843e992 (patch)
tree9b06a0cfe536a48a28228d5e87d5727fd811cbc6 /notify.h
parentosc: kitty notifications: don't include '?' in the query reply (diff)
notify: don't create icon file on disk when we're not going to use it
We always prefer the symbolic name. Thus, there's no need to write raw PNG data to disk if we have a symbolic name. Furthermore, keep the file open until the cache entry is evicted.
Diffstat (limited to 'notify.h')
-rw-r--r--notify.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/notify.h b/notify.h
index ba017276..d78af5fa 100644
--- a/notify.h
+++ b/notify.h
@@ -58,7 +58,8 @@ struct notification {
struct notification_icon {
char *id;
char *symbolic_name;
- char *tmp_file_on_disk;
+ char *tmp_file_name;
+ int tmp_file_fd;
};
bool notify_notify(struct terminal *term, struct notification *notif);