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

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -