diff options
| author | Gregor Kleen <gkleen@yggdrasil.li> | 2026-03-05 09:02:49 +0100 |
|---|---|---|
| committer | Gregor Kleen <gkleen@yggdrasil.li> | 2026-03-05 09:02:49 +0100 |
| commit | 445f6c2ee0a9a21d4de94dff621279887caa25a4 (patch) | |
| tree | 1d6849968f59a4a61d71e68682f4473f0a701c27 /accounts/gkleen@sif/shell/quickshell/Services/Brightness.qml | |
| parent | a51282674852f1fb452ce6eb11e14b34064cc839 (diff) | |
| download | nixos-445f6c2ee0a9a21d4de94dff621279887caa25a4.tar nixos-445f6c2ee0a9a21d4de94dff621279887caa25a4.tar.gz nixos-445f6c2ee0a9a21d4de94dff621279887caa25a4.tar.bz2 nixos-445f6c2ee0a9a21d4de94dff621279887caa25a4.tar.xz nixos-445f6c2ee0a9a21d4de94dff621279887caa25a4.zip | |
...
Diffstat (limited to 'accounts/gkleen@sif/shell/quickshell/Services/Brightness.qml')
| -rw-r--r-- | accounts/gkleen@sif/shell/quickshell/Services/Brightness.qml | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/accounts/gkleen@sif/shell/quickshell/Services/Brightness.qml b/accounts/gkleen@sif/shell/quickshell/Services/Brightness.qml index 8318df50..52103c6f 100644 --- a/accounts/gkleen@sif/shell/quickshell/Services/Brightness.qml +++ b/accounts/gkleen@sif/shell/quickshell/Services/Brightness.qml | |||
| @@ -4,6 +4,7 @@ import QtQml | |||
| 4 | import Quickshell | 4 | import Quickshell |
| 5 | import Quickshell.Io | 5 | import Quickshell.Io |
| 6 | import Custom as Custom | 6 | import Custom as Custom |
| 7 | import qs.Services | ||
| 7 | 8 | ||
| 8 | Singleton { | 9 | Singleton { |
| 9 | id: root | 10 | id: root |
| @@ -72,4 +73,24 @@ Singleton { | |||
| 72 | watchChanges: true | 73 | watchChanges: true |
| 73 | onFileChanged: reload() | 74 | onFileChanged: reload() |
| 74 | } | 75 | } |
| 76 | |||
| 77 | |||
| 78 | Timer { | ||
| 79 | id: startupDelay | ||
| 80 | interval: 500 | ||
| 81 | running: true | ||
| 82 | repeat: false | ||
| 83 | } | ||
| 84 | property bool onlyInternal: true | ||
| 85 | Connections { | ||
| 86 | target: NiriService | ||
| 87 | onOutputsChanged: root.onlyInternal = Object.keys(NiriService.outputs).every(oname => oname == "eDP-1") | ||
| 88 | } | ||
| 89 | onOnlyInternalChanged: { | ||
| 90 | if (startupDelay.running) | ||
| 91 | return; | ||
| 92 | |||
| 93 | if (!root.onlyInternal) | ||
| 94 | root.currBrightness = 1 | ||
| 95 | } | ||
| 75 | } | 96 | } |
