gnu screen - Tmux Macro/Function -
i'm trying make function in tmux when desired, can bring command prompt (ctrl-b, :) , type in , have tmux spawn new window in existing session number of panes running few specific commands.
is possible?
how this:
create file called ~/foo.conf
neww -n foo send-keys -t foo cd ~/ c-m send-keys -t foo vim c-m split-window -t foo
we'll use neww
create new window, we'll issue commands new window. using c-m
sends enter key command executes. pass command neww
directly.
then in ~/.tmux.conf
, bind key
bind z source-file ~/foo.conf
this 1 way pull off. particular scenario names window, little ingenuity, i'm sure can come workaround that. every tmux command can issued .conf files, , can issued passing tmux
itself.
hope helps!
Comments
Post a Comment