summaryrefslogtreecommitdiff
path: root/utils/Icons.qml
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2026-01-03 17:53:06 +1100
committerGitHub <noreply@github.com>2026-01-03 17:53:06 +1100
commitbdcd13222fc6edc77c779a396900ab909e7d5439 (patch)
treef9457f3c91c05ec852f974f239d06aca52a3918e /utils/Icons.qml
parent[CI] chore: update flake (diff)
parentMerge branch 'caelestia-dots:main' into main (diff)
downloadcaelestia-shell-bdcd13222fc6edc77c779a396900ab909e7d5439.tar.gz
caelestia-shell-bdcd13222fc6edc77c779a396900ab909e7d5439.tar.bz2
caelestia-shell-bdcd13222fc6edc77c779a396900ab909e7d5439.zip
Merge pull request #906 from atdma/main
controlcenter: many setting panes and minor features
Diffstat (limited to '')
-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")