How to use the tmuxp.Window function in tmuxp

To help you get started, we’ve selected a few tmuxp examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tmux-python / tmuxp / tmuxp / testsuite / server.py View on Github external
def test_attached_window(self):
        self.assertIsInstance(self.session.attached_window(), Window)
github tmux-python / tmuxp / tmuxp / testsuite / server.py View on Github external
def test_select_window(self):
        self.assertIsInstance(self.session.select_window(1), Window)
github tmux-python / tmuxp / tmuxp / testsuite / server.py View on Github external
def test_select_window(self):
        self.assertIsInstance(self.session.select_window(1), Window)
github tmux-python / tmuxp / tmuxp / testsuite / server.py View on Github external
def test_attached_window(self):
        self.assertIsInstance(self.session.attached_window(), Window)
github tmux-python / tmuxp / tmuxp / workspacebuilder.py View on Github external
if i == int(1):  # if first window, use window 1
                w1 = s.attached_window()
                w1.move_window(99)
                pass

            sd = wconf['start_directory'] if 'start_directory' in wconf else None
            w = s.new_window(
                window_name=window_name,
                start_directory=sd,
                attach=False,  # do not move to the new window
                window_index=wconf.get('window_index', ''),
            )

            if i == int(1) and w1:  # if first window, use window 1
                w1.kill_window()
            assert(isinstance(w, Window))
            s.server._update_windows()
            if 'options' in wconf and isinstance(wconf['options'], dict):
                for key, val in wconf['options'].items():
                    w.set_window_option(key, val)

            if 'focus' in wconf and wconf['focus']:
                w.select_window()

            s.server._update_windows()

            yield w, wconf