diff options
| author | Gregor Kleen <gkleen@yggdrasil.li> | 2025-09-11 14:43:11 +0200 |
|---|---|---|
| committer | Gregor Kleen <gkleen@yggdrasil.li> | 2025-09-11 14:43:11 +0200 |
| commit | aebd3235d755cb1ff95995b461e497fea2d52e8b (patch) | |
| tree | a8b2cc30a51ed06c383d7a6f53cb44f623e188c1 /accounts/gkleen@sif/shell/quickshell/Services | |
| parent | d1261f6586ab5d91e81c04ca0f586e35ee6fb8a6 (diff) | |
| download | nixos-aebd3235d755cb1ff95995b461e497fea2d52e8b.tar nixos-aebd3235d755cb1ff95995b461e497fea2d52e8b.tar.gz nixos-aebd3235d755cb1ff95995b461e497fea2d52e8b.tar.bz2 nixos-aebd3235d755cb1ff95995b461e497fea2d52e8b.tar.xz nixos-aebd3235d755cb1ff95995b461e497fea2d52e8b.zip | |
...
Diffstat (limited to 'accounts/gkleen@sif/shell/quickshell/Services')
| -rw-r--r-- | accounts/gkleen@sif/shell/quickshell/Services/Brightness.qml | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/accounts/gkleen@sif/shell/quickshell/Services/Brightness.qml b/accounts/gkleen@sif/shell/quickshell/Services/Brightness.qml index 87c7c05b..8318df50 100644 --- a/accounts/gkleen@sif/shell/quickshell/Services/Brightness.qml +++ b/accounts/gkleen@sif/shell/quickshell/Services/Brightness.qml | |||
| @@ -23,14 +23,21 @@ Singleton { | |||
| 23 | return val; | 23 | return val; |
| 24 | } | 24 | } |
| 25 | 25 | ||
| 26 | Component.onCompleted: root.currBrightness = root.calcCurrBrightness() | ||
| 27 | Connections { | 26 | Connections { |
| 28 | target: currFile | 27 | target: currFile |
| 29 | function onLoaded() { root.currBrightness = root.calcCurrBrightness(); } | 28 | function onLoaded() { |
| 29 | const b = root.calcCurrBrightness(); | ||
| 30 | if (typeof b !== 'undefined') | ||
| 31 | root.currBrightness = b; | ||
| 32 | } | ||
| 30 | } | 33 | } |
| 31 | Connections { | 34 | Connections { |
| 32 | target: maxFile | 35 | target: maxFile |
| 33 | function onLoaded() { root.currBrightness = root.calcCurrBrightness(); } | 36 | function onLoaded() { |
| 37 | const b = root.calcCurrBrightness(); | ||
| 38 | if (typeof b !== 'undefined') | ||
| 39 | root.currBrightness = b; | ||
| 40 | } | ||
| 34 | } | 41 | } |
| 35 | 42 | ||
| 36 | onCurrBrightnessChanged: { | 43 | onCurrBrightnessChanged: { |
