forked from Shinonome/dots-hyprland
config option to (not) filter duplicate media controls
This commit is contained in:
@@ -198,6 +198,11 @@ Singleton {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
property JsonObject media: JsonObject {
|
||||||
|
// Attempt to remove dupes (the aggregator playerctl one and browsers' native ones when there's plasma browser integration)
|
||||||
|
property bool filterDuplicatePlayers: true
|
||||||
|
}
|
||||||
|
|
||||||
property JsonObject networking: JsonObject {
|
property JsonObject networking: JsonObject {
|
||||||
property string userAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"
|
property string userAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ Scope {
|
|||||||
property real artRounding: Appearance.rounding.verysmall
|
property real artRounding: Appearance.rounding.verysmall
|
||||||
property list<real> visualizerPoints: []
|
property list<real> visualizerPoints: []
|
||||||
|
|
||||||
property bool hasPlasmaIntegration: true
|
property bool hasPlasmaIntegration: false
|
||||||
Process {
|
Process {
|
||||||
id: plasmaIntegrationAvailabilityCheckProc
|
id: plasmaIntegrationAvailabilityCheckProc
|
||||||
running: true
|
running: true
|
||||||
@@ -35,7 +35,9 @@ Scope {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
function isRealPlayer(player) {
|
function isRealPlayer(player) {
|
||||||
// return true
|
if (!Config.options.media.filterDuplicatePlayers) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
// Remove unecessary native buses from browsers if there's plasma integration
|
// Remove unecessary native buses from browsers if there's plasma integration
|
||||||
!(hasPlasmaIntegration && player.dbusName.startsWith('org.mpris.MediaPlayer2.firefox')) &&
|
!(hasPlasmaIntegration && player.dbusName.startsWith('org.mpris.MediaPlayer2.firefox')) &&
|
||||||
|
|||||||
Reference in New Issue
Block a user