added panels page
This commit is contained in:
+4
-1
@@ -167,7 +167,6 @@ Singleton {
|
||||
enabled: dashboard.enabled,
|
||||
mediaUpdateInterval: dashboard.mediaUpdateInterval,
|
||||
resourceUpdateInterval: dashboard.resourceUpdateInterval,
|
||||
dragThreshold: dashboard.dragThreshold,
|
||||
performance: {
|
||||
showBattery: dashboard.performance.showBattery,
|
||||
showGpu: dashboard.performance.showGpu,
|
||||
@@ -245,6 +244,9 @@ Singleton {
|
||||
return {
|
||||
maxAppsShown: launcher.maxAppsShown,
|
||||
maxWallpapers: launcher.maxWallpapers,
|
||||
dragThreshold: launcher.dragThreshold,
|
||||
enableDangerousActions: launcher.enableDangerousActions,
|
||||
enabled: launcher.enabled,
|
||||
hiddenApps: launcher.hiddenApps,
|
||||
favoriteApps: launcher.favoriteApps,
|
||||
uwsm: launcher.uwsm,
|
||||
@@ -349,6 +351,7 @@ Singleton {
|
||||
function serializeSidebar(): var {
|
||||
return {
|
||||
enabled: sidebar.enabled,
|
||||
dragThreshold: sidebar.dragThreshold,
|
||||
sizes: {
|
||||
width: sidebar.sizes.width
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import Quickshell.Io
|
||||
|
||||
JsonObject {
|
||||
property int dragThreshold: 50
|
||||
property bool enabled: true
|
||||
property int mediaUpdateInterval: 500
|
||||
property Performance performance: Performance {
|
||||
|
||||
@@ -84,6 +84,9 @@ JsonObject {
|
||||
dangerous: false
|
||||
},
|
||||
]
|
||||
property int dragThreshold: 50
|
||||
property bool enableDangerousActions: false
|
||||
property bool enabled: true
|
||||
property list<string> favoriteApps: []
|
||||
property list<string> hiddenApps: []
|
||||
property int maxAppsShown: 10
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import Quickshell.Io
|
||||
|
||||
JsonObject {
|
||||
property int dragThreshold: 30
|
||||
property bool enabled: true
|
||||
property Sizes sizes: Sizes {
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ Item {
|
||||
const dragX = x - centroid.pressPosition.x;
|
||||
const dragY = y - centroid.pressPosition.y;
|
||||
|
||||
if (centroid.pressPosition.y >= root.screen.height - Config.barConfig.border && centroid.pressPosition.x > root.screen.width / 5 && dragY < -200)
|
||||
if (centroid.pressPosition.y >= root.screen.height - Config.barConfig.border && centroid.pressPosition.x > root.screen.width / 5 && dragY < -Config.launcher.dragThreshold)
|
||||
root.visibilities.launcher = true;
|
||||
|
||||
if (root.singleGestureTriggered)
|
||||
@@ -100,7 +100,7 @@ Item {
|
||||
root.singleGestureTriggered = true;
|
||||
}
|
||||
|
||||
if (centroid.pressPosition.x > root.screen.width - Config.barConfig.border && centroid.pressPosition.y < (root.screen.height / 2) && dragX < -20) {
|
||||
if (centroid.pressPosition.x > root.screen.width - Config.barConfig.border && centroid.pressPosition.y < (root.screen.height / 2) && dragX < -Config.sidebar.dragThreshold) {
|
||||
root.visibilities.sidebar = true;
|
||||
root.singleGestureTriggered = true;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ Searcher {
|
||||
Variants {
|
||||
id: variants
|
||||
|
||||
model: Config.launcher.actions.filter(a => (a.enabled ?? true))
|
||||
model: Config.launcher.actions.filter(a => (a.enabled ?? true) && (Config.launcher.enableDangerousActions || !(a.dangerous ?? false)))
|
||||
|
||||
Action {
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import qs.Modules.SettingsNew.Pages
|
||||
import qs.Modules.SettingsNew.Pages.Wallpaper
|
||||
import qs.Modules.SettingsNew.Pages.Audio
|
||||
import qs.Modules.SettingsNew.Pages.Apps
|
||||
import qs.Modules.SettingsNew.Pages.Panels
|
||||
|
||||
QtObject {
|
||||
id: root
|
||||
@@ -65,7 +66,31 @@ QtObject {
|
||||
|
||||
// Shell
|
||||
Component {
|
||||
PlaceholderComp {
|
||||
StackPage {
|
||||
Component {
|
||||
PanelsPage {
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
DashboardPanel {
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
BarPanel {
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
LauncherPanel {
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
SidebarPanel {
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
Component {
|
||||
|
||||
@@ -31,7 +31,7 @@ Singleton {
|
||||
{
|
||||
name: qsTr("Connected devices"),
|
||||
icon: "devices_other",
|
||||
description: qsTr("Bluetooth, paiting"),
|
||||
description: qsTr("Bluetooth, pairing"),
|
||||
category: "connectivity"
|
||||
},
|
||||
{
|
||||
|
||||
@@ -82,7 +82,7 @@ PageBase {
|
||||
checked: root.app && Strings.testRegexList(Config.launcher.favoriteApps, root.app.id)
|
||||
enabled: !root.favoriteByRegex
|
||||
first: true
|
||||
subtext: root.favoriteByRegex ? qsTr("Matched by a regex in favoriteApps — edit the config file to change") : qsTr("Pin to the top of the launcher")
|
||||
subtext: root.favoriteByRegex ? qsTr("Matched by a regex in favoriteApps — edit the config file to change") : qsTr("Pin to the bottom of the launcher")
|
||||
text: qsTr("Favorite")
|
||||
|
||||
onToggled: {
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick.Layouts
|
||||
import qs.Config
|
||||
import qs.Modules.SettingsNew.Common
|
||||
|
||||
PageBase {
|
||||
id: root
|
||||
|
||||
isSubPage: true
|
||||
title: qsTr("Taskbar")
|
||||
|
||||
ColumnLayout {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: parent.top
|
||||
spacing: Appearance.spacing.extraSmall / 2
|
||||
width: root.cappedWidth
|
||||
|
||||
// Behavior
|
||||
SectionHeader {
|
||||
first: true
|
||||
text: qsTr("Behavior")
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.barConfig.autoHide
|
||||
first: true
|
||||
last: true
|
||||
subtext: qsTr("Hide the bar, reveal on hover")
|
||||
text: qsTr("Auto hide")
|
||||
|
||||
onToggled: Config.barConfig.autoHide = checked
|
||||
}
|
||||
|
||||
// Components
|
||||
SectionHeader {
|
||||
text: qsTr("Components")
|
||||
}
|
||||
|
||||
NavRow {
|
||||
first: true
|
||||
icon: "workspaces"
|
||||
label: qsTr("Workspaces")
|
||||
status: qsTr("Indicators, window icons")
|
||||
|
||||
onClicked: root.sState.openSubPage(5)
|
||||
}
|
||||
|
||||
NavRow {
|
||||
icon: "web_asset"
|
||||
label: qsTr("Active window")
|
||||
status: qsTr("Title display, popout")
|
||||
|
||||
onClicked: root.sState.openSubPage(6)
|
||||
}
|
||||
|
||||
NavRow {
|
||||
icon: "widgets"
|
||||
label: qsTr("Tray")
|
||||
status: qsTr("System tray icons")
|
||||
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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("Dashboard")
|
||||
|
||||
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.enabled
|
||||
first: true
|
||||
last: true
|
||||
text: qsTr("Enabled")
|
||||
|
||||
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,131 @@
|
||||
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("Launcher")
|
||||
|
||||
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.launcher.enabled
|
||||
first: true
|
||||
last: true
|
||||
text: qsTr("Enabled")
|
||||
|
||||
onToggled: Config.launcher.enabled = checked
|
||||
}
|
||||
|
||||
// Display
|
||||
SectionHeader {
|
||||
text: qsTr("Display")
|
||||
}
|
||||
|
||||
SpinRow {
|
||||
first: true
|
||||
from: 1
|
||||
stepSize: 1
|
||||
text: qsTr("Max items shown")
|
||||
to: 20
|
||||
value: Config.launcher.maxAppsShown
|
||||
|
||||
onMoved: v => Config.launcher.maxShown = v
|
||||
}
|
||||
|
||||
SpinRow {
|
||||
from: 1
|
||||
stepSize: 1
|
||||
text: qsTr("Max wallpapers")
|
||||
to: 30
|
||||
value: Config.launcher.maxWallpapers
|
||||
|
||||
onMoved: v => Config.launcher.maxWallpapers = v
|
||||
}
|
||||
|
||||
SpinRow {
|
||||
from: 0
|
||||
last: true
|
||||
stepSize: 5
|
||||
subtext: qsTr("Pixels dragged before the launcher opens")
|
||||
text: qsTr("Drag threshold")
|
||||
to: 200
|
||||
value: Config.launcher.dragThreshold
|
||||
|
||||
onMoved: v => Config.launcher.dragThreshold = v
|
||||
}
|
||||
|
||||
// Behavior
|
||||
SectionHeader {
|
||||
text: qsTr("Behavior")
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.launcher.enableDangerousActions
|
||||
first: true
|
||||
last: true
|
||||
subtext: qsTr("Allow actions that shut down or log out")
|
||||
text: qsTr("Enable dangerous actions")
|
||||
|
||||
onToggled: Config.launcher.enableDangerousActions = checked
|
||||
}
|
||||
|
||||
// Fuzzy search
|
||||
SectionHeader {
|
||||
text: qsTr("Fuzzy search")
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.launcher.useFuzzy.apps
|
||||
first: true
|
||||
text: qsTr("Apps")
|
||||
|
||||
onToggled: Config.launcher.useFuzzy.apps = checked
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.launcher.useFuzzy.actions
|
||||
text: qsTr("Actions")
|
||||
|
||||
onToggled: Config.launcher.useFuzzy.actions = checked
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.launcher.useFuzzy.schemes
|
||||
text: qsTr("Schemes")
|
||||
|
||||
onToggled: Config.launcher.useFuzzy.schemes = checked
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.launcher.useFuzzy.variants
|
||||
text: qsTr("Variants")
|
||||
|
||||
onToggled: Config.launcher.useFuzzy.variants = checked
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.launcher.useFuzzy.wallpapers
|
||||
last: true
|
||||
text: qsTr("Wallpapers")
|
||||
|
||||
onToggled: Config.launcher.useFuzzy.wallpapers = checked
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
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("Sidebar")
|
||||
|
||||
ColumnLayout {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: parent.top
|
||||
spacing: Appearance.spacing.extraSmall / 2
|
||||
width: root.cappedWidth
|
||||
|
||||
SectionHeader {
|
||||
first: true
|
||||
text: qsTr("General")
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.sidebar.enabled
|
||||
first: true
|
||||
text: qsTr("Enabled")
|
||||
|
||||
onToggled: Config.sidebar.enabled = checked
|
||||
}
|
||||
|
||||
SpinRow {
|
||||
from: 0
|
||||
last: true
|
||||
stepSize: 5
|
||||
subtext: qsTr("Pixels dragged before the sidebar opens")
|
||||
text: qsTr("Drag threshold")
|
||||
to: 200
|
||||
value: Config.sidebar.dragThreshold
|
||||
|
||||
onMoved: v => Config.sidebar.dragThreshold = v
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
import QtQuick.Layouts
|
||||
import qs.Config
|
||||
import qs.Modules.SettingsNew.Common
|
||||
|
||||
PageBase {
|
||||
id: root
|
||||
|
||||
title: qsTr("Panels")
|
||||
|
||||
ColumnLayout {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: parent.top
|
||||
spacing: Appearance.spacing.extraSmall / 2
|
||||
width: root.cappedWidth
|
||||
|
||||
NavRow {
|
||||
first: true
|
||||
icon: "dashboard"
|
||||
label: qsTr("Dashboard")
|
||||
status: Config.dashboard.enabled ? qsTr("Enabled") : qsTr("Disabled")
|
||||
|
||||
onClicked: root.sState.openSubPage(1)
|
||||
}
|
||||
|
||||
NavRow {
|
||||
icon: "dock_to_bottom"
|
||||
label: qsTr("Taskbar")
|
||||
status: !Config.barConfig.autoHide ? qsTr("Always visible") : qsTr("Reveal on hover")
|
||||
|
||||
onClicked: root.sState.openSubPage(2)
|
||||
}
|
||||
|
||||
NavRow {
|
||||
icon: "apps"
|
||||
label: qsTr("Launcher")
|
||||
status: Config.launcher.enabled ? qsTr("Enabled") : qsTr("Disabled")
|
||||
|
||||
onClicked: root.sState.openSubPage(3)
|
||||
}
|
||||
|
||||
NavRow {
|
||||
icon: "dock_to_right"
|
||||
label: qsTr("Sidebar")
|
||||
last: true
|
||||
status: Config.sidebar.enabled ? qsTr("Enabled") : qsTr("Disabled")
|
||||
|
||||
onClicked: root.sState.openSubPage(4)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user