8000 GitHub - dmsalomon/pulsemon: Simple program to monitor the PulseAudio default sink status efficiently
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
10000

Simple program to monitor the PulseAudio default sink status efficiently

Notifications You must be signed in to change notification settings

dmsalomon/pulsemon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

pulsemon

Simple program to monitor the PulseAudio default sink status efficiently.

usage

pulsemon

(some) details

pulsemon subscribes to the PulseAudio server, and registers a callback for the status of the default sink whenever a change to any sink is detected. More specifically, it listens on PA_SUBSCRIPTION_MASK_SINK and PA_SUBSCRIPTION_MASK_SINK_INPUT, which seemed to cover all the events I needed (all events can be seen here).

This program basically uses zero cpu and memory, since it is event driven is only runs a change is detected.

Each status update is a line of stdout with 3 space separated fields: the output device, volume percentage, and muted/unmuted.

example

I use this in my lemonbar like this:

pulsemon |
while read card vol mute; do
    echo "V${mute} ${vol}"
done |
sed -u -e 's/unmuted//' -e 's/muted//'

About

Simple program to monitor the PulseAudio default sink status efficiently

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0