From 73afc1a4a599165fdee9455d5848c2b1ba32440e Mon Sep 17 00:00:00 2001 From: neodarz Date: Tue, 10 Apr 2018 10:22:19 +0200 Subject: Remove stupide code and had abitlity to have more than 3 display with my display configuration --- scripts/.scripts/cycle-workspace_more_2.py | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'scripts/.scripts') diff --git a/scripts/.scripts/cycle-workspace_more_2.py b/scripts/.scripts/cycle-workspace_more_2.py index 0977b5f..a599249 100755 --- a/scripts/.scripts/cycle-workspace_more_2.py +++ b/scripts/.scripts/cycle-workspace_more_2.py @@ -16,15 +16,6 @@ for output in outputs: if output['current_workspace'] == workspace_origin['name']: output_origin = output -def rename(origin, destination): - if destination >= 1 and destination <= 10: - workspace_destination="10" - elif destination >= 11 and destination <= 20: - workspace_destination="20" - elif destination >= 21 and destination <= 30: - workspace_destination="30" - return workspace_destination - output_destination = workspace_origin if sys.argv[1] == "right": @@ -62,13 +53,10 @@ if sys.argv[1] == "top": output_destination = output if (output_destination != workspace_origin): - # Because workspace name are fixed to screen, just rename workspace can change workspace to another screen. - # Get temprory workspace of the screen destination (10, 20 or 30) - workspace_number_destination = rename(workspace_origin['name'], int(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 '+workspace_number_destination) + i3.command('rename', 'workspace '+str(workspace_origin['name'])+' to a_fucking_workspace') # Change focus to the workspace destination i3.workspace(output_destination['current_workspace']) # Move destination workspace to the correct screen @@ -76,6 +64,6 @@ if (output_destination != workspace_origin): # Rename workspace destination to the origin workspace i3.command('rename', 'workspace '+output_destination['current_workspace']+' to '+str(workspace_origin['name'])) # Rename temporary workspace to workspace destination - i3.command('rename', 'workspace '+workspace_number_destination+' to '+output_destination['current_workspace']) + i3.command('rename', 'workspace a_fucking_workspace to '+output_destination['current_workspace']) # Change focus the workspace destination i3.workspace(output_destination['current_workspace']) -- cgit v1.2.1