Crates.io | rupamix |
lib.rs | rupamix |
version | 1.0.0 |
source | src |
created_at | 2023-11-28 14:39:12.453552 |
updated_at | 2023-12-14 18:22:51.671676 |
description | Rust PA Mixer is a cli tool for interfacing with Pulse Audio |
homepage | |
repository | https://github.com/fitpaulo/rupamix |
max_upload_size | |
id | 1052052 |
size | 111,926 |
This started a project to test my Rust chops after going through the rust book. It uses libpulse-binding to drive the interadtion with the Pulse server. It currently offers enough features to bind to keypresses for increasing, decreasing, and muting the default sink (speakers).
cargo install rupamix --profile optimized
git clone git@github.com:fitpaulo/rupamix.git \
&& cd rupamix \
&& cargo build --profile optimized
To use it with your window manger, i.e. bind it to a keyboard press, your window manager needs to see the binary. The easiest way is to copy the execsuteale into /usr/bin (this assumes you installed with cargo)
sudo cp $HOME/.cargo/bin/rupamix /usr/bin/.
Or you can link it:
sudo ln -sf $HOME/.cargo/bin/rupamix /usr/bin/.
To increase the audio by the defualt 5:
rupamix volume --increase
To increase the audio by N:
rupamix volume --increase <N>
To decrease the audio by the defualt 5:
rupamix volume --decrease
To decrease the audio by N:
rupamix volume --decrease <N>
To set the volume directly
rupamix volume set 120 --boost
To mute/unmute
rupamix volume --toggle-mute
To get the list of sink indexes and names:
rupamix print --volume
Index -- Name
--------------------------------------------------------------------
146 -- alsa_output.pci-0000_0b_00.4.iec958-stereo
(default) 150 -- alsa_output.usb-Audient_iD4-00.HiFi__hw_iD4__sink
315 -- alsa_output.pci-0000_09_00.1.hdmi-stereo-extra2
Then update a sink like the following:
rupamix --index 146 volume --increase 10
OR
rupamix --name alsa_output.pci-0000_0b_00.4.iec958-stereo volume --increase 10