DesktopWidgetsTab: add toggle to show/hide widgets in overview

This commit is contained in:
Lysec
2026-02-22 02:20:13 +01:00
parent 835d632e57
commit d9a37187c8
5 changed files with 27 additions and 33 deletions
+13 -32
View File
@@ -8,7 +8,6 @@
"disable-dnd": "Disable Do Not Disturb",
"disable-wifi": "Disable Wi-Fi",
"disconnect-vpn": "Disconnect {name}",
"dock-settings": "Dock settings",
"enable-bluetooth": "Enable Bluetooth",
"enable-dnd": "Enable Do Not Disturb",
"enable-wifi": "Enable Wi-Fi",
@@ -102,7 +101,7 @@
"collapse-condition-description": "If the output text matches this value, the button will collapse.",
"collapse-condition-label": "Collapse condition",
"color-selection-description": "Apply theme colors to icon and text.",
"default-tooltip": "Custom button, configure in settings",
"default-tooltip": "Custom button, configure in settings.",
"display-command-output-description": "Enter a command to run at a regular interval. The first line of its output will be displayed as text.",
"display-command-output-label": "Display command output",
"display-command-output-stream-description": "Enter a command to run continuously.",
@@ -145,13 +144,11 @@
"text-stream-description": "Streamed lines from the command will be displayed as text on the button.",
"text-stream-label": "Stream",
"wheel-description": "Command to execute when the scroll wheel is used.<br>Use $delta for the scroll wheel delta in the command.",
"wheel-down": "Scroll down",
"wheel-down-description": "Command to execute when the scroll wheel is scrolled down.",
"wheel-down-label": "Wheel down command",
"wheel-label": "Scroll wheel",
"wheel-mode-separate-description": "Enable separate commands for wheel up and down.",
"wheel-mode-separate-label": "Separate wheel commands",
"wheel-up": "Scroll up",
"wheel-up-description": "Command to execute when the scroll wheel is scrolled up.",
"wheel-up-label": "Wheel up command",
"wheel-update-text": "Update displayed text on scroll"
@@ -372,12 +369,12 @@
"actions": "Actions",
"add": "Add",
"appearance": "Appearance",
"behavior": "Behavior",
"apply": "Apply",
"automation": "Automation",
"available": "Available",
"back": "Back",
"battery": "Battery",
"behavior": "Behavior",
"bluetooth": "Bluetooth",
"brightness": "Brightness",
"browse": "Browse",
@@ -799,8 +796,6 @@
"appearance-display-mode-description": "Choose when the bar is visible.",
"appearance-floating-description": "Display the bar as a floating 'pill'.",
"appearance-floating-label": "Floating bar",
"appearance-font-scale-description": "Adjust the font size scale for text displayed in the bar.",
"appearance-font-scale-label": "Font scale",
"appearance-frame-radius": "Inner Radius",
"appearance-frame-settings-description": "Adjust frame thickness and inner corner radius",
"appearance-frame-settings-label": "Frame Settings",
@@ -817,16 +812,12 @@
"appearance-position-label": "Bar position",
"appearance-show-capsule-description": "Show widget backgrounds.",
"appearance-show-capsule-label": "Show capsule",
"appearance-show-on-workspace-switch-description": "Automatically show the bar briefly when the workspace changes.",
"appearance-show-on-workspace-switch-label": "Show bar on workspace switch",
"appearance-show-outline-description": "Displays a visible border around every widget.",
"appearance-show-outline-label": "Show widget outlines",
"appearance-type-description": "Choose the style of the bar: Simple, Floating or Framed.",
"appearance-type-label": "Bar type",
"appearance-use-separate-opacity-description": "Enable to use a separate opacity value for the bar background.",
"appearance-use-separate-opacity-label": "Use separate bar opacity",
"appearance-widget-spacing-description": "Adjust the spacing between each widget in the bar.",
"appearance-widget-spacing-label": "Widget spacing",
"monitor-configure-widgets": "Configure widgets",
"monitor-override-settings": "Override global settings",
"monitor-override-settings-description": "Use custom settings for this monitor.",
@@ -921,15 +912,24 @@
"desc": "Configure the control center panel positioning and behavior.",
"position-description": "Choose where the control center panel appears when opened.",
"shortcuts-custom-button-command-description": "The command to execute when the button is clicked.",
"shortcuts-custom-button-default-tooltip": "Custom button, configure in settings.",
"shortcuts-custom-button-enable-on-state-logic-description": "Enable a second icon and 'hot' state based on a check command.",
"shortcuts-custom-button-enable-on-state-logic-label": "Enable on-state logic",
"shortcuts-custom-button-general-tooltip-text-description": "General description for the button's tooltip.",
"shortcuts-custom-button-general-tooltip-text-label": "General tooltip text",
"shortcuts-custom-button-icon-description": "Select an icon from the library.",
"shortcuts-custom-button-on-clicked-description": "Command to execute when the button is left-clicked.",
"shortcuts-custom-button-on-clicked-label": "Left click command",
"shortcuts-custom-button-on-middle-clicked-description": "Command to execute when the button is middle-clicked.",
"shortcuts-custom-button-on-middle-clicked-label": "Middle click command",
"shortcuts-custom-button-on-right-clicked-description": "Command to execute when the button is right-clicked.",
"shortcuts-custom-button-on-right-clicked-label": "Right click command",
"shortcuts-custom-button-on-state-command-description": "Command to execute to check if the button should be in the 'on' state. Returns 0 for on, non-zero for off.",
"shortcuts-custom-button-on-state-command-label": "On-state check command",
"shortcuts-custom-button-on-state-icon-description": "The icon for the button when it's in the 'on' state.",
"shortcuts-custom-button-on-state-icon-label": "On-state icon",
"shortcuts-custom-button-show-exec-tooltip-description": "Show tooltips with command details (left/right/middle click).",
"shortcuts-custom-button-show-exec-tooltip-label": "Show command tooltips",
"shortcuts-custom-button-state-checks-add": "Add state check",
"shortcuts-custom-button-state-checks-command": "Command to execute for this state check",
"shortcuts-custom-button-state-checks-label": "State checks",
@@ -964,7 +964,6 @@
"clock-style-label": "Clock style",
"clock-style-minimal": "Minimal",
"clock-width-description": "Width of the clock widget in pixels.",
"cpu-intensive-note": "Widgets marked with ! use more CPU and should be enabled mindfully.",
"edit-mode-button-label": "Enter edit mode",
"edit-mode-controls-explanation": "Left-click & drag: Move or resize the widget.\nRight-click: Open the context menu options.",
"edit-mode-description": "Enable edit mode to move and reposition desktop widgets. When enabled, widgets show a drag outline and can be repositioned.",
@@ -985,6 +984,8 @@
"media-player-show-buttons-label": "Show buttons",
"media-player-show-visualizer-description": "Show the audio visualizer overlay.",
"media-player-visualizer-type-description": "Choose a visualization type.",
"overview-enabled-description": "Show desktop widgets while the compositor overview is open.",
"overview-enabled-label": "Show in overview",
"system-stat-layout-bottom": "Bottom",
"system-stat-layout-description": "Choose how the legend is displayed relative to the graph.",
"system-stat-layout-label": "Layout",
@@ -1050,36 +1051,16 @@
"appearance-floating-distance-label": "Dock floating distance",
"appearance-frame-indicator-description": "Show a small indicator on the frame when the dock is hidden.",
"appearance-frame-indicator-label": "Frame dock indicator",
"appearance-group-apps-description": "Group multiple windows from the same app into one dock entry.",
"appearance-group-apps-label": "Group same apps",
"appearance-group-click-action-cycle": "Cycle windows",
"appearance-group-click-action-description": "Choose what left-click does for grouped apps.",
"appearance-group-click-action-label": "Grouped app click action",
"appearance-group-click-action-list": "Open window list",
"appearance-group-context-menu-mode-description": "Choose how the context menu behaves for grouped apps.",
"appearance-group-context-menu-mode-extended": "Extended",
"appearance-group-context-menu-mode-label": "Grouped app menu mode",
"appearance-group-context-menu-mode-list": "Window list",
"appearance-group-indicator-style-description": "Choose how grouped running indicators display focused window state.",
"appearance-group-indicator-style-dots": "Dots",
"appearance-group-indicator-style-label": "Grouped indicator style",
"appearance-group-indicator-style-number": "Number",
"appearance-hide-show-speed-description": "Adjust the speed of the dock hide/show animation.",
"appearance-hide-show-speed-label": "Hide/show speed",
"appearance-icon-size-description": "Adjust the overall size of the dock.",
"appearance-icon-size-label": "Dock size",
"appearance-inactive-indicators-description": "Display indicator pills for all apps, not just the currently active one.",
"appearance-inactive-indicators-label": "Running indicators",
"appearance-launcher-position-description": "Choose where the launcher icon appears in the dock.",
"appearance-launcher-position-end": "End",
"appearance-launcher-position-label": "Launcher position",
"appearance-launcher-position-start": "Start",
"appearance-pinned-static-description": "Always push pinned app icons to the left in static order.",
"appearance-pinned-static-label": "Static pinned apps",
"appearance-position-description": "Choose where the dock appears on screen.",
"appearance-position-label": "Position",
"appearance-show-launcher-icon-description": "Show the application launcher icon in the dock.",
"appearance-show-launcher-icon-label": "Show App Launcher",
"appearance-sit-on-frame-description": "Align the dock inside the frame border instead of sitting on top.",
"appearance-sit-on-frame-label": "Dock sits on frame",
"appearance-type-description": "Choose between a floating pill or a static bar attached to the edge.",
+1
View File
@@ -501,6 +501,7 @@
},
"desktopWidgets": {
"enabled": false,
"overviewEnabled": true,
"gridSnap": false,
"monitorWidgets": []
}
+1
View File
@@ -722,6 +722,7 @@ Singleton {
// desktop widgets
property JsonObject desktopWidgets: JsonObject {
property bool enabled: false
property bool overviewEnabled: true
property bool gridSnap: false
property list<var> monitorWidgets: []
// Format: [{ "name": "DP-1", "widgets": [...] }, { "name": "HDMI-1", "widgets": [...] }]
+2 -1
View File
@@ -50,7 +50,8 @@ Variants {
}
// Only create PanelWindow if enabled AND (screen has widgets OR in edit mode)
active: modelData && Settings.data.desktopWidgets.enabled && (screenWidgets.length > 0 || DesktopWidgetRegistry.editMode) && !PowerProfileService.noctaliaPerformanceMode && !PanelService.lockScreen?.active
// During compositor overview, show widgets only when overviewEnabled is true.
active: modelData && Settings.data.desktopWidgets.enabled && (screenWidgets.length > 0 || DesktopWidgetRegistry.editMode) && (!CompositorService.overviewActive || Settings.data.desktopWidgets.overviewEnabled) && !PowerProfileService.noctaliaPerformanceMode && !PanelService.lockScreen?.active
sourceComponent: PanelWindow {
id: window
@@ -36,6 +36,16 @@ ColumnLayout {
onToggled: checked => Settings.data.desktopWidgets.enabled = checked
}
NToggle {
Layout.fillWidth: true
enabled: Settings.data.desktopWidgets.enabled
label: I18n.tr("panels.desktop-widgets.overview-enabled-label")
description: I18n.tr("panels.desktop-widgets.overview-enabled-description")
checked: Settings.data.desktopWidgets.overviewEnabled
defaultValue: Settings.getDefaultValue("desktopWidgets.overviewEnabled")
onToggled: checked => Settings.data.desktopWidgets.overviewEnabled = checked
}
ColumnLayout {
enabled: Settings.data.desktopWidgets.enabled