Skip to content

feat: add GIF widget, animated album canvas, lyric animations & heavy GPU optimizations - #5

Closed
4sakenme wants to merge 24 commits into
0-ss:mainfrom
4sakenme:feature/custom-widgets
Closed

4sakenme wants to merge 24 commits into
0-ss:mainfrom
4sakenme:feature/custom-widgets

Conversation

@4sakenme

@4sakenme 4sakenme commented Oct 18, 2026 •

Copy link
Copy Markdown

Summary of Changes

This pull request introduces a series of major feature additions, visual refinements, and heavy performance optimizations for MacShell and MacLock, bringing them closer to the sleek aesthetic and smoothness of macOS Tahoe.

⚡ Heavy GPU & CPU Optimizations

  • Desktop Occlusion Awareness: The Animated GIF Widget and heavy background canvas shaders automatically monitor active window coverage. When windows cover the desktop, animations and video playback pause completely, reducing idle GPU and CPU usage to 0%.
  • Streamlined Liquid Glass Multi-Pass Shader:
    • Downsampled blur pre-passes (gl.ds = 0.5) significantly reduce fill-rate pressure on integrated and dedicated GPUs.
    • Settle timers halt continuous re-rendering once windows or positions stabilize, avoiding persistent redraw loops.
    • Proper uniform memory alignment (vec2 itemSize, vec2 glassSize, vec2 srcOffset, gl.padPx) prevents shader fallbacks and ensures hardware-accelerated squircle calculations.
  • Asynchronous, Non-Blocking Daemons:
    • All external data collectors (sysmon_reader.py, stocks_fetcher.py, canvas_fetcher.py, lyrics_fetcher.py) execute asynchronously via StdioCollector. The main QML UI thread never stutters or drops frames during network or disk I/O.
  • Intelligent Caching:
    • Built-in LRU cache pruner prevents disk bloating (max 20 videos / 100 MB for Spotify canvas).
    • Rate-limited market data polling prevents API throttles and excessive network traffic.

🎵 Music, Canvas & Lyric Experience

  1. Animated Spotify Canvas and AppleMusic for MacLock (canvas_fetcher.py):
    • Automatically retrieves official animated Spotify or AppleMusic Canvas videos for currently playing tracks.
    • Seamlessly loops behind the MacLock screen or player surfaces.
    • Automated fallback to high-resolution blurred album art when no canvas video exists.
1.mp4
1792480091.256671share.mp4
  1. Synchronized Lyric Animations (lyrics_fetcher.py):
    • Real-time karaoke-style scrolling lyrics with dynamic typography and smooth kinetic transitions.
    • Focuses cleanly on the active singing line with subtle opacity falloff for upcoming verses.

🖥️ New & Enhanced Desktop Widgets

  1. System Monitor Widget (SystemMonitorWidget.qml & sysmon_reader.py):
    • Styled after macOS Activity Monitor with dual and quad animated circular gauges.
    • Available in Small (2×2 quad circular gauges for CPU, GPU, RAM, Disk), Medium (Dual gauges + Storage bar + GPU/Thermal/Network cards), and Large (comprehensive system dashboard).
image
  1. Stocks & Cryptocurrency Widget (StocksWidget.qml & stocks_fetcher.py):
    • Live market tracking styled after Apple Stocks for cryptocurrencies and equities (BTC, ETH, SOL, AAPL, NVDA, etc.).
    • Interactive sparkline trend graphs with gradient area fills and dynamic green/red change badges.
    • Available across Small, Medium, and Large layouts.
image
  1. Animated GIF / WebP Widget (GifWidget.qml):
    • Display animated GIF/WebP loops on the desktop with Apple rounded corners.
    • Automatically pauses rendering when obscured to preserve battery and GPU cycles.
2aOboR6PdjGzP6JnYtKPE2YEm9GMn624Ptd1slto.mp4

  1. Custom Photo Widget (ImageWidget.qml) & Battery Widget (BatteryWidget.qml).

📐 macOS Sequoia / Tahoe Design Language

  • Canonical Sizing System: Small (168×168), Medium (358×168), and Large (358×354).
  • Squircle Corner Radii: Exactly 28px * scale matching macOS Sonoma / Sequoia widgets.
  • Anti-Clipping Edge Margins: Generous 18px - 20px margins ensure text, buttons, and sparkline curves never clip into curved borders.
  • Clean Localization: 100% English codebase, comments, and UI strings.
image

Verification & Testing

  • Passed qmllint syntax and type checking with 0 errors.
  • Verified on Linux / Hyprland with dual-monitor and single-monitor setups.

@4sakenme 4sakenme changed the title feat(widgets): add System Monitor, Stocks & Crypto, GIF animation widgets, and macOS Sequoia UI improvements feat: add GIF widget, animated album canvas, lyric animations & heavy GPU optimizations Oct 18, 2026
@4sakenme

Copy link
Copy Markdown
Author

yeahhhhhhh bro i am guys gues you image widget on tiktok and i make this pullrequest cause i use have to much lag and miss some i want i share this for everyone here

…ck & port Tahoe features

- MacLock canvas_fetcher: implement tiered animated artwork retrieval:
  1. Local cache lookup (~/.cache/macshell/canvas/)
  2. Spotify Canvas (spclient via Firefox sp_dc or public proxy)
  3. Apple Music Motion Artwork fallback (via iTunes Search API + Apple Music page scraper, downloading H.264 AVC1 SDR video and normalizing timestamps with ffmpeg)
  4. Graceful fallback to static blurred album art background when neither source provides motion artwork
- MacShell ported Tahoe features:
  1. Music widget: organic burn cover transition & spreading album color ripple
  2. App switcher (Alt + Tab): gliding selection pill & morphing application names
  3. Clock application: full macOS Clock suite (World Clock, Alarms, Stopwatch, Timers)
  4. Dynamic Brightness HUD: 360-degree spinning sun with expanding radial rays
  5. AirDrop: LocalSend v2 protocol network sharing (Wi-Fi, Ethernet, Hotspot)
  6. Reminders: standalone app and desktop widget with markdown file sync
…nvas

- Prioritize Apple Music Motion Artwork (1080p AVC1 SDR, desktop aspect ratio) as primary video source
- Query Spotify Canvas only as a secondary fallback if Apple Music provides no motion artwork
- Validate playerctl track matching before using Spotify track IDs
- Recheck cache by track title before generic ID
…etch iPad 3:4 canvas

- MacLock/LockScreen.qml:
  * Fade out center album art (opacity: media.opacity * (1 - artT)) when Apple Music motion artwork is active to keep the animated canvas unobstructed
  * Track canvasSource from fetcher to distinguish Apple Music vs Spotify
  * Add TapHandler to canvas background to allow toggling back to compact mode with one tap
- MacLock/canvas_fetcher.py:
  * Fix regex to reliably capture motionDetailTall (iPad 3:4 aspect ratio, wider & sharper than 9:16 phone canvas)
  * Target ~1440p iPad AVC1 SDR stream for crisp desktop lockscreen playback
… with Lanczos filter

- Automatically scale / crop videos to pixel-perfect 1920x1080 Full HD (16:9) before caching
- Use high-precision Lanczos sinc interpolation + subtle unsharp enhancement to eliminate runtime bilinear blur
- ensure_full_hd: automatically upgrades any previously cached video to 1080p
- Brighten cinematic overlay in LockScreen from 0.32 to 0.20 for vivid clarity
…inks from masking motion artwork

- Clean song title (strip parenthetical feat/remaster/deluxe suffixes) to maximize iTunes search match rate
- Search 'artist + title' first before generic album queries
- Search both default and VN regional storefronts
- Do not let old Spotify symlinks block Apple Music lookup: prioritize Apple Music motion artwork fetch and replace symlinks with pristine Full HD Apple Music files
@4sakenme

Copy link
Copy Markdown
Author

I have update some feature tooo

@4sakenme

Copy link
Copy Markdown
Author

Closing this large PR in favor of 3 smaller, isolated, and modular PRs for easier review and testing:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant