MrMarble / termsvg

Record, share and export your terminal as a animated SVG image.
GNU General Public License v3.0
194 stars 10 forks source link

Option to skip first line in rec and 2 options to set custom bg and text color for export #3

Closed chiefMarlin closed 10 months ago

chiefMarlin commented 1 year ago

Hi, This pull request has 2 feature additions.

  1. Added a parameter to rec command -s, --skip-first-line" This allows to skip the first line of recording Purpose of this is to allow user to set custom environment variables or change PS1 terminal variable before recording. Typical usage would be to set api key variables for the demo and to change usr@host PS1 variable. First line delimiter is set to \n and recording starts after [enter] is pressed Example: export API_KEY=test; PS1="user@host:"; some other command [enter]

    • Recording starts
  2. Added 2 parameters to export to allow setting custom background and text color for exported svg. -b, --background-color=STRING background color in hexadecimal format (e.g. #FFFFFF) -t, --text-color=STRING text color in hexadecimal format (e.g. #000000) This one is self explanatory, i find it very usefull to be able to customize what the svg will look like.

Thanks

chiefMarlin commented 10 months ago

Can we push this through @MrMarble