summaryrefslogtreecommitdiff
path: root/.config/quickshell/Bar.qml
diff options
context:
space:
mode:
Diffstat (limited to '.config/quickshell/Bar.qml')
-rw-r--r--.config/quickshell/Bar.qml25
1 files changed, 19 insertions, 6 deletions
diff --git a/.config/quickshell/Bar.qml b/.config/quickshell/Bar.qml
index b7ec963..02b8781 100644
--- a/.config/quickshell/Bar.qml
+++ b/.config/quickshell/Bar.qml
@@ -1,5 +1,4 @@
import Quickshell
-import Quickshell.Io
import QtQuick
import QtQuick.Layouts
@@ -98,7 +97,13 @@ Variants {
Text {
id: song
anchors.centerIn: parent
- text: Song.artist + " - " + Song.title
+ text: {
+ var text = Song.artist + " – " + Song.title
+ if (text.length > 60) {
+ text = text.substring(0, 60) + "…"
+ }
+ return text
+ }
color: Flexoki.tx
font { family: root.fontFamily; pixelSize: root.fontSize }
}
@@ -121,14 +126,22 @@ Variants {
spacing: 2
Repeater {
- model: 8
+ model: Cava.heights
delegate: Rectangle {
- y: 15 - Cava.heights[index]
+ required property int modelData
+ y: 15 - modelData
width: 8
- height: Cava.heights[index] + 4
+ height: modelData + 4
radius: 4
color: Flexoki.tx
+
+ Behavior on height {
+ NumberAnimation { duration: 1000 / 30; easing.type: Easing.Linear }
+ }
+ Behavior on y {
+ NumberAnimation { duration: 1000 / 30; easing.type: Easing.Linear }
+ }
}
}
}
@@ -200,7 +213,7 @@ Variants {
}
Text {
- text: " " + Time.time
+ text: " " + Qt.formatDateTime(Time.time, "MMM d hh:mm:ss")
color: Flexoki.bl
font { family: root.fontFamily; pixelSize: root.fontSize }
}