Files
scripts/audio-toggle/README.md
T

37 lines
1.0 KiB
Markdown

# audio_toggle.sh
Switch PulseAudio/PipeWire audio output sinks.
## Usage
```bash
./audio_toggle.sh [OPTION]
```
## Options
| Flag | Description |
|------|-------------|
| *(no args)* | Switch to the next available sink |
| `--to <pattern>` | Switch to a sink whose name matches `<pattern>` (case-insensitive) |
| `--prev`, `--previous` | Switch back to the previously active sink |
| `--list` | List all available sinks with descriptions |
| `--current` | Show the current default sink |
| `--move-streams` | Also move existing audio streams to the new sink |
| `--help`, `-h` | Show help message |
## Examples
```bash
audio_toggle.sh # next sink
audio_toggle.sh --to hdmi # switch to HDMI sink
audio_toggle.sh --prev # back to previous sink
audio_toggle.sh --list # see what's available
```
## Notes
- Sinks named `easyeffects` are automatically filtered out.
- The previous sink is stored in `~/.cache/audio-toggle-prev-sink`.
- Streams are not moved by default; use `--move-streams` to relocate them.