1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-25 14:02:53 -05:00

settings: add search

- because tabs arent loaded at runtime, we have to have a separate index
- Less ideal, but functional enough for now
This commit is contained in:
bbedward
2025-12-26 19:19:47 -05:00
parent d6fe7bea27
commit d9d6ab5776
30 changed files with 1142 additions and 47 deletions

View File

@@ -108,6 +108,7 @@ Item {
Column {
id: mainColumn
topPadding: 4
width: Math.min(550, parent.width - Theme.spacingL * 2)
anchors.horizontalCenter: parent.horizontalCenter

View File

@@ -200,6 +200,7 @@ Item {
Column {
id: mainColumn
topPadding: 4
width: Math.min(550, parent.width - Theme.spacingL * 2)
anchors.horizontalCenter: parent.horizontalCenter
spacing: Theme.spacingXL

View File

@@ -297,6 +297,7 @@ Item {
Column {
id: mainColumn
topPadding: 4
width: Math.min(550, parent.width - Theme.spacingL * 2)
anchors.horizontalCenter: parent.horizontalCenter
spacing: Theme.spacingXL
@@ -304,6 +305,7 @@ Item {
SettingsCard {
iconName: "dashboard"
title: I18n.tr("Bar Configurations")
settingKey: "barConfigurations"
RowLayout {
width: parent.width
@@ -491,6 +493,7 @@ Item {
SettingsCard {
iconName: "display_settings"
title: I18n.tr("Display Assignment")
settingKey: "barDisplay"
visible: selectedBarConfig?.enabled
StyledText {
@@ -594,6 +597,7 @@ Item {
SettingsCard {
iconName: "vertical_align_center"
title: I18n.tr("Position")
settingKey: "barPosition"
visible: selectedBarConfig?.enabled
Item {
@@ -654,6 +658,7 @@ Item {
SettingsCard {
iconName: "visibility_off"
title: I18n.tr("Visibility")
settingKey: "barVisibility"
visible: selectedBarConfig?.enabled
SettingsToggleRow {
@@ -855,6 +860,7 @@ Item {
SettingsCard {
iconName: "space_bar"
title: I18n.tr("Spacing")
settingKey: "barSpacing"
visible: selectedBarConfig?.enabled
SettingsSliderRow {
@@ -974,6 +980,7 @@ Item {
SettingsCard {
iconName: "rounded_corner"
title: I18n.tr("Corners & Background")
settingKey: "barCorners"
visible: selectedBarConfig?.enabled
SettingsToggleRow {
@@ -1224,6 +1231,7 @@ Item {
SettingsCard {
iconName: "opacity"
title: I18n.tr("Transparency")
settingKey: "barTransparency"
visible: selectedBarConfig?.enabled
SettingsSliderRow {

View File

@@ -35,6 +35,7 @@ Item {
Column {
id: mainColumn
topPadding: 4
width: Math.min(550, parent.width - Theme.spacingL * 2)
anchors.horizontalCenter: parent.horizontalCenter
spacing: Theme.spacingXL

View File

@@ -28,6 +28,7 @@ Item {
Column {
id: mainColumn
topPadding: 4
width: Math.min(550, parent.width - Theme.spacingL * 2)
anchors.horizontalCenter: parent.horizontalCenter

View File

@@ -123,6 +123,7 @@ Item {
Column {
id: mainColumn
topPadding: 4
width: Math.min(550, parent.width - Theme.spacingL * 2)
anchors.horizontalCenter: parent.horizontalCenter

View File

@@ -15,6 +15,7 @@ Item {
Column {
id: mainColumn
topPadding: 4
width: Math.min(550, parent.width - Theme.spacingL * 2)
anchors.horizontalCenter: parent.horizontalCenter
spacing: Theme.spacingXL
@@ -23,6 +24,7 @@ Item {
width: parent.width
iconName: "swap_vert"
title: I18n.tr("Dock Position")
settingKey: "dockPosition"
SettingsButtonGroupRow {
text: I18n.tr("Position")
@@ -66,6 +68,7 @@ Item {
width: parent.width
iconName: "dock_to_bottom"
title: I18n.tr("Dock Visibility")
settingKey: "dockVisibility"
SettingsToggleRow {
text: I18n.tr("Show Dock")
@@ -95,6 +98,7 @@ Item {
width: parent.width
iconName: "apps"
title: I18n.tr("Behavior")
settingKey: "dockBehavior"
SettingsToggleRow {
text: I18n.tr("Isolate Displays")
@@ -126,6 +130,7 @@ Item {
width: parent.width
iconName: "photo_size_select_large"
title: I18n.tr("Sizing")
settingKey: "dockSizing"
SettingsSliderRow {
text: I18n.tr("Icon Size")
@@ -141,6 +146,7 @@ Item {
width: parent.width
iconName: "space_bar"
title: I18n.tr("Spacing")
settingKey: "dockSpacing"
SettingsSliderRow {
text: I18n.tr("Padding")
@@ -174,6 +180,7 @@ Item {
width: parent.width
iconName: "opacity"
title: I18n.tr("Transparency")
settingKey: "dockTransparency"
SettingsSliderRow {
text: I18n.tr("Dock Transparency")
@@ -190,6 +197,7 @@ Item {
width: parent.width
iconName: "border_style"
title: I18n.tr("Border")
settingKey: "dockBorder"
SettingsToggleRow {
text: I18n.tr("Border")

View File

@@ -27,6 +27,7 @@ Item {
Column {
id: mainColumn
topPadding: 4
width: Math.min(550, parent.width - Theme.spacingL * 2)
anchors.horizontalCenter: parent.horizontalCenter

View File

@@ -25,6 +25,7 @@ Item {
Column {
id: mainColumn
topPadding: 4
width: Math.min(550, parent.width - Theme.spacingL * 2)
anchors.horizontalCenter: parent.horizontalCenter
spacing: Theme.spacingXL
@@ -33,6 +34,7 @@ Item {
width: parent.width
iconName: "apps"
title: I18n.tr("Launcher Button Logo")
settingKey: "launcherLogo"
StyledText {
width: parent.width
@@ -297,6 +299,7 @@ Item {
width: parent.width
iconName: "terminal"
title: I18n.tr("Launch Prefix")
settingKey: "launchPrefix"
StyledText {
width: parent.width
@@ -318,6 +321,7 @@ Item {
width: parent.width
iconName: "sort_by_alpha"
title: I18n.tr("Sorting & Layout")
settingKey: "launcherSorting"
SettingsToggleRow {
text: I18n.tr("Sort Alphabetically")
@@ -363,6 +367,7 @@ Item {
width: parent.width
iconName: "history"
title: I18n.tr("Recently Used Apps")
settingKey: "recentApps"
property var rankedAppsModel: {
var ranking = AppUsageHistoryData.appUsageRanking;

View File

@@ -16,6 +16,7 @@ Item {
Column {
id: mainColumn
topPadding: 4
width: Math.min(550, parent.width - Theme.spacingL * 2)
anchors.horizontalCenter: parent.horizontalCenter
spacing: Theme.spacingXL
@@ -24,6 +25,7 @@ Item {
width: parent.width
iconName: "lock"
title: I18n.tr("Lock Screen layout")
settingKey: "lockLayout"
SettingsToggleRow {
text: I18n.tr("Show Power Actions", "Enable power action icon on the lock screen window")
@@ -67,6 +69,7 @@ Item {
width: parent.width
iconName: "lock"
title: I18n.tr("Lock Screen behaviour")
settingKey: "lockBehavior"
StyledText {
text: I18n.tr("loginctl not available - lock integration requires DMS socket connection")
@@ -110,6 +113,7 @@ Item {
width: parent.width
iconName: "monitor"
title: I18n.tr("Lock Screen Display")
settingKey: "lockDisplay"
visible: Quickshell.screens.length > 1
StyledText {

View File

@@ -14,6 +14,7 @@ Item {
Column {
id: mainColumn
topPadding: 4
width: Math.min(550, parent.width - Theme.spacingL * 2)
anchors.horizontalCenter: parent.horizontalCenter
spacing: Theme.spacingXL
@@ -22,6 +23,7 @@ Item {
width: parent.width
iconName: "music_note"
title: I18n.tr("Media Player Settings")
settingKey: "mediaPlayer"
SettingsToggleRow {
text: I18n.tr("Wave Progress Bars")

View File

@@ -51,6 +51,7 @@ Item {
Column {
id: mainColumn
topPadding: 4
width: Math.min(600, parent.width - Theme.spacingL * 2)
anchors.horizontalCenter: parent.horizontalCenter

View File

@@ -81,6 +81,7 @@ Item {
Column {
id: mainColumn
topPadding: 4
width: Math.min(550, parent.width - Theme.spacingL * 2)
anchors.horizontalCenter: parent.horizontalCenter
spacing: Theme.spacingXL
@@ -89,6 +90,7 @@ Item {
width: parent.width
iconName: "notifications"
title: I18n.tr("Notification Popups")
settingKey: "notificationPopups"
SettingsDropdownRow {
text: I18n.tr("Popup Position")
@@ -144,6 +146,7 @@ Item {
width: parent.width
iconName: "notifications_off"
title: I18n.tr("Do Not Disturb")
settingKey: "doNotDisturb"
SettingsToggleRow {
text: I18n.tr("Enable Do Not Disturb")
@@ -157,6 +160,7 @@ Item {
width: parent.width
iconName: "timer"
title: I18n.tr("Notification Timeouts")
settingKey: "notificationTimeouts"
SettingsDropdownRow {
text: I18n.tr("Low Priority")

View File

@@ -14,6 +14,7 @@ Item {
Column {
id: mainColumn
topPadding: 4
width: Math.min(550, parent.width - Theme.spacingL * 2)
anchors.horizontalCenter: parent.horizontalCenter
spacing: Theme.spacingXL
@@ -22,6 +23,7 @@ Item {
width: parent.width
iconName: "tune"
title: I18n.tr("On-screen Displays")
settingKey: "osd"
SettingsDropdownRow {
text: I18n.tr("OSD Position")

View File

@@ -27,6 +27,7 @@ FocusScope {
Column {
id: mainColumn
topPadding: 4
width: Math.min(550, parent.width - Theme.spacingL * 2)
anchors.horizontalCenter: parent.horizontalCenter

View File

@@ -23,6 +23,7 @@ Item {
Column {
id: mainColumn
topPadding: 4
width: Math.min(550, parent.width - Theme.spacingL * 2)
anchors.horizontalCenter: parent.horizontalCenter
spacing: Theme.spacingXL
@@ -31,6 +32,7 @@ Item {
width: parent.width
iconName: "schedule"
title: I18n.tr("Idle Settings")
settingKey: "idleSettings"
Row {
width: parent.width
@@ -294,6 +296,7 @@ Item {
width: parent.width
iconName: "tune"
title: I18n.tr("Power Menu Customization")
settingKey: "powerMenu"
StyledText {
text: I18n.tr("Customize which actions appear in the power menu")
@@ -400,6 +403,7 @@ Item {
width: parent.width
iconName: "check_circle"
title: I18n.tr("Power Action Confirmation")
settingKey: "powerConfirmation"
SettingsToggleRow {
text: I18n.tr("Hold to Confirm Power Actions")
@@ -436,6 +440,7 @@ Item {
width: parent.width
iconName: "developer_mode"
title: I18n.tr("Custom Power Actions")
settingKey: "customPowerActions"
Repeater {
model: [
@@ -508,6 +513,7 @@ Item {
width: parent.width
iconName: "tune"
title: I18n.tr("Advanced")
settingKey: "powerAdvanced"
collapsible: true
expanded: false

View File

@@ -70,6 +70,7 @@ Item {
Column {
id: mainColumn
topPadding: 4
width: Math.min(600, parent.width - Theme.spacingL * 2)
anchors.horizontalCenter: parent.horizontalCenter

View File

@@ -14,6 +14,7 @@ Item {
Column {
id: mainColumn
topPadding: 4
width: Math.min(550, parent.width - Theme.spacingL * 2)
anchors.horizontalCenter: parent.horizontalCenter
spacing: Theme.spacingXL
@@ -22,6 +23,7 @@ Item {
width: parent.width
iconName: "apps"
title: I18n.tr("Running Apps Settings")
settingKey: "runningApps"
SettingsToggleRow {
text: I18n.tr("Running Apps Only In Current Workspace")

View File

@@ -15,6 +15,7 @@ Item {
Column {
id: mainColumn
topPadding: 4
width: Math.min(550, parent.width - Theme.spacingL * 2)
anchors.horizontalCenter: parent.horizontalCenter
@@ -24,6 +25,7 @@ Item {
tab: "sounds"
tags: ["sound", "audio", "notification", "volume"]
title: I18n.tr("System Sounds")
settingKey: "systemSounds"
iconName: SettingsData.soundsEnabled ? "volume_up" : "volume_off"
visible: AudioService.soundsAvailable

View File

@@ -14,6 +14,7 @@ Item {
Column {
id: mainColumn
topPadding: 4
width: Math.min(550, parent.width - Theme.spacingL * 2)
anchors.horizontalCenter: parent.horizontalCenter
spacing: Theme.spacingXL
@@ -22,6 +23,7 @@ Item {
width: parent.width
iconName: "refresh"
title: I18n.tr("System Updater")
settingKey: "systemUpdater"
SettingsToggleRow {
text: I18n.tr("Hide Updater Widget", "When updater widget is used, then hide it if no update found")

View File

@@ -45,6 +45,7 @@ Item {
Column {
id: mainColumn
topPadding: 4
width: Math.min(550, parent.width - Theme.spacingL * 2)
anchors.horizontalCenter: parent.horizontalCenter
@@ -54,6 +55,7 @@ Item {
tab: "theme"
tags: ["color", "palette", "theme", "appearance"]
title: I18n.tr("Theme Color")
settingKey: "themeColor"
iconName: "palette"
Column {
@@ -742,6 +744,7 @@ Item {
tab: "theme"
tags: ["light", "dark", "mode", "appearance"]
title: I18n.tr("Color Mode")
settingKey: "colorMode"
iconName: "contrast"
SettingsToggleRow {
@@ -762,6 +765,7 @@ Item {
tab: "theme"
tags: ["transparency", "opacity", "widget", "styling"]
title: I18n.tr("Widget Styling")
settingKey: "widgetStyling"
iconName: "opacity"
SettingsButtonGroupRow {
@@ -847,6 +851,7 @@ Item {
tab: "theme"
tags: ["niri", "layout", "gaps", "radius", "window"]
title: I18n.tr("Niri Layout Overrides")
settingKey: "niriLayout"
iconName: "crop_square"
visible: CompositorService.isNiri
@@ -917,6 +922,8 @@ Item {
SettingsCard {
tab: "theme"
tags: ["modal", "darken", "background", "overlay"]
title: I18n.tr("Modal Background")
settingKey: "modalBackground"
SettingsToggleRow {
tab: "theme"
@@ -933,6 +940,7 @@ Item {
tab: "theme"
tags: ["applications", "portal", "dark", "terminal"]
title: I18n.tr("Applications")
settingKey: "applications"
iconName: "terminal"
SettingsToggleRow {
@@ -960,6 +968,7 @@ Item {
tab: "theme"
tags: ["matugen", "templates", "theming"]
title: I18n.tr("Matugen Templates")
settingKey: "matugenTemplates"
iconName: "auto_awesome"
visible: Theme.matugenAvailable
@@ -1202,6 +1211,8 @@ Item {
SettingsCard {
tab: "theme"
tags: ["icon", "theme", "system"]
title: I18n.tr("Icon Theme")
settingKey: "iconTheme"
SettingsDropdownRow {
tab: "theme"
@@ -1227,6 +1238,7 @@ Item {
tab: "theme"
tags: ["system", "app", "theming", "gtk", "qt"]
title: I18n.tr("System App Theming")
settingKey: "systemAppTheming"
iconName: "extension"
visible: Theme.matugenAvailable

View File

@@ -17,6 +17,7 @@ Item {
Column {
id: mainColumn
topPadding: 4
width: Math.min(550, parent.width - Theme.spacingL * 2)
anchors.horizontalCenter: parent.horizontalCenter
@@ -26,6 +27,7 @@ Item {
tab: "time"
tags: ["time", "clock", "format", "24hour"]
title: I18n.tr("Time Format")
settingKey: "timeFormat"
iconName: "schedule"
SettingsToggleRow {
@@ -53,6 +55,7 @@ Item {
tab: "time"
tags: ["date", "format", "calendar"]
title: I18n.tr("Date Format")
settingKey: "dateFormat"
iconName: "calendar_today"
SettingsDropdownRow {
@@ -325,6 +328,7 @@ Item {
tab: "time"
tags: ["weather", "enable", "forecast"]
title: I18n.tr("Weather")
settingKey: "weather"
iconName: "cloud"
SettingsToggleRow {
@@ -546,6 +550,7 @@ Item {
tab: "time"
tags: ["weather", "current", "display"]
title: I18n.tr("Current Weather")
settingKey: "weather"
iconName: "visibility"
visible: SettingsData.weatherEnabled

View File

@@ -63,6 +63,7 @@ Item {
Column {
id: mainColumn
topPadding: 4
width: Math.min(550, parent.width - Theme.spacingL * 2)
anchors.horizontalCenter: parent.horizontalCenter
spacing: Theme.spacingXL
@@ -71,6 +72,7 @@ Item {
tab: "typography"
tags: ["font", "family", "text", "typography"]
title: I18n.tr("Typography")
settingKey: "typography"
iconName: "text_fields"
SettingsDropdownRow {
@@ -206,6 +208,7 @@ Item {
tab: "typography"
tags: ["animation", "speed", "motion", "duration"]
title: I18n.tr("Animation Speed")
settingKey: "animationSpeed"
iconName: "animation"
Item {

View File

@@ -28,6 +28,7 @@ Item {
Column {
id: mainColumn
topPadding: 4
width: Math.min(550, parent.width - Theme.spacingL * 2)
anchors.horizontalCenter: parent.horizontalCenter
@@ -37,6 +38,7 @@ Item {
tab: "wallpaper"
tags: ["background", "image", "picture"]
title: I18n.tr("Wallpaper")
settingKey: "wallpaper"
iconName: "wallpaper"
Row {
@@ -1186,8 +1188,9 @@ Item {
SettingsCard {
tab: "wallpaper"
tags: ["external", "disable", "swww", "hyprpaper", "swaybg"]
iconName: "wallpaper"
title: I18n.tr("External Wallpaper Management", "wallpaper settings external management")
settingKey: "disableWallpaper"
iconName: "wallpaper"
SettingsToggleRow {
tab: "wallpaper"
@@ -1215,6 +1218,8 @@ Item {
SettingsCard {
tab: "wallpaper"
tags: ["blur", "layer", "niri", "compositor"]
title: I18n.tr("Blur Wallpaper Layer")
settingKey: "blurWallpaper"
visible: CompositorService.isNiri
SettingsToggleRow {

View File

@@ -2,6 +2,7 @@ pragma ComponentBehavior: Bound
import QtQuick
import qs.Common
import qs.Services
import qs.Widgets
StyledRect {
@@ -12,6 +13,7 @@ StyledRect {
property string tab: ""
property var tags: []
property string settingKey: ""
property string title: ""
property string iconName: ""
@@ -20,6 +22,8 @@ StyledRect {
default property alias content: contentColumn.children
readonly property bool isHighlighted: settingKey !== "" && SettingsSearchService.highlightSection === settingKey
width: parent?.width ?? 0
height: {
var hasHeader = root.title !== "" || root.iconName !== "";
@@ -37,6 +41,32 @@ StyledRect {
readonly property bool hasHeader: root.title !== "" || root.iconName !== ""
property bool userToggledCollapse: false
function findParentFlickable() {
let p = root.parent;
while (p) {
if (p.hasOwnProperty("contentY") && p.hasOwnProperty("contentItem")) {
return p;
}
p = p.parent;
}
return null;
}
Component.onCompleted: {
if (settingKey) {
let flickable = findParentFlickable();
if (flickable) {
SettingsSearchService.registerCard(settingKey, root, flickable);
}
}
}
Component.onDestruction: {
if (settingKey) {
SettingsSearchService.unregisterCard(settingKey);
}
}
Behavior on height {
enabled: root.userToggledCollapse
NumberAnimation {
@@ -49,6 +79,26 @@ StyledRect {
}
}
Rectangle {
id: highlightBorder
anchors.fill: parent
anchors.margins: -2
radius: root.radius + 2
color: "transparent"
border.width: 2
border.color: Theme.primary
opacity: root.isHighlighted ? 1 : 0
visible: opacity > 0
z: 100
Behavior on opacity {
NumberAnimation {
duration: Theme.shortDuration
easing.type: Theme.standardEasing
}
}
}
Column {
id: mainColumn
anchors.fill: parent

View File

@@ -932,6 +932,7 @@ Item {
Column {
id: mainColumn
topPadding: 4
width: Math.min(550, parent.width - Theme.spacingL * 2)
anchors.horizontalCenter: parent.horizontalCenter
spacing: Theme.spacingXL

View File

@@ -15,6 +15,7 @@ Item {
Column {
id: mainColumn
topPadding: 4
width: Math.min(550, parent.width - Theme.spacingL * 2)
anchors.horizontalCenter: parent.horizontalCenter
spacing: Theme.spacingXL
@@ -23,6 +24,7 @@ Item {
width: parent.width
iconName: "view_module"
title: I18n.tr("Workspace Settings")
settingKey: "workspaceSettings"
SettingsToggleRow {
text: I18n.tr("Workspace Index Numbers")
@@ -114,6 +116,7 @@ Item {
width: parent.width
iconName: "label"
title: I18n.tr("Named Workspace Icons")
settingKey: "workspaceIcons"
visible: SettingsData.hasNamedWorkspaces()
StyledText {