MaxHalford/chime

Add a way to add optional arguments to run commands

shaolo1 opened this issue · 2 comments

I have multiple sound cards in my computer, so I'd like a way to specify which card to play sounds with via chime. I've hacked in a fix that works for me, but I could see this being useful for others as well.

...
THEME = _get_default_theme(config_path, fallback_theme='chime')
RUN_ARGS = ''
...
#run(f'aplay {path}', sync, raise_error)
run(f'aplay {RUN_ARGS} {path}', sync, raise_error)

Now in my code I can
...
import chime
chime.RUN_ARGS = '--device sysdefault:CARD=PCH'

I'm not suggesting this is how it should be done, but rather the requested functionality. Thanks for the library!

Hey there! Thanks for this suggestion, I wouldn't have thought about it. I've just released a version 0.7 with support for extra CLI arguments :)

That was quick! Thanks!!