config option for min brightness + clipboard config options now in settings
Lint & Format (JS/TS) / lint-format (pull_request) Successful in 9s
Python / lint-format (pull_request) Successful in 16s
Python / test (pull_request) Successful in 31s
Lint & Format (Rust) / lint-format (pull_request) Successful in 1m5s

This commit is contained in:
2026-06-16 10:15:57 +02:00
parent e3d3daf807
commit be8b7ae436
9 changed files with 137 additions and 5 deletions
-3
View File
@@ -12,11 +12,8 @@ Slider {
readonly property bool isVertical: orientation === Qt.Vertical
property real multiplier: 100
property real oldValue
// Wrapper components can inject their own track visuals here.
property Component trackContent
// Keep current behavior for existing usages.
orientation: Qt.Vertical
background: CustomRect {
+1
View File
@@ -330,6 +330,7 @@ Singleton {
weatherLocation: services.weatherLocation,
updates: services.updates,
useFahrenheit: services.useFahrenheit,
minBrightness: services.minBrightness,
ddcutilService: services.ddcutilService,
useTwelveHourClock: services.useTwelveHourClock,
gpuType: services.gpuType,
+1
View File
@@ -8,6 +8,7 @@ JsonObject {
property string defaultPlayer: "Spotify"
property string gpuType: ""
property real maxVolume: 1.0
property real minBrightness: 0.01
property list<var> playerAliases: [
{
"from": "com.github.th_ch.youtube_music",
+1 -1
View File
@@ -232,7 +232,7 @@ Singleton {
}
function setBrightness(value: real): void {
value = Math.max(0, Math.min(1, value));
value = Math.max(Config.services.minBrightness, Math.min(1, value));
const rounded = Math.round(value * 100);
if (Math.round(brightness * 100) === rounded)
return;
+1 -1
View File
@@ -11,7 +11,7 @@ Item {
property int contentHeight
property real offsetScale: shouldBeActive ? 0 : 1
required property ShellScreen screen
readonly property bool shouldBeActive: visibilities.clipboard
readonly property bool shouldBeActive: visibilities.clipboard && Config.clipboard.enabled
required property PersistentProperties visibilities
anchors.bottomMargin: (-implicitHeight - 5) * offsetScale
+2
View File
@@ -97,7 +97,9 @@ Item {
FilledSlider {
anchors.fill: parent
from: Config.services.minBrightness
icon: `brightness_${(Math.round(value * 6) + 1)}`
to: 1.0
value: root.brightness
onPressedChanged: {
+12
View File
@@ -92,6 +92,18 @@ SettingsPage {
Separator {
}
SettingSpinBox {
max: 1.0
min: 0
name: "Minimum brightness"
object: Config.services
setting: "minBrightness"
step: 0.01
}
Separator {
}
SettingSpinBox {
max: 5
min: 0
+69
View File
@@ -46,6 +46,75 @@ SettingsPage {
}
}
SettingsSection {
sectionId: "Clipboard"
SettingsHeader {
name: "Clipboard"
}
SettingSwitch {
name: "Enable clipboard history viewer"
object: Config.clipboard
setting: "enabled"
}
Separator {
}
SettingSpinBox {
max: 20
min: 1
name: "Max entries visible"
object: Config.clipboard
setting: "maxEntriesShown"
}
Separator {
}
SettingSpinBox {
max: 80
min: 30
name: "Entry height"
object: Config.clipboard.sizes
setting: "itemHeight"
}
Separator {
}
SettingSpinBox {
max: 700
min: 300
name: "Entry width"
object: Config.clipboard.sizes
setting: "width"
}
Separator {
}
SettingSpinBox {
max: 1800
min: 50
name: "Minimum preview width"
object: Config.clipboard.sizes
setting: "minPreviewWidth"
}
Separator {
}
SettingSpinBox {
max: 1800
min: 50
name: "Maximum preview width"
object: Config.clipboard.sizes
setting: "previewWidth"
}
}
SettingsSection {
sectionId: "Toasts"
+50
View File
@@ -414,6 +414,13 @@ export const settingsIndex = [
section: "Media",
keywords: ["screen", "step", "increment"],
},
{
name: "Minimum brightness",
category: "services",
categoryName: "Services",
section: "Media",
keywords: ["brightness", "minimum", "screen"],
},
{
name: "Max volume",
category: "services",
@@ -563,6 +570,49 @@ export const settingsIndex = [
section: "Utilities",
keywords: ["notification", "size", "width"],
},
// Clipboard section
{
name: "Enable clipboard history viewer",
category: "utilities",
categoryName: "Utilities",
section: "Clipboard",
keywords: ["enable", "clipboard"],
},
{
name: "Max entries visible",
category: "utilities",
categoryName: "Utilities",
section: "Clipboard",
keywords: ["clipboard", "max"],
},
{
name: "Entry height",
category: "utilities",
categoryName: "Utilities",
section: "Clipboard",
keywords: ["height", "entry"],
},
{
name: "Entry width",
category: "utilities",
categoryName: "Utilities",
section: "Clipboard",
keywords: ["width", "entry"],
},
{
name: "Minimum preview width",
category: "utilities",
categoryName: "Utilities",
section: "Clipboard",
keywords: ["minimum", "preview", "width"],
},
{
name: "Maximum preview width",
category: "utilities",
categoryName: "Utilities",
section: "Clipboard",
keywords: ["maximum", "preview", "width"],
},
// Toasts section
{
name: "Config loaded",