Skip to content

mel-edo/patchwire

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Patchwire

Route audio to multiple outputs simultaneously on Linux.

Play through your headphones and speakers at the same time. Patchwire watches the PipeWire graph and manages the links for you.

AUR version AUR version License: GPL v3 Rust


Preview

Image

Overview

Every time you connect a Bluetooth device or want to route audio to multiple outputs, you'd normally have to manually wire ports in Helvum or qpwgraph. Patchwire does this automatically.

  • Toggle any sink on or off as a secondary output
  • Control volume per device
  • Change your default output device from the UI
  • State persists across reboots
  • Daemon starts automatically on first launch

How it works

Patchwire runs a background daemon that connects directly to PipeWire via libpipewire. It watches the graph for new devices and manages pw::Link objects between your default sink's monitor ports and the playback ports of any enabled secondary sinks.

The GTK4 UI talks to the daemon over D-Bus (com.patchwire.Daemon). The CLI does the same.


Installation (for Arch based distros)

Via AUR

yay -S patchwire      # building from source
yay -S patchwire-bin  # prebuilt binary

Manual

To build from source, you will need the standard Rust toolchain and the GTK4 development libraries.

1. Install dependencies

Install rust toolchain via rustup

sudo pacman -S --needed pipewire pipewire-audio wireplumber gtk4 libadwaita

2. Clone and Build

git clone https://github.com/mel-edo/patchwire
cd patchwire
make install

Usage

GUI

Launch Patchwire from your app menu. The daemon starts automatically.

CLI

If you installed the app via make install or the AUR, the daemon runs automatically in the background via systemd as a user service.

If you are running the project manually without systemd, you will need to run patchwire daemon in a separate terminal first.

You can control it directly from your terminal:

patchwire list              # show all sinks
patchwire toggle <sink>     # toggle routing for a sink
patchwire volume <sink> 75  # set volume to 75%
patchwire help              # show all commands

The daemon runs as a systemd user service after make install and starts automatically on login.


Building from source

cargo build --release

Binaries in target/release/.

Contributing

Contributions are welcome. Feel free to open an issue or a PR.

License

GPL-3.0 - see LICENSE

About

Automatic multi-device audio routing for PipeWire

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors