import QtQuick import Quickshell.Networking import Quickshell.Bluetooth import qs.config import qs.services import qs.modules.quicksettings Item { id: root readonly property var wifiDevice: { for (const device of Networking.devices.values) { if (device.type === DeviceType.Wifi) return device; } return null; } readonly property var bluetoothAdapter: Bluetooth.defaultAdapter Flickable { anchors.fill: parent clip: true contentWidth: width contentHeight: content.implicitHeight + 64 boundsBehavior: Flickable.StopAtBounds Column { id: content width: parent.width - 68 x: 34 y: 30 spacing: 16 Text { text: "Network & Devices"; color: Theme.fg; font.family: Theme.fontFamily; font.pixelSize: 27; font.weight: Font.DemiBold } Text { text: "Connect graphically—no terminal workflow required."; color: Theme.fgDim; font.family: Theme.fontFamily; font.pixelSize: Theme.fontSize; bottomPadding: 6 } SettingsCard { title: "Wi‑Fi" subtitle: Networking.wifiEnabled ? "Available networks" : "Wireless networking is off" SettingRow { label: "Wi‑Fi" detail: root.wifiDevice ? "Managed by NetworkManager" : "No wireless adapter found" controlWidth: 48 SettingsToggle { anchors.right: parent.right anchors.verticalCenter: parent.verticalCenter checked: Networking.wifiEnabled enabled: Networking.wifiHardwareEnabled onToggled: value => Networking.wifiEnabled = value } } WifiList { width: parent.width; device: root.wifiDevice; active: true; maxHeight: 240 } SettingRow { label: "Advanced network settings" detail: "VPN, wired profiles, DNS, and connection details" divider: false controlWidth: 104 SettingsButton { anchors.right: parent.right; anchors.verticalCenter: parent.verticalCenter; text: "Open panel"; onClicked: SystemSettings.openGnomePanel("network") } } } SettingsCard { title: "Bluetooth" subtitle: root.bluetoothAdapter?.enabled ? "Nearby and paired devices" : "Bluetooth is off" SettingRow { label: "Bluetooth" detail: root.bluetoothAdapter ? "Pair and reconnect without leaving Settings" : "No Bluetooth adapter found" controlWidth: 48 SettingsToggle { anchors.right: parent.right anchors.verticalCenter: parent.verticalCenter checked: root.bluetoothAdapter?.enabled ?? false enabled: root.bluetoothAdapter !== null onToggled: value => { if (root.bluetoothAdapter) root.bluetoothAdapter.enabled = value; } } } BluetoothList { width: parent.width; active: true; maxHeight: 220 } SettingRow { label: "Advanced Bluetooth settings" detail: "Device details and system-level options" divider: false controlWidth: 104 SettingsButton { anchors.right: parent.right; anchors.verticalCenter: parent.verticalCenter; text: "Open panel"; onClicked: SystemSettings.openGnomePanel("bluetooth") } } } } } }