diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-04-29 14:56:39 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-04-29 14:56:39 +1000 |
| commit | fa5b31292401a80484ff6f81a5b68603b3889428 (patch) | |
| tree | ce3470c70e2785589ef315a5c9981e445a0e05df /utils/Icons.qml | |
| parent | style: remove unneeded comments (diff) | |
| download | caelestia-shell-fa5b31292401a80484ff6f81a5b68603b3889428.tar.gz caelestia-shell-fa5b31292401a80484ff6f81a5b68603b3889428.tar.bz2 caelestia-shell-fa5b31292401a80484ff6f81a5b68603b3889428.zip | |
feat: bar network icon
Diffstat (limited to 'utils/Icons.qml')
| -rw-r--r-- | utils/Icons.qml | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/utils/Icons.qml b/utils/Icons.qml index 1f0a947..ac19b4e 100644 --- a/utils/Icons.qml +++ b/utils/Icons.qml @@ -152,7 +152,7 @@ Singleton { property string osIcon: "" - function getAppCategoryIcon(name) { + function getAppCategoryIcon(name: string): string { if (!name) return null; @@ -165,6 +165,18 @@ Singleton { return "terminal"; } + 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"; + } + FileView { path: "/etc/os-release" onLoaded: { |