Added tmux_kill_all_panes()

This commit is contained in:
2Shirt 2018-12-08 18:36:24 -07:00
parent 668c7c4c6a
commit d88a9f39f2
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C

View file

@ -2,6 +2,13 @@
from functions.common import *
def tmux_kill_all_panes(pane_id=None):
"""Kill all tmux panes except the active pane or pane_id if specified."""
cmd = ['tmux', 'kill-pane', '-a']
if pane_id:
cmd.extend(['-t', pane_id])
run_program(cmd, check=False)
def tmux_kill_pane(*panes):
"""Kill tmux pane by id."""
cmd = ['tmux', 'kill-pane', '-t']