View previous topic :: View next topic |
Author |
Message |
shrimp123 Apprentice
Joined: 02 Sep 2004 Posts: 199 Location: Here!
|
Posted: Thu Sep 15, 2005 9:34 pm Post subject: a calendar script..... |
|
|
hi,
i have added a mini calendar to be displayed.... sharing in case anybody is interested... or is some1 has feedback to improve it
on conkyrc use :
${execi 10 ~/.conky/get_calendar.sh first_part}${color cyan}${execi 10 ~/.conky/get_calendar.sh today }${color }${execi 10 ~/.conky/get_calendar.sh second_part}
the get_calendar.sh
#! /bin/sh
#str=`echo '\033[01;32m29'`
DATE=`date | awk -F" " '{print $3}'`
case "$1" in
first_part)
cal | grep '[a-zA-Z]';
cal | grep -v '[a-zA-Z]' | grep '[0-9]' | awk -F$DATE ' BEGIN {i=0}
($1 == $0 && i==0) {print $1}
($1 != $0 && i==0){i=i+1;print $1}';
;;
today)
echo $DATE;
;;
second_part)
cal | grep -v '[a-zA-Z]' | grep '[0-9]' | awk -F$DATE ' BEGIN {i=1}
(i==0) {print $0}
($1 != $0 && i==1){i=i-1;print $2}
';
;;
esac |
|
Back to top |
|
|
gnychis Veteran
Joined: 23 Mar 2005 Posts: 1004 Location: Pittsburgh, PA
|
Posted: Thu Sep 15, 2005 10:30 pm Post subject: |
|
|
I keep getting this error trying to run conky:
Code: |
hedpe@monster ~ $ conky
Conky: Can't set the specified locale!
Check LANG, LC_CTYPE, LC_ALL.
|
I ran conky for approx 1 month and never saw this error before until today. I am not sure what caused it.
Any ideas? |
|
Back to top |
|
|
shrimp123 Apprentice
Joined: 02 Sep 2004 Posts: 199 Location: Here!
|
Posted: Fri Sep 16, 2005 1:50 am Post subject: |
|
|
did u recompile glibc recently?
Shrimp |
|
Back to top |
|
|
brenden l33t
Joined: 09 Mar 2004 Posts: 710 Location: Calgary, AB
|
Posted: Fri Sep 16, 2005 2:00 am Post subject: |
|
|
dayul wrote: | Quote: | I had a similar problem this morning after upgrading to 1.3.1 yesterday. When I first started conky, the $diskiograph had one spike at the far left end of the graph that extended outside the graph borders to the top of the screen. I'll try and dig into it some more. |
Yep thats the one, good to know its not just me, i'll try and dig too. |
This stuff should be fixed in CVS, along with a few other annoying bugs. |
|
Back to top |
|
|
dayul Apprentice
Joined: 02 Jun 2004 Posts: 180 Location: Blackpool, England
|
Posted: Fri Sep 16, 2005 6:39 am Post subject: |
|
|
Quote: | This stuff should be fixed in CVS, along with a few other annoying bugs. |
Many thanks brenden |
|
Back to top |
|
|
Aonoa Guru
Joined: 23 May 2002 Posts: 589
|
Posted: Sun Sep 18, 2005 9:26 am Post subject: |
|
|
I have 3 network interfaces on my laptop and I want conky to display the up/down speed of the one of them that is in use.. I quite often swap between using eth1 and eth2, but I only want conky to display one line with the speeds for the one interface that is actually used. Can this be done? |
|
Back to top |
|
|
Sade Guru
Joined: 22 Mar 2005 Posts: 406 Location: Netherlands - Eindhoven
|
Posted: Mon Sep 19, 2005 4:19 pm Post subject: |
|
|
eonic wrote: | I have 3 network interfaces on my laptop and I want conky to display the up/down speed of the one of them that is in use.. I quite often swap between using eth1 and eth2, but I only want conky to display one line with the speeds for the one interface that is actually used. Can this be done? |
i copy pasted this:
if_running (process) --> if PROCESS is running, display everything if_running and the matching $endif
if_existing (file) --> if FILE exists, display everything between if_existing and the matching $endif
if_mounted (mountpoint) --> if MOUNTPOINT is mounted, display everything between if_mounted and the matching $endif
out of the manual found on this site
mayb this will help _________________ | 1.6Ghz atom N270 | adopt an unanswerd post | a nice way to post a config file | |
|
Back to top |
|
|
Aonoa Guru
Joined: 23 May 2002 Posts: 589
|
Posted: Mon Sep 19, 2005 10:35 pm Post subject: |
|
|
Sade: Thanks for those. However, do you know of any files that appear specifically when you've got eth1 up and running? and a different when you've got eth2 up and running? only thing I could think of was the "/sbin/dhcpcd -h floppy eth2" process. But, it seems as though conky will only look for "dhcpcd", and not the entire string. Unless I used the wrong syntax.
I tried this, which works fine:
Code: | ${if_running /sbin/dhcpcd -h lappy eth2}net down: ${downspeed eth2} k/s net up: ${upspeed eth2} k/s$endif |
But when I changed "-h lappy eth2" to something else.. conky still displayed the line normally, when I hoped it should'nt have. If you understand. I thought maybe I could use two different lines, one for eth1 and one for eth2. The idea had merit.
Suggestions? |
|
Back to top |
|
|
swimmer Veteran
Joined: 15 Jul 2002 Posts: 1330 Location: Netherlands
|
Posted: Tue Sep 20, 2005 11:49 am Post subject: Conky & Boinc |
|
|
Hi all,
I would like to get all my Boinc/Seti-information with conky - is this possible yet? If so what do I have to put in the .conkyrc?
My boinc resides in /var/lib/boinc/ and the setiathome project in /var/lib/boinc/projects/setiathome.berkeley.edu/ ...
Greetz
swimmer |
|
Back to top |
|
|
mayday147 l33t
Joined: 22 Mar 2004 Posts: 825 Location: Bucharest, Romania
|
Posted: Tue Sep 20, 2005 1:24 pm Post subject: Re: Conky & Boinc |
|
|
swimmer wrote: | Hi all,
I would like to get all my Boinc/Seti-information with conky - is this possible yet? If so what do I have to put in the .conkyrc?
My boinc resides in /var/lib/boinc/ and the setiathome project in /var/lib/boinc/projects/setiathome.berkeley.edu/ ...
Greetz
swimmer |
Compile conky with 'seti' USE flag and you're done _________________ gentoo.ro |
|
Back to top |
|
|
swimmer Veteran
Joined: 15 Jul 2002 Posts: 1330 Location: Netherlands
|
Posted: Tue Sep 20, 2005 2:02 pm Post subject: Re: Conky & Boinc |
|
|
mayday147 wrote: |
Compile conky with 'seti' USE flag and you're done |
Unfortunately not
This is what I did already and I found it quite strange that I have to install "sci-astronomy/setiathome" again even if I use "sci-misc/boinc"
But even then it does not work ... until now I tried Quote: | seti_dir /var/lib/boinc/ | and Quote: | /var/lib/boinc/projects/setiathome.berkeley.edu/ | without any success
Anything else I forgot?
Regards
swimmer |
|
Back to top |
|
|
brenden l33t
Joined: 09 Mar 2004 Posts: 710 Location: Calgary, AB
|
Posted: Wed Sep 21, 2005 12:16 am Post subject: Re: Conky & Boinc |
|
|
swimmer wrote: | mayday147 wrote: |
Compile conky with 'seti' USE flag and you're done |
Unfortunately not
This is what I did already and I found it quite strange that I have to install "sci-astronomy/setiathome" again even if I use "sci-misc/boinc"
But even then it does not work ... until now I tried Quote: | seti_dir /var/lib/boinc/ | and Quote: | /var/lib/boinc/projects/setiathome.berkeley.edu/ | without any success
Anything else I forgot?
Regards
swimmer |
I'll test it when I get a chance. |
|
Back to top |
|
|
swimmer Veteran
Joined: 15 Jul 2002 Posts: 1330 Location: Netherlands
|
Posted: Wed Sep 21, 2005 11:32 am Post subject: Re: Conky & Boinc |
|
|
brenden wrote: |
I'll test it when I get a chance. |
Thanks in advance
swimmer |
|
Back to top |
|
|
Martini Tux's lil' helper
Joined: 30 Sep 2002 Posts: 141
|
Posted: Thu Sep 22, 2005 8:35 pm Post subject: |
|
|
Hi
first: brenden, this is a great tool, works realy good, thank you very_very much!
@eonic: The same situation here. I'm searching for a way to show my 2 network cards in the laptop.
if eth0 (lan) startet --> show conky infos for this interface
if eth1 (wlan) started --> show conky infos for this interface
if eth0/eth1 started --> show infos for booth
if interfaces stopped --> show nothing
Any ideas for this?
Thank you.
Sorry for bad english.
PS: @brenden Can you make a function like "fs_used_perc" to show the percentage of used filespace? That would be great. Thank you.
greets Martini |
|
Back to top |
|
|
ciaranm Retired Dev
Joined: 19 Jul 2003 Posts: 1719 Location: In Hiding
|
Posted: Fri Sep 23, 2005 10:07 pm Post subject: |
|
|
I threw together a vim syntax highlighting script for conkyrc files. If you're too lazy to install it manually, wait for a while and it might end up in the tree as app-vim/conky-syntax... |
|
Back to top |
|
|
brenden l33t
Joined: 09 Mar 2004 Posts: 710 Location: Calgary, AB
|
Posted: Sat Sep 24, 2005 12:50 am Post subject: |
|
|
ciaranm wrote: | I threw together a vim syntax highlighting script for conkyrc files. If you're too lazy to install it manually, wait for a while and it might end up in the tree as app-vim/conky-syntax... |
this is fantastic...thanks
I'm going to get this on the conky front page. |
|
Back to top |
|
|
Nuteater Apprentice
Joined: 25 Sep 2003 Posts: 193 Location: Jyväskylä, Finland
|
Posted: Sat Sep 24, 2005 2:15 pm Post subject: |
|
|
In case someone is interested, I wrote a little howto for getting RSS news
on the desktop with conky. _________________ I am Nuteater, hear me roar. |
|
Back to top |
|
|
nonas Guru
Joined: 17 Apr 2005 Posts: 328
|
Posted: Sat Sep 24, 2005 2:53 pm Post subject: |
|
|
First of all : thanks for this tool, it's really powerful and perfectly fits my needs
I wrote a small bash script that retrieve many information from Folding@Home files.
Here it is : Code: | #!/bin/bash
# fah2conky by nonas (nonas@rediffmail.com) - Merci à Inpact- KoinKoin et theocrite ;)
# v0.8 - 2005 sep 24 - http://nitrotoxine.free.fr/www/scripts/conkyfah/
# Retrieve information from Folding@Home files (unitinfo.txt, FAHlog.txt and psummary.txt)
# You need to create psummary.txt :
# rm psummary.html & rm psummary.txt & wget http://vspx27.stanford.edu/psummary.html && html2text psummary.html > psummary.txt
#
# This script is released under GNU-GPL v2
# http://www.gnu.org/copyleft/gpl.html
#
#####
# Usage : fah2conky.sh path/client_folder/ path/psummary.txt
# Just modify the output to get what you want. Enjoy ;)
### client folder & psummary.txt
FAH_DIR=$1
PSUMMARY=$2
### data from unitinfo.txt
NAME="$(grep Name $1/unitinfo.txt | sed -e "s/Name: //")"
PROGRESS=$(grep % $1/unitinfo.txt | awk {'print $2'} | sed -e "s/%//")
DL_TIME="$(grep Download $1/unitinfo.txt | sed -e "s/Download time: //")"
DUE_TIME="$(grep Due $1/unitinfo.txt | sed -e "s/Due time: //")"
### data from psummary.txt
NUMBER=$(grep "$NAME" $2 | awk {'print $1'})
SERVER_IP=$(grep "$NAME" $2 | awk {'print $2'})
ATOMS=$(grep "$NAME" $2 | awk {'print $(NF-7)'})
PREF_DAYS=$(grep "$NAME" $2 | awk {'print $(NF-6)'})
DEADLINE=$(grep "$NAME" $2 | awk {'print $(NF-5)'})
CREDIT=$(grep "$NAME" $2 | awk {'print $(NF-4)'})
FRAMES=$(grep "$NAME" $2 | awk {'print $(NF-3)'})
CORE=$(grep "$NAME" $2 | awk {'print $(NF-2)'})
CONTACT="$(grep "$NAME" $2 | awk {'print $NF'})"
### data from FAHlog.txt
RUN=$(grep -i run $1/FAHlog.txt | tail -n 1 | awk {'print $5'} | sed -e "s/,//")
CLONE=$(grep -i clone $1/FAHlog.txt | tail -n 1 | awk {'print $7'} | sed -e "s/,//")
GEN=$(grep -i gen $1/FAHlog.txt | tail -n 1 | awk {'print $9'} | sed -e "s/)//")
PERF_FRACTION=$(grep performance $1/FAHlog.txt | tail -n 1 | awk {'print $5'})
echo -e "Name: "$NAME",\nNumber: $NUMBER,\nCredit: $CREDIT,\nCore: $CORE,\nProgress: $PROGRESS%,\nIP: $SERVER_IP,\nNumber of Atoms: $ATOMS,\nPref_days: $PREF_DAYS,\nDeadline: $DEADLINE,\nNumber of Frames: $FRAMES,\nDownload_time: "$DL_TIME",\nDue_time: "$DUE_TIME",\nRun: $RUN,\nClone: $CLONE,\nGen: $GEN,\nContact: "$CONTACT",\nPerformance fraction: $PERF_FRACTION." | I hope it'll help someone
Comments, bugs reports are welcome. It should work for units with spaces in their name (especially the "in water" ones).
Bug ?
A screenshot and the .conkyrc part corresponding :
Code: | Disk IO: ${diskio}/s
${alignc}${diskiograph 20,300 990033 cc3300}
${diskiograph 20 990033 cc3300}
${alignc}${diskiograph 20 990033 cc3300} | The third graph doesn't draw anything and I don't know why the second is not 20px height like the first one.
I didn't try with the cpugraph nor with the [up/down]speedgraph.
Finally : here are my .conkyrc, the screenshot and the fah2conky.sh I'm using.
PS: Is the METAR stuff present in v1.3.1 or only in CVS ?
edit: There is a bug when I grep the [run/clone/gen] stuff, two different lines can contain this information. I'll work on it (later )
Code: | $ grep -i Run /opt/foldingathome/client2/FAHlog.txt | tail -n 5
[05:04:35] - Run: 175 (Clone 86, Gen 1)
[04:11:25] Leaving Run
[04:12:21] Project: 756 (Run 0, Clone 412, Gen 0)
[02:47:18] Leaving Run
[02:49:34] Project: 1850 (Run 25, Clone 106, Gen 0) | "Run" as pattern is a bad idea too...
Grepping "Project:" as pattern should do it
That makes the v0.9 (tr is now used in this part instead of sed -e "s/,//" or sed -e "s/)//" ) |
|
Back to top |
|
|
slyght Apprentice
Joined: 12 May 2004 Posts: 207 Location: Stuttgart, Germany
|
Posted: Sat Sep 24, 2005 7:38 pm Post subject: |
|
|
wow, conky has made lots improvements since i last looked into it (somewhere on page 4)
keep up the great work brenden!
today i added scripts for pop-mailchecking and xmms-info to my conky
i was really happy to find them in the screenshot section of your page!
there's just a little bug i found:
when i try to use "maximum_width" all my bars dissapear
maybe you can look into this
greetings,
slyght |
|
Back to top |
|
|
brenden l33t
Joined: 09 Mar 2004 Posts: 710 Location: Calgary, AB
|
Posted: Sat Sep 24, 2005 8:15 pm Post subject: |
|
|
slyght wrote: | wow, conky has made lots improvements since i last looked into it (somewhere on page 4)
keep up the great work brenden!
today i added scripts for pop-mailchecking and xmms-info to my conky
i was really happy to find them in the screenshot section of your page!
there's just a little bug i found:
when i try to use "maximum_width" all my bars dissapear
maybe you can look into this
greetings,
slyght |
if the width of the graph is greater then the max width, then yes it'll disappear |
|
Back to top |
|
|
slyght Apprentice
Joined: 12 May 2004 Posts: 207 Location: Stuttgart, Germany
|
Posted: Sat Sep 24, 2005 8:33 pm Post subject: |
|
|
brenden wrote: |
if the width of the graph is greater then the max width, then yes it'll disappear |
well, i haven't specified any widths for my bars
and the widths of my graphs aren't bigger than the maximum_width
here's my conkyrc: http://home.arcor.de/thilo.garke/misc/conkyrc |
|
Back to top |
|
|
brenden l33t
Joined: 09 Mar 2004 Posts: 710 Location: Calgary, AB
|
Posted: Sat Sep 24, 2005 8:36 pm Post subject: |
|
|
You have:
Code: | ${color orange} ${upspeedgraph eth0 25,85} ${color orange}${downspeedgraph eth0 25,85} |
Which is probably more then 190 pixels wide, so the down speed graph will probably get chopped. |
|
Back to top |
|
|
slyght Apprentice
Joined: 12 May 2004 Posts: 207 Location: Stuttgart, Germany
|
Posted: Sat Sep 24, 2005 8:40 pm Post subject: |
|
|
but i have tried with much wider maximum_widths!? (up to 1000) |
|
Back to top |
|
|
brenden l33t
Joined: 09 Mar 2004 Posts: 710 Location: Calgary, AB
|
Posted: Sat Sep 24, 2005 9:16 pm Post subject: |
|
|
slyght wrote: | but i have tried with much wider maximum_widths!? (up to 1000) |
Could you provide a screenshot? |
|
Back to top |
|
|
yaq n00b
Joined: 02 Sep 2005 Posts: 50 Location: Poland/Krakow
|
Posted: Sat Sep 24, 2005 9:16 pm Post subject: |
|
|
Anyone noticed strange fs_used behavior?
df tells me that i have 5.5 gig used on /home (ext3), while conky 1.3 and 1.3.1 shows 6.95 {fs_used /home} |
|
Back to top |
|
|
|