1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-06-18 09:05:24 -04:00

feat(sounds): make muting sounds during media playback configurable (#2652)

Commit e3dbaed started skipping all system sounds (notifications, volume,
power, login) whenever an MPRIS player is playing, with no way to opt out.
Users who rely on notification sounds while listening to music lost them
entirely.

Add a 'Mute During Playback' toggle (SettingsData.muteSoundsWhenMediaPlaying,
default true) so the current behaviour is preserved, but users can disable
it to restore audible sounds while media is playing. The media check is
wrapped in shouldMuteForMedia(), which gates on the new setting before
querying the active player.

Closes #2616
This commit is contained in:
Rocho
2026-06-16 18:49:51 +02:00
committed by GitHub
parent cb29125580
commit 90f8ce5035
4 changed files with 29 additions and 6 deletions
+17
View File
@@ -131,6 +131,23 @@ Item {
checked: SettingsData.soundPluggedIn
onToggled: checked => SettingsData.set("soundPluggedIn", checked)
}
Rectangle {
width: parent.width
height: 1
color: Theme.outline
opacity: 0.2
}
SettingsToggleRow {
tab: "sounds"
tags: ["sound", "media", "playback", "mute", "mpris", "music"]
settingKey: "muteSoundsWhenMediaPlaying"
text: I18n.tr("Mute During Playback")
description: I18n.tr("Silence system sounds while media is playing")
checked: SettingsData.muteSoundsWhenMediaPlaying
onToggled: checked => SettingsData.set("muteSoundsWhenMediaPlaying", checked)
}
}
}