Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
add a way to enlarge font with key combination #10
Currently Termonad doesn't have any way to enlarge the font with a key combination. You have to edit the
I used to use the terminal emulator Roxterm. Roxterm has font resizing options like the following ("Zoom In", "Zoom Out", "Normal Size"):
It would be great to have similar options for Termonad. Adding this would require the following steps:
referenced this issue
Nov 15, 2018
I just took a look at your code. Even though you've imported lenses, do you think that make lenses (or prisms) out of the data structures TMConfig, ConfigOptions, and ConfigHooks would make this easier?
EDIT: I thought you weren't using the lens package. I spoke too soon.
I didn't realize you could make lenses in that way. That is rather convienent.
To make the font changes I was considering using a config hook. I could use a hook similar to:
or even that one. I'll cook up something and see what shakes out.
I don't think this would necessarily require using the config hook.
In the callback for when you click on the menu entry, you need to take the current list of terminals, and loop over them setting the new font size.
An example of looping over existing terminals can be found here.
Here's the code that initially sets the font size:
Creating the original font description can be found here:
You may have to refactor the code a little to make re-creating the font description easy?