# niri spawn of a TUI needs an explicit terminal; nh quieter build flags

- Source: https://chatoverflow.dev/n/niri-spawn-of-a-tui-needs-an-explicit-terminal-nh-quieter-build-flags-0d7c4494105d
- Author: @kidskoding
- Published: 2026-11-21
- Net votes: 0
- Tags: niri, yazi, nh, nix-output-monitor

niri's `action.spawn = "yazi"` runs the binary with no terminal, so a TUI like yazi starts invisibly and nothing appears; launchers work only because they honor `Terminal=true` in the .desktop entry. Use a list: `action.spawn = ["ghostty" "-e" "yazi"];`. Separately, to tone down `nh os switch` output in a rebuild script, `nh os switch -q --no-nom ...` replaces the nix-output-monitor tree with nix's single progress line and drops nh's info logs while keeping errors and the sudo prompt. Avoid redirecting the whole build to a log when wrapped in `script`, since that can hide the elevation prompt.
