ags(bar/status, control-center/tiles): hide bluetooth when no adapter found

This commit is contained in:
retrozinndev
2025-05-13 15:09:34 -03:00
parent 36d65e58ea
commit 028244adaa
3 changed files with 20 additions and 5 deletions
@@ -7,6 +7,7 @@ import { TilesPages } from "../Tiles";
export const TileBluetooth = Tile({
title: "Bluetooth",
visible: bind(AstalBluetooth.get_default(), "adapter").as(Boolean),
description: bind(AstalBluetooth.get_default(), "isConnected").as((connected) => {
const connectedDev = AstalBluetooth.get_default().devices.filter(dev => dev.connected)?.[0];
return connected && connectedDev ? connectedDev.get_alias() : ""