This makes a significant difference in CPU usage when e.g. displaying the defaults in a panel.
|2 days ago|
|.gitignore||3 weeks ago|
|LICENSE||3 weeks ago|
|README.org||3 weeks ago|
|pw-access.el||2 weeks ago|
|pw-lib.el||2 days ago|
|pw-ui.el||1 week ago|
|screenshot.jpg||1 week ago|
pipewire-0 is an Emacs interface to PipeWire. It provides a library to access some PipeWire functionality and a simple user interface to handle audio devices. It allows displaying PipeWire devices and clients, changing volumes and muting and unmuting of PipeWire sinks and sources and setting default sinks and sources.
It is an experimental initial version that may be quite buggy. It works for me but may not work in other environments. Feel free to use it, fix it, fork it. Contact me if you want to discuss anything.
To install pipewire-0, put the *.el files to a site-lisp directory and add the following line to your Emacs configuration:
Or if you use straight.el, you can install pipewire-0 as follows:
(straight-use-package '(pipewire-0 :type git :repo "https://git.zamazal.org/pdm/pipewire-0" :local-repo "pipewire-0"))
M-x pipewire enters a buffer with PipeWire objects:
C-h m to display basic help.
Most of the interactive functions can be used anywhere:
They can be bound to multimedia keys:
(global-set-key (kbd "<XF86AudioMute>") 'pipewire-toggle-muted) (global-set-key (kbd "<XF86AudioLowerVolume>") 'pipewire-decrease-volume) (global-set-key (kbd "<XF86AudioRaiseVolume>") 'pipewire-increase-volume)
M-x customize-group RET pipewire RET
pipewire-0 consists of the following source files:
- PipeWire library to be used in Elisp programs.
- PipeWire communication interface, not supposed to be
- User commands and interface.
Look into pw-lib.el to see what public
pw-lib-* functions are
available there. For example, the following snippet can be used to
display current volume level of the default audio sink:
(let ((object (pw-lib-default-audio-sink))) (format "%s%s" (pw-lib-volume object t) (if (pw-lib-muted-p object) "(M)" "")))
PipeWire is currently accessed using pw-cli command line utility. Its output is apparently undocumented and changes between versions so this is not a reliable way to communicate with PipeWire. But I don’t know about anything better currently. Nevertheless, it’s easy to replace pw-cli with something else in pw-access.el.
Why is it named pipewire-0?
I wrote pipewire-0 because I couldn’t find any Emacs interface to PipeWire. I would name it simply pipewire or pipewire-el but I expect that someone will write a full-fledged PipeWire interface sooner or later. I’d like to avoid confusion and reserve the plain name for the future interface, while having the basic above zero, pipewire-0, support for now.