Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,53 @@ dependencies:

Then install wiremix with `cargo install wiremix`

## Building from Source

To build wiremix from source, you'll need:

* Rust 1.74.1 or later
* PipeWire development libraries
* pkg-config
* clang

### Prerequisites

Install the required dependencies for your distribution:

* **Ubuntu/Debian**: `sudo apt install cargo libpipewire-0.3-dev pkg-config clang`
* **Fedora**: `sudo dnf install cargo pipewire-devel clang`
* **Arch Linux**: `sudo pacman -S rust pipewire pkg-config clang`

### Build Steps

1. Clone the repository:
```bash
git clone https://github.com/tsowell/wiremix.git
cd wiremix
```

2. Build the project:
```bash
cargo build --release
```

3. The binary will be available at `target/release/wiremix`

4. Optionally, install it system-wide:
```bash
cargo install --path .
```

### Development Build

For development with debug symbols and faster compilation:

```bash
cargo build
```

The debug binary will be at `target/debug/wiremix`.

## Quick Start

1. Run `wiremix` to launch with default settings
Expand Down Expand Up @@ -93,6 +140,7 @@ Everything except quitting can also be done with the mouse. Some of the
less-intuitive mouse controls are:

* Click the numeric volume percentage to toggle muting.
* Use the mouse wheel over the volume bar to adjust volume (scroll up to increase, scroll down to decrease).
* Scroll through lists and dropdowns with the mouse wheel or click on scroll
buttons (default appearence: `•••`)
* Right-click to set as the default source/sink
Expand Down
18 changes: 18 additions & 0 deletions src/node_widget.rs
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,24 @@ impl StatefulWidget for VolumeWidget<'_> {
],
));

// Add mousewheel support for volume control on the volume bar
mouse_areas.push((
volume_bar,
smallvec![MouseEventKind::ScrollUp],
smallvec![
Action::SelectObject(self.node.object_id),
Action::SetRelativeVolume(0.05),
],
));
mouse_areas.push((
volume_bar,
smallvec![MouseEventKind::ScrollDown],
smallvec![
Action::SelectObject(self.node.object_id),
Action::SetRelativeVolume(-0.05),
],
));

// Add mouse areas for setting volume
for i in 0..=volume_bar.width {
let volume_area = Rect::new(
Expand Down