charmbracelet / freeze

Generate images of code and terminal output 📸
MIT License
2.98k stars 50 forks source link

Add the filename text to the generated image. #89

Open yushengguo557 opened 3 months ago

yushengguo557 commented 3 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 1 month 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?

yushengguo557 commented 1 month ago

Be shown only when using window controls. 🙂

AlejandroSuero commented 1 month ago

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