neovim is superior btw!; also attempted to explain my rice
This commit is contained in:
@@ -1,20 +1,31 @@
|
||||
import Quickshell // for PanelWindow
|
||||
import QtQuick // for Text
|
||||
import QtQuick.Controls
|
||||
import Quickshell.Services.Mpris
|
||||
|
||||
PanelWindow {
|
||||
anchors {
|
||||
top: true
|
||||
left: true
|
||||
right: true
|
||||
}
|
||||
anchors {
|
||||
top: true
|
||||
left: true
|
||||
right: true
|
||||
}
|
||||
|
||||
implicitHeight: 30
|
||||
implicitHeight: 30
|
||||
|
||||
Text {
|
||||
// center the bar in its parent component (the window)
|
||||
anchors.centerIn: parent
|
||||
Text {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: Mpris.nowPlaying ? `Now Playing: ${Mpris.nowPlaying.title} - ${Mpris.nowPlaying.artist}` : "No music playing"
|
||||
Connections {
|
||||
target: Mpris
|
||||
onNowPlayingChanged: text = Mpris.nowPlaying ? `Now Playing: ${Mpris.nowPlaying.title} - ${Mpris.nowPlaying.artist}` : "No music playing"
|
||||
}
|
||||
}
|
||||
|
||||
text: "hello world"
|
||||
}
|
||||
Button {
|
||||
text: "aaa"
|
||||
onClicked: ()=>{
|
||||
console.log(JSON.stringify(Mpris.players.values.map(a=>`${a.trackArtist} - ${a.trackTitle}`),undefined,"\t"))
|
||||
console.log(MprisPlaybackState)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user