settings: quick simplification and cleanup prior to 1.6

the full overhaul/redesign will come later
This commit is contained in:
bbedward
2026-09-02 16:20:16 -04:00
parent 81cbcef3bc
commit f65e5ef2f2
19 changed files with 1059 additions and 1050 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ repos:
name: settings search index is up to date
entry: bash -c 'python3 quickshell/translations/extract_settings_index.py >/dev/null || exit 1; if ! git diff --exit-code -- quickshell/translations/settings_search_index.json; then echo "settings_search_index.json is out of date; run quickshell/translations/extract_settings_index.py and stage the result" >&2; exit 1; fi'
language: system
files: ^quickshell/(Modules/Settings/.*\.qml|Modals/Settings/SettingsSidebar\.qml|translations/extract_settings_index\.py)$
files: ^quickshell/(Modules/Settings/.*\.qml|Common/SettingsTabs\.qml|Services/SettingsSearchService\.qml|translations/(extract_settings_index\.py|en\.json))$
pass_filenames: false
- repo: local
hooks:
+382
View File
@@ -0,0 +1,382 @@
pragma Singleton
import QtQuick
import Quickshell
import qs.Common
import qs.Services
Singleton {
readonly property var structure: [
{
"id": "personalization",
"text": I18n.tr("Personalization"),
"icon": "palette",
"children": [
{
"id": "wallpaper",
"text": I18n.tr("Wallpaper"),
"icon": "wallpaper",
"tabIndex": 0
},
{
"id": "theme",
"text": I18n.tr("Theme & Colors"),
"icon": "format_paint",
"tabIndex": 10
},
{
"id": "typography",
"text": I18n.tr("Typography & Motion"),
"icon": "text_fields",
"tabIndex": 14
},
{
"id": "time_weather",
"text": I18n.tr("Time & Weather"),
"icon": "schedule",
"tabIndex": 1
},
{
"id": "sounds",
"text": I18n.tr("Sounds"),
"icon": "volume_up",
"tabIndex": 15,
"soundsOnly": true
},
{
"id": "compositor_layout",
"text": CompositorService.isNiri ? "Niri" : (CompositorService.isHyprland ? "Hyprland" : "MangoWC"),
"icon": "layers",
"tabIndex": 37,
"layoutCapable": true
}
]
},
{
"id": "dankbar",
"text": I18n.tr("Bar"),
"icon": "toolbar",
"children": [
{
"id": "dankbar_appearance",
"text": I18n.tr("Appearance"),
"icon": "palette",
"tabIndex": 6
},
{
"id": "dankbar_settings",
"text": I18n.tr("General"),
"icon": "tune",
"tabIndex": 3
},
{
"id": "dankbar_widgets",
"text": I18n.tr("Widgets"),
"icon": "widgets",
"tabIndex": 22
},
{
"id": "workspaces",
"text": I18n.tr("Workspaces"),
"icon": "view_module",
"tabIndex": 4
},
{
"id": "frame",
"text": I18n.tr("Frame"),
"icon": "frame_source",
"tabIndex": 33,
"frameOnly": true
},
{
"id": "dank_island",
"text": I18n.tr("Island"),
"icon": "view_in_ar",
"tabIndex": 46,
"islandOnly": true
}
]
},
{
"id": "workspaces_widgets",
"text": I18n.tr("Widgets & Notifications"),
"icon": "dashboard",
"collapsedByDefault": true,
"children": [
{
"id": "dank_dash",
"text": I18n.tr("Dashboard"),
"icon": "space_dashboard",
"tabIndex": 43
},
{
"id": "media_player",
"text": I18n.tr("Media Player"),
"icon": "music_note",
"tabIndex": 16
},
{
"id": "notifications",
"text": I18n.tr("Notifications"),
"icon": "notifications",
"tabIndex": 17
},
{
"id": "osd",
"text": I18n.tr("On-screen Displays"),
"icon": "tune",
"tabIndex": 18
},
{
"id": "desktop_widgets",
"text": I18n.tr("Desktop Widgets"),
"icon": "widgets",
"tabIndex": 27
}
]
},
{
"id": "dock_launcher",
"text": I18n.tr("Dock & Launcher"),
"icon": "shelf_auto_hide",
"collapsedByDefault": true,
"children": [
{
"id": "dock",
"text": I18n.tr("Dock"),
"icon": "dock_to_bottom",
"tabIndex": 5
},
{
"id": "launcher",
"text": I18n.tr("Launcher"),
"icon": "grid_view",
"tabIndex": 9
}
]
},
{
"id": "keybinds",
"text": I18n.tr("Keyboard Shortcuts"),
"icon": "keyboard",
"tabIndex": 2,
"shortcutsOnly": true
},
{
"id": "displays",
"text": I18n.tr("Displays"),
"icon": "monitor",
"collapsedByDefault": true,
"children": [
{
"id": "display_config",
"text": I18n.tr("Configuration"),
"icon": "display_settings",
"tabIndex": 24
},
{
"id": "display_gamma",
"text": I18n.tr("Gamma Control"),
"icon": "brightness_6",
"tabIndex": 25
},
{
"id": "display_widgets",
"text": I18n.tr("Widgets", "settings_displays"),
"icon": "widgets",
"tabIndex": 26
}
]
},
{
"id": "network",
"text": I18n.tr("Network"),
"icon": "wifi",
"dmsOnly": true,
"children": [
{
"id": "network_status",
"text": I18n.tr("Status"),
"icon": "lan",
"tabIndex": 7
},
{
"id": "network_ethernet",
"text": I18n.tr("Ethernet"),
"icon": "settings_ethernet",
"tabIndex": 39
},
{
"id": "network_wifi",
"text": I18n.tr("WiFi"),
"icon": "wifi",
"tabIndex": 40
},
{
"id": "network_cellular",
"text": I18n.tr("Cellular"),
"icon": "network_cell",
"tabIndex": 47,
"cellularOnly": true
},
{
"id": "network_vpn",
"text": I18n.tr("VPN"),
"icon": "vpn_key",
"tabIndex": 41
}
]
},
{
"id": "applications",
"text": I18n.tr("Applications"),
"icon": "apps",
"collapsedByDefault": true,
"children": [
{
"id": "default_apps",
"text": I18n.tr("Default Apps"),
"icon": "star",
"tabIndex": 34
},
{
"id": "running_apps",
"text": I18n.tr("Running Apps"),
"icon": "app_registration",
"tabIndex": 19,
"hyprlandNiriOnly": true
},
{
"id": "autostart",
"text": I18n.tr("Autostart Apps"),
"icon": "line_start",
"tabIndex": 36,
"autostartOnly": true
},
{
"id": "window_rules",
"text": I18n.tr("Window Rules"),
"icon": "select_window",
"tabIndex": 38,
"windowRulesCapable": true
}
]
},
{
"id": "system",
"text": I18n.tr("System"),
"icon": "memory",
"collapsedByDefault": true,
"children": [
{
"id": "audio",
"text": I18n.tr("Audio"),
"icon": "headphones",
"tabIndex": 29
},
{
"id": "mouse_touchpad",
"text": I18n.tr("Mouse & Touchpad"),
"icon": "mouse",
"tabIndex": 44,
"niriOnly": true
},
{
"id": "keyboard",
"text": I18n.tr("Keyboard"),
"icon": "keyboard",
"tabIndex": 45,
"niriOnly": true
},
{
"id": "locale",
"text": I18n.tr("Locale"),
"icon": "language",
"tabIndex": 30
},
{
"id": "clipboard",
"text": I18n.tr("Clipboard"),
"icon": "content_paste",
"tabIndex": 23,
"clipboardOnly": true
},
{
"id": "printers",
"text": I18n.tr("Printers"),
"icon": "print",
"tabIndex": 8,
"cupsOnly": true
},
{
"id": "multiplexers",
"text": I18n.tr("Multiplexers"),
"icon": "terminal",
"tabIndex": 32
},
{
"id": "updater",
"text": I18n.tr("System Updater"),
"icon": "refresh",
"tabIndex": 20,
"updaterOnly": true
},
{
"id": "users",
"text": I18n.tr("Users"),
"icon": "manage_accounts",
"tabIndex": 35
}
]
},
{
"id": "power_security",
"text": I18n.tr("Power & Security"),
"icon": "security",
"collapsedByDefault": true,
"children": [
{
"id": "battery",
"text": I18n.tr("Battery"),
"icon": "battery_charging_full",
"tabIndex": 42
},
{
"id": "lock_screen",
"text": I18n.tr("Lock Screen"),
"icon": "lock",
"tabIndex": 11
},
{
"id": "greeter",
"text": I18n.tr("Greeter"),
"icon": "login",
"tabIndex": 31,
"greeterOnly": true
},
{
"id": "power_sleep",
"text": I18n.tr("Power & Sleep"),
"icon": "power_settings_new",
"tabIndex": 21
}
]
},
{
"id": "plugins",
"text": I18n.tr("Plugins"),
"icon": "extension",
"tabIndex": 12
},
{
"id": "separator",
"separator": true
},
{
"id": "about",
"text": I18n.tr("About"),
"icon": "info",
"tabIndex": 13
}
]
}
+1 -4
View File
@@ -1061,11 +1061,8 @@ Item {
}
function tabs(): string {
if (!PopoutService.settingsModal)
return "wallpaper\ntheme\ntypography\ntime_weather\nsounds\ndankbar\ndankbar_settings\ndankbar_appearance\ndankbar_widgets\nframe\nworkspaces\ncompositor\nmedia_player\nnotifications\nosd\nrunning_apps\nupdater\ndock\nlauncher\nkeybinds\ndisplays\nnetwork\nnetwork_status\nnetwork_ethernet\nnetwork_wifi\nnetwork_cellular\nnetwork_vpn\nprinters\nlock_screen\npower_sleep\nplugins\nabout";
var modal = PopoutService.settingsModal;
var ids = [];
var structure = modal.sidebar?.categoryStructure ?? [];
var structure = SettingsTabs.structure;
for (var i = 0; i < structure.length; i++) {
var cat = structure[i];
if (cat.separator)
@@ -1,5 +1,6 @@
import QtQuick
import qs.Common
import qs.Modules.Settings.Widgets
import qs.Services
import qs.Widgets
@@ -64,50 +65,6 @@ Item {
readonly property bool hasKeybinds: dmsKeybinds.length > 0
readonly property var barModes: [
{
"key": "standard",
"label": I18n.tr("Standard")
},
{
"key": "frame",
"label": I18n.tr("Frame")
},
{
"key": "island",
"label": I18n.tr("Island")
}
]
readonly property string activeBarMode: SettingsData.dankIslandBarId ? "island" : SettingsData.frameEnabled ? "frame" : "standard"
function applyBarMode(mode) {
switch (mode) {
case "frame":
if (SettingsData.frameMode !== "connected")
SettingsData.set("frameMode", "connected");
if (!SettingsData.frameEnabled)
SettingsData.set("frameEnabled", true);
return;
case "island":
{
if (SettingsData.dankIslandBarId)
return;
const configs = SettingsData.barConfigs || [];
const target = configs.find(cfg => cfg.enabled) ?? configs[0];
if (!target)
return;
SettingsData.set("dankIslandBarId", target.id);
return;
}
default:
if (SettingsData.frameEnabled)
SettingsData.set("frameEnabled", false);
if (SettingsData.dankIslandBarId)
SettingsData.set("dankIslandBarId", "");
return;
}
}
DankFlickable {
anchors.fill: parent
clip: true
@@ -173,112 +130,8 @@ Item {
}
}
Row {
id: barModeRow
SettingsLayoutPicker {
width: parent.width
spacing: Theme.spacingS
Repeater {
model: root.barModes
Rectangle {
id: modeCard
required property var modelData
readonly property bool isActive: root.activeBarMode === modelData.key
width: (barModeRow.width - Theme.spacingS * 2) / 3
height: Math.round(Theme.fontSizeMedium * 7.5)
radius: Theme.cornerRadius
color: Theme.floatingWindowNestedSurface
border.width: isActive ? 2 : 1
border.color: isActive ? Theme.primary : Theme.outlineMedium
Rectangle {
anchors.fill: parent
radius: parent.radius
color: Theme.primary
opacity: modeMouse.containsMouse ? 0.12 : 0
}
Column {
anchors.centerIn: parent
spacing: Theme.spacingS
Rectangle {
id: screenPreview
readonly property real edgePad: Math.max(2, Math.round(width * 0.045))
readonly property real stripSize: Math.round(width * 0.11)
width: Math.round(Theme.iconSize * 2.9)
height: Math.round(width * 0.62)
radius: Theme.spacingXS
color: Theme.surfaceContainerHighest
border.width: 1
border.color: Theme.outline
anchors.horizontalCenter: parent.horizontalCenter
Rectangle {
visible: modeCard.modelData.key === "standard"
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
anchors.margins: screenPreview.edgePad
height: screenPreview.stripSize
radius: height / 2
color: Theme.primary
}
Rectangle {
visible: modeCard.modelData.key === "frame"
anchors.fill: parent
anchors.margins: screenPreview.edgePad
radius: screenPreview.radius
color: "transparent"
border.width: Math.max(2, Math.round(screenPreview.stripSize * 0.55))
border.color: Theme.primary
}
Rectangle {
visible: modeCard.modelData.key === "frame"
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
anchors.margins: screenPreview.edgePad
height: screenPreview.stripSize
radius: screenPreview.radius
color: Theme.primary
}
Rectangle {
visible: modeCard.modelData.key === "island"
anchors.top: parent.top
anchors.topMargin: screenPreview.edgePad
anchors.horizontalCenter: parent.horizontalCenter
width: Math.round(parent.width * 0.42)
height: screenPreview.stripSize
radius: height / 2
color: Theme.primary
}
}
StyledText {
text: modeCard.modelData.label
font.pixelSize: Theme.fontSizeSmall
font.weight: Font.Medium
color: modeCard.isActive ? Theme.primary : Theme.surfaceText
anchors.horizontalCenter: parent.horizontalCenter
}
}
MouseArea {
id: modeMouse
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: root.applyBarMode(modeCard.modelData.key)
}
}
}
}
}
+26 -369
View File
@@ -76,376 +76,27 @@ Rectangle {
Qt.callLater(searchField.forceActiveFocus);
}
readonly property var categoryStructure: [
{
"id": "personalization",
"text": I18n.tr("Personalization"),
"icon": "palette",
"children": [
{
"id": "wallpaper",
"text": I18n.tr("Wallpaper"),
"icon": "wallpaper",
"tabIndex": 0
},
{
"id": "theme",
"text": I18n.tr("Theme & Colors"),
"icon": "format_paint",
"tabIndex": 10
},
{
"id": "typography",
"text": I18n.tr("Typography & Motion"),
"icon": "text_fields",
"tabIndex": 14
},
{
"id": "time_weather",
"text": I18n.tr("Time & Weather"),
"icon": "schedule",
"tabIndex": 1
},
{
"id": "sounds",
"text": I18n.tr("Sounds"),
"icon": "volume_up",
"tabIndex": 15,
"soundsOnly": true
},
{
"id": "compositor_layout",
"text": CompositorService.isNiri ? "Niri" : (CompositorService.isHyprland ? "Hyprland" : "MangoWC"),
"icon": "layers",
"tabIndex": 37,
"layoutCapable": true
}
]
},
{
"id": "dankbar",
"text": I18n.tr("Primary Bar"),
"icon": "toolbar",
"children": [
{
"id": "dankbar_appearance",
"text": I18n.tr("Appearance"),
"icon": "palette",
"tabIndex": 6
},
{
"id": "dankbar_settings",
"text": I18n.tr("Settings"),
"icon": "tune",
"tabIndex": 3
},
{
"id": "dankbar_widgets",
"text": I18n.tr("Widgets"),
"icon": "widgets",
"tabIndex": 22
},
{
"id": "workspaces",
"text": I18n.tr("Workspaces"),
"icon": "view_module",
"tabIndex": 4
},
{
"id": "frame",
"text": I18n.tr("Frame"),
"icon": "frame_source",
"tabIndex": 33
},
{
"id": "dank_island",
"text": I18n.tr("Island"),
"icon": "view_in_ar",
"tabIndex": 46
}
]
},
{
"id": "workspaces_widgets",
"text": I18n.tr("Widgets & Notifications"),
"icon": "dashboard",
"collapsedByDefault": true,
"children": [
{
"id": "dank_dash",
"text": I18n.tr("Dashboard"),
"icon": "space_dashboard",
"tabIndex": 43
},
{
"id": "media_player",
"text": I18n.tr("Media Player"),
"icon": "music_note",
"tabIndex": 16
},
{
"id": "notifications",
"text": I18n.tr("Notifications"),
"icon": "notifications",
"tabIndex": 17
},
{
"id": "osd",
"text": I18n.tr("On-screen Displays"),
"icon": "tune",
"tabIndex": 18
},
{
"id": "desktop_widgets",
"text": I18n.tr("Desktop Widgets"),
"icon": "widgets",
"tabIndex": 27
}
]
},
{
"id": "dock_launcher",
"text": I18n.tr("Dock & Launcher"),
"icon": "shelf_auto_hide",
"collapsedByDefault": true,
"children": [
{
"id": "dock",
"text": I18n.tr("Dock"),
"icon": "dock_to_bottom",
"tabIndex": 5
},
{
"id": "launcher",
"text": I18n.tr("Launcher"),
"icon": "grid_view",
"tabIndex": 9
}
]
},
{
"id": "keybinds",
"text": I18n.tr("Keyboard Shortcuts"),
"icon": "keyboard",
"tabIndex": 2,
"shortcutsOnly": true
},
{
"id": "displays",
"text": I18n.tr("Displays"),
"icon": "monitor",
"collapsedByDefault": true,
"children": [
{
"id": "display_config",
"text": I18n.tr("Configuration"),
"icon": "display_settings",
"tabIndex": 24
},
{
"id": "display_gamma",
"text": I18n.tr("Gamma Control"),
"icon": "brightness_6",
"tabIndex": 25
},
{
"id": "display_widgets",
"text": I18n.tr("Widgets", "settings_displays"),
"icon": "widgets",
"tabIndex": 26
}
]
},
{
"id": "network",
"text": I18n.tr("Network"),
"icon": "wifi",
"dmsOnly": true,
"children": [
{
"id": "network_status",
"text": I18n.tr("Status"),
"icon": "lan",
"tabIndex": 7
},
{
"id": "network_ethernet",
"text": I18n.tr("Ethernet"),
"icon": "settings_ethernet",
"tabIndex": 39
},
{
"id": "network_wifi",
"text": I18n.tr("WiFi"),
"icon": "wifi",
"tabIndex": 40
},
{
"id": "network_cellular",
"text": I18n.tr("Cellular"),
"icon": "network_cell",
"tabIndex": 47
},
{
"id": "network_vpn",
"text": I18n.tr("VPN"),
"icon": "vpn_key",
"tabIndex": 41
}
]
},
{
"id": "applications",
"text": I18n.tr("Applications"),
"icon": "apps",
"collapsedByDefault": true,
"children": [
{
"id": "default_apps",
"text": I18n.tr("Default Apps"),
"icon": "star",
"tabIndex": 34
},
{
"id": "running_apps",
"text": I18n.tr("Running Apps"),
"icon": "app_registration",
"tabIndex": 19,
"hyprlandNiriOnly": true
},
{
"id": "autostart",
"text": I18n.tr("Autostart Apps"),
"icon": "line_start",
"tabIndex": 36,
"autostartOnly": true
},
{
"id": "window_rules",
"text": I18n.tr("Window Rules"),
"icon": "select_window",
"tabIndex": 38,
"windowRulesCapable": true
}
]
},
{
"id": "system",
"text": I18n.tr("System"),
"icon": "memory",
"collapsedByDefault": true,
"children": [
{
"id": "audio",
"text": I18n.tr("Audio"),
"icon": "headphones",
"tabIndex": 29
},
{
"id": "mouse_touchpad",
"text": I18n.tr("Mouse & Touchpad"),
"icon": "mouse",
"tabIndex": 44,
"niriOnly": true
},
{
"id": "keyboard",
"text": I18n.tr("Keyboard"),
"icon": "keyboard",
"tabIndex": 45,
"niriOnly": true
},
{
"id": "locale",
"text": I18n.tr("Locale"),
"icon": "language",
"tabIndex": 30
},
{
"id": "clipboard",
"text": I18n.tr("Clipboard"),
"icon": "content_paste",
"tabIndex": 23,
"clipboardOnly": true
},
{
"id": "printers",
"text": I18n.tr("Printers"),
"icon": "print",
"tabIndex": 8,
"cupsOnly": true
},
{
"id": "multiplexers",
"text": I18n.tr("Multiplexers"),
"icon": "terminal",
"tabIndex": 32
},
{
"id": "updater",
"text": I18n.tr("System Updater"),
"icon": "refresh",
"tabIndex": 20,
"updaterOnly": true
},
{
"id": "users",
"text": I18n.tr("Users"),
"icon": "manage_accounts",
"tabIndex": 35
}
]
},
{
"id": "power_security",
"text": I18n.tr("Power & Security"),
"icon": "security",
"collapsedByDefault": true,
"children": [
{
"id": "battery",
"text": I18n.tr("Battery"),
"icon": "battery_charging_full",
"tabIndex": 42
},
{
"id": "lock_screen",
"text": I18n.tr("Lock Screen"),
"icon": "lock",
"tabIndex": 11
},
{
"id": "greeter",
"text": I18n.tr("Greeter"),
"icon": "login",
"tabIndex": 31,
"greeterOnly": true
},
{
"id": "power_sleep",
"text": I18n.tr("Power & Sleep"),
"icon": "power_settings_new",
"tabIndex": 21
}
]
},
{
"id": "plugins",
"text": I18n.tr("Plugins"),
"icon": "extension",
"tabIndex": 12
},
{
"id": "separator",
"separator": true
},
{
"id": "about",
"text": I18n.tr("About"),
"icon": "info",
"tabIndex": 13
readonly property var categoryStructure: SettingsTabs.structure
function leaveHiddenTab(tabIndex) {
if (currentIndex !== tabIndex)
return;
tabChangeRequested(resolveTabIndex("dankbar_settings"));
}
Connections {
target: SettingsData
function onFrameEnabledChanged() {
if (!SettingsData.frameEnabled)
root.leaveHiddenTab(33);
}
]
function onDankIslandBarIdChanged() {
if (!SettingsData.dankIslandBarId)
root.leaveHiddenTab(46);
}
}
function isItemVisible(item) {
if (item.dmsOnly && !NetworkService.networkAvailable)
@@ -472,6 +123,12 @@ Rectangle {
return false;
if (item.autostartOnly && !DesktopService.autostartAvailable)
return false;
if (item.frameOnly && !SettingsData.frameEnabled)
return false;
if (item.islandOnly && !SettingsData.dankIslandBarId)
return false;
if (item.cellularOnly && (NetworkService.cellularDevices?.length ?? 0) === 0)
return false;
return true;
}
+24 -40
View File
@@ -291,6 +291,15 @@ Item {
anchors.horizontalCenter: parent.horizontalCenter
spacing: Theme.spacingXL
SettingsCard {
iconName: "toolbar"
title: I18n.tr("Layout")
settingKey: "barLayout"
tags: ["layout", "standard", "frame", "island", "mode", "bar"]
SettingsLayoutPicker {}
}
SettingsCard {
tab: "appearance"
iconName: "toolbar"
@@ -554,6 +563,7 @@ Item {
target: "island"
visible: dankBarTab.selectedBarIsIsland
parentModal: dankBarTab.parentModal
section: "dankIslandPlacement"
settingLabel: I18n.tr("Island placement")
reason: I18n.tr("The Island anchors to the top or bottom edge")
}
@@ -562,6 +572,7 @@ Item {
target: "island"
visible: dankBarTab.islandShadowsSelectedBar
parentModal: dankBarTab.parentModal
section: "dankIslandPlacement"
settingLabel: I18n.tr("%1 position").arg(dankBarTab.positionLabel(selectedBarConfig?.position ?? SettingsData.Position.Top))
reason: I18n.tr("The Island holds this edge on a display this bar covers, so the bar stays hidden there")
}
@@ -710,6 +721,7 @@ Item {
target: "island"
visible: dankBarTab.islandOwnsSelectedBarTop
parentModal: dankBarTab.parentModal
section: "dankIslandPlacement"
settingLabel: I18n.tr("Bar visibility")
reason: I18n.tr("Additional settings are managed by the Island")
}
@@ -943,18 +955,11 @@ Item {
}
SettingsControlledBy {
visible: SettingsData.frameEnabled
visible: SettingsData.frameEnabled || dankBarTab.islandOwnsSelectedBarTop
parentModal: dankBarTab.parentModal
section: SettingsData.frameEnabled ? "frameOpacity" : "dankIslandAppearance"
settingLabel: I18n.tr("Bar Opacity")
reason: I18n.tr("Managed by Frame")
}
SettingsControlledBy {
target: "island"
visible: !SettingsData.frameEnabled && dankBarTab.islandOwnsSelectedBarTop
parentModal: dankBarTab.parentModal
settingLabel: I18n.tr("Bar Opacity")
reason: I18n.tr("The island draws its own surface")
reason: SettingsData.frameEnabled ? I18n.tr("Managed by Frame") : I18n.tr("The island draws its own surface")
}
}
@@ -966,10 +971,11 @@ Item {
visible: dankBarTab.appearanceOnly && (selectedBarConfig?.enabled ?? false)
SettingsControlledBy {
visible: SettingsData.frameEnabled
visible: SettingsData.frameEnabled || dankBarTab.islandOwnsSelectedBarTop
parentModal: dankBarTab.parentModal
section: SettingsData.frameEnabled ? "frameBorder" : "dankIslandPlacement"
settingLabel: I18n.tr("Bar Spacing")
reason: I18n.tr("Edge spacing, exclusive zone, and popup gaps are managed by Frame")
reason: SettingsData.frameEnabled ? I18n.tr("Edge spacing, exclusive zone, and popup gaps are managed by Frame") : I18n.tr("Some settings are managed by the island")
}
SettingsSliderRow {
@@ -1199,14 +1205,6 @@ Item {
}
}
}
SettingsControlledBy {
target: "island"
visible: !SettingsData.frameEnabled && dankBarTab.islandOwnsSelectedBarTop
parentModal: dankBarTab.parentModal
settingLabel: I18n.tr("Bar Spacing")
reason: I18n.tr("Some settings are managed by the island")
}
}
SettingsSliderCard {
@@ -1273,18 +1271,11 @@ Item {
visible: dankBarTab.appearanceOnly && selectedBarConfig?.enabled
SettingsControlledBy {
visible: SettingsData.frameEnabled
visible: SettingsData.frameEnabled || dankBarTab.islandOwnsSelectedBarTop
parentModal: dankBarTab.parentModal
section: SettingsData.frameEnabled ? "frameBorder" : "dankIslandAppearance"
settingLabel: I18n.tr("Bar corners and background")
reason: I18n.tr("Managed by Frame")
}
SettingsControlledBy {
target: "island"
visible: !SettingsData.frameEnabled && dankBarTab.islandOwnsSelectedBarTop
parentModal: dankBarTab.parentModal
settingLabel: I18n.tr("Bar corners")
reason: I18n.tr("Corner style applies to the bar surface")
reason: SettingsData.frameEnabled ? I18n.tr("Managed by Frame") : I18n.tr("Corner style applies to the bar surface")
}
SettingsToggleRow {
@@ -1763,18 +1754,11 @@ Item {
}
SettingsControlledBy {
visible: dankBarTab.appearanceOnly && dankBarTab.connectedFrameModeActive
visible: dankBarTab.appearanceOnly && (dankBarTab.connectedFrameModeActive || dankBarTab.islandOwnsSelectedBarTop)
parentModal: dankBarTab.parentModal
section: dankBarTab.connectedFrameModeActive ? "frameBorder" : "dankIslandAppearance"
settingLabel: I18n.tr("Bar shadow, border, and corners")
reason: I18n.tr("Managed by Frame in Connected Mode")
}
SettingsControlledBy {
target: "island"
visible: dankBarTab.appearanceOnly && !dankBarTab.connectedFrameModeActive && dankBarTab.islandOwnsSelectedBarTop
parentModal: dankBarTab.parentModal
settingLabel: I18n.tr("Bar border and shadow")
reason: I18n.tr("These style the bar surface, which the Island replaces")
reason: dankBarTab.connectedFrameModeActive ? I18n.tr("Managed by Frame in Connected Mode") : I18n.tr("These style the bar surface, which the Island replaces")
}
SettingsCard {
+24 -11
View File
@@ -16,10 +16,7 @@ Item {
readonly property var instanceChoices: {
SettingsData.barConfigs;
SettingsData.dankIslandBarId;
const rows = [({
"id": "",
"name": I18n.tr("Off", "island instance choice: island disabled")
})];
const rows = [];
const configs = SettingsData.barConfigs || [];
for (let i = 0; i < configs.length; i++)
rows.push({
@@ -59,10 +56,14 @@ Item {
iconName: "view_in_ar"
title: I18n.tr("Dank Island - Beta", "island settings: page title")
settingKey: "dankIslandInstance"
tags: ["island", "layout", "standard", "frame", "mode", "bar"]
SettingsLayoutPicker {}
SettingsButtonGroupRow {
settingKey: "dankIslandBarId"
tags: ["island", "activities", "media", "notifications", "osd", "bar"]
visible: !!SettingsData.dankIslandBarId && SettingsData.barConfigs.length > 1
text: I18n.tr("Island Instance", "island settings: which bar config the island replaces")
model: root.instanceChoices.map(row => row.name)
currentIndex: root.instanceIndex
@@ -71,6 +72,18 @@ Item {
SettingsData.set("dankIslandBarId", root.instanceChoices[index]?.id ?? "");
}
}
SettingsToggleRow {
settingKey: "dankIslandEnable"
tags: ["island", "enable", "show", "hide"]
visible: !!SettingsData.dankIslandBarId
text: I18n.tr("Enable Island")
description: I18n.tr("Toggle the Island on this instance's displays")
checked: SettingsData.dankIslandEnabled
onToggled: checked => SettingsData.updateBarConfig(SettingsData.dankIslandBarId, {
enabled: checked
})
}
}
SettingsCard {
@@ -78,7 +91,7 @@ Item {
iconName: "open_with"
title: I18n.tr("Position", "island settings: position card title")
settingKey: "dankIslandPlacement"
enabled: SettingsData.dankIslandEnabled
visible: SettingsData.dankIslandEnabled
SettingsToggleRow {
settingKey: "dankIslandFloating"
@@ -161,7 +174,7 @@ Item {
iconName: "home"
title: I18n.tr("Home Compact", "island settings: home face card title")
settingKey: "dankIslandActivities"
enabled: SettingsData.dankIslandEnabled
visible: SettingsData.dankIslandEnabled
StyledText {
width: parent.width
@@ -243,7 +256,7 @@ Item {
iconName: "palette"
title: I18n.tr("Appearance", "island settings: appearance card title")
settingKey: "dankIslandAppearance"
enabled: SettingsData.dankIslandEnabled
visible: SettingsData.dankIslandEnabled
SettingsButtonGroupRow {
settingKey: "dankIslandPalette"
@@ -308,7 +321,7 @@ Item {
iconName: "notifications"
title: I18n.tr("Notifications", "island settings: notifications card title")
settingKey: "dankIslandNotifications"
enabled: SettingsData.dankIslandEnabled
visible: SettingsData.dankIslandEnabled
SettingsToggleRow {
settingKey: "dankIslandNotificationExpand"
@@ -337,7 +350,7 @@ Item {
settingKey: "dankIslandSatellites"
collapsible: true
expanded: true
enabled: SettingsData.dankIslandEnabled
visible: SettingsData.dankIslandEnabled
SettingsToggleRow {
settingKey: "dankIslandSatellitesEnabled"
@@ -439,7 +452,7 @@ Item {
iconName: "touch_app"
title: I18n.tr("Behavior", "island settings: behavior card title")
settingKey: "dankIslandInteraction"
enabled: SettingsData.dankIslandEnabled
visible: SettingsData.dankIslandEnabled
SettingsButtonGroupRow {
settingKey: "dankIslandInteractionMode"
@@ -498,7 +511,7 @@ Item {
title: I18n.tr("Motion & Accessibility", "island settings: motion card title")
settingKey: "dankIslandMotion"
collapsible: true
enabled: SettingsData.dankIslandEnabled
visible: SettingsData.dankIslandEnabled
SettingsToggleRow {
settingKey: "dankIslandReducedMotion"
+1
View File
@@ -663,6 +663,7 @@ Item {
SettingsControlledBy {
visible: root.connectedFrameModeActive
parentModal: root.parentModal
section: "frameBorder"
settingLabel: I18n.tr("Dock margin, opacity, and border")
reason: I18n.tr("Managed by Frame in Connected Mode")
}
+4 -10
View File
@@ -30,18 +30,12 @@ Item {
SettingsCard {
width: parent.width
iconName: "frame_source"
title: I18n.tr("General")
iconName: "toolbar"
title: I18n.tr("Layout")
settingKey: "frameEnabled"
tags: ["frame", "layout", "standard", "island", "mode", "bar"]
SettingsToggleRow {
settingKey: "frameEnable"
tags: ["frame", "border", "outline", "display"]
text: I18n.tr("Enable Frame")
description: I18n.tr("Draw a connected picture-frame border around the entire display")
checked: SettingsData.frameEnabled
onToggled: checked => SettingsData.set("frameEnabled", checked)
}
SettingsLayoutPicker {}
}
SettingsCard {
@@ -9,7 +9,7 @@ import "../../Common/QmlUtils.js" as QmlUtils
Item {
id: root
readonly property string settingKey: "dankIslandHomeLayout"
property string settingKey: "dankIslandHomeLayout"
readonly property var groupIds: SettingsData._islandHomeGroupIds
readonly property var layout: SettingsData.getIslandHomeLayout()
readonly property bool isHighlighted: SettingsSearchService.highlightSection === settingKey
@@ -141,14 +141,17 @@ Item {
Component.onCompleted: {
rebuild();
Qt.callLater(() => {
if (!root.parent)
if (!root.parent || !root.settingKey)
return;
const flickable = QmlUtils.findParentFlickable(root.parent);
if (flickable)
SettingsSearchService.registerCard(root.settingKey, root, flickable);
});
}
Component.onDestruction: SettingsSearchService.unregisterCard(settingKey)
Component.onDestruction: {
if (settingKey)
SettingsSearchService.unregisterCard(settingKey);
}
function stepHighlight(dir, move) {
const order = enabledOrder.concat(disabledOrder);
@@ -72,6 +72,7 @@ Item {
SettingsControlledBy {
visible: SettingsData.connectedFrameModeActive
parentModal: root.parentModal
section: "frameConnectedOptions"
settingLabel: I18n.tr("Default Launcher")
reason: I18n.tr("Connected Frame Mode uses the connected launcher for default launcher shortcuts.")
}
@@ -756,6 +757,7 @@ Item {
SettingsControlledBy {
visible: SettingsData.frameEnabled
parentModal: root.parentModal
section: "frameBorder"
settingLabel: I18n.tr("Darken Modal Background")
reason: I18n.tr("Disabled by Frame Mode")
}
@@ -1956,6 +1956,7 @@ Item {
SettingsControlledBy {
visible: themeColorsTab.connectedFrameModeActive
parentModal: themeColorsTab.parentModal
section: "frameOpacity"
settingLabel: I18n.tr("Surface Opacity")
reason: I18n.tr("Managed by Frame in Connected Mode")
}
@@ -2,6 +2,7 @@ pragma ComponentBehavior: Bound
import QtQuick
import qs.Common
import qs.Services
import qs.Widgets
StyledRect {
@@ -10,13 +11,15 @@ StyledRect {
LayoutMirroring.enabled: I18n.isRtl
LayoutMirroring.childrenInherit: true
property string target: "frame"
property string target: ""
property string section: ""
property string settingLabel: ""
property string reason: ""
property var parentModal: null
readonly property string resolvedTarget: target || (SettingsData.frameEnabled ? "frame" : "island")
readonly property string iconName: {
switch (target) {
switch (resolvedTarget) {
case "island":
return "view_in_ar";
default:
@@ -24,7 +27,7 @@ StyledRect {
}
}
readonly property string buttonText: {
switch (target) {
switch (resolvedTarget) {
case "island":
return I18n.tr("Open Island", "settings: button that opens the Dank Island tab");
default:
@@ -32,7 +35,7 @@ StyledRect {
}
}
readonly property string tabName: {
switch (target) {
switch (resolvedTarget) {
case "island":
return "dank_island";
default:
@@ -98,6 +101,8 @@ StyledRect {
onClicked: {
if (!root.parentModal)
return;
if (root.section)
SettingsSearchService.navigateToSection(root.section);
root.parentModal.showWithTabName(root.tabName);
}
}
@@ -0,0 +1,170 @@
pragma ComponentBehavior: Bound
import QtQuick
import qs.Common
import qs.Widgets
Row {
id: root
readonly property var barModes: [
{
"key": "standard",
"label": I18n.tr("Standard")
},
{
"key": "frame",
"label": I18n.tr("Frame")
},
{
"key": "island",
"label": I18n.tr("Island")
}
]
readonly property string activeBarMode: SettingsData.frameEnabled ? "frame" : SettingsData.dankIslandBarId ? "island" : "standard"
function leaveIsland() {
const config = SettingsData.islandBarConfig;
if (SettingsData.dankIslandBarId)
SettingsData.set("dankIslandBarId", "");
if (config && !config.enabled)
SettingsData.updateBarConfig(config.id, {
enabled: true
});
}
function applyBarMode(mode) {
switch (mode) {
case "frame":
if (SettingsData.frameEnabled)
return;
leaveIsland();
SettingsData.set("frameEnabled", true);
return;
case "island":
{
const configs = SettingsData.barConfigs || [];
const target = SettingsData.islandBarConfig ?? configs.find(cfg => cfg.enabled) ?? configs[0];
if (!target)
return;
if (!SettingsData.dankIslandBarId)
SettingsData.set("dankIslandBarId", target.id);
if (!target.enabled)
SettingsData.updateBarConfig(target.id, {
enabled: true
});
return;
}
default:
if (SettingsData.frameEnabled)
SettingsData.set("frameEnabled", false);
leaveIsland();
return;
}
}
width: parent?.width ?? 0
spacing: Theme.spacingS
Repeater {
model: root.barModes
Rectangle {
id: modeCard
required property var modelData
readonly property bool isActive: root.activeBarMode === modelData.key
width: (root.width - Theme.spacingS * 2) / 3
height: Math.round(Theme.fontSizeMedium * 7.5)
radius: Theme.cornerRadius
color: Theme.floatingWindowNestedSurface
border.width: isActive ? 2 : 1
border.color: isActive ? Theme.primary : Theme.outlineMedium
Rectangle {
anchors.fill: parent
radius: parent.radius
color: Theme.primary
opacity: modeMouse.containsMouse ? 0.12 : 0
}
Column {
anchors.centerIn: parent
spacing: Theme.spacingS
Rectangle {
id: screenPreview
readonly property real edgePad: Math.max(2, Math.round(width * 0.045))
readonly property real stripSize: Math.round(width * 0.11)
width: Math.round(Theme.iconSize * 2.9)
height: Math.round(width * 0.62)
radius: Theme.spacingXS
color: Theme.surfaceContainerHighest
border.width: 1
border.color: Theme.outline
anchors.horizontalCenter: parent.horizontalCenter
Rectangle {
visible: modeCard.modelData.key === "standard"
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
anchors.margins: screenPreview.edgePad
height: screenPreview.stripSize
radius: height / 2
color: Theme.primary
}
Rectangle {
visible: modeCard.modelData.key === "frame"
anchors.fill: parent
anchors.margins: screenPreview.edgePad
radius: screenPreview.radius
color: "transparent"
border.width: Math.max(2, Math.round(screenPreview.stripSize * 0.55))
border.color: Theme.primary
}
Rectangle {
visible: modeCard.modelData.key === "frame"
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
anchors.margins: screenPreview.edgePad
height: screenPreview.stripSize
radius: screenPreview.radius
color: Theme.primary
}
Rectangle {
visible: modeCard.modelData.key === "island"
anchors.top: parent.top
anchors.topMargin: screenPreview.edgePad
anchors.horizontalCenter: parent.horizontalCenter
width: Math.round(parent.width * 0.42)
height: screenPreview.stripSize
radius: height / 2
color: Theme.primary
}
}
StyledText {
text: modeCard.modelData.label
font.pixelSize: Theme.fontSizeSmall
font.weight: Font.Medium
color: modeCard.isActive ? Theme.primary : Theme.surfaceText
anchors.horizontalCenter: parent.horizontalCenter
}
}
MouseArea {
id: modeMouse
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: root.applyBarMode(modeCard.modelData.key)
}
}
}
}
+27 -3
View File
@@ -4,6 +4,7 @@ import Quickshell
import qs.Common
import qs.Services
import qs.Widgets
import qs.Modules.Settings.Widgets
Item {
id: widgetsTab
@@ -1413,6 +1414,29 @@ Item {
}
}
SettingsCard {
iconName: "view_in_ar"
title: I18n.tr("Home Compact", "island settings: home face card title")
visible: widgetsTab.dankIslandOwnsSelectedBarCenter
StyledText {
width: parent.width
text: I18n.tr("Drag groups above the clock to sit left of it, below to sit right. Click the eye to hide a group.", "island settings: home layout editor hint")
color: Theme.surfaceVariantText
font.pixelSize: Theme.fontSizeSmall
wrapMode: Text.WordWrap
}
Loader {
width: parent.width
height: item?.height ?? 0
active: widgetsTab.dankIslandOwnsSelectedBarCenter
sourceComponent: IslandHomeLayoutEditor {
settingKey: ""
}
}
}
StyledRect {
width: parent.width
height: centerSection.implicitHeight + Theme.spacingL * 2
@@ -1420,15 +1444,15 @@ Item {
color: Theme.floatingWindowNestedSurface
border.color: Theme.outlineMedium
border.width: Theme.layerOutlineWidth
visible: !widgetsTab.dankIslandOwnsSelectedBarCenter
WidgetsTabSection {
id: centerSection
anchors.fill: parent
anchors.margins: Theme.spacingL
title: widgetsTab.dankIslandOwnsSelectedBarCenter ? I18n.tr("Center Section - Reserved by Dank Island") : (selectedBarIsVertical ? I18n.tr("Middle Section") : I18n.tr("Center Section"))
titleIcon: widgetsTab.dankIslandOwnsSelectedBarCenter ? "lock" : "format_align_center"
title: selectedBarIsVertical ? I18n.tr("Middle Section") : I18n.tr("Center Section")
titleIcon: "format_align_center"
sectionId: "center"
readOnly: widgetsTab.dankIslandOwnsSelectedBarCenter
allWidgets: widgetsTab.baseWidgetDefinitions
items: widgetsTab.getItemsForSection("center")
onItemEnabledChanged: (sectionId, itemId, enabled) => {
@@ -14,10 +14,6 @@ Column {
property string title: ""
property string titleIcon: "widgets"
property string sectionId: ""
property bool readOnly: false
enabled: !readOnly
opacity: readOnly ? 0.55 : 1.0
DankTooltipV2 {
id: sharedTooltip
@@ -53,7 +53,10 @@ Singleton {
"networkAvailable": () => NetworkService.networkAvailable,
"dmsConnected": () => DMSService.isConnected && DMSService.apiVersion >= 23,
"matugenAvailable": () => Theme.matugenAvailable,
"greeterAvailable": () => GreeterService.available
"greeterAvailable": () => GreeterService.available,
"frameEnabled": () => SettingsData.frameEnabled,
"islandEnabled": () => !!SettingsData.dankIslandBarId,
"cellularAvailable": () => (NetworkService.cellularDevices?.length ?? 0) > 0
})
Component.onCompleted: indexFile.reload()
@@ -1,6 +1,7 @@
#!/usr/bin/env python3
import json
import re
import sys
from collections import Counter
from pathlib import Path
@@ -61,7 +62,7 @@ CATEGORY_KEYWORDS = {
"Personalization": ["customize", "custom", "personal", "appearance"],
"Time & Weather": ["clock", "forecast", "date"],
"Keyboard Shortcuts": ["keys", "bindings", "hotkey"],
"Dank Bar": ["panel", "topbar", "statusbar"],
"Bar": ["panel", "topbar", "statusbar"],
"Applications": ["apps", "programs", "window", "rules", "matching", "floating"],
"Dock": ["taskbar", "launcher bar"],
"Network": ["connectivity", "online"],
@@ -97,6 +98,7 @@ TAB_INDEX_MAP = {
"TimeWeatherTab.qml": 1,
"KeybindsTab.qml": 2,
"DankBarTab.qml": 3,
"DankDashTab.qml": 43,
"DankIslandTab.qml": 46,
"WorkspacesTab.qml": 4,
"CompositorLayoutTab.qml": 37,
@@ -146,16 +148,19 @@ FILE_CONDITION_MAP = {
"GreeterTab.qml": "greeterAvailable",
"MouseTouchpadTab.qml": "isNiri",
"KeyboardTab.qml": "isNiri",
"FrameTab.qml": "frameEnabled",
"DankIslandTab.qml": "islandEnabled",
"NetworkCellularTab.qml": "cellularAvailable",
}
TAB_CATEGORY_MAP = {
0: "Personalization",
1: "Time & Weather",
2: "Keyboard Shortcuts",
3: "Dank Bar",
4: "Dank Bar",
3: "Bar",
4: "Bar",
5: "Dock",
6: "Dank Bar",
6: "Bar",
7: "Network",
8: "System",
9: "Launcher",
@@ -171,7 +176,7 @@ TAB_CATEGORY_MAP = {
19: "Running Apps",
20: "System Updater",
21: "Power & Sleep",
22: "Dank Bar",
22: "Bar",
23: "System",
24: "Displays",
25: "Displays",
@@ -184,17 +189,17 @@ TAB_CATEGORY_MAP = {
33: "Frame",
34: "Default Apps",
35: "Users",
36: "Autostart",
36: "Autostart Apps",
37: "Personalization",
38: "Applications",
39: "Network",
40: "Network",
41: "Network",
42: "Power & Security",
43: "Dank Dash",
43: "Dashboard",
44: "System",
45: "System",
46: "Dank Island",
46: "Island",
47: "Network",
}
@@ -466,8 +471,8 @@ def parse_tabs_from_sidebar(sidebar_file):
parent = parent_match.group(1) if parent_match else None
cond = None
after_pos = match.end()
snippet = content[match.start() : min(after_pos + 200, len(content))]
snippet_end = content.find("}", match.end())
snippet = content[match.start() : snippet_end if snippet_end != -1 else len(content)]
for qml_cond, key in [
("shortcutsOnly", "keybindsAvailable"),
("soundsOnly", "soundsAvailable"),
@@ -479,6 +484,9 @@ def parse_tabs_from_sidebar(sidebar_file):
("niriOnly", "isNiri"),
("windowRulesCapable", "windowRulesCapable"),
("layoutCapable", "layoutCapable"),
("frameOnly", "frameEnabled"),
("islandOnly", "islandEnabled"),
("cellularOnly", "cellularAvailable"),
]:
if f'"{qml_cond}": true' in snippet:
cond = key
@@ -594,25 +602,59 @@ def extract_settings_index(root_dir):
"section": "dankIslandHomeLayout",
"label": "Home Layout",
"tabIndex": 46,
"category": "Dank Island",
"category": "Island",
"keywords": enrich_keywords(
"Home Layout",
"Order and hide the groups around the island clock",
"Dank Island",
"Island",
["media", "launcher", "weather", "battery", "volume", "brightness", "notifications", "badge", "left", "right", "hidden", "reorder"],
),
"icon": "home",
"description": "Order and hide the groups around the island clock",
"conditionKey": "islandEnabled",
}
)
return all_entries
def validate(all_entries, sidebar_file, root_dir):
errors = []
settings_dir = root_dir / "Modules" / "Settings"
for tab_file in sorted(settings_dir.glob("*Tab.qml")):
if tab_file.name not in TAB_INDEX_MAP:
errors.append(f"{tab_file.name} missing from TAB_INDEX_MAP")
with open(sidebar_file, "r", encoding="utf-8") as f:
sidebar_content = f.read()
sidebar_tabs = {int(n) for n in re.findall(r'"tabIndex"\s*:\s*(\d+)', sidebar_content)}
with open(Path(__file__).parent / "en.json", "r", encoding="utf-8") as f:
catalog_terms = {entry["term"] for entry in json.load(f)}
known_labels = catalog_terms | set(re.findall(r'I18n\.tr\("([^"]+)"', sidebar_content))
service_file = root_dir / "Services" / "SettingsSearchService.qml"
with open(service_file, "r", encoding="utf-8") as f:
condition_keys = set(re.findall(r'"(\w+)":\s*\(\)\s*=>', f.read()))
for entry in all_entries:
if entry["tabIndex"] not in sidebar_tabs:
errors.append(f"{entry['section']}: tabIndex {entry['tabIndex']} not in sidebar")
if entry["category"] not in known_labels:
errors.append(f"{entry['section']}: category '{entry['category']}' is not a catalog term")
cond = entry.get("conditionKey")
if cond and cond not in condition_keys:
errors.append(f"{entry['section']}: unknown conditionKey '{cond}'")
if not errors:
return
for error in sorted(set(errors)):
print(f"error: {error}", file=sys.stderr)
sys.exit(1)
def main():
script_dir = Path(__file__).parent
root_dir = script_dir.parent
sidebar_file = root_dir / "Modals" / "Settings" / "SettingsSidebar.qml"
sidebar_file = root_dir / "Common" / "SettingsTabs.qml"
print("Extracting settings search index...")
settings_entries = extract_settings_index(root_dir)
@@ -621,6 +663,7 @@ def main():
all_entries = tab_entries + settings_entries
all_entries.sort(key=lambda x: (x["tabIndex"], x["label"], x["section"]))
validate(all_entries, sidebar_file, root_dir)
output_path = script_dir / "settings_search_index.json"
with open(output_path, "w", encoding="utf-8") as f:
File diff suppressed because it is too large Load Diff