From 67b7245bf96cf954d90719e800cf9618ffaa4feb Mon Sep 17 00:00:00 2001 From: Leander Scherer Date: Mon, 29 Jun 2026 21:08:42 +0200 Subject: chore: cleanup sway, quickshell --- modules/system/quickshell/BrightnessService.qml | 35 ------------------------- 1 file changed, 35 deletions(-) delete mode 100644 modules/system/quickshell/BrightnessService.qml (limited to 'modules/system/quickshell/BrightnessService.qml') diff --git a/modules/system/quickshell/BrightnessService.qml b/modules/system/quickshell/BrightnessService.qml deleted file mode 100644 index 6142188..0000000 --- a/modules/system/quickshell/BrightnessService.qml +++ /dev/null @@ -1,35 +0,0 @@ -import QtQuick -import Quickshell -import Quickshell.Io - -QtObject { - id: root - property real brightness: 0 - property int maxBrightness: 1 - - function update() { - updateProc.running = true; - } - - function setBrightness(value) { - const raw = Math.round(value * maxBrightness); - Quickshell.execDetached(["brightnessctl", "s", raw.toString()]); - brightness = value; - } - - readonly property Process updateProc: Process { - command: ["sh", "-c", "printf '%s %s\\n' \"$(brightnessctl g)\" \"$(brightnessctl m)\""] - stdout: SplitParser { - onRead: data => { - const parts = data.trim().split(/\s+/); - if (parts.length >= 2) { - const current = parseInt(parts[0]); - root.maxBrightness = parseInt(parts[1]); - root.brightness = current / root.maxBrightness; - } - } - } - } - - Component.onCompleted: update() -} -- cgit v1.3.1