fix(spotify-lyrics): add background service and state fallback - #511
Open
goatnath wants to merge 30 commits into
Open
fix(spotify-lyrics): add background service and state fallback#511goatnath wants to merge 30 commits into
goatnath wants to merge 30 commits into
Conversation
…update README requirements
This reverts commit ef91e6f.
…rapping height prediction
…dimension animations
…base Root cause: the charUnits per-character width estimation consistently underestimated real rendered widths because the 0.80 multipliers in getLineWidth and getLinesCount cancelled each other out, making the effective calculation ignore the safety margin entirely. Fix: replaced the complex charUnits/toChars/getLineWidth machinery with a simple #text / chars-per-line heuristic using a conservative 0.60x character width factor. This reliably overestimates line count, ensuring the panel always allocates enough height for wrapped text. Quality of life improvements: - Split monolithic render() into renderEmpty/renderPaused/renderPlaying - Reduced update interval from 33ms (30 FPS) to 100ms (10 FPS) - Removed file-read timer (reads every frame at lower FPS instead) - Added clear section headers and inline documentation - Removed all dead code (charUnits, toChars, getLineWidth, etc.)
… fix The root cause of the lyrics spilling was never in the Lua code. Noctalia panels are sized exclusively by plugin.toml, not by minHeight on the column layout. Since we had removed width/height from plugin.toml to make sizing 'dynamic', noctalia used a tiny default that couldn't contain wrapped lyrics. minHeight on ui.column had zero effect on the actual panel window size. Set height=280 to comfortably fit 3 lyrics lines even when they wrap.
Long lyrics (>40 chars) now get progressively smaller fonts: - Every 15 chars beyond 40 reduces font by 2px - Minimum font: 10px (panel) / 11px (widget) This prevents vertical overflow regardless of container size by ensuring long lines take up less vertical space when they wrap.
- Updated bar.luau to toggle correct panel ID - Replaced ~ in noctalia.readFile with absolute path since Lua doesn't auto-expand it - Updated plugin.toml height to 280 and id to noctalia/spotify-lyrics
- Change plugin id from noctalia/ to goatnath/ namespace - Declare runtime dependencies: playerctl, python3, syncedlyrics - Replace hardcoded /home/goatnath path with noctalia.expandPath() - Add [[desktop_widget]] manifest entry for widget.luau - Rewrite README to follow README_TEMPLATE.md structure - Update all references to use corrected plugin id
fallback, and fix ui overflow
- Add [[service]] entry with service.luau to publish state
independently of bar widget
- Add direct disk state fallback in panel.luau, widget.luau, and bar.
luau
- Remove unsupported overflow property from ui.column
- Enhance playerctl player detection and position parsing in daemon
- Bump version to 1.2.1
Fixes noctalia-dev#486
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Plugin
goatnath/spotify-lyricsplugin.toml)What it does
Fixes an issue where lyrics would not display in the panel/widget when the bar widget was not placed on the bar (Fixes #486).
Key changes:
[[service]](service.luau) that starts automatically with Noctalia to bridge daemon state intonoctalia.stateregardless of bar configuration.panel.luau,widget.luau, andbar.luau.overflowprop onui.columnto silence UI tree warnings.spotify_lyrics_daemon.py.External dependencies
Requires
playerctl,python3, andsyncedlyrics.Testing
Screenshots / Videos
N/A (Bugfix / headless service update)
Checklist
idafter the/inplugin.tomlexactly.plugin.toml,README.md,thumbnail.webp, andtranslations/en.json.README.mdfollows the README template, documents every entry id and dependency, and includes exact panel IPC commands and launcher prefixes where applicable.thumbnail.webpwith the thumbnail generator.versionfollows semver and is bumped in this PR;plugin_apiis the oldest API level this plugin requires.catalog.toml; CI generates it.Code review attestation
licensedeclared inplugin.toml.