11

Say I want something like the following in my .conkyrc

NAME                PID       CPU%      MEM%
${top name 1} ${top pid 1}   ${top cpu 1}    ${top mem 1}
${top name 2} ${top pid 2}   ${top cpu 2}    ${top mem 2}
${top name 3} ${top pid 3}   ${top cpu 3}    ${top mem 3}
${top name 4} ${top pid 4}   ${top cpu 4}    ${top mem 4}

Do I have to align the columns manually by adding space, or is there a way to tell conky to align things in columns. With fewer columns, I could just use $alignc and $alignr but I can't do that here...

1 Answer 1

12

As long as you stick to left-aligned columns or a non-proportional font, ${goto N} works.

NAME${goto 100}PID${goto 200}  CPU%${goto 300}MEM%
${top name 1}${goto 100}${top pid 1}${goto 200}${top cpu 1}${goto 300}${top mem 1}

For right alignment, you can try playing with alignr and offset.

4
  • Since the names are longer than the other columns, I used 150,200,250 rather than 100,200,300...
    – Seamus
    Commented Jan 2, 2011 at 13:03
  • Is a certain package needed for ${goto x} functionality? On my system, all text appearing after a goto statement (regardless of the value used for the positional offset x) fails to display.
    – user001
    Commented Aug 23, 2014 at 23:39
  • 2
    @user001 Not that I know of. Make sure that you aren't overriding the value of TERM. One route to debug this is to look at what control sequences Conky is emitting with strace -ewrite -p$(pidof conky). Ask a question if you don't know how to make sense of this. Commented Aug 24, 2014 at 18:04
  • conky -D might come in handy as well perhaps (will put conky into debug mode, letting you peek way more deeply into its inner workings, and maybe giving you a clue what your build of conky is "allergic" against) Commented Aug 25, 2014 at 16:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .