From e9eba2e2914e6c9aa01dd3d6267c969bcba3bb2f Mon Sep 17 00:00:00 2001
From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>
Date: Wed, 2 Apr 2025 15:06:27 +1100
Subject: cleanup: remove popdown stuff
Popdowns were replaced with the sidebar
---
src/modules/popdowns/networks.tsx | 101 --------------------------------------
1 file changed, 101 deletions(-)
delete mode 100644 src/modules/popdowns/networks.tsx
(limited to 'src/modules/popdowns/networks.tsx')
diff --git a/src/modules/popdowns/networks.tsx b/src/modules/popdowns/networks.tsx
deleted file mode 100644
index 726f1c9..0000000
--- a/src/modules/popdowns/networks.tsx
+++ /dev/null
@@ -1,101 +0,0 @@
-import { bind, execAsync, Variable } from "astal";
-import { Gtk } from "astal/gtk3";
-import AstalNetwork from "gi://AstalNetwork";
-import PopdownWindow from "../../widgets/popdownwindow";
-
-const Network = (accessPoint: AstalNetwork.AccessPoint) => (
- `network ${a === accessPoint ? "active" : ""}`
- )}
- >
-
-
-);
-
-const List = () => {
- const { wifi } = AstalNetwork.get_default();
- const children = Variable.derive([bind(wifi, "accessPoints"), bind(wifi, "activeAccessPoint")], (aps, ac) =>
- aps
- .filter(a => a.ssid)
- .sort((a, b) => (a === ac ? -1 : b.strength - a.strength))
- .map(Network)
- );
-
- return (
- children.drop()}>
- {bind(children)}
-
- );
-};
-
-export default () => {
- const network = AstalNetwork.get_default();
- const label = Variable("");
-
- const update = () => {
- if (network.primary === AstalNetwork.Primary.WIFI) label.set(network.wifi.ssid ?? "Disconnected");
- else if (network.primary === AstalNetwork.Primary.WIRED) label.set(`Ethernet (${network.wired.speed})`);
- else label.set("No Wifi");
- };
- network.connect("notify::primary", update);
- network.get_wifi()?.connect("notify::ssid", update);
- network.get_wired()?.connect("notify::speed", update);
- update();
-
- return (
- a.length)}
- countLabel={bind(label)}
- headerButtons={[
- {
- label: bind(network.wifi, "enabled").as(e => (e ? "Disable" : "Enable")),
- onClicked: () => (network.wifi.enabled = !network.wifi.enabled),
- },
- {
- label: bind(network.wifi, "scanning").as(s => (s ? "Scanning" : "Scan")),
- onClicked: () => network.wifi.scan(),
- enabled: bind(network.wifi, "scanning"),
- },
- ]}
- emptyIcon="wifi_off"
- emptyLabel={bind(network.wifi, "enabled").as(p => (p ? "No available networks" : "Wifi is off"))}
- list={
}
- />
- );
-};
--
cgit v1.2.3-freya