diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-01-17 13:51:07 +1100 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-01-17 13:51:07 +1100 |
| commit | 10cb02793a3adac935c6696a7dca2f5a8c6cf9d3 (patch) | |
| tree | 75e7d86ee8d9beb091353a493573f2920004d90a /src/modules/popdowns/bluetoothdevices.tsx | |
| parent | bluetoothdevices: make popup window (diff) | |
| download | caelestia-shell-10cb02793a3adac935c6696a7dca2f5a8c6cf9d3.tar.gz caelestia-shell-10cb02793a3adac935c6696a7dca2f5a8c6cf9d3.tar.bz2 caelestia-shell-10cb02793a3adac935c6696a7dca2f5a8c6cf9d3.zip | |
bluetoothdevices: fallback icon
Diffstat (limited to 'src/modules/popdowns/bluetoothdevices.tsx')
| -rw-r--r-- | src/modules/popdowns/bluetoothdevices.tsx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/modules/popdowns/bluetoothdevices.tsx b/src/modules/popdowns/bluetoothdevices.tsx index f41516a..7ba421c 100644 --- a/src/modules/popdowns/bluetoothdevices.tsx +++ b/src/modules/popdowns/bluetoothdevices.tsx @@ -1,11 +1,16 @@ import { bind, Variable } from "astal"; -import { Gtk } from "astal/gtk3"; +import { Astal, Gtk } from "astal/gtk3"; import AstalBluetooth from "gi://AstalBluetooth"; import PopdownWindow from "../../widgets/popdownwindow"; const BluetoothDevice = (device: AstalBluetooth.Device) => ( <box className="device"> - <icon className="icon" icon={bind(device, "icon").as(i => `${i}-symbolic`)} /> + <icon + className="icon" + icon={bind(device, "icon").as(i => + Astal.Icon.lookup_icon(`${i}-symbolic`) ? `${i}-symbolic` : "bluetooth-symbolic" + )} + /> <label truncate xalign={0} |