papersistd is a demo project of system daemon that wait for audio sink with specific name and make it PulseAudio default sink.
$ conan install . -if build # Optional. Skip if system dependencies are used.
$ export PKG_CONFIG_PATH="$PWD/build" # Optional. Skip if system dependencies are used.
$ cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$HOME/.local/bin"$ cmake --build build$ cmake --build --target installAlso it is required to set environment variables:
$ echo "PULSE_SERVER=unix:/run/user/1000/pulse/native" >> ~/.config/environment.d/papersistd.conf # Optional.
$ echo "PULSE_DEFAULT_SINK=alsa_output.some-name.analog-stereo" >> ~/.config/environment.d/papersistd.confand start the daemon:
$ systemctl --user start papersistd- Conan package manager (Optional)
- CMake build tool
- pkg-config
- C++ toolchain with C++17 support (other version is not tested)
- libpulse - The asynchronous PulseAudio API library and headers.