mihirlad55 / polybar-spotify-module

A collection of lightweight programs for use with a Polybar Spotify Module
GNU General Public License v3.0
140 stars 9 forks source link

Stopped working on Polybar latest update #26

Closed jpmvferreira closed 2 years ago

jpmvferreira commented 2 years ago

I am unable to figure out what's going on, as the daemon is running and spotifyctl is giving the correct output, yet, for some reason, Polybar is showing blank everywhere.

Here's the relevant portion of the Polybar configuration file:

(...)

modules-left = left1 playpause spotify left2

(...)

;; SPOTIFY
[module/playpause]
type = custom/ipc
format-font = 2
format-underline = #1db954
format-background = ${color.shade2}
; Default
hook-0 = echo "  No Song is Playing"
; Playing
hook-1 = echo ""
; Paused
hook-2 = echo ""
click-left = "spotifyctl -q playpause"

[module/spotify]
type = custom/ipc
format-underline = #1db954
format-background = ${color.shade2}
; Default
hook-0 = echo ""
; Playing/paused
hook-1 = spotifyctl -q status

And here's the output when running Polybar on the terminal:

$ polybar
notice: Parsing config file: /home/undercover/.config/polybar/config.ini
notice: Listening for IPC messages (PID: 5499)
warn: The config parameter 'settings.throttle-input-for' is deprecated, it will be removed in the future. Please remove it from your config
warn: The config parameter 'settings.throttle-output' is deprecated, it will be removed in the future. Please remove it from your config
warn: The config parameter 'settings.throttle-output-for' is deprecated, it will be removed in the future. Please remove it from your config
notice: Loading module 'left1' of type 'custom/text'
notice: Loading module 'playpause' of type 'custom/ipc'
notice: Loading module 'spotify' of type 'custom/ipc'
notice: Loading module 'left2' of type 'custom/text'
notice: Loading module 'workspaces' of type 'internal/xworkspaces'
notice: Loading module 'right5' of type 'custom/text'
notice: Loading module 'pulseaudio' of type 'internal/pulseaudio'
notice: pulseaudio: using default sink alsa_output.pci-0000_00_1f.3.analog-stereo
notice: Loading module 'right4' of type 'custom/text'
notice: Loading module 'battery' of type 'internal/battery'
notice: Loading module 'right3' of type 'custom/text'
notice: Loading module 'backlight' of type 'internal/backlight'
notice: Loading module 'right2' of type 'custom/text'
notice: Loading module 'network' of type 'internal/network'
notice: Loading module 'right1' of type 'custom/text'
notice: Loading module 'date' of type 'internal/date'
notice: Loaded 15 modules
notice: Loaded font "Roboto Mono:size=8" (name=Noto Sans, offset=2, file=/usr/share/fonts/noto/NotoSans-Regular.ttf)
notice: Loaded font "Siji:size=12" (name=Siji, offset=2, file=/usr/share/fonts/misc/siji.bdf)
notice: Loaded font "Iosevka Nerd Font:style=Medium:size=16" (name=Iosevka, offset=3, file=/usr/share/fonts/TTF/Iosevka Medium Nerd Font Complete.ttf)
notice: Loaded font "Font Awesome 6 Free:size=14" (name=Font Awesome 6 Free, offset=2, file=/usr/share/fonts/TTF/fa-regular-400.ttf)
error: tray: Failed to put tray above 0x1400001 in the stack (XCB_MATCH (8))

As you can see, everything seems to be alright.

Any tips or ideas on how to proceed the debugging? Seems to me that I'm missing something quite obvious since it's working on one side and not on the other, yet, I have changed nothing during the update.

sTiKyt commented 2 years ago

Can confirm same happened for me, updated polybar and my spotify module went blank

FryDay commented 2 years ago

@mihirlad55 Any insight on this? The module seems completely borked since the last polybar update.

mihirlad55 commented 2 years ago

I'm sorry guys, I had gotten very busy with school. I'm graduated now, so I should be able to find some time to work on this very soon. I might even have some time today.

hongyi2006 commented 2 years ago

@mihirlad55 any update?

FryDay commented 2 years ago

I've opened a PR to fix this. Turns out it was a spotify change, not a polybar one.

mihirlad55 commented 2 years ago

See commit 2d331d5aba16cd7a6a536f73510b191a72a8a2bd and other and the linked PR above. Thanks to @FryDay for most of the fix. Just so you guys have a mostly functioning module, I've merged the changes with master and updated the AUR package.

There is still a slight problem that needs to be addressed related to the changes spotify made that I described in PR #28 so that the play/pause button is updated when the song is playing/paused. Besides that minor issue, the module should function as it did before with the latest version of polybar and spotify.

znoble360 commented 2 years ago

I updated to the latest AUR package and the current track shows up now, but my controls (play/pause, next, previous) aren't showing up. Is that expected with the problem with the play/pause issue?

jpmvferreira commented 2 years ago

For me, it's always showing the play button, regardless of whether it's being played or paused.

FryDay commented 2 years ago

I took a shot at fixing the play/pause issue in PR #29.

znoble360 commented 2 years ago

Well that's weird, it's working with the controls now without change

mihirlad55 commented 2 years ago

Thanks to @FryDay for his PR which fixed this issue. PR has been merged in and AUR has also been updated.