diff --git a/desktopenvs/hyprlua/astal-menu/modules/bluetooth.py b/desktopenvs/hyprlua/astal-menu/modules/bluetooth.py index 3736c9c..b7d8f3b 100644 --- a/desktopenvs/hyprlua/astal-menu/modules/bluetooth.py +++ b/desktopenvs/hyprlua/astal-menu/modules/bluetooth.py @@ -15,6 +15,7 @@ import gi gi.require_version("Gtk", "4.0") from gi.repository import Gtk # noqa: E402 +from lib.proc import run_text from module_base import Feature, ModuleContext, ModuleInstance, ModuleSpec from paths import CACHE_DIR @@ -83,8 +84,15 @@ class _BluetoothView(Gtk.Box): def _on_power(self, _sw, value: bool) -> bool: ad = self._adapter() - if ad: - ad.set_powered(value) + if value: + # The adapter is frequently rfkill soft-blocked at boot; while blocked, + # AstalBluetooth.set_powered(True) is a silent no-op. Unblock first, then + # power on (bluez usually auto-powers on unblock, so set_powered is a + # belt-and-suspenders follow-up). + run_text(["rfkill", "unblock", "bluetooth"], + lambda *_a: ad.set_powered(True) if ad else None) + elif ad: + ad.set_powered(False) return False def _on_scan(self, btn: Gtk.ToggleButton) -> None: diff --git a/desktopenvs/hyprlua/astal-menu/style/style.css b/desktopenvs/hyprlua/astal-menu/style/style.css index 74ef87e..0d17849 100644 --- a/desktopenvs/hyprlua/astal-menu/style/style.css +++ b/desktopenvs/hyprlua/astal-menu/style/style.css @@ -45,16 +45,16 @@ drawingarea { .quad-card { min-height: 190px; } .section-title { color: @text; font-weight: bold; opacity: 0.85; } +/* The single module border + background is drawn with Cairo by bordered(fill_bg=True) + * (see lib/border.py); the CSS border/background here would render a second, + * concentric ring now that the app stylesheet sits above the theme, so only keep + * the inner content padding. */ .quad-card, .quad-expanded, .appdrawer, .taskbar, .favorites { - background: @bg; - border: 3px solid @accent; - border-radius: 18px; padding: 12px 14px; - margin: 3px; /* keep the border off the grid/overlay clip edge */ } .quad-header,