Skip to content

[screen-toolkit 1.4.0][BUG] screen-toolkit passes audio device as wf-recorder codec #525

Description

@screwys

This was generated by AI during triage.

Submission checklist

  • Searched existing issues; no duplicate found.
  • Using the latest Screen Toolkit version.
  • This is a community-plugin bug.

Plugin

screen-toolkit 1.4.0

Bug description

Screen Toolkit 1.4.0 generates an invalid command when desktop audio is enabled:

wf-recorder ... -a -C '$(pactl get-default-sink).monitor'

-C expects an audio codec, and the single quotes prevent device resolution. The recorder exits while plugin remains in recording state. I'm using the same keybind to start recording and stop it, so this is a breaking change for me.
I believe the recent hardening is what broke this?

Using --audio="$(pactl get-default-sink).monitor" fixes this. 3 line changes:

diff --git a/screen-toolkit/service.luau b/screen-toolkit/service.luau
@@
   if audioOut and audioIn then
-    table.insert(parts, isWl and "--audio" or "-a")
+    table.insert(parts, isWl and "--audio" or "--audio=\"$(pactl get-default-sink 2>/dev/null).monitor\"")
   elseif audioOut then
-    table.insert(parts, isWl and "--audio --audio-device '$(pactl get-default-sink 2>/dev/null).monitor'" or "-a -C '$(pactl get-default-sink 2>/dev/null).monitor'")
+    table.insert(parts, isWl and "--audio --audio-device \"$(pactl get-default-sink 2>/dev/null).monitor\"" or "--audio=\"$(pactl get-default-sink 2>/dev/null).monitor\"")
   elseif audioIn then
-    table.insert(parts, isWl and "--audio --audio-device '$(pactl get-default-source 2>/dev/null)'" or "-a -C '$(pactl get-default-source 2>/dev/null)'")
+    table.insert(parts, isWl and "--audio --audio-device \"$(pactl get-default-source 2>/dev/null)\"" or "--audio=\"$(pactl get-default-source 2>/dev/null)\"")
   end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions