Files
glassMxrph/quickshell/settings/pages/Bluetooth.qml
T
mxandClaude Opus 5.5 99e64a7713 Add glassMxrph shell sources
Initial commit of the Quickshell desktop suite: bar, dock, launcher,
settings, Control Center, dashboard, OSD, lock screen, desktop widgets,
plugin host with the vendored Noctalia/Omarchy compatibility layer,
helpers, packaging, tests and phase documentation.

Includes the optimization work so far: usage widgets and dashboard
gauges no longer animate continuously, desktop widgets pause while
covered, system controls stop flickering on background polls, dock app
matching uses an indexed catalog, and workspace ghosts are created only
for occupied slots.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 22:36:17 +02:00

77 lines
2.8 KiB
QML

pragma ComponentBehavior: Bound
import QtQuick
import QtQuick.Layouts
import Quickshell.Bluetooth
import "../controls"
import "../../components"
import "../../services"
SettingsPage {
SettingsSection {
SettingRow {
title: "Bluetooth"
description: BluetoothService.adapter ? BluetoothService.summary : "No Bluetooth adapter"
icon: "󰂯"
GlassToggle {
checked: BluetoothService.enabled
enabled: !!BluetoothService.adapter && BluetoothService.adapter.state !== BluetoothAdapterState.Blocked
onClicked: {
BluetoothService.toggle();
checked = Qt.binding(() => BluetoothService.enabled);
}
Accessible.name: "Bluetooth power"
}
}
SettingRow {
title: "Adapter"
icon: "󰂰"
GlassComboBox {
Layout.preferredWidth: 240
model: BluetoothService.adapters.map(a => a.name)
currentIndex: BluetoothService.adapters.indexOf(BluetoothService.adapter)
enabled: BluetoothService.adapters.length > 0
onActivated: BluetoothService.adapterId = BluetoothService.adapters[currentIndex].adapterId
}
}
SettingRow {
title: "Pairing"
description: "Pairing and PIN confirmation use the existing Bluetooth manager. Paired devices can connect here."
icon: "󰒓"
GlassButton {
text: "Pair devices…"
enabled: !SystemService.acting
onClicked: SystemService.action("manager", "bluetooth", false)
}
}
}
SettingsSection {
title: "Devices"
visible: devices.count > 0
Repeater {
id: devices
model: BluetoothService.devices.filter(d => d.paired)
SettingRow {
id: entry
required property var modelData
title: modelData.name
description: BluetoothDeviceState.toString(modelData.state) + (modelData.batteryAvailable ? " · " + Math.round(modelData.battery * 100) + "%" : "")
icon: modelData.connected ? "󰂱" : "󰂯"
GlassButton {
text: entry.modelData.connected ? "Disconnect" : "Connect"
accented: !entry.modelData.connected
enabled: BluetoothService.enabled && !BluetoothService.pending
onClicked: BluetoothService.connectDevice(entry.modelData)
}
}
}
}
SettingNote {
warning: true
text: BluetoothService.error
}
SettingNote {
warning: true
text: SystemService.error
}
}