From 56a38bc2821e2a00efd75274ad080cde5614f7ce Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 24 Sep 2026 11:27:23 +0200 Subject: ... --- accounts/gkleen@skadhi/shell/quickshell/Services/Brightness.qml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'accounts/gkleen@skadhi/shell/quickshell/Services') diff --git a/accounts/gkleen@skadhi/shell/quickshell/Services/Brightness.qml b/accounts/gkleen@skadhi/shell/quickshell/Services/Brightness.qml index 76e8c08d..2d7b2e01 100644 --- a/accounts/gkleen@skadhi/shell/quickshell/Services/Brightness.qml +++ b/accounts/gkleen@skadhi/shell/quickshell/Services/Brightness.qml @@ -12,14 +12,15 @@ Singleton { property string subsystem: "backlight" property string device: "amdgpu_bl1" + property real deadzone: 5268 property real currBrightness property real exponent: 4 function calcCurrBrightness() { if (!currFile.loaded || !maxFile.loaded) return undefined; - const curr = Number(currFile.text()); - const max = Number(maxFile.text()); + const curr = Number(currFile.text()) - deadzone; + const max = Number(maxFile.text()) - deadzone; const val = Math.pow(curr / max, 1 / root.exponent); return val; } @@ -56,7 +57,7 @@ Singleton { else if (Math.round(curr) == actual && curr > actual) curr = Math.min(max, actual + 1); // root.currBrightness = Math.pow(curr / max, 1 / root.exponent); - Custom.Systemd.setBrightness(root.subsystem, root.device, Math.round(curr)); + Custom.Systemd.setBrightness(root.subsystem, root.device, Math.round(curr) + deadzone); } FileView { -- cgit v1.2.3