tmuxp
tmuxp copied to clipboard
`tmuxp run-script`
Rather than having a tmuxp load <config> a user can run tmuxp run <script-path>, it can do any combination of:
- Build / detect / modify existing server, session, window and panes
- Attach session or keep it in the background
See also:
https://github.com/vcs-python/vcspull/issues/335
def run(server: 'libtmux.Server`):
session.new_session(session_name="my session")
# custom setup
session.attach_session()
Todo
- A way to pass arguments / add_arguments()
- Just use argparse? Make sure
tmuxp run-script [script_file_path] --helpworks
- Just use argparse? Make sure
Inspiration
-
https://github.com/django-extensions/django-extensions/blob/3.1.5/django_extensions/management/commands/runscript.py
These other one's require registration which may be too much effort to setup:
- https://docs.djangoproject.com/en/4.0/howto/custom-management-commands/
- flask custom commands