Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Maxime Bombar
Config_Files
Commits
64198b20
Commit
64198b20
authored
Aug 30, 2020
by
Maxime Bombar
Browse files
[i3] Slide workspaces on a torus.
parent
8f85d537
Changes
1
Hide whitespace changes
Inline
Side-by-side
.config/i3/bin/slide_workspace.py
View file @
64198b20
...
...
@@ -86,10 +86,10 @@ def slide_workspace(i3, workspace, output, direction):
owmap
=
output_workspace_mapping
(
i3
)
workspaces
=
owmap
.
get
(
output
)
pos
=
workspaces
.
index
(
workspace
)
if
direction
==
"right"
and
pos
!=
len
(
workspaces
)
-
1
:
if
direction
==
"right"
:
logger
.
debug
(
f
"Slide workspace
\"
{
workspace
}
\"
to the right."
)
nextworkspace
=
workspaces
[
pos
+
1
]
elif
direction
==
"left"
and
pos
!=
0
:
nextworkspace
=
workspaces
[
(
pos
+
1
)
%
len
(
workspaces
)
]
elif
direction
==
"left"
:
logger
.
debug
(
f
"Slide workspace
\"
{
workspace
}
\"
to the left."
)
nextworkspace
=
workspaces
[
pos
-
1
]
else
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment