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/bluetoothdevices.tsx | 98 -------------------------------
1 file changed, 98 deletions(-)
delete mode 100644 src/modules/popdowns/bluetoothdevices.tsx
(limited to 'src/modules/popdowns/bluetoothdevices.tsx')
diff --git a/src/modules/popdowns/bluetoothdevices.tsx b/src/modules/popdowns/bluetoothdevices.tsx
deleted file mode 100644
index c71d981..0000000
--- a/src/modules/popdowns/bluetoothdevices.tsx
+++ /dev/null
@@ -1,98 +0,0 @@
-import { bind, Variable } from "astal";
-import { Astal, Gtk } from "astal/gtk3";
-import AstalBluetooth from "gi://AstalBluetooth";
-import PopdownWindow from "../../widgets/popdownwindow";
-
-const BluetoothDevice = (device: AstalBluetooth.Device) => (
- `device ${c ? "active" : ""}`)}>
-
- Astal.Icon.lookup_icon(`${i}-symbolic`) ? `${i}-symbolic` : "bluetooth-symbolic"
- )}
- />
-
-);
-
-const List = () => (
-
- {bind(AstalBluetooth.get_default(), "devices").as(d => d.map(BluetoothDevice))}
-
-);
-
-export default () => {
- const bluetooth = AstalBluetooth.get_default();
- const label = Variable("");
-
- const update = () => {
- const devices = bluetooth.get_devices();
- const connected = devices.filter(d => d.connected).length;
- label.set(`${connected} connected device${connected === 1 ? "" : "s"} (${devices.length} available)`);
- };
- bluetooth.get_devices().forEach(d => d.connect("notify::connected", update));
- bluetooth.connect("device-added", (_, device) => device.connect("notify::connected", update));
- bluetooth.connect("notify::devices", update);
- update();
-
- return (
- n.length)}
- countLabel={bind(label)}
- headerButtons={[
- {
- label: bind(bluetooth, "isPowered").as(p => (p ? "Disable" : "Enable")),
- onClicked: () => bluetooth.toggle(),
- },
- {
- label: "Discovery",
- onClicked: () => {
- if (bluetooth.adapter.discovering) bluetooth.adapter.start_discovery();
- else bluetooth.adapter.stop_discovery();
- },
- enabled: bind(bluetooth.adapter, "discovering"),
- },
- ]}
- emptyIcon="bluetooth_disabled"
- emptyLabel="No Bluetooth devices"
- list={
}
- />
- );
-};
--
cgit v1.2.3-freya