Fix wrong spotify player

This commit is contained in:
Simponic 2022-10-26 00:13:57 -06:00
parent 4a0079654f
commit 864e005dba
3 changed files with 4 additions and 3 deletions

View File

@ -25,7 +25,7 @@
"format": " {temperatureC}°C "
},
"custom/spotify": {
"exec": "/home/logan/scripts/mediaplayer.py --player spotify --period 1 --width 18",
"exec": "/home/logan/scripts/mediaplayer.py --player spotifyd",
"format": "{} ",
"return-type": "json",
"on-click": "playerctl play-pause",

View File

@ -23,7 +23,7 @@ window#waybar {
/* Modules */
#clock, #battery, #cpu, #memory, #disk, #temperature, #backlight, #network, #pulseaudio, #custom-media, #custom-launcher, #custom-power, #tray, #mode, #idle_inhibitor , #mpd, .custom-spotify {
#clock, #battery, #cpu, #memory, #disk, #temperature, #backlight, #network, #pulseaudio, #custom-media, #custom-launcher, #custom-power, #tray, #mode, #idle_inhibitor , #mpd, .custom-spotifyd {
padding: 0 10px;
margin: 0px 5px;
background: #fbf1c7;

View File

@ -36,7 +36,8 @@ def print_every_second(width, period=1):
print_thread.start()
cache["i"] += 1
cache["text"] = wrap_text(cache["formattedText"], width, cache["i"])
if "formattedText" in cache:
cache["text"] = wrap_text(cache["formattedText"], width, cache["i"])
print_from_cache()