Aylur / ags

A customizable and extensible shell
GNU General Public License v3.0
1.73k stars 94 forks source link

Example NotificationPopups issue #450

Closed rafaeljacov closed 3 weeks ago

rafaeljacov commented 3 weeks ago

I added the example to my config. but for some reason, when the very first popup is spawned, the default icon is showed even if there is and image associated with the notification, but the issue doesn't persist on the next popups. I used spotify to test this

Aylur commented 3 weeks ago

its an issue with spotify, whenever you start it up, its inital mpris values are empty and so are its notifications if it annoys you you could force it by skipping a song the first time you launch it which will set its values

// you can put this code anywhere
const mpris = await Service.import("mpris")
mpris.connect("player-added", (_, bus) => {
  if (bus.includes("spotify") {
    mpris.getPlayer(bus).next()
    mpris.getPlayer(bus).previous()
  }
})