On my system (Linux Mint 21, i3-gaps 4.21), using the playerctl.hide config option would lead to random failures:
widget sometimes not properly updating
long running (multiple seconds) calls to playerctl showing up in top marked as put to sleep
exceptions in .xsession-errors like such:
[2023-03-15 15:01:55,837] playerctl ERROR playerctl metadata -f '{{artist}} - {{title}} {{duration(position)}}/{{duration(mpris:length)}}' exited with code 1
Traceback (most recent call last):
File "/home/user/.local/lib/python3.10/site-packages/bumblebee_status/modules/contrib/playerctl.py", line 127, in __get_song
return str(util.cli.execute(self.__cmd + "metadata -f '" + self.__format + "'")).strip()
File "/home/user/.local/lib/python3.10/site-packages/bumblebee_status/util/cli.py", line 61, in execute
raise RuntimeError(err)
RuntimeError: playerctl metadata -f '{{artist}} - {{title}} {{duration(position)}}/{{duration(mpris:length)}}' exited with code 1
Removing an additional unnecessary subprocess call to playerctl from the hidden() method fixes this completely. It is anyway sufficient to check whether the widget should be hidden at update time.
Hi,
On my system (Linux Mint 21, i3-gaps 4.21), using the
playerctl.hide
config option would lead to random failures:playerctl
showing up intop
marked as put to sleep.xsession-errors
like such:Removing an additional unnecessary subprocess call to
playerctl
from thehidden()
method fixes this completely. It is anyway sufficient to check whether the widget should be hidden at update time.