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

Qt: Container expansion

parent 96ef7c82
Branches
No related tags found
No related merge requests found
...@@ -111,6 +111,7 @@ c<id>... - select container/window/workspace and ... ...@@ -111,6 +111,7 @@ c<id>... - select container/window/workspace and ...
a - set workspace as active a - set workspace as active
qy - quit window or all windows in container/workspace qy - quit window or all windows in container/workspace
kY - xkill window or all windows in container/workspace kY - xkill window or all windows in container/workspace
e - expand container to parent container
Shortcuts in search bar (input mode): Shortcuts in search bar (input mode):
......
...@@ -420,6 +420,18 @@ def qt_main(): ...@@ -420,6 +420,18 @@ def qt_main():
for i in self.nodes: for i in self.nodes:
i.quit_windows(*arg, **kvarg) i.quit_windows(*arg, **kvarg)
def expand(self):
if isinstance(self.parentWidget(), I3InnerNodeWidget):
self.workspace_widget.screenshot_changed()
tmp_win = TmpWin()
shared.i3_cmd(f'[con_id={self.container_id}] swap container with id {tmp_win.id}')
marks = []
for (i, it) in enumerate(self.nodes):
shared.i3_cmd(f'[con_id={it.container_id}] mark tmp_from_{i}')
marks.append(f"tmp_from_{i}")
shared.i3_cmd(f'[id={tmp_win.id}] mark tmp')
shared.i3_cmd(f'[con_mark="{"|".join(marks)}"] move container to mark tmp')
def redraw(self): def redraw(self):
p = QPalette() p = QPalette()
...@@ -1170,6 +1182,9 @@ def qt_main(): ...@@ -1170,6 +1182,9 @@ def qt_main():
nd.change_layout("tabbed") nd.change_layout("tabbed")
elif type(nd) == I3InnerNodeWidget and mod == 0 and key == ord('S'): elif type(nd) == I3InnerNodeWidget and mod == 0 and key == ord('S'):
nd.change_layout("stacked") nd.change_layout("stacked")
elif type(nd) == I3InnerNodeWidget and mod == 0 and key == ord('E'):
nd.expand()
self.load_i3_tree()
elif type(nd) == I3InnerNodeWidget and mod == 0 and key == ord('F'): elif type(nd) == I3InnerNodeWidget and mod == 0 and key == ord('F'):
nd.focus() nd.focus()
elif mod == 0 and key == ord('A'): elif mod == 0 and key == ord('A'):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment