Page 1477 of 2306 FirstFirst ... 477977137714271467147514761477147814791487152715771977 ... LastLast
Results 14,761 to 14,770 of 23059

Thread: Post your .conkyrc files w/ screenshots

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

    Re: Conky Calendar

    Quote Originally Posted by Crinos512 View Post
    Very nice! ... well done, sir!
    Thank you!

    It's funny how you can look at something for months... Then, all of a sudden, it strikes you.

    Such is Conky...
    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. #14762
    Join Date
    Sep 2010
    Location
    Between Hell and Oblivion
    Beans
    11

    Re: Post your .conkyrc files w/ screenshots

    Original script from VinDSL


    Code:
    Use XFT? Required to Force UTF8 (see below).
    #
    use_xft yes
    xftfont LiberationSans:size=9
    xftalpha 0.1
    text_buffer_size 2048
    
    ####
    ## Force UTF8? Requires XFT (see above).
    ## Displays degree symbol, instead of °, etc.
    #
    override_utf8_locale yes
    
    ####
    ## Update interval in seconds.
    #
    update_interval 1.5
    
    ####
    ## This is the number of times Conky will update before quitting.
    ## Set to zero to run forever.
    #
    total_run_times 0
    
    ####
    ## Create own window instead of using desktop (required in nautilus)?
    #
    own_window yes
    own_window_type override
    own_window_transparent yes
    
    ####
    ## Use double buffering? Reduces flicker.
    #
    double_buffer yes
    
    ####
    ## Draw shades?
    #
    draw_shades no
    
    ####
    ## Draw outlines?
    #
    draw_outline no
    
    ####
    ## Draw borders around text?
    #
    draw_borders no
    
    ####
    ## Draw borders around graphs?
    #
    draw_graph_borders no
    
    ####
    ## Print text to stdout?
    ## Print text in console?
    #
    out_to_ncurses no
    out_to_console no
    
    ####
    ## Text alignment.
    #
    alignment top_right
    
    ####
    ## Minimum size of text area.
    #
    minimum_size 235 0
    
    ####
    ## Specify width and height for bars.
    #
    default_bar_size 0 4
    
    ####
    ## Gap between text and screen borders.
    #
    gap_x 10
    gap_y 28
    
    ####
    ## Shorten MiB/GiB to M/G in stats.
    #
    short_units yes
    
    ####
    ## Pad % symbol spacing after numbers.
    #
    pad_percents 0
    
    ####
    ## Limit the length of names in "Top Processes".
    #
    top_name_width 10
    
    ####
    ## Subtract file system -/+buffers/cache from used memory?
    ## Set to yes, to produce meaningful physical memory stats.
    #
    no_buffers yes
    
    ####
    ## Set to yes, if you want all text to be in UPPERCASE.
    #
    uppercase no
    
    ####
    ## Number of cpu samples to average.
    ## Set to 1 to disable averaging.
    #
    cpu_avg_samples 2
    
    ####
    ## Number of net samples to average.
    ## Set to 1 to disable averaging.
    #
    net_avg_samples 2
    
    ####
    ## Add spaces to keep things from moving around?
    ## Only affects certain objects.
    #
    use_spacer right
    
    ####
    ## My colors.
    #
    color0 White
    color1 Ivory
    color2 Ivory2
    color3 Ivory3
    color4 Tan1
    color5 Tan2
    color6 Gray
    color7 AntiqueWhite4
    color8 DarkSlateGray
    color9 Black
    
    TEXT
    
    ##################
    ##    SYSTEM    ##
    ##################
    ${voffset 10}${font Arial:bold:size=9.5}${color8}SYSTEM ${color8} ${hr 2}
    ${voffset 4}${font OpenLogos:size=10}${color2}u${voffset -4}${font}${color6} ${sysname} ${kernel} ${alignr} ${machine}
    ${voffset 2}${font StyleBats:size=10}${color2}A${voffset  -1}${font}${color6} Intel P4 Extreme Edition ${alignr}${freq_g cpu0} GHz
    ${voffset 2}${font StyleBats:size=10}${color2}q${voffset -1}${font}${color6} Uptime ${alignr}${uptime}
    ${voffset 2}${font StyleBats:size=10}${color2}o${voffset -1}${font}${color6} File System ${alignr}${fs_type}
    ##################
    ##  PROCESSORS  ##
    ##################
    ${voffset 5}${font Arial:bold:size=9.5}${color8}PROCESSORS ${color8}${hr 2}
    ${voffset 2}${font StyleBats:size=10}${color2}k${voffset  -2}${font}${color6} CPU1  ${cpu cpu1}%${color7}${alignc 35}${cpubar  cpu1}
    ${voffset 2}${font StyleBats:size=10}${color2}k${voffset  -2}${font}${color6} CPU2  ${cpu cpu2}%${color7}${alignc 35}${cpubar  cpu2}
    ##################
    ##    MEMORY    ##
    ##################
    ${voffset 5}${font Arial:bold:size=9.5}${color8}MEMORY ${color8}${hr 2}
    ${voffset 2}${font StyleBats:size=10}${color2}l${voffset -2}${font}${color6} RAM ${goto 95}${mem}/ ${memmax}${alignr}${memperc}%
    ${color7}${membar}
    ##################
    ##     HDD      ##
    ##################
    ${voffset 2}${font Arial:bold:size=9.5}${color8}HDD ${color8}${hr 2}
    ${voffset 2}${font StyleBats:size=10}${color2}x${voffset  -2}${font}${color6} ROOT ${goto 95}${fs_used /} / ${fs_size  /}${alignr}${fs_free_perc /}%
    ${color7}${fs_bar /}
    ${voffset 2}${font StyleBats:size=10}${color2}x${voffset  -2}${font}${color6} HOME ${goto 95}${fs_used /home}/ ${fs_size  /home}${alignr}${fs_free_perc /home}%
    ${color7}${fs_bar /home}
    ${voffset 2}${font StyleBats:size=10}${color2}4${voffset  -2}${font}${color6} SWAP ${goto 95}${swap} /  ${swapmax}${alignr}${swapperc}%
    ${color7}${swapbar}
    ##################
    # TOP PROCESSES ##
    ##################
    ${voffset 3}${font Arial:bold:size=9.5}${color8}TOP PROCESSES ${color8}${hr 2}
    ${voffset 2}${font StyleBats:size=10}${color1}h${voffset  -3}${font}${color6} ${top_mem name 1}${goto 115}${top_mem mem_res  1}${alignr}${top_mem mem 1}%
    ${voffset 2}${font StyleBats:size=10}${color1}h${voffset  -3}${font}${color6} ${top_mem name 2}${goto 115}${top_mem mem_res  2}${alignr}${top_mem mem 2}%
    ${voffset 2}${font StyleBats:size=10}${color1}h${voffset  -3}${font}${color6} ${top_mem name 3}${goto 115}${top_mem mem_res  3}${alignr}${top_mem mem 3}%
    ${voffset 2}${font StyleBats:size=10}${color1}h${voffset  -3}${font}${color6} ${top_mem name 4}${goto 115}${top_mem mem_res  4}${alignr}${top_mem mem 4}%
    ${voffset 2}${font StyleBats:size=10}${color1}h${voffset  -3}${font}${color6} ${top_mem name 5}${goto 115}${top_mem mem_res  5}${alignr}${top_mem mem 5}%
    ##################
    ##   NETWORK    ##
    ##################
    ${voffset 5}${font Arial:bold:size=9.5}${color8}NETWORK ${color8}${hr 2}
    ${voffset 2}${font PizzaDude Bullets:size=10}${color2}a${font}${color6}  IPs on eth0${alignr}${addr eth0} / ${execi 600 wget -q -O -  checkip.dyndns.org | sed -e 's/[^[:digit:]\|.]//g'}
    ${voffset 4}${font PizzaDude Bullets:size=10}${color2}T${font}${color6} Down${alignr}${downspeed eth0}
    ${font PizzaDude Bullets:size=10}${color2}N${font}${color6} Up${alignr}${upspeed eth0}
    ${voffset 4}${font PizzaDude Bullets:size=10}${color2}T${font}${color6} Downloaded${alignr}${totaldown eth0}
    ${font PizzaDude Bullets:size=10}${color2}N${font}${color6} Uploaded${alignr}${totalup eth0}
    
    
    
    ##################
    ##   CALENDAR   ##
    ##################
    ${voffset -30}${font Arial:bold:size=9.5}${color8}DATE ${color8}${hr 2}
    ${voffset 4}${font LiberationSansBold:size=10.5}${color8}${alignc 6}${execpi 600 date +'%B${offset 6}%Y'}
    # You must make exactly 21 spaces, on the next line, for the calendar  formatting to be correct.                           |---- 21 spaces ---|
    ${voffset 2}${font LiberationMono:size=9.5}${color8}${execpi 600  DJS=`date +%_d`; cal | sed '1d' | sed '/./!d' | sed 's/$/                     /' | fold -w 21 | sed -n '/^.\{21\}/p' | sed 's/^/${offset 36}/' |  sed /" $DJS "/s/" $DJS "/" "'${color4}'"$DJS"'${color3}'" "/}
    Attached Images Attached Images

  3. #14763
    Join Date
    Nov 2010
    Beans
    10

    Re: Post your .conkyrc files w/ screenshots

    I'm having problems with my conky, as no matter where I put the alignment, it keeps showing up top left. Also, I have a transparent background behind it (which I want, due to having some light desktop background pictures), but it seems to be going from top to bottom of my screen, instead of just being behind the conky text.

    I've been fighting both for days, numerous reboots, but can't figure it out.

    Two questions:

    1. What's wrong with my alignment? Seems like something else is overwriting the alignment setting.

    2. How do I just keep the transparent background of the conky to just being behind the displayed conky text?

    Thanks!

    Code:
    background no
    use_xft yes
    xftfont Sans:size=12
    xftalpha 0.1
    update_interval 2
    total_run_times 0
    own_window yes
    own_window_type normal
    own_window_transparent no #set to yes if not using next three lines
    own_window_argb_visual yes #sets color of panel
    own_window_colour 000000
    own_window_argb_value 20 #adjust between 0 (completely transparent) and 255 (opaque)
    own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
    double_buffer true
    minimum_size 200 5
    alignment bottom_left
    #Gap between borders of screen and text
    gap_x 20
    gap_y 10
    no_buffers yes
    uppercase no
    override_utf8_locale yes
    color1 AntiqueWhite2
    color2 DarkSlateGray
     
    TEXT
    ###############
    ## Times ##
    ###############
    ${voffset -4}${if_match ${time %l}<=9}${font RadioSpace:size=32}${color1}${alignc 2}${time %l:%M%p }${else}${if_match ${time %l}>=10}${font RadioSpace:size=32}${color1}${alignc 2}${time %l:%M%p}${endif}${endif}
    ${voffset -35}${font LiberationSans:size=8}${color1}${alignc 5}Sunrise${offset 1}${execi 600 conkyForecast --location=USIN0524 --datatype=SR --startday=1}${color1}${offset 2}|${offset 2}${color1}Sunset${offset 1}${execi 600 conkyForecast --location=USIN0524 --datatype=SS --startday=1}
     
    #####################
    ## CALENDAR & DATE ##
    #####################
    ${color orange}${font StyleBats:bold:size=10}u${voffset -4}${goto 30}${font Arial:bold:size=10}CALENDAR ${color2}${hr 2}
    ${voffset 10}${font :bold:size=8}${color1}${goto 180}${time %A}
    ${font :bold:size=16}${goto 192}${time %d}${font}
    ${font :bold:size=10}${goto 192}${time %b}
    ${font :bold:size=8}${goto 192}${time %Y}
     
    ${voffset -100}${font DejaVu Sans Mono :size=8}${exec gcal | cut -c23-44 --complement}
    ${execpi 60 DJS=`date +%_d`; cal | sed '1d' | sed '/./!d' | sed 's/$/ /' | fold -w 21 | sed -n '/^.\{21\}/p' | sed 's/^/ /' | sed /" $DJS "/s/" $DJS "/" "'${color orange}'"$DJS"'${color1}'" "/}
     
    ######################
    ## Atmosphere ##
    ######################
    ${color orange}${font Martin Vogel's Symbols:bold:size=10}m${voffset -2}${goto 30}${font Arial:bold:size=10}ATMOSPHERE ${color2}${hr 2}
    ${voffset 3}${font Vibrocentric:italic:size=8}${color orange}${alignc}Current Forecast
    ${font Vibrocentric:size=8}${color1}${voffset 7}${goto 75}${color1}${font Weather:size=22}y${voffset -3}${alignc -5}${font RadioSpace:size=16}${color1} ${execpi 600 conkyForecast --imperial --location=USIN0524}
    ${voffset -10}${font LiberationSans:size=10}${color1}${alignc}${execi 600 conkyForecast --location=USIN0524 --datatype=CT}
    ${voffset -5}${font Vibrocentric:size=8}${color1}${goto 32}${execi 600 conkyForecast --location=USIN0524 --datatype=DW --startday=0 --shortweekday}
    ${voffset 3}${goto 20}${font ConkyWeather:size=32}${execi 600 conkyForecast --location=USIN0524 --datatype=WF --startday=0}
    ${voffset -20}${goto 22}${font Vibrocentric:size=8}${color1}${execi 600 conkyForecast --location=USIN0524 --imperial --datatype=HT --startday=0 --hideunits --centeredwidth=4 -iu}/${execi 600 conkyForecast --location=USIN0524 --imperial --datatype=LT --startday=0 --hideunits --centeredwidth=4 -iu}
    #two graphics on right
    ${voffset -64}${goto 110}${font ConkyWeather:style=Bold:size=32}${color1}${execi 600 conkyForecast --location=USIN0524 --datatype=WF}${goto 185}${voffset -6}${font ConkyWindNESW:style=Bold:size=32}${color1}${execi 600 conkyForecast --location=USIN0524 --datatype=BS}
    #two text on right
    ${voffset -9}${goto 95}${font Vibrocentric:size=8}${color1}Feels like ${execi 600 conkyForecast --location=USIN0524 --imperial --datatype=LT --centeredwidth=4 -iu}${goto 188}${execi 600 conkyForecast --location=USIN0524 --imperial --datatype=WS}
     
    ${font Vibrocentric:size=8}${color1}${voffset 2}Barometer: ${goto 90}${execpi 300 conkyForecast --location=USIN0524 --datatype=BR --imperial} (${execpi 300 conkyForecast --location=USIN0524 --datatype=BD})
    ${voffset 2}Rain Chance:${goto 90}${execi 3600 conkyForecast --location=USIN0524 --datatype=PC --startday=0 -iu}${goto 145}Dew Point: ${alignr}${execi 1800 conkyForecast --location=USIN0524 --datatype=DP --imperial}
    ${voffset 2}Humidity:${goto 90}${execpi 300 conkyForecast –location=USIN0524 --datatype=HM}${goto 145}Visibility:${alignr}${execpi 300 conkyForecast --location=USIN0524 --datatype=VI --imperial}
     
    ${font Vibrocentric:italic:size=8}${color orange}${alignc}Extended Forecast
    ${font Vibrocentric:size=8}${color1}${voffset 10}${goto 30}${execi 600 conkyForecast --location=USIN0524 --datatype=DW --startday=1 --shortweekday}${goto 83}${execi 600 conkyForecast --location=USIN0524 --datatype=DW --startday=2 --shortweekday}${goto 136}${execi 600 conkyForecast --location=USIN0524 --datatype=DW --startday=3 --shortweekday}${goto 192}${execi 600 conkyForecast --location=USIN0524 --datatype=DW --startday=4 --shortweekday}
    ${goto 20}${font ConkyWeather:size=32}${execi 600 conkyForecast --location=USIN0524 --datatype=WF --startday=1 --endday=4 --spaces=1}
    ${goto 22}${voffset -30}${font Vibrocentric:size=8}${color1}${execi 600 conkyForecast --location=USIN0524 --imperial --datatype=HT --startday=1 --hideunits --centeredwidth=4 -iu}/${execi 600 conkyForecast --location=USIN0524 --imperial --datatype=LT --startday=1 --hideunits --centeredwidth=4 -iu}${goto 76}${execi 600 conkyForecast --location=USIN0524 --imperial --datatype=HT --startday=2 --hideunits --centeredwidth=4 -iu}/${execi 600 conkyForecast --location=USIN0524 --imperial --datatype=LT --startday=2 --hideunits --centeredwidth=4 -iu}${goto 130}${execi 600 conkyForecast --location=USIN0524 --imperial --datatype=HT --startday=3 --hideunits --centeredwidth=4 -iu}/${execi 600 conkyForecast --location=USIN0524 --imperial --datatype=LT --startday=3 --hideunits --centeredwidth=4 -iu}${goto 185}${execi 600 conkyForecast --location=USIN0524 --imperial --datatype=HT --startday=4 --hideunits --centeredwidth=4 -iu}/${execi 600 conkyForecast --location=USIN0524 --imperial --datatype=LT --startday=4 --hideunits --centeredwidth=4 -iu}
    ${voffset 3}${goto 34}${execi 3600 conkyForecast --location=USIN0524 --datatype=PC --startday=1 --endday=4 --spaces=10 -iu}${color}
    Last edited by mastery; November 17th, 2010 at 07:32 PM.

  4. #14764
    Join Date
    Jul 2005
    Location
    The Netherlands
    Beans
    209
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by mastery View Post
    w00t
    Please put your code in code tags.

    In lua, is it possible to have cairo renders nested in cairo renders? I'm having trouble rotating individual letters in a string of text.
    Laptop: i7 4800MQ 2.7GHz (~3.7GHz); 2x 4GB Kingston HyperX Genesis 1600MHz; Nvidia 780M 4GB; Crucial M4 256GB SSD; Ubuntu 14.04 LTS x64 and Windows 8.1 x64.
    Ubuntu #8076 / Linux #429448

  5. #14765
    Join Date
    Jul 2008
    Location
    Connecticut, U.S.
    Beans
    106
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Post your .conkyrc files w/ screenshots

    Hey guys, I am trying to modify this gmail script so that when I have a new email waiting for me, the color changes. What would be the best way to do this? I tried adding ${color3} to the print section but for some reason that did not work.

    Code:
    #!/usr/bin/perl
    
    use Switch;
    use Text::Wrap;
    
    my $what=$ARGV[0];
    
    $user="lolnotmyaddy"; #username for gmail account
    $pass="lolnotmypw"; #password for gmail account
    $file="/tmp/gmail-hh.html"; #temporary file to store gmail
    
    #wrap format for subject
    $Text::Wrap::columns=65; #Number of columns to wrap subject at
    $initial_tab=""; #Tab for first line of subject
    $subsequent_tab="\t"; #tab for wrapped lines
    $quote="\-"; #put quotes around subject
    
    #limit the number of emails to be displayed
    $emails=4; #if -1 display all emails
    
    &passwd; #give password the proper url character encoding
    
    switch($what){ #determine what the user wants
    	case "n" {&gmail; print "$new\n";} #print number of new emails
    	case "s" { #print $from and $subj for new email
    		&gmail;
    		if ($new>0){
    			my $size=@from;
    			if ($emails!=-1 && $size>$emails){$size=$emails;} #limit number of emails displayed
    			for(my $i=0; $i<$size; ++$i){
    				print "From: $from[$i]\n"; #print from line
    				$text=$quote.$subj[$i].$quote."\n";
    				print wrap($initial_tab, $subsequent_tab, $text); #print subject with word wrap
    			}
    			$size=@from;
    			if ($emails!=-1 && $size >$emails){print "$emails out of $size new emails displayed\n";}
    		}
    	} 	
    	case "e" { #print number of new emails, $from, and $subj
    		&gmail;
    		if($new==0){print "You have no new emails.\n";}
    		else{
    			print "You have $new new email(s).\n";
    			my $size=@from;
    			if ($emails!=-1 && $size>$emails){$size=$emails;} #limit number of emails displayed
    			for(my $i=0; $i<$size; ++$i){
    				#print "From: $from[$i]\n"; #print from line
    				$text=$quote.$subj[$i].$quote;
    				#print wrap($initial_tab, $subsequent_tab, $text); #print subject with word wrap
    			}
    			$size=@from;
    			if ($emails!=-1 && $size >$emails){print "$emails out of $size new emails displayed\n";}
    		}
    	}
    	else {
    		print "Usage Error: gmail.pl <option>\n";
    		print "\tn displays number of new emails\n";
    		print "\ts displays from line and subject line for each new email.\n";
    		print "\te displays the number of new emails and from line plus \n";
    		print "\t\tsubject line for each new email.\n";
    	} #didn't give proper option
    }
    
    sub gmail{
    	if(!(-e $file)){ #create file if it does not exists
    		`touch $file`;
    	} 
    
    	#get new emails
    	`wget -O - https://$user:$pass\@mail.google.com/mail/feed/atom --no-check-certificate> $file`;
    
    	open(IN, $file); #open $file
    
    	my $i=0; #initialize count
    	$new=0; #initialize new emails to 0
    
    	my $flag=0;
    
    	while(<IN>){ #cycle through $file
    		if(/<entry>/){$flag=1;}
    		elsif(/<fullcount>(\d+)<\/fullcount>/){$new=$1;} #grab number of new emails
    		elsif($flag==1){ 
    			if(/<title>.+<\/title>/){push(@subj, &msg);} #grab new email titles
    			elsif(/<name>(.+)<\/name>/){push(@from, $1); $flag=0;} #grab new email from lines
    		}
    	}
    
    	close(IN); #close $file
    }
    
    sub passwd{ #change to url escape codes in password
    	#URL ESCAPE CODES
    	$_=$pass;
    	s/\%/\%25/g;
    	s/\#/\%23/g;
    	s/\$/\%24/g;
    	s/\&/\%26/g;
    	s/\//\%2F/g;
    	s/\:/\%3A/g;
    	s/\;/\%3B/g;
    	s/\</\%3C/g;
    	s/\=/\%3D/g;
    	s/\>/\%3E/g;
    	s/\?/\%3F/g;
    	s/\@/\%40/g;
    	s/\[/\%5B/g;
    	s/\\/\%5C/g;
    	s/\]/\%5D/g;
    	s/\^/\%5E/g;
    	s/\`/\%60/g;
    	s/\{/\%7B/g;
    	s/\|/\%7C/g;
    	s/\}/\%7D/g;
    	s/\~/\%7E/g;
    	$pass=$_;
    }
    
    sub msg{
    	#THE HTML CODED CHARACTER SET [ISO-8859-1]
    	chomp; s/<title>(.+)<\/title>/$1/; #get just the subject
    	#now replace any special characters
    	s/\&\#33\;/!/g;        #Exclamation mark
    	s/\&\#34\;/"/g; s/\&quot\;/"/g;      #Quotation mark
    	s/\&\#35\;/#/g;        #Number sign
    	s/\&\#36\;/\$/g;        #Dollar sign
    	s/\&\#37\;/%/g;        #Percent sign
    	s/\&\#38\;/&/g; s/\&amp\;/&/g;        #Ampersand
    	s/\&\#39\;/'/g;        #Apostrophe
    	s/\&\#40\;/(/g;        #Left parenthesis
    	s/\&\#41\;/)/g;        #Right parenthesis
    	s/\&\#42\;/*/g;        #Asterisk
    	s/\&\#43\;/+/g;        #Plus sign
    	s/\&\#44\;/,/g;        #Comma
    	s/\&\#45\;/-/g;        #Hyphen
    	s/\&\#46\;/./g;        #Period (fullstop)
    	s/\&\#47\;/\//g;        #Solidus (slash)
    	s/\&\#58\;/:/g;        #Colon
    	s/\&\#59\;/\;/g;        #Semi-colon
    	s/\&\#60\;/</g; s/\&lt\;/</g;        #Less than
    	s/\&\#61\;/=/g;        #Equals sign
    	s/\&\#62\;/>/g; s/\&gt\;/>/g;        #Greater than
    	s/\&\#63\;/\?/g;        #Question mark
    	s/\&\#64\;/\@/g;        #Commercial at
    	s/\&\#91\;/\[/g;        #Left square bracket
    	s/\&\#92\;/\\/g;        #Reverse solidus (backslash)
    	s/\&\#93\;/\]/g;        #Right square bracket
    	s/\&\#94\;/\^/g;        #Caret
    	s/\&\#95\;/_/g;        #Horizontal bar (underscore)
    	s/\&\#96\;/\`/g;        #Acute accent
    	s/\&\#123\;/\{/g;        #Left curly brace
    	s/\&\#124\;/|/g;        #Vertical bar
    	s/\&\#125\;/\}/g;        #Right curly brace
    	s/\&\#126\;/~/g;        #Tilde
    	s/\&\#161\;//g;        #Inverted exclamation
    	s/\&\#162\;//g;        #Cent sign
    	s/\&\#163\;//g;        #Pound sterling
    	s/\&\#164\;//g;        #General currency sign
    	s/\&\#165\;//g;        #Yen sign
    	s/\&\#166\;//g;        #Broken vertical bar
    	s/\&\#167\;//g;        #Section sign
    	s/\&\#168\;//g;        #Umlaut (dieresis)
    	s/\&\#169\;//g; s/\&copy\;//g;        #Copyright
    	s/\&\#170\;//g;        #Feminine ordinal
    	s/\&\#171\;//g;        #Left angle quote, guillemotleft
    	s/\&\#172\;//g;        #Not sign
    	s/\&\#174\;//g;        #Registered trademark
    	s/\&\#175\;//g;        #Macron accent
    	s/\&\#176\;//g;        #Degree sign
    	s/\&\#177\;//g;        #Plus or minus
    	s/\&\#178\;//g;        #Superscript two
    	s/\&\#179\;//g;        #Superscript three
    	s/\&\#180\;//g;        #Acute accent
    	s/\&\#181\;//g;        #Micro sign
    	s/\&\#182\;//g;        #Paragraph sign
    	s/\&\#183\;//g;        #Middle dot
    	s/\&\#184\;//g;        #Cedilla
    	s/\&\#185\;//g;        #Superscript one
    	s/\&\#186\;//g;        #Masculine ordinal
    	s/\&\#187\;//g;        #Right angle quote, guillemotright
    	s/\&\#188\;//g; s/\&frac14\;//g;       # Fraction one-fourth
    	s/\&\#189\;//g; s/\&frac12\;//g;       # Fraction one-half
    	s/\&\#190\;//g; s/\&frac34\;//g;       # Fraction three-fourths
    	s/\&\#191\;//g;        #Inverted question mark
    	s/\&\#192\;//g;        #Capital A, grave accent
    	s/\&\#193\;//g;        #Capital A, acute accent
    	s/\&\#194\;//g;        #Capital A, circumflex accent
    	s/\&\#195\;//g;        #Capital A, tilde
    	s/\&\#196\;//g;        #Capital A, dieresis or umlaut mark
    	s/\&\#197\;//g;        #Capital A, ring
    	s/\&\#198\;//g;        #Capital AE dipthong (ligature)
    	s/\&\#199\;//g;        #Capital C, cedilla
    	s/\&\#200\;//g;        #Capital E, grave accent
    	s/\&\#201\;//g;        #Capital E, acute accent
    	s/\&\#202\;//g;        #Capital E, circumflex accent
    	s/\&\#203\;//g;        #Capital E, dieresis or umlaut mark
    	s/\&\#204\;//g;        #Capital I, grave accent
    	s/\&\#205\;//g;        #Capital I, acute accent
    	s/\&\#206\;//g;        #Capital I, circumflex accent
    	s/\&\#207\;//g;        #Capital I, dieresis or umlaut mark   
    	s/\&\#208\;//g;        #Capital Eth, Icelandic
    	s/\&\#209\;//g;        #Capital N, tilde
    	s/\&\#210\;//g;        #Capital O, grave accent
    	s/\&\#211\;//g;        #Capital O, acute accent
    	s/\&\#212\;//g;        #Capital O, circumflex accent
    	s/\&\#213\;//g;        #Capital O, tilde
    	s/\&\#214\;//g;        #Capital O, dieresis or umlaut mark
    	s/\&\#215\;//g;        #Multiply sign
    	s/\&\#216\;//g;        #Capital O, slash
    	s/\&\#217\;//g;        #Capital U, grave accent
    	s/\&\#218\;//g;        #Capital U, acute accent
    	s/\&\#219\;//g;        #Capital U, circumflex accent
    	s/\&\#220\;//g;        #Capital U, dieresis or umlaut mark
    	s/\&\#221\;//g;        #Capital Y, acute accent
    	s/\&\#222\;//g;        #Capital THORN, Icelandic
    	s/\&\#223\;//g;        #Small sharp s, German (sz ligature)
    	s/\&\#224\;//g;        #Small a, grave accent
    	s/\&\#225\;//g;        #Small a, acute accent
    	s/\&\#226\;//g;        #Small a, circumflex accent
    	s/\&\#227\;//g;        #Small a, tilde
    	s/\&\#228\;//g;        #Small a, dieresis or umlaut mark
    	s/\&\#229\;//g;        #Small a, ring
    	s/\&\#230\;//g;        #Small ae dipthong (ligature)
    	s/\&\#231\;//g;        #Small c, cedilla
    	s/\&\#232\;//g;        #Small e, grave accent
    	s/\&\#233\;//g;        #Small e, acute accent
    	s/\&\#234\;//g;        #Small e, circumflex accent
    	s/\&\#235\;//g;        #Small e, dieresis or umlaut mark
    	s/\&\#236\;//g;        #Small i, grave accent
    	s/\&\#237\;//g;        #Small i, acute accent
    	s/\&\#238\;//g;        #Small i, circumflex accent
    	s/\&\#239\;//g;        #Small i, dieresis or umlaut mark
    	s/\&\#240\;//g;        #Small eth, Icelandic
    	s/\&\#241\;//g;        #Small n, tilde
    	s/\&\#242\;//g;        #Small o, grave accent
    	s/\&\#243\;//g;        #Small o, acute accent
    	s/\&\#244\;//g;        #Small o, circumflex accent
    	s/\&\#245\;//g;        #Small o, tilde
    	s/\&\#246\;//g;        #Small o, dieresis or umlaut mark
    	s/\&\#247\;//g;        #Division sign
    	s/\&\#248\;//g;        #Small o, slash
    	s/\&\#249\;//g;        #Small u, grave accent
    	s/\&\#250\;//g;        #Small u, acute accent
    	s/\&\#251\;//g;        #Small u, circumflex accent
    	s/\&\#252\;//g;        #Small u, dieresis or umlaut mark
    	s/\&\#253\;//g;        #Small y, acute accent
    	s/\&\#254\;//g;        #Small thorn, Icelandic
    	s/\&\#255\;//g;        #Small y, dieresis or umlaut mark
    	s/^\s+//;
    	return $_;
    }
    Registered Ubuntu User #29430

  6. #14766
    Join Date
    Jul 2008
    Beans
    70

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by dmillerct View Post
    Hey guys, I am trying to modify this gmail script so that when I have a new email waiting for me, the color changes. What would be the best way to do this? I tried adding ${color3} to the print section but for some reason that did not work.

    Code:
    #!/usr/bin/perl
    
    use Switch;
    use Text::Wrap;
    
    my $what=$ARGV[0];
    
    $user="lolnotmyaddy"; #username for gmail account
    $pass="lolnotmypw"; #password for gmail account
    $file="/tmp/gmail-hh.html"; #temporary file to store gmail
    
    #wrap format for subject
    $Text::Wrap::columns=65; #Number of columns to wrap subject at
    $initial_tab=""; #Tab for first line of subject
    $subsequent_tab="\t"; #tab for wrapped lines
    $quote="\-"; #put quotes around subject
    
    #limit the number of emails to be displayed
    $emails=4; #if -1 display all emails
    
    &passwd; #give password the proper url character encoding
    
    switch($what){ #determine what the user wants
    	case "n" {&gmail; print "$new\n";} #print number of new emails
    	case "s" { #print $from and $subj for new email
    		&gmail;
    		if ($new>0){
    			my $size=@from;
    			if ($emails!=-1 && $size>$emails){$size=$emails;} #limit number of emails displayed
    			for(my $i=0; $i<$size; ++$i){
    				print "From: $from[$i]\n"; #print from line
    				$text=$quote.$subj[$i].$quote."\n";
    				print wrap($initial_tab, $subsequent_tab, $text); #print subject with word wrap
    			}
    			$size=@from;
    			if ($emails!=-1 && $size >$emails){print "$emails out of $size new emails displayed\n";}
    		}
    	} 	
    	case "e" { #print number of new emails, $from, and $subj
    		&gmail;
    		if($new==0){print "You have no new emails.\n";}
    		else{
    			print "You have $new new email(s).\n";
    			my $size=@from;
    			if ($emails!=-1 && $size>$emails){$size=$emails;} #limit number of emails displayed
    			for(my $i=0; $i<$size; ++$i){
    				#print "From: $from[$i]\n"; #print from line
    				$text=$quote.$subj[$i].$quote;
    				#print wrap($initial_tab, $subsequent_tab, $text); #print subject with word wrap
    			}
    			$size=@from;
    			if ($emails!=-1 && $size >$emails){print "$emails out of $size new emails displayed\n";}
    		}
    	}
    	else {
    		print "Usage Error: gmail.pl <option>\n";
    		print "\tn displays number of new emails\n";
    		print "\ts displays from line and subject line for each new email.\n";
    		print "\te displays the number of new emails and from line plus \n";
    		print "\t\tsubject line for each new email.\n";
    	} #didn't give proper option
    }
    
    sub gmail{
    	if(!(-e $file)){ #create file if it does not exists
    		`touch $file`;
    	} 
    
    	#get new emails
    	`wget -O - https://$user:$pass\@mail.google.com/mail/feed/atom --no-check-certificate> $file`;
    
    	open(IN, $file); #open $file
    
    	my $i=0; #initialize count
    	$new=0; #initialize new emails to 0
    
    	my $flag=0;
    
    	while(<IN>){ #cycle through $file
    		if(/<entry>/){$flag=1;}
    		elsif(/<fullcount>(\d+)<\/fullcount>/){$new=$1;} #grab number of new emails
    		elsif($flag==1){ 
    			if(/<title>.+<\/title>/){push(@subj, &msg);} #grab new email titles
    			elsif(/<name>(.+)<\/name>/){push(@from, $1); $flag=0;} #grab new email from lines
    		}
    	}
    
    	close(IN); #close $file
    }
    
    sub passwd{ #change to url escape codes in password
    	#URL ESCAPE CODES
    	$_=$pass;
    	s/\%/\%25/g;
    	s/\#/\%23/g;
    	s/\$/\%24/g;
    	s/\&/\%26/g;
    	s/\//\%2F/g;
    	s/\:/\%3A/g;
    	s/\;/\%3B/g;
    	s/\</\%3C/g;
    	s/\=/\%3D/g;
    	s/\>/\%3E/g;
    	s/\?/\%3F/g;
    	s/\@/\%40/g;
    	s/\[/\%5B/g;
    	s/\\/\%5C/g;
    	s/\]/\%5D/g;
    	s/\^/\%5E/g;
    	s/\`/\%60/g;
    	s/\{/\%7B/g;
    	s/\|/\%7C/g;
    	s/\}/\%7D/g;
    	s/\~/\%7E/g;
    	$pass=$_;
    }
    
    sub msg{
    	#THE HTML CODED CHARACTER SET [ISO-8859-1]
    	chomp; s/<title>(.+)<\/title>/$1/; #get just the subject
    	#now replace any special characters
    	s/\&\#33\;/!/g;        #Exclamation mark
    	s/\&\#34\;/"/g; s/\&quot\;/"/g;      #Quotation mark
    	s/\&\#35\;/#/g;        #Number sign
    	s/\&\#36\;/\$/g;        #Dollar sign
    	s/\&\#37\;/%/g;        #Percent sign
    	s/\&\#38\;/&/g; s/\&amp\;/&/g;        #Ampersand
    	s/\&\#39\;/'/g;        #Apostrophe
    	s/\&\#40\;/(/g;        #Left parenthesis
    	s/\&\#41\;/)/g;        #Right parenthesis
    	s/\&\#42\;/*/g;        #Asterisk
    	s/\&\#43\;/+/g;        #Plus sign
    	s/\&\#44\;/,/g;        #Comma
    	s/\&\#45\;/-/g;        #Hyphen
    	s/\&\#46\;/./g;        #Period (fullstop)
    	s/\&\#47\;/\//g;        #Solidus (slash)
    	s/\&\#58\;/:/g;        #Colon
    	s/\&\#59\;/\;/g;        #Semi-colon
    	s/\&\#60\;/</g; s/\&lt\;/</g;        #Less than
    	s/\&\#61\;/=/g;        #Equals sign
    	s/\&\#62\;/>/g; s/\&gt\;/>/g;        #Greater than
    	s/\&\#63\;/\?/g;        #Question mark
    	s/\&\#64\;/\@/g;        #Commercial at
    	s/\&\#91\;/\[/g;        #Left square bracket
    	s/\&\#92\;/\\/g;        #Reverse solidus (backslash)
    	s/\&\#93\;/\]/g;        #Right square bracket
    	s/\&\#94\;/\^/g;        #Caret
    	s/\&\#95\;/_/g;        #Horizontal bar (underscore)
    	s/\&\#96\;/\`/g;        #Acute accent
    	s/\&\#123\;/\{/g;        #Left curly brace
    	s/\&\#124\;/|/g;        #Vertical bar
    	s/\&\#125\;/\}/g;        #Right curly brace
    	s/\&\#126\;/~/g;        #Tilde
    	s/\&\#161\;//g;        #Inverted exclamation
    	s/\&\#162\;//g;        #Cent sign
    	s/\&\#163\;//g;        #Pound sterling
    	s/\&\#164\;//g;        #General currency sign
    	s/\&\#165\;//g;        #Yen sign
    	s/\&\#166\;//g;        #Broken vertical bar
    	s/\&\#167\;//g;        #Section sign
    	s/\&\#168\;//g;        #Umlaut (dieresis)
    	s/\&\#169\;//g; s/\&copy\;//g;        #Copyright
    	s/\&\#170\;//g;        #Feminine ordinal
    	s/\&\#171\;//g;        #Left angle quote, guillemotleft
    	s/\&\#172\;//g;        #Not sign
    	s/\&\#174\;//g;        #Registered trademark
    	s/\&\#175\;//g;        #Macron accent
    	s/\&\#176\;//g;        #Degree sign
    	s/\&\#177\;//g;        #Plus or minus
    	s/\&\#178\;//g;        #Superscript two
    	s/\&\#179\;//g;        #Superscript three
    	s/\&\#180\;//g;        #Acute accent
    	s/\&\#181\;//g;        #Micro sign
    	s/\&\#182\;//g;        #Paragraph sign
    	s/\&\#183\;//g;        #Middle dot
    	s/\&\#184\;//g;        #Cedilla
    	s/\&\#185\;//g;        #Superscript one
    	s/\&\#186\;//g;        #Masculine ordinal
    	s/\&\#187\;//g;        #Right angle quote, guillemotright
    	s/\&\#188\;//g; s/\&frac14\;//g;       # Fraction one-fourth
    	s/\&\#189\;//g; s/\&frac12\;//g;       # Fraction one-half
    	s/\&\#190\;//g; s/\&frac34\;//g;       # Fraction three-fourths
    	s/\&\#191\;//g;        #Inverted question mark
    	s/\&\#192\;//g;        #Capital A, grave accent
    	s/\&\#193\;//g;        #Capital A, acute accent
    	s/\&\#194\;//g;        #Capital A, circumflex accent
    	s/\&\#195\;//g;        #Capital A, tilde
    	s/\&\#196\;//g;        #Capital A, dieresis or umlaut mark
    	s/\&\#197\;//g;        #Capital A, ring
    	s/\&\#198\;//g;        #Capital AE dipthong (ligature)
    	s/\&\#199\;//g;        #Capital C, cedilla
    	s/\&\#200\;//g;        #Capital E, grave accent
    	s/\&\#201\;//g;        #Capital E, acute accent
    	s/\&\#202\;//g;        #Capital E, circumflex accent
    	s/\&\#203\;//g;        #Capital E, dieresis or umlaut mark
    	s/\&\#204\;//g;        #Capital I, grave accent
    	s/\&\#205\;//g;        #Capital I, acute accent
    	s/\&\#206\;//g;        #Capital I, circumflex accent
    	s/\&\#207\;//g;        #Capital I, dieresis or umlaut mark   
    	s/\&\#208\;//g;        #Capital Eth, Icelandic
    	s/\&\#209\;//g;        #Capital N, tilde
    	s/\&\#210\;//g;        #Capital O, grave accent
    	s/\&\#211\;//g;        #Capital O, acute accent
    	s/\&\#212\;//g;        #Capital O, circumflex accent
    	s/\&\#213\;//g;        #Capital O, tilde
    	s/\&\#214\;//g;        #Capital O, dieresis or umlaut mark
    	s/\&\#215\;//g;        #Multiply sign
    	s/\&\#216\;//g;        #Capital O, slash
    	s/\&\#217\;//g;        #Capital U, grave accent
    	s/\&\#218\;//g;        #Capital U, acute accent
    	s/\&\#219\;//g;        #Capital U, circumflex accent
    	s/\&\#220\;//g;        #Capital U, dieresis or umlaut mark
    	s/\&\#221\;//g;        #Capital Y, acute accent
    	s/\&\#222\;//g;        #Capital THORN, Icelandic
    	s/\&\#223\;//g;        #Small sharp s, German (sz ligature)
    	s/\&\#224\;//g;        #Small a, grave accent
    	s/\&\#225\;//g;        #Small a, acute accent
    	s/\&\#226\;//g;        #Small a, circumflex accent
    	s/\&\#227\;//g;        #Small a, tilde
    	s/\&\#228\;//g;        #Small a, dieresis or umlaut mark
    	s/\&\#229\;//g;        #Small a, ring
    	s/\&\#230\;//g;        #Small ae dipthong (ligature)
    	s/\&\#231\;//g;        #Small c, cedilla
    	s/\&\#232\;//g;        #Small e, grave accent
    	s/\&\#233\;//g;        #Small e, acute accent
    	s/\&\#234\;//g;        #Small e, circumflex accent
    	s/\&\#235\;//g;        #Small e, dieresis or umlaut mark
    	s/\&\#236\;//g;        #Small i, grave accent
    	s/\&\#237\;//g;        #Small i, acute accent
    	s/\&\#238\;//g;        #Small i, circumflex accent
    	s/\&\#239\;//g;        #Small i, dieresis or umlaut mark
    	s/\&\#240\;//g;        #Small eth, Icelandic
    	s/\&\#241\;//g;        #Small n, tilde
    	s/\&\#242\;//g;        #Small o, grave accent
    	s/\&\#243\;//g;        #Small o, acute accent
    	s/\&\#244\;//g;        #Small o, circumflex accent
    	s/\&\#245\;//g;        #Small o, tilde
    	s/\&\#246\;//g;        #Small o, dieresis or umlaut mark
    	s/\&\#247\;//g;        #Division sign
    	s/\&\#248\;//g;        #Small o, slash
    	s/\&\#249\;//g;        #Small u, grave accent
    	s/\&\#250\;//g;        #Small u, acute accent
    	s/\&\#251\;//g;        #Small u, circumflex accent
    	s/\&\#252\;//g;        #Small u, dieresis or umlaut mark
    	s/\&\#253\;//g;        #Small y, acute accent
    	s/\&\#254\;//g;        #Small thorn, Icelandic
    	s/\&\#255\;//g;        #Small y, dieresis or umlaut mark
    	s/^\s+//;
    	return $_;
    }
    don't know if this is what you're after, but it's what i'm currently using. i didn't mess with the script in case i borked it lol
    Code:
    ${goto 800}${color green}You have ${color8}${texeci 20 perl ~/scripts/Conky/gmail.pl n} ${color green}new gmail(s)
    EDIT : just looked and you seem to be using exact same script as me
    Attached Images Attached Images
    Linux...The mistress we all left Windows for

  7. #14767
    Join Date
    Jul 2008
    Location
    Connecticut, U.S.
    Beans
    106
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Post your .conkyrc files w/ screenshots

    Ya, that would always keep the same color. I want it to be conditional so that it only changes color when there is a new email.
    Registered Ubuntu User #29430

  8. #14768
    Join Date
    Jul 2005
    Location
    The Netherlands
    Beans
    209
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Post your .conkyrc files w/ screenshots

    ..
    Last edited by proxess; November 17th, 2010 at 06:26 PM.
    Laptop: i7 4800MQ 2.7GHz (~3.7GHz); 2x 4GB Kingston HyperX Genesis 1600MHz; Nvidia 780M 4GB; Crucial M4 256GB SSD; Ubuntu 14.04 LTS x64 and Windows 8.1 x64.
    Ubuntu #8076 / Linux #429448

  9. #14769
    Join Date
    Jul 2008
    Location
    Connecticut, U.S.
    Beans
    106
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by proxess View Post
    ..
    That makes the 1 or the 0 the same color. I would like the 0 to be say ${color1} and then if number of emails is >0 to be ${color2}
    Registered Ubuntu User #29430

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

    Re: Post your .conkyrc files w/ screenshots

    im assuming proxess suggested an if statement
    something like this. sorry I dont have exact conky variables. Im on my phone right now
    Code:
    ${if}${color1}${gmail script=0}${else}${color2}${gmail script}${endif}
    Its something like that.
    I'm a super power user

Page 1477 of 2306 FirstFirst ... 477977137714271467147514761477147814791487152715771977 ... 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
  •