dotfiles bugabingas dorkfiles
owned by bugabinga
README Source History Refs Reviews Compare Notes Search Review guide feat(audio): tap-device options drawer (set default + mute) bb54961752afac0abf8c0ffd5ba71a44721c53f7
Oliver Jan Krylow <oliver@bugabinga.net > · 29 Jun 2026
unsigned
Browse files Compare with HEAD
Tapping an output/input device now opens an inline options drawer with
explicit "set default" (hidden when already default) and mute/unmute
pills, replacing the undiscoverable left-click-to-default /
middle-click-to-mute gestures. The volume slider stays on the card; its
track MouseArea still wins over the card tap, so dragging volume never
opens the drawer.
As with the network panel, the per-list capped Flickables (which clipped
the drawer) are replaced by one outer scroll pane around the whole audio
panel, so drawers grow in-flow and a long device list scrolls.
No port/profile picker: PipeWire's PwNode exposes no routing, so the
drawer honestly offers only set-default + mute.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Changed files (1) Diff layout Auto Unified Split
quickshell/nuguland/PopoutHost.qml Modified +201 / −56 text lines
3877 3877 readonly property var sinks: state.sinks || [] readonly property var sinks: state.sinks || []3878 3878 readonly property var sources: state.sources || [] readonly property var sources: state.sources || []3879 3879 readonly property var streams: state.streams || [] readonly property var streams: state.streams || []
3881 + property string expandedSink: "" 3882 + property string expandedSource: "" 3882 3885 function refreshFrom (text) { function refreshFrom (text) {3926 3929 spacing: 10 spacing: 10 3927 3930 width: parent ? parent.width : 0 width: parent ? parent.width : 0
3936 + width : parent.width3937 + height : root.height3938 + contentWidth : width3939 + contentHeight : audioCol.height3941 + interactive : contentHeight > height3942 + boundsBehavior : Flickable .StopAtBounds3943 + flickableDirection : Flickable .VerticalFlick3948 + width : parent.width3940 3962 text: "output" text: "output" 3944 3966 width : parent.width width : parent.width3945 - height : Math .min (sinkListCol.height, 204 )3946 - contentHeight : sinkListCol.height3948 - interactive : contentHeight > height3949 - boundsBehavior : Flickable .StopAtBounds3954 - width : parent.width3975 + required property var modelData3976 + readonly property bool revealed : root.expandedSink === modelData.id3960 - delegate : Rectangle {3963 - required property var modelData3978 + width : parent.width3965 3982 width : parent.width width : parent.width3966 3983 height : 48 height : 48 3967 3984 radius : 12 radius : 12 3968 3985 color : root.theme ? root.theme.withAlpha(root.theme.ui.backdrop, sinkRow.modelData.isDefault ? 0.82 : 0.55 ) : "transparent" color : root.theme ? root.theme.withAlpha(root.theme.ui.backdrop, sinkRow.modelData.isDefault ? 0.82 : 0.55 ) : "transparent" 3969 - border.width: sinkRow.modelData.isDefault ? 2 : 1 3970 - border.color: root.theme ? (sinkRow.modelData.isDefault ? root.theme.ui.accent : root.theme.withAlpha(root.theme.ui.minor, 0.45 )) : "transparent" 3986 + border.width: ( sinkRow.modelData.isDefault || sinkRow . revealed ) ? 2 : 1 3987 + border.color: root.theme ? (sinkRow.modelData.isDefault ? root.theme.ui.accent : ( sinkRow . revealed ? root.theme.withAlpha(root.theme.ui.accent , 0 . 6 ) : root . theme . withAlpha ( root . theme . ui . minor, 0.45 ))) : "transparent" 3976 3992 MouseArea { MouseArea {3977 3993 anchors.fill: parent anchors.fill: parent3978 - acceptedButtons : Qt .LeftButton | Qt .MiddleButton3979 - onClicked : (event) => {3980 - if (event.button === Qt .MiddleButton)3981 - root.toggleMute(sinkRow.modelData.id);3983 - root.selectSink(sinkRow.modelData.id);3994 + onClicked : root.expandedSink = sinkRow.revealed ? "" : sinkRow.modelData.id4086 + visible : sinkRow.revealed4087 + width : parent.width4088 + height : visible ? sinkOpts.height + 16 : 0 4090 + color : root.theme ? root.theme.withAlpha(root.theme.ui.backdrop, 0.55 ) : "#333333" 4092 + border.color: root.theme ? root.theme.withAlpha(root.theme.ui.accent, 0.4 ) : "white" 4103 + visible : ! sinkRow.modelData.isDefault4107 + color : root.theme ? root.theme.withAlpha(root.theme.ui.accent, 0.18 ) : "transparent" 4109 + border.color: root.theme ? root.theme.withAlpha(root.theme.ui.accent, 0.7 ) : "white" 4112 + anchors.centerIn: parent4115 + text : "set default" 4119 + anchors.fill: parent4121 + root.expandedSink = "" ;4122 + root.selectSink(sinkRow.modelData.id);4132 + color : root.theme ? root.theme.withAlpha(sinkRow.modelData.muted ? root.theme.warning : root.theme.ui.accent, 0.18 ) : "transparent" 4134 + border.color: root.theme ? root.theme.withAlpha(sinkRow.modelData.muted ? root.theme.warning : root.theme.ui.accent, 0.7 ) : "white" 4137 + anchors.centerIn: parent4140 + text : sinkRow.modelData.muted ? "unmute" : "mute" 4144 + anchors.fill: parent4145 + onClicked : root.toggleMute(sinkRow.modelData.id)4090 4171 text: "input" text: "input" 4094 4175 width : parent.width width : parent.width4095 - height : Math .min (sourceListCol.height, 204 )4096 - contentHeight : sourceListCol.height4098 - interactive : contentHeight > height4099 - boundsBehavior : Flickable .StopAtBounds4179 + model : root.sources4104 - width : parent.width4108 - model : root.sources4184 + required property var modelData4185 + readonly property bool revealed : root.expandedSource === modelData.id4110 - delegate : Rectangle {4113 - required property var modelData4187 + width : parent.width4115 4191 width : parent.width width : parent.width4116 4192 height : 48 height : 48 4117 4193 radius : 12 radius : 12 4118 4194 color : root.theme ? root.theme.withAlpha(root.theme.ui.backdrop, sourceRow.modelData.isDefault ? 0.82 : 0.55 ) : "transparent" color : root.theme ? root.theme.withAlpha(root.theme.ui.backdrop, sourceRow.modelData.isDefault ? 0.82 : 0.55 ) : "transparent" 4119 - border.width: sourceRow.modelData.isDefault ? 2 : 1 4120 - border.color: root.theme ? (sourceRow.modelData.isDefault ? root.theme.ui.accent : root.theme.withAlpha(root.theme.ui.minor, 0.45 )) : "transparent" 4195 + border.width: ( sourceRow.modelData.isDefault || sourceRow . revealed ) ? 2 : 1 4196 + border.color: root.theme ? (sourceRow.modelData.isDefault ? root.theme.ui.accent : ( sourceRow . revealed ? root.theme.withAlpha(root.theme.ui.accent , 0 . 6 ) : root . theme . withAlpha ( root . theme . ui . minor, 0.45 ))) : "transparent" 4122 4198 MouseArea { MouseArea {4123 4199 anchors.fill: parent anchors.fill: parent4124 - acceptedButtons : Qt .LeftButton | Qt .MiddleButton4125 - onClicked : (event) => {4126 - if (event.button === Qt .MiddleButton)4127 - root.toggleMute(sourceRow.modelData.id);4129 - root.selectSource(sourceRow.modelData.id);4200 + onClicked : root.expandedSource = sourceRow.revealed ? "" : sourceRow.modelData.id4133 4203 Rectangle { Rectangle {4290 + visible : sourceRow.revealed4291 + width : parent.width4292 + height : visible ? sourceOpts.height + 16 : 0 4294 + color : root.theme ? root.theme.withAlpha(root.theme.ui.backdrop, 0.55 ) : "#333333" 4296 + border.color: root.theme ? root.theme.withAlpha(root.theme.ui.accent, 0.4 ) : "white" 4307 + visible : ! sourceRow.modelData.isDefault4311 + color : root.theme ? root.theme.withAlpha(root.theme.ui.accent, 0.18 ) : "transparent" 4313 + border.color: root.theme ? root.theme.withAlpha(root.theme.ui.accent, 0.7 ) : "white" 4316 + anchors.centerIn: parent4319 + text : "set default" 4323 + anchors.fill: parent4325 + root.expandedSource = "" ;4326 + root.selectSource(sourceRow.modelData.id);4336 + color : root.theme ? root.theme.withAlpha(sourceRow.modelData.muted ? root.theme.warning : root.theme.ui.accent, 0.18 ) : "transparent" 4338 + border.color: root.theme ? root.theme.withAlpha(sourceRow.modelData.muted ? root.theme.warning : root.theme.ui.accent, 0.7 ) : "white" 4341 + anchors.centerIn: parent4344 + text : sourceRow.modelData.muted ? "unmute" : "mute" 4348 + anchors.fill: parent4349 + onClicked : root.toggleMute(sourceRow.modelData.id)4227 4372 component MediaPanel : Column { component MediaPanel : Column {