Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Dynamic graphs in conky
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
VinzC
Advocate
Advocate


Joined: 17 Apr 2004
Posts: 4669
Location: Theux (Belgium)

PostPosted: Wed Mar 27, 2013 1:49 pm    Post subject: Dynamic graphs in conky Reply with quote

Hi again.

I'd like to know if (and possibly how) I can have dynamic graphs in conky. For instance whenever I establish a VPN connection Gkrellm immediately shows the network graph as soon as device ppp0 is available. The graph should go when the link is closed. I'd like to achieve the same feature with conky. Is it possible?

Here's my current theme. It is based on Fedora's and I have customized it with an indication of which package is being compiled. I also added a second network graph for my Ethernet adapter. So next in my list are dynamically show my USB disks activity like in Gkrellm and my VPN connection, similar to what I have with eth0 and wlan0.

Thanks for any hint or suggestion.
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
GNU/Linux user #369763
“Wow! I feel root”
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 2268
Location: Dallas area

PostPosted: Wed Mar 27, 2013 2:17 pm    Post subject: Reply with quote

${if_existing /proc/net/route ppp0}<display whatever>${endif}
_________________
Asus m5a99fx, FX 8320 - amd64-multilib, 3.15.9-zen, glibc-2.17, gcc-4.7.3-r1, eudev
xorg-server-1.16, openbox w/lxpanel, nouveau, oss4
Back to top
View user's profile Send private message
VinzC
Advocate
Advocate


Joined: 17 Apr 2004
Posts: 4669
Location: Theux (Belgium)

PostPosted: Thu Mar 28, 2013 10:49 am    Post subject: Reply with quote

Anon-E-moose wrote:
${if_existing /proc/net/route ppp0}<display whatever>${endif}

Excellent! It even spans across multiple lines. I had to pay attention to a few details but it works like a charm. Thanks a lot!
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
GNU/Linux user #369763
“Wow! I feel root”
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 2268
Location: Dallas area

PostPosted: Thu Mar 28, 2013 10:53 am    Post subject: Reply with quote

I should have mentioned to not leave a space between the if closing curly bracket and the 1st command
and the same for the last command and $endif (it leaves a blank line otherwise)

ie
${if_existing /proc/net/route ppp0}1st command
...
last command${endif}

leaves no spaces


${if_existing /proc/net/route ppp0}
1st command
...
last command
${endif}

leaves a space at beginning and end
_________________
Asus m5a99fx, FX 8320 - amd64-multilib, 3.15.9-zen, glibc-2.17, gcc-4.7.3-r1, eudev
xorg-server-1.16, openbox w/lxpanel, nouveau, oss4
Back to top
View user's profile Send private message
VinzC
Advocate
Advocate


Joined: 17 Apr 2004
Posts: 4669
Location: Theux (Belgium)

PostPosted: Thu Mar 28, 2013 11:10 am    Post subject: Reply with quote

Indeed I noticed every character and space counts in the text block but that was no big deal.
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
GNU/Linux user #369763
“Wow! I feel root”
Back to top
View user's profile Send private message
VinzC
Advocate
Advocate


Joined: 17 Apr 2004
Posts: 4669
Location: Theux (Belgium)

PostPosted: Thu Mar 28, 2013 7:50 pm    Post subject: Reply with quote

I updated my old Conky theme. You can find it here with all dependencies.
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
GNU/Linux user #369763
“Wow! I feel root”
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum