feat(mpris): Add comprehensive customization options for MPRIS widget #670
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.
Overview
This PR adds 8 new JSON configuration options to fully customize the MPRIS widget, enabling layouts from ultra-compact (3 buttons only) to complete with all controls.
New Configuration Options
Modified Files
Core Implementation
src/controlCenter/widgets/mpris/mpris.vala: Extended Config struct with 8 new fields and JSON parsing logicsrc/controlCenter/widgets/mpris/mpris_player.vala: Updated methods to respect new configuration flagssrc/configSchema.json: Added 8 new properties with proper validation and defaultsDocumentation
MPRIS-CUSTOMIZATION.md: Complete feature documentation with examplesTESTING-GUIDE.md: Testing guide with multiple configuration presetsmpris-config-example.json: Configuration template filetest-mpris-configs.sh: Interactive testing script with 4 presetsConfiguration Examples
Ultra-Compact Mode
{ "widget-config": { "mpris": { "show-album-art": "never", "show-title": false, "show-subtitle": false, "show-shuffle": false, "show-repeat": false } } }Minimalist Mode
{ "widget-config": { "mpris": { "show-album-art": "when-available", "show-title": true, "show-subtitle": false, "show-shuffle": false, "show-repeat": false } } }Complete Mode
{ "widget-config": { "mpris": { "show-album-art": "always", "show-title": true, "show-subtitle": true, "show-background": true, "show-shuffle": true, "show-repeat": true } } }Testing
Users can test different configurations using the included script:
Backward Compatibility
All changes maintain full backward compatibility. Existing configurations will continue to work with default values applied for new options.
Related Issues
This addresses the need for more flexible MPRIS widget customization, allowing users to optimize their notification center layout based on available screen space and personal preferences.