Bash script to toggle the Sonos subwoofer via soco-cli.
This file contains 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
# Uses https://github.com/avantrec/soco-cli via https://pypa.github.io/pipx/. | |
# I map this to a HTPC keyboard key via Alfred.app. | |
if [ `soco -l "Front room" sub_enabled` == "on" ]; then | |
soco -l "Front room" sub_enabled off : "Front room" light off | |
say -vDaniel "Sub off" | |
else | |
soco -l "Front room" sub_enabled on : "Front room" light on | |
say -vDaniel "Sub on" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment