charmbracelet / freeze

Generate images of code and terminal output 📸
MIT License
3.45k stars 61 forks source link

Add the filename text to the generated image. #89

Open yusheng-guo opened 7 months ago

yusheng-guo commented 7 months ago

When generating images for multiple code files, I would like to mark the file names on the images so that the relationship between files can be clearer.

For example, it is possible to add "--filename CUSTOMIZATION" to generate an image with the file name in the middle of the top.

Currently I can only mark the file name through a picture editor.

Looking forward to your reply, thank you very much😊!

Snipaste_2024-04-30_13-11-48

AlejandroSuero commented 6 months ago

@yushengguo557 You want this feature to be shown when using window controls only or when passing lets say --output.show-filename=true regardless of window controls?

yusheng-guo commented 5 months ago

Be shown only when using window controls. 🙂

AlejandroSuero commented 5 months ago

@yushengguo557 I added the PR above with the feature if you want to try it out.