aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/island/Obs.qml
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-10-17 15:56:45 +0200
committerDanilo M. <danix@danix.xyz>2026-10-17 15:56:45 +0200
commit52a2a2dad4b8e35a187b3b287ba32ffafd90b6a4 (patch)
treed2e9afcabce2a4eacaec46669ecd849ce5a68e52 /desktop/island/Obs.qml
parent9989c734c2a0dc8ee3d8074eee961fd01c71a801 (diff)
downloadquickshell-52a2a2dad4b8e35a187b3b287ba32ffafd90b6a4.tar.gz
quickshell-52a2a2dad4b8e35a187b3b287ba32ffafd90b6a4.zip
island: open the window source's properties from the pill
A Wayland window capture is chosen in the portal picker, which only OBS's source dialog can open. In a scene whose only source is a PipeWire capture, the panel gets a Window button that opens that dialog. A window scene with more than one source needs a per-scene designation the pill does not have yet.
Diffstat (limited to 'desktop/island/Obs.qml')
-rw-r--r--desktop/island/Obs.qml9
1 files changed, 9 insertions, 0 deletions
diff --git a/desktop/island/Obs.qml b/desktop/island/Obs.qml
index 9b8ba06..593e978 100644
--- a/desktop/island/Obs.qml
+++ b/desktop/island/Obs.qml
@@ -34,6 +34,9 @@ Singleton {
property real duration: 0
property var scenes: []
property string scene: ""
+ // The current scene's items as { name, kind }, for the window-source
+ // properties button. Kept current with the same GetSceneItemList call.
+ property var sources: []
// The webcam: the first v4l2_input item in the current scene, -1 for none.
// ponytail: a webcam inside a group or nested scene is not found; walk
// GetGroupSceneItemList if one ever is.
@@ -58,6 +61,10 @@ Singleton {
if (desktopAudio)
request("SetInputMute", { inputName: desktopAudio, inputMuted: !desktopMuted });
}
+ // Opens OBS's source dialog, which is where the Wayland portal picker runs.
+ function openSource(name) {
+ if (name) request("OpenInputPropertiesDialog", { inputName: name });
+ }
// The corner math assumes the webcam item is top-left aligned (alignment 5).
function moveCam(corner) {
if (camId < 0 || baseWidth <= 0 || camW <= 0 || camH <= 0) return;
@@ -109,6 +116,7 @@ Singleton {
recording = false; paused = false; duration = 0;
stateFromEvents = false;
scenes = []; scene = ""; camId = -1; camOn = false;
+ sources = [];
camW = 0; camH = 0;
desktopAudio = ""; desktopMuted = false;
baseWidth = 0; baseHeight = 0;
@@ -238,6 +246,7 @@ Singleton {
request("GetSceneItemList", { sceneName: scene });
break;
case "GetSceneItemList": {
+ sources = r.sceneItems.map(i => ({ name: i.sourceName, kind: i.inputKind }));
const it = r.sceneItems.find(i => i.inputKind === "v4l2_input");
camId = it ? it.sceneItemId : -1;
camOn = !!it && it.sceneItemEnabled;