Author Topic: Trying to set up a second conky [SOLVED]  (Read 450 times)

Offline Aleph

  • Sr. Member
  • ****
  • Posts: 360
Trying to set up a second conky [SOLVED]
« on: January 04, 2013, 05:57:29 AM »
Hi friends,

Happy new year to all the PCLINUXOS friends!!!

I have free time now and I am trying to set up a second conky on my system but I am not able.

Can you help me?

This is the output of the first:
Code: [Select]
# set to yes if you want Conky to be forked in the background
conky -c /home/xxxx/.conky/.conkyrc_prueba
background yes
use_xft yes
xftfont Arial:size=9
xftalpha 0.5
update_interval 4.0
total_run_times 0
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_hints below
double_buffer yes
minimum_size 200 5
maximum_width 250
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders yes

default_color grey
default_shade_color red
default_outline_color grey
alignment top_right
gap_x 12
gap_y 25
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale yes


#poll
update_interval 1
total_run_times 0

TEXT
${font sans-serif:bold:size=8}Sistema ${hr 2}
${font sans-serif:normal:size=8}$sysname $kernel $alignr on $machine
Hostname $alignr $nodename
Uptime $alignr $uptime
CPU freq @ $alignr${freq}MHz

${font sans-serif:bold:size=8}PROCESADORES ${hr 2}
${font sans-serif:normal:size=8}${cpugraph cpu1}
CPU: ${cpu cpu0}% ${cpubar cpu0}

RAM:$alignc $mem / $memmax $alignr $memperc%
$membar

Root $alignc ${fs_used /} / ${fs_size /} $alignr ${fs_free_perc /}%
${fs_bar /}

Swap $alignc $swap / $swapmax $alignr $swapperc%
${swapbar}

${font sans-serif:bold:size=8}Procesos ${hr 2}
${font sans-serif:normal:size=8}$processes processes ($running_processes running)
    
NAME $alignr PID    CPU  MEM
${top name 1} $alignr ${top pid 1} ${top cpu 1} ${top mem 1}
${top name 2} $alignr ${top pid 2} ${top cpu 2} ${top mem 2}
${top name 3} $alignr ${top pid 3} ${top cpu 3} ${top mem 3}
${top name 4} $alignr ${top pid 4} ${top cpu 4} ${top mem 4}
${top name 5} $alignr ${top pid 5} ${top cpu 5} ${top mem 5}
${top name 6} $alignr ${top pid 6} ${top cpu 6} ${top mem 6}
${top name 7} $alignr ${top pid 7} ${top cpu 7} ${top mem 7}
${top name 8} $alignr ${top pid 8} ${top cpu 8} ${top mem 8}



${font sans-serif:bold:size=8}INTERNET ${hr 2}
${font sans-serif:normal:size=8}Direccion IP: $alignr ${addr eth0}
ESSID: $alignr ${wireless_essid eth0}
${downspeedgraph eth0}
DLS:${downspeed eth0} kb/s $alignr total: ${totaldown eth0}
${upspeedgraph eth0}
ULS:${upspeed eth0} kb/s $alignr total: ${totalup eth0}

And this the output of the second one:
Code: [Select]
# set to yes if you want Conky to be forked in the background
background yes
use_xft yes
xftfont Arial:size=9
xftalpha 0.5
update_interval 4.0
total_run_times 0
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_hints below
double_buffer yes
minimum_size 200 5
maximum_width 250
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders yes

default_color grey
default_shade_color red
default_outline_color grey
alignment top_left
gap_x 12
gap_y 25
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale yes


#poll
update_interval 1
total_run_times 0

TEXT
${goto 45}${font DejaVu Sans Mono:size=44}${time %H}${font DejaVu Sans Mono:size=20}${voffset -25}'${time %M}${font DejaVu Sans Mono:size=8}${voffset -12}${time %S}
${goto 120}${voffset 10}${font :size=8}${time %A}
${goto 120}${voffset 1}${font :size=8}${time %d %B %Y}


${goto 50}${font courier:size=9}${execpi 60 DJS=`date +%_d`; cal | sed s/"\(^\|[^0-9]\)$DJS"'\b'/'\1${color orange}'"$DJS"'$color'/}

What is wrong?

Thanks.
« Last Edit: January 07, 2013, 03:50:12 AM by Aleph »

Offline cstrike77

  • Full Member
  • ***
  • Posts: 220
Re: Trying to set up a second conky
« Reply #1 on: January 05, 2013, 12:57:44 PM »
You (I think) have to do it in two files, the first needs to call the second file to start it. That's one of the things I'd like to do, I've just never tried it.

If you go here you'll see some examples of it, if I remember right.

http://crunchbang.org/forums/viewtopic.php?id=59

And I think there's one here too:

http://www.junauza.com/2009/09/15-really-awesome-conky-configurations.html

Best!

jan

Offline Aleph

  • Sr. Member
  • ****
  • Posts: 360
Re: Trying to set up a second conky
« Reply #2 on: January 06, 2013, 04:39:11 AM »
You (I think) have to do it in two files, the first needs to call the second file to start it. That's one of the things I'd like to do, I've just never tried it.

If you go here you'll see some examples of it, if I remember right.

http://crunchbang.org/forums/viewtopic.php?id=59

And I think there's one here too:

http://www.junauza.com/2009/09/15-really-awesome-conky-configurations.html

Best!

jan


Hi cstrike77,

thanks!

I was reading at crunchbang and trying to do this here but I can't configure a second conky.

I desist, I'm tired... I'll try in other moment.

Best!

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10654
  • MLUs Forever!
Re: Trying to set up a second conky
« Reply #3 on: January 06, 2013, 05:10:16 AM »
Conky by default will use   ~/.conkyrc  as its config file .....  so launching conky will use that file.

Launching another instance of conky to use a different file like this

conky  -c   ~/.conkyrc2

will produce a second instance of conky on the screen.

You need to ensure that one does not overwrite the other.

Other than that is it just a matter of making sure the config files are valid.

You (I think) have to do it in two files, the first needs to call the second file to start it. That's one of the things I'd like to do, I've just never tried it.

MLUs rule the roost!

Linux XPS 3.4.38-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline cstrike77

  • Full Member
  • ***
  • Posts: 220
Re: Trying to set up a second conky
« Reply #4 on: January 06, 2013, 12:39:31 PM »
Conky by default will use   ~/.conkyrc  as its config file .....  so launching conky will use that file.

Launching another instance of conky to use a different file like this

conky  -c   ~/.conkyrc2

will produce a second instance of conky on the screen.

You need to ensure that one does not overwrite the other.

Other than that is it just a matter of making sure the config files are valid.



You (I think) have to do it in two files, the first needs to call the second file to start it. That's one of the things I'd like to do, I've just never tried it.


If you use .conkyrc2 don't you have to manually start the second? Just asking, like I said I've always wanted to try this, but just never got around to it...

TKS Just17

jan

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10654
  • MLUs Forever!
Re: Trying to set up a second conky
« Reply #5 on: January 06, 2013, 02:29:55 PM »
Conky by default will use   ~/.conkyrc  as its config file .....  so launching conky will use that file.

Launching another instance of conky to use a different file like this

conky  -c   ~/.conkyrc2

will produce a second instance of conky on the screen.

You need to ensure that one does not overwrite the other.

Other than that is it just a matter of making sure the config files are valid.



You (I think) have to do it in two files, the first needs to call the second file to start it. That's one of the things I'd like to do, I've just never tried it.


If you use .conkyrc2 don't you have to manually start the second? Just asking, like I said I've always wanted to try this, but just never got around to it...

TKS Just17

jan

The command for starting conky with the default config is

conky

The command to start conky as a second instance with a second config is

conky  -c  /path/to/conkyrc2

You can use whatever method suits you to launch the second instance .....  for example you can put the command in the Autostart directory.

Another method you could use is to add the second command to the first conky config file

${exec conky -c  ~/.conkyrc2}  .......  I am sure about this one ......

A third method - which is used for quite a number of commands, is to create a small script and call the script ..... in this example the script holding the command for the second instance is stored in ~/.conky_scripts directory and the script itself is called second-conky.sh and has only one command  conky -c  ~/.conkyrc2

${exec  ~/.conky_scripts/second-conky.sh}

Hopefully one of those methods suits  .....   I am sure there are others also ....

**********

I should have noted that I have had best results when using the Autostart  ....

« Last Edit: January 06, 2013, 02:56:21 PM by Just17 »
MLUs rule the roost!

Linux XPS 3.4.38-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline Aleph

  • Sr. Member
  • ****
  • Posts: 360
Re: Trying to set up a second conky
« Reply #6 on: January 07, 2013, 03:49:51 AM »
Hi Just17,

If I add to   path/.config/lxautostart/lxautostart.sh  "conky  -c  /path/to/conkyrc2"  it doesn't works.

The second method, ${exec conky -c  ~/.conkyrc2} kill the first conky, and I don't know how to solve it.


But if I add "@conky  -c  /path/to/conkyrc2" to leafpad /etc/xdg/lxsession/LXDE/autostart is working!!!


I've not tried the third method.


Thanks!!!

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10654
  • MLUs Forever!
Re: Trying to set up a second conky [SOLVED]
« Reply #7 on: January 07, 2013, 04:05:59 AM »
Glad you found a solution that works for you  ;)

MLUs rule the roost!

Linux XPS 3.4.38-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT