1# PulseAudio Sink Cycle
2
3Pats is a command-line tool for managing PulseAudio audio sinks that allows you
4to list available audio outputs and cycles between them seamlessly.
5
6## Features
7
8| Feature | Description |
9|---------|-------------|
10| **List audio sinks** | Display all available PulseAudio sinks with active status |
11| **Toggle between sinks** | Switch between available audio outputs |
12
13## How to use
14
15> [!IMPORTANT]
16> Make sure you have the required dependencies installed before
17> building the project.
18
19First, ensure you have the necessary development libraries installed:
20
21```sh
22# On Void Linux
23sudo xbps-install -S pulseaudio-devel
24
25# On Debian/Ubuntu
26sudo apt-get install libpulse-dev
27
28# On Fedora/RHEL
29sudo dnf install pulseaudio-libs-devel
30
31# On Arch Linux
32sudo pacman -S pulseaudio
33```
34
35Build the project:
36
37```sh
38make
39sudo make install
40```
41
42### Command line options
43
44The tool supports several command line options:
45
46```sh
47pats [OPTIONS]
48
49Options:
50 -l, --list List all available audio sinks
51 -t, --toggle Toggle between available audio sinks
52 -h, --help Show this help message
53```
54
55### Examples
56
57List all available audio sinks:
58```sh
59pats --list
60```
61
62Toggle to the next available audio sink:
63```sh
64pats --toggle
65```
66
67Short option syntax:
68```sh
69pats -l # List sinks
70pats -t # Toggle sinks
71```
72
73## Building from source
74
75The project uses a simple Makefile for building. Available targets:
76
77```sh
78make # Build the executable (default)
79make clean # Remove build artifacts
80sudo make install # Install to /usr/local/bin/
81sudo make uninstall # Remove from /usr/local/bin/
82```
83
84### Debugging
85
86Enable verbose output by modifying the source code or using
87debugging tools like `gdb`:
88
89```sh
90gdb ./pats
91```
92
93## License
94
95[pats](https://github.com/mitjafelicijan/pats) was written by [Mitja
96Felicijan](https://mitjafelicijan.com) and is released under the BSD two-clause
97license, see the LICENSE file for more information.