mirror of
https://github.com/zoriya/flake.git
synced 2026-08-15 18:43:42 +00:00
Fix wifi indicator not updating
This commit is contained in:
@@ -4,18 +4,10 @@ const network = await Service.import("network");
|
||||
|
||||
/** @param {import("../types/widgets/icon.js").IconProps} props*/
|
||||
export const Indicator = (props) =>
|
||||
Widget.Stack({
|
||||
children: {
|
||||
wifi: Widget.Icon({
|
||||
icon: network.wifi.bind("icon_name"),
|
||||
...props,
|
||||
}),
|
||||
wired: Widget.Icon({
|
||||
icon: network.wired.bind("icon_name"),
|
||||
...props,
|
||||
}),
|
||||
},
|
||||
shown: network.bind("primary").as((p) => p || "wifi"),
|
||||
Widget.Icon(props).hook(network, (self) => {
|
||||
self.icon =
|
||||
network[network.primary || "wifi"].icon_name ??
|
||||
"network-wireless-offline-symbolic";
|
||||
});
|
||||
|
||||
/** @param {import("../types/widgets/label.js").LabelProps} props */
|
||||
|
||||
Reference in New Issue
Block a user