AudStopper is a daemon that is designed to prevent audio from continuing to play when the output device is changed, such as when switching from headphones to speakers.
To stop audio playback when the output device is changed, AudStopper requires the playerctl
package if the option in the config is enabled.
To compile AudStopper from source, you'll need to have Go installed on your system. You can download the Go installer from the official Go website.
Once you have Go installed, run the following command to install audstopper:
go install codeberg.org/tomkoid/[email protected]
To run AudStopper, simply execute the audstopper command:
audstopper
This will start the AudStopper daemon, which will monitor audio output changes and stop audio playback when necessary.
To configure AudStopper, you can edit the configuration file located at ~/.config/audstopper/config.toml
. Here is an example configuration file:
# Resume audio after you change output back
# WARNING: This feature is not stable yet. The current implementation has big issues.
# Example: audio is playing on audio 1 and then you switch to
# audio 2, the audio gets paused. after you switch
# back to audio 1, the audio gets unmuted.
# Enable MPC pausing
mpc = false
# Enable playerctl stopping
playerctl = true
AudStopper is licensed under the MIT License. See the LICENSE file for more information.
If you'd like to contribute to AudStopper, please fork the repository and submit a pull request with your changes. You can also report issues or suggest new features on the issue tracker.