Skip to content

Prefer mute over device class for the audio bar glyph - #8883

Closed
chessing234 wants to merge 3 commits into
omacom:quattrofrom
chessing234:fix/omarchy-audio-mute-icon
Closed

chessing234 wants to merge 3 commits into
omacom:quattrofrom
chessing234:fix/omarchy-audio-mute-icon

Conversation

@chessing234

@chessing234 chessing234 commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Mute state now wins over the headphones glyph, so a muted headset can show as muted.
  • An unbound sink (.audio null, common for Bluetooth connected after shell start) uses the device glyph instead of the muted speaker.
  • Keep the default sink/source in PwObjectTracker so mid-session devices bind without a shell restart.

Fixes #8744.

Test plan

  • bash test/shell.d/audio-test.sh
  • Connect Bluetooth headphones after boot; confirm bar is not the muted glyph while unmuted
  • Mute headphones; confirm muted glyph appears

Headphones returned early, so a muted headset never showed as muted.
An unbound sink (.audio null) reused the muted speaker glyph, so a
Bluetooth output connected after shell start looked silenced.
PwObjectTracker only saw candidateSinks from nodes.values. Keep the
current default sink/source in the set so .audio populates without a
shell restart.
Copilot AI balanced review requested due to automatic review settings August 29, 2026 06:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates audio glyph selection and PipeWire tracking for dynamically connected devices.

Changes:

  • Prioritizes mute state over headphone glyphs.
  • Tracks late-appearing default audio devices.
  • Adds glyph and tracker regression checks.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
shell/plugins/panels/audio/Model.js Centralizes output glyph selection.
shell/plugins/panels/audio/Panel.qml Tracks default sink/source and delegates glyph selection.
test/shell.d/audio-test.sh Adds regression checks for audio glyph behavior.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +32 to +33
assertEqual(audio.outputBarIcon(headphones, 0.4, true), '', 'audio shows muted glyph for muted headphones')
assertEqual(audio.outputBarIcon(headphones, 0.4, false), '󰋋', 'audio shows headphones glyph when unmuted')

// Default sink/source can appear after shell start (Bluetooth). Keep them
// in the tracker set even if they are briefly missing from nodes.values,
// otherwise .audio stays null and the bar paints the muted glyph.
nodeProps: nodeProps,
nodeLabel: nodeLabel,
isHeadphones: isHeadphones,
outputBarIcon: outputBarIcon,
Comment on lines +107 to +110
if (!node) return ""
if (muted) return ""
if (!node.audio) return sinkGlyph(node)
if (isHeadphones(node)) return "󰋋"
@chessing234

Copy link
Copy Markdown
Contributor Author

@dhh @ryanrhughes ready for review

@chessing234

Copy link
Copy Markdown
Contributor Author

folding into #12115 with the other bar panel fixes

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.

omarchy.audio: bar shows the muted glyph for an unmuted Bluetooth sink connected after shell start, and never shows muted for headphone outputs

2 participants