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)" ]