Codebergdnkl
foot
master
1#pragma once
2#include <stdbool.h>
3#include <stdint.h>
4#include <unistd.h>
6#include <tllist.h>
8struct terminal;
10enum notify_when {
11 /* First, so that it can be left out of initializer and still be
12 the default */
13 NOTIFY_ALWAYS,
15 NOTIFY_UNFOCUSED,
16 NOTIFY_INVISIBLE
17};
19enum notify_urgency {
20 /* First, so that it can be left out of initializer and still be
21 the default */
22 NOTIFY_URGENCY_NORMAL,
24 NOTIFY_URGENCY_LOW,
25 NOTIFY_URGENCY_CRITICAL,
26};
28struct notification {
29 /*
30 * Set by caller of notify_notify()
31 */
32 char *id; /* Internal notification ID */
34 char *app_id; /* Custom app-id, overrides the terminal's app-id if set */
35 char *title; /* Required */
36 char *body;
37 char *category;
39 enum notify_when when;
40 enum notify_urgency urgency;
41 int32_t expire_time;
43 tll(char *) actions;
45 char *icon_cache_id;
46 char *icon_symbolic_name;
47 uint8_t *icon_data;
48 size_t icon_data_sz;
50 bool focus; /* Focus the foot window when notification is activated */
51 bool may_be_programatically_closed; /* OSC-99: notification may be programmatically closed by the client */
52 bool report_activated; /* OSC-99: report notification activation to client */
53 bool report_closed; /* OSC-99: report notification closed to client */
55 bool muted; /* Explicitly mute the notification */
56 char *sound_name; /* Should be set to NULL if muted == true */
58 /*
59 * Used internally by notify
60 */
62 uint32_t external_id; /* Daemon assigned notification ID */
63 bool activated; /* User 'activated' the notification */
64 uint32_t button_count; /* Number of buttons (custom actions) in notification */
65 uint32_t activated_button; /* User activated one of the custom actions */
66 char *xdg_token; /* XDG activation token, from daemon */
68 pid_t pid; /* Notifier command PID */
69 int stdout_fd; /* Notifier command's stdout */
71 char *stdout_data; /* Data we've reado from command's stdout */
72 size_t stdout_sz;
74 /* Used when notification provides raw icon data, and it's
75 bypassing the icon cache */
76 char *icon_path;
77 int icon_fd;
78};
80struct notification_icon {
81 char *id;
82 char *symbolic_name;
83 char *tmp_file_name;
84 int tmp_file_fd;
85};
87bool notify_notify(struct terminal *term, struct notification *notif);
88void notify_close(struct terminal *term, const char *id);
89void notify_free(struct terminal *term, struct notification *notif);
91void notify_icon_add(struct terminal *term, const char *id,
92 const char *symbolic_name, const uint8_t *data,
93 size_t data_sz);
94void notify_icon_del(struct terminal *term, const char *id);
95void notify_icon_free(struct notification_icon *icon);
Diagnostics5 git calls · 500 ms
CallStatusSizeTime0500 ms
discover200178 B3 ms
git.upload-pack discover http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=ls-refs git.upstream.dur_ms=3 git.response.bytes=178 git.server.agent=git/2.56.1-Linux git.server.object_format=sha1 git.server.caps=agent ls-refs fetch server-option object-format git.server.fetch=shallow wait-for-done filter git.protocol.version=2 git.pkt.frames=9 git.pkt.data=7 git.pkt.flush=2 git.pkt.delim=0 git.pkt.bytes=178 git.pkt.payload.max=35
ls-refs20010 KiB466 ms
git.upload-pack ls-refs http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=ls-refs git.upstream.dur_ms=390 git.response.bytes=10322 git.response.cache=EXPIRED git.response.duration_ms=466 git.protocol.version=2 git.pkt.frames=108 git.pkt.data=107 git.pkt.flush=1 git.pkt.delim=0 git.pkt.bytes=10322 git.pkt.payload.max=106 git.ls_refs.count=107 git.ls_refs.head=refs/heads/master
fetchcombine:blob:none+tree:2 · deepen 12008.6 KiB · hit2 ms
git.upload-pack fetch http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=2 git.response.bytes=8830 git.response.cache=HIT git.response.duration_ms=2 git.fetch.filter=combine:blob:none+tree:2 git.fetch.wants=c0d2c3e95d74cb60526ff28aec9f34ee3df545e0 git.fetch.haves.count=0 git.fetch.deepen=1 git.fetch.thin_pack=false git.fetch.ofs_delta=true git.protocol.version=2 git.pkt.frames=7 git.pkt.data=5 git.pkt.flush=1 git.pkt.delim=1 git.pkt.bytes=8830 git.pkt.payload.max=8730 git.sideband.band1.bytes=8730 git.sideband.band2.bytes=0 git.sideband.band3.bytes=0 git.pack.objects=14 git.pack.bytes=8730 git.fetch.wide.objects=14 git.fetch.wide.extra_bytes=9909 git.fetch.wide.blobs=0
fetchtree:0 · deepen 102009.3 KiB · hit2 ms
git.upload-pack fetch http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=2 git.response.bytes=9489 git.response.cache=HIT git.response.duration_ms=2 git.fetch.filter=tree:0 git.fetch.wants=c0d2c3e95d74cb60526ff28aec9f34ee3df545e0 git.fetch.haves.count=0 git.fetch.deepen=10 git.fetch.thin_pack=false git.fetch.ofs_delta=true git.protocol.version=2 git.pkt.frames=7 git.pkt.data=5 git.pkt.flush=1 git.pkt.delim=1 git.pkt.bytes=9489 git.pkt.payload.max=9389 git.sideband.band1.bytes=9389 git.sideband.band2.bytes=0 git.sideband.band3.bytes=0 git.pack.objects=10 git.pack.bytes=9389 git.pack.ofs_delta=0 git.pack.ref_delta=0 git.pack.chain.max=0 git.pack.trailer=de930681b6073ba5b599a0f956bfbd114762ad5a git.pack.full=10Open pack map
fetch2001.0 KiB · hit32 ms
git.upload-pack fetch http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=32 git.response.bytes=1075 git.response.cache=HIT git.response.duration_ms=32 git.fetch.wants=89b51238101ca9fb79a0e54fea7234944fc27f27 git.fetch.haves.count=0 git.fetch.deepen=0 git.fetch.thin_pack=false git.fetch.ofs_delta=true git.protocol.version=2 git.pkt.frames=4 git.pkt.data=3 git.pkt.flush=1 git.pkt.delim=0 git.pkt.bytes=1075 git.pkt.payload.max=1048 git.sideband.band1.bytes=1048 git.sideband.band2.bytes=0 git.sideband.band3.bytes=0
Each row is one HTTP round trip ply made to the git server for this page, on one timeline. discover asks what the server speaks, ls-refs lists branch tips, fetch brings objects by id. A hit was served by Workers Cache. Tap a row for its wire details.
- Remote
- https://codeberg.org/dnkl/foot
- Ref
- refs/heads/master
- Commit
- c0d2c3e95d74cb60526ff28aec9f34ee3df545e0
- cf-ray
- a5e26195ed9e224d
- Request
- 0b19b14c…
- Protocol
- v2 · sha1
- Agent
- git/2.56.1-Linux
- Filter
- advertised
- Fetch
- shallow wait-for-done filter
- Capabilities
- agent ls-refs fetch server-option object-format