added services page + rename barConfig json property to bar, migration helper function
This commit is contained in:
@@ -9,8 +9,8 @@ ConnectedRect {
|
||||
id: root
|
||||
|
||||
property alias icon: icon.text
|
||||
property alias label: label.text
|
||||
property alias status: status.text
|
||||
property alias text: label.text
|
||||
|
||||
signal clicked
|
||||
|
||||
@@ -28,13 +28,13 @@ ConnectedRect {
|
||||
anchors.leftMargin: Appearance.padding.largeIncreased
|
||||
anchors.margins: Appearance.padding.normal
|
||||
anchors.rightMargin: Appearance.padding.largeIncreased
|
||||
spacing: Appearance.spacing.small
|
||||
spacing: Appearance.spacing.normal
|
||||
|
||||
MaterialIcon {
|
||||
id: icon
|
||||
|
||||
color: DynamicColors.palette.m3onSurfaceVariant
|
||||
font.pointSize: Appearance.font.size.medium
|
||||
font.pointSize: Appearance.font.size.large
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
|
||||
@@ -11,9 +11,9 @@ ConnectedRect {
|
||||
default required property Item content
|
||||
property alias icon: icon.text
|
||||
property bool keepPopupAsChild
|
||||
property alias label: label.text
|
||||
readonly property alias popup: popup
|
||||
property alias status: status.text
|
||||
property alias text: label.text
|
||||
|
||||
Layout.fillWidth: true
|
||||
implicitHeight: navLayout.implicitHeight + navLayout.anchors.margins * 2
|
||||
@@ -33,13 +33,13 @@ ConnectedRect {
|
||||
anchors.leftMargin: Appearance.padding.largeIncreased
|
||||
anchors.margins: Appearance.padding.normal
|
||||
anchors.rightMargin: Appearance.padding.largeIncreased
|
||||
spacing: Appearance.spacing.small
|
||||
spacing: Appearance.spacing.normal
|
||||
|
||||
MaterialIcon {
|
||||
id: icon
|
||||
|
||||
color: DynamicColors.palette.m3onSurfaceVariant
|
||||
font.pointSize: Appearance.font.size.medium
|
||||
font.pointSize: Appearance.font.size.larger
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
|
||||
@@ -10,6 +10,8 @@ import qs.Modules.SettingsNew.Pages.Wallpaper
|
||||
import qs.Modules.SettingsNew.Pages.Audio
|
||||
import qs.Modules.SettingsNew.Pages.Apps
|
||||
import qs.Modules.SettingsNew.Pages.Panels
|
||||
import qs.Modules.SettingsNew.Pages.Panels.Bar
|
||||
import qs.Modules.SettingsNew.Pages.Services
|
||||
|
||||
QtObject {
|
||||
id: root
|
||||
@@ -72,13 +74,18 @@ QtObject {
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
BarPanel {
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
DashboardPanel {
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
BarPanel {
|
||||
ResourcesPanel {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,8 +98,26 @@ QtObject {
|
||||
SidebarPanel {
|
||||
}
|
||||
}
|
||||
|
||||
// Bar sub pages
|
||||
Component {
|
||||
BarTray {
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
BarStatusIcons {
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
BarClock {
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// Apps
|
||||
Component {
|
||||
StackPage {
|
||||
Component {
|
||||
@@ -110,6 +135,21 @@ QtObject {
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// Services
|
||||
Component {
|
||||
StackPage {
|
||||
Component {
|
||||
ServicesPage {
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
NotificationsPage {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
readonly property Component placeholderComp: Component {
|
||||
|
||||
@@ -30,33 +30,33 @@ PageBase {
|
||||
DefaultRow {
|
||||
first: true
|
||||
icon: "terminal"
|
||||
label: qsTr("Terminal")
|
||||
status: Config.general.apps.terminal.join(" ")
|
||||
text: qsTr("Terminal")
|
||||
|
||||
onSelected: app => Config.general.apps.terminal = app.command
|
||||
}
|
||||
|
||||
DefaultRow {
|
||||
icon: "volume_up"
|
||||
label: qsTr("Audio")
|
||||
status: Config.general.apps.audio.join(" ")
|
||||
text: qsTr("Audio")
|
||||
|
||||
onSelected: app => Config.general.apps.audio = app.command
|
||||
}
|
||||
|
||||
DefaultRow {
|
||||
icon: "play_circle"
|
||||
label: qsTr("Media playback")
|
||||
status: Config.general.apps.playback.join(" ")
|
||||
text: qsTr("Media playback")
|
||||
|
||||
onSelected: app => Config.general.apps.playback = app.command
|
||||
}
|
||||
|
||||
DefaultRow {
|
||||
icon: "folder"
|
||||
label: qsTr("File manager")
|
||||
last: true
|
||||
status: Config.general.apps.explorer.join(" ")
|
||||
text: qsTr("File manager")
|
||||
|
||||
onSelected: app => Config.general.apps.explorer = app.command
|
||||
}
|
||||
@@ -69,9 +69,9 @@ PageBase {
|
||||
NavRow {
|
||||
first: true
|
||||
icon: "apps"
|
||||
label: qsTr("All apps")
|
||||
last: true
|
||||
status: qsTr("Browse installed apps, set favorites and hidden")
|
||||
text: qsTr("All apps")
|
||||
|
||||
onClicked: root.sState.openSubPage(1)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick.Layouts
|
||||
import qs.Config
|
||||
import qs.Components
|
||||
import qs.Modules.SettingsNew.Common
|
||||
|
||||
PageBase {
|
||||
id: root
|
||||
|
||||
readonly property list<MenuItem> clockFormats: [
|
||||
MenuItem {
|
||||
text: qsTr("Long format")
|
||||
value: "dddd d MMM - hh:mm"
|
||||
},
|
||||
MenuItem {
|
||||
text: qsTr("Short format")
|
||||
value: "ddd d MMM - hh:mm"
|
||||
},
|
||||
MenuItem {
|
||||
text: qsTr("Time only")
|
||||
value: "hh:mm"
|
||||
},
|
||||
MenuItem {
|
||||
text: qsTr("Long format seconds")
|
||||
value: "dddd d MMM - hh:mm:ss"
|
||||
},
|
||||
MenuItem {
|
||||
text: qsTr("Short format seconds")
|
||||
value: "ddd d MMM - hh:mm:ss"
|
||||
},
|
||||
MenuItem {
|
||||
text: qsTr("Time only seconds")
|
||||
value: "hh:mm:ss"
|
||||
}
|
||||
]
|
||||
|
||||
isSubPage: true
|
||||
title: qsTr("Clock")
|
||||
|
||||
ColumnLayout {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: parent.top
|
||||
spacing: Appearance.spacing.extraSmall / 2
|
||||
width: root.cappedWidth
|
||||
|
||||
SelectRow {
|
||||
Layout.topMargin: Appearance.spacing.extraSmall / 2 - parent.spacing
|
||||
active: root.clockFormats.find(item => item.value === Config.general.dateFormat)
|
||||
first: true
|
||||
last: true
|
||||
menuItems: root.clockFormats
|
||||
subtext: qsTr("Change how time is displayed in the widget")
|
||||
text: qsTr("Time format")
|
||||
|
||||
onSelected: item => {
|
||||
Config.general.dateFormat = item.value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick.Layouts
|
||||
import qs.Config
|
||||
import qs.Modules.SettingsNew.Common
|
||||
|
||||
PageBase {
|
||||
id: root
|
||||
|
||||
isSubPage: true
|
||||
title: qsTr("System icons")
|
||||
|
||||
ColumnLayout {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: parent.top
|
||||
spacing: Appearance.spacing.extraSmall / 2
|
||||
width: root.cappedWidth
|
||||
|
||||
// Visible icons
|
||||
SectionHeader {
|
||||
first: true
|
||||
text: qsTr("Visible icons")
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.bar.tray.showAudio
|
||||
first: true
|
||||
text: qsTr("Speakers")
|
||||
|
||||
onToggled: Config.bar.tray.showAudio = checked
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.bar.tray.showMicrophone
|
||||
text: qsTr("Microphone")
|
||||
|
||||
onToggled: Config.bar.tray.showMicrophone = checked
|
||||
}
|
||||
|
||||
//////// FOR LATER:
|
||||
// ToggleRow {
|
||||
// checked: Config.bar.tray.showNetwork
|
||||
// text: qsTr("Network")
|
||||
//
|
||||
// onToggled: Config.bar.tray.showNetwork = checked
|
||||
// }
|
||||
//
|
||||
// ToggleRow {
|
||||
// checked: Config.bar.tray.showWifi
|
||||
// text: qsTr("Wi-Fi")
|
||||
//
|
||||
// onToggled: Config.bar.tray.showWifi = checked
|
||||
// }
|
||||
//
|
||||
// ToggleRow {
|
||||
// checked: Config.bar.tray.showBluetooth
|
||||
// text: qsTr("Bluetooth")
|
||||
//
|
||||
// onToggled: Config.bar.tray.showBluetooth = checked
|
||||
// }
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.bar.tray.showPower
|
||||
last: true
|
||||
text: qsTr("Battery")
|
||||
|
||||
onToggled: Config.bar.tray.showPower = checked
|
||||
}
|
||||
|
||||
// Behaviour
|
||||
SectionHeader {
|
||||
text: qsTr("Behavior")
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.bar.popouts.audio
|
||||
first: true
|
||||
subtext: qsTr("Show a details popout when hovering the audio icons")
|
||||
text: qsTr("Audio popout on hover")
|
||||
|
||||
onToggled: Config.bar.popouts.audio = checked
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.bar.popouts.upower
|
||||
last: true
|
||||
subtext: qsTr("Show a details popout when hovering the power icon")
|
||||
text: qsTr("Power popout on hover")
|
||||
|
||||
onToggled: Config.bar.popouts.upower = checked
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick.Layouts
|
||||
import qs.Config
|
||||
import qs.Modules.SettingsNew.Common
|
||||
|
||||
PageBase {
|
||||
id: root
|
||||
|
||||
isSubPage: true
|
||||
title: qsTr("Tray")
|
||||
|
||||
ColumnLayout {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: parent.top
|
||||
spacing: Appearance.spacing.extraSmall / 2
|
||||
width: root.cappedWidth
|
||||
|
||||
SpinRow {
|
||||
first: true
|
||||
from: 12
|
||||
last: true
|
||||
stepSize: 1
|
||||
text: qsTr("Icon size")
|
||||
to: 24
|
||||
value: Config.bar.tray.trayIconSize
|
||||
|
||||
onMoved: value => Config.bar.tray.trayIconSize = value
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -23,13 +23,13 @@ PageBase {
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.barConfig.autoHide
|
||||
checked: Config.bar.autoHide
|
||||
first: true
|
||||
last: true
|
||||
subtext: qsTr("Hide the bar, reveal on hover")
|
||||
text: qsTr("Auto hide")
|
||||
|
||||
onToggled: Config.barConfig.autoHide = checked
|
||||
onToggled: Config.bar.autoHide = checked
|
||||
}
|
||||
|
||||
// Components
|
||||
@@ -39,44 +39,28 @@ PageBase {
|
||||
|
||||
NavRow {
|
||||
first: true
|
||||
icon: "workspaces"
|
||||
label: qsTr("Workspaces")
|
||||
status: qsTr("Indicators, window icons")
|
||||
icon: "widgets"
|
||||
status: qsTr("System tray icons")
|
||||
text: qsTr("Tray")
|
||||
|
||||
onClicked: root.sState.openSubPage(5)
|
||||
}
|
||||
|
||||
NavRow {
|
||||
icon: "web_asset"
|
||||
label: qsTr("Active window")
|
||||
status: qsTr("Title display, popout")
|
||||
icon: "signal_cellular_alt"
|
||||
status: qsTr("Visible indicators")
|
||||
text: qsTr("Status icons")
|
||||
|
||||
onClicked: root.sState.openSubPage(6)
|
||||
}
|
||||
|
||||
NavRow {
|
||||
icon: "widgets"
|
||||
label: qsTr("Tray")
|
||||
status: qsTr("System tray icons")
|
||||
icon: "schedule"
|
||||
last: true
|
||||
status: qsTr("Date, icon, background")
|
||||
text: qsTr("Clock")
|
||||
|
||||
onClicked: root.sState.openSubPage(7)
|
||||
}
|
||||
|
||||
NavRow {
|
||||
icon: "signal_cellular_alt"
|
||||
label: qsTr("Status icons")
|
||||
status: qsTr("Visible indicators")
|
||||
|
||||
onClicked: root.sState.openSubPage(8)
|
||||
}
|
||||
|
||||
NavRow {
|
||||
icon: "schedule"
|
||||
label: qsTr("Clock")
|
||||
last: true
|
||||
status: qsTr("Date, icon, background")
|
||||
|
||||
onClicked: root.sState.openSubPage(9)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,54 +32,5 @@ PageBase {
|
||||
|
||||
onToggled: Config.dashboard.enabled = checked
|
||||
}
|
||||
|
||||
// Performance widgets
|
||||
SectionHeader {
|
||||
text: qsTr("Performance widgets")
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.dashboard.performance.showBattery
|
||||
first: true
|
||||
text: qsTr("Battery")
|
||||
|
||||
onToggled: Config.dashboard.performance.showBattery = checked
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.dashboard.performance.showGpu
|
||||
text: qsTr("GPU")
|
||||
|
||||
onToggled: Config.dashboard.performance.showGpu = checked
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.dashboard.performance.showCpu
|
||||
text: qsTr("CPU")
|
||||
|
||||
onToggled: Config.dashboard.performance.showCpu = checked
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.dashboard.performance.showMemory
|
||||
text: qsTr("Memory")
|
||||
|
||||
onToggled: Config.dashboard.performance.showMemory = checked
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.dashboard.performance.showStorage
|
||||
text: qsTr("Storage")
|
||||
|
||||
onToggled: Config.dashboard.performance.showStorage = checked
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.dashboard.performance.showNetwork
|
||||
last: true
|
||||
text: qsTr("Network")
|
||||
|
||||
onToggled: Config.dashboard.performance.showNetwork = checked
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import qs.Config
|
||||
import qs.Components
|
||||
import qs.Modules.SettingsNew.Common
|
||||
|
||||
PageBase {
|
||||
id: root
|
||||
|
||||
isSubPage: true
|
||||
title: qsTr("Resources")
|
||||
|
||||
ColumnLayout {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: parent.top
|
||||
spacing: Appearance.spacing.extraSmall / 2
|
||||
width: root.cappedWidth
|
||||
|
||||
// General
|
||||
SectionHeader {
|
||||
first: true
|
||||
text: qsTr("General")
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.dashboard.performance.enabled
|
||||
first: true
|
||||
last: true
|
||||
text: qsTr("Enabled")
|
||||
|
||||
onToggled: Config.dashboard.performance.enabled = checked
|
||||
}
|
||||
|
||||
// Performance widgets
|
||||
SectionHeader {
|
||||
text: qsTr("Performance widgets")
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.dashboard.performance.showBattery
|
||||
first: true
|
||||
text: qsTr("Battery")
|
||||
|
||||
onToggled: Config.dashboard.performance.showBattery = checked
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.dashboard.performance.showGpu
|
||||
text: qsTr("GPU")
|
||||
|
||||
onToggled: Config.dashboard.performance.showGpu = checked
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.dashboard.performance.showCpu
|
||||
text: qsTr("CPU")
|
||||
|
||||
onToggled: Config.dashboard.performance.showCpu = checked
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.dashboard.performance.showMemory
|
||||
text: qsTr("Memory")
|
||||
|
||||
onToggled: Config.dashboard.performance.showMemory = checked
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.dashboard.performance.showStorage
|
||||
text: qsTr("Storage")
|
||||
|
||||
onToggled: Config.dashboard.performance.showStorage = checked
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.dashboard.performance.showNetwork
|
||||
last: true
|
||||
text: qsTr("Network")
|
||||
|
||||
onToggled: Config.dashboard.performance.showNetwork = checked
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,36 +15,44 @@ PageBase {
|
||||
|
||||
NavRow {
|
||||
first: true
|
||||
icon: "dashboard"
|
||||
label: qsTr("Dashboard")
|
||||
status: Config.dashboard.enabled ? qsTr("Enabled") : qsTr("Disabled")
|
||||
icon: "dock_to_bottom"
|
||||
status: !Config.bar.autoHide ? qsTr("Always visible") : qsTr("Reveal on hover")
|
||||
text: qsTr("Bar")
|
||||
|
||||
onClicked: root.sState.openSubPage(1)
|
||||
}
|
||||
|
||||
NavRow {
|
||||
icon: "dock_to_bottom"
|
||||
label: qsTr("Taskbar")
|
||||
status: !Config.barConfig.autoHide ? qsTr("Always visible") : qsTr("Reveal on hover")
|
||||
icon: "dashboard"
|
||||
status: Config.dashboard.enabled ? qsTr("Enabled") : qsTr("Disabled")
|
||||
text: qsTr("Dashboard")
|
||||
|
||||
onClicked: root.sState.openSubPage(2)
|
||||
}
|
||||
|
||||
NavRow {
|
||||
icon: "apps"
|
||||
label: qsTr("Launcher")
|
||||
status: Config.launcher.enabled ? qsTr("Enabled") : qsTr("Disabled")
|
||||
icon: "insert_chart"
|
||||
status: Config.dashboard.performance.enabled ? qsTr("Enabled") : qsTr("Disabled")
|
||||
text: qsTr("Resources")
|
||||
|
||||
onClicked: root.sState.openSubPage(3)
|
||||
}
|
||||
|
||||
NavRow {
|
||||
icon: "dock_to_right"
|
||||
label: qsTr("Sidebar")
|
||||
last: true
|
||||
status: Config.sidebar.enabled ? qsTr("Enabled") : qsTr("Disabled")
|
||||
icon: "apps"
|
||||
status: Config.launcher.enabled ? qsTr("Enabled") : qsTr("Disabled")
|
||||
text: qsTr("Launcher")
|
||||
|
||||
onClicked: root.sState.openSubPage(4)
|
||||
}
|
||||
|
||||
NavRow {
|
||||
icon: "dock_to_right"
|
||||
last: true
|
||||
status: Config.sidebar.enabled ? qsTr("Enabled") : qsTr("Disabled")
|
||||
text: qsTr("Sidebar")
|
||||
|
||||
onClicked: root.sState.openSubPage(5)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,162 @@
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import qs.Config
|
||||
import qs.Components
|
||||
import qs.Modules.SettingsNew.Common
|
||||
|
||||
PageBase {
|
||||
id: root
|
||||
|
||||
isSubPage: true
|
||||
title: qsTr("Notifications")
|
||||
|
||||
ColumnLayout {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: parent.top
|
||||
spacing: Appearance.spacing.extraSmall / 2
|
||||
width: root.cappedWidth
|
||||
|
||||
// Notifications
|
||||
SectionHeader {
|
||||
first: true
|
||||
text: qsTr("Notifications")
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.notifs.showInFullscreen
|
||||
first: true
|
||||
subtext: qsTr("Whether notifications appear over fullscreen apps")
|
||||
text: qsTr("Show in fullscreen")
|
||||
|
||||
onToggled: Config.notifs.showInFullscreen = checked
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.notifs.expire
|
||||
subtext: qsTr("Dismiss notifications after their timeout")
|
||||
text: qsTr("Expire automatically")
|
||||
|
||||
onToggled: Config.notifs.expire = checked
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.notifs.openExpanded
|
||||
subtext: qsTr("Show notifications expanded by default")
|
||||
text: qsTr("Open expanded")
|
||||
|
||||
onToggled: Config.notifs.openExpanded = checked
|
||||
}
|
||||
|
||||
SpinRow {
|
||||
from: 1000
|
||||
stepSize: 500
|
||||
subtext: qsTr("Time before a notification dismisses (ms)")
|
||||
text: qsTr("Default timeout")
|
||||
to: 60000
|
||||
value: Config.notifs.defaultExpireTimeout
|
||||
|
||||
onMoved: v => Config.notifs.defaultExpireTimeout = Math.round(v)
|
||||
}
|
||||
|
||||
SpinRow {
|
||||
from: 1
|
||||
last: true
|
||||
stepSize: 1
|
||||
subtext: qsTr("Notifications shown per group before collapsing")
|
||||
text: qsTr("Group preview count")
|
||||
to: 10
|
||||
value: Config.notifs.groupPreviewNum
|
||||
|
||||
onMoved: v => Config.notifs.groupPreviewNum = Math.round(v)
|
||||
}
|
||||
|
||||
// Toasts
|
||||
SectionHeader {
|
||||
text: qsTr("Toasts")
|
||||
}
|
||||
|
||||
SpinRow {
|
||||
first: true
|
||||
from: 1
|
||||
stepSize: 1
|
||||
subtext: qsTr("Maximum number of toasts shown at once")
|
||||
text: qsTr("Visible toasts")
|
||||
to: 10
|
||||
value: Config.utilities.maxToasts
|
||||
|
||||
onMoved: v => Config.utilities.maxToasts = Math.round(v)
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.utilities.toasts.chargingChanged
|
||||
text: qsTr("Charging changes")
|
||||
|
||||
onToggled: Config.utilities.toasts.chargingChanged = checked
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.utilities.toasts.gameModeChanged
|
||||
text: qsTr("Game mode changes")
|
||||
|
||||
onToggled: Config.utilities.toasts.gameModeChanged = checked
|
||||
}
|
||||
|
||||
// ToggleRow {
|
||||
// checked: Config.utilities.toasts.dndChanged
|
||||
// text: qsTr("Do not disturb changes")
|
||||
//
|
||||
// onToggled: Config.utilities.toasts.dndChanged = checked
|
||||
// }
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.utilities.toasts.audioOutputChanged
|
||||
text: qsTr("Audio output changes")
|
||||
|
||||
onToggled: Config.utilities.toasts.audioOutputChanged = checked
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.utilities.toasts.audioInputChanged
|
||||
last: true
|
||||
text: qsTr("Audio input changes")
|
||||
|
||||
onToggled: Config.utilities.toasts.audioInputChanged = checked
|
||||
}
|
||||
|
||||
// ToggleRow {
|
||||
// checked: Config.utilities.toasts.capsLockChanged
|
||||
// text: qsTr("Caps lock changes")
|
||||
//
|
||||
// onToggled: Config.utilities.toasts.capsLockChanged = checked
|
||||
// }
|
||||
//
|
||||
// ToggleRow {
|
||||
// checked: Config.utilities.toasts.numLockChanged
|
||||
// text: qsTr("Num lock changes")
|
||||
//
|
||||
// onToggled: Config.utilities.toasts.numLockChanged = checked
|
||||
// }
|
||||
//
|
||||
// ToggleRow {
|
||||
// checked: Config.utilities.toasts.kbLayoutChanged
|
||||
// text: qsTr("Keyboard layout changes")
|
||||
//
|
||||
// onToggled: Config.utilities.toasts.kbLayoutChanged = checked
|
||||
// }
|
||||
//
|
||||
// ToggleRow {
|
||||
// checked: Config.utilities.toasts.vpnChanged
|
||||
// text: qsTr("VPN changes")
|
||||
//
|
||||
// onToggled: Config.utilities.toasts.vpnChanged = checked
|
||||
// }
|
||||
//
|
||||
// ToggleRow {
|
||||
// checked: Config.utilities.toasts.nowPlaying
|
||||
// last: true
|
||||
// text: qsTr("Now playing")
|
||||
//
|
||||
// onToggled: Config.utilities.toasts.nowPlaying = checked
|
||||
// }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,214 @@
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import ZShell.Services
|
||||
import qs.Components
|
||||
import qs.Helpers
|
||||
import qs.Config
|
||||
import qs.Modules.SettingsNew.Common
|
||||
|
||||
PageBase {
|
||||
id: root
|
||||
|
||||
// GPU options + the config string each maps to (see Gpu::parseType)
|
||||
readonly property list<MenuItem> gpuItems: [
|
||||
MenuItem {
|
||||
text: qsTr("Auto")
|
||||
},
|
||||
MenuItem {
|
||||
text: "NVIDIA"
|
||||
},
|
||||
MenuItem {
|
||||
text: qsTr("Generic")
|
||||
},
|
||||
MenuItem {
|
||||
text: qsTr("None")
|
||||
}
|
||||
]
|
||||
readonly property list<string> gpuValues: ["", "NVIDIA", "GENERIC", "None"]
|
||||
|
||||
function gpuKeyToIndex(key: string): int {
|
||||
const u = (key ?? "").trim().toUpperCase();
|
||||
if (u === "")
|
||||
return 0; // Auto
|
||||
if (u === "NVIDIA")
|
||||
return 1;
|
||||
if (u === "GENERIC")
|
||||
return 2;
|
||||
return 3; // None
|
||||
}
|
||||
|
||||
title: qsTr("Services")
|
||||
|
||||
ColumnLayout {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: parent.top
|
||||
spacing: Appearance.spacing.extraSmall / 2
|
||||
width: root.cappedWidth
|
||||
|
||||
// Detected running players, used as default-player options
|
||||
Variants {
|
||||
id: playerVariants
|
||||
|
||||
model: [...new Set(Players.list.map(p => Players.getIdentity(p)).filter(id => id))]
|
||||
|
||||
MenuItem {
|
||||
required property string modelData
|
||||
|
||||
activeIcon: "music_note"
|
||||
icon: modelData === Config.services.defaultPlayer ? "check" : ""
|
||||
text: modelData
|
||||
}
|
||||
}
|
||||
|
||||
// Notifications
|
||||
SectionHeader {
|
||||
first: true
|
||||
text: qsTr("Notifications")
|
||||
}
|
||||
|
||||
NavRow {
|
||||
first: true
|
||||
icon: "notifications"
|
||||
last: true
|
||||
status: qsTr("Notifications, toasts, timeouts")
|
||||
text: qsTr("Notifications")
|
||||
|
||||
onClicked: root.sState.openSubPage(1)
|
||||
}
|
||||
|
||||
// Polling
|
||||
SectionHeader {
|
||||
text: qsTr("Polling")
|
||||
}
|
||||
|
||||
SpinRow {
|
||||
first: true
|
||||
from: 100
|
||||
stepSize: 50
|
||||
subtext: qsTr("How often the media position updates (ms)")
|
||||
text: qsTr("Media refresh")
|
||||
to: 2000
|
||||
value: Config.dashboard.mediaUpdateInterval
|
||||
|
||||
onMoved: v => Config.dashboard.mediaUpdateInterval = v
|
||||
}
|
||||
|
||||
SpinRow {
|
||||
from: 0.5
|
||||
last: true
|
||||
stepSize: 0.5
|
||||
subtext: qsTr("CPU, memory and GPU update interval (seconds)")
|
||||
text: qsTr("System stats refresh")
|
||||
to: 10
|
||||
value: Config.dashboard.resourceUpdateInterval / 1000
|
||||
|
||||
onMoved: v => Config.dashboard.resourceUpdateInterval = Math.round(v * 1000)
|
||||
}
|
||||
|
||||
// Media & lyrics
|
||||
SectionHeader {
|
||||
text: qsTr("Media")
|
||||
}
|
||||
|
||||
SelectRow {
|
||||
active: menuItems.find(i => i.text === Config.services.defaultPlayer) ?? null
|
||||
fallbackIcon: "music_note"
|
||||
fallbackText: Config.services.defaultPlayer || qsTr("Auto")
|
||||
first: true
|
||||
last: true
|
||||
menuItems: playerVariants.instances
|
||||
subtext: qsTr("Preferred media player when several are open")
|
||||
text: qsTr("Default player")
|
||||
|
||||
onSelected: item => Config.services.defaultPlayer = item.text
|
||||
}
|
||||
|
||||
// Input increments
|
||||
SectionHeader {
|
||||
text: qsTr("Input increments")
|
||||
}
|
||||
|
||||
SpinRow {
|
||||
first: true
|
||||
from: 1
|
||||
stepSize: 1
|
||||
subtext: qsTr("Amount the volume changes per input (%)")
|
||||
text: qsTr("Volume step")
|
||||
to: 50
|
||||
value: Math.round(Config.services.audioIncrement * 100)
|
||||
|
||||
onMoved: v => Config.services.audioIncrement = v / 100
|
||||
}
|
||||
|
||||
SpinRow {
|
||||
from: 1
|
||||
stepSize: 1
|
||||
subtext: qsTr("Amount the brightness changes per input (%)")
|
||||
text: qsTr("Brightness step")
|
||||
to: 50
|
||||
value: Math.round(Config.services.brightnessIncrement * 100)
|
||||
|
||||
onMoved: v => Config.services.brightnessIncrement = v / 100
|
||||
}
|
||||
|
||||
SpinRow {
|
||||
from: 1
|
||||
stepSize: 1
|
||||
subtext: qsTr("Lowest allowed brightness (%)")
|
||||
text: qsTr("Brightness minimum")
|
||||
to: 20
|
||||
value: Math.round(Config.services.minBrightness * 100)
|
||||
|
||||
onMoved: v => Config.services.minBrightness = v / 100
|
||||
}
|
||||
|
||||
SpinRow {
|
||||
from: 50
|
||||
last: true
|
||||
stepSize: 5
|
||||
subtext: qsTr("Upper limit for output volume (%)")
|
||||
text: qsTr("Max volume")
|
||||
to: 200
|
||||
value: Math.round(Config.services.maxVolume * 100)
|
||||
|
||||
onMoved: v => Config.services.maxVolume = v / 100
|
||||
}
|
||||
|
||||
// Service tuning
|
||||
SectionHeader {
|
||||
text: qsTr("Service tuning")
|
||||
}
|
||||
|
||||
SpinRow {
|
||||
first: true
|
||||
from: 10
|
||||
stepSize: 2
|
||||
subtext: qsTr("Resolution of the audio visualizer")
|
||||
text: qsTr("Visualizer resolution")
|
||||
to: 120
|
||||
value: Config.services.visualizerBars
|
||||
|
||||
onMoved: v => Config.services.visualiserBars = v
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.general.color.smart
|
||||
subtext: qsTr("Derive theme mode from the wallpaper")
|
||||
text: qsTr("Smart color scheme")
|
||||
|
||||
onToggled: Config.general.color.smart = checked
|
||||
}
|
||||
|
||||
SelectRow {
|
||||
active: root.gpuItems[root.gpuKeyToIndex(Config.services.gpuType)]
|
||||
last: true
|
||||
menuItems: root.gpuItems
|
||||
menuOnTop: true
|
||||
subtext: Gpu.name ? qsTr("Monitoring: %1").arg(Gpu.name) : qsTr("Override for GPU type")
|
||||
text: qsTr("GPU")
|
||||
|
||||
onSelected: item => Config.services.gpuType = root.gpuValues[root.gpuItems.indexOf(item)]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user