Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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...

share|improve this question

1 Answer 1

up vote 6 down vote accepted

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.

share|improve this answer
    
Since the names are longer than the other columns, I used 150,200,250 rather than 100,200,300... –  Seamus Jan 2 '11 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 Aug 23 at 23:39
1  
@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. –  Gilles Aug 24 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) –  syntaxerror Aug 25 at 16:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.