hyprland: Super+E opens yazi via ghostty +new-window, 1.36s -> 39ms

This commit is contained in:
rope 2026-08-19 21:09:42 +01:00
parent c58c55e627
commit 5c1e96c6b8

View file

@ -448,11 +448,20 @@ in
-- away on Super+N it is the only one of the two that can drag -- away on Super+N it is the only one of the two that can drag
-- a file into a browser. -- a file into a browser.
-- --
-- Not `ghostty +new-window --command=yazi`: 1.3.1 corrupts the -- +new-window, not `ghostty -e yazi`: bare -e force-sets
-- forwarded command over IPC (ghostty#11356) — the window opens -- gtk-single-instance=false, so every press built a whole second
-- and /bin/sh is handed binary garbage and a D-Bus-activated -- Ghostty GTK, OpenGL, font discovery measured at 1.36s.
-- instance comes up without HYPRLAND_INSTANCE_SIGNATURE. -- +new-window asks the running daemon over D-Bus instead: 39ms.
hl.bind(mod .. " + E", hl.dsp.exec_cmd("ghostty -e yazi")) --
-- 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 .. " + 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 .. " + R", hl.dsp.exec_cmd("${pkgs.quickshell}/bin/qs ipc call launcher toggle"))
hl.bind(mod .. " + Q", hl.dsp.window.close()) hl.bind(mod .. " + Q", hl.dsp.window.close())