Add "follow main output" support for system (alert) device#77
Open
schoenwaldnils wants to merge 1 commit into
Open
Add "follow main output" support for system (alert) device#77schoenwaldnils wants to merge 1 commit into
schoenwaldnils wants to merge 1 commit into
Conversation
Adds a new sub-command "follow" to -t system that restores the
"Selected Sound Output Device" mode for alerts/sound effects:
SwitchAudioSource -t system follow
This performs the two writes that System Settings → Sound makes when
the user picks "Selected Sound Output Device" from "Play sound effects
through":
1. AlertsUseMainDevice = true in com.apple.soundpref (CurrentHost).
2. kAudioHardwarePropertyDefaultSystemOutputDevice ← current
kAudioHardwarePropertyDefaultOutputDevice.
In addition, when AlertsUseMainDevice is true, -t output now also
mirrors the new device to system output, so alerts stay in sync with
the main output automatically. When the flag is false, behavior is
unchanged (pinned-mode preserved).
System Settings caches com.apple.soundpref on launch — fully quit and
reopen System Settings to see the popup label update.
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.
Adds a new sub-command "follow" to -t system that restores the "Selected Sound Output Device" mode for alerts/sound effects:
This performs the two writes that System Settings → Sound makes when the user picks "Selected Sound Output Device" from "Play sound effects through":
In addition, when AlertsUseMainDevice is true, -t output now also mirrors the new device to system output, so alerts stay in sync with the main output automatically. When the flag is false, behavior is unchanged (pinned-mode preserved).
System Settings caches com.apple.soundpref on launch — fully quit and reopen System Settings to see the popup label update.
fixes #12