From 40c8224f5a4b2850c468194c4af5840d9e667d2b Mon Sep 17 00:00:00 2001 From: notiant <238434866+notiant@users.noreply.github.com> Date: Fri, 13 Feb 2026 08:16:54 +0100 Subject: [PATCH] check for airplane mode on startup --- Services/Networking/BluetoothService.qml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Services/Networking/BluetoothService.qml b/Services/Networking/BluetoothService.qml index 9f76ffd05..1cb1180ac 100644 --- a/Services/Networking/BluetoothService.qml +++ b/Services/Networking/BluetoothService.qml @@ -24,7 +24,7 @@ Singleton { // Power/blocked/availability state property bool ctlAvailable: false readonly property bool bluetoothAvailable: !!adapter || root.ctlAvailable - readonly property bool enabled: (adapter && adapter.enabled) || root.ctlPowered + readonly property bool enabled: adapter?.enabled ?? root.ctlPowered property bool ctlPowered: false property bool ctlDiscovering: false property bool ctlDiscoverable: false @@ -119,7 +119,14 @@ Singleton { Logger.i("Bluetooth", "Service started"); } - Component.onCompleted: pollCtlState() + Component.onCompleted: { + pollCtlState(); + // Ensure Airplane Mode persists upon reboot + if (root.airplaneModeEnabled) { + Quickshell.execDetached(["rfkill", "block", "wifi"]); + Quickshell.execDetached(["rfkill", "block", "bluetooth"]); + } + } // Track adapter state changes Connections {