Skip to content

Add cast-tv plugin - #401

Draft
andresparrab wants to merge 2 commits into
noctalia-dev:mainfrom
andresparrab:add-cast-to-tv-plugin
Draft

Add cast-tv plugin#401
andresparrab wants to merge 2 commits into
noctalia-dev:mainfrom
andresparrab:add-cast-to-tv-plugin

Conversation

@andresparrab

Copy link
Copy Markdown

Plugin

  • Id: andresparrab/cast-tv
  • New plugin
  • Update to an existing plugin (version bumped in plugin.toml)

What it does

Casts the desktop to a Wi-Fi Direct (Miracast) smart TV via FluxCast — a bar icon and a Control Center shortcut, both opening the same panel: a live Wi-Fi Direct scan, a TV picker, 720p/audio/bitrate options, and Cast/Stop.

External dependencies

  • fluxcast — the plugin shells out to it directly for scanning (fluxcast --protocol wfd --wfd-scan) and casting; it's the only thing that talks to the network (via NetworkManager's Wi-Fi Direct discovery underneath), the plugin makes no network calls of its own.
  • wf-recorder — forced as fluxcast's capture backend (--wfd-capture-backend wf-recorder) rather than its default portal negotiation, which can take ~15s on wlroots compositors, long enough that some TVs disconnect before the stream starts.
  • pkill -f wfd-peer (a standard system utility, not a manifest dependency) is used to stop casting — matched by the --wfd-peer flag in the specific fluxcast process this plugin started, not any other fluxcast instance a user might have running.

No filesystem writes beyond the plugin's own files.

Testing

Opened via both the bar icon and the Control Center shortcut, ran the live scan repeatedly (including against a real TV, confirming Cast/Stop both work end to end), toggled every option (720p, audio, bitrate). noctalia plugins lint and the repo's own validate-plugins.py both pass clean.

  • Tested on Niri
  • Tested on Hyprland
  • Tested on Sway
  • Tested on another compositor:
  • Noctalia version tested against: v5.0.0-beta.8
  • Plugin API level: 23

Screenshots / Videos

Cast to TV panel

Checklist

  • The directory name matches the part of id after the / in plugin.toml exactly.
  • It ships plugin.toml, README.md, thumbnail.webp, and translations/en.json.
  • README.md follows the README template, documents every entry id and dependency, and includes exact panel IPC commands and launcher prefixes where applicable.
  • I created thumbnail.webp with the thumbnail generator.
  • version follows semver and is bumped in this PR; plugin_api is the oldest API level this plugin requires.
  • Every non-English translation in this PR uses a locale supported by Noctalia core, and I can read, write, and understand that language well enough to review and maintain it (no unreviewed machine/LLM translations).
  • I did not edit catalog.toml; CI generates it.
  • 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 something the description above accounts for.
  • I have the right to publish this code under the license declared in plugin.toml.

andres parra added 2 commits August 18, 2026 15:20
Casts the desktop to a Wi-Fi Direct (Miracast) smart TV via FluxCast —
a bar icon and a Control Center shortcut, both opening a panel with a
live TV scan, 720p/audio/bitrate options, and Cast/Stop.
The manifest declares no label_key/description_key, but the CI
validator requires the file to exist unconditionally.
@ItsLemmy

ItsLemmy commented Aug 18, 2026

Copy link
Copy Markdown
Contributor
  1. blocking - cast-tv/panel.luau:313

pkill -f wfd-peer sends SIGTERM to every process whose full command line contains wfd-peer. It is not restricted
to fluxcast or to the process started by this plugin. This can terminate another casting session or an unrelated
process containing that argument. cast-tv/README.md:79 also incorrectly claims the command targets the specific
plugin-started process. Replace the broad process match with instance-specific termination and correct the
documentation.

  1. blocking - cast-tv/plugin.toml:10

The plugin invokes the external pkill command at cast-tv/panel.luau:313, but pkill is absent from the manifest
dependencies. Repository policy at README.md:53 requires every external command to be declared. Being commonly installed does not waive that requirement. Declare the command dependency, or remove the dependency by changing the stop implementation.

@ItsLemmy
ItsLemmy marked this pull request as draft August 18, 2026 21:23
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