move qs config to work on mango and do general improvements
This commit is contained in:
commit
0f8929c55a
30 changed files with 994 additions and 0 deletions
49
modules/bar/Mpris.qml~
Normal file
49
modules/bar/Mpris.qml~
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
pragma ComponentBehavior: Bound
|
||||
import Quickshell.Services.Mpris
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Effects
|
||||
import qs
|
||||
import qs.widgets
|
||||
import qs.settings
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
layer.enabled: true
|
||||
layer.effect: MultiEffect {
|
||||
id: dropShadow
|
||||
source: root
|
||||
shadowEnabled: true
|
||||
shadowHorizontalOffset: 4
|
||||
shadowVerticalOffset: 2
|
||||
shadowOpacity: 0.5
|
||||
shadowColor: "#020202"
|
||||
}
|
||||
required property double moduleHeight
|
||||
implicitHeight: moduleHeight
|
||||
implicitWidth: songLayout.implicitWidth + 32
|
||||
property MprisPlayer spotify: {
|
||||
for (const player of Mpris.players.values) {
|
||||
if (player.identity === "Spotify")
|
||||
return player;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
visible: spotify !== null && spotify.playbackState === MprisPlaybackState.Playing
|
||||
clip: true
|
||||
color: Colors.moduleBg
|
||||
radius: Config.rounding
|
||||
RowLayout {
|
||||
id: songLayout
|
||||
anchors.centerIn: root
|
||||
MaterialIcon {
|
||||
text: "music_note_2"
|
||||
}
|
||||
StyledText {
|
||||
Layout.maximumWidth: 400
|
||||
Layout.maximumHeight: Config.barHeight / 1.6
|
||||
text: root.spotify?.trackTitle + " - " + root.spotify?.trackArtists
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue