Open IonicaBizau opened 9 years ago
same here
Big +1.
Even a way to call a "setup" script would be okay, so that I could cd ~/demo; source env/bin/activate; vim my_project.py; before recording begins
Set up your environment before launching the ttystudio command, e.g:
HOME=/path/to/my/project ttystudio output.gif
Works on Mac/*Nix. Can't remember how to do it on Windows, but it's slightly less trivial.
Regarding a "setup" script, investigate setting up your terminal profile. ttystudio uses the node blessed and term.js libraries to launch the program shell configured in your SHELL environment variable. It defaults to 'sh', which is aliased to bash on most systems, or to other streamlined shells in barebones systems. If your SHELL is not already customized, Macs and most linux distros are configured with defaults to automatically load ~/.bash_profile and ~/.bashrc immediately upon login before even displaying the prompt. The best solution is to change the SHELL environmental variable before launching ttystudio. Write a shell script to to launch vim immediately inside of ttystudio's new shell instance, then set SHELL to that path, e.g. SHELL=/my/script/path/file ttystudio output.gif
.
For the trifecta (twofecta?), combine the two in a one-liner:
HOME=/path/to/my/project SHELL=/my/script/path/file ttystudio output.gif
Seems like now it opens in the user home.