forked from Shinonome/dots-hyprland
Merge remote-tracking branch 'origin/main' into addon-i18n
This commit is contained in:
@@ -11,6 +11,7 @@ Item {
|
|||||||
id: root
|
id: root
|
||||||
property bool borderless: ConfigOptions.bar.borderless
|
property bool borderless: ConfigOptions.bar.borderless
|
||||||
implicitWidth: rowLayout.implicitWidth + rowLayout.spacing * 2
|
implicitWidth: rowLayout.implicitWidth + rowLayout.spacing * 2
|
||||||
|
implicitHeight: rowLayout.implicitHeight
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: rowLayout
|
id: rowLayout
|
||||||
@@ -34,21 +35,21 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
active: ConfigOptions.bar.utilButtons.showColorPicker
|
active: ConfigOptions.bar.utilButtons.showColorPicker
|
||||||
visible: ConfigOptions.bar.utilButtons.showColorPicker
|
visible: ConfigOptions.bar.utilButtons.showColorPicker
|
||||||
sourceComponent: CircleUtilButton {
|
sourceComponent: CircleUtilButton {
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
onClicked: Hyprland.dispatch("exec hyprpicker -a")
|
onClicked: Hyprland.dispatch("exec hyprpicker -a")
|
||||||
MaterialSymbol {
|
MaterialSymbol {
|
||||||
horizontalAlignment: Qt.AlignHCenter
|
horizontalAlignment: Qt.AlignHCenter
|
||||||
fill: 1
|
fill: 1
|
||||||
text: "colorize"
|
text: "colorize"
|
||||||
iconSize: Appearance.font.pixelSize.large
|
iconSize: Appearance.font.pixelSize.large
|
||||||
color: Appearance.colors.colOnLayer2
|
color: Appearance.colors.colOnLayer2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
active: ConfigOptions.bar.utilButtons.showKeyboardToggle
|
active: ConfigOptions.bar.utilButtons.showKeyboardToggle
|
||||||
@@ -81,5 +82,27 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loader {
|
||||||
|
active: ConfigOptions.bar.utilButtons.showDarkModeToggle
|
||||||
|
visible: ConfigOptions.bar.utilButtons.showDarkModeToggle
|
||||||
|
sourceComponent: CircleUtilButton {
|
||||||
|
Layout.alignment: Qt.AlignVCenter
|
||||||
|
onClicked: event => {
|
||||||
|
if (Appearance.m3colors.darkmode) {
|
||||||
|
Hyprland.dispatch(`exec ${Directories.wallpaperSwitchScriptPath} --mode light --noswitch`);
|
||||||
|
} else {
|
||||||
|
Hyprland.dispatch(`exec ${Directories.wallpaperSwitchScriptPath} --mode dark --noswitch`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
MaterialSymbol {
|
||||||
|
horizontalAlignment: Qt.AlignHCenter
|
||||||
|
fill: 0
|
||||||
|
text: Appearance.m3colors.darkmode ? "light_mode" : "dark_mode"
|
||||||
|
iconSize: Appearance.font.pixelSize.large
|
||||||
|
color: Appearance.colors.colOnLayer2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import QtQuick
|
|
||||||
import Quickshell
|
|
||||||
pragma Singleton
|
pragma Singleton
|
||||||
pragma ComponentBehavior: Bound
|
pragma ComponentBehavior: Bound
|
||||||
|
import QtQuick
|
||||||
|
import Quickshell
|
||||||
|
|
||||||
Singleton {
|
Singleton {
|
||||||
property QtObject policies: QtObject {
|
property QtObject policies: QtObject {
|
||||||
@@ -21,8 +21,10 @@ Singleton {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
property QtObject audio: QtObject { // Values in %
|
property QtObject audio: QtObject {
|
||||||
property QtObject protection: QtObject { // Prevent sudden bangs
|
// Values in %
|
||||||
|
property QtObject protection: QtObject {
|
||||||
|
// Prevent sudden bangs
|
||||||
property bool enable: true
|
property bool enable: true
|
||||||
property real maxAllowedIncrease: 10
|
property real maxAllowedIncrease: 10
|
||||||
property real maxAllowed: 90 // Realistically should already provide some protection when it's 99...
|
property real maxAllowed: 90 // Realistically should already provide some protection when it's 99...
|
||||||
@@ -59,6 +61,7 @@ Singleton {
|
|||||||
property bool showColorPicker: false
|
property bool showColorPicker: false
|
||||||
property bool showMicToggle: false
|
property bool showMicToggle: false
|
||||||
property bool showKeyboardToggle: true
|
property bool showKeyboardToggle: true
|
||||||
|
property bool showDarkModeToggle: true
|
||||||
}
|
}
|
||||||
property QtObject tray: QtObject {
|
property QtObject tray: QtObject {
|
||||||
property bool monochromeIcons: true
|
property bool monochromeIcons: true
|
||||||
@@ -74,7 +77,8 @@ Singleton {
|
|||||||
property QtObject battery: QtObject {
|
property QtObject battery: QtObject {
|
||||||
property int low: 20
|
property int low: 20
|
||||||
property int critical: 5
|
property int critical: 5
|
||||||
property int suspend: 2
|
property bool automaticSuspend: true
|
||||||
|
property int suspend: 3
|
||||||
}
|
}
|
||||||
|
|
||||||
property QtObject dock: QtObject {
|
property QtObject dock: QtObject {
|
||||||
@@ -83,9 +87,7 @@ Singleton {
|
|||||||
property bool pinnedOnStartup: false
|
property bool pinnedOnStartup: false
|
||||||
property bool hoverToReveal: false // When false, only reveals on empty workspace
|
property bool hoverToReveal: false // When false, only reveals on empty workspace
|
||||||
property list<string> pinnedApps: [ // IDs of pinned entries
|
property list<string> pinnedApps: [ // IDs of pinned entries
|
||||||
"org.kde.dolphin",
|
"org.kde.dolphin", "kitty",]
|
||||||
"kitty",
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
property QtObject language: QtObject {
|
property QtObject language: QtObject {
|
||||||
@@ -112,9 +114,8 @@ Singleton {
|
|||||||
|
|
||||||
property QtObject overview: QtObject {
|
property QtObject overview: QtObject {
|
||||||
property real scale: 0.18 // Relative to screen size
|
property real scale: 0.18 // Relative to screen size
|
||||||
property real numOfRows: 2
|
property real rows: 2
|
||||||
property real numOfCols: 5
|
property real columns: 5
|
||||||
property bool showXwaylandIndicator: true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
property QtObject resources: QtObject {
|
property QtObject resources: QtObject {
|
||||||
@@ -124,7 +125,7 @@ Singleton {
|
|||||||
property QtObject search: QtObject {
|
property QtObject search: QtObject {
|
||||||
property int nonAppResultDelay: 30 // This prevents lagging when typing
|
property int nonAppResultDelay: 30 // This prevents lagging when typing
|
||||||
property string engineBaseUrl: "https://www.google.com/search?q="
|
property string engineBaseUrl: "https://www.google.com/search?q="
|
||||||
property list<string> excludedSites: [ "quora.com" ]
|
property list<string> excludedSites: ["quora.com"]
|
||||||
property bool sloppy: false // Uses levenshtein distance based scoring instead of fuzzy sort. Very weird.
|
property bool sloppy: false // Uses levenshtein distance based scoring instead of fuzzy sort. Very weird.
|
||||||
property QtObject prefix: QtObject {
|
property QtObject prefix: QtObject {
|
||||||
property string action: "/"
|
property string action: "/"
|
||||||
@@ -161,5 +162,4 @@ Singleton {
|
|||||||
property QtObject hacks: QtObject {
|
property QtObject hacks: QtObject {
|
||||||
property int arbitraryRaceConditionDelay: 20 // milliseconds
|
property int arbitraryRaceConditionDelay: 20 // milliseconds
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
import "root:/modules/common/widgets/"
|
||||||
|
import "root:/modules/common/"
|
||||||
|
import QtQuick
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import QtQuick.Controls
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
id: root
|
||||||
|
property string text: ""
|
||||||
|
property alias value: spinBoxWidget.value
|
||||||
|
property alias stepSize: spinBoxWidget.stepSize
|
||||||
|
property alias from: spinBoxWidget.from
|
||||||
|
property alias to: spinBoxWidget.to
|
||||||
|
spacing: 10
|
||||||
|
Layout.leftMargin: 8
|
||||||
|
Layout.rightMargin: 8
|
||||||
|
|
||||||
|
StyledText {
|
||||||
|
id: labelWidget
|
||||||
|
Layout.fillWidth: true
|
||||||
|
text: root.text
|
||||||
|
font.pixelSize: Appearance.font.pixelSize.small
|
||||||
|
color: Appearance.colors.colOnSecondaryContainer
|
||||||
|
}
|
||||||
|
|
||||||
|
StyledSpinBox {
|
||||||
|
id: spinBoxWidget
|
||||||
|
Layout.fillWidth: false
|
||||||
|
value: root.value
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,7 +6,7 @@ import "root:/modules/common/widgets/"
|
|||||||
|
|
||||||
Flickable {
|
Flickable {
|
||||||
id: root
|
id: root
|
||||||
property real baseWidth: 500
|
property real baseWidth: 550
|
||||||
property bool forceWidth: false
|
property bool forceWidth: false
|
||||||
property real bottomContentPadding: 100
|
property real bottomContentPadding: 100
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ ColumnLayout {
|
|||||||
StyledText {
|
StyledText {
|
||||||
text: root.title
|
text: root.title
|
||||||
font.pixelSize: Appearance.font.pixelSize.larger
|
font.pixelSize: Appearance.font.pixelSize.larger
|
||||||
|
font.weight: Font.Medium
|
||||||
}
|
}
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: sectionContent
|
id: sectionContent
|
||||||
|
|||||||
@@ -7,16 +7,37 @@ import "root:/modules/common/widgets/"
|
|||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: root
|
id: root
|
||||||
property string title: ""
|
property string title: ""
|
||||||
|
property string tooltip: ""
|
||||||
default property alias data: sectionContent.data
|
default property alias data: sectionContent.data
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.topMargin: 4
|
Layout.topMargin: 4
|
||||||
spacing: 2
|
spacing: 2
|
||||||
|
|
||||||
ContentSubsectionLabel {
|
RowLayout {
|
||||||
Layout.fillWidth: true
|
ContentSubsectionLabel {
|
||||||
visible: root.title && root.title.length > 0
|
visible: root.title && root.title.length > 0
|
||||||
text: root.title
|
text: root.title
|
||||||
|
}
|
||||||
|
MaterialSymbol {
|
||||||
|
visible: root.tooltip && root.tooltip.length > 0
|
||||||
|
text: "info"
|
||||||
|
iconSize: Appearance.font.pixelSize.large
|
||||||
|
|
||||||
|
color: Appearance.colors.colSubtext
|
||||||
|
MouseArea {
|
||||||
|
id: infoMouseArea
|
||||||
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
|
cursorShape: Qt.WhatsThisCursor
|
||||||
|
StyledToolTip {
|
||||||
|
extraVisibleCondition: false
|
||||||
|
alternativeVisibleCondition: infoMouseArea.containsMouse
|
||||||
|
content: root.tooltip
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Item { Layout.fillWidth: true }
|
||||||
}
|
}
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: sectionContent
|
id: sectionContent
|
||||||
|
|||||||
@@ -32,10 +32,8 @@ ProgressBar {
|
|||||||
animation: Appearance?.animation.elementMoveEnter.numberAnimation.createObject(this)
|
animation: Appearance?.animation.elementMoveEnter.numberAnimation.createObject(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
background: Rectangle {
|
background: Item {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: "transparent"
|
|
||||||
radius: Appearance?.rounding.full ?? 9999
|
|
||||||
implicitHeight: valueBarHeight
|
implicitHeight: valueBarHeight
|
||||||
implicitWidth: valueBarWidth
|
implicitWidth: valueBarWidth
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,92 @@
|
|||||||
|
import "root:/modules/common"
|
||||||
|
import "root:/modules/common/functions/color_utils.js" as ColorUtils
|
||||||
|
import QtQuick
|
||||||
|
import QtQuick.Controls
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Material 3 styled SpinBox component.
|
||||||
|
*/
|
||||||
|
SpinBox {
|
||||||
|
id: root
|
||||||
|
|
||||||
|
property real baseHeight: 35
|
||||||
|
property real radius: Appearance.rounding.small
|
||||||
|
property real innerButtonRadius: Appearance.rounding.unsharpen
|
||||||
|
editable: true
|
||||||
|
|
||||||
|
background: Rectangle {
|
||||||
|
color: Appearance.colors.colLayer2
|
||||||
|
radius: root.radius
|
||||||
|
}
|
||||||
|
|
||||||
|
contentItem: Item {
|
||||||
|
implicitHeight: root.baseHeight
|
||||||
|
implicitWidth: Math.max(labelText.implicitWidth, 40)
|
||||||
|
|
||||||
|
StyledTextInput {
|
||||||
|
id: labelText
|
||||||
|
anchors.centerIn: parent
|
||||||
|
text: root.value // displayText would make the numbers weird like 1,000 instead of 1000
|
||||||
|
color: Appearance.colors.colOnLayer2
|
||||||
|
font.pixelSize: Appearance.font.pixelSize.small
|
||||||
|
validator: root.validator
|
||||||
|
onTextChanged: {
|
||||||
|
root.value = parseFloat(text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
down.indicator: Rectangle {
|
||||||
|
anchors {
|
||||||
|
verticalCenter: parent.verticalCenter
|
||||||
|
left: parent.left
|
||||||
|
}
|
||||||
|
implicitHeight: root.baseHeight
|
||||||
|
implicitWidth: root.baseHeight
|
||||||
|
topLeftRadius: root.radius
|
||||||
|
bottomLeftRadius: root.radius
|
||||||
|
topRightRadius: root.innerButtonRadius
|
||||||
|
bottomRightRadius: root.innerButtonRadius
|
||||||
|
|
||||||
|
color: root.down.pressed ? Appearance.colors.colLayer2Active :
|
||||||
|
root.down.hovered ? Appearance.colors.colLayer2Hover :
|
||||||
|
ColorUtils.transparentize(Appearance.colors.colLayer2)
|
||||||
|
Behavior on color {
|
||||||
|
animation: Appearance.animation.elementMoveFast.colorAnimation.createObject(this)
|
||||||
|
}
|
||||||
|
|
||||||
|
MaterialSymbol {
|
||||||
|
anchors.centerIn: parent
|
||||||
|
text: "remove"
|
||||||
|
iconSize: 20
|
||||||
|
color: Appearance.colors.colOnLayer2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
up.indicator: Rectangle {
|
||||||
|
anchors {
|
||||||
|
verticalCenter: parent.verticalCenter
|
||||||
|
right: parent.right
|
||||||
|
}
|
||||||
|
implicitHeight: root.baseHeight
|
||||||
|
implicitWidth: root.baseHeight
|
||||||
|
topRightRadius: root.radius
|
||||||
|
bottomRightRadius: root.radius
|
||||||
|
topLeftRadius: root.innerButtonRadius
|
||||||
|
bottomLeftRadius: root.innerButtonRadius
|
||||||
|
|
||||||
|
color: root.up.pressed ? Appearance.colors.colLayer2Active :
|
||||||
|
root.up.hovered ? Appearance.colors.colLayer2Hover :
|
||||||
|
ColorUtils.transparentize(Appearance.colors.colLayer2)
|
||||||
|
Behavior on color {
|
||||||
|
animation: Appearance.animation.elementMoveFast.colorAnimation.createObject(this)
|
||||||
|
}
|
||||||
|
|
||||||
|
MaterialSymbol {
|
||||||
|
anchors.centerIn: parent
|
||||||
|
text: "add"
|
||||||
|
iconSize: 20
|
||||||
|
color: Appearance.colors.colOnLayer2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
import "root:/modules/common"
|
||||||
|
import QtQuick
|
||||||
|
import QtQuick.Controls
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Does not include visual layout, but includes the easily neglected colors.
|
||||||
|
*/
|
||||||
|
TextInput {
|
||||||
|
renderType: Text.NativeRendering
|
||||||
|
selectedTextColor: Appearance.m3colors.m3onSecondaryContainer
|
||||||
|
selectionColor: Appearance.colors.colSecondaryContainer
|
||||||
|
font {
|
||||||
|
family: Appearance?.font.family.main ?? "sans-serif"
|
||||||
|
pixelSize: Appearance?.font.pixelSize.small ?? 15
|
||||||
|
hintingPreference: Font.PreferFullHinting
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -17,7 +17,7 @@ Item {
|
|||||||
required property var panelWindow
|
required property var panelWindow
|
||||||
readonly property HyprlandMonitor monitor: Hyprland.monitorFor(panelWindow.screen)
|
readonly property HyprlandMonitor monitor: Hyprland.monitorFor(panelWindow.screen)
|
||||||
readonly property var toplevels: ToplevelManager.toplevels
|
readonly property var toplevels: ToplevelManager.toplevels
|
||||||
readonly property int workspacesShown: ConfigOptions.overview.numOfRows * ConfigOptions.overview.numOfCols
|
readonly property int workspacesShown: ConfigOptions.overview.rows * ConfigOptions.overview.columns
|
||||||
readonly property int workspaceGroup: Math.floor((monitor.activeWorkspace?.id - 1) / workspacesShown)
|
readonly property int workspaceGroup: Math.floor((monitor.activeWorkspace?.id - 1) / workspacesShown)
|
||||||
property bool monitorIsFocused: (Hyprland.focusedMonitor?.id == monitor.id)
|
property bool monitorIsFocused: (Hyprland.focusedMonitor?.id == monitor.id)
|
||||||
property var windows: HyprlandData.windowList
|
property var windows: HyprlandData.windowList
|
||||||
@@ -71,18 +71,18 @@ Item {
|
|||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
spacing: workspaceSpacing
|
spacing: workspaceSpacing
|
||||||
Repeater {
|
Repeater {
|
||||||
model: ConfigOptions.overview.numOfRows
|
model: ConfigOptions.overview.rows
|
||||||
delegate: RowLayout {
|
delegate: RowLayout {
|
||||||
id: row
|
id: row
|
||||||
property int rowIndex: index
|
property int rowIndex: index
|
||||||
spacing: workspaceSpacing
|
spacing: workspaceSpacing
|
||||||
|
|
||||||
Repeater { // Workspace repeater
|
Repeater { // Workspace repeater
|
||||||
model: ConfigOptions.overview.numOfCols
|
model: ConfigOptions.overview.columns
|
||||||
Rectangle { // Workspace
|
Rectangle { // Workspace
|
||||||
id: workspace
|
id: workspace
|
||||||
property int colIndex: index
|
property int colIndex: index
|
||||||
property int workspaceValue: root.workspaceGroup * workspacesShown + rowIndex * ConfigOptions.overview.numOfCols + colIndex + 1
|
property int workspaceValue: root.workspaceGroup * workspacesShown + rowIndex * ConfigOptions.overview.columns + colIndex + 1
|
||||||
property color defaultWorkspaceColor: Appearance.colors.colLayer1 // TODO: reconsider this color for a cleaner look
|
property color defaultWorkspaceColor: Appearance.colors.colLayer1 // TODO: reconsider this color for a cleaner look
|
||||||
property color hoveredWorkspaceColor: ColorUtils.mix(defaultWorkspaceColor, Appearance.colors.colLayer1Hover, 0.1)
|
property color hoveredWorkspaceColor: ColorUtils.mix(defaultWorkspaceColor, Appearance.colors.colLayer1Hover, 0.1)
|
||||||
property color hoveredBorderColor: Appearance.colors.colLayer2Hover
|
property color hoveredBorderColor: Appearance.colors.colLayer2Hover
|
||||||
@@ -171,8 +171,8 @@ Item {
|
|||||||
property bool atInitPosition: (initX == x && initY == y)
|
property bool atInitPosition: (initX == x && initY == y)
|
||||||
restrictToWorkspace: Drag.active || atInitPosition
|
restrictToWorkspace: Drag.active || atInitPosition
|
||||||
|
|
||||||
property int workspaceColIndex: (windowData?.workspace.id - 1) % ConfigOptions.overview.numOfCols
|
property int workspaceColIndex: (windowData?.workspace.id - 1) % ConfigOptions.overview.columns
|
||||||
property int workspaceRowIndex: Math.floor((windowData?.workspace.id - 1) % root.workspacesShown / ConfigOptions.overview.numOfCols)
|
property int workspaceRowIndex: Math.floor((windowData?.workspace.id - 1) % root.workspacesShown / ConfigOptions.overview.columns)
|
||||||
xOffset: (root.workspaceImplicitWidth + workspaceSpacing) * workspaceColIndex - (monitor?.x * root.scale)
|
xOffset: (root.workspaceImplicitWidth + workspaceSpacing) * workspaceColIndex - (monitor?.x * root.scale)
|
||||||
yOffset: (root.workspaceImplicitHeight + workspaceSpacing) * workspaceRowIndex - (monitor?.y * root.scale)
|
yOffset: (root.workspaceImplicitHeight + workspaceSpacing) * workspaceRowIndex - (monitor?.y * root.scale)
|
||||||
|
|
||||||
@@ -245,8 +245,8 @@ Item {
|
|||||||
Rectangle { // Focused workspace indicator
|
Rectangle { // Focused workspace indicator
|
||||||
id: focusedWorkspaceIndicator
|
id: focusedWorkspaceIndicator
|
||||||
property int activeWorkspaceInGroup: monitor.activeWorkspace?.id - (root.workspaceGroup * root.workspacesShown)
|
property int activeWorkspaceInGroup: monitor.activeWorkspace?.id - (root.workspaceGroup * root.workspacesShown)
|
||||||
property int activeWorkspaceRowIndex: Math.floor((activeWorkspaceInGroup - 1) / ConfigOptions.overview.numOfCols)
|
property int activeWorkspaceRowIndex: Math.floor((activeWorkspaceInGroup - 1) / ConfigOptions.overview.columns)
|
||||||
property int activeWorkspaceColIndex: (activeWorkspaceInGroup - 1) % ConfigOptions.overview.numOfCols
|
property int activeWorkspaceColIndex: (activeWorkspaceInGroup - 1) % ConfigOptions.overview.columns
|
||||||
x: (root.workspaceImplicitWidth + workspaceSpacing) * activeWorkspaceColIndex
|
x: (root.workspaceImplicitWidth + workspaceSpacing) * activeWorkspaceColIndex
|
||||||
y: (root.workspaceImplicitHeight + workspaceSpacing) * activeWorkspaceRowIndex
|
y: (root.workspaceImplicitHeight + workspaceSpacing) * activeWorkspaceRowIndex
|
||||||
z: root.windowZ
|
z: root.windowZ
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ Item { // Window
|
|||||||
property var iconPath: Quickshell.iconPath(AppSearch.guessIcon(windowData?.class), "image-missing")
|
property var iconPath: Quickshell.iconPath(AppSearch.guessIcon(windowData?.class), "image-missing")
|
||||||
property bool compactMode: Appearance.font.pixelSize.smaller * 4 > targetWindowHeight || Appearance.font.pixelSize.smaller * 4 > targetWindowWidth
|
property bool compactMode: Appearance.font.pixelSize.smaller * 4 > targetWindowHeight || Appearance.font.pixelSize.smaller * 4 > targetWindowWidth
|
||||||
|
|
||||||
property bool indicateXWayland: (ConfigOptions.overview.showXwaylandIndicator && windowData?.xwayland) ?? false
|
property bool indicateXWayland: windowData?.xwayland ?? false
|
||||||
|
|
||||||
x: initX
|
x: initX
|
||||||
y: initY
|
y: initY
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ Item { // Wrapper
|
|||||||
id: mathProcess
|
id: mathProcess
|
||||||
property list<string> baseCommand: ["qalc", "-t"]
|
property list<string> baseCommand: ["qalc", "-t"]
|
||||||
function calculateExpression(expression) {
|
function calculateExpression(expression) {
|
||||||
// mathProcess.running = false
|
mathProcess.running = false
|
||||||
mathProcess.command = baseCommand.concat(expression)
|
mathProcess.command = baseCommand.concat(expression)
|
||||||
mathProcess.running = true
|
mathProcess.running = true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,144 +0,0 @@
|
|||||||
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: "Policies"
|
|
||||||
|
|
||||||
ConfigRow {
|
|
||||||
ColumnLayout { // Weeb policy
|
|
||||||
ContentSubsectionLabel {
|
|
||||||
text: "Weeb"
|
|
||||||
}
|
|
||||||
ConfigSelectionArray {
|
|
||||||
currentValue: ConfigOptions.policies.weeb
|
|
||||||
configOptionName: "policies.weeb"
|
|
||||||
onSelected: (newValue) => {
|
|
||||||
ConfigLoader.setConfigValueAndSave("policies.weeb", newValue);
|
|
||||||
}
|
|
||||||
options: [
|
|
||||||
{ displayName: "No", value: 0 },
|
|
||||||
{ displayName: "Yes", value: 1 },
|
|
||||||
{ displayName: "Closet", value: 2 }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ColumnLayout { // AI policy
|
|
||||||
ContentSubsectionLabel {
|
|
||||||
text: "AI"
|
|
||||||
}
|
|
||||||
ConfigSelectionArray {
|
|
||||||
currentValue: ConfigOptions.policies.ai
|
|
||||||
configOptionName: "policies.ai"
|
|
||||||
onSelected: (newValue) => {
|
|
||||||
ConfigLoader.setConfigValueAndSave("policies.ai", newValue);
|
|
||||||
}
|
|
||||||
options: [
|
|
||||||
{ displayName: "No", value: 0 },
|
|
||||||
{ displayName: "Yes", value: 1 },
|
|
||||||
{ displayName: "Local only", value: 2 }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
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"
|
|
||||||
|
|
||||||
ContentSubsection {
|
|
||||||
title: "Appearance"
|
|
||||||
ConfigRow {
|
|
||||||
uniform: true
|
|
||||||
ConfigSwitch {
|
|
||||||
text: 'Borderless'
|
|
||||||
checked: ConfigOptions.bar.borderless
|
|
||||||
onCheckedChanged: {
|
|
||||||
ConfigLoader.setConfigValueAndSave("bar.borderless", checked);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ConfigSwitch {
|
|
||||||
text: 'Show background'
|
|
||||||
checked: ConfigOptions.bar.showBackground
|
|
||||||
onCheckedChanged: {
|
|
||||||
ConfigLoader.setConfigValueAndSave("bar.showBackground", checked);
|
|
||||||
}
|
|
||||||
StyledToolTip {
|
|
||||||
content: "Note: turning off can hurt readability"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ContentSubsection {
|
|
||||||
title: "Buttons"
|
|
||||||
ConfigRow {
|
|
||||||
uniform: true
|
|
||||||
ConfigSwitch {
|
|
||||||
text: "Screen snip"
|
|
||||||
checked: ConfigOptions.bar.utilButtons.showScreenSnip
|
|
||||||
onCheckedChanged: {
|
|
||||||
ConfigLoader.setConfigValueAndSave("bar.utilButtons.showScreenSnip", checked);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ConfigSwitch {
|
|
||||||
text: "Color picker"
|
|
||||||
checked: ConfigOptions.bar.utilButtons.showColorPicker
|
|
||||||
onCheckedChanged: {
|
|
||||||
ConfigLoader.setConfigValueAndSave("bar.utilButtons.showColorPicker", checked);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ConfigRow {
|
|
||||||
uniform: true
|
|
||||||
ConfigSwitch {
|
|
||||||
text: "Mic toggle"
|
|
||||||
checked: ConfigOptions.bar.utilButtons.showMicToggle
|
|
||||||
onCheckedChanged: {
|
|
||||||
ConfigLoader.setConfigValueAndSave("bar.utilButtons.showMicToggle", checked);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ConfigSwitch {
|
|
||||||
text: "Keyboard toggle"
|
|
||||||
checked: ConfigOptions.bar.utilButtons.showKeyboardToggle
|
|
||||||
onCheckedChanged: {
|
|
||||||
ConfigLoader.setConfigValueAndSave("bar.utilButtons.showKeyboardToggle", checked);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,263 @@
|
|||||||
|
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: "Policies"
|
||||||
|
|
||||||
|
ConfigRow {
|
||||||
|
ColumnLayout { // Weeb policy
|
||||||
|
ContentSubsectionLabel {
|
||||||
|
text: "Weeb"
|
||||||
|
}
|
||||||
|
ConfigSelectionArray {
|
||||||
|
currentValue: ConfigOptions.policies.weeb
|
||||||
|
configOptionName: "policies.weeb"
|
||||||
|
onSelected: (newValue) => {
|
||||||
|
ConfigLoader.setConfigValueAndSave("policies.weeb", newValue);
|
||||||
|
}
|
||||||
|
options: [
|
||||||
|
{ displayName: "No", value: 0 },
|
||||||
|
{ displayName: "Yes", value: 1 },
|
||||||
|
{ displayName: "Closet", value: 2 }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ColumnLayout { // AI policy
|
||||||
|
ContentSubsectionLabel {
|
||||||
|
text: "AI"
|
||||||
|
}
|
||||||
|
ConfigSelectionArray {
|
||||||
|
currentValue: ConfigOptions.policies.ai
|
||||||
|
configOptionName: "policies.ai"
|
||||||
|
onSelected: (newValue) => {
|
||||||
|
ConfigLoader.setConfigValueAndSave("policies.ai", newValue);
|
||||||
|
}
|
||||||
|
options: [
|
||||||
|
{ displayName: "No", value: 0 },
|
||||||
|
{ displayName: "Yes", value: 1 },
|
||||||
|
{ displayName: "Local only", value: 2 }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ContentSection {
|
||||||
|
title: "Bar"
|
||||||
|
|
||||||
|
ContentSubsection {
|
||||||
|
title: "Appearance"
|
||||||
|
ConfigRow {
|
||||||
|
uniform: true
|
||||||
|
ConfigSwitch {
|
||||||
|
text: 'Borderless'
|
||||||
|
checked: ConfigOptions.bar.borderless
|
||||||
|
onCheckedChanged: {
|
||||||
|
ConfigLoader.setConfigValueAndSave("bar.borderless", checked);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ConfigSwitch {
|
||||||
|
text: 'Show background'
|
||||||
|
checked: ConfigOptions.bar.showBackground
|
||||||
|
onCheckedChanged: {
|
||||||
|
ConfigLoader.setConfigValueAndSave("bar.showBackground", checked);
|
||||||
|
}
|
||||||
|
StyledToolTip {
|
||||||
|
content: "Note: turning off can hurt readability"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ContentSubsection {
|
||||||
|
title: "Buttons"
|
||||||
|
ConfigRow {
|
||||||
|
uniform: true
|
||||||
|
ConfigSwitch {
|
||||||
|
text: "Screen snip"
|
||||||
|
checked: ConfigOptions.bar.utilButtons.showScreenSnip
|
||||||
|
onCheckedChanged: {
|
||||||
|
ConfigLoader.setConfigValueAndSave("bar.utilButtons.showScreenSnip", checked);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ConfigSwitch {
|
||||||
|
text: "Color picker"
|
||||||
|
checked: ConfigOptions.bar.utilButtons.showColorPicker
|
||||||
|
onCheckedChanged: {
|
||||||
|
ConfigLoader.setConfigValueAndSave("bar.utilButtons.showColorPicker", checked);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ConfigRow {
|
||||||
|
uniform: true
|
||||||
|
ConfigSwitch {
|
||||||
|
text: "Mic toggle"
|
||||||
|
checked: ConfigOptions.bar.utilButtons.showMicToggle
|
||||||
|
onCheckedChanged: {
|
||||||
|
ConfigLoader.setConfigValueAndSave("bar.utilButtons.showMicToggle", checked);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ConfigSwitch {
|
||||||
|
text: "Keyboard toggle"
|
||||||
|
checked: ConfigOptions.bar.utilButtons.showKeyboardToggle
|
||||||
|
onCheckedChanged: {
|
||||||
|
ConfigLoader.setConfigValueAndSave("bar.utilButtons.showKeyboardToggle", checked);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ConfigRow {
|
||||||
|
uniform: true
|
||||||
|
ConfigSwitch {
|
||||||
|
text: "Dark/Light toggle"
|
||||||
|
checked: ConfigOptions.bar.utilButtons.showDarkModeToggle
|
||||||
|
onCheckedChanged: {
|
||||||
|
ConfigLoader.setConfigValueAndSave("bar.utilButtons.showDarkModeToggle", checked);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ConfigSwitch {
|
||||||
|
opacity: 0
|
||||||
|
enabled: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ContentSubsection {
|
||||||
|
title: "Workspaces"
|
||||||
|
tooltip: "Tip: Hide icons and always show numbers for\nthe classic illogical-impulse experience"
|
||||||
|
|
||||||
|
ConfigRow {
|
||||||
|
uniform: true
|
||||||
|
ConfigSwitch {
|
||||||
|
text: 'Show app icons'
|
||||||
|
checked: ConfigOptions.bar.workspaces.showAppIcons
|
||||||
|
onCheckedChanged: {
|
||||||
|
ConfigLoader.setConfigValueAndSave("bar.workspaces.showAppIcons", checked);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ConfigSwitch {
|
||||||
|
text: 'Always show numbers'
|
||||||
|
checked: ConfigOptions.bar.workspaces.alwaysShowNumbers
|
||||||
|
onCheckedChanged: {
|
||||||
|
ConfigLoader.setConfigValueAndSave("bar.workspaces.alwaysShowNumbers", checked);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ConfigSpinBox {
|
||||||
|
text: "Workspaces shown"
|
||||||
|
value: ConfigOptions.bar.workspaces.shown
|
||||||
|
from: 1
|
||||||
|
to: 30
|
||||||
|
stepSize: 1
|
||||||
|
onValueChanged: {
|
||||||
|
ConfigLoader.setConfigValueAndSave("bar.workspaces.shown", value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ConfigSpinBox {
|
||||||
|
text: "Number show delay when pressing Super (ms)"
|
||||||
|
value: ConfigOptions.bar.workspaces.showNumberDelay
|
||||||
|
from: 0
|
||||||
|
to: 1000
|
||||||
|
stepSize: 50
|
||||||
|
onValueChanged: {
|
||||||
|
ConfigLoader.setConfigValueAndSave("bar.workspaces.showNumberDelay", value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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: "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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -247,9 +247,7 @@ Rectangle {
|
|||||||
|
|
||||||
spacing: 0
|
spacing: 0
|
||||||
Repeater {
|
Repeater {
|
||||||
model: ScriptModel {
|
model: root.messageBlocks.length
|
||||||
values: root.messageBlocks.map((block, index) => index)
|
|
||||||
}
|
|
||||||
delegate: Loader {
|
delegate: Loader {
|
||||||
required property int index
|
required property int index
|
||||||
property var thisBlock: root.messageBlocks[index]
|
property var thisBlock: root.messageBlocks[index]
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ Singleton {
|
|||||||
"wpsoffice": "wps-office2019-kprometheus",
|
"wpsoffice": "wps-office2019-kprometheus",
|
||||||
"footclient": "foot",
|
"footclient": "foot",
|
||||||
"zen": "zen-browser",
|
"zen": "zen-browser",
|
||||||
|
"brave-browser": "brave-desktop"
|
||||||
})
|
})
|
||||||
property var regexSubstitutions: [
|
property var regexSubstitutions: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ Singleton {
|
|||||||
property bool isCharging: chargeState == UPowerDeviceState.Charging
|
property bool isCharging: chargeState == UPowerDeviceState.Charging
|
||||||
property bool isPluggedIn: isCharging || chargeState == UPowerDeviceState.PendingCharge
|
property bool isPluggedIn: isCharging || chargeState == UPowerDeviceState.PendingCharge
|
||||||
property real percentage: UPower.displayDevice.percentage
|
property real percentage: UPower.displayDevice.percentage
|
||||||
|
readonly property bool allowAutomaticSuspend: ConfigOptions.battery.automaticSuspend
|
||||||
|
|
||||||
property bool isLow: percentage <= ConfigOptions.battery.low / 100
|
property bool isLow: percentage <= ConfigOptions.battery.low / 100
|
||||||
property bool isCritical: percentage <= ConfigOptions.battery.critical / 100
|
property bool isCritical: percentage <= ConfigOptions.battery.critical / 100
|
||||||
@@ -19,6 +20,7 @@ Singleton {
|
|||||||
|
|
||||||
property bool isLowAndNotCharging: isLow && !isCharging
|
property bool isLowAndNotCharging: isLow && !isCharging
|
||||||
property bool isCriticalAndNotCharging: isCritical && !isCharging
|
property bool isCriticalAndNotCharging: isCritical && !isCharging
|
||||||
|
property bool isSuspendingAndNotCharging: allowAutomaticSuspend && isSuspending && !isCharging
|
||||||
|
|
||||||
onIsLowAndNotChargingChanged: {
|
onIsLowAndNotChargingChanged: {
|
||||||
if (available && isLowAndNotCharging)
|
if (available && isLowAndNotCharging)
|
||||||
@@ -29,4 +31,10 @@ Singleton {
|
|||||||
if (available && isCriticalAndNotCharging)
|
if (available && isCriticalAndNotCharging)
|
||||||
Quickshell.execDetached(["bash", "-c", `notify-send "Critically low battery" "🙏 I beg for pleas charg\nAutomatic suspend triggers at ${ConfigOptions.battery.suspend}%" -u critical -a "Shell"`]);
|
Quickshell.execDetached(["bash", "-c", `notify-send "Critically low battery" "🙏 I beg for pleas charg\nAutomatic suspend triggers at ${ConfigOptions.battery.suspend}%" -u critical -a "Shell"`]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onIsSuspendingAndNotChargingChanged: {
|
||||||
|
if (available && isSuspendingAndNotCharging) {
|
||||||
|
Quickshell.execDetached(["bash", "-c", `systemctl suspend || loginctl suspend`]);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,9 +33,14 @@ ApplicationWindow {
|
|||||||
component: "modules/settings/StyleConfig.qml"
|
component: "modules/settings/StyleConfig.qml"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "General",
|
name: "Interface",
|
||||||
|
icon: "cards",
|
||||||
|
component: "modules/settings/InterfaceConfig.qml"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Services",
|
||||||
icon: "settings",
|
icon: "settings",
|
||||||
component: "modules/settings/GeneralConfig.qml"
|
component: "modules/settings/ServicesConfig.qml"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "About",
|
name: "About",
|
||||||
@@ -56,8 +61,8 @@ ApplicationWindow {
|
|||||||
|
|
||||||
minimumWidth: 600
|
minimumWidth: 600
|
||||||
minimumHeight: 400
|
minimumHeight: 400
|
||||||
width: 900
|
width: 1100
|
||||||
height: 650
|
height: 750
|
||||||
color: Appearance.m3colors.m3background
|
color: Appearance.m3colors.m3background
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
@@ -67,7 +72,6 @@ ApplicationWindow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Keys.onPressed: (event) => {
|
Keys.onPressed: (event) => {
|
||||||
console.log(`Key pressed: ${event.key}, Modifiers: ${event.modifiers}`);
|
|
||||||
if (event.modifiers === Qt.ControlModifier) {
|
if (event.modifiers === Qt.ControlModifier) {
|
||||||
if (event.key === Qt.Key_PageDown) {
|
if (event.key === Qt.Key_PageDown) {
|
||||||
root.currentPage = Math.min(root.currentPage + 1, root.pages.length - 1)
|
root.currentPage = Math.min(root.currentPage + 1, root.pages.length - 1)
|
||||||
@@ -218,7 +222,7 @@ ApplicationWindow {
|
|||||||
properties: "opacity"
|
properties: "opacity"
|
||||||
from: 1
|
from: 1
|
||||||
to: 0
|
to: 0
|
||||||
duration: 0
|
duration: 100
|
||||||
easing.type: Appearance.animation.elementMoveExit.type
|
easing.type: Appearance.animation.elementMoveExit.type
|
||||||
easing.bezierCurve: Appearance.animationCurves.emphasizedFirstHalf
|
easing.bezierCurve: Appearance.animationCurves.emphasizedFirstHalf
|
||||||
}
|
}
|
||||||
@@ -232,7 +236,7 @@ ApplicationWindow {
|
|||||||
properties: "opacity"
|
properties: "opacity"
|
||||||
from: 0
|
from: 0
|
||||||
to: 1
|
to: 1
|
||||||
duration: 0
|
duration: 200
|
||||||
easing.type: Appearance.animation.elementMoveEnter.type
|
easing.type: Appearance.animation.elementMoveEnter.type
|
||||||
easing.bezierCurve: Appearance.animationCurves.emphasizedLastHalf
|
easing.bezierCurve: Appearance.animationCurves.emphasizedLastHalf
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,5 +10,6 @@ depends=(
|
|||||||
networkmanager
|
networkmanager
|
||||||
plasma-nm
|
plasma-nm
|
||||||
polkit-kde-agent
|
polkit-kde-agent
|
||||||
|
dolphin
|
||||||
systemsettings
|
systemsettings
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ license=(None)
|
|||||||
depends=(
|
depends=(
|
||||||
kdialog
|
kdialog
|
||||||
qt6-5compat
|
qt6-5compat
|
||||||
|
qt6-avif-image-plugin
|
||||||
qt6-base
|
qt6-base
|
||||||
qt6-declarative
|
qt6-declarative
|
||||||
qt6-imageformats
|
qt6-imageformats
|
||||||
|
|||||||
Reference in New Issue
Block a user