diff options
Diffstat (limited to 'services')
| -rw-r--r-- | services/Brightness.qml | 7 |
1 files changed, 6 insertions, 1 deletions
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 { |