Compare commits
2 changed files with 5 additions and 12 deletions
|
|
@ -19,9 +19,7 @@ Item {
|
||||||
fragmentShader: Quickshell.shellPath("modules/hex_wave.frag.qsb")
|
fragmentShader: Quickshell.shellPath("modules/hex_wave.frag.qsb")
|
||||||
|
|
||||||
property real uSize: 50.0
|
property real uSize: 50.0
|
||||||
// Gaussian tail margin: exp(-m²/40000) < 0.01 at m=500
|
property real uWavePhase: -200
|
||||||
readonly property real _waveMargin: 500
|
|
||||||
property real uWavePhase: -_waveMargin
|
|
||||||
property real uBreath: 0
|
property real uBreath: 0
|
||||||
property real uGlitch: 0
|
property real uGlitch: 0
|
||||||
property real uGlitchSeed: 0.0
|
property real uGlitchSeed: 0.0
|
||||||
|
|
@ -34,7 +32,7 @@ Item {
|
||||||
target: root
|
target: root
|
||||||
function onRunningChanged() {
|
function onRunningChanged() {
|
||||||
if (!root.running) {
|
if (!root.running) {
|
||||||
fx.uWavePhase = -fx._waveMargin;
|
fx.uWavePhase = -200;
|
||||||
fx.uBreath = 0;
|
fx.uBreath = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -45,8 +43,8 @@ Item {
|
||||||
loops: Animation.Infinite
|
loops: Animation.Infinite
|
||||||
running: root.running && !root.reducedMotion
|
running: root.running && !root.reducedMotion
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
from: -fx._waveMargin
|
from: -200
|
||||||
to: fx.width + fx._waveMargin
|
to: fx.width + 200
|
||||||
duration: 6000
|
duration: 6000
|
||||||
easing.type: Easing.InOutSine
|
easing.type: Easing.InOutSine
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -199,8 +199,7 @@ WlSessionLockSurface {
|
||||||
visible: (S.Modules.lock.mpris ?? true) && _mprisPlayer !== null
|
visible: (S.Modules.lock.mpris ?? true) && _mprisPlayer !== null
|
||||||
|
|
||||||
readonly property var _mprisPlayers: (Mpris.players.values ?? []).filter(p => p.trackTitle || p.playbackState === MprisPlaybackState.Playing || p.playbackState === MprisPlaybackState.Paused)
|
readonly property var _mprisPlayers: (Mpris.players.values ?? []).filter(p => p.trackTitle || p.playbackState === MprisPlaybackState.Playing || p.playbackState === MprisPlaybackState.Paused)
|
||||||
property int _playerIdx: 0
|
readonly property var _mprisPlayer: _mprisPlayers[0] ?? null
|
||||||
readonly property var _mprisPlayer: _mprisPlayers[_playerIdx] ?? _mprisPlayers[0] ?? null
|
|
||||||
readonly property bool _playing: _mprisPlayer?.playbackState === MprisPlaybackState.Playing
|
readonly property bool _playing: _mprisPlayer?.playbackState === MprisPlaybackState.Playing
|
||||||
|
|
||||||
C.MprisApplet {
|
C.MprisApplet {
|
||||||
|
|
@ -212,12 +211,8 @@ WlSessionLockSurface {
|
||||||
player: _mprisCard._mprisPlayer
|
player: _mprisCard._mprisPlayer
|
||||||
players: _mprisCard._mprisPlayers
|
players: _mprisCard._mprisPlayers
|
||||||
playing: _mprisCard._playing
|
playing: _mprisCard._playing
|
||||||
playerIdx: _mprisCard._playerIdx
|
|
||||||
accentColor: S.Theme.base0D
|
accentColor: S.Theme.base0D
|
||||||
cachedArt: _mprisCard._mprisPlayer?.trackArtUrl ?? ""
|
cachedArt: _mprisCard._mprisPlayer?.trackArtUrl ?? ""
|
||||||
onPlayerSwitched: idx => {
|
|
||||||
_mprisCard._playerIdx = idx;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Reference in a new issue