Skip to content
Snippets Groups Projects
Commit ee26f7f3 authored by Jiří Kalvoda's avatar Jiří Kalvoda
Browse files

Qt: Swap and move workspace by keyboard

parent 60079193
No related branches found
No related tags found
No related merge requests found
......@@ -112,6 +112,9 @@ c<id>... - select container/window/workspace and ...
qy - quit window or all windows in container/workspace
kY - xkill window or all windows in container/workspace
e - expand container to parent container
s<id/workspace> - swap current workspace with window/container/workspace
d<workspace> - move current workspace to workspace
d<id><key> - move current workspace near to container (see `m`)
Shortcuts in search bar (input mode):
......
......@@ -1266,6 +1266,19 @@ def qt_main():
raise NoSutchKey(key, mod)
else:
raise NoSutchKey(key, mod)
elif mod == 0 and key == ord('S'):
nd_from = self.focused_widget
with nd_from.marked_context(QColor(255, 0, 0)):
nd_to = await get_container_or_workspace()
if isinstance(nd_to, WorkspaceWidget):
nd_to.swap_with_workspace(nd_from.master, nd_from.slave)
else:
nd_from.move(nd_to, swap=True)
self.load_i3_tree()
elif mod == 0 and key == ord('D'):
nd_from = self.focused_widget
with nd_from.marked_context(QColor(255, 0, 0)):
await ck_move(nd_from)
elif mod == 0 and key == ord('R'): # Undocumented
for i in self._workspaces.values():
i.metadata_changed()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment