bakkeby / st-flexipatch

An st build with preprocessor directives to decide which patches to include during build time
MIT License
361 stars 108 forks source link

How do I customize the underline position and width? #55

Open UtkarshVerma opened 2 years ago

UtkarshVerma commented 2 years ago

The underline looks a bit thicker than I prefer. Here's a comparison between Alacritty and st. image

Is there a way I could make the underline thinner, and maybe position it a couple of pixels below?

bakkeby commented 2 years ago

Hmm, changing the + 1 here to + 2 gives a 1 pixel space between the text and the underline.

https://github.com/bakkeby/st-flexipatch/blob/4a156b95f97cc1791983b10b0f1e56d77670e125/x.c#L2304-L2305

If I changed that to + 3 then it disappeared as the next line (my prompt) was overwriting it. Maybe + 2 is enough here.

UtkarshVerma commented 2 years ago

Weirdly, that doesn't work for me. I don't see any difference. Here are the patches I'm using: https://github.com/UtkarshVerma/st-flexipatch/blob/mine/patches.h

bakkeby commented 2 years ago

Right, you are using the undercurl patch which has various underline variants. Not sure how exactly to adjust that.

UtkarshVerma commented 2 years ago

I decided to disable undercurl patch, and got what I wanted by modifying the source. However, I feel a variable for configuring this would be better. What are your thoughts on this? Also, I'm using +3 offset for my underline and it looks perfect.

UtkarshVerma commented 1 year ago

I did a minor change in the source to set offset for the undercurl patch in https://github.com/UtkarshVerma/st-flexipatch/commit/5649ac602aac0683f30e082f89448e45826c20e2

It doesn't allow setting width of the underline though.