diff --git a/woman/help.py b/woman/help.py index 592901981875630c2c1e1b4fb60c7a27376ccd63..b561e0020ec78d44b7089fc4ea3e277c1342d521 100644 --- a/woman/help.py +++ b/woman/help.py @@ -47,6 +47,7 @@ Window information (I3 container tree) is loaded on each jump to GUI (by `i3-wom or on key `T` press. When you click on a workspace, you will be moved to it. +On right-click on a workspaces, workspaces will be moved to next output. When you click on a container or a window, it will be focused. On left-click on a container, layout will be changed. On middle-click on a container, floating will be toggled. @@ -81,6 +82,7 @@ Shift + <RIGHT> / <LEFT> or L / H - Focus next / previous slave will be active <ENTER> - Go to the active workspace <ESC> - Go to the previous used workspace +o - Move workspace to next output w / e - Increase / decrease screenshot size `, 1-9, 0, -, = - Active the corresponding slave F1-F12 - Active the corresponding master diff --git a/woman/qt.py b/woman/qt.py index e36f5210af09672397ec07101800f4e5b12f1e22..1bca128315e97a5003f53ec513939121ad56f28f 100755 --- a/woman/qt.py +++ b/woman/qt.py @@ -629,6 +629,9 @@ def qt_main(): def focus(self): shared.i3_cmd(f'workspace {workspace(self.master, self.slave)}') + def move_to_otput(self, output="next"): + shared.i3_cmd(f"move workspace to output {output}") + def move(self, target, before=False, expand=False, new_container=None): for f in self._tree.floating_nodes: f.move_to_workspace(target.workspace_widget.master, target.workspace_widget.slave) @@ -648,7 +651,14 @@ def qt_main(): self._tree.root_node.quit_windows(*arg, **kvarg) def clicked(self, pos, buttons): - self.focus() + if buttons == Qt.RightButton: + try: + self.move_to_otput() + except I3CmdException as e: + m_win.cmd_msg(e.error, QColor(255, 100, 100)) + traceback.print_exc() + else: + self.focus() def root_i3_tree_widget(self): r = self._tree.root_node @@ -1150,6 +1160,8 @@ def qt_main(): elif mod == 0 and key == ord('T'): m_win.end_get_continuing_key() self.load_i3_tree() + elif mod == 0 and key == ord('O'): + self.focused_widget.move_to_otput() elif mod == 0 and key == ord('W'): try: self.set_screenshot_size([x for x in SCREENSHOTS_SIZES if x > self.screenshot_size][0])