brewery
notashelf /
34885419e088f65edfd5c6b3ed8dd1d6257cdbcd

beer

public

A terminal worth pouring time into

Star0tarball
clone
ssh://git@git.notashelf.dev:33/notashelf/beer.git

Commit 34885419e088

tarball

NotAShelf <raf@notashelf.dev> · 2026-06-26 22:05 UTC

unverified1 files changed+5-1
beer: export `KITTY_WINDOW_ID` to every child process

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I2f2d867ccd81821e65e6ae48e4f45c6f6a6a6964
diff --git a/crates/beer/src/pty.rs b/crates/beer/src/pty.rsindex 5524b47..fc7934e 100644--- a/crates/beer/src/pty.rs+++ b/crates/beer/src/pty.rs@@ -5,7 +5,7 @@ use std::io; use std::os::fd::{AsFd, OwnedFd}; use std::os::unix::process::CommandExt; use std::path::Path;-use std::process::{Child, Command, ExitStatus, Stdio};+use std::process::{self, Child, Command, ExitStatus, Stdio};  use anyhow::Context; use rustix::pty::{OpenptFlags, grantpt, ioctl_tiocgptpeer, openpt, unlockpt};@@ -47,6 +47,10 @@ impl Pty {         let mut cmd = Command::new(&shell);         cmd.arg0(&argv0)             .env("TERM", term)+            // Advertise Kitty graphics protocol compatibility. Yazi (and other+            // clients) gate `kgp` vs `kgp_old` on recognising the terminal+            // brand; KITTY_WINDOW_ID is the env check they use for Kitty.+            .env("KITTY_WINDOW_ID", process::id().to_string())             .env_remove("COLUMNS")             .env_remove("LINES")             .env_remove("TERMCAP")