diff options
| author | Leander Scherer <leander@schererleander.de> | 2026-05-18 21:48:24 +0200 |
|---|---|---|
| committer | Leander Scherer <leander@schererleander.de> | 2026-05-28 22:42:07 +0200 |
| commit | 9a7cf1242d296dbdb9c03df48ab09054960295aa (patch) | |
| tree | f1a2d5c77ef6bdb049c995afcc4c663c1ffd1373 /modules/system/quickshell/MusicVisualizer.qml | |
| parent | 3ef8b4973bcae26445f99467d50ad75730d204b5 (diff) | |
feat(quickshell): basic bar, tray, notification
Diffstat (limited to 'modules/system/quickshell/MusicVisualizer.qml')
| -rw-r--r-- | modules/system/quickshell/MusicVisualizer.qml | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/modules/system/quickshell/MusicVisualizer.qml b/modules/system/quickshell/MusicVisualizer.qml new file mode 100644 index 0000000..e136304 --- /dev/null +++ b/modules/system/quickshell/MusicVisualizer.qml @@ -0,0 +1,35 @@ +import QtQuick + +// iOS-style animated music visualizer bars. +// Simulates audio reactivity by randomly changing bar heights when active. +Row { + id: root + property bool active: false + property color color: Theme.accent + spacing: 2 + height: 16 + + Repeater { + model: 4 + delegate: Rectangle { + id: bar + width: 3 + height: root.active ? 4 + Math.random() * (root.height - 4) : 4 + radius: 1.5 + color: root.color + + Timer { + running: root.active + interval: 100 + Math.random() * 200 + repeat: true + onTriggered: { + bar.height = 4 + Math.random() * (root.height - 4) + } + } + + Behavior on height { + NumberAnimation { duration: 150; easing.type: Easing.OutCubic } + } + } + } +} |
