def show(adapter):
                """Function to trigger the adapter submenu."""
                self.show_adapter = True
                self._shown_adapter = adapter
                # Store the current menu position
                self._adapter_index = self._line_index
                # Change menu position to the first item in the submenu
                self._line_index = 0
                self.refresh()
Function to trigger the adapter submenu.
libqtile/widget/bluetooth.py