gnome-shell/js/ui/status
Jonas Dreßler 109e2968e2 status/bluetooth: Use BlueZ state to determine whether bluetooth is on
There's two ways bluetooth can be powered off/on for us: One way is to
go via airplane mode (which uses rfkill), and the second way is to tell
BlueZ to turn off the device. Now rfkill always has the final say on
whether bluetooth is off, BlueZ OTOH has the final say on whether
bluetooth is on.

This means when we want to know whether bluetooth is turned on, we only
have to ask BlueZ, so simply read this._client.default_adapter_powered
for that.

For turning bluetooth on or off we use rfkill, but when turning it on,
make sure it's turned on in Bluez, too.

FTR, this is exactly the same way the Bluetooth panel in Settings
handles this.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2188>
2022-02-18 19:10:18 +00:00
..
accessibility.js js: Use templates for non-translatable strings 2022-02-12 12:29:52 +00:00
bluetooth.js status/bluetooth: Use BlueZ state to determine whether bluetooth is on 2022-02-18 19:10:18 +00:00
brightness.js status: Pass scroll events to volume and brightness sliders 2020-05-18 11:30:28 +00:00
dwellClick.js js: Use templates for non-translatable strings 2022-02-12 12:29:52 +00:00
keyboard.js js: Use templates for non-translatable strings 2022-02-12 12:29:52 +00:00
location.js js: Use templates for non-translatable strings 2022-02-12 12:29:52 +00:00
network.js js: Use templates for non-translatable strings 2022-02-12 12:29:52 +00:00
nightLight.js js: Use Gjs GTypeName computation for all classes 2019-10-29 18:38:35 +00:00
power.js js: Use templates for non-translatable strings 2022-02-12 12:29:52 +00:00
powerProfiles.js powerProfiles: Remove support for power-profiles-daemon < 0.9.0 2022-02-08 11:21:44 +00:00
remoteAccess.js status/remote-access: Don't show recording icon for screenshot UI casts 2022-02-12 14:36:54 +00:00
rfkill.js rfkill: Always sync state on construction 2020-08-02 19:57:11 +00:00
system.js ui: Rename gnome-control-center to org.gnome.Settings 2022-01-21 10:44:37 -03:00
thunderbolt.js js: Use templates for non-translatable strings 2022-02-12 12:29:52 +00:00
volume.js js: Use templates for non-translatable strings 2022-02-12 12:29:52 +00:00