Repository navigation
Add pause_when so FetchCord stops overriding other statuses - #246
Merged
Merged
Conversation
Discord shows one activity at a time, so while a game or Spotify is
running FetchCord's system info replaces the status the user actually
wants on their profile. There's currently no way to say "let that one
win".
pause_when lists the programs that should. While any of them is running
the presence is cleared and the loop just waits; when they exit it picks
up where it left off. The .exe suffix is optional in both directions, so
one entry works on every platform.
Configurable two ways:
fetchcord --pause-when steam spotify
or pause_when in fetchcord_conf.yml. The CLI wins. I added the flag
because Config() only ever reads the packaged YAML - there's no
%APPDATA%/XDG lookup - so a config-only version of this would mean
editing files inside site-packages to use it.
Matching is on the whole process name, not a substring, so "steam"
doesn't get triggered by steamwebhelper. The transitions are announced
once each rather than every cycle.
psutil is already a dependency, so nothing new is pulled in.
args.py is a mechanical adjacent insert - master's --install-startup group and --pause-when both stay. __main__.py needed a decision. Master hoisted the snapshot out of the cycle loop (one collection per rotation), and the pause check sat inside that loop, so a straight merge would have collected a full snapshot on every rotation while paused - a dozen PowerShell processes on Windows, for a rotation that sends nothing. The check now runs at the top of the rotation, ahead of the snapshot, so pausing skips the collection too. Added the assertion for that to the paused test. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WB6HG4WLukGEjhcq8FZJ7A
Resolve conflicts with fetchcord#244 (--dry-run) by keeping both features: pause_when and dry-run are adjacent additions to args, __main__, and tests. Also point the pause loop test at presence.get_component_id after the resolve_cycle refactor on master. Co-authored-by: BlivionIaG <BlivionIaG@users.noreply.github.com>
This was referenced Sep 11, 2026
cursor Bot
pushed a commit
that referenced
this pull request
Sep 11, 2026
#246 left one blank line missing between TestPauseWhenInTheLoop and TestDryRun, which fails CI's ruff format --check on master. Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: BlivionIaG <BlivionIaG@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
From the Discord list.
Discord shows one activity at a time, so while a game or Spotify is running FetchCord's system info replaces the status the user actually wants on their profile. There's currently no way to say "let that one win".
pause_whenlists the programs that should. While any of them is running the presence is cleared and the loop just waits; when they exit it picks up where it left off. The.exesuffix is optional in both directions, so one entry works on every platform.Configurable two ways:
or
pause_wheninfetchcord_conf.yml. The CLI wins.Why the flag as well as the config key:
Config()only ever reads the packaged YAML - there's no%APPDATA%/XDG lookup anywhere - so a config-only version of this would mean editing files insidesite-packagesto use it. Happy to drop the flag if you'd rather fix config discovery first and keep the surface smaller.Matching is on the whole process name rather than a substring, so
steamisn't triggered bysteamwebhelper. The transitions are announced once each rather than every cycle, since this is checked once per cycle.psutil is already a dependency, so nothing new is pulled in.