end-4 / dots-hyprland

i hate minimalism so...
https://end-4.github.io/dots-hyprland-wiki/en/
GNU General Public License v3.0
3.94k stars 267 forks source link

[Issue] Mpd control window #566

Closed EvanSunde closed 3 months ago

EvanSunde commented 4 months ago

(com.github.Aylur.ags:348121): Gjs-Console-WARNING **: 01:26:19.351: Error: can't assign "music player daemon" as icon, it is not a file nor a named icon
set icon@resource:///com/github/Aylur/ags/widgets/icon.js:45:30
AppVolume/setup/<@file:///home/evan/.config/ags/modules/sideright/centermodules/audiocontrols.js:18:52
hook/id<@resource:///com/github/Aylur/ags/widgets/widget.js:36:21
changed@resource:///com/github/Aylur/ags/service.js:53:14
setStream/this._ids</<@resource:///com/github/Aylur/ags/service/audio.js:45:22
_init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:266:34

end-4 commented 4 months ago

it's an mpris widtget not mpd widget there's mpd-mpris which sounds like something that would help

EvanSunde commented 4 months ago

I do have that installed image

EvanSunde commented 4 months ago

mpd control are working and music names are also shown but there is no control window when i click on it

EvanSunde commented 4 months ago

Tried using mpris2 and still no window control for mpd, but there was notification everytime next music played in mpris2.

also it seems 2 of the system monitor are hidden when mpris detect any music player

when no music playing image

when any music starts playing image

EvanSunde commented 3 months ago

in .config/ags/modules/indicators/musiccontrol.js

function isRealPlayer(player) { return ( // Remove unecessary native buses from browsers if there's plasma integration !(hasPlasmaIntegration && player.busName.startsWith('org.mpris.MediaPlayer2.firefox')) && !(hasPlasmaIntegration && player.busName.startsWith('org.mpris.MediaPlayer2.chromium')) && // playerctld just copies other buses and we don't need duplicates !player.busName.startsWith('org.mpris.MediaPlayer2.playerctld') // && // Non-instance mpd bus // !player.busName.endsWith('.mpd') ); }

commenting

!player.busName.endsWith('.mpd')

solved the problem

dont forget to remove the && before that.

for what this caused it seems when you run mpd-mpris from systemctl it will return as in dbus

org.mpris.MediaPlayer2.mpd

which caused it to not show it that why there was no window control popup

end-4 commented 3 months ago

i can't remember why i had that there, but i guess i'll remove that

end-4 commented 3 months ago

hmmm will it work if you change that line to this

!(player.busName.endsWith('.mpd') && !player.busName.endsWith('MediaPlayer2.mpd'))
EvanSunde commented 3 months ago

yes it does work with that