aboutsummaryrefslogtreecommitdiff
path: root/modules/system/quickshell/BrightnessService.qml
diff options
context:
space:
mode:
authorLeander Scherer <leander@schererleander.de>2026-06-29 21:08:42 +0200
committerLeander Scherer <leander@schererleander.de>2026-06-29 21:22:33 +0200
commit67b7245bf96cf954d90719e800cf9618ffaa4feb (patch)
tree2723c3db278840150985cdc630487ff175d330d9 /modules/system/quickshell/BrightnessService.qml
parentd4fa3d0533c8dac688e38413403815de1802339e (diff)
chore: cleanup sway, quickshell
Diffstat (limited to 'modules/system/quickshell/BrightnessService.qml')
-rw-r--r--modules/system/quickshell/BrightnessService.qml35
1 files changed, 0 insertions, 35 deletions
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()
-}