Skip to content

feat: allow blacklisting of MPRIS players#1139

Open
Times-Z wants to merge 3 commits intoJas-SinghFSU:masterfrom
Times-Z:master
Open

feat: allow blacklisting of MPRIS players#1139
Times-Z wants to merge 3 commits intoJas-SinghFSU:masterfrom
Times-Z:master

Conversation

@Times-Z
Copy link

@Times-Z Times-Z commented Nov 27, 2025

This PR adds the ability to ignore unwanted MPRIS players and set a preferred default player, similar to the existing ignored applications feature for notifications

Features Added

1. Ignore MPRIS Players

  • Added ignore configuration option to filter out unwanted MPRIS clients
  • Players in the ignore list are:
    • Hidden from the media controls UI
    • Skipped when cycling through players with next/previous buttons
    • Never set as the active player
    • Automatically filtered when switching players
image

2. Preferred Player

  • Added preferredPlayer configuration option to set a default MPRIS player
  • When available, the preferred player will:
    • Automatically become active on startup
    • Take priority when connecting (even if another player is active)
    • Use case-insensitive partial matching for flexibility

3. CLI Tool for Discovery

  • Added hyprpanel mprisPlayers (alias: mpl) command
  • Lists all detected MPRIS players with their identity names and bus names
  • Helps users identify which names to use in the ignore/preferred lists
image

Comment on lines 5 to 21
/**
* Gets the desktop entry name from an MPRIS player.
*
* The desktop entry typically contains the actual application name,
* which is more reliable than the bus name for Electron apps.
*
* @param player The MPRIS player.
*
* @returns The desktop entry name or empty string.
*/
const getDesktopEntry = (player: AstalMpris.Player): string => {
try {
return player.entry || '';
} catch {
return '';
}
};
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to be unused, can we remove?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, my bad test that I doens't remove

@Jas-SinghFSU
Copy link
Owner

Looks good outside of the comment above and the linter failures.

lika85456 added a commit to lika85456/HyprPanel that referenced this pull request Feb 3, 2026
Also add the ability to set one of them as the default value when available
@Times-Z
Copy link
Author

Times-Z commented Feb 13, 2026

Any news ?

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.

2 participants