From e8094f5d29a000514d0ca7720052bfedc1e55b7e Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Sat, 18 Jan 2025 20:34:19 +1100 Subject: bar: bluetooth devices --- .../icons/caelestia-bluetooth-device-symbolic.svg | 6 ++ scss/bar.scss | 9 +++ src/modules/bar.tsx | 89 ++++++++++++++-------- 3 files changed, 71 insertions(+), 33 deletions(-) create mode 100644 assets/icons/caelestia-bluetooth-device-symbolic.svg diff --git a/assets/icons/caelestia-bluetooth-device-symbolic.svg b/assets/icons/caelestia-bluetooth-device-symbolic.svg new file mode 100644 index 0000000..86b126f --- /dev/null +++ b/assets/icons/caelestia-bluetooth-device-symbolic.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/scss/bar.scss b/scss/bar.scss index 12c8df3..0ceac94 100644 --- a/scss/bar.scss +++ b/scss/bar.scss @@ -84,6 +84,15 @@ .status-icons { color: scheme.$rosewater; + + .bluetooth { + @include lib.spacing(10); + + // The spacing doesn't look right for some reason so this + & > :first-child:not(:last-child) { + margin-right: lib.s(5); + } + } } .pkg-updates { diff --git a/src/modules/bar.tsx b/src/modules/bar.tsx index 97787fc..fbcfb10 100644 --- a/src/modules/bar.tsx +++ b/src/modules/bar.tsx @@ -324,49 +324,72 @@ const Network = () => ( ); -const Bluetooth = () => ( +const BluetoothDevice = (device: AstalBluetooth.Device) => ( ); +const Bluetooth = () => ( + + + {bind(AstalBluetooth.get_default(), "devices").as(d => d.map(BluetoothDevice))} + +); + const StatusIcons = () => ( -- cgit v1.2.3-freya