[QUOTE=Sector11;12763298]
S11_Current.sh
Code:
#!/bin/bash
if pidof conky | grep [0-9] > /dev/null
then
killall conky &
# Start with low sleep on highest desktop
# Increase sleep as desktop lowers to insure the conky is running before changing desktops.
# on desktop 4 only | no sticky
(sleep 1s && wmctrl -s 3) &
# on desktop 3 only | no sticky
(sleep 2s && wmctrl -s 2) &
# on desktop 2 only | no sticky
(sleep 3s && wmctrl -s 1 && conky -c /media/5/Conky/S11_Dates.conky) &
(sleep 3s && wmctrl -s 1 && conky -c /media/5/Conky/S11_Rem_Cal.conky) &
# on desktop 1 only | no sticky
(sleep 5s && wmctrl -s 0 && conky -c /media/5/Conky/S11_VRX.conky) &
(sleep 5s && wmctrl -s 0 && conky -c /media/5/Conky/S11_Arg-blue.conky) &
(sleep 5s && wmctrl -s 0 && conky -c /media/5/Conky/S11_Email_1.conky) &
(sleep 5s && wmctrl -s 0 && conky -c /media/5/Conky/S11_all-text.conky) &
(sleep 5s && wmctrl -s 0 && conky -c /media/5/Conky/conkybarre_v9000) &
# on all desktops | sticky
(sleep 1s && conky -c /media/5/Conky/DiceClock/Dice-Clock.conky) &
(sleep 1s && conky -c /media/5/Conky/DiceClock/Dice-Date.conky) &
exit
else
# Start with low sleep on highest desktop
# Increase sleep as desktop lowers to insure the conky is running before changing desktops.
# on desktop 4 only | no sticky
(sleep 1s && wmctrl -s 3) &
# on desktop 3 only | no sticky
(sleep 2s && wmctrl -s 2) &
# on desktop 2 only | no sticky
(sleep 3s && wmctrl -s 1 && conky -c /media/5/Conky/S11_Dates.conky) &
(sleep 3s && wmctrl -s 1 && conky -c /media/5/Conky/S11_Rem_Cal.conky) &
# on desktop 1 only | no sticky
(sleep 5s && wmctrl -s 0 && conky -c /media/5/Conky/S11_VRX.conky) &
(sleep 5s && wmctrl -s 0 && conky -c /media/5/Conky/S11_Arg-blue.conky) &
(sleep 5s && wmctrl -s 0 && conky -c /media/5/Conky/S11_Email_1.conky) &
(sleep 5s && wmctrl -s 0 && conky -c /media/5/Conky/S11_all-text.conky) &
(sleep 5s && wmctrl -s 0 && conky -c /media/5/Conky/conkybarre_v9000) &
# on all desktops | sticky
(sleep 1s && conky -c /media/5/Conky/DiceClock/Dice-Clock.conky) &
(sleep 1s && conky -c /media/5/Conky/DiceClock/Dice-Date.conky) &
exit
fi
WOW, there be a lot of Conkys in that script.
I went with a simple start/kill script like this for each of my three (yes... 3) Conkys...
ConkyMain.command
Code:
#!/bin/bash
if pgrep -f "conky -c /home/greg/.conky/Main/conkyrc"
then
pkill -xf "conky -c /home/greg/.conky/Main/conkyrc"
else
conky -c ~/.conky/Main/conkyrc
fi
as well as a script to start them all...
Conky.command
Code:
#!/bin/bash
conky -c ~/.conky/Main/conkyrc &
conky -c ~/.conky/Main/conkyemailrc &
conky -c ~/.conky/Main/conkycalrc &
and a script to kill them all...
ConkyKill.command
Code:
#!/bin/bash
killall conky
and a script to open my Conky config files...
ConkyEdit.command
Code:
#!/bin/bash
gedit ~/.conky/Main/conkyrc &
gedit ~/.conky/Main/conkycalrc &
gedit ~/.conky/Main/conkyemailrc &
All these scripts are pulled together using a desktop file saved in my ~/.local/share/applications folder like so...
Conky.desktop
Code:
[Desktop Entry]
Encoding=UTF-8
Exec=/home/greg/.conky/Main/Conky.command
Icon=conky
Type=Application
Terminal=false
Name=Conky
GenericName=Conky
StartupNotify=false
Categories=system
Actions=Main;E-Mail;Calendar;Edit;KillAll;
[Desktop Action Main]
Exec=/home/greg/.conky/Main/ConkyMain.command --main
Name=Main
[Desktop Action E-Mail]
Exec=/home/greg/.conky/Main/ConkyMail.command --e-mail
Name=E-Mail
[Desktop Action Calendar]
Exec=/home/greg/.conky/Main/ConkyCalendar.command --calendar
Name=Calendar
[Desktop Action Edit]
Exec=/home/greg/.conky/Main/ConkyEdit.command --edit
Name=Edit Conky Files
[Desktop Action KillAll]
Exec=/home/greg/.conky/Main/ConkyKill.command --killall
Name=Killall
Just in case anyone out there wants to know how it's done.
Bookmarks