lemnos / tt

A terminal based typing test.
MIT License
712 stars 48 forks source link

[Feature Request] Add Options to change the font size #30

Open deafSpy opened 1 year ago

deafSpy commented 1 year ago

It would be nice to allow for user to set a font size. Especially since current size is quite small for me.

I know that there is the default terminal font size changer but it would be nice if there was a custom option within the command to change font-size

eeriemyxi commented 1 year ago

It would be nice to allow for user to set a font size. Especially since current size is quite small for me.

I know that there is the default terminal font size changer but it would be nice if there was a custom option within the command to change font-size

Any decent or even semi-decent terminal will have hotkeys dedicated for changing the font size for situations like this (my terminal for example uses CTRL + + and CTRL + -). (Fortunately) there are only a few such horrible terminals which would allow any program to modify the terminal font size because it can easily be exploited, not to mention that it is completely useless for any use case if you are given the hotkeys I discussed.

If you still want it that bad, either look out for some automation tool to automate pressing CTRL + + and CTRL + - after switching to a decent terminal; or some terminal with plugin support, then create a plugin which can detect certain escape sequences which can be used to change the font size, obviously you will have to come up with the syntax for these escape sequences.

Hiqqup commented 1 year ago

I tried finding a good solution for this, looking into alarcritty wether there is an option to increase font size for certain aplications. or if ther is a way to scale tmux windows even found this repo https://github.com/da-x/alacritmux which looks promising i couldnt get it working tho. Even considered forking the repo and implementing the feature that would take quiet the effort tho. So now im running this really uggly xdotools shellscript idk maybe that helps

for i in {0..10}
do
xdotool key ctrl+equal
done
sleep 0.2
tt -quotes en -notheme -highlight1 -noskip
sleep 0.2
for i in {0..10}
do
xdotool key ctrl+minus
done

and put it as alias in my bash rc

alias tt='$HOME/dotfiles/tt.sh'

really not a great solution so let me know if you find something that works better for you