aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xscripts/.scripts/cycle-workspace_more_2.py16
1 files changed, 2 insertions, 14 deletions
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'])