This commit is contained in:
Damocles 2026-04-12 22:48:04 +02:00
parent 0eeaa6a04e
commit 974613d811
3 changed files with 12 additions and 17 deletions

View file

@ -143,7 +143,9 @@ PanelWindow {
visible: M.Modules.windowTitle.enable visible: M.Modules.windowTitle.enable
} }
} }
Item { Layout.fillWidth: true } Item {
Layout.fillWidth: true
}
} }
// ---- right ---- // ---- right ----

View file

@ -11,16 +11,12 @@ Item {
// Auto-compute border color from top gradient position (base0C base09) // Auto-compute border color from top gradient position (base0C base09)
readonly property real _posFrac: { readonly property real _posFrac: {
const scr = QsWindow.window?.screen; const scr = QsWindow.window?.screen;
if (!scr) return 0.5; if (!scr)
return 0.5;
const gx = mapToGlobal(width / 2, 0).x - scr.x; const gx = mapToGlobal(width / 2, 0).x - scr.x;
return Math.max(0, Math.min(1, gx / scr.width)); return Math.max(0, Math.min(1, gx / scr.width));
} }
property color borderColor: Qt.rgba( property color borderColor: Qt.rgba(M.Theme.base0C.r + (M.Theme.base09.r - M.Theme.base0C.r) * _posFrac, M.Theme.base0C.g + (M.Theme.base09.g - M.Theme.base0C.g) * _posFrac, M.Theme.base0C.b + (M.Theme.base09.b - M.Theme.base0C.b) * _posFrac, 1)
M.Theme.base0C.r + (M.Theme.base09.r - M.Theme.base0C.r) * _posFrac,
M.Theme.base0C.g + (M.Theme.base09.g - M.Theme.base0C.g) * _posFrac,
M.Theme.base0C.b + (M.Theme.base09.b - M.Theme.base0C.b) * _posFrac,
1
)
visible: row.visibleChildren.length > 0 visible: row.visibleChildren.length > 0

View file

@ -39,14 +39,7 @@ M.BarSection {
Process { Process {
id: cavaProc id: cavaProc
running: root.playing running: root.playing
command: ["sh", "-c", command: ["sh", "-c", "cfg=$(mktemp /tmp/nova-cava-XXXXXX.conf);" + "cat > \"$cfg\" << 'CAVAEOF'\n" + "[general]\nbars=16\nframerate=30\n[output]\nmethod=raw\nraw_target=/dev/stdout\ndata_format=ascii\nascii_max_range=100\n" + "CAVAEOF\n" + "trap 'rm -f \"$cfg\"' EXIT;" + "exec cava -p \"$cfg\""]
"cfg=$(mktemp /tmp/nova-cava-XXXXXX.conf);" +
"cat > \"$cfg\" << 'CAVAEOF'\n" +
"[general]\nbars=16\nframerate=30\n[output]\nmethod=raw\nraw_target=/dev/stdout\ndata_format=ascii\nascii_max_range=100\n" +
"CAVAEOF\n" +
"trap 'rm -f \"$cfg\"' EXIT;" +
"exec cava -p \"$cfg\""
]
stdout: SplitParser { stdout: SplitParser {
splitMarker: "\n" splitMarker: "\n"
onRead: line => { onRead: line => {
@ -250,7 +243,11 @@ M.BarSection {
color: M.Theme.base0E color: M.Theme.base0E
radius: 1 radius: 1
Behavior on height { NumberAnimation { duration: 50 } } Behavior on height {
NumberAnimation {
duration: 50
}
}
} }
} }
} }