1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-06 05:25:41 -05:00

osd: add option to disable each OSD

This commit is contained in:
bbedward
2025-11-15 11:36:33 -05:00
parent 1c264d858b
commit cbb244f785
9 changed files with 122 additions and 8 deletions

View File

@@ -14,7 +14,7 @@ DankOSD {
Connections {
target: DisplayService
function onBrightnessChanged(showOsd) {
if (showOsd) {
if (showOsd && SettingsData.osdBrightnessEnabled) {
root.show()
}
}

View File

@@ -17,7 +17,7 @@ DankOSD {
target: DMSService
function onCapsLockStateChanged() {
if (lastCapsLockState !== DMSService.capsLockState) {
if (lastCapsLockState !== DMSService.capsLockState && SettingsData.osdCapsLockEnabled) {
root.show()
}
lastCapsLockState = DMSService.capsLockState

View File

@@ -14,7 +14,9 @@ DankOSD {
Connections {
target: SessionService
function onInhibitorChanged() {
root.show()
if (SettingsData.osdIdleInhibitorEnabled) {
root.show()
}
}
}

View File

@@ -14,7 +14,9 @@ DankOSD {
Connections {
target: AudioService
function onMicMuteChanged() {
root.show()
if (SettingsData.osdMicMuteEnabled) {
root.show()
}
}
}

View File

@@ -18,7 +18,7 @@ DankOSD {
target: typeof PowerProfiles !== "undefined" ? PowerProfiles : null
function onProfileChanged() {
if (lastProfile !== -1 && lastProfile !== PowerProfiles.profile) {
if (lastProfile !== -1 && lastProfile !== PowerProfiles.profile && SettingsData.osdPowerProfileEnabled) {
root.show()
}
lastProfile = PowerProfiles.profile

View File

@@ -15,13 +15,13 @@ DankOSD {
target: AudioService.sink && AudioService.sink.audio ? AudioService.sink.audio : null
function onVolumeChanged() {
if (!AudioService.suppressOSD) {
if (!AudioService.suppressOSD && SettingsData.osdVolumeEnabled) {
root.show()
}
}
function onMutedChanged() {
if (!AudioService.suppressOSD) {
if (!AudioService.suppressOSD && SettingsData.osdVolumeEnabled) {
root.show()
}
}
@@ -31,7 +31,7 @@ DankOSD {
target: AudioService
function onSinkChanged() {
if (root.shouldBeVisible) {
if (root.shouldBeVisible && SettingsData.osdVolumeEnabled) {
root.show()
}
}