diff options
author | cbreton <corentin.breton@fullsave.com> | 2020-01-20 09:55:28 +0100 |
---|---|---|
committer | cbreton <corentin.breton@fullsave.com> | 2020-01-20 09:55:28 +0100 |
commit | acec98e1e4b1f5790820e64fc01f1b6fe2d028a0 (patch) | |
tree | 198320e93a12fa2b23d9d03333675ba906ec388f /dotfiles | |
parent | cf3ac9d0be7ab698c28605eaacc842716622193e (diff) | |
download | dotfiles_dotdrop-acec98e1e4b1f5790820e64fc01f1b6fe2d028a0.tar.xz dotfiles_dotdrop-acec98e1e4b1f5790820e64fc01f1b6fe2d028a0.zip |
Fix codingstyle
Diffstat (limited to '')
-rwxr-xr-x | dotfiles/scripts/cycle-workspace-multiscreen.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/dotfiles/scripts/cycle-workspace-multiscreen.py b/dotfiles/scripts/cycle-workspace-multiscreen.py index d1da2d8..5e3d32a 100755 --- a/dotfiles/scripts/cycle-workspace-multiscreen.py +++ b/dotfiles/scripts/cycle-workspace-multiscreen.py @@ -19,7 +19,7 @@ output_origin = "" for output in outputs: if output['current_workspace'] == workspace_origin['name']: - output_origin = output + output_origin = output output_destination = workspace_origin @@ -60,7 +60,7 @@ if sys.argv[1] == "top": 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'] + next_workspace_start = output_origin_y - output['rect']['height'] 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 @@ -70,17 +70,22 @@ if sys.argv[1] == "top": if (output_destination != workspace_origin): + wrksp_orig = workspace_origin['name'] + wkrsp_dest = output_destination['current_workspace'] # Move origin workspace to the correct screen i3.command('move', 'workspace to output '+output_destination['name']) # Rename origin workspace to temporary workspace of the screen destination - i3.command('rename', 'workspace '+str(workspace_origin['name'])+' to a_fucking_workspace') + cmd = f"workspace {wrksp_orig} to a_fucking_workspace" + i3.command('rename', cmd) # Change focus to the workspace destination i3.workspace(output_destination['current_workspace']) # Move destination workspace to the correct screen i3.command('move', 'workspace to output '+workspace_origin['output']) # Rename workspace destination to the origin workspace - i3.command('rename', 'workspace '+output_destination['current_workspace']+' to '+str(workspace_origin['name'])) + cmd = f"workspace {wkrsp_dest} to {wrksp_orig}" + i3.command('rename', cmd) # Rename temporary workspace to workspace destination - i3.command('rename', 'workspace a_fucking_workspace to '+output_destination['current_workspace']) + cmd = f"workspace a_fucking_workspace to {wkrsp_dest}" + i3.command('rename', cmd) # Change focus the workspace destination i3.workspace(output_destination['current_workspace']) |