Compare commits

...
Author SHA1 Message Date
Damocles
a43d0c8dcd fix lock screen media player switching 2026-04-17 23:41:21 +02:00
Damocles
84d1ad1f18 fix hex wave not fully exiting screen before loop restart 2026-04-17 23:34:06 +02:00
2 changed files with 12 additions and 5 deletions

View file

@ -19,7 +19,9 @@ Item {
fragmentShader: Quickshell.shellPath("modules/hex_wave.frag.qsb")
property real uSize: 50.0
property real uWavePhase: -200
// Gaussian tail margin: exp(-m²/40000) < 0.01 at m=500
readonly property real _waveMargin: 500
property real uWavePhase: -_waveMargin
property real uBreath: 0
property real uGlitch: 0
property real uGlitchSeed: 0.0
@ -32,7 +34,7 @@ Item {
target: root
function onRunningChanged() {
if (!root.running) {
fx.uWavePhase = -200;
fx.uWavePhase = -fx._waveMargin;
fx.uBreath = 0;
}
}
@ -43,8 +45,8 @@ Item {
loops: Animation.Infinite
running: root.running && !root.reducedMotion
NumberAnimation {
from: -200
to: fx.width + 200
from: -fx._waveMargin
to: fx.width + fx._waveMargin
duration: 6000
easing.type: Easing.InOutSine
}

View file

@ -199,7 +199,8 @@ WlSessionLockSurface {
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 _mprisPlayer: _mprisPlayers[0] ?? null
property int _playerIdx: 0
readonly property var _mprisPlayer: _mprisPlayers[_playerIdx] ?? _mprisPlayers[0] ?? null
readonly property bool _playing: _mprisPlayer?.playbackState === MprisPlaybackState.Playing
C.MprisApplet {
@ -211,8 +212,12 @@ WlSessionLockSurface {
player: _mprisCard._mprisPlayer
players: _mprisCard._mprisPlayers
playing: _mprisCard._playing
playerIdx: _mprisCard._playerIdx
accentColor: S.Theme.base0D
cachedArt: _mprisCard._mprisPlayer?.trackArtUrl ?? ""
onPlayerSwitched: idx => {
_mprisCard._playerIdx = idx;
}
}
}