extract constants

This commit is contained in:
Damocles 2026-04-12 10:57:48 +02:00
parent bc3a85d18d
commit b969f0824f
22 changed files with 106 additions and 63 deletions

View file

@ -4,11 +4,14 @@ import "." as M
M.BarSection {
id: root
spacing: 4
spacing: M.Theme.moduleSpacing
tooltip: {
if (root.state === "wifi") return "WiFi: " + root.essid + (root.ifname ? "\nInterface: " + root.ifname : "");
if (root.state === "eth") return "Ethernet: " + root.ifname;
if (root.state === "linked") return "Linked: " + root.ifname;
if (root.state === "wifi")
return "WiFi: " + root.essid + (root.ifname ? "\nInterface: " + root.ifname : "");
if (root.state === "eth")
return "Ethernet: " + root.ifname;
if (root.state === "linked")
return "Linked: " + root.ifname;
return "Disconnected";
}
@ -50,9 +53,12 @@ M.BarSection {
M.BarIcon {
icon: {
if (root.state === "wifi") return "\uF1EB";
if (root.state === "eth") return "\uDB80\uDE00";
if (root.state === "linked") return "\uDB85\uDE16";
if (root.state === "wifi")
return "\uF1EB";
if (root.state === "eth")
return "\uDB80\uDE00";
if (root.state === "linked")
return "\uDB85\uDE16";
return "\uDB82\uDCFD";
}
anchors.verticalCenter: parent.verticalCenter