hopefully the last complete restructure of this repo
This commit is contained in:
30
home-manager/dotfiles/ags/wifi.js
Executable file
30
home-manager/dotfiles/ags/wifi.js
Executable file
@@ -0,0 +1,30 @@
|
||||
const network = await Service.import('network')
|
||||
|
||||
export default function WifiIndicator() {
|
||||
return Widget.Box({
|
||||
child: Widget.EventBox({
|
||||
child: Widget.Icon({
|
||||
icon: 'network-wireless-disconnected-symbolic',
|
||||
}),
|
||||
|
||||
setup: self => self.hook(network.wifi, () => {
|
||||
self.child.icon = network.wifi.icon_name == 'network-wireless-disabled-symbolic' ? 'network-wireless-disconnected-symbolic' : network.wifi.icon_name
|
||||
self.tooltip_text = network.wifi.ssid ? network.wifi.ssid : network.wifi.internet
|
||||
}),
|
||||
|
||||
tooltip_text: 'disconnected',
|
||||
}),
|
||||
})
|
||||
}
|
||||
|
||||
// const WiredIndicator = () => Widget.Icon({
|
||||
// icon: network.wired.bind('icon_name'),
|
||||
// })
|
||||
|
||||
// const NetworkIndicator = () => Widget.Stack({
|
||||
// children: {
|
||||
// wifi: WifiIndicator(),
|
||||
// wired: WiredIndicator(),
|
||||
// },
|
||||
// shown: network.bind('primary').as(p => p || 'wifi'),
|
||||
// })
|
||||
Reference in New Issue
Block a user