Skip to content

feat: add audio-output-switcher plugin - #110

Draft
rael2pac wants to merge 2 commits into
noctalia-dev:mainfrom
rael2pac:add-audio-output-switcher
Draft

feat: add audio-output-switcher plugin#110
rael2pac wants to merge 2 commits into
noctalia-dev:mainfrom
rael2pac:add-audio-output-switcher

Conversation

@rael2pac

Copy link
Copy Markdown

Plugin

  • Id: rael2pac/audio-output-switcher
  • New plugin

What it does

Route individual apps to different audio outputs. Each playing app appears in the panel with buttons to switch it to any available output (headphones, HDMI, Bluetooth, USB, etc.). Works with PipeWire/PulseAudio.

External dependencies

  • pactl for listing sinks and moving sink inputs

Testing

  • Tested on Niri
  • Tested on Hyprland
  • Tested on Sway
  • Noctalia version tested against: v5 latest
  • Plugin API level: 3

Screenshots / Videos

Checklist

  • Directory name matches the part of id after / in plugin.toml exactly.
  • Ships plugin.toml, README.md, thumbnail.webp, and translations/en.json.
  • README.md follows the README template.
  • Created thumbnail.webp with the thumbnail generator. (TODO)
  • version follows semver; plugin_api is the oldest API level required.
  • Did not edit catalog.toml.
  • This PR touches exactly one plugin directory.

Code review attestation

  • The code is readable and not obfuscated, minified, or generated.
  • It does not download and execute remote code.
  • Every network call, filesystem write, and spawned process is accounted for above.
  • I have the right to publish this code under the license declared in plugin.toml.

rael2pac added 2 commits July 26, 2026 01:29
- Route individual apps to different audio outputs
- Bar widget shows speaker icon, panel shows streams + output buttons
- Auto-detects output names from device identifiers
- Uses pactl for sink management
@ItsLemmy

Copy link
Copy Markdown
Contributor
  1. blocking - audio-output-switcher/plugin.toml:1

The manifest omits the required dependencies field even though service.luau:44 and panel.luau:49 execute pactl. This causes validation to fail. Declare
pactl and document it under a Requirements section in the README.

  1. blocking - audio-output-switcher/translations/en.json:2

The translations use flat dotted keys, and refreshInterval and noStreams contain uppercase characters. These violate the translation-key rules. Manifest
references at plugin.toml:30 and plugin.toml:31 also fail validation. Use nested JSON objects and consistent lowercase key segments throughout the
manifest and source.

  1. blocking - audio-output-switcher/widget.luau:46

The widget toggles rael2pac/audio-switcher:panel, but the declared panel is rael2pac/audio-output-switcher:panel at plugin.toml:1 and plugin.toml:20.
Clicking the bar widget therefore cannot open its panel as advertised.

  1. non-blocking - audio-output-switcher/panel.luau:157

Callbacks are generated for every stream, but handlers only exist for streams 1 through 6 at panel.luau:79 through panel.luau:113. The seventh and eighth
streams advertised in README.md:33 receive nonexistent callbacks, so their routing buttons will not work.

@ItsLemmy
ItsLemmy marked this pull request as draft July 26, 2026 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants