working mpris and bluetooth menu

This commit is contained in:
2026-06-26 17:34:25 +01:00
parent 2b49211315
commit 07ec781b68
12 changed files with 708 additions and 13 deletions

72
Bar/Right/Bluetooth.qml Normal file
View File

@@ -0,0 +1,72 @@
pragma ComponentBehavior: Bound
import QtQuick
import Quickshell
import Quickshell.Bluetooth
import "../../Color.js" as Colors
import "../../Components/"
import "../../Services/"
import "Bluetooth"
Container {
id: root
animOffset: 200
boxColor: Colors.peach
boxHeight: 25
boxWidth: 30
defaultItem: icon
exclusiveToScreen: true
forceHidden: BluetoothManager.getConnected()
state: ""
states: [
State {
name: ""
PropertyChanges {
root.boxHeight: 25
root.boxWidth: 30
}
StateChangeScript {
script: {
root.stack.replace(icon);
}
}
},
State {
name: "expanded"
PropertyChanges {
root.boxHeight: 250
root.boxRadius: 20
root.boxWidth: 350
}
StateChangeScript {
script: {
root.stack.replace(expanded);
}
}
}
]
hover.onHoveredChanged: hover.hovered == false ? state = "" : undefined
tap.onTapped: state = "expanded"
Component {
id: icon
Item {
CenteredText {
text: "󰂱"
}
}
}
Component {
id: expanded
Expanded {}
}
}