summaryrefslogtreecommitdiff
path: root/accounts/gkleen@sif/shell/quickshell/Services/Brightness.qml
diff options
context:
space:
mode:
Diffstat (limited to 'accounts/gkleen@sif/shell/quickshell/Services/Brightness.qml')
-rw-r--r--accounts/gkleen@sif/shell/quickshell/Services/Brightness.qml21
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
4import Quickshell 4import Quickshell
5import Quickshell.Io 5import Quickshell.Io
6import Custom as Custom 6import Custom as Custom
7import qs.Services
7 8
8Singleton { 9Singleton {
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}