From 47f86342ae06f83ed7d2f733c7d50335e9d78f95 Mon Sep 17 00:00:00 2001 From: elParaguayo Date: Mon, 12 Aug 2024 21:19:42 +0100 Subject: [PATCH] [StatusNotifier] fix recursive icon search Tried to be too cute with previous code. Where there's no IconThemePath, we got an empty `Path` object which is equivalent to `Path('.')` meaning that we'd always do a recursive search on the current folder. This PR fixes that by only creating a `Path` object if there is a theme path. Fixes #4959 --- libqtile/widget/helpers/status_notifier/statusnotifier.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libqtile/widget/helpers/status_notifier/statusnotifier.py b/libqtile/widget/helpers/status_notifier/statusnotifier.py index 40fbca98a4..2e21ac61d3 100644 --- a/libqtile/widget/helpers/status_notifier/statusnotifier.py +++ b/libqtile/widget/helpers/status_notifier/statusnotifier.py @@ -243,12 +243,12 @@ async def _get_local_icon(self, fallback=True): return try: - icon_path = Path(await self.item.get_icon_theme_path()) + icon_path = await self.item.get_icon_theme_path() except (AttributeError, DBusError): icon_path = None if icon_path: - self.icon = self._get_custom_icon(icon_name, icon_path) + self.icon = self._get_custom_icon(icon_name, Path(icon_path)) if not self.icon: self.icon = self._get_xdg_icon(icon_name)