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