From 59fb8e4c884742e7347708a684393813d452b6fa Mon Sep 17 00:00:00 2001 From: Midgard <2885-Midgard@users.noreply.framagit.org> Date: Wed, 28 Sep 2022 10:39:10 +0200 Subject: [PATCH] [yambar] Put eDP-1 always first --- yambar/sway.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yambar/sway.py b/yambar/sway.py index 5ba4b0f..9fdd164 100755 --- a/yambar/sway.py +++ b/yambar/sway.py @@ -50,7 +50,10 @@ def subscribe(types: List[str]): def format_workspaces(workspaces): result = [] last_output = None - for i, ws in enumerate(sorted(workspaces, key=lambda x: (x["output"], x["num"], x["name"]))): + for i, ws in enumerate(sorted( + workspaces, + key=lambda x: ("" if x["output"] == "eDP-1" else x["output"], x["num"], x["name"]) + )): name = ws["name"] new_monitor = last_output is not None and last_output != ws["output"]