diff options
| author | Ezekiel Gonzales <141341590+notsoeazy@users.noreply.github.com> | 2026-01-03 16:04:00 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-03 19:04:00 +1100 |
| commit | 49b94e7b188010d70920590a50f8441373442dfd (patch) | |
| tree | 463fe914ebcb6cb6f82529ea3c2879d5441bc239 | |
| parent | bluetooth: make device sort order stable (diff) | |
| download | caelestia-shell-49b94e7b188010d70920590a50f8441373442dfd.tar.gz caelestia-shell-49b94e7b188010d70920590a50f8441373442dfd.tar.bz2 caelestia-shell-49b94e7b188010d70920590a50f8441373442dfd.zip | |
services: add brightnessIncrement config property (#1010)
* feat: Add brightnessIncrement config property
* birghtness increment applies on bar scroll
| -rw-r--r-- | README.md | 1 | ||||
| -rw-r--r-- | config/ServiceConfig.qml | 1 | ||||
| -rw-r--r-- | modules/bar/Bar.qml | 4 | ||||
| -rw-r--r-- | services/Brightness.qml | 5 |
4 files changed, 7 insertions, 4 deletions
@@ -563,6 +563,7 @@ default, you must create it manually. }, "services": { "audioIncrement": 0.1, + "brightnessIncrement": 0.1, "maxVolume": 1.0, "defaultPlayer": "Spotify", "gpuType": "", diff --git a/config/ServiceConfig.qml b/config/ServiceConfig.qml index 36a51aa..d083b7a 100644 --- a/config/ServiceConfig.qml +++ b/config/ServiceConfig.qml @@ -8,6 +8,7 @@ JsonObject { property string gpuType: "" property int visualiserBars: 45 property real audioIncrement: 0.1 + property real brightnessIncrement: 0.1 property real maxVolume: 1.0 property bool smartScheme: true property string defaultPlayer: "Spotify" diff --git a/modules/bar/Bar.qml b/modules/bar/Bar.qml index 1dceea4..cb384e3 100644 --- a/modules/bar/Bar.qml +++ b/modules/bar/Bar.qml @@ -95,9 +95,9 @@ ColumnLayout { // Brightness scroll on bottom half const monitor = Brightness.getMonitorForScreen(screen); if (angleDelta.y > 0) - monitor.setBrightness(monitor.brightness + 0.1); + monitor.setBrightness(monitor.brightness + Config.services.brightnessIncrement); else if (angleDelta.y < 0) - monitor.setBrightness(monitor.brightness - 0.1); + monitor.setBrightness(monitor.brightness - Config.services.brightnessIncrement); } } diff --git a/services/Brightness.qml b/services/Brightness.qml index ac905fd..12920ee 100644 --- a/services/Brightness.qml +++ b/services/Brightness.qml @@ -1,6 +1,7 @@ pragma Singleton pragma ComponentBehavior: Bound +import qs.config import qs.components.misc import Quickshell import Quickshell.Io @@ -43,13 +44,13 @@ Singleton { function increaseBrightness(): void { const monitor = getMonitor("active"); if (monitor) - monitor.setBrightness(monitor.brightness + 0.1); + monitor.setBrightness(monitor.brightness + Config.services.brightnessIncrement); } function decreaseBrightness(): void { const monitor = getMonitor("active"); if (monitor) - monitor.setBrightness(monitor.brightness - 0.1); + monitor.setBrightness(monitor.brightness - Config.services.brightnessIncrement); } onMonitorsChanged: { |