ds4battery
ds4battery copied to clipboard
Disconnecting (DS3) controllers?
In the Bluetooth settings, you can select a controller, and then flip a toggle to disconnect the controller and turn it off:
Would it be possible to integrate such a toggle to the extension?
I’m not familiar with extension development, but I notice it is possible to disconnect a device with
bluetoothctl disconnect <deviceid>
where <deviceid>
can be obtained from bluetoothctl info
but it also seems to match the suffix of the contreller name listed in /sys/class/power_supply
.
Hi! Thanks for pull request, but I think disconnect action on click is not good(maybe create context menu?). Additionally need check connection type: bluetooth or usb.
Indeed, the creation of a context menu is one of the remarks I put in the description of the PR itself. I don't know how to implement it properly though, as I don't have experience with extensions development outside this. It seems the right way would be to create a PanelMenu
, but I'm not sure how to implement that properly in a retro-compatible way for older versions of Gnome – and how to test it. That is, if you still want to maintain compatibility with Gnome 3.30 (almost 3 years old) and older. Do you actually test your extension on those old Gnome versions?
Concerning the connection type, do you have a suggestion on how to check this? For USB, I guess it would be fine to just disable the menu entry since it does not make sense, I think, to provide a disconnect feature for them.