SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#7051 2014-02-05 14:01:14

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 11,703
Website

Re: The New Monster Conky Thread

Snap wrote:

Is it possible to make conky to do do a smooth scrolling?

Thanks in advance.

mrpeachy shows you how here...


#! Forum Moderator | To #! or not to #!?  That is the question!
#! Conky = 16 Threads & the Conky Archives | Conky PitStop | OHCG'er
StartPage -  protect your privacy   |   BBQLinux

Offline

Be excellent to each other!

#7052 2014-02-05 14:24:45

Snap
#! Junkie
Registered: 2013-10-22
Posts: 481

Re: The New Monster Conky Thread

Thank you, sir! Errrm... Sirs!  tongue

Offline

#7053 2014-02-05 17:00:12

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 11,703
Website

Re: The New Monster Conky Thread

Snap wrote:

Thank you, sir! Errrm... Sirs!  tongue

Not me, mrpeachy - I just checked his blog - it's like a virtual tour of his lua mind.

Ooooooo I was in mrpeachy's head!  I can hear it now:

"That you S11?"
       "Yes mrpeachy."
"GET OUT!"

  lol  lol  lol  lol  lol
Just kidding, check his sig - check his blog.  Check out wlourf's as well.


#! Forum Moderator | To #! or not to #!?  That is the question!
#! Conky = 16 Threads & the Conky Archives | Conky PitStop | OHCG'er
StartPage -  protect your privacy   |   BBQLinux

Offline

#7054 2014-02-05 19:20:36

Snap
#! Junkie
Registered: 2013-10-22
Posts: 481

Re: The New Monster Conky Thread

Aye aye sir!  tongue

Offline

#7055 2014-02-06 10:22:13

iami
New Member
Registered: 2013-09-06
Posts: 7

Re: The New Monster Conky Thread

I've got a question considering conditionally running lua scripts.

I know conky has build in conditions like if_exists ect... but as far as i know lua scrips always get loaded. I'm asking this because i would like to have a different network skin when i'm on eth/wlan or both. And i'm using conky to draw graphs. Can it be done in conky, for example "if on eth0 -> run graph_eth.lua" "if on wlan0 -> run graph_wlan.lua"  "if on eth0 and wlan -> run graph_both.lua" . Or has this conditional checking have to be done in conky itself and just make 1 conky file for them all?

Thanks in advance

Offline

#7056 2014-02-06 10:35:06

Snap
#! Junkie
Registered: 2013-10-22
Posts: 481

Re: The New Monster Conky Thread

Interesting question. Tuned in for the reply too.

Offline

#7057 2014-02-06 10:44:34

Snap
#! Junkie
Registered: 2013-10-22
Posts: 481

Re: The New Monster Conky Thread

I'm using a gmail python script I got from Arpinux to check/count/display the emails in conky. I have three different accounts (personal and business) so I have configured three different scripts. I have null idea of python scripting, but surely there's a way to merge the three scripts in a single one. Copying and pasting the same thing three times in a row is just enough? Nevertheless, valid or not, surely there are better and cleaner ways to achieve this. Any tips or howtos, please?

Here's the script:

import os
import string

#Enter your username and password below within double quotes
# eg. username="username" and password="password"
username="your_user_name"
password="your_password"

com="wget -O - https://"+username+":"+password+"@mail.google.com/mail/feed/atom --no-check-certificate"

temp=os.popen(com)
msg=temp.read()
index=string.find(msg,"<fullcount>")
index2=string.find(msg,"</fullcount>")
fc=int(msg[index+11:index2])

if fc==0:
   print "0 new"
else:
   print str(fc)+" new"

Thanks.

Last edited by Snap (2014-02-06 10:45:18)

Offline

#7058 2014-02-06 13:15:54

easysid
#! CrunchBanger
From: India
Registered: 2013-01-25
Posts: 123

Re: The New Monster Conky Thread

^
If all three accounts are on gmail, I suppose you could wrap the script in a function, and call it with different usernames and passwords.
This should work (Warning: untested code for multiple accounts )

#!/usr/bin/env python2

import os
import string

def check_mail(username, password):

    com="wget -O - 'https://"+username+":"+password+"@mail.google.com/mail/feed/atom' --no-check-certificate"

    temp=os.popen(com)
    msg=temp.read()
    index=string.find(msg,"<fullcount>")
    index2=string.find(msg,"</fullcount>")
    fc=int(msg[index+11:index2])

    print "\n"+username
    if fc==0:
       print "0 new"
    else:
       print str(fc)+" new"

def main():
    #enter credentials here
    check_mail(username1, password1)

if __name__ == "__main__":
    main()

Last edited by easysid (2014-02-06 13:24:38)

Offline

#7059 2014-02-06 17:01:01

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 11,703
Website

Re: The New Monster Conky Thread

iami wrote:

I've got a question considering conditionally running lua scripts.

I know conky has build in conditions like if_exists ect... but as far as i know lua scrips always get loaded. I'm asking this because i would like to have a different network skin when i'm on eth/wlan or both. And i'm using conky to draw graphs. Can it be done in conky, for example "if on eth0 -> run graph_eth.lua" "if on wlan0 -> run graph_wlan.lua"  "if on eth0 and wlan -> run graph_both.lua" . Or has this conditional checking have to be done in conky itself and just make 1 conky file for them all?

Thanks in advance


well you can use if_up:

${if_up wlan0}do wlan0 stuff
do wlan0 stuff
do wlan0 stuff${if_up eth0}do eth0 stuff
do eth0 stuff
do etho stuff${endif}${endif}

In theory if they are both up (don't know how you'd do that?)  toy might get what you want for both.
And they can be nested.

However, probably better to do it right in lua - - - that's out of my league as well.

Check out mrpeachys » HOW TO : using lua scripts in conky .. I see this on the command line search:

internet=conky_parse("${if_up wlan0}1${else}0${endif}")

Last edited by Sector11 (2014-02-06 17:06:35)


#! Forum Moderator | To #! or not to #!?  That is the question!
#! Conky = 16 Threads & the Conky Archives | Conky PitStop | OHCG'er
StartPage -  protect your privacy   |   BBQLinux

Offline

#7060 2014-02-06 20:43:03

iami
New Member
Registered: 2013-09-06
Posts: 7

Re: The New Monster Conky Thread

@sector11: thanks for the reply, apparently my laptop has no problems having a wlan + eth connection at the same time.

Currently i'm using:
${if_existing /proc/net/route enp8s0} instead of ${if_up enp8s0} because the eth (enp8s0) keeps up even if no cable is pugged in.  I already have the if else structure (ugly code tbh) but was just wondering if there were build-ins/tricks to conditionally run .lua files. I will look into mrpeachys guide and do it in the lua file itself (if i can work it out that is)  smile

Last edited by iami (2014-02-06 20:43:37)

Offline

#7061 2014-02-06 20:56:31

mrpeachy
20% cooler
From: The Everfree Forest
Registered: 2009-11-08
Posts: 3,460

Re: The New Monster Conky Thread

iami wrote:

@sector11: thanks for the reply, apparently my laptop has no problems having a wlan + eth connection at the same time.

Currently i'm using:
${if_existing /proc/net/route enp8s0} instead of ${if_up enp8s0} because the eth (enp8s0) keeps up even if no cable is pugged in.  I already have the if else structure (ugly code tbh) but was just wondering if there were build-ins/tricks to conditionally run .lua files. I will look into mrpeachys guide and do it in the lua file itself (if i can work it out that is)  smile

you can run individual lua functions under TEXT , you would still have to load the script above, but if your script had function one() and function two() I don't wee why you couldn't control the functions with conky ifs

${if this} function one ${else} function two ${endif}

you could have multiple lua scripts loaded, and as long as the main function in each script is named differently then the same would apply

I've not specifically tried this however

or as sector11 said, if you use conky parse in the lua file you can use if statements in the lua script to control what's shown.  this would mean being somewhat familiar with writing lua code however.

Offline

#7062 2014-02-06 21:02:50

iami
New Member
Registered: 2013-09-06
Posts: 7

Re: The New Monster Conky Thread

Alright thanks, i will see if i can get it working tomorrow.

edit: got it, due to the script i used (wlourf bars) i did what sector11 mentioned, since it was easier.
Result: http://n00by4ever.deviantart.com/art/co … -401254455
conkybar___launchpad_v2_0_by_n00by4ever-d6mw9x3.png

Last edited by iami (2014-02-07 13:56:59)

Offline

#7063 2014-02-10 15:51:35

jinnainishida
New Member
Registered: 2014-02-10
Posts: 2

Re: The New Monster Conky Thread

Hello to everyone big_smile

Im just wondering if it is possible to write the networking part in conky without using concrete names of the interfaces. For example instead of using ${totaldown eth1} ill tell conky somehow that firtst it should look into /sys/class/net/ and replace "eth1" with all names inside that specific folder. My goal is to write a more flexible config so everytime a new interface is connected, or the interface name changes, I dont have to rewrite anything.

Thanks!

Offline

#7064 2014-02-10 17:37:59

mrpeachy
20% cooler
From: The Everfree Forest
Registered: 2009-11-08
Posts: 3,460

Re: The New Monster Conky Thread

jinnainishida wrote:

Hello to everyone big_smile

Im just wondering if it is possible to write the networking part in conky without using concrete names of the interfaces. For example instead of using ${totaldown eth1} ill tell conky somehow that firtst it should look into /sys/class/net/ and replace "eth1" with all names inside that specific folder. My goal is to write a more flexible config so everytime a new interface is connected, or the interface name changes, I dont have to rewrite anything.

Thanks!

I'm pretty sure you can't do it with native conky commands, you would need a script or a one liner execi/execpi line probably using awk

Offline

#7065 2014-02-10 18:14:38

dk75
#! Junkie
Registered: 2012-06-14
Posts: 250

Re: The New Monster Conky Thread

like

${execpi 60 ip -oneline link | mawk '!/state DOWN/ && !/loopback/ {gsub(/:/,"",$2); print $2}' | xargs -I {} vnstat -i {} --oneline | mawk -F";" '{gsub(/ /,""); gsub(/\.[0-9][0-9]/,""); print $2,$6"/"$11}'}

Debian Sid (Minted) x86_64/3.12-10, Conky 2.0_pre, Xorg 7.7/1.15.0, KDE 4.11.5, Intel X3100
Lenovo T61, HITACHI HTS722010K9SA00 100GB, WDC_WD5000BEVT 500GB
Linux user No.: 483055 | Conky Pitstop

Offline

#7066 2014-02-10 20:04:12

jinnainishida
New Member
Registered: 2014-02-10
Posts: 2

Re: The New Monster Conky Thread

OKej. I thought that it wont work without getting hands dirty with scripting big_smile
Soo ... Im going to study those commands a bit and if I come out with something promising Ill post it here so maybe it will be usefull for someone.

Thank you very much!

Offline

#7067 2014-02-10 20:10:03

ragamatrix
#! CrunchBanger
From: Horgen Switzerland
Registered: 2012-12-05
Posts: 234

Re: The New Monster Conky Thread

I tested superkaramba ... Take a lot ressource on my old machine... Now let's do it with conky... I've founded good the idea to display 3 graphes for each cpu; (system, user & total...) a work graph-lua script modifying... Sorry for the language here's a pix:
superkarambagraph.jpg

Offline

#7068 2014-02-14 18:51:21

lionhead
#! Junkie
From: Dagobah / Germany
Registered: 2011-01-22
Posts: 456

Re: The New Monster Conky Thread

i want to create a backup file (to display when the webpage is not avaiable). it creates an image but the file is empty (0 byte).

os.execute("cp --no-clobber -u "..img_file.." "..backup_file.."''")

edit: i solved the problem. smile it missed a whitespace at the end. now the size of the backup file is a bit differened then before smile

Last edited by lionhead (2014-02-15 08:21:01)

Offline

#7069 2014-02-15 16:53:46

kosmos890
#! Member
Registered: 2012-05-01
Posts: 72

Re: The New Monster Conky Thread

Conky and hdd temperature using udisks utility

In my conkyrc I use

execi 300 udisks --show-info /dev/sda | grep temp | cut -c 52-53

to get hdd temperature.
It works (compare to hddtemp /dev/sda) but at startup, conky doesn't display a hdd temperature.

Offline

#7070 2014-02-15 17:46:26

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 11,703
Website

Re: The New Monster Conky Thread

kosmos890 wrote:

Conky and hdd temperature using udisks utility

In my conkyrc I use

${execi 300 udisks --show-info /dev/sda | grep temp | cut -c 52-53}

to get hdd temperature.
It works (compare to hddtemp /dev/sda) but at startup, conky doesn't display a hdd temperature.

Reconfigure hddtemp:

sudo dpkg-reconfigure hddtemp

Answer: Yes, 0, Yes, OK, OK

and add:

${hddtemp /dev/sda}

That should do it ... you may need to log out .. not sure.


#! Forum Moderator | To #! or not to #!?  That is the question!
#! Conky = 16 Threads & the Conky Archives | Conky PitStop | OHCG'er
StartPage -  protect your privacy   |   BBQLinux

Offline

#7071 2014-02-18 12:18:08

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 11,703
Website

Re: The New Monster Conky Thread

ragamatrix wrote:

I tested superkaramba ... Take a lot ressource on my old machine... Now let's do it with conky... I've founded good the idea to display 3 graphes for each cpu; (system, user & total...) a work graph-lua script modifying... Sorry for the language here's a pix:
http://s24.postimg.org/l50bfqlkh/superkarambagraph.jpg

Nice ... I hope that 13% indicates you have other things running as well though.

Where did you find the lua script?

No need to apologize for your English language ragamatrix, it 100% readable and we know you're language is French.


#! Forum Moderator | To #! or not to #!?  That is the question!
#! Conky = 16 Threads & the Conky Archives | Conky PitStop | OHCG'er
StartPage -  protect your privacy   |   BBQLinux

Offline

#7072 2014-02-19 15:41:34

Muttley Black
Member
Registered: 2014-01-23
Posts: 31

Re: The New Monster Conky Thread

Just a very simple one! Based on default waldorf conky.  new adds are KERNEL - /HOME - CPU TEMP - DATE


Screenshot_02192014_05_29_30_PM.png

conkyrc

# conky configuration
#
# The list of variables has been removed from this file in favour
# of keeping the documentation more maintainable.
# Check http://conky.sf.net for an up-to-date-list.
#
# For ideas about how to modify conky, please see:
# http://crunchbanglinux.org/forums/topic/59/my-conky-config/
#
# For help with conky, please see:
# http://crunchbanglinux.org/forums/topic/2047/conky-help/
#
# Enjoy! :)
##############################################
# Settings
##############################################
background yes
use_xft yes
xftfont Liberation Sans:size=9
xftalpha 1
update_interval 1.0
total_run_times 0
own_window yes
own_window_transparent yes
own_window_type desktop
#own_window_argb_visual yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 200 200
maximum_width 240
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color 656667
default_shade_color 000000
default_outline_color 828282
alignment top_right
gap_x 12
gap_y 56
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale yes
##############################################
#  Output
##############################################
TEXT
S Y S T E M    I N F O
${hr} 
Kernel:${alignr}${kernel}
Host:$alignr$nodename
Uptime:$alignr$uptime
RAM:$alignr$mem/$memmax
Swap usage:$alignr$swap/$swapmax
Linux usage:$alignr${fs_used /}/${fs_size /}
Home usage:$alignr${fs_used /home}/${fs_size /home}
CPU usage:$alignr${cpu cpu0}%
CPU temp:$alignr${execi 10 sensors | grep ^temp1 | tail -n 1 |awk '{print $2}'}


S H O R T C U T    K E Y S
${hr}
Alt+F2$alignr Run Dialog
Alt+F3$alignr Alt Menu
Super+Space$alignr Main Menu
Super+Tab$alignr Client Menu
Super+t$alignr Terminal
Super+f$alignr File Manager
Super+e$alignr Editor
Super+m$alignr Media Player
Super+w$alignr Web Browser
Super+h$alignr Task Manager
Super+l$alignr Lock Screen
Super+v$alignr Volume Control
Super+x$alignr Logout
PrtSc$alignr Screenshot


D A T E
${hr}
${alignr}${time %a,}${color}${time %e %B %G}

Last edited by Muttley Black (2014-02-19 15:44:50)


Knowledge ⇛ Linux: First steps ┃ Programming: First steps ┃ English: Medium
Operating ⇛ CrunchBang Linux 11 "Waldorf" 64-bit on Toshiba satellite C660D 10D
Specifications ⇛ AMD V140 │ 2GB │ ATI Mobility Radeon HD 4200 Series │ Realtec RTL8188C Wireless LAN 802.11n PCI-E NIC│Realtec HD Audio │ 15.4" - 1366x768

Offline

#7073 2014-02-19 17:19:20

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 11,703
Website

Re: The New Monster Conky Thread

By quoting your post we get the image Link correctly.

Direct "thumb" link would be to use the Forum BBCode (1):
Screenshot_02192014_05_29_30_PM.jpg«--» 2014_02_19_14_15_26_1176x987_Sector11.jpg«--» 2014_02_19_14_19_49_706x232_Sector11.jpg
or: Thumbnail for forums (1)

I do like the simplicity of the default #! conky ...  cool

Last edited by Sector11 (2014-02-19 17:21:54)


#! Forum Moderator | To #! or not to #!?  That is the question!
#! Conky = 16 Threads & the Conky Archives | Conky PitStop | OHCG'er
StartPage -  protect your privacy   |   BBQLinux

Offline

#7074 2014-02-21 14:59:19

lionhead
#! Junkie
From: Dagobah / Germany
Registered: 2011-01-22
Posts: 456

Re: The New Monster Conky Thread

my lua-script does not load when i start the computer. does conky uses log-files?

Offline

Be excellent to each other!

#7075 2014-02-21 17:48:29

mrpeachy
20% cooler
From: The Everfree Forest
Registered: 2009-11-08
Posts: 3,460

Re: The New Monster Conky Thread

this is how i get timed things to run at startup

--stuff that is outside of running functions is loaded the first time the script is run
dosomething=1

function main()
--stuff inside running functions is activated every conky cycle
count=conky cycles
timer=based on conky cycles

if timer==0 or dosomething==1 then
--do the stuff
dosomething=nil--turn off dosomething otherwise dosomething remains 1 and times=d section will run every conky cycle
end--timed section

end--main function

as far as log files, lua can easily read and write to files in your filesystem

edit - @lionhead, just saw your pm, but thought i would answer here

Last edited by mrpeachy (2014-02-21 17:59:57)

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo