diff options
author | cbreton <corentin.breton@fullsave.com> | 2020-01-20 09:48:28 +0100 |
---|---|---|
committer | cbreton <corentin.breton@fullsave.com> | 2020-01-20 09:48:28 +0100 |
commit | cf3ac9d0be7ab698c28605eaacc842716622193e (patch) | |
tree | 78d5115c00ffa3ed27c2b0c93e444072e3121b23 /dotfiles/scripts | |
parent | 6006162771cd2010bfd8eb1cacdfe8800053dea2 (diff) | |
download | dotfiles_dotdrop-cf3ac9d0be7ab698c28605eaacc842716622193e.tar.xz dotfiles_dotdrop-cf3ac9d0be7ab698c28605eaacc842716622193e.zip |
Fix up and down screen rotation
Diffstat (limited to '')
-rwxr-xr-x | dotfiles/scripts/cycle-workspace-multiscreen.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/dotfiles/scripts/cycle-workspace-multiscreen.py b/dotfiles/scripts/cycle-workspace-multiscreen.py index e5e70ef..d1da2d8 100755 --- a/dotfiles/scripts/cycle-workspace-multiscreen.py +++ b/dotfiles/scripts/cycle-workspace-multiscreen.py @@ -44,19 +44,31 @@ if sys.argv[1] == "bottom": output_origin_y = output_origin['rect']['y'] output_origin_height = output_origin['rect']['height'] next_workspace_start = output_origin_y + output_origin_height + output_origin_x = output_origin['rect']['x'] for output in outputs: - if next_workspace_start == output['rect']['y']: + output_end = output['rect']['x'] + output['rect']['width'] + # FIXME: screen must have the same start x position and screen with not + # the same resolution can by buggy + if (next_workspace_start == output['rect']['y'] and + output['rect']['x'] <= output_origin_x <= output_end): output_destination = output + if sys.argv[1] == "top": output_origin_y = output_origin['rect']['y'] output_origin_height = output_origin['rect']['height'] next_workspace_start = output_origin_y - output_origin_height + output_origin_x = output_origin['rect']['x'] for output in outputs: next_workspace_start=output_origin_y - output['rect']['height'] - if next_workspace_start == output['rect']['y']: + output_end = output['rect']['x'] + output['rect']['width'] + # FIXME: screen must have the same start x position and screen with not + # the same resolution can by buggy + if (next_workspace_start == output['rect']['y'] and + output['rect']['x'] <= output_origin_x <= output_end): output_destination = output + if (output_destination != workspace_origin): # Move origin workspace to the correct screen i3.command('move', 'workspace to output '+output_destination['name']) |