109e2968e2
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> |
||
---|---|---|
.. | ||
accessibility.js | ||
bluetooth.js | ||
brightness.js | ||
dwellClick.js | ||
keyboard.js | ||
location.js | ||
network.js | ||
nightLight.js | ||
power.js | ||
powerProfiles.js | ||
remoteAccess.js | ||
rfkill.js | ||
system.js | ||
thunderbolt.js | ||
volume.js |