aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz.net>2018-04-10 10:22:19 +0200
committerneodarz <neodarz@neodarz.net>2018-04-10 10:22:19 +0200
commit73afc1a4a599165fdee9455d5848c2b1ba32440e (patch)
tree241aa3884c98eabb21d1867f3a58cfe5986f3486 /scripts
parent6f302a317ab66d31bf970681ea1e43199038a629 (diff)
downloaddotfiles_ascii-73afc1a4a599165fdee9455d5848c2b1ba32440e.tar.xz
dotfiles_ascii-73afc1a4a599165fdee9455d5848c2b1ba32440e.zip
Remove stupide code and had abitlity to have more than 3 display with my display configuration
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'])