Conky: Add support for absolute vertical alignment of text.

Created on 13 Jan 2018  路  5Comments  路  Source: brndnmtthws/conky

Conky currently has a goto(x), but no corresponding goto(y) to align text vertically. A single goto(x,y) or a goto(y) would help minimize the use of voffset, which is prone to break layouts when fonts change.

Edit: I have got a working(?) version of this gotoy(), by just copying the code for goto(), and updating cur_y. I do not know how correct it is. If anyone is interested, have a look at https://github.com/easysid/conky/commit/f6ef58a3c27f76d53eff206b94faebfd63dc3586

enhancement

Most helpful comment

I can take a look at it at the weekend. I am out right now. Replacing atoi() with strtol() shouldn't be an issue, but my fork is now lagging a lot behind the parent repo.

All 5 comments

@su8 :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle: :small_red_triangle:

So is this happening? Since @easysid has implemented this would it help if I just turn that commit into a PR? I could very much use this.

Just replace atoi with some of the strto* functions as with atoi you introduce undefined behavior.

I don't know much about C, that's why I asked if it's enough to just turn the commit into a PR. I'll look into what you said, though. Maybe I can figure that much out. ;)

I can take a look at it at the weekend. I am out right now. Replacing atoi() with strtol() shouldn't be an issue, but my fork is now lagging a lot behind the parent repo.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bunder2015 picture bunder2015  路  4Comments

moyamo picture moyamo  路  3Comments

sdban picture sdban  路  4Comments

Microcrap picture Microcrap  路  4Comments

Dimerbone picture Dimerbone  路  4Comments