From 61c5c46b910a2f19c4d3f0e99c2e9edc42c23e40 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Mon, 12 May 2025 13:56:15 +1000 Subject: brightness: fix for brightnessctl --- services/Brightness.qml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'services') diff --git a/services/Brightness.qml b/services/Brightness.qml index dd51376..ef90511 100644 --- a/services/Brightness.qml +++ b/services/Brightness.qml @@ -95,7 +95,7 @@ Singleton { if (Math.round(brightness * 100) === rounded) return; brightness = value; - setProc.command = isDdc ? ["ddcutil", "-b", busNum, "setvcp", "10", rounded] : ["brightnessctl", "s", rounded]; + setProc.command = isDdc ? ["ddcutil", "-b", busNum, "setvcp", "10", rounded] : ["brightnessctl", "s", `${rounded}%`]; setProc.startDetached(); } @@ -103,6 +103,11 @@ Singleton { initProc.command = isDdc ? ["ddcutil", "-b", busNum, "getvcp", "10", "--brief"] : ["sh", "-c", `echo "a b c $(brightnessctl g) $(brightnessctl m)"`]; initProc.running = true; } + + Component.onCompleted: { + initProc.command = isDdc ? ["ddcutil", "-b", busNum, "getvcp", "10", "--brief"] : ["sh", "-c", `echo "a b c $(brightnessctl g) $(brightnessctl m)"`]; + initProc.running = true; + } } Component { -- cgit v1.2.3-freya