Address momus review: fix icons, vertical layout, popup coordination

- Replace nerd font glyphs that were stripped during the initial widget
  writes with verified codepoints sourced from the JetBrains Mono Nerd
  Font cmap (cpu-64-bit, scale-balance, notification-clear-all, etc).
- systemStats now switches to a Column layout when the bar is vertical
  so the widget no longer overflows a 28px-wide side bar.
- Remove notificationCenter from defaults: it registers a notification
  server and would collide with the mako daemon Omarchy autostarts.
- PopupCard owns the popout coordinator lifecycle and delegates close to
  its widget owner when provided; calendar and media now pass owner.
- brightness debounces brightnessctl writes through a coalescing timer
  to avoid spawning a process per slider tick.
- audioPanel tracks unfiltered Pipewire sinks/streams via PwObjectTracker
  so audio metadata becomes available before filtering.
- ModuleSlot re-injects bar/moduleName/settings whenever the bar config
  serial changes so widget settings update live with bar.json.
- Guard null bar references in workspacesPro and systemStats components
  that are constructed before bar injection.
This commit is contained in:
Ryan Hughes
2026-05-14 02:21:47 -04:00
parent 221e0e1fcc
commit fe73986a01
13 changed files with 152 additions and 76 deletions
+24 -9
View File
@@ -18,21 +18,35 @@ Item {
readonly property var source: Pipewire.defaultAudioSource
readonly property var nodes: Pipewire.nodes ? Pipewire.nodes.values : []
readonly property var audioSinks: {
readonly property var candidateSinks: {
var list = []
for (var i = 0; i < nodes.length; i++) {
var node = nodes[i]
if (node && node.isSink && !node.isStream && node.audio) list.push(node)
if (node && node.isSink && !node.isStream) list.push(node)
}
return list
}
readonly property var candidateStreams: {
var list = []
for (var i = 0; i < nodes.length; i++) {
var node = nodes[i]
if (node && node.isStream && !node.isSink) list.push(node)
}
return list
}
readonly property var audioSinks: {
var list = []
for (var i = 0; i < candidateSinks.length; i++)
if (candidateSinks[i].audio) list.push(candidateSinks[i])
return list
}
readonly property var audioStreams: {
var list = []
for (var i = 0; i < nodes.length; i++) {
var node = nodes[i]
if (node && node.isStream && !node.isSink && node.audio) list.push(node)
}
for (var i = 0; i < candidateStreams.length; i++)
if (candidateStreams[i].audio) list.push(candidateStreams[i])
return list
}
@@ -65,8 +79,9 @@ Item {
implicitWidth: button.implicitWidth
implicitHeight: button.implicitHeight
PwObjectTracker { objects: root.audioSinks }
PwObjectTracker { objects: root.audioStreams }
PwObjectTracker { objects: root.candidateSinks }
PwObjectTracker { objects: root.candidateStreams }
PwObjectTracker { objects: root.sink ? [root.sink] : [] }
Common.WidgetButton {
id: button
@@ -224,7 +239,7 @@ Item {
node.properties ? node.properties["device.icon-name"] : "",
node.properties ? node.properties["device.product.name"] : ""
].join(" ")).toLowerCase()
if (blob.indexOf("headphone") !== -1 || blob.indexOf("headset") !== -1) return ""
if (blob.indexOf("headphone") !== -1 || blob.indexOf("headset") !== -1) return "󰋋"
if (blob.indexOf("bluetooth") !== -1) return "󰂯"
if (blob.indexOf("hdmi") !== -1 || blob.indexOf("display") !== -1) return "󰍹"
return "󰓃"