C++ / fmt (pull_request) Failing after 4s
C++ / build (pull_request) Failing after 13s
C++ / clang-tidy (pull_request) Failing after 18s
JS/TS / fmt (pull_request) Successful in 6s
JS/TS / lint (pull_request) Successful in 8s
Python / static (pull_request) Successful in 24s
Rust / build (pull_request) Successful in 54s
Rust / fmt (pull_request) Successful in 32s
Python / verify (pull_request) Successful in 1m45s
Rust / clippy (pull_request) Successful in 46s
43 lines
1022 B
QML
43 lines
1022 B
QML
import QtQuick
|
|
import Quickshell
|
|
|
|
ShaderEffect {
|
|
id: root
|
|
|
|
property Item target: parent
|
|
|
|
property real glowSize: 40
|
|
property real innerGlow: 0
|
|
property real lineWidth: 2
|
|
property real intensity: 1.0
|
|
property real speed: 1.0
|
|
property int period: 6000
|
|
property bool running: true
|
|
|
|
property color color1: "#4285F4"
|
|
property color color2: "#9B72CB"
|
|
property color color3: "#D96570"
|
|
property color color4: "#F2A54A"
|
|
|
|
readonly property size itemSize: Qt.size(width, height)
|
|
readonly property size rectSize: target ? Qt.size(target.width, target.height) : Qt.size(0, 0)
|
|
readonly property real radius: (target as Rectangle).radius ?? 0
|
|
property real phase: 0
|
|
|
|
anchors.fill: target
|
|
anchors.margins: -glowSize
|
|
z: -1
|
|
|
|
enabled: false
|
|
|
|
fragmentShader: Qt.resolvedUrl(`${Quickshell.shellDir}/assets/shaders/geminiglow.frag.qsb`)
|
|
|
|
FrameAnimation {
|
|
running: root.running && root.visible
|
|
onTriggered: {
|
|
const dt = frameTime * 1000;
|
|
root.phase = (root.phase + dt * root.speed / root.period) % 1.0;
|
|
}
|
|
}
|
|
}
|