aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/i3blocks
diff options
context:
space:
mode:
Diffstat (limited to 'i3blocks')
-rwxr-xr-xi3blocks/.local/lib/i3blocks/i3blocks-mpris6
1 files changed, 2 insertions, 4 deletions
diff --git a/i3blocks/.local/lib/i3blocks/i3blocks-mpris b/i3blocks/.local/lib/i3blocks/i3blocks-mpris
index b32cff5..18fafc1 100755
--- a/i3blocks/.local/lib/i3blocks/i3blocks-mpris
+++ b/i3blocks/.local/lib/i3blocks/i3blocks-mpris
@@ -64,6 +64,7 @@ class Printer:
self.bus_name = bus_name
self.updated = asyncio.Event()
self.title = None
+ self.title_iter = ""
self.mpris = None
self.player = None
self.playerctl = None
@@ -115,7 +116,7 @@ class Printer:
self.width += len(f" {Printer.ICONS["icon"]} ")
self.sections[self.width] = Section.ICON
- title = self.properties.get("Metadata", {}).get("xesam:title")
+ title = self.properties.get("Metadata", {}).get("xesam:title", "")
if title != self.title:
self.title = title
self.title_iter = self.title + " "
@@ -161,9 +162,6 @@ class Printer:
self.print()
async def handle_button(self, data) -> bool:
- with open("/tmp/mpris.json", "w") as f:
- f.write(json.dumps(data))
-
match data:
case {"button": b, "relative_x": x, "width": w}:
button = b