added quickshell config

This commit is contained in:
2026-08-24 10:03:59 +01:00
parent 866ee0bb9b
commit c4b4a3bd26
14 changed files with 573 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
import QtQuick
import Quickshell.Bluetooth
import "../../config"
Item {
id: root
implicitWidth: label.implicitWidth + 4
implicitHeight: Appearance.barHeight
readonly property var adapter: Bluetooth.defaultAdapter
readonly property bool anyConnected: {
if (!adapter) return false
const devices = adapter.devices.values
for (let i = 0; i < devices.length; i++) {
if (devices[i].connected) return true
}
return false
}
Text {
id: label
anchors.centerIn: parent
font.family: Appearance.iconFontFamily
font.variableAxes: Appearance.iconFontAxes
font.pixelSize: 16
color: (root.adapter && root.adapter.enabled) ? Colors.foreground : Colors.muted
text: {
if (!root.adapter || !root.adapter.enabled) return "bluetooth_disabled"
return root.anyConnected ? "bluetooth_connected" : "bluetooth"
}
}
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onClicked: if (root.adapter) root.adapter.enabled = !root.adapter.enabled
}
}