Skip to content

Allows to set volume of non-active pulseaudio clients

License

Notifications You must be signed in to change notification settings

rhaas80/pa_volume

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pulseaudio volume setter

pa_volume is a simple tool to set the remembered volume level of pulseaudio clients. It requires module-stream-restore to be loaded (which is usually the case) to function. When called without arguments it shows all the known clients (running and non-running) and their remembered volume level. To set the volume level pass it the name of the client followed by the volume in percent.

Compiling

No configure script is provided right now, but there is a simple Makefile. You will need to have pkg-config and the development packages for libpulse installed. To create a man page, pandoc is required. On Debian/Ubuntu based distributions these are the pkg-config, libpulse-dev, pandoc packages.

sudo apt-get install pkg-config libpulse-dev pandoc
git clone https://github.com/rhaas80/pa_volume.git
cd pa_volume/
make

You can then test the executable using ./pa_volume.

Copy the executable (pa_volume) and man page (pa_volume.1) to a directory in your $PATH and $MANPATH, respectively.

AUR

This program is available on the AUR for Arch Linux-based distributions as pa_volume-git.

Alpine Linux

To compile and install on alpine Linux or other for Docker images these commands, suggested by @anvda may be used:

RUN set -ex && apk --no-cache add  build-base libpulse pulseaudio-dev make git
RUN cd /tmp && \
    git clone https://github.com/rhaas80/pa_volume.git && \
    cd pa_volume && \
    PKG_CONFIG_PATH=/usr/lib  make && \
    cp  pa_volume /usr/local/bin

Examples

pa_volume paplay 50.1

will set the volume of paplay to 50.1%.

pa_volume

will list all known clients and their rememebered volume level for each channel.

pa_volume paplay 66 alsa_output.pci-0000_00_1f.3.analog-stereo

will set the volume of paplay to 66% on a PCI sound device

pa_volume paplay toggle

will toggle mute for paplay

About

Allows to set volume of non-active pulseaudio clients

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •