From 6b323fc06ec255153e86eafa4dffa67ad8c21f8c Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Mon, 9 Nov 2026 20:31:56 +0100 Subject: feat: Windows tab shows all workspaces and icon-only launchers --- tests/test_windows.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tests/test_windows.py') diff --git a/tests/test_windows.py b/tests/test_windows.py index 6aa7925..ca9be71 100644 --- a/tests/test_windows.py +++ b/tests/test_windows.py @@ -28,6 +28,21 @@ class Commands(unittest.TestCase): st = windows._state(lambda cmd: responses[tuple(cmd)]) self.assertEqual(st["workspaces"], [1, 2, 5]) + def test_state_includes_empty_workspaces_and_launch_icons(self): + responses = { + ("hyprctl", "clients", "-j"): "[]", + ("hyprctl", "activewindow", "-j"): "{}", + ("hyprctl", "workspaces", "-j"): '[{"id": 3}]', + } + m = windows.make({ + "windows": {"workspaces": [1, 2, 3, 4]}, + "launch": {"obs": {"icon": "obsstudio", "command": "obs"}}, + "run": lambda cmd: responses[tuple(cmd)], + }) + st = m.state() + self.assertEqual(st["workspaces"], [1, 2, 3, 4]) + self.assertEqual(st["launches"], [{"key": "obs", "icon": "obsstudio", "label": "obs"}]) + if __name__ == "__main__": unittest.main() -- cgit v1.2.3