Esempio n. 1
0
    async def async_move_to_window(self) -> 'iterm2.window.Window':
        """
        Moves this tab to its own window, provided there are multiple tabs in the window it belongs to.

        :returns: The new window ID.

        :throws: :class:`~iterm2.rpc.RPCException` if something goes wrong.
        """
        window_id = await self.async_invoke_function(
            "iterm2.move_tab_to_window()")
        app = await iterm2.app.async_get_app(self.connection)
        return app.get_window_by_id(window_id)
Esempio n. 2
0
    async def async_move_to_window(self) -> 'iterm2.window.Window':
        """
        Moves this tab to its own window, provided there are multiple tabs in the window it belongs to.

        :returns: The new window ID.

        :throws: :class:`~iterm2.rpc.RPCException` if something goes wrong.
        """
        window_id = await self.async_invoke_function("iterm2.move_tab_to_window()")
        app = await iterm2.app.async_get_app(self.connection)
        assert(app)
        window = app.get_window_by_id(window_id)
        if not window:
            raise iterm2.rpc.RPCException("No such window {}".format(window_id))
        return window