summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--accounts/gkleen@sif/shell/quickshell/BatteryWidget.qml5
-rw-r--r--accounts/gkleen@sif/shell/quickshell/Services/Brightness.qml4
-rw-r--r--accounts/gkleen@sif/shell/quickshell/VolumeOSD.qml4
-rw-r--r--accounts/gkleen@sif/shell/quickshell/WorkspaceSwitcher.qml2
4 files changed, 10 insertions, 5 deletions
diff --git a/accounts/gkleen@sif/shell/quickshell/BatteryWidget.qml b/accounts/gkleen@sif/shell/quickshell/BatteryWidget.qml
index da17df2a..f465fa20 100644
--- a/accounts/gkleen@sif/shell/quickshell/BatteryWidget.qml
+++ b/accounts/gkleen@sif/shell/quickshell/BatteryWidget.qml
@@ -102,9 +102,12 @@ Item {
102 color: "white" 102 color: "white"
103 103
104 text: { 104 text: {
105 if (!root.batteryDevice?.ready)
106 return "Not ready";
107
105 const stateStr = UPowerDeviceState.toString(root.batteryDevice.state); 108 const stateStr = UPowerDeviceState.toString(root.batteryDevice.state);
106 var outStr = stateStr; 109 var outStr = stateStr;
107 if (root.batteryDevice.state != UPowerDeviceState.FullyCharged) 110 if (root.batteryDevice.state !== UPowerDeviceState.FullyCharged)
108 outStr += ` ${Math.round(root.batteryDevice.percentage * 100)}%`; 111 outStr += ` ${Math.round(root.batteryDevice.percentage * 100)}%`;
109 112
110 function formatTime(t) { 113 function formatTime(t) {
diff --git a/accounts/gkleen@sif/shell/quickshell/Services/Brightness.qml b/accounts/gkleen@sif/shell/quickshell/Services/Brightness.qml
index c01169cd..f3ae6804 100644
--- a/accounts/gkleen@sif/shell/quickshell/Services/Brightness.qml
+++ b/accounts/gkleen@sif/shell/quickshell/Services/Brightness.qml
@@ -84,7 +84,9 @@ Singleton {
84 property bool onlyInternal: true 84 property bool onlyInternal: true
85 Connections { 85 Connections {
86 target: NiriService 86 target: NiriService
87 onOutputsChanged: root.onlyInternal = Object.keys(NiriService.outputs).every(oname => oname == "eDP-1") 87 function onOutputsChanged() {
88 root.onlyInternal = Object.keys(NiriService.outputs).every(oname => oname == "eDP-1");
89 }
88 } 90 }
89 onOnlyInternalChanged: { 91 onOnlyInternalChanged: {
90 if (startupDelay.running) 92 if (startupDelay.running)
diff --git a/accounts/gkleen@sif/shell/quickshell/VolumeOSD.qml b/accounts/gkleen@sif/shell/quickshell/VolumeOSD.qml
index 653f4763..91dc9591 100644
--- a/accounts/gkleen@sif/shell/quickshell/VolumeOSD.qml
+++ b/accounts/gkleen@sif/shell/quickshell/VolumeOSD.qml
@@ -16,7 +16,7 @@ Scope {
16 16
17 Connections { 17 Connections {
18 enabled: Pipewire.defaultAudioSink 18 enabled: Pipewire.defaultAudioSink
19 target: Pipewire.defaultAudioSink?.audio 19 target: Pipewire.defaultAudioSink?.audio || null
20 20
21 function onVolumeChanged() { 21 function onVolumeChanged() {
22 root.show = "sink"; 22 root.show = "sink";
@@ -30,7 +30,7 @@ Scope {
30 30
31 Connections { 31 Connections {
32 enabled: Pipewire.defaultAudioSource 32 enabled: Pipewire.defaultAudioSource
33 target: Pipewire.defaultAudioSource?.audio 33 target: Pipewire.defaultAudioSource?.audio || null
34 34
35 function onVolumeChanged() { 35 function onVolumeChanged() {
36 root.show = "source"; 36 root.show = "source";
diff --git a/accounts/gkleen@sif/shell/quickshell/WorkspaceSwitcher.qml b/accounts/gkleen@sif/shell/quickshell/WorkspaceSwitcher.qml
index 0dd1bca8..d0595b3d 100644
--- a/accounts/gkleen@sif/shell/quickshell/WorkspaceSwitcher.qml
+++ b/accounts/gkleen@sif/shell/quickshell/WorkspaceSwitcher.qml
@@ -140,7 +140,7 @@ Row {
140 if (a.layout.pos_in_scrolling_layout?.[1] !== b.layout.pos_in_scrolling_layout?.[1]) 140 if (a.layout.pos_in_scrolling_layout?.[1] !== b.layout.pos_in_scrolling_layout?.[1])
141 return a.layout.pos_in_scrolling_layout?.[1] - b.layout.pos_in_scrolling_layout?.[1] 141 return a.layout.pos_in_scrolling_layout?.[1] - b.layout.pos_in_scrolling_layout?.[1]
142 if (a.app_id !== b.app_id) 142 if (a.app_id !== b.app_id)
143 return a.app_id.localeCompare(b.app_id); 143 return a.app_id?.localeCompare(b.app_id);
144 144
145 return a.title.localeCompare(b.title); 145 return a.title.localeCompare(b.title);
146 }); 146 });