Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/deweller/switchaudio-osx
Change the audio source for Mac OS X from the command line.
https://github.com/deweller/switchaudio-osx
Last synced: about 13 hours ago
JSON representation
Change the audio source for Mac OS X from the command line.
- Host: GitHub
- URL: https://github.com/deweller/switchaudio-osx
- Owner: deweller
- License: other
- Created: 2014-06-29T12:59:57.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2024-07-07T17:06:56.000Z (5 months ago)
- Last Synced: 2024-12-04T22:03:41.785Z (8 days ago)
- Language: C
- Size: 65.4 KB
- Stars: 1,194
- Watchers: 30
- Forks: 88
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- License: license.txt
Awesome Lists containing this project
- command-line-tools - switchaudio-osx - Change the audio source for Mac OS X from the command line. (macOS)
- awesome-macos-commandline - switchaudio - Change the audio source for macOS. (Uncategorized / Uncategorized)
README
switchaudio-osx
===============A command-line utility to switch the audio source on Mac OS X.
Description
-----------This utility switches the audio source for Mac OS X.
You specify the name of the audio source, such as Built-in Digital Output, and the utility switches the source immediately without any GUI interaction.
This is a command-line utility only and has no graphical user interface. Tested on OS 10.7 - 11.2.
Installing from homebrew
------------------------
```
brew install switchaudio-osx
```Usage
-----SwitchAudioSource [-a] [-c] [-f format] [-t type] [-n] -s device\_name | -i device\_id | -u device\_uid
- **-a** : shows all devices
- **-c** : shows current device
- **-f** _format_ : output format (cli/human/json). Defaults to human.
- **-t** _type_ : device type (input/output/system). Defaults to output.
- **-m** _mute_mode_ : sets the mute status (mute/unmute/toggle).
- **-n** : cycles the audio device to the next one
- **-i** _device_id_ : sets the audio device to the given device by id
- **-u** _device_uid_ : sets the audio device to the given device by uid or a substring of the uid
- **-s** _device_name_ : sets the audio device to the given device by name### Muting
The `-m` flag can be used to mute input or output devices.
Define the device via `-t`.
Example for toggling the mute state for the currently selected input, e.g. microphone:
```shell
SwitchAudioSource -m toggle -t input
```This is useful on a hotkey, e.g. to mute your Teams or Zoom input.
Thanks
-------Thanks to Christian Zuckschwerdt for migrating this to github and adding the next option.
License
-------MIT License, see license.txt
Copyright (c) 2008-2021 Devon Weller
Copyright (c) 2011 Christian Zuckschwerdt