feat: rename Game Bar to Quickpanel and support DMS 2.0
This commit is contained in:
27 files changed
+158
-145
No files matched your search
@@ -0,0 +1,231 @@
|
||||
import QtQuick
|
||||
import qs.Common
|
||||
import qs.Modules.Plugins
|
||||
import qs.DCommon.Widgets
|
||||
import "./settings"
|
||||
|
||||
PluginSettings {
|
||||
id: settings
|
||||
|
||||
pluginId: "quickpanel"
|
||||
|
||||
Rectangle {
|
||||
width: parent.width
|
||||
height: hintColumn.implicitHeight + Theme.spacingM * 2
|
||||
radius: Theme.cornerRadius
|
||||
color: Theme.withAlpha(Theme.surfaceContainerHigh, Theme.popupTransparency)
|
||||
border.color: Theme.outlineMedium
|
||||
border.width: Theme.layerOutlineWidth
|
||||
|
||||
Column {
|
||||
id: hintColumn
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.margins: Theme.spacingM
|
||||
spacing: Theme.spacingXS
|
||||
|
||||
StyledText {
|
||||
text: "Keybind setup"
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
font.weight: Font.Medium
|
||||
color: Theme.surfaceText
|
||||
}
|
||||
|
||||
StyledText {
|
||||
width: parent.width
|
||||
text: "Commands: dms ipc call quickpanel toggle / open / close / widget <name> / resetLayout"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.family: Theme.monoFontFamily
|
||||
color: Theme.surfaceVariantText
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SliderSetting {
|
||||
settingKey: "backdropOpacity"
|
||||
label: "Background dimming"
|
||||
description: "How much the desktop behind the overlay is darkened"
|
||||
defaultValue: 70
|
||||
minimum: 0
|
||||
maximum: 95
|
||||
unit: "%"
|
||||
leftIcon: "light_mode"
|
||||
rightIcon: "dark_mode"
|
||||
}
|
||||
|
||||
ToggleSetting {
|
||||
settingKey: "autoPinBrightness"
|
||||
label: "Match brightness devices to monitors"
|
||||
description: "Detects which DDC device belongs to which display and pins it, so the shell's own brightness slider follows the panel's monitor"
|
||||
defaultValue: true
|
||||
}
|
||||
|
||||
SelectionSetting {
|
||||
settingKey: "barBrightnessTarget"
|
||||
label: "Bar brightness widget controls"
|
||||
description: "Which display the bar brightness pill adjusts"
|
||||
options: [
|
||||
{
|
||||
"label": "Focused monitor",
|
||||
"value": "focused"
|
||||
},
|
||||
{
|
||||
"label": "Its own monitor",
|
||||
"value": "own"
|
||||
}
|
||||
]
|
||||
defaultValue: "focused"
|
||||
}
|
||||
|
||||
ToggleSetting {
|
||||
settingKey: "timerPlaySound"
|
||||
label: "Play a sound when a timer ends"
|
||||
defaultValue: true
|
||||
}
|
||||
|
||||
ToggleSetting {
|
||||
settingKey: "timerNotify"
|
||||
label: "Send a notification when a timer ends"
|
||||
description: "Shows the timer's label, so it is visible even with the overlay closed"
|
||||
defaultValue: true
|
||||
}
|
||||
|
||||
StringSetting {
|
||||
settingKey: "timerSound"
|
||||
label: "Timer sound"
|
||||
description: "Any file paplay can play"
|
||||
defaultValue: "/usr/share/sounds/freedesktop/stereo/alarm-clock-elapsed.oga"
|
||||
placeholder: "/usr/share/sounds/freedesktop/stereo/alarm-clock-elapsed.oga"
|
||||
}
|
||||
|
||||
StringSetting {
|
||||
settingKey: "captureDirectory"
|
||||
label: "Capture folder"
|
||||
description: "Where recordings and replays are written"
|
||||
defaultValue: "~/Videos/Quickpanel"
|
||||
placeholder: "~/Videos/Quickpanel"
|
||||
}
|
||||
|
||||
SliderSetting {
|
||||
settingKey: "captureFps"
|
||||
label: "Recording frame rate"
|
||||
defaultValue: 60
|
||||
minimum: 24
|
||||
maximum: 144
|
||||
unit: " fps"
|
||||
leftIcon: "slow_motion_video"
|
||||
rightIcon: "speed"
|
||||
}
|
||||
|
||||
SliderSetting {
|
||||
settingKey: "captureReplaySeconds"
|
||||
label: "Replay buffer length"
|
||||
description: "How much of the past the replay buffer keeps"
|
||||
defaultValue: 30
|
||||
minimum: 5
|
||||
maximum: 300
|
||||
unit: "s"
|
||||
leftIcon: "timer"
|
||||
rightIcon: "history"
|
||||
}
|
||||
|
||||
SelectionSetting {
|
||||
settingKey: "captureQuality"
|
||||
label: "Recording quality"
|
||||
options: [
|
||||
{
|
||||
"label": "Medium",
|
||||
"value": "medium"
|
||||
},
|
||||
{
|
||||
"label": "High",
|
||||
"value": "high"
|
||||
},
|
||||
{
|
||||
"label": "Very high",
|
||||
"value": "very_high"
|
||||
},
|
||||
{
|
||||
"label": "Ultra",
|
||||
"value": "ultra"
|
||||
}
|
||||
]
|
||||
defaultValue: "very_high"
|
||||
}
|
||||
|
||||
StringSetting {
|
||||
settingKey: "captureAudio"
|
||||
label: "Recorded audio source"
|
||||
description: "gpu-screen-recorder device, e.g. default_output"
|
||||
defaultValue: "default_output"
|
||||
placeholder: "default_output"
|
||||
}
|
||||
|
||||
StringSetting {
|
||||
settingKey: "haUrl"
|
||||
label: "Home Assistant URL"
|
||||
description: "e.g. http://homeassistant.local:8123"
|
||||
placeholder: "http://homeassistant.local:8123"
|
||||
}
|
||||
|
||||
StringSetting {
|
||||
settingKey: "haToken"
|
||||
label: "Long-lived access token"
|
||||
description: "Home Assistant profile page, bottom of Security tab"
|
||||
placeholder: "eyJhbGciOi..."
|
||||
}
|
||||
|
||||
SliderSetting {
|
||||
settingKey: "haPollInterval"
|
||||
label: "Home Assistant refresh interval"
|
||||
description: "How often entity states are polled while the Home widget is open"
|
||||
defaultValue: 5
|
||||
minimum: 2
|
||||
maximum: 30
|
||||
unit: "s"
|
||||
leftIcon: "speed"
|
||||
rightIcon: "schedule"
|
||||
}
|
||||
|
||||
HomeSettings {
|
||||
width: parent.width
|
||||
settings: settings
|
||||
}
|
||||
|
||||
Item {
|
||||
width: parent.width
|
||||
height: resetColumn.implicitHeight
|
||||
|
||||
Column {
|
||||
id: resetColumn
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
spacing: Theme.spacingXS
|
||||
|
||||
StyledText {
|
||||
text: "Widget layout"
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
font.weight: Font.Medium
|
||||
color: Theme.surfaceText
|
||||
}
|
||||
|
||||
StyledText {
|
||||
width: parent.width
|
||||
text: "Widget positions are saved per monitor. Reset them to the default arrangement."
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Theme.surfaceVariantText
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
|
||||
DButton {
|
||||
text: "Reset widget positions"
|
||||
iconName: "restart_alt"
|
||||
onClicked: settings.saveValue("layout", {})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user