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

View File

@ -23,7 +23,7 @@ window#waybar {
/* Modules */ /* 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; padding: 0 10px;
margin: 0px 5px; margin: 0px 5px;
background: #fbf1c7; background: #fbf1c7;

View File

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