Skip to main content

A simple script to control PulseAudio devices

Project description

pulseaudio_device_control

A simple script to control PulseAudio devices. Mainly this is to easily cycle the default sink or source.

Installation

pulseaudio_device_control depends on pulsectl.

This package can be installed using pipx:

pipx install pulseaudio_device_control

Usage

pulseaudio_device_control OPERATION DEVICE_TYPE

Where:

  • OPERATION is raise, lower, mute, or next
  • DEVICE_TYPE is sink or source

When using next any device name ending with monitor is skipped.

Configuration

pulseaudio_device_control can be configured with a file located at ~/.config/pulseaudio_device_control/config.ini, e.g.

[next]
# Ignore devices from the next command (devices ending in "monitor" are always ignored)
sink_ignore = ["sink_name1", "sink_name2"]
source_ignore = ["source_name1", "source_name2"]

The names of PulseAudio sink/source devices can be printed with:

import pulsectl

pulse = pulsectl.Pulse()
print([sink.name for sink in pulse.sink_list()])
print([source.name for source in pulse.source_list()])

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pulseaudio_device_control-0.3.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pulseaudio_device_control-0.3-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file pulseaudio_device_control-0.3.tar.gz.

File metadata

  • Download URL: pulseaudio_device_control-0.3.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for pulseaudio_device_control-0.3.tar.gz
Algorithm Hash digest
SHA256 51e26d261c2259c9d7e46f8387a2ed7e6091e2ad30250532496c50e58233a61b
MD5 d5c373d975852dd37c13bb979f64c07a
BLAKE2b-256 4c5d90273009c376b3a1b677432bf921d2567a631d98b42d57fec49cc6a01fb0

See more details on using hashes here.

File details

Details for the file pulseaudio_device_control-0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for pulseaudio_device_control-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 cc10262200ee376e938dd7e4837f2bd607b388e2143e8689227c8e605b93e933
MD5 0942674569cf157b0d8f77ed6305c294
BLAKE2b-256 8c2cdfe0207484dcbdfa513ae7a8d6428e90308beaa092c42a7ed615acfebbd6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page