forked from Shinonome/dots-hyprland
settings: more options
This commit is contained in:
+39
-27
@@ -48,32 +48,6 @@ ContentPage {
|
||||
}
|
||||
}
|
||||
}
|
||||
ContentSection {
|
||||
title: "Audio"
|
||||
ConfigSwitch {
|
||||
text: "Earbang protection"
|
||||
checked: ConfigOptions.audio.protection.enable
|
||||
onCheckedChanged: {
|
||||
ConfigLoader.setConfigValueAndSave("audio.protection.enable", checked);
|
||||
}
|
||||
StyledToolTip {
|
||||
content: "Prevents abrupt increments and restricts volume limit"
|
||||
}
|
||||
}
|
||||
}
|
||||
ContentSection {
|
||||
title: "AI"
|
||||
MaterialTextField {
|
||||
id: systemPromptField
|
||||
Layout.fillWidth: true
|
||||
placeholderText: "System prompt"
|
||||
text: ConfigOptions.ai.systemPrompt
|
||||
wrapMode: TextEdit.Wrap
|
||||
onTextChanged: {
|
||||
ConfigLoader.setConfigValueAndSave("ai.systemPrompt", text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ContentSection {
|
||||
title: "Bar"
|
||||
@@ -225,7 +199,7 @@ ContentPage {
|
||||
}
|
||||
}
|
||||
ConfigRow {
|
||||
uniform: false
|
||||
uniform: true
|
||||
ConfigSwitch {
|
||||
text: "Automatic suspend"
|
||||
checked: ConfigOptions.battery.automaticSuspend
|
||||
@@ -248,4 +222,42 @@ ContentPage {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ContentSection {
|
||||
title: "Overview"
|
||||
ConfigSpinBox {
|
||||
text: "Scale (%)"
|
||||
value: ConfigOptions.overview.scale * 100
|
||||
from: 1
|
||||
to: 100
|
||||
stepSize: 1
|
||||
onValueChanged: {
|
||||
ConfigLoader.setConfigValueAndSave("overview.scale", value / 100);
|
||||
}
|
||||
}
|
||||
ConfigRow {
|
||||
uniform: true
|
||||
ConfigSpinBox {
|
||||
text: "Rows"
|
||||
value: ConfigOptions.overview.rows
|
||||
from: 1
|
||||
to: 20
|
||||
stepSize: 1
|
||||
onValueChanged: {
|
||||
ConfigLoader.setConfigValueAndSave("overview.rows", value);
|
||||
}
|
||||
}
|
||||
ConfigSpinBox {
|
||||
text: "Columns"
|
||||
value: ConfigOptions.overview.columns
|
||||
from: 1
|
||||
to: 20
|
||||
stepSize: 1
|
||||
onValueChanged: {
|
||||
ConfigLoader.setConfigValueAndSave("overview.columns", value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,139 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import "root:/services/"
|
||||
import "root:/modules/common/"
|
||||
import "root:/modules/common/widgets/"
|
||||
|
||||
ContentPage {
|
||||
forceWidth: true
|
||||
|
||||
ContentSection {
|
||||
title: "Audio"
|
||||
|
||||
ConfigSwitch {
|
||||
text: "Earbang protection"
|
||||
checked: ConfigOptions.audio.protection.enable
|
||||
onCheckedChanged: {
|
||||
ConfigLoader.setConfigValueAndSave("audio.protection.enable", checked);
|
||||
}
|
||||
StyledToolTip {
|
||||
content: "Prevents abrupt increments and restricts volume limit"
|
||||
}
|
||||
}
|
||||
ConfigRow {
|
||||
// uniform: true
|
||||
ConfigSpinBox {
|
||||
text: "Max allowed increase"
|
||||
value: ConfigOptions.audio.protection.maxAllowedIncrease
|
||||
from: 0
|
||||
to: 100
|
||||
stepSize: 2
|
||||
onValueChanged: {
|
||||
ConfigLoader.setConfigValueAndSave("audio.protection.maxAllowedIncrease", value);
|
||||
}
|
||||
}
|
||||
ConfigSpinBox {
|
||||
text: "Volume limit"
|
||||
value: ConfigOptions.audio.protection.maxAllowed
|
||||
from: 0
|
||||
to: 100
|
||||
stepSize: 2
|
||||
onValueChanged: {
|
||||
ConfigLoader.setConfigValueAndSave("audio.protection.maxAllowed", value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
ContentSection {
|
||||
title: "AI"
|
||||
MaterialTextField {
|
||||
Layout.fillWidth: true
|
||||
placeholderText: "System prompt"
|
||||
text: ConfigOptions.ai.systemPrompt
|
||||
wrapMode: TextEdit.Wrap
|
||||
onTextChanged: {
|
||||
ConfigLoader.setConfigValueAndSave("ai.systemPrompt", text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ContentSection {
|
||||
title: "Battery"
|
||||
|
||||
ConfigRow {
|
||||
uniform: true
|
||||
ConfigSpinBox {
|
||||
text: "Low warning"
|
||||
value: ConfigOptions.battery.low
|
||||
from: 0
|
||||
to: 100
|
||||
stepSize: 5
|
||||
onValueChanged: {
|
||||
ConfigLoader.setConfigValueAndSave("battery.low", value);
|
||||
}
|
||||
}
|
||||
ConfigSpinBox {
|
||||
text: "Critical warning"
|
||||
value: ConfigOptions.battery.critical
|
||||
from: 0
|
||||
to: 100
|
||||
stepSize: 5
|
||||
onValueChanged: {
|
||||
ConfigLoader.setConfigValueAndSave("battery.critical", value);
|
||||
}
|
||||
}
|
||||
}
|
||||
ConfigRow {
|
||||
uniform: true
|
||||
ConfigSwitch {
|
||||
text: "Automatic suspend"
|
||||
checked: ConfigOptions.battery.automaticSuspend
|
||||
onCheckedChanged: {
|
||||
ConfigLoader.setConfigValueAndSave("battery.automaticSuspend", checked);
|
||||
}
|
||||
StyledToolTip {
|
||||
content: "Automatically suspends the system when battery is low"
|
||||
}
|
||||
}
|
||||
ConfigSpinBox {
|
||||
text: "Suspend at"
|
||||
value: ConfigOptions.battery.suspend
|
||||
from: 0
|
||||
to: 100
|
||||
stepSize: 5
|
||||
onValueChanged: {
|
||||
ConfigLoader.setConfigValueAndSave("battery.suspend", value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ContentSection {
|
||||
title: "Networking"
|
||||
MaterialTextField {
|
||||
Layout.fillWidth: true
|
||||
placeholderText: "User agent (for services that require it)"
|
||||
text: ConfigOptions.networking.userAgent
|
||||
wrapMode: TextEdit.Wrap
|
||||
onTextChanged: {
|
||||
ConfigLoader.setConfigValueAndSave("networking.userAgent", text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ContentSection {
|
||||
title: "Resources"
|
||||
ConfigSpinBox {
|
||||
text: "Polling interval (ms)"
|
||||
value: ConfigOptions.resources.updateInterval
|
||||
from: 100
|
||||
to: 10000
|
||||
stepSize: 100
|
||||
onValueChanged: {
|
||||
ConfigLoader.setConfigValueAndSave("resources.updateInterval", value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user