networks + bluetooth: highlight active

This commit is contained in:
2 * r + 2 * t 2025-01-17 15:01:17 +11:00
parent 1ad972b59b
commit c81616882e
4 changed files with 14 additions and 2 deletions

View file

@ -38,6 +38,10 @@ $-accent: scheme.$rosewater;
background-color: scheme.$surface1;
}
}
&.active {
color: $-accent;
}
}
}
}

View file

@ -38,6 +38,10 @@ $-accent: scheme.$rosewater;
background-color: scheme.$surface1;
}
}
&.active {
color: $-accent;
}
}
}
}

View file

@ -4,7 +4,7 @@ import AstalBluetooth from "gi://AstalBluetooth";
import PopdownWindow from "../../widgets/popdownwindow";
const BluetoothDevice = (device: AstalBluetooth.Device) => (
<box className="device">
<box className={bind(device, "connected").as(c => `device ${c ? "active" : ""}`)}>
<icon
className="icon"
icon={bind(device, "icon").as(i =>

View file

@ -4,7 +4,11 @@ import AstalNetwork from "gi://AstalNetwork";
import PopdownWindow from "../../widgets/popdownwindow";
const Network = (accessPoint: AstalNetwork.AccessPoint) => (
<box className="network">
<box
className={bind(AstalNetwork.get_default().wifi, "activeAccessPoint").as(
a => `network ${a === accessPoint ? "active" : ""}`
)}
>
<icon className="icon" icon={bind(accessPoint, "iconName")} />
<label
truncate