move Hyprland data initialization to the loop #315

This commit is contained in:
piotr
2024-07-28 01:04:55 +02:00
parent 5ae4d9738b
commit 3a524a278f

View File

@@ -267,14 +267,14 @@ def instantiate_content(panel, container, content_list, icons_path=""):
check_key(panel, "position", "top")
check_key(panel, "items-padding", 0)
# list initial data for Hyprland modules
if his:
if "hyprland-workspaces" in content_list or "hyprland-taskbar" in content_list:
monitors, workspaces, clients, activewindow, activeworkspace = h_modules_get_all()
else:
monitors, workspaces, clients, activewindow, activeworkspace = {}, {}, {}, {}, {}
for item in content_list:
# list initial data for Hyprland modules
if his:
if "hyprland-workspaces" in content_list or "hyprland-taskbar" in content_list:
monitors, workspaces, clients, activewindow, activeworkspace = h_modules_get_all()
else:
monitors, workspaces, clients, activewindow, activeworkspace = {}, {}, {}, {}, {}
if item == "sway-taskbar":
if "sway-taskbar" in panel:
if sway: