Skip to content

feat(audio): mono audio toggle - #3539

Merged
bbedward merged 1 commit into
duxlabs-dev:masterfrom
dionjoshualobo:mono-audio-toggle
Sep 29, 2026
Merged

bbedward merged 1 commit into
duxlabs-dev:masterfrom
dionjoshualobo:mono-audio-toggle

Conversation

@dionjoshualobo

@dionjoshualobo dionjoshualobo commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Description

This PR adds a Mono Audio accessibility toggle to the audio settings. When enabled, all audio output is mixed down to a single channel, useful for users with hearing loss in one ear, or if one of their earbuds are lost

Consists of a:

  • new audioMono boolean setting (default is false)
  • runtime detection of mono support via pactl send-message /core pipewire-pulse:force-mono-output
  • new "Mono Audio" card at the top of the Audio settings page, that is disabled when the backend doesn't support the feature.
  • 10 new user-facing strings

Available commands are:

dms ipc call audio setmono true # enable mono
dms ipc call audio setmono false # disable mono
dms ipc call audio getmono # report state

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that changes existing behavior)
  • Refactor / internal cleanup
  • Documentation
  • Other

Related issues

Screenshots / video

1790143328066275658

Checklist

Copilot AI lite review requested due to automatic review settings September 23, 2026 06:15

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Comment thread quickshell/translations/en.json Outdated
@@ -8548,6 +8548,15 @@
"shell"
]
},
{

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Best to not committ any changes to en.json/template.json - they are auto-generated

@bbedward

Copy link
Copy Markdown
Member

/claude review

Comment thread quickshell/Services/AudioService.qml Outdated
// Detect mono audio support and mirror the live state into the setting
queryMonoSetting((supported, currentValue) => {
if (supported)
SettingsData.audioMono = currentValue;

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.

This makes the saved audioMono setting useless across restarts. pactl send-message and wpctl settings without --save are runtime-only, so after a reboot or a PipeWire restart the live value is false. This line then replaces the user's saved true with false, and it is never re-applied. Mono silently turns off for the user who relies on it.

Fix: apply the saved preference when support is detected instead of mirroring the live state, e.g. if (supported && currentValue !== SettingsData.audioMono) setMonoSetting(SettingsData.audioMono);. This also makes sure the query runs after settings finish loading.

@claude

claude Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Claude review

One real bug: the saved mono preference is lost on restart.

  • The startup query overwrites the saved audioMono with the live PipeWire state, which is runtime-only, so mono turns off after a reboot or PipeWire restart (quickshell/Services/AudioService.qml:1521)

Checked: AudioService mono query/set/IPC, the Connections handler and Proc debounce interaction, AudioTab toggle and revert, SettingsSpec/SettingsData wiring, translation usage (en.json/template.json edits already flagged). Model: claude-opus-5-5.

@hthienloc

Copy link
Copy Markdown
Member

/claude review

tab: "audio"
tags: ["audio", "mono"]
settingKey: "audioMono"
text: I18n.tr("Mono Audio")

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.

Several new strings have no translator context, which CONTRIBUTING.md requires: I18n.tr("Mono Audio") here, and in AudioService.qml "Mono audio enabled", "Mono audio not supported", "Mono audio toggle sent" and the second "Mono Audio" in getmono. Add a context argument to each, e.g. I18n.tr("Mono Audio", "Audio settings: mono audio toggle") to match the card title.

The IPC replies (setmono/getmono) may not need I18n.tr at all. Other IPC handlers in this file return plain English (e.g. "Audio muted"), and scripts parse this output.

@claude

claude Bot commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Claude review

The startup overwrite bug from the last review is fixed. One CONTRIBUTING issue remains.

  • New mono audio strings have no translator context, and the IPC replies probably should not be translated at all (quickshell/Modules/Settings/AudioTab.qml:135, quickshell/Services/AudioService.qml)

Checked: startup re-apply of the saved preference, settings-load handler, query guard, the Proc debounce interaction between the Connections handler and the toggle/IPC callbacks, failure revert, SettingsSpec/SettingsData wiring, search index entry. Model: claude-opus-5-5.

@dionjoshualobo

Copy link
Copy Markdown
Contributor Author

@bbedward Anything else? I did want to ask if this is a good feature to add

@bbedward

Copy link
Copy Markdown
Member

/claude review

@claude

claude Bot commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

Claude review

No issues found. Both earlier findings are fixed: the saved preference is re-applied on startup, and the settings strings now have translator context.

Checked: startup re-apply after settings load (the double call is blocked by the query guard), pactl/wpctl detection and fallback, how Proc debounce merges the Connections and toggle/IPC set calls, revert on failure, IPC setmono/getmono, SettingsSpec/SettingsData wiring, search index entry. en.json/template.json are no longer touched. Model: claude-opus-5-5.

@bbedward
bbedward merged commit 13034cb into duxlabs-dev:master Sep 29, 2026
2 checks passed
@dionjoshualobo
dionjoshualobo deleted the mono-audio-toggle branch November 6, 2026 14:24
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.

4 participants