- Start a new tmux named session
tmux new -s terminal-capture
- Split the screen using these commands, a. vertical split " b. horizontal split %
- To navigate between the panes,
a. To goto Left pane
<C-b> left-key
b. To goto Right pane<C-b> right-key
c. To goto Top pane<C-b> up-key
d. To goto Down pane<C-b> down-key
- Detach the session
tmux <C-b>+d
- Record the tmux session with asciinema
asciinema rec -c "tmux attach -t terminal-capture"
- Detach the tmux session, save the recording and convert it into gif
- Enjoy !!!
-
-
Save worldofprasanna/1861b182103cef452ec58471679a7e5b to your computer and use it in GitHub Desktop.
Excellent guide, thanks for writing this up!
Thank you !!
Thanks for this, saved me having to work it out myself.
Awesome, thanks for this!
thanks!! So helpful!
This was really helpful. To clarify, C-b
means Ctrl-b
(even on Mac). And step 6, "Detach the tmux session" - you can press Ctrl-b d
again and it will stop the recording; you don't need to exit tmux.
Also I found there is a bug with iTerm2 where it doesn't render anything except the first frame of recordings, after you've made a tmux recording. But if you exit the shell and start a new one it plays fine. Anyway I recommend using Apple's Terminal app for this rather than iTerm2.
This was really helpful. To clarify,
C-b
meansCtrl-b
(even on Mac). And step 6, "Detach the tmux session" - you can pressCtrl-b d
again and it will stop the recording; you don't need to exit tmux.Also I found there is a bug with iTerm2 where it doesn't render anything except the first frame of recordings, after you've made a tmux recording. But if you exit the shell and start a new one it plays fine. Anyway I recommend using Apple's Terminal app for this rather than iTerm2.
Thanks for the extra tips @Timmmm 👍
Beautiful!
Excellent guide, thanks for writing this up!