summaryrefslogtreecommitdiff
path: root/src/pardes.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-29 03:44:26 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:15 -0300
commit69f8e4703f6c1204f9f0958f264d2a4c4600026f (patch)
tree01bab7f3d7cea8a557780c0e1263962752892732 /src/pardes.zig
parent29ae6460961f4f781088455b72946260113a9ad9 (diff)
downloadpardes-69f8e4703f6c1204f9f0958f264d2a4c4600026f.tar.gz
pardes-69f8e4703f6c1204f9f0958f264d2a4c4600026f.zip
pty/run's busy names the program holding the terminal
busy said only that something ran. Where the host can tell (Linux, the tty's foreground group's /proc comm, a new fg_name host call), it says busy: <program> is running; elsewhere, busy as before. The GUI's host gains the one small callback (render agent's file: gui.zig, fgName). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/pardes.zig')
-rw-r--r--src/pardes.zig5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/pardes.zig b/src/pardes.zig
index c103b9d7..d6859f86 100644
--- a/src/pardes.zig
+++ b/src/pardes.zig
@@ -5124,6 +5124,11 @@ pub const Pardes = struct {
return ev;
}
+ pub fn hostForegroundName(p: *const Pardes, id: usize, buf: []u8) ?[]const u8 {
+ const f = p.host.vtable.fg_name orelse return null;
+ return f(p.host.ctx, @intCast(id), buf);
+ }
+
pub fn hostTtyTaken(p: *const Pardes, id: usize) bool {
const f = p.host.vtable.tty_taken orelse return false;
return f(p.host.ctx, @intCast(id));