Utilities - tmuxp.util#

Utility and helper methods for tmuxp.

tmuxp.util.run_before_script(script_file, cwd=None)[source]#

Execute a shell script, wraps subprocess.check_call() in a try/catch.

Return type:

int

tmuxp.util.oh_my_zsh_auto_title()[source]#

Give warning and offer to fix DISABLE_AUTO_TITLE.

See: https://github.com/robbyrussell/oh-my-zsh/pull/257

Return type:

None

tmuxp.util.get_current_pane(server)[source]#

Return Pane if one found in env.

Return type:

Optional[Pane]

tmuxp.util.get_session(server, session_name=None, current_pane=None)[source]#

Get tmux session for server by session name, respects current pane, if passed.

Return type:

Session

tmuxp.util.get_window(session, window_name=None, current_pane=None)[source]#

Get tmux window for server by window name, respects current pane, if passed.

Return type:

Window

tmuxp.util.get_pane(window, current_pane=None)[source]#

Get tmux pane for server by pane name, respects current pane, if passed.

Return type:

Pane