summaryrefslogtreecommitdiff
path: root/utils/Icons.qml
diff options
context:
space:
mode:
Diffstat (limited to 'utils/Icons.qml')
-rw-r--r--utils/Icons.qml37
1 files changed, 25 insertions, 12 deletions
diff --git a/utils/Icons.qml b/utils/Icons.qml
index e946c4f..b3f00c5 100644
--- a/utils/Icons.qml
+++ b/utils/Icons.qml
@@ -3,6 +3,7 @@ pragma Singleton
import qs.config
import Quickshell
import Quickshell.Services.Notifications
+import QtQuick
Singleton {
id: root
@@ -115,16 +116,28 @@ Singleton {
return fallback;
}
- function getNetworkIcon(strength: int): string {
- if (strength >= 80)
- return "signal_wifi_4_bar";
- if (strength >= 60)
- return "network_wifi_3_bar";
- if (strength >= 40)
- return "network_wifi_2_bar";
- if (strength >= 20)
- return "network_wifi_1_bar";
- return "signal_wifi_0_bar";
+ function getNetworkIcon(strength: int, isSecure = false): string {
+ if (isSecure) {
+ if (strength >= 80)
+ return "network_wifi_locked";
+ if (strength >= 60)
+ return "network_wifi_3_bar_locked";
+ if (strength >= 40)
+ return "network_wifi_2_bar_locked";
+ if (strength >= 20)
+ return "network_wifi_1_bar_locked";
+ return "signal_wifi_0_bar";
+ } else {
+ if (strength >= 80)
+ return "network_wifi";
+ if (strength >= 60)
+ return "network_wifi_3_bar";
+ if (strength >= 40)
+ return "network_wifi_2_bar";
+ if (strength >= 20)
+ return "network_wifi_1_bar";
+ return "signal_wifi_0_bar";
+ }
}
function getBluetoothIcon(icon: string): string {
@@ -194,13 +207,13 @@ Singleton {
function getSpecialWsIcon(name: string): string {
name = name.toLowerCase().slice("special:".length);
-
+
for (const iconConfig of Config.bar.workspaces.specialWorkspaceIcons) {
if (iconConfig.name === name) {
return iconConfig.icon;
}
}
-
+
if (name === "special")
return "star";
if (name === "communication")