frobar: Fix empty container name
This commit is contained in:
parent
9adfcd2377
commit
d6e95da9dc
|
@ -42,7 +42,10 @@ class I3WindowTitleProvider(SingleSectionProvider):
|
||||||
# TODO FEAT To make this available from start, we need to find the
|
# TODO FEAT To make this available from start, we need to find the
|
||||||
# `focused=True` element following the `focus` array
|
# `focused=True` element following the `focus` array
|
||||||
def on_window(self, i3: i3ipc.Connection, e: i3ipc.Event) -> None:
|
def on_window(self, i3: i3ipc.Connection, e: i3ipc.Event) -> None:
|
||||||
self.section.setText(clip(e.container.name, 60))
|
if e.container.name is None:
|
||||||
|
self.section.setText(None)
|
||||||
|
else:
|
||||||
|
self.section.setText(clip(e.container.name, 60))
|
||||||
|
|
||||||
async def run(self) -> None:
|
async def run(self) -> None:
|
||||||
await super().run()
|
await super().run()
|
||||||
|
|
Loading…
Reference in a new issue