From 99e92def6295c223bd01256a208f7fbfd8232679 Mon Sep 17 00:00:00 2001 From: NeodarZ Date: Mon, 9 Apr 2018 23:17:08 +0200 Subject: Fix dection left and right workspace --- scripts/.scripts/cycle-workspace_more_2.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/.scripts/cycle-workspace_more_2.py b/scripts/.scripts/cycle-workspace_more_2.py index a8a46d1..fd2b13d 100755 --- a/scripts/.scripts/cycle-workspace_more_2.py +++ b/scripts/.scripts/cycle-workspace_more_2.py @@ -27,7 +27,7 @@ if sys.argv[1] == "right": workspace_origin_width = workspace_origin['rect']['width'] next_workspace_start = workspace_origin_x + workspace_origin_width for output in outputs: - if output['rect']['x'] == next_workspace_start: + if next_workspace_start == output['rect']['x']: workspace_destination = output if sys.argv[1] == "left": @@ -35,7 +35,8 @@ if sys.argv[1] == "left": workspace_origin_width = workspace_origin['rect']['width'] next_workspace_start = workspace_origin_x - workspace_origin_width for output in outputs: - if output['rect']['x'] == next_workspace_start: + next_workspace_start = workspace_origin_x - output['rect']['width'] + if next_workspace_start == output['rect']['x']: workspace_destination = output if (workspace_destination != workspace_origin): -- cgit v1.2.1