From 5f131f958f9328e985a31a3656fa9c474d757524 Mon Sep 17 00:00:00 2001
From: Jiri Kalvoda <jirikalvoda@kam.mff.cuni.cz>
Date: Mon, 29 Aug 2022 21:47:56 +0200
Subject: [PATCH] swap-with-workspace: Move parsing workspace (and send
 notification) after condition

---
 woman/main_functions.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/woman/main_functions.py b/woman/main_functions.py
index c291b60..39885af 100644
--- a/woman/main_functions.py
+++ b/woman/main_functions.py
@@ -113,10 +113,9 @@ def mf_goto_workspace(params):
 
 @main_function(["swap-with-workspace", "s"], std_parser, "Swap current workspace with specified workspace.")
 def mf_swap_with_workspace(params):
-    n_master, n_slave = params_workspace(params)
     current = shared.workspace_on[shared.output]
-    print(current)
     if current != (None, None) and current != GUI_WORKSPACE:
+        n_master, n_slave = params_workspace(params)
         swap_workspace(n_master, n_slave, *current)
 
 @main_function(["gui"], [], "Show grafic user interface (only if you start daemon with `-g` option).")
-- 
GitLab