From 2c9cff6bb9b6d885faeb252b7c2f8c7fdc67c117 Mon Sep 17 00:00:00 2001 From: funman300 Date: Wed, 15 Jul 2026 21:37:40 -0700 Subject: [PATCH] gamemode-session: discard effect-command stdout makoctl/fw-fanctrl echo confirmations to stdout that leaked into add/del output during integration. run() now discards stdout, keeps stderr. Co-Authored-By: Claude Opus 4.8 (1M context) --- scripts/gamemode-session.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/gamemode-session.sh b/scripts/gamemode-session.sh index 3db3096..b85cf89 100755 --- a/scripts/gamemode-session.sh +++ b/scripts/gamemode-session.sh @@ -10,7 +10,10 @@ FAN_AUTO="${XDG_STATE_HOME:-$HOME/.local/state}/fan-profile-auto" DRYRUN="${GAMEMODE_DRYRUN:-0}" log() { printf 'gamemode: %s\n' "$*" >&2; } -run() { if [ "$DRYRUN" = 1 ]; then log "would: $*"; else "$@"; fi; } +# Execute a side-effecting command (or log it under dryrun). Its stdout is +# discarded — effect tools like makoctl/fw-fanctrl print confirmations we don't +# want leaking into `add`/`del` output; stderr is kept so real errors surface. +run() { if [ "$DRYRUN" = 1 ]; then log "would: $*"; else "$@" >/dev/null; fi; } is_active() { [ -n "$(find "$STATE_DIR" -maxdepth 1 -name 'src.*' -print -quit 2>/dev/null)" ]