Page 2002 of 2299 FirstFirst ... 1002150219021952199220002001200220032004201220522102 ... LastLast
Results 20,011 to 20,020 of 22981

Thread: Post your .conkyrc files w/ screenshots

  1. #20011
    Join Date
    Aug 2010
    Location
    Arizona USA
    Beans
    2,867
    Distro
    Ubuntu Development Release

    Re: Post your .conkyrc files w/ screenshots

    I just downloaded the Ubuntu 12.10 Alpha 1 daily .iso (came out early, for testers).

    Things are going to break, so I thought I'd make one last screenie.


    Ubuntu 12.10 / Linux 3.5.0-rc1 / Radiamentary 0.66 / ACYL 0.9.4 / Adwaita / nVidia 302.11 / Xserver 1.12



    Goodbye, cruel world. sniff... sniff...

    See ya on the other side.
    Intel ® P4 Extreme Edition 3.4 (Gallatin) || DFI ® LanParty PRO875B rev B1
    Crucial ® Ballistix Tracer PC4000 1GB || Mountain Mods U2-UFO Opti-1203
    XFX 7600GT 560M AGP (PV-T73A-UDF3) || Corsair HX520W Modular PSU

  2. #20012
    Join Date
    Jan 2007
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by Sector11 View Post
    and used the same terminal to start the conky again and I still had to hit [Enter] to get a prompt.
    always - had that in Ubuntu, LMDE and now in Debian. Seems that it doesn't refresh terminal after moving to background.
    It's same thing with "&" at the end.



    Quote Originally Posted by Sector11 View Post
    Does not say if there is a default:

    jmfal's conky does not have 'background' above TEXT so whatever 'is' default applied.
    default is "background no" - since it's boolean and no state = negative state, then it should be that way. Checked it thought for verification - positive on this.



    Quote Originally Posted by Sector11 View Post
    I wonder it it could be an OS and/or "how things are setup" thing? I have always had to hit enter to get a prompt.
    Maybe it's BASH thing... after "reset & clear" command from menu I must hit ENTER to restore prompt too.



    Quote Originally Posted by Sector11 View Post
    I should have though of that but I don't have a ~/Pictures directory so they get lost "someplace in the cosmos".

    My OpenBox menus puts them in ~/images - I'll have to change the [PtrScr] function to is ~/image vs "the cosmos"
    For me it's "~/Obrazki" so I assumed that it should be "~/Pictures" (like Photo Pictures) but it could be "~/image", "~/images" or something like that. Anyway, standard home folder for images in your system.
    Check out "~/.gtk-bookmarks" text file for it.
    Last edited by dk75; June 5th, 2012 at 03:43 AM.
    Linux Debian Sid (Minted) x86_64/3.12.10, Conky 2.0_pre, Xorg 7.7/1.15.0, KDE 4.11.5, Lenovo T61, Intel X3100, HITACHI HTS722010K9SA00 100GB, WDC_WD5000BEVT 500GB
    Linux user No.: 483055 | My Conky Pitstop corner | One4All project

  3. #20013
    Join Date
    Feb 2010
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by dk75 View Post
    always - had that in Ubuntu, LMDE and now in Debian. Seems that it doesn't refresh terminal after moving to background.
    It's same thing with "&" at the end.

    default is "background no" - since it's boolean and no state = negative state, then it should be that way. Checked it thought for verification - positive on this.

    Maybe it's BASH thing... after "reset & clear" command from menu I must hit ENTER to restore prompt too.

    For me it's "~/Obrazki" so I assumed that it should be "~/Pictures" (like Photo Pictures) but it could be "~/image", "~/images" or something like that. Anyway, standard home folder for images in your system.
    Check out "~/.gtk-bookmarks" text file for it.
    Well, atleast I know my system isn't broken. Thanks for responding. Sorry to hear it's that way with you too now.

    Reminds me of the days conky would "refresh" itself with just a [Save], today it's a hit and miss - sometimes it works sometimes not.

    Also found out the "Xfce4-screenshooter" (dual sessions) was dropping them in ~/tmp. So I fixed that in a hurry:

    ~/.config/xfce4/xfce4-screenshooter
    Code:
    delay=1
    region=1
    action=1
    show_mouse=1
    screenshot_dir=file:/home/sector11/images
    app=gthumb
    last_user=
    Learned a new word too: Obrazki, been a good day!
    Thank you dk75

  4. #20014
    Join Date
    Jan 2007
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by Sector11 View Post
    Sorry to hear it's that way with you too now.

    Reminds me of the days conky would "refresh" itself with just a [Save], today it's a hit and miss - sometimes it works sometimes not.
    What? I think we lost something in translation.
    Conky works as always and refreshing as always, it's terminal emulator that have problems with refreshing after some situation (like run Conky in background, or clear&reset). And it was always like that too (gnome-terminal you know?).
    Linux Debian Sid (Minted) x86_64/3.12.10, Conky 2.0_pre, Xorg 7.7/1.15.0, KDE 4.11.5, Lenovo T61, Intel X3100, HITACHI HTS722010K9SA00 100GB, WDC_WD5000BEVT 500GB
    Linux user No.: 483055 | My Conky Pitstop corner | One4All project

  5. #20015
    Join Date
    Dec 2008
    Location
    The Desert
    Beans
    281
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by Sector11 View Post
    That should save a few CPU percentage points. Cleaner code too!

    I like it. Thanks for the tips - HowTo - Heads Up. Call it what you like.
    It works - it's great. Thank you!

    Fresh install, can ya tell?
    just gotta do the whole s11vnstat now.
    Quote Originally Posted by Sector11 View Post
    Reminds me of the days conky would "refresh" itself with just a [Save], today it's a hit and miss - sometimes it works sometimes not.
    I miss that too. Never could figure out how to get it working again
    O and congrats conkiers on 20000 posts
    I'm a super power user

  6. #20016
    Join Date
    Apr 2007
    Beans
    195

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by dk75 View Post
    hm... so basically to the 11th of each month you display last month result, and since 11th you display present month result?

    Then it shouldn't be to hard... it needs only 3 date invocation (what day it is, what month it is and what month was last) and then some AWK script to compare.
    It could be reduced to 2 date invocation even, since current day and month could be fetched in one call.

    So 2 date and 1 awk invocation.
    Lets see... this should do...
    Code:
    #-----Monthly/Daily Bandwidth Usage
    ${font}${color2}NETWORK DATA USE${color6}${hr 1}${color2}
    ${goto 35}${color2}Today${goto 125}Monthly 
    ${color2}${goto 15}U:${goto 30}${color1}${font TransponderAOE:bold:size=12}${execpi 60 vnstat -d | awk '$0 ~ "'$(date +%D)'" {print $5"${goto 85}"$6}'}${goto 120}${execpi 60 vnstat -m |awk -v currDate="$(env LANG=en date +%-e-%b)" -v lastMonth="$(env LANG=en date -d 'last month' +%b)" 'BEGIN{split(currDate,currDateArray,"-"); if (currDayArray[1]<11) monthStat=lastMonth; else monthStat=currDayArray[2];} $0 ~ monthStat {print $6"${goto 175}"$7}'
    ${color2}${goto 15}D:${goto 30}${color4}${font TransponderAOE:bold:size=12}${execpi 60 vnstat -d | awk '$0 ~ "'$(date +%D)'" {print $2"${goto 85}"$3}'}${goto 120}${execpi 60 vnstat -m |awk -v currDate="$(env LANG=en date +%-e-%b)" -v lastMonth="$(env LANG=en date -d 'last month' +%b)" 'BEGIN{split(currDate,currDateArray,"-"); if (currDayArray[1]<11) monthStat=lastMonth; else monthStat=currDayArray[2];} $0 ~ monthStat {print $3"${goto 175}"$4}'
    ${color2}${goto 15}T:${goto 30}${color1}${font TransponderAOE:bold:size=12}${execpi 60 vnstat -d | awk '$0 ~ "'$(date +%D)'" {print $8"${goto 85}"$9}'}${goto 120}${execpi 60 vnstat -m |awk -v currDate="$(env LANG=en date +%-e-%b)" -v lastMonth="$(env LANG=en date -d 'last month' +%b)" 'BEGIN{split(currDate,currDateArray,"-"); if (currDayArray[1]<11) monthStat=lastMonth; else monthStat=currDayArray[2];} $0 ~ monthStat {print $9"${goto 175}"$10}'
    Okay, there has GOT to be a more... Elegant... Way to do this. One that doesn't get so far away from Conky objects. I'm still leaning toward a LUA function. Or, also a possibility, a BASH script. That way it can reduce it down to a choice of either a straight request for this month or last month, and it doesn't look so alien to Conky.

    I see it CAN be done this way dk75, the question becomes... SHOULD it be done this way? I see a simpler-to-read way coming.

  7. #20017
    Join Date
    Jan 2007
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by 42dorian View Post
    Okay, there has GOT to be a more... Elegant... Way to do this. One that doesn't get so far away from Conky objects. I'm still leaning toward a LUA function. Or, also a possibility, a BASH script. That way it can reduce it down to a choice of either a straight request for this month or last month, and it doesn't look so alien to Conky.

    I see it CAN be done this way dk75, the question becomes... SHOULD it be done this way? I see a simpler-to-read way coming.
    OK.
    Specially for you, 42dorian-vnstat.sh:
    Code:
    #!/bin/bash
    
    currDate="$(env LANG=en date +%-e-%b)"
    lastMonth="$(env LANG=en date -d 'last month' +%b)"
    
    awk '
    BEGIN{split("'$currDate'",currDateArray,"-"); if (currDayArray[1]<11) monthStat="'$lastMonth'"; else monthStat=currDayArray[2];}
    $0 ~ monthStat {print $'$1'"'"$2"'"$'$3'}
    '
    and usage:
    Code:
    #-----Monthly/Daily Bandwidth Usage
    ${font}${color2}NETWORK DATA USE${color6}${hr 1}${color2}
    ${goto 35}${color2}Today${goto 125}Monthly 
    ${color2}${goto 15}U:${goto 30}${color1}${font TransponderAOE:bold:size=12}${execpi 60 vnstat -d | awk '$0 ~ "'$(date +%D)'" {print $5"${goto 85}"$6}'}${goto 120}${execpi 60 vnstat -m | ~/.conky/conkyparts/42dorian-vnstat.sh 6 "\${goto 175}" 7}
    ${color2}${goto 15}D:${goto 30}${color4}${font TransponderAOE:bold:size=12}${execpi 60 vnstat -d | awk '$0 ~ "'$(date +%D)'" {print $2"${goto 85}"$3}'}${goto 120}${execpi 60 vnstat -m | ~/.conky/conkyparts/42dorian-vnstat.sh 3 "\${goto 175}" 4}
    ${color2}${goto 15}T:${goto 30}${color1}${font TransponderAOE:bold:size=12}${execpi 60 vnstat -d | awk '$0 ~ "'$(date +%D)'" {print $8"${goto 85}"$9}'}${goto 120}${execpi 60 vnstat -m | ~/.conky/conkyparts/42dorian-vnstat.sh 9 "\${goto 175}" 10}
    Last edited by dk75; June 5th, 2012 at 12:46 PM. Reason: litlle change in BASH script and it's call
    Linux Debian Sid (Minted) x86_64/3.12.10, Conky 2.0_pre, Xorg 7.7/1.15.0, KDE 4.11.5, Lenovo T61, Intel X3100, HITACHI HTS722010K9SA00 100GB, WDC_WD5000BEVT 500GB
    Linux user No.: 483055 | My Conky Pitstop corner | One4All project

  8. #20018
    Join Date
    Feb 2010
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by dk75 View Post
    What? I think we lost something in translation.
    Conky works as always and refreshing as always, it's terminal emulator that have problems with refreshing after some situation (like run Conky in background, or clear&reset). And it was always like that too (gnome-terminal you know?).
    Yes, I think we did. I'm a noob when it comes to a lot of stuff.

    You're saying the "conky not refreshing" problem people have been talking about is because of the "terminal" and not really conky?

    I'm sorry if I got it confused, I though it was conky as do others.

  9. #20019
    Join Date
    Jan 2009
    Beans
    11

    Re: Post your .conkyrc files w/ screenshots

    Hi guys, here's my current conky, nothing special, but I'm hoping you might be able to help me out with a little problem I'm having.

    Full size: http://img827.imageshack.us/img827/3...33840x1080.png


    I'm using a simple script to start both my conky config when I log in which seems to be working fine, both conky start up ok. But for some unknown reason my second conky closes randomly, sometime's it seems to work for hours, sometimes it disappears after just a few minutes, while the first one continues to work fine

    Below is my script I'm using to start conky, and my conky configs

    dual_conky.sh
    Code:
    #!/bin/bash
    
    sleep 2 &&
    conky -d -c ///etc/conky/conky.conf &
    sleep 2 &&
    conky -d -c ///etc/conky/conky_2.conf &
    exit
    conky.conf
    Code:
    background no
    font Sans:size=8
    #xftfont Sans:size=10
    use_xft yes
    xftalpha 0.9
    update_interval 1
    total_run_times 0
    own_window yes
    own_window_type normal
    own_window_transparent yes
    own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
    double_buffer yes
    minimum_size 220 5
    maximum_width 220
    draw_shades yes
    draw_outline no
    draw_borders no
    draw_graph_borders yes
    default_color 919BB0
    default_shade_color black
    default_outline_color green
    alignment top_left
    gap_x 8
    gap_y 5
    no_buffers yes
    uppercase no
    cpu_avg_samples 3
    override_utf8_locale no
    uppercase yes # set to yes if you want all text to be in uppercase
    
    TEXT
    ${color gray}SYSTEM ${hr 1}${color}
    #Node name: ${alignr}$nodename 
    System name: ${alignr}$sysname
    Kernel: ${alignr}$kernel
    Machine: ${alignr}$machine
    Uptime: $alignr$uptime
    
    ${voffset -5}${color gray}CPU ${hr 1}${color}
    Processes: ${alignr}$processes ($running_processes running)
    
    CPU1 ${alignr}${cpu cpu1}%
    ${cpugraph cpu1}
    CPU2 ${alignr}${cpu cpu2}%
    ${cpugraph cpu2}
    CPU3 ${alignr}${cpu cpu3}%
    ${cpugraph cpu3}
    CPU4 ${alignr}${cpu cpu4}%
    ${cpugraph cpu4}
    
    Highest CPU $alignr CPU% MEM%
    ${top name 1}$alignr${top cpu 1}${top mem 1}
    ${top name 2}$alignr${top cpu 2}${top mem 2}
    ${top name 3}$alignr${top cpu 3}${top mem 3}
    
    ${voffset -5}${color gray}MEMORY ${hr 1}${color}
    Ram ${alignr}$mem / $memmax ($memperc%)
    ${membar 4}
    swap ${alignr}$swap / $swapmax ($swapperc%)
    ${swapbar 4}
    
    Highest MEM $alignr CPU% MEM%
    ${top_mem name 1}$alignr${top_mem cpu 1}${top_mem mem 1}
    ${top_mem name 2}$alignr${top_mem cpu 2}${top_mem mem 2}
    ${top_mem name 3}$alignr${top_mem cpu 3}${top_mem mem 3}
    
    ${voffset -5}${color gray}Filesystem ${hr 1}${color}
    HDD Free Space: ${alignr}${fs_free /} / ${fs_size /}
    ${fs_bar 4 /}
    
    ${voffset -5}${color gray}NETWORK ${hr 1}${color}
    WiFi: ${wireless_link_qual wlan0}% 
    ${alignr}${wireless_link_bar 4,220 wlan0}
    
    IP address: ${alignr}${addr wlan0}
    Down ${downspeed wlan0}/s ${alignr}Up ${upspeed wlan0}/s
    ${downspeedgraph wlan0 25,107} ${alignr}${upspeedgraph wlan0 25,107}
    Total ${totaldown wlan0} ${alignr}Total ${totalup wlan0}
    conky_2.conf
    Code:
    background no
    font Sans:size=8
    #xftfont Sans:size=10
    use_xft yes
    xftalpha 0.9
    update_interval 10
    total_run_times 0
    own_window yes
    own_window_type normal
    own_window_transparent yes
    own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
    double_buffer yes
    minimum_size 220 5
    maximum_width 220
    draw_shades yes
    draw_outline no
    draw_borders no
    draw_graph_borders yes
    default_color 919BB0
    default_shade_color black
    default_outline_color green
    alignment top_right
    gap_x 1925
    gap_y 5
    no_buffers yes
    uppercase no
    cpu_avg_samples 3
    override_utf8_locale no
    uppercase yes # set to yes if you want all text to be in uppercase
    
    TEXT
    ${voffset -5}${color gray}WEATHER - Milton Keynes ${hr 1}$color$
    Precipitation/obscuartion:${alignr 2}${if_match "${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ EGTC weather}"==""}none${else}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ EGTC weather}${endif}
    #Precipitation: ${alignr}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ EGTC weather - }
    Temperature: ${alignr}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ EGTC temperature}${iconv_start UTF-8 ISO_8859-1}° ${iconv_stop}C
    Cloud: ${alignr}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ EGTC cloud_cover -}
    Wind Speed: ${alignr}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ EGTC wind_speed -}k/h
    Wind Direction: ${alignr}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ EGTC wind_dir -}
    Last Update: ${alignr}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ EGTC last_update - }
    
    ${voffset -5}${color gray}WEATHER - London ${hr 1}$color$
    Precipitation/obscuartion:${alignr 2}${if_match "${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ EGLC weather}"==""}none${else}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ EGLC weather}${endif}
    #Precipitation: ${alignr}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ EGLC weather - }
    Temperature: ${alignr}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ EGLC temperature}${iconv_start UTF-8 ISO_8859-1}° ${iconv_stop}C
    Cloud: ${alignr}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ EGLC cloud_cover -}
    Wind Speed: ${alignr}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ EGLC wind_speed -}k/h
    Wind Direction: ${alignr}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ EGLC wind_dir -}
    Last Update: ${alignr}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ EGLC last_update - }
    
    ${voffset -5}${color gray}Time ${hr 1}$color$
    UK current:$alignr ${tztime Europe/London %H:%M}
    Greenwich mean time:$alignr ${tztime Europe/GMT %H:%M}
    US, Central:$alignr ${tztime US/Central %H:%M}
    Victoria, Australia:$alignr ${tztime Australia/Victoria %H:%M}
    Edit- second question: even with "uppercase no" both my conkys are in all caps, any ideas how to change that?
    Last edited by littleport2003; June 5th, 2012 at 08:03 PM.

  10. #20020
    Join Date
    Nov 2008
    Location
    Opelika, AL
    Beans
    998
    Distro
    Ubuntu Development Release

    Re: Post your .conkyrc files w/ screenshots

    Here's mine:

    Code:
    # Conky settings #
    background no
    update_interval 1
    
    cpu_avg_samples 2
    net_avg_samples 2
    
    override_utf8_locale yes
    
    double_buffer yes
    no_buffers yes
    
    text_buffer_size 2048
    #imlib_cache_size 0
    
    temperature_unit fahrenheit
    
    # Window specifications #
    
    own_window yes
    own_window_type override
    own_window_transparent yes
    own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below
    
    border_inner_margin 0
    border_outer_margin 0
    
    minimum_size 200 250
    maximum_width 200
    
    alignment tr
    gap_x 35
    gap_y 55
    
    # Graphics settings #
    draw_shades no
    draw_outline no
    draw_borders no
    draw_graph_borders no
    
    # Text settings #
    use_xft yes
    xftfont Lucinda_Grande:size=8
    xftalpha 0.5
    
    uppercase no
    
    temperature_unit fahrenheit
    
    
    default_color FFFFFF
    
    # Lua Load  #
    lua_load ~/.lua/scripts/clock_rings.lua
    lua_draw_hook_pre clock_rings
    
    TEXT
    ${voffset 8}${color 0066FF}${font Lucinda_Grande:size=16}${time %A}${font}${voffset -8}${alignr 50}${color FFFFFF}${font Lucinda_Grande:size=38}${time %e}${font}
    ${color FFFFFF}${voffset -30}${color FFFFFF}${font Lucinda_Grande:size=18}${time %b}${font}${voffset -3} ${color FFFFFF}${font Lucinda_Grande:size=20}${time %Y}${font}${color 0066FF}${hr}
    ${voffset 140}${font Lucinda_Grande:size=10}${alignr}TEMP${font}
    ${font Lucinda_Grande:size=12}${color FFFFFF}${alignr}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ KAUO temperature temperature 30} °F${font}
    ${image ~/.conky/new-ubuntu-logo.png -p 64,125 -s 70x20}
    
    ${color FFFFFF}${goto 25}${voffset 35}${cpu cpu0}%
    ${color 0066FF}${goto 25}CPU
    ${color FFFFFF}${goto 50}${voffset 23}${memperc}%
    ${color 0066FF}${goto 50}RAM
    ${color FFFFFF}${goto 75}${voffset 23}${swapperc}%
    ${color 0066FF}${goto 75}Swap
    ${color FFFFFF}${goto 100}${voffset 23}${fs_used_perc /}%
    ${color 0066FF}${goto 100}Disk
    ${color FFFFFF}${goto 125}${voffset 25}${downspeed eth0}
    ${color FFFFFF}${goto 125}${upspeed eth0}
    ${color 0066FF}${goto 125}Net
    
    
    
    ${color FFFFFF}${font Lucinda_Grande:size=8}Uptime: ${uptime_short}
    ${color FFFFFF}${font Lucinda_Grande:size=8}Processes: ${processes}
    ${color FFFFFF}${font Lucinda_Grande:size=8}Running: ${running_processes}
    
    
    ${color FFFFFF}${font Lucinda_Grande:size=8}${alignr}${nodename}
    ${color FFFFFF}${font Lucinda_Grande:size=8}${alignr}${pre_exec cat /etc/issue.net}  $machine
    ${color FFFFFF}${font Lucinda_Grande:size=8}${alignr}Kernel: ${kernel}
    
    ${font Lucinda_Grande:size=9}${alignc}${color 0066CC}G${color CC3300}M${color FFCC00}a${color 0066CC}i${color 009933}l${color FFFFFF}:	${color FFFFFF}You have ${color FF0000}${texeci 100 python ~/.scripts/gmail.py} ${color FFFFFF}new email(s).
    ${font Lucinda_Grande:size=9}${alignc}${color 7B0099}Yahoo:	${color FFFFFF}You have ${color FF0000}${texeci 100 python ~/.scripts/imap.py} ${color FFFFFF}new email(s).
    and the scripts:

    Gmail:

    Code:
    import os
    import string
    
    #Enter your username and password below within double quotes
    # eg. username="username" and password="password"
    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])
    
    if fc==0:
       print "0"
    else:
       print str(fc);
    Yahoo:

    Code:
    # Author: Bhavik Shah
    # Created: 3/5/09
    # Modified by: Jonathan Wingo
    # Modified: 6/5/12
    # Description: Simple script that uses the python imap library
    # to retrieve number of messages and unread messages from your 
    # imap email account. 
    
    # Script is free. Credit to bhaviksblog.com is appreciated =)
    
    import imaplib
    
    # Username should be your username with '@gmail.com' added
    # I think the @gmail.com is required.
    # If you're trying it with something other than gmail
    # you should make the username the full email address
    # example@domain.com
    username = '#########' 
    password = '#########' # your pw
    mailbox = 'INBOX' # inbox is default
    
    # only tested with gmail and my university email
    # it should work with any imap server
    # change mail server and port to match your server's info
    mailserver = 'imap.mail.yahoo.com'
    port = 993
    
    # connect to gmail's server (uses SSL, port 993)
    server = imaplib.IMAP4_SSL(mailserver,port)
    
    # gmail uses ssl...if your imap mail server doesn't comment the above
    # line and uncomment this one.
    # server = imaplib.IMAP4(mailserver,port)
    
    # login with the variables provided up top
    server.login(username,password)
    
    # select your mailbox
    server.select(mailbox)
    
    # pull info for that mailbox
    data = str(server.status(mailbox, '(MESSAGES UNSEEN)'))
    
    # print it all out
    #print
    #print 'Yahoo' #change this if ur not using gmail
    #print username.replace('@gmail.com','') + '\'s Mailbox'
    tokens = data.split()
    
    # clean up output with str_replace()
    #print tokens[2].replace('(',''),tokens[3] 
    #print tokens[4],tokens[5].replace(')\'])','')
    #print
    unseen = tokens[5].replace(')\'])','')
    
    if unseen==0:
       print "0"
    else:
       print (unseen);
    
    # close the mailbox
    server.close()
    
    # logout of the server
    server.logout()
    Lua Rings:

    Code:
    --[[
    Clock Rings by Linux Mint (2011) reEdited by despot77
    
    This script draws percentage meters as rings, and also draws clock hands if you want! It is fully customisable; all options are described in the script. This script is based off a combination of my clock.lua script and my rings.lua script.
    
    IMPORTANT: if you are using the 'cpu' function, it will cause a segmentation fault if it tries to draw a ring straight away. The if statement on line 145 uses a delay to make sure that this doesn't happen. It calculates the length of the delay by the number of updates since Conky started. Generally, a value of 5s is long enough, so if you update Conky every 1s, use update_num>5 in that if statement (the default). If you only update Conky every 2s, you should change it to update_num>3; conversely if you update Conky every 0.5s, you should use update_num>10. ALSO, if you change your Conky, is it best to use "killall conky; conky" to update it, otherwise the update_num will not be reset and you will get an error.
    
    To call this script in Conky, use the following (assuming that you save this script to ~/scripts/rings.lua):
        lua_load ~/scripts/clock_rings.lua
        lua_draw_hook_pre clock_rings
        
    Changelog:
    + v1.0 -- Original release (30.09.2009)
       v1.1p -- Jpope edit londonali1010 (05.10.2009)
    *v 2011mint -- reEdit despot77 (18.02.2011)
    ]]
    
    settings_table = {
        {
            -- Edit this table to customise your rings.
            -- You can create more rings simply by adding more elements to settings_table.
            -- "name" is the type of stat to display; you can choose from 'cpu', 'memperc', 'fs_used_perc', 'battery_used_perc'.
            name='time',
            -- "arg" is the argument to the stat type, e.g. if in Conky you would write ${cpu cpu0}, 'cpu0' would be the argument. If you would not use an argument in the Conky variable, use ''.
            arg='%I.%M',
            -- "max" is the maximum value of the ring. If the Conky variable outputs a percentage, use 100.
            max=12,
            -- "bg_colour" is the colour of the base ring.
            bg_colour=0xffffff,
            -- "bg_alpha" is the alpha value of the base ring.
            bg_alpha=0.1,
            -- "fg_colour" is the colour of the indicator part of the ring.
            fg_colour=0x0066FF,
            -- "fg_alpha" is the alpha value of the indicator part of the ring.
            fg_alpha=0.2,
            -- "x" and "y" are the x and y coordinates of the centre of the ring, relative to the top left corner of the Conky window.
            x=100, y=150,
            -- "radius" is the radius of the ring.
            radius=50,
            -- "thickness" is the thickness of the ring, centred around the radius.
            thickness=5,
            -- "start_angle" is the starting angle of the ring, in degrees, clockwise from top. Value can be either positive or negative.
            start_angle=0,
            -- "end_angle" is the ending angle of the ring, in degrees, clockwise from top. Value can be either positive or negative, but must be larger than start_angle.
            end_angle=360
        },
        {
            name='time',
            arg='%M.%S',
            max=60,
            bg_colour=0xffffff,
            bg_alpha=0.1,
            fg_colour=0x0066FF,
            fg_alpha=0.4,
            x=100, y=150,
            radius=56,
            thickness=5,
            start_angle=0,
            end_angle=360
        },
        {
            name='time',
            arg='%S',
            max=60,
            bg_colour=0xffffff,
            bg_alpha=0.1,
            fg_colour=0x0066FF,
            fg_alpha=0.6,
            x=100, y=150,
            radius=62,
            thickness=5,
            start_angle=0,
            end_angle=360
        },
        {
            name='time',
            arg='%d',
            max=31,
            bg_colour=0xffffff,
            bg_alpha=0.1,
            fg_colour=0x0066FF,
            fg_alpha=0.8,
            x=100, y=150,
            radius=70,
            thickness=5,
            start_angle=-90,
            end_angle=90
        },
        {
            name='time',
            arg='%m',
            max=12,
            bg_colour=0xffffff,
            bg_alpha=0.1,
            fg_colour=0x0066FF,
            fg_alpha=1,
            x=100, y=150,
            radius=76,
            thickness=5,
            start_angle=-90,
            end_angle=90
        },
        {
            name='cpu',
            arg='cpu0',
            max=100,
            bg_colour=0xffffff,
            bg_alpha=0.2,
            fg_colour=0x0066FF,
            fg_alpha=0.8,
            x=50, y=300,
            radius=25,
            thickness=5,
            start_angle=-90,
            end_angle=180
        },
        {
            name='memperc',
            arg='',
            max=100,
            bg_colour=0xffffff,
            bg_alpha=0.2,
            fg_colour=0x0066FF,
            fg_alpha=0.8,
            x=75, y=350,
            radius=25,
            thickness=5,
            start_angle=-90,
            end_angle=180
        },
        {
            name='swapperc',
            arg='',
            max=100,
            bg_colour=0xffffff,
            bg_alpha=0.2,
            fg_colour=0x0066FF,
            fg_alpha=0.8,
            x=100, y=400,
            radius=25,
            thickness=5,
            start_angle=-90,
            end_angle=180
        },
        {
            name='fs_used_perc',
            arg='/',
            max=100,
            bg_colour=0xffffff,
            bg_alpha=0.2,
            fg_colour=0x0066FF,
            fg_alpha=0.8,
            x=125, y=450,
            radius=25,
            thickness=5,
            start_angle=-90,
            end_angle=180
        },
            {
            name='downspeedf',
            arg='eth0',
            max=7168,
            bg_colour=0xffffff,
            bg_alpha=0.2,
            fg_colour=0x0066FF,
            fg_alpha=0.8,
            x=150, y=500,
            radius=25,
            thickness=4,
            start_angle=-90,
            end_angle=180
        },
            {
            name='upspeedf',
            arg='eth0',
            max=500,
            bg_colour=0xffffff,
            bg_alpha=0.2,
            fg_colour=0xff3300,
            fg_alpha=0.8,
            x=150, y=500,
            radius=20,
            thickness=4,
            start_angle=-90,
            end_angle=180
        },
    }
    
    -- Use these settings to define the origin and extent of your clock.
    
    clock_r=65
    
    -- "clock_x" and "clock_y" are the coordinates of the centre of the clock, in pixels, from the top left of the Conky window.
    
    clock_x=100
    clock_y=150
    
    show_seconds=true
    
    require 'cairo'
    
    function rgb_to_r_g_b(colour,alpha)
        return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
    end
    
    function draw_ring(cr,t,pt)
        local w,h=conky_window.width,conky_window.height
        
        local xc,yc,ring_r,ring_w,sa,ea=pt['x'],pt['y'],pt['radius'],pt['thickness'],pt['start_angle'],pt['end_angle']
        local bgc, bga, fgc, fga=pt['bg_colour'], pt['bg_alpha'], pt['fg_colour'], pt['fg_alpha']
    
        local angle_0=sa*(2*math.pi/360)-math.pi/2
        local angle_f=ea*(2*math.pi/360)-math.pi/2
        local t_arc=t*(angle_f-angle_0)
    
        -- Draw background ring
    
        cairo_arc(cr,xc,yc,ring_r,angle_0,angle_f)
        cairo_set_source_rgba(cr,rgb_to_r_g_b(bgc,bga))
        cairo_set_line_width(cr,ring_w)
        cairo_stroke(cr)
        
        -- Draw indicator ring
    
        cairo_arc(cr,xc,yc,ring_r,angle_0,angle_0+t_arc)
        cairo_set_source_rgba(cr,rgb_to_r_g_b(fgc,fga))
        cairo_stroke(cr)        
    end
    
    function draw_clock_hands(cr,xc,yc)
        local secs,mins,hours,secs_arc,mins_arc,hours_arc
        local xh,yh,xm,ym,xs,ys
        
        secs=os.date("%S")    
        mins=os.date("%M")
        hours=os.date("%I")
            
        secs_arc=(2*math.pi/60)*secs
        mins_arc=(2*math.pi/60)*mins+secs_arc/60
        hours_arc=(2*math.pi/12)*hours+mins_arc/12
            
        -- Draw hour hand
        
        xh=xc+0.7*clock_r*math.sin(hours_arc)
        yh=yc-0.7*clock_r*math.cos(hours_arc)
        cairo_move_to(cr,xc,yc)
        cairo_line_to(cr,xh,yh)
        
        cairo_set_line_cap(cr,CAIRO_LINE_CAP_ROUND)
        cairo_set_line_width(cr,5)
        cairo_set_source_rgba(cr,1.0,1.0,1.0,1.0)
        cairo_stroke(cr)
        
        -- Draw minute hand
        
        xm=xc+clock_r*math.sin(mins_arc)
        ym=yc-clock_r*math.cos(mins_arc)
        cairo_move_to(cr,xc,yc)
        cairo_line_to(cr,xm,ym)
        
        cairo_set_line_width(cr,3)
        cairo_stroke(cr)
        
        -- Draw seconds hand
        
        if show_seconds then
            xs=xc+clock_r*math.sin(secs_arc)
            ys=yc-clock_r*math.cos(secs_arc)
            cairo_move_to(cr,xc,yc)
            cairo_line_to(cr,xs,ys)
        
            cairo_set_line_width(cr,1)
            cairo_stroke(cr)
        end
    end
    
    function conky_clock_rings()
        local function setup_rings(cr,pt)
            local str=''
            local value=0
            
            str=string.format('${%s %s}',pt['name'],pt['arg'])
            str=conky_parse(str)
            
            value=tonumber(str)
            pct=value/pt['max']
            
            draw_ring(cr,pct,pt)
        end
        
        -- Check that Conky has been running for at least 5s
    
        if conky_window==nil then return end
        local cs=cairo_xlib_surface_create(conky_window.display,conky_window.drawable,conky_window.visual, conky_window.width,conky_window.height)
        
        local cr=cairo_create(cs)    
        
        local updates=conky_parse('${updates}')
        update_num=tonumber(updates)
        
        if update_num>5 then
            for i in pairs(settings_table) do
                setup_rings(cr,settings_table[i])
            end
        end
        
        draw_clock_hands(cr,clock_x,clock_y)
    end
    Attached Images Attached Images
    -o)
    /\\
    _\_V
    Message void if penguin is violated...Don't mess with the penguin.

Page 2002 of 2299 FirstFirst ... 1002150219021952199220002001200220032004201220522102 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •