mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
feat: Add setting to disable lock key OSD notifications
This commit is contained in:
@@ -1675,6 +1675,10 @@
|
||||
"label": "General"
|
||||
}
|
||||
},
|
||||
"show-lock-key-notifications": {
|
||||
"description": "Show notifications when Caps Lock, Num Lock, or Scroll Lock keys are toggled.",
|
||||
"label": "Show lock key notifications"
|
||||
},
|
||||
"title": "On-Screen Display"
|
||||
},
|
||||
"screen-recorder": {
|
||||
|
||||
@@ -284,7 +284,8 @@
|
||||
"monitors": [],
|
||||
"autoHideMs": 2000,
|
||||
"overlayLayer": true,
|
||||
"backgroundOpacity": 1
|
||||
"backgroundOpacity": 1,
|
||||
"showLockKeyNotifications": true
|
||||
},
|
||||
"audio": {
|
||||
"volumeStep": 5,
|
||||
|
||||
@@ -460,6 +460,7 @@ Singleton {
|
||||
property int autoHideMs: 2000
|
||||
property bool overlayLayer: true
|
||||
property real backgroundOpacity: 1.0
|
||||
property bool showLockKeyNotifications: true
|
||||
}
|
||||
|
||||
// audio
|
||||
|
||||
@@ -205,6 +205,8 @@ Variants {
|
||||
target: LockKeysService
|
||||
|
||||
function onCapsLockChanged(active) {
|
||||
if (!Settings.data.osd.showLockKeyNotifications)
|
||||
return;
|
||||
root.currentOSDType = "lockkey";
|
||||
root.lastLockKeyChanged = active ? "CAPS ON" : "CAPS OFF";
|
||||
if (!root.active)
|
||||
@@ -214,6 +216,8 @@ Variants {
|
||||
}
|
||||
|
||||
function onNumLockChanged(active) {
|
||||
if (!Settings.data.osd.showLockKeyNotifications)
|
||||
return;
|
||||
root.currentOSDType = "lockkey";
|
||||
root.lastLockKeyChanged = active ? "NUM ON" : "NUM OFF";
|
||||
if (!root.active)
|
||||
@@ -223,6 +227,8 @@ Variants {
|
||||
}
|
||||
|
||||
function onScrollLockChanged(active) {
|
||||
if (!Settings.data.osd.showLockKeyNotifications)
|
||||
return;
|
||||
root.currentOSDType = "lockkey";
|
||||
root.lastLockKeyChanged = active ? "SCROLL ON" : "SCROLL OFF";
|
||||
if (!root.active)
|
||||
|
||||
@@ -99,6 +99,13 @@ ColumnLayout {
|
||||
onToggled: checked => Settings.data.osd.overlayLayer = checked
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("settings.osd.show-lock-key-notifications.label", "Show lock key notifications")
|
||||
description: I18n.tr("settings.osd.show-lock-key-notifications.description", "Show notifications when Caps Lock, Num Lock, or Scroll Lock keys are toggled.")
|
||||
checked: Settings.data.osd.showLockKeyNotifications
|
||||
onToggled: checked => Settings.data.osd.showLockKeyNotifications = checked
|
||||
}
|
||||
|
||||
NLabel {
|
||||
label: I18n.tr("settings.osd.background-opacity.label", "Background opacity")
|
||||
description: I18n.tr("settings.osd.background-opacity.description", "Controls the transparency of the OSD background.")
|
||||
|
||||
Reference in New Issue
Block a user