From 5c1e96c6b8635effbc87543b54079afe9e463eff Mon Sep 17 00:00:00 2001 From: rope Date: Wed, 19 Aug 2026 21:09:42 +0100 Subject: [PATCH] hyprland: Super+E opens yazi via ghostty +new-window, 1.36s -> 39ms --- settings/hyprland.nix | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/settings/hyprland.nix b/settings/hyprland.nix index dda65a7..9a414c1 100644 --- a/settings/hyprland.nix +++ b/settings/hyprland.nix @@ -448,11 +448,20 @@ in -- away on Super+N — it is the only one of the two that can drag -- a file into a browser. -- - -- Not `ghostty +new-window --command=yazi`: 1.3.1 corrupts the - -- forwarded command over IPC (ghostty#11356) — the window opens - -- and /bin/sh is handed binary garbage — and a D-Bus-activated - -- instance comes up without HYPRLAND_INSTANCE_SIGNATURE. - hl.bind(mod .. " + E", hl.dsp.exec_cmd("ghostty -e yazi")) + -- +new-window, not `ghostty -e yazi`: bare -e force-sets + -- gtk-single-instance=false, so every press built a whole second + -- Ghostty — GTK, OpenGL, font discovery — measured at 1.36s. + -- +new-window asks the running daemon over D-Bus instead: 39ms. + -- + -- The exact spelling matters on 1.3.1: + -- * -e, never --command=. The latter is corrupted in transit — + -- the daemon logs `started subcommand path=/bin/sh` and gets + -- handed an empty or garbage string, so the window dies at once. + -- * --working-directory is mandatory and must come BEFORE -e. + -- Without it the auto-detected cwd is appended to the command + -- and corrupts it (ghostty#11356); everything after -e is + -- swallowed into the command itself. + hl.bind(mod .. " + E", hl.dsp.exec_cmd("ghostty +new-window --working-directory=${config.home.homeDirectory} -e yazi")) hl.bind(mod .. " + N", hl.dsp.exec_cmd("nemo")) hl.bind(mod .. " + R", hl.dsp.exec_cmd("${pkgs.quickshell}/bin/qs ipc call launcher toggle")) hl.bind(mod .. " + Q", hl.dsp.window.close())