mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
feat(bluetooth): auto-connect paired & trusted devices with toggle control
Adds automatic reconnection of paired and trusted Bluetooth devices when Bluetooth is enabled or when the shell starts. The feature is fully toggleable ON/OFF from three places: - Settings > Connections > Bluetooth (persistent NToggle) - Bluetooth Panel quick toggle (NIconButton in header) - IPC commands: toggleAutoConnect, enableAutoConnect, disableAutoConnect Changes: - New setting: bluetoothAutoConnect (default: true) - Auto-trust devices upon pairing via Instantiator/Connections watcher - 2s delay after BT enable to allow adapter initialization - Respects airplane mode - Toast notification when auto-connect fires
This commit is contained in:
@@ -606,6 +606,15 @@ Singleton {
|
||||
bluetoothPanel?.toggle(null, "Bluetooth");
|
||||
});
|
||||
}
|
||||
function toggleAutoConnect() {
|
||||
Settings.data.network.bluetoothAutoConnect = !Settings.data.network.bluetoothAutoConnect;
|
||||
}
|
||||
function enableAutoConnect() {
|
||||
Settings.data.network.bluetoothAutoConnect = true;
|
||||
}
|
||||
function disableAutoConnect() {
|
||||
Settings.data.network.bluetoothAutoConnect = false;
|
||||
}
|
||||
}
|
||||
|
||||
IpcHandler {
|
||||
|
||||
Reference in New Issue
Block a user