diff --git a/woman/help.py b/woman/help.py index 91ce06f4d9117ffdc9f66f61adb481bad57097d0..b52b05b5fe711ec61ac81c4fa8e4fe5efcca02bb 100644 --- a/woman/help.py +++ b/woman/help.py @@ -111,6 +111,7 @@ c<id>... - select container/window/workspace and ... a - set workspace as active qy - quit 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): diff --git a/woman/qt.py b/woman/qt.py index bcaca54e3e6cd173967b9e3bead80d55ffebd67c..0e63b298f587fb3930674c1c97f42b1556e5804b 100755 --- a/woman/qt.py +++ b/woman/qt.py @@ -420,6 +420,18 @@ def qt_main(): for i in self.nodes: 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): p = QPalette() @@ -1170,6 +1182,9 @@ def qt_main(): nd.change_layout("tabbed") elif type(nd) == I3InnerNodeWidget and mod == 0 and key == ord('S'): 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'): nd.focus() elif mod == 0 and key == ord('A'):