From 5d0fc4870688413af426b92c28d1d880776784e9 Mon Sep 17 00:00:00 2001 From: euletheia <154215350+euletheia@users.noreply.github.com> Date: Tue, 2 Jun 2026 18:25:35 +0000 Subject: [PATCH] Add DoNotDisturb & IdleInhibitor Indicators for the ControlCenterButton widget + Add optional icon to KeyboardLayoutName widget (#2513) * feat(ControlCenterButton): add IdleInhibitor icon * feat(ControlCenterButton): add DoNotDisturb icon * fix(WidgetTabSection): adjust text width for the SystemTray Widget popup * feat(KeyboardLayoutName): add optional icon * refactor(KeyboardLayoutName): simplify icon visibility logic by using root.showIcon --------- --- quickshell/Common/SettingsData.qml | 3 + quickshell/Common/settings/SettingsSpec.js | 3 + .../DankBar/Widgets/ControlCenterButton.qml | 24 ++- .../DankBar/Widgets/KeyboardLayoutName.qml | 10 ++ quickshell/Modules/Settings/WidgetsTab.qml | 39 ++++- .../Modules/Settings/WidgetsTabSection.qml | 153 +++++++++++++++++- 6 files changed, 225 insertions(+), 7 deletions(-) diff --git a/quickshell/Common/SettingsData.qml b/quickshell/Common/SettingsData.qml index 37d1c430..be0f7187 100644 --- a/quickshell/Common/SettingsData.qml +++ b/quickshell/Common/SettingsData.qml @@ -315,6 +315,8 @@ Singleton { property bool controlCenterShowBatteryIcon: false property bool controlCenterShowPrinterIcon: false property bool controlCenterShowScreenSharingIcon: true + property bool controlCenterShowIdleInhibitorIcon: false + property bool controlCenterShowDoNotDisturbIcon: false property bool showPrivacyButton: true property bool privacyShowMicIcon: false property bool privacyShowCameraIcon: false @@ -405,6 +407,7 @@ Singleton { property int appsDockEnlargePercentage: 125 property int appsDockIconSizePercentage: 100 property bool keyboardLayoutNameCompactMode: false + property bool keyboardLayoutNameShowIcon: false property bool runningAppsCurrentWorkspace: true property bool runningAppsGroupByApp: false property bool runningAppsCurrentMonitor: false diff --git a/quickshell/Common/settings/SettingsSpec.js b/quickshell/Common/settings/SettingsSpec.js index 8d5451ac..fed8de8d 100644 --- a/quickshell/Common/settings/SettingsSpec.js +++ b/quickshell/Common/settings/SettingsSpec.js @@ -104,6 +104,8 @@ var SPEC = { controlCenterShowBatteryIcon: { def: false }, controlCenterShowPrinterIcon: { def: false }, controlCenterShowScreenSharingIcon: { def: true }, + controlCenterShowIdleInhibitorIcon: { def: false }, + controlCenterShowDoNotDisturbIcon: { def: false }, showPrivacyButton: { def: true }, privacyShowMicIcon: { def: false }, @@ -165,6 +167,7 @@ var SPEC = { appsDockEnlargePercentage: { def: 125 }, appsDockIconSizePercentage: { def: 100 }, keyboardLayoutNameCompactMode: { def: false }, + keyboardLayoutNameShowIcon: { def: false}, runningAppsCurrentWorkspace: { def: true }, runningAppsGroupByApp: { def: false }, runningAppsCurrentMonitor: { def: false }, diff --git a/quickshell/Modules/DankBar/Widgets/ControlCenterButton.qml b/quickshell/Modules/DankBar/Widgets/ControlCenterButton.qml index e4717499..8ea15d90 100644 --- a/quickshell/Modules/DankBar/Widgets/ControlCenterButton.qml +++ b/quickshell/Modules/DankBar/Widgets/ControlCenterButton.qml @@ -26,6 +26,8 @@ BasePill { property bool showBatteryIcon: widgetData?.showBatteryIcon !== undefined ? widgetData.showBatteryIcon : SettingsData.controlCenterShowBatteryIcon property bool showPrinterIcon: widgetData?.showPrinterIcon !== undefined ? widgetData.showPrinterIcon : SettingsData.controlCenterShowPrinterIcon property bool showScreenSharingIcon: widgetData?.showScreenSharingIcon !== undefined ? widgetData.showScreenSharingIcon : SettingsData.controlCenterShowScreenSharingIcon + property bool showIdleInhibitorIcon: widgetData?.showIdleInhibitorIcon !== undefined ? widgetData.showIdleInhibitorIcon : SettingsData.controlCenterShowIdleInhibitorIcon + property bool showDoNotDisturbIcon: widgetData?.showDoNotDisturbIcon !== undefined ? widgetData.showDoNotDisturbIcon : SettingsData.controlCenterShowDoNotDisturbIcon property real touchpadThreshold: 100 property real micAccumulator: 0 property real volumeAccumulator: 0 @@ -40,7 +42,7 @@ BasePill { property var _vBrightness: null property var _vMic: null property var _interactionDelegates: [] - readonly property var defaultControlCenterGroupOrder: ["network", "vpn", "bluetooth", "audio", "microphone", "brightness", "battery", "printer", "screenSharing"] + readonly property var defaultControlCenterGroupOrder: ["network", "vpn", "bluetooth", "audio", "microphone", "brightness", "battery", "printer", "screenSharing", "idleInhibitor", "doNotDisturb"] readonly property var effectiveControlCenterGroupOrder: getEffectiveControlCenterGroupOrder() readonly property var controlCenterRenderModel: getControlCenterRenderModel() @@ -353,6 +355,10 @@ BasePill { return root.showBatteryIcon && BatteryService.batteryAvailable; case "printer": return root.showPrinterIcon && CupsService.cupsAvailable && root.hasPrintJobs(); + case "idleInhibitor": + return root.showIdleInhibitorIcon && SessionService.idleInhibited; + case "doNotDisturb": + return root.showDoNotDisturbIcon && SessionData.doNotDisturb; default: return false; } @@ -512,6 +518,10 @@ BasePill { return Theme.getBatteryIcon(BatteryService.batteryLevel, BatteryService.isCharging, BatteryService.batteryAvailable); case "printer": return "print"; + case "idleInhibitor": + return "motion_sensor_active"; + case "doNotDisturb": + return "do_not_disturb_on"; default: return "settings"; } @@ -531,6 +541,10 @@ BasePill { return root.getBatteryIconColor(); case "printer": return Theme.primary; + case "idleInhibitor": + return Theme.primary; + case "doNotDisturb": + return Theme.primary; default: return Theme.widgetIconColor; } @@ -689,6 +703,10 @@ BasePill { return Theme.getBatteryIcon(BatteryService.batteryLevel, BatteryService.isCharging, BatteryService.batteryAvailable); case "printer": return "print"; + case "idleInhibitor": + return "motion_sensor_active"; + case "doNotDisturb": + return "do_not_disturb_on"; default: return "settings"; } @@ -708,6 +726,10 @@ BasePill { return root.getBatteryIconColor(); case "printer": return Theme.primary; + case "idleInhibitor": + return Theme.primary; + case "doNotDisturb": + return Theme.primary; default: return Theme.widgetIconColor; } diff --git a/quickshell/Modules/DankBar/Widgets/KeyboardLayoutName.qml b/quickshell/Modules/DankBar/Widgets/KeyboardLayoutName.qml index 8b49a7d1..a3f7ccc4 100644 --- a/quickshell/Modules/DankBar/Widgets/KeyboardLayoutName.qml +++ b/quickshell/Modules/DankBar/Widgets/KeyboardLayoutName.qml @@ -11,6 +11,7 @@ BasePill { property var widgetData: null property bool compactMode: widgetData?.keyboardLayoutNameCompactMode !== undefined ? widgetData.keyboardLayoutNameCompactMode : SettingsData.keyboardLayoutNameCompactMode + property bool showIcon: widgetData?.keyboardLayoutNameShowIcon !== undefined ? widgetData.keyboardLayoutNameShowIcon : SettingsData.keyboardLayoutNameShowIcon readonly property var langCodes: ({ "afrikaans": "af", "albanian": "sq", @@ -134,6 +135,7 @@ BasePill { size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale) color: Theme.widgetTextColor anchors.horizontalCenter: parent.horizontalCenter + visible: root.showIcon } StyledText { @@ -156,6 +158,14 @@ BasePill { anchors.centerIn: parent spacing: Theme.spacingS + DankIcon { + name: "keyboard" + size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale) + color: Theme.widgetTextColor + anchors.verticalCenter: parent.verticalCenter + visible: root.showIcon + } + StyledText { text: { if (!root.currentLayout) diff --git a/quickshell/Modules/Settings/WidgetsTab.qml b/quickshell/Modules/Settings/WidgetsTab.qml index 252c209b..5c53309d 100644 --- a/quickshell/Modules/Settings/WidgetsTab.qml +++ b/quickshell/Modules/Settings/WidgetsTab.qml @@ -392,7 +392,9 @@ Item { widgetObj.showBatteryIcon = SettingsData.controlCenterShowBatteryIcon; widgetObj.showPrinterIcon = SettingsData.controlCenterShowPrinterIcon; widgetObj.showScreenSharingIcon = SettingsData.controlCenterShowScreenSharingIcon; - widgetObj.controlCenterGroupOrder = ["network", "vpn", "bluetooth", "audio", "microphone", "brightness", "battery", "printer", "screenSharing"]; + widgetObj.showIdleInhibitorIcon = SettingsData.controlCenterShowIdleInhibitorIcon; + widgetObj.showDoNotDisturbIcon = SettingsData.controlCenterShowDoNotDisturbIcon; + widgetObj.controlCenterGroupOrder = ["network", "vpn", "bluetooth", "audio", "microphone", "brightness", "battery", "printer", "screenSharing", "idleInhibitor", "doNotDisturb"]; } if (widgetId === "runningApps") { widgetObj.runningAppsCompactMode = SettingsData.runningAppsCompactMode; @@ -432,7 +434,7 @@ Item { "id": widget.id, "enabled": widget.enabled }; - var keys = ["size", "selectedGpuIndex", "pciId", "mountPath", "diskUsageMode", "minimumWidth", "showSwap", "showInGb", "mediaSize", "clockCompactMode", "focusedWindowSize", "focusedWindowCompactMode", "runningAppsCompactMode", "keyboardLayoutNameCompactMode", "runningAppsGroupByApp", "runningAppsCurrentWorkspace", "runningAppsCurrentMonitor", "showNetworkIcon", "showBluetoothIcon", "showAudioIcon", "showAudioPercent", "showVpnIcon", "showBrightnessIcon", "showBrightnessPercent", "showMicIcon", "showMicPercent", "showBatteryIcon", "showPrinterIcon", "showScreenSharingIcon", "controlCenterGroupOrder", "barMaxVisibleApps", "barMaxVisibleRunningApps", "barShowOverflowBadge", "trayUseInlineExpansion", "hideWhenIdle"]; + var keys = ["size", "selectedGpuIndex", "pciId", "mountPath", "diskUsageMode", "minimumWidth", "showSwap", "showInGb", "mediaSize", "clockCompactMode", "focusedWindowSize", "focusedWindowCompactMode", "runningAppsCompactMode", "keyboardLayoutNameCompactMode", "keyboardLayoutNameShowIcon", "runningAppsGroupByApp", "runningAppsCurrentWorkspace", "runningAppsCurrentMonitor", "showNetworkIcon", "showBluetoothIcon", "showAudioIcon", "showAudioPercent", "showVpnIcon", "showBrightnessIcon", "showBrightnessPercent", "showMicIcon", "showMicPercent", "showBatteryIcon", "showPrinterIcon", "showScreenSharingIcon", "showIdleInhibitorIcon", "showDoNotDisturbIcon", "controlCenterGroupOrder", "barMaxVisibleApps", "barMaxVisibleRunningApps", "barShowOverflowBadge", "trayUseInlineExpansion", "hideWhenIdle"]; for (var i = 0; i < keys.length; i++) { if (widget[keys[i]] !== undefined) result[keys[i]] = widget[keys[i]]; @@ -545,6 +547,24 @@ Item { } } + function handleKeyboardLayoutNameSettingChanged(sectionId, widgetIndex, settingName, value) { + var widgets = getWidgetsForSection(sectionId).slice(); + if (widgetIndex < 0 || widgetIndex >= widgets.length) { + setWidgetsForSection(sectionId, widgets); + return; + } + var newWidget = cloneWidgetData(widgets[widgetIndex]); + + switch (settingName) { + case "showIcon": + newWidget["keyboardLayoutNameShowIcon"] = value; + break; + } + + widgets[widgetIndex] = newWidget; + setWidgetsForSection(sectionId, widgets); + } + function handleMinimumWidthChanged(sectionId, widgetIndex, enabled) { var widgets = getWidgetsForSection(sectionId).slice(); if (widgetIndex < 0 || widgetIndex >= widgets.length) { @@ -717,6 +737,10 @@ Item { item.showPrinterIcon = widget.showPrinterIcon; if (widget.showScreenSharingIcon !== undefined) item.showScreenSharingIcon = widget.showScreenSharingIcon; + if (widget.showIdleInhibitorIcon !== undefined) + item.showIdleInhibitorIcon = widget.showIdleInhibitorIcon; + if (widget.showDoNotDisturbIcon !== undefined) + item.showDoNotDisturbIcon = widget.showDoNotDisturbIcon; if (widget.controlCenterGroupOrder !== undefined) item.controlCenterGroupOrder = widget.controlCenterGroupOrder; if (widget.minimumWidth !== undefined) @@ -743,6 +767,8 @@ Item { item.runningAppsCurrentMonitor = widget.runningAppsCurrentMonitor; if (widget.keyboardLayoutNameCompactMode !== undefined) item.keyboardLayoutNameCompactMode = widget.keyboardLayoutNameCompactMode; + if (widget.keyboardLayoutNameShowIcon !== undefined) + item.keyboardLayoutNameShowIcon = widget.keyboardLayoutNameShowIcon; if (widget.barMaxVisibleApps !== undefined) item.barMaxVisibleApps = widget.barMaxVisibleApps; if (widget.barMaxVisibleRunningApps !== undefined) @@ -1024,6 +1050,9 @@ Item { onPrivacySettingChanged: (sectionId, index, setting, value) => { widgetsTab.handlePrivacySettingChanged(sectionId, index, setting, value); } + onKeyboardLayoutNameSettingChanged: (sectionId, index, setting, value) => { + widgetsTab.handleKeyboardLayoutNameSettingChanged(sectionId, index, setting, value); + } onMinimumWidthChanged: (sectionId, index, enabled) => { widgetsTab.handleMinimumWidthChanged(sectionId, index, enabled); } @@ -1097,6 +1126,9 @@ Item { onPrivacySettingChanged: (sectionId, index, setting, value) => { widgetsTab.handlePrivacySettingChanged(sectionId, index, setting, value); } + onKeyboardLayoutNameSettingChanged: (sectionId, index, setting, value) => { + widgetsTab.handleKeyboardLayoutNameSettingChanged(sectionId, index, setting, value); + } onMinimumWidthChanged: (sectionId, index, enabled) => { widgetsTab.handleMinimumWidthChanged(sectionId, index, enabled); } @@ -1170,6 +1202,9 @@ Item { onPrivacySettingChanged: (sectionId, index, setting, value) => { widgetsTab.handlePrivacySettingChanged(sectionId, index, setting, value); } + onKeyboardLayoutNameSettingChanged: (sectionId, index, setting, value) => { + widgetsTab.handleKeyboardLayoutNameSettingChanged(sectionId, index, setting, value); + } onMinimumWidthChanged: (sectionId, index, enabled) => { widgetsTab.handleMinimumWidthChanged(sectionId, index, enabled); } diff --git a/quickshell/Modules/Settings/WidgetsTabSection.qml b/quickshell/Modules/Settings/WidgetsTabSection.qml index dc71c532..e1c7a2b4 100644 --- a/quickshell/Modules/Settings/WidgetsTabSection.qml +++ b/quickshell/Modules/Settings/WidgetsTabSection.qml @@ -30,6 +30,7 @@ Column { signal controlCenterSettingChanged(string sectionId, int widgetIndex, string settingName, bool value) signal controlCenterGroupOrderChanged(string sectionId, int widgetIndex, var groupOrder) signal privacySettingChanged(string sectionId, int widgetIndex, string settingName, bool value) + signal keyboardLayoutNameSettingChanged(string sectionId, int widgetIndex, string settingName, bool value) signal minimumWidthChanged(string sectionId, int widgetIndex, bool enabled) signal showSwapChanged(string sectionId, int widgetIndex, bool enabled) signal showInGbChanged(string sectionId, int widgetIndex, bool enabled) @@ -42,7 +43,7 @@ Column { "id": widget.id, "enabled": widget.enabled }; - var keys = ["size", "selectedGpuIndex", "pciId", "mountPath", "diskUsageMode", "showMountPath", "minimumWidth", "showSwap", "showInGb", "mediaSize", "clockCompactMode", "focusedWindowSize", "focusedWindowCompactMode", "runningAppsCompactMode", "keyboardLayoutNameCompactMode", "runningAppsGroupByApp", "runningAppsCurrentWorkspace", "runningAppsCurrentMonitor", "showNetworkIcon", "showBluetoothIcon", "showAudioIcon", "showAudioPercent", "showVpnIcon", "showBrightnessIcon", "showBrightnessPercent", "showMicIcon", "showMicPercent", "showBatteryIcon", "showPrinterIcon", "showScreenSharingIcon", "controlCenterGroupOrder", "barMaxVisibleApps", "barMaxVisibleRunningApps", "barShowOverflowBadge", "trayUseInlineExpansion"]; + var keys = ["size", "selectedGpuIndex", "pciId", "mountPath", "diskUsageMode", "minimumWidth", "showSwap", "showInGb", "mediaSize", "clockCompactMode", "focusedWindowSize", "focusedWindowCompactMode", "runningAppsCompactMode", "keyboardLayoutNameCompactMode", "keyboardLayoutNameShowIcon", "runningAppsGroupByApp", "runningAppsCurrentWorkspace", "runningAppsCurrentMonitor", "showNetworkIcon", "showBluetoothIcon", "showAudioIcon", "showAudioPercent", "showVpnIcon", "showBrightnessIcon", "showBrightnessPercent", "showMicIcon", "showMicPercent", "showBatteryIcon", "showPrinterIcon", "showScreenSharingIcon", "showIdleInhibitorIcon", "showDoNotDisturbIcon", "controlCenterGroupOrder", "barMaxVisibleApps", "barMaxVisibleRunningApps", "barShowOverflowBadge", "trayUseInlineExpansion"]; for (var i = 0; i < keys.length; i++) { if (widget[keys[i]] !== undefined) result[keys[i]] = widget[keys[i]]; @@ -557,6 +558,40 @@ Column { } } + DankActionButton { + id: kbdLayoutCtxMenuButton + buttonSize: 32 + visible: modelData.id === "keyboard_layout_name" + iconName: "more_vert" + iconSize: 18 + iconColor: Theme.outline + + onClicked: { + kbdLayoutCtxMenu.widgetData = modelData; + kbdLayoutCtxMenu.sectionId = root.sectionId; + kbdLayoutCtxMenu.widgetIndex = index; + + var buttonPos = kbdLayoutCtxMenuButton.mapToItem(root, 0, 0); + var popupWidth = kbdLayoutCtxMenu.width; + var popupHeight = kbdLayoutCtxMenu.height; + + var xPos = buttonPos.x - popupWidth - Theme.spacingS; + if (xPos < 0) + xPos = buttonPos.x + kbdLayoutCtxMenuButton.width + Theme.spacingS; + + var yPos = buttonPos.y - popupHeight / 2 + kbdLayoutCtxMenuButton.height / 2; + if (yPos < 0) { + yPos = Theme.spacingS; + } else if (yPos + popupHeight > root.height) { + yPos = root.height - popupHeight - Theme.spacingS; + } + + kbdLayoutCtxMenu.x = xPos; + kbdLayoutCtxMenu.y = yPos; + kbdLayoutCtxMenu.open(); + } + } + DankActionButton { id: appsDockMenuButton buttonSize: 32 @@ -1019,7 +1054,7 @@ Column { property int widgetIndex: -1 readonly property var currentWidgetData: (widgetIndex >= 0 && widgetIndex < root.items.length) ? root.items[widgetIndex] : widgetData - width: 220 + width: 280 height: contentColumn.implicitHeight + Theme.spacingS * 2 padding: 0 modal: true @@ -1093,6 +1128,92 @@ Column { } } + Popup { + id: kbdLayoutCtxMenu + + property var widgetData: null + property string sectionId: "" + property int widgetIndex: -1 + readonly property var currentWidgetData: (widgetIndex >= 0 && widgetIndex < root.items.length) ? root.items[widgetIndex] : widgetData + + width: 200 + height: kbdLayoutCtxMenuColumn.implicitHeight + Theme.spacingS * 2 + padding: 0 + modal: true + focus: true + closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside + + background: Rectangle { + color: Theme.surfaceContainer + radius: Theme.cornerRadius + border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.08) + border.width: 0 + } + + contentItem: Item { + Column { + id: kbdLayoutCtxMenuColumn + anchors.fill: parent + anchors.margins: Theme.spacingS + spacing: 2 + + Rectangle { + width: parent.width + height: 32 + radius: Theme.cornerRadius + color: kbdLayoutCtxMenuIconArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : "transparent" + + Row { + anchors.left: parent.left + anchors.leftMargin: Theme.spacingS + anchors.verticalCenter: parent.verticalCenter + spacing: Theme.spacingS + + DankIcon { + name: "visibility" + size: 16 + color: Theme.surfaceText + anchors.verticalCenter: parent.verticalCenter + } + + StyledText { + text: I18n.tr("Show Icon") + font.pixelSize: Theme.fontSizeSmall + color: Theme.surfaceText + font.weight: Font.Normal + anchors.verticalCenter: parent.verticalCenter + } + } + + DankToggle { + id: kbdLayoutCtxMenuIconToggle + anchors.right: parent.right + anchors.rightMargin: Theme.spacingS + anchors.verticalCenter: parent.verticalCenter + width: 40 + height: 20 + checked: kbdLayoutCtxMenu.currentWidgetData?.keyboardLayoutNameShowIcon ?? SettingsData.keyboardLayoutNameShowIcon + onToggled: toggled => { + root.keyboardLayoutNameSettingChanged(kbdLayoutCtxMenu.sectionId, kbdLayoutCtxMenu.widgetIndex, "showIcon", toggled); + } + } + + MouseArea { + id: kbdLayoutCtxMenuIconArea + anchors.fill: parent + hoverEnabled: true + cursorShape: Qt.PointingHandCursor + + onClicked: { + kbdLayoutCtxMenuIconToggle.checked = !kbdLayoutCtxMenuIconToggle.checked; + root.keyboardLayoutNameSettingChanged(kbdLayoutCtxMenu.sectionId, kbdLayoutCtxMenu.widgetIndex, "showIcon", kbdLayoutCtxMenuIconToggle.checked); + } + } + } + } + } + } + Popup { id: focusedWindowContextMenu @@ -1520,7 +1641,27 @@ Column { setting: "showScreenSharingIcon" } ] - } + }, + { + id: "idleInhibitor", + rows: [ + { + icon: "motion_sensor_active", + label: I18n.tr("Idle Inhibitor"), + setting: "showIdleInhibitorIcon" + } + ] + }, + { + id: "doNotDisturb", + rows: [ + { + icon: "do_not_disturb_on", + label: I18n.tr("Do Not Disturb"), + setting: "showDoNotDisturbIcon" + } + ] + } ] property var controlCenterGroups: defaultControlCenterGroups property int draggedControlCenterGroupIndex: -1 @@ -1660,7 +1801,7 @@ Column { id: longestControlCenterLabelMetrics font.pixelSize: Theme.fontSizeSmall text: { - const labels = [I18n.tr("Network"), I18n.tr("VPN"), I18n.tr("Bluetooth"), I18n.tr("Audio"), I18n.tr("Volume"), I18n.tr("Microphone"), I18n.tr("Microphone Volume"), I18n.tr("Brightness"), I18n.tr("Brightness Value"), I18n.tr("Battery"), I18n.tr("Printer"), I18n.tr("Screen Sharing")]; + const labels = [I18n.tr("Network"), I18n.tr("VPN"), I18n.tr("Bluetooth"), I18n.tr("Audio"), I18n.tr("Volume"), I18n.tr("Microphone"), I18n.tr("Microphone Volume"), I18n.tr("Brightness"), I18n.tr("Brightness Value"), I18n.tr("Battery"), I18n.tr("Printer"), I18n.tr("Screen Sharing"), I18n.tr("Idle Inhibitor"), I18n.tr("Do Not Disturb")]; let longest = ""; for (let i = 0; i < labels.length; i++) { if (labels[i].length > longest.length) @@ -1707,6 +1848,10 @@ Column { return wd?.showPrinterIcon ?? SettingsData.controlCenterShowPrinterIcon; case "showScreenSharingIcon": return wd?.showScreenSharingIcon ?? SettingsData.controlCenterShowScreenSharingIcon; + case "showIdleInhibitorIcon": + return wd?.showIdleInhibitorIcon ?? SettingsData.controlCenterShowIdleInhibitorIcon; + case "showDoNotDisturbIcon": + return wd?.showDoNotDisturbIcon ?? SettingsData.controlCenterShowDoNotDisturbIcon; default: return false; }