libtmux
libtmux copied to clipboard
Feature request: Clean up
Using tmux with Python means we lose the ability to interact with tmux. libtmux is a great tool, though currently my biggest worry is that I create a bunch of sessions, windows and panes.
Exiting out of panes is easy, since if you do && exit at the end of the command you execute it closes that terminal and hence closes that pane.
However, I find that there is no easy way to close windows or sessions. Im currently contemplating writing my own script with some simple logic like...
if does_window_contain_pane(window-number) == False:
tmux kill-window -t window-number
if session_contains_windows(sesh) == False:
tmux kill-session -t sesh
Think this is possible to implement? I have noticed a lot of scripts floating around trying to accomplish this. It would make libtmux all the more powerful and all the helper scripts obsolete.
Thanks for the great tool!!