summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/Icons.qml45
-rw-r--r--utils/SysInfo.qml18
2 files changed, 6 insertions, 57 deletions
diff --git a/utils/Icons.qml b/utils/Icons.qml
index 2ed9d42..7551eac 100644
--- a/utils/Icons.qml
+++ b/utils/Icons.qml
@@ -6,51 +6,6 @@ import Quickshell.Services.Notifications
Singleton {
id: root
- readonly property var osIcons: ({
- almalinux: "",
- alpine: "",
- arch: "",
- archcraft: "",
- arcolinux: "",
- artix: "",
- centos: "",
- debian: "",
- devuan: "",
- elementary: "",
- endeavouros: "",
- fedora: "",
- freebsd: "",
- garuda: "",
- gentoo: "",
- hyperbola: "",
- kali: "",
- linuxmint: "󰣭",
- mageia: "",
- openmandriva: "",
- manjaro: "",
- neon: "",
- nixos: "",
- opensuse: "",
- suse: "",
- sles: "",
- sles_sap: "",
- "opensuse-tumbleweed": "",
- parrot: "",
- pop: "",
- raspbian: "",
- rhel: "",
- rocky: "",
- slackware: "",
- solus: "",
- steamos: "",
- tails: "",
- trisquel: "",
- ubuntu: "",
- vanilla: "",
- void: "",
- zorin: ""
- })
-
readonly property var weatherIcons: ({
"113": "clear_day",
"116": "partly_cloudy_day",
diff --git a/utils/SysInfo.qml b/utils/SysInfo.qml
index 91ef112..a46bcf4 100644
--- a/utils/SysInfo.qml
+++ b/utils/SysInfo.qml
@@ -11,8 +11,8 @@ Singleton {
property string osPrettyName
property string osId
property list<string> osIdLike
- property string logo
- property string osIcon: ""
+ property string osLogo: `file://${Quickshell.shellDir}/assets/logo.svg`
+ property bool isDefaultLogo: true
property string uptime
readonly property string user: Quickshell.env("USER")
@@ -32,17 +32,11 @@ Singleton {
root.osPrettyName = fd("PRETTY_NAME");
root.osId = fd("ID");
root.osIdLike = fd("ID_LIKE").split(" ");
- root.logo = fd("LOGO");
- const osIcons = Icons.osIcons;
- if (osIcons.hasOwnProperty(root.osId)) {
- root.osIcon = osIcons[root.osId];
- } else {
- for (const id of root.osIdLike) {
- if (osIcons.hasOwnProperty(id)) {
- root.osIcon = osIcons[id];
- }
- }
+ const logo = Quickshell.iconPath(fd("LOGO"), true);
+ if (logo) {
+ root.osLogo = logo;
+ root.isDefaultLogo = false;
}
}
}