add bluetooth menu (its fucked my lsp is dying
This commit is contained in:
parent
c0125912b1
commit
45646b6b5e
4 changed files with 122 additions and 10 deletions
|
|
@ -1,29 +1,73 @@
|
|||
pragma ComponentBehavior: Bound
|
||||
|
||||
import qs.config
|
||||
import qs.constants
|
||||
import qs.services
|
||||
import qs.styled
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import Quickshell.Bluetooth
|
||||
import Quickshell.Widgets
|
||||
|
||||
StyledPopupWindow {
|
||||
id: root
|
||||
|
||||
backgroundColor: Theme.palette.base300
|
||||
margins: 8
|
||||
margins: 16
|
||||
radius: 8
|
||||
|
||||
property BluetoothAdapter defaultAdapter: Bluetooth.defaultAdapter
|
||||
|
||||
content: ColumnLayout {
|
||||
spacing: 8
|
||||
WrapperRectangle {
|
||||
margin: 16
|
||||
color: Theme.palette.base200
|
||||
radius: 8
|
||||
Layout.fillWidth: true
|
||||
RowLayout {
|
||||
StyledText {
|
||||
text: "Bluetooth"
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
StyledText {
|
||||
text: root.defaultAdapter.name
|
||||
Switch {
|
||||
checked: Bluetooth.defaultAdapter.enabled
|
||||
onClicked: Bluetooth.defaultAdapter.enabled = checked
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Switch {
|
||||
checked: root.defaultAdapter.enabled
|
||||
onClicked: root.defaultAdapter.enabled = checked
|
||||
WrapperRectangle {
|
||||
margin: 16
|
||||
color: Theme.palette.base200
|
||||
radius: 8
|
||||
ColumnLayout {
|
||||
spacing: 8
|
||||
|
||||
StyledText {
|
||||
font.bold: true
|
||||
text: "Connected Devices"
|
||||
}
|
||||
|
||||
DeviceList {
|
||||
devices: Bluetooth.connectedDevices
|
||||
}
|
||||
|
||||
StyledText {
|
||||
font.bold: true
|
||||
text: "Paired Devices"
|
||||
}
|
||||
|
||||
DeviceList {
|
||||
devices: Bluetooth.pairedDevices
|
||||
}
|
||||
|
||||
StyledText {
|
||||
font.bold: true
|
||||
text: "Available Devices"
|
||||
}
|
||||
|
||||
DeviceList {
|
||||
devices: Bluetooth.availableDevices
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue