By design, in a terminal
conky will start the default conky at:
etc/conky/conky.conf.
Now if a user, or the creator of a distro, installs/includes conky they use the "user" default location:
~/.conkyrc
and that will be the conky that
conky
runs. This is the case with VSIDO, the default conky is ~/.conkyrc
But what if you want to run 2, 3, 4, 5 - 10 conkys.
Use a bash script: ssc.sh#!/bin/sh
# click to start, click to stop
if pidof conky | grep [0-9] > /dev/null
then
exec killall conky
else
sleep 30 # sleep not required for xfce on startup - 30 or more for others
conky -c ~/Conky/conky1 &
conky -c ~/Conky/conky2 &
conky -c ~/Conky/conky3 &
conky -c ~/Conky/conky4 &
exit
fi
The sleep command can be used like this:
(sleep 30s && conky -c /Conky/conky1) &
(sleep 30s && conky -c /Conky/conky2) &
(sleep 30s && conky -c /Conky/conky3) &
(sleep 30s && conky -c /Conky/conky4) &
but then you need it for every command - which will come in handy in a second.
With ssc.sh you can put it in your OpenBox autostart as well
IF you make it the LAST command, it will NOT return to autostart.sh:
## Start conkys
(sleep 2s && /media/5/Conky/OBMenuS/ssc.sh) &
exit
You can assign it to a tint2 clock click function:
clock_rclick_command = /media/5/Conky/OBMenuS/ssc.sh ## start/stop all my conkys
you can put an entry in OpenBox:
Label: ssc - SSC - Srart|Stop Conky or Bob's your Uncle (anything you want)
Execute: /media/5/Conky/OBMenuS/ssc.sh
Create an icon on your desktop or Xfce4 Menu and use it. Run it as a start-up in Xfce4
Since it boots your conkys at start up:
[list=*]
- activating it once while all conkys are running - - - will "killall conky",[/*]
- activating it again - - - will restart ALL conkys.[/*]
Now the multiple desktop trick.This came to me by way of an old friend "mobilediesel" gotta find him and invite him here.
EDIT: I forgot another VERY important part of this.
There is a line in conky
above TEXT, similar to if not that same as:
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
A lot of people use it because it's what they found in the internet or in the default conky.
sticky - means the conky is on every desktop. So for the conkys that you do NOT want on all desktops, drop the sticky.
own_window_hints undecorated,below,skip_taskbar,skip_pager
Next ... Install
wmctrlsudo apt-get install wmctrl
Wmctrl is a command line tool to interact with an
EWMH/NetWM compatible X Window Manager (examples include
Enlightenment, icewm, kwin, metacity, and sawfish).
Wmctrl provides command line access to almost all the features
defined in the EWMH specification. For example it can maximize
windows, make them sticky, set them to be always on top. It can
switch and resize desktops and perform many other useful
operations.
Take a look, 13 conkys running on 4 desktops and only one file to edit to change what's running:
ssc.sh
By trial and error I discovered that 'wmctrl' does not like going from desktop 0 to desktop 1, etc, and then back to desktop 0. Conky counts desktops: 1, 2, 3, 4, etc but wmctrl counts 0, 1, 2, 3, etc. And here is where sleep comes in for every command, Linux reads the bash script lines one at a time and actions them in order, so if there are two lines say lines 7 and 8:
sleep 10 ....
sleep 2 ...
... the sleep 2 line is activates 2 seconds after the scripts starts, not 12 seconds as I once thought.
If your conkys on any particular desktop start slow because they need to gather information, ie weather, the "next" desktop change needs a sleep time to make sure the information is displayed "before" changing the desktop to the next section. You'll need to test and tweak things to get it right.
So here it is, my "SSC.sh" script, as you see I have commented out conkys but left them there for a bit because I change things occasionally.
#!/bin/bash
# click to start, click to stop
if pidof conky | grep [0-9] > /dev/null
then
exec killall conky
else
#conky -c /media/5/conky/test274.johnraff.conky &
#conky -c /media/5/conky/test275.johnraff.conky &
#conky -c /media/5/Conky/S11_v9_R.conky &
#conky -c /media/5/conky/test287.memory.conky &
# on desktop 4 only
(sleep 1s && wmctrl -s 3 && conky -c /media/5/conky/Didier-T/conkyrc_meteo_graph_baro) &
(sleep 1s && wmctrl -s 3 && conky -c /media/5/conky/Didier-T/conkyrc_meteo_lua) &
# on desktop 3 only
(sleep 10s && wmctrl -s 2 && conky -c /media/5/Conky/TeoWeatherClock/Teo_Clock_2.conky) &
(sleep 10s && wmctrl -s 2 && conky -c /media/5/Conky/jed_greyclock_conkyrc) &
#(sleep 10s && wmctrl -s 2 && conky -c /media/5/Conky/Chronograph_mrpeachy.conky) &
#(sleep 10s && wmctrl -s 2 && conky -c /media/5/conky/Didier-T/conkyrc_meteo_graph_baro) &
#(sleep 10s && wmctrl -s 2 && conky -c /media/5/conky/Didier-T/conkyrc_meteo_lua) &
# on desktop 2 only (change to 5s if using desktop 3)
(sleep 18s && wmctrl -s 1 && conky -c /media/5/Conky/S11_Dates.conky) &
(sleep 18s && wmctrl -s 1 && conky -c /media/5/Conky/S11_VNS.conky) &
(sleep 18s && wmctrl -s 1 && conky -c /media/5/Conky/S11_Rem_Cal.conky) &
(sleep 18s && wmctrl -s 1 && conky -c /media/5/Conky/S11_Disk_Activity.conky) &
#(sleep 18s && wmctrl -s 1 && conky -c /media/5/Conky/S11_v9_SM.conky) &
#(sleep 18s && wmctrl -s 1 && conky -c /media/5/Conky/S11_mrp_FSYS.conky) &
(sleep 18s && wmctrl -s 1 && conky -c /media/5/Conky/S11_v9_H.conky) &
(sleep 18s && wmctrl -s 1 && conky -c /media/5/Conky/S11_v9_R.conky) &
# on desktop 1 only (change to 10s if using desktop 3)
(sleep 25s && wmctrl -s 0 && conky -c /media/5/Conky/VO_Radiotray.conky) &
(sleep 25s && wmctrl -s 0 && conky -c /media/5/Conky/Chronograph_mrpeachy.conky) &
#(sleep 25s && wmctrl -s 0 && conky -c /media/5/Conky/TeoWeatherClock/Teo_Clock_2.conky) &
#(sleep 25s && wmctrl -s 0 && conky -c /media/5/Conky/S11_Chronograph.conky) &
#(sleep 25s && wmctrl -s 0 && conky -c /media/5/Conky/S11_coin.conky) &
# on all desktops
(sleep 15s && wmctrl -s 0 && conky -c /media/5/Conky/S11_email.conky) &
exit
fi
If you have questions, just ask.