added another conky..
added another conky..
I started using this 3 days ago, I don't know why I didn't before. Here's my config. Does anybody know how I could make the calendar in the middle?
Code:# Conky sample 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. # set to yes if you want Conky to be forked in the background background no # X font when Xft is disabled, you can pick one with program xfontsel #font 5x7 #font 6x10 #font 7x13 #font 8x13 #font 9x15 #font *mintsmild.se* #font -*-*-*-*-*-*-34-*-*-*-*-*-*-* # Use Xft? use_xft yes # Xft font when Xft is enabled xftfont Monospace:size=9 # Text alpha when using Xft xftalpha 0.8 # Print everything to stdout? # out_to_console no # MPD host/port # mpd_host localhost # mpd_port 6600 # mpd_password tinker_bell # Print everything to console? # out_to_console no # mail spool mail_spool $MAIL # Update interval in seconds update_interval 1 # 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 # If own_window is yes, you may use type normal, desktop or override own_window_type override # Use pseudo transparency with own_window? own_window_transparent yes # If own_window_transparent is set to no, you can set the background colour here own_window_colour hotpink # If own_window is yes, these window manager hints may be used #own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager # Use double buffering (reduces flicker, may not work for everyone) double_buffer yes # Minimum size of text area minimum_size 280 5 # Draw shades? draw_shades np # Draw outlines? draw_outline no # Draw borders around text draw_borders no # Draw borders around graphs draw_graph_borders yes # Stippled borders? stippled_borders 5 # border margins border_margin 4 # border width border_width 1 # Default colors and also border colors default_color grey default_shade_color black default_outline_color black # Text alignment, other possible values are commented #alignment top_left alignment top_right #alignment bottom_left #alignment bottom_right #alignment none # Gap between borders of screen and text # same thing as passing -x at command line gap_x 10 gap_y 47 # Subtract file system buffers from used memory? 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 1 # number of net samples to average # set to 1 to disable averaging net_avg_samples 1 # Force UTF8? note that UTF8 support required XFT override_utf8_locale yes # Add spaces to keep things from moving about? This only affects certain objects. use_spacer no # Allow each port monitor to track at most this many connections (if 0 or not set, default is 256) #max_port_monitor_connections 256 # Maximum number of special things, e.g. fonts, offsets, aligns, etc. #max_specials 512 # Maximum size of buffer for user text, i.e. below TEXT line. #max_user_text 16384 # variable is given either in format $variable or in ${variable}. Latter # allows characters right after the variable and must be used in network # stuff because of an argument # stuff after 'TEXT' will be formatted on screen #${texeci 20 /home/jocelyn/Scripts/Conky/wireless.sh essid} TEXT ${color white}$alignc$sysname $kernel on $machine ${color white}$alignc${exec whoami} @ $nodename $color$stippled_hr ${color}Date: ${color white}${time %A,%d %B} ${color}Heure: ${color white}${time %k:%M:%S}${alignr}${color}Uptime: ${color white}$uptime $color$stippled_hr ${color}CPU:${color white} ${cpu cpu1}% ${cpubar cpu1} ${color}CPU:${color white} ${cpu cpu2}% ${cpubar cpu2} ${color}RAM:${color white} $memperc% $mem/$memmax $membar ${color}Swap:${color white} $swapperc% $swap/$swapmax ${swapbar} $color$stippled_hr ${alignc}Systèmes de Fichiers ${color}Root:${color white} ${fs_used_perc /}% ${fs_used /}/${fs_size /} ${fs_bar /} $color$stippled_hr ${color}Batterie: ${color white}$battery $color$stippled_hr ${alignc}Network ${color}Adresse IP:${color white} ${addr eth1} ${color}Signal:${color white}${linkstatus eth1} % ${color}Downspeed: ${color white}${downspeed eth1} kb/s ${color}Upspeed: ${color white}${upspeed eth1} kb/s ${downspeedgraph eth1 20,130 000000 ffffff} ${upspeedgraph eth1 20,130 000000 ffffff} ${exec cal}
I've been working on this for quite a while on and off (also using it as an excercise to learn scripting).
Anyway here's the finalish version....
The conky does a couple of things that I haven't seen in other conky's:-
1. The colours of the stats change depending on the temperatures currently on the device.
2. The colours of the hosts change from green to red if they go offline (sorry I had to smudge the host names in the image and remove the names from the scripts but you get the idea.
3. The weather part of the conky is created using a weather true type font I hacked together, that's why the scripts are quite long in parts (all kind of exchanges have to go on).
The scripts are as follows
.conkyrc
tweather.sh - this handles the bulk of the weather dataCode:#Conkyrc - Conky configuration file # set to yes if you want tormo to be forked in the background background no use_xft yes # X font used, you can pick one with program xfontsel # xftfont Bitstream Vera Sans Mono-7 font 5x7 #font 6x10 #font 7x13 #font 8x13 #font -*-clean-medium-r-*-*-12-*-*-*-*-*-*-* #font -artwiz-kates-medium-*-*-*-14-*-*-*-*-*-*-* #font -artwiz-kates-medium-*-normal-*-17-120-*-*-*-*-*-* #font -*-webby caps-*-*-*-*-7-*-*-*-*-*-*-* #font -xos4-terminus-medium-r-normal--14-140-72-72-c-80-iso8859-1 #font -*-terminus-*-*-*-*-*-*-*-*-*-*-*-* #font -*-bitstream vera sans mono-medium-r-*-*-12-*-*-*-*-*-*-* font courier xftfont DejaVu LGC Sans Mono xftfont Weather:size=9 # xftfont Arial:size=4 # Text alpha when using Xft # xftalpha 1 # mail spool # mail_spool $MAIL # Update interval in seconds update_interval 5.0 # Create own window instead of using desktop (required in nautilus) own_window yes # to get transparency working properly own_window_hints undecorated,below,skip_taskbar # You want the window transparent? own_window_transparent yes # Use Double Buffering - Reduces flickering (May not work) double_buffer yes # Minimum size of text area minimum_size 400 4 maximum_width 400 # Draw shades? draw_shades no # Draw outlines? draw_outline no # Draw borders naround text draw_borders no # Stippled borders? stippled_borders 0 # border margins border_margin 4 # border width border_width 6 # Default colors and also border colors #default_color spring green default_color white default_shade_color black default_outline_color black # Text alignment, other possible values are commented #alignment top_left alignment top_right #alignment bottom_left #alignment bottom_right # Gap between borders of screen and text gap_x 10 gap_y 50 # Subtract file system buffers from used memory? no_buffers yes # set to yes if you want all text to be in uppercase uppercase no # Possible variables to be used: # # Variable Arguments Description # acpiacadapter ACPI ac adapter state. # acpifan ACPI fan state # acpitemp ACPI temperature. # battery (name) Remaining capasity in ACPI or APM # battery. ACPI battery name can be # given as argument (default is BAT0). # buffers Amount of memory buffered # cached Amount of memory cached # color (color) Change drawing color to color # cpu CPU usage in percents # cpubar (height) Bar that shows CPU usage, height is # bar's height in pixels # downspeed net Download speed in kilobytes # downspeedf net Download speed in kilobytes with one # decimal # exec shell command Executes a shell command and displays # the output in torsmo. warning: this # takes a lot more resources than other # variables. I'd recommend coding wanted # behaviour in C and posting a patch :-). # execi interval, shell Same as exec but with specific interval. # command Interval can't be less than # update_interval in configuration. # fs_bar (height), (fs) Bar that shows how much space is used on # a file system. height is the height in # pixels. fs is any file on that file # system. # fs_free (fs) Free space on a file system available # for users. # fs_free_perc (fs) Free percentage of space on a file # system available for users. # fs_size (fs) File system size # fs_used (fs) File system used space # hr (height) Horizontal line, height is the height in # pixels # i2c (dev), type, n I2C sensor from sysfs (Linux 2.6). dev # may be omitted if you have only one I2C # device. type is either in (or vol) # meaning voltage, fan meaning fan or temp # meaning temperature. n is number of the # sensor. See /sys/bus/i2c/devices/ on # your local computer. # kernel Kernel version # loadavg (1), (2), (3) System load average, 1 is for past 1 # minute, 2 for past 5 minutes and 3 for # past 15 minutes. # machine Machine, i686 for example # mails Mail count in mail spool. You can use # program like fetchmail to get mails from # some server using your favourite # protocol. See also new_mails. # mem Amount of memory in use # membar (height) Bar that shows amount of memory in use # memmax Total amount of memory # memperc Percentage of memory in use # new_mails Unread mail count in mail spool. # nodename Hostname # outlinecolor (color) Change outline color # pre_exec shell command Executes a shell command one time before # torsmo displays anything and puts output # as text. # processes Total processes (sleeping and running) # running_processes Running processes (not sleeping), # requires Linux 2.6 # shadecolor (color) Change shading color # stippled_hr (space), Stippled (dashed) horizontal line # (height) # swapbar (height) Bar that shows amount of swap in use # swap Amount of swap in use # swapmax Total amount of swap # swapperc Percentage of swap in use # sysname System name, Linux for example # temp1 Temperature #1 from i2c-sensors, same as # ${i2c temp 1} # temp2 Temperature #2 from i2c-sensors, same as # ${i2c temp 2} # time (format) Local time, see man strftime to get more # information about format # totaldown net Total download, overflows at 4 GB on # Linux with 32-bit arch and there doesn't # seem to be a way to know how many times # it has already done that before torsmo # has started. # totalup net Total upload, this one too, may overflow # updates Number of updates (for debugging) # upspeed net Upload speed in kilobytes # upspeedf net Upload speed in kilobytes with one # decimal # uptime Uptime # uptime_short Uptime in a shorter format # variable is given either in format $variable or in ${variable}. Latter # allows characters right after the variable and must be used in network # stuff because of an argument # stuff after 'TEXT' will be formatted on screen # ${color}$hr # ${color}Mails: ${color slategrey}$mails${color} New: ${color slategrey}$new_mails${color} | ${color}Battery:${color slategrey} ${battery} % #to be inserted #------------------------------------- # ${execi 40000 cal} #${color yellow}RAM :${color yellow} $memperc% $mem/$memmax $membar #${color yellow}SWAP:${color yellow} $swapperc% $swap/$swapmax $swapbar #${color yellow}ROOT:${color yellow} ${fs_free_perc /}% ${fs_free /}/${fs_size /} ${fs_bar /} #$hr #------------------------------------- # These are the characters and corresponding graphic for the weather font # copy these into the text area and remove the # to see the match #${color yellow} #${font courier:size=20}ABCDEFGHIJ #${font Weather:size=30}ABCDEFGHIJ #${font courier:size=20}KLMNOP #${font Weather:size=30}KLMNOP #${font courier:size=20}QRSTUVWXY #${font Weather:size=30}QRSTUVWXY #${font courier:size=20}abcdefghijk #${font Weather:size=30}abcdefghijk #${font courier:size=20}lmnopqrstu #${font Weather:size=30}lmnopqrstu #${font courier:size=20}vwxyz #${font Weather:size=30}vwxyz TEXT ${exec assortedconky.sh} ${font DejaVu LGC Sans Mono:Bold:size=8}${color}$nodename${alignr}$sysname $kernel $machine ${color}${time %a, }${time %b %e %l:%M %P} ${alignr}UpTime: $uptime $hr Current CPU Freq. ${freq}Mhz (${cpu}%) ${cpugraph 40 ffff00 00ff00} Stats ${offset 10}CPU: ${offset 12}Mob: ${offset 12}hda: ${offset 12}GPU: ${offset 12}FAN: ${offset 12}RAM: ${offset 11}Swap: ${offset 11}HDFree: ${offset 9}Load: ${color green}${offset 12}${if_existing /tmp/.conkytemps/CPU.WARM}${color orange}$endif${if_existing /tmp/.conkytemps/CPU.HOT}${color red}$endif${exec cat /tmp/.conkytemps/thinkpadtemps.txt|cut -f1}${offset -5}C${color green}${offset 15}${if_existing /tmp/.conkytemps/PCI.WARM}${color orange}$endif${if_existing /tmp/.conkytemps/PCI.HOT}${color red}$endif${exec cat /tmp/.conkytemps/thinkpadtemps.txt|cut -f2}${offset -5}C${color green}${if_existing /tmp/.conkytemps/HDD.WARM}${color orange}$endif${if_existing /tmp/.conkytemps/HDD.HOT}${color red}$endif${offset 17}${exec cat /tmp/.conkytemps/thinkpadtemps.txt|cut -f3}${offset -5}C${color green}${if_existing /tmp/.conkytemps/GPU.WARM}${color orange}$endif${if_existing /tmp/.conkytemps/GPU.HOT}${color red}$endif${offset 17}${exec cat /tmp/.conkytemps/thinkpadtemps.txt|cut -f4}${offset -5}C${color green}${offset 22}${exec cat /tmp/.conkytemps/thinkpadfan.txt}${offset 16}$memperc% ${offset 21}$swapperc% ${offset 26}${exec cat /tmp/.conkytemps/harddiskspace.txt}${offset 26}${loadavg 1} ${color} NetUp: ${upspeed eth0} k/s ${alignc}IP Address ${addr eth0} ${alignr}NetDown: ${downspeed eth0} k/s ${upspeedgraph eth0 32,180 ffff00 00ff00} $alignr${downspeedgraph eth0 32,180 00ff00 ffff00} $hr ${color}Hosts Status${color} ${texeci 150 silentping.sh xxx.xxx.xxx.xxx "up" "down"}${if_existing /tmp/.status/xxx.xxx.xxx.xxx.up}${color green}Host1 UP$else${color red}Host1 Down$endif ${color #98c2c7}${texeci 150 silentping.sh xxx.xxx.xxx.xxx "up" "down"}${if_existing /tmp/.status/xxx.xxx.xxx.xxx.up}${color green}Host2 UP$else${color red}Host2 Down$endif ${color #98c2c7}${texeci 150 silentping.sh xxx.xxx.xxx.xxx "up" "down"}${if_existing /tmp/.status/xxx.xxx.xxx.xxx.up}${color green}host3 UP$else${color red}host3 Down$endif${color} $hr ${font DejaVu LGC Sans Mono:Bold:size=8}${color}Weather for London City (EGLC) ${execi 1800 tweather.sh} ${color}${exec cat /tmp/.conkytemps/weathersunriseset.txt} ${color}${exec cat /tmp/.conkytemps/wmoonriseset.txt | awk -F " " '{print $1,$2,$3,$4,$5,$6}'} Moonphase: ${font Weather:size=30}${voffset -17}${exec cat /tmp/.conkytemps/wmoonphase.txt}${font DejaVu LGC Sans Mono:Bold:size=8} ${color}${tab 120}${exec cat /tmp/.conkytemps/wdaynames.txt} Temp AM C${color yellow}${tab 60}${exec cat /tmp/.conkytemps/wmrealtemp.txt} ${color}Wind AM mph${color yellow}${tab 60}${exec cat /tmp/.conkytemps/wmwindspeed.txt} ${color}Conditions AM${color yellow}${font Weather:size=20}${voffset -3}${tab 57}${exec cat /tmp/.conkytemps/wmconditions.txt | cut -f1}${tab}${exec cat /tmp/.conkytemps/wmconditions.txt | cut -f2}${tab}${exec cat /tmp/.conkytemps/wmconditions.txt | cut -f3}${tab}${exec cat /tmp/.conkytemps/wmconditions.txt | cut -f4}${tab}${exec cat /tmp/.conkytemps/wmconditions.txt | cut -f5}${offset -3}${exec cat /tmp/.conkytemps/wmconditions.txt | cut -f6}${font DejaVu LGC Sans Mono:Bold:size=8} ${font DejaVu LGC Sans Mono:Bold:size=8}${color}Temp PM C${color yellow}${tab 60}${exec cat /tmp/.conkytemps/warealtemp.txt} ${color}Wind PM mph${color yellow}${tab 60}${exec cat /tmp/.conkytemps/wawindspeed.txt} ${color}Conditions PM${color yellow}${font Weather:size=20}${voffset -3}${tab 57}${exec cat /tmp/.conkytemps/waconditions.txt | cut -f1}${tab}${exec cat /tmp/.conkytemps/waconditions.txt | cut -f2}${tab}${exec cat /tmp/.conkytemps/waconditions.txt | cut -f3}${tab}${exec cat /tmp/.conkytemps/waconditions.txt | cut -f4}${tab}${exec cat /tmp/.conkytemps/waconditions.txt | cut -f5}${offset -3}${exec cat /tmp/.conkytemps/waconditions.txt | cut -f6}${font DejaVu LGC Sans Mono:Bold:size=8} ${font DejaVu LGC Sans Mono:Bold:size=8}${color}Temp Ngt C${color yellow}${tab 60}${exec cat /tmp/.conkytemps/wnrealtemp.txt} ${color}Wind Ngt mph${color yellow}${tab 60}${exec cat /tmp/.conkytemps/wnwindspeed.txt} ${color}Conditions Ngt${color yellow}${font Weather:size=20}${voffset -3}${tab 57}${exec cat /tmp/.conkytemps/wnconditions.txt | cut -f1}${tab}${exec cat /tmp/.conkytemps/wnconditions.txt | cut -f2}${tab}${exec cat /tmp/.conkytemps/wnconditions.txt | cut -f3}${tab}${exec cat /tmp/.conkytemps/wnconditions.txt | cut -f4}${tab}${exec cat /tmp/.conkytemps/wnconditions.txt | cut -f5}${offset -3}${exec cat /tmp/.conkytemps/wnconditions.txt | cut -f6}${font DejaVu LGC Sans Mono:Bold:size=8} ${font DejaVu LGC Sans Mono:Bold:size=8}${color}Wind Dir${color yellow}${tab 60}${exec cat /tmp/.conkytemps/wmwinddir.txt}${color} $hr ${font DejaVu LGC Sans Mono:Bold:size=8}${color}${offset 10}Latest BBC News Headlines: ${color}${execi 300 conky-rss.sh http://newsrss.bbc.co.uk/rss/newsplayer_uk_edition/front_page/rss.xml 5 2} ${offset 10}Latest Reg Headlines: ${execi 300 conky-rss.sh http://www.theregister.co.uk/headlines.rss 5 2} $hr ${color} Last 6 log entries ${color}${execi 30 cat /tmp/.conkytemps/shorttail.txt | fold -w65 } $hr ${color} Fortune ${execi 120 fortune -s | fold -w65} $hr NAME PID CPU% MEM% ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3} ${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4} $hr
assortedconky.sh - this grabs the hardware status and sets the correct colour flagsCode:#!/bin/bash # Released under GPL - Feel free to modify code as appropriate # This script takes the source data from a UK weather site and formats it into a usage I wanted for Conky # I've never written scripting using awk, grep and sed in linux before this so it was an exercise for me # I'm sure that a more experienced scripter would get the code to be substantially more effecient # however I had to do it a stage at a time to help me understand what was happening. # The parsing of the individual day datablocks was especially difficult as they spread over multiple lines and # in many instances this caused spacing or EOL/CR/LF issues with specific fields I was trying to identify (for example # I spent half a day trying to get sed to delete EOL properly on $filetoday before I discovered with tr it was easy). # I'm sure the code could be modified to use different source sites - please if you do mods post them back to the # Conky project page on sourceforge. # Hopefully this will be useful to you - all feedback gratefully received. file=/tmp/.conkytemps/wmetcheckcom.txt #The original Source file file2=/tmp/.conkytemps/wmoonriseset.txt file3=/tmp/.conkytemps/wmoonphase.txt weatherdatablock=/tmp/.conkytemps/weatherdatablock.txt #The source file stripped of lots of garbage filetempblock=/tmp/.conkytemps/wtempblock.txt #temp file stipped of more garbage filetoday=/tmp/.conkytemps/weathertoday.txt #The data block for todays weather filetodaymorn=/tmp/.conkytemps/weathertodaymorn.txt #The data block for today morning filetodayaft=/tmp/.conkytemps/weathertodayaft.txt filetodayeve=/tmp/.conkytemps/weathertodayeve.txt filetoday1=/tmp/.conkytemps/weathertoday1.txt #The data block for tomorrows weather filetoday2=/tmp/.conkytemps/weathertoday2.txt #The data block for next day weather filetoday3=/tmp/.conkytemps/weathertoday3.txt # so on as above till day 6 filetoday4=/tmp/.conkytemps/weathertoday4.txt filetoday5=/tmp/.conkytemps/weathertoday5.txt filetoday6=/tmp/.conkytemps/weathertoday6.txt filetodaytemp=/tmp/.conkytemps/weathertodaytemp.txt daynames=/tmp/.conkytemps/wdaynames.txt dtaynames=/tmp/.conkytemps/wdtaynames.txt sunriseset=/tmp/.conkytemps/weathersunriseset.txt #The data for sunrise and sunset times for today shorttoday=/tmp/.conkytemps/wshorttoday.txt #sets the short form for todays date i.e. Fri 11 to identify where the data block starts in original source file arealtemp=/tmp/.conkytemps/warealtemp.txt #afternoon real temp atrealtemp=/tmp/.conkytemps/watrealtemp.txt awindchill=/tmp/.conkytemps/wawindchill.txt #afternoon wind chill awindspd=/tmp/.conkytemps/wawindspeed.txt #afternoon wind speed atwindspd=/tmp/.conkytemps/watwindspeed.txt awinddir=/tmp/.conkytemps/wawinddir.txt #afternoon wind direction aconditions=/tmp/.conkytemps/waconditions.txt #afternoon conditions atconditions=/tmp/.conkytemps/watconditions.txt mrealtemp=/tmp/.conkytemps/wmrealtemp.txt #morning real temp mtrealtemp=/tmp/.conkytemps/wmtrealtemp.txt mwindchill=/tmp/.conkytemps/wmwindchill.txt #morning wind chill mwindspd=/tmp/.conkytemps/wmwindspeed.txt #morning wind speed mtwindspd=/tmp/.conkytemps/wmtwindspeed.txt mwinddir=/tmp/.conkytemps/wmwinddir.txt #morning wind direction mtwinddir=/tmp/.conkytemps/wmtwinddir.txt mconditions=/tmp/.conkytemps/wmconditions.txt mtconditions=/tmp/.conkytemps/wmtconditions.txt #morning conditions nrealtemp=/tmp/.conkytemps/wnrealtemp.txt #night real temp ntrealtemp=/tmp/.conkytemps/wntrealtemp.txt nwindchill=/tmp/.conkytemps/wnwindchill.txt #night wind chill nwindspd=/tmp/.conkytemps/wnwindspeed.txt #night wind speed ntwindspd=/tmp/.conkytemps/wntwindspeed.txt nwinddir=/tmp/.conkytemps/wnwinddir.txt #night wind direction nconditions=/tmp/.conkytemps/wnconditions.txt #night conditions ntconditions=/tmp/.conkytemps/wntconditions.txt alldata=/tmp/.conkytemps/walldata.txt isitcoldorhot=/tmp/.conkytemps/isitcoldorhot.txt #All Data Pause() { key="" echo -n Hit any key to continue.... stty -icanon key=`dd count=1 2>/dev/null` stty icanon } today="`date +%a' '%-e`" #todays date in format Fri 11 - padded spaces stripped today1="`date --date="tomorrow" +%a' '%-e`" #tomorrows date in format Sat 12 - padded spaces stripped today2="`date --date="2 days" +%a' '%-e`" #as above till 6 days today3="`date --date="3 days" +%a' '%-e`" today4="`date --date="4 days" +%a' '%-e`" today5="`date --date="5 days" +%a' '%-e`" today6="`date --date="6 days" +%a' '%-e`" location=http://www.metcheck.com/V40/UK/FREE/7days.asp?zipcode=EGLC #the location from which to pull the file - change by changing EGLC location to yours (UK only supported) location2=http://www.intellicast.com/Local/Forecast.aspx?location=UKXX0085 lynx -accept_all_cookies -dump $location > $file #get the raw data from the location above and dump into the original source file lynx -accept_all_cookies -dump $location2 | grep -m 1 "Moonrise: " > $file2 cat $file2 | awk -F " " '{ORS=" "} {print $1,$2,$3,$4,$5,$6,$9,$10}' > $file3 cat $file3 | sed -e 's/First Quarter/N/g' -e 's/Waxing Gibbous/M/g' -e 's/Full/K/g' -e 's/Waning Gibbous/M/g' -e 's/Last Quarter/N/g' -e 's/Crescent/O/g' -e 's/New Moon/P/g' > $file2 cat $file2 | awk -F " " '{ORS=" "} {print $7}' > $file3 cat $file | grep "this week in " -A 60 > $weatherdatablock #identifies the start of the actual weather data block and dumps the next 60 lines sed -e '/bullet_15.gif/d' $weatherdatablock > $filetempblock cat $filetempblock > $weatherdatablock cat $weatherdatablock | grep "Sunrise : " | awk -F " " '{ORS=" "} {print $13 , $15}' > $sunriseset #extracts todays sunrise and sunset time from datablock cat $weatherdatablock | grep "Sunset : " | awk -F " " '{print $1 , $3}' >> $sunriseset cat $weatherdatablock | sed -e "/./{H;$!d;}" -e "x;/ $today /!d;/ Evening /!d" > $filetoday #extracts the paragraph for today for the data block echo $today > $shorttoday cat $filetoday | grep -A 8 --file=$shorttoday > $filetempblock #only saves the data from the paragraph (looks for 'day date' ($shorttoday) to identify start of data) cat $filetempblock > $filetoday sed -e '/./{H;$!d;}' -e "x;/ $today1 /!d;/ Afternoon /!d" $weatherdatablock > $filetoday1 #saves datablock for tomorrow sed -e '/./{H;$!d;}' -e "x;/ $today2 /!d;/ Afternoon /!d" $weatherdatablock > $filetoday2 # and so on for 6 days sed -e '/./{H;$!d;}' -e "x;/ $today3 /!d;/ Afternoon /!d" $weatherdatablock > $filetoday3 sed -e '/./{H;$!d;}' -e "x;/ $today4 /!d;/ Afternoon /!d" $weatherdatablock > $filetoday4 sed -e '/./{H;$!d;}' -e "x;/ $today5 /!d;/ Afternoon /!d" $weatherdatablock > $filetoday5 sed -e '/./{H;$!d;}' -e "x;/ $today6 /!d;/ Afternoon /!d" $weatherdatablock > $filetoday6 # This is where we do the parsing......I know this code could be written substantially better/differently but it's my first attempt at this type of scripting - In total took me 2 days to write (with no knowledge of awk,sed or grep) # It's been written in this format so that's it's fairly easy to follow on a step by step basis cat $filetoday | tr '\n' ' ' > $filetempblock #strips line feeds and EOL's from lines to put all data into one block cat $filetempblock | awk -F " " '{ORS=" "} {print $4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$40,$41,$42,$43,$44,$45,$46,$47,$48,$49,$50,$51,$52,$53,$54,$55,$56,$57,$58,$59,$60}' > $filetoday #prints all the fields to 'standardise' the spacing (needed to identify and substitute 'Cloudy' as against 'Partly Cloudy' cat $filetoday | sed -e 's/°c//g' -e 's/mb//g' -e 's/mm//g' -e 's/Wind from//g' -e 's/mph//g' -e 's/\%//g' > $filetempblock # strips out unneeded data cat $filetempblock | sed -e 's/Partly Cloudy/c/g' -e 's/Cloudy/d/g' -e 's/Fair/C/g' -e 's/Heavy Rain/j/g' -e 's/Light Rain/i/g' -e 's/Mainly Clear/b/g' -e 's/Sunny/A/g' -e 's/Intermittent Rain/e/g' -e 's/Clear/K/g' -e 's/Showers/e/g' -e 's/Mist/l/g' > $filetoday # converts weather descriptions to weather font character - standardises field numbers before final strip !! NEEDS TO BE ADDED TO cat $filetoday | awk -F " " '{print $1,$2,$3,$7,$9,$10,"\n",$11,$12,$13,$17,$19,$20,"\n",$21,$22,$23,$27,$29,$30}' > $filetempblock # we've now got just the data we want and in a standardised format cat $filetempblock > $filetoday # This next section of code is to ensure that data from today now excluded from live (i.e. Morning and Afternoon) is still in the data set TEMPMornVAR=`grep "Morning" $filetoday` TEMPAftVAR=`grep "Afternoon" $filetoday` if !(test -z "$TEMPMornVAR"); then echo "$TEMPMornVAR" > $filetodaymorn fi if !(test -z "$TEMPAftVAR"); then echo "$TEMPAftVAR" > $filetodayaft fi cat $filetoday | grep "Evening" > $filetodayeve cat $filetodaymorn > $filetoday cat $filetodayaft >> $filetoday cat $filetodayeve >> $filetoday # Now the same excercise for the other days cat $filetoday1 | tr '\n' ' ' > $filetempblock # strips line feeds and EOL's from lines to put all data into one block cat $filetempblock | awk -F " " '{ORS=" "} {print $4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$40,$41,$42,$43,$44,$45,$46,$47,$48,$49,$50,$51,$52,$53,$54,$55,$56,$57,$58,$59,$60}' > $filetoday1 #prints all the fields to 'standardise' the spacing (needed to identify and substitute 'Cloudy' as against 'Partly Cloudy' cat $filetoday1 | sed -e 's/°c//g' -e 's/mb//g' -e 's/mm//g' -e 's/Wind from//g' -e 's/mph//g' -e 's/\%//g' > $filetempblock # strips out unneeded data cat $filetempblock | sed -e 's/Partly Cloudy/c/g' -e 's/Cloudy/d/g' -e 's/Fair/C/g' -e 's/Heavy Rain/j/g' -e 's/Light Rain/i/g' -e 's/Mainly Clear/b/g' -e 's/Sunny/A/g' -e 's/Intermittent Rain/e/g' -e 's/Clear/K/g' -e 's/Showers/e/g' -e 's/Mist/l/g' > $filetoday1 # converts weather descriptions to weather font character - standardises field numbers before final strip !! NEEDS TO BE ADDED TO cat $filetoday1 | awk -F " " '{print $1,$2,$3,$7,$9,$10,"\n",$11,$12,$13,$17,$19,$20,"\n",$21,$22,$23,$27,$29,$30}' > $filetempblock # we've now got just the data we want and in a standardised format cat $filetempblock > $filetoday1 cat $filetoday2 | tr '\n' ' ' > $filetempblock # strips line feeds and EOL's from lines to put all data into one block cat $filetempblock | awk -F " " '{ORS=" "} {print $4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$40,$41,$42,$43,$44,$45,$46,$47,$48,$49,$50,$51,$52,$53,$54,$55,$56,$57,$58,$59,$60}' > $filetoday2 #prints all the fields to 'standardise' the spacing (needed to identify and substitute 'Cloudy' as against 'Partly Cloudy' cat $filetoday2 | sed -e 's/°c//g' -e 's/mb//g' -e 's/mm//g' -e 's/Wind from//g' -e 's/mph//g' -e 's/\%//g' > $filetempblock # strips out unneeded data cat $filetempblock | sed -e 's/Partly Cloudy/c/g' -e 's/Cloudy/d/g' -e 's/Fair/C/g' -e 's/Heavy Rain/j/g' -e 's/Light Rain/i/g' -e 's/Mainly Clear/b/g' -e 's/Sunny/A/g' -e 's/Intermittent Rain/e/g' -e 's/Clear/K/g' -e 's/Showers/e/g' -e 's/Mist/l/g' > $filetoday2 # converts weather descriptions to weather font character - standardises field numbers before final strip !! NEEDS TO BE ADDED TO cat $filetoday2 | awk -F " " '{print $1,$2,$3,$7,$9,$10,"\n",$11,$12,$13,$17,$19,$20,"\n",$21,$22,$23,$27,$29,$30}' > $filetempblock # we've now got just the data we want and in a standardised format cat $filetempblock > $filetoday2 cat $filetoday3 | tr '\n' ' ' > $filetempblock # strips line feeds and EOL's from lines to put all data into one block cat $filetempblock | awk -F " " '{ORS=" "} {print $4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$40,$41,$42,$43,$44,$45,$46,$47,$48,$49,$50,$51,$52,$53,$54,$55,$56,$57,$58,$59,$60}' > $filetoday3 #prints all the fields to 'standardise' the spacing (needed to identify and substitute 'Cloudy' as against 'Partly Cloudy' cat $filetoday3 | sed -e 's/°c//g' -e 's/mb//g' -e 's/mm//g' -e 's/Wind from//g' -e 's/mph//g' -e 's/\%//g' > $filetempblock # strips out unneeded data cat $filetempblock | sed -e 's/Partly Cloudy/c/g' -e 's/Cloudy/d/g' -e 's/Fair/C/g' -e 's/Heavy Rain/j/g' -e 's/Light Rain/i/g' -e 's/Mainly Clear/b/g' -e 's/Sunny/A/g' -e 's/Intermittent Rain/e/g' -e 's/Clear/K/g' -e 's/Showers/e/g' -e 's/Mist/l/g' > $filetoday3 # converts weather descriptions to weather font character - standardises field numbers before final strip !! NEEDS TO BE ADDED TO cat $filetoday3 | awk -F " " '{print $1,$2,$3,$7,$9,$10,"\n",$11,$12,$13,$17,$19,$20,"\n",$21,$22,$23,$27,$29,$30}' > $filetempblock # we've now got just the data we want and in a standardised format cat $filetempblock > $filetoday3 cat $filetoday4 | tr '\n' ' ' > $filetempblock # strips line feeds and EOL's from lines to put all data into one block cat $filetempblock | awk -F " " '{ORS=" "} {print $4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$40,$41,$42,$43,$44,$45,$46,$47,$48,$49,$50,$51,$52,$53,$54,$55,$56,$57,$58,$59,$60}' > $filetoday4 #prints all the fields to 'standardise' the spacing (needed to identify and substitute 'Cloudy' as against 'Partly Cloudy' cat $filetoday4 | sed -e 's/°c//g' -e 's/mb//g' -e 's/mm//g' -e 's/Wind from//g' -e 's/mph//g' -e 's/\%//g' > $filetempblock # strips out unneeded data cat $filetempblock | sed -e 's/Partly Cloudy/c/g' -e 's/Cloudy/d/g' -e 's/Fair/C/g' -e 's/Heavy Rain/j/g' -e 's/Light Rain/i/g' -e 's/Mainly Clear/b/g' -e 's/Sunny/A/g' -e 's/Intermittent Rain/e/g' -e 's/Clear/K/g' -e 's/Showers/e/g' -e 's/Mist/l/g' > $filetoday4 # converts weather descriptions to weather font character - standardises field numbers before final strip !! NEEDS TO BE ADDED TO cat $filetoday4 | awk -F " " '{print $1,$2,$3,$7,$9,$10,"\n",$11,$12,$13,$17,$19,$20,"\n",$21,$22,$23,$27,$29,$30}' > $filetempblock # we've now got just the data we want and in a standardised format cat $filetempblock > $filetoday4 cat $filetoday5 | tr '\n' ' ' > $filetempblock # strips line feeds and EOL's from lines to put all data into one block cat $filetempblock | awk -F " " '{ORS=" "} {print $4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$40,$41,$42,$43,$44,$45,$46,$47,$48,$49,$50,$51,$52,$53,$54,$55,$56,$57,$58,$59,$60}' > $filetoday5 #prints all the fields to 'standardise' the spacing (needed to identify and substitute 'Cloudy' as against 'Partly Cloudy' cat $filetoday5 | sed -e 's/°c//g' -e 's/mb//g' -e 's/mm//g' -e 's/Wind from//g' -e 's/mph//g' -e 's/\%//g' > $filetempblock # strips out unneeded data cat $filetempblock | sed -e 's/Partly Cloudy/c/g' -e 's/Cloudy/d/g' -e 's/Fair/C/g' -e 's/Heavy Rain/j/g' -e 's/Light Rain/i/g' -e 's/Mainly Clear/b/g' -e 's/Sunny/A/g' -e 's/Intermittent Rain/e/g' -e 's/Clear/K/g' -e 's/Showers/e/g' -e 's/Mist/l/g' > $filetoday5 # converts weather descriptions to weather font character - standardises field numbers before final strip !! NEEDS TO BE ADDED TO cat $filetoday5 | awk -F " " '{print $1,$2,$3,$7,$9,$10,"\n",$11,$12,$13,$17,$19,$20,"\n",$21,$22,$23,$27,$29,$30}' > $filetempblock # we've now got just the data we want and in a standardised format cat $filetempblock > $filetoday5 cat $filetoday6 | tr '\n' ' ' > $filetempblock # strips line feeds and EOL's from lines to put all data into one block cat $filetempblock | awk -F " " '{ORS=" "} {print $4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$40,$41,$42,$43,$44,$45,$46,$47,$48,$49,$50,$51,$52,$53,$54,$55,$56,$57,$58,$59,$60}' > $filetoday6 #prints all the fields to 'standardise' the spacing (needed to identify and substitute 'Cloudy' as against 'Partly Cloudy' cat $filetoday6 | sed -e 's/°c//g' -e 's/mb//g' -e 's/mm//g' -e 's/Wind from//g' -e 's/mph//g' -e 's/\%//g' > $filetempblock # strips out unneeded data cat $filetempblock | sed -e 's/Partly Cloudy/c/g' -e 's/Cloudy/d/g' -e 's/Fair/C/g' -e 's/Heavy Rain/j/g' -e 's/Light Rain/i/g' -e 's/Mainly Clear/b/g' -e 's/Sunny/A/g' -e 's/Intermittent Rain/e/g' -e 's/Clear/K/g' -e 's/Showers/e/g' -e 's/Mist/l/g' > $filetoday6 # converts weather descriptions to weather font character - standardises field numbers before final strip !! NEEDS TO BE ADDED TO cat $filetoday6 | awk -F " " '{print $1,$2,$3,$7,$9,$10,"\n",$11,$12,$13,$17,$19,$20,"\n",$21,$22,$23,$27,$29,$30}' > $filetempblock # we've now got just the data we want and in a standardised format tail -n 1 $filetempblock | sed -e '/ Evening /!d' > $filetoday6 # Now we have to format the data and transpose some settings for day or night characters - then output to files that conky can import directly echo $today | awk -F " " '{ORS=" "} {print $1}' > $daynames echo $today1 | awk -F " " '{ORS=" "} {print $1}' >> $daynames echo $today2 | awk -F " " '{ORS=" "} {print $1}' >> $daynames echo $today3 | awk -F " " '{ORS=" "} {print $1}' >> $daynames echo $today4 | awk -F " " '{ORS=" "} {print $1}' >> $daynames echo $today5 | awk -F " " '{print $1}' >> $daynames cat $daynames | awk -F " " '{print $1,"\t",$2,"\t",$3,"\t",$4,"\t",$5,"\t",$6}' > $dtaynames cat $dtaynames > $daynames cat $filetoday | grep "Morning" | awk -F " " '{ORS=" "} {print $2,"\t"}' > $mrealtemp cat $filetoday1 | grep "Morning" | awk -F " " '{ORS=" "} {print $2,"\t"}' >> $mrealtemp cat $filetoday2 | grep "Morning" | awk -F " " '{ORS=" "} {print $2,"\t"}' >> $mrealtemp cat $filetoday3 | grep "Morning" | awk -F " " '{ORS=" "} {print $2,"\t"}' >> $mrealtemp cat $filetoday4 | grep "Morning" | awk -F " " '{ORS=" "} {print $2,"\t"}' >> $mrealtemp cat $filetoday5 | grep "Morning" | awk -F " " '{ORS=" "} {print $2,"\t"}'>> $mrealtemp cat $filetoday6 | grep "Morning" | awk -F " " '{print $2,"\t"}' >> $mrealtemp cat $mrealtemp | awk -F " " '{print $1,"\t",$2,"\t",$3,"\t",$4,"\t",$5,"\t",$6}' > $mtrealtemp cat $mtrealtemp | sed -e 's/ -8 /cold/g' -e 's/ -7 /cold/g' -e 's/ -6 /cold/g' -e 's/ -5 /cold/g' -e 's/ -4 /cold/g' -e 's/ -3 /cold/g' -e 's/ -2 /cold/g' -e 's/ -1 /cold/g' -e 's/ 0 /cold/g' -e 's/ 1 /cold/g' -e 's/ 2 /cold/g' -e 's/ 3 /cold/g' -e 's/ 4 /cold/g' -e 's/ 5 /cold/g' -e 's/ 6 /cold/g' -e 's/ 7 /cold/g' -e 's/ 15 /hot/g' > $isitcoldorhot cat $mrealtemp | awk -F " " '{print $1,$2,$3,$4,$5,$6,$7,$8}' > $alldata cat $filetoday | grep "Afternoon" | awk -F " " '{ORS=" "} {print $2,"\t"}' > $arealtemp cat $filetoday1 | grep "Afternoon" | awk -F " " '{ORS=" "} {print $2,"\t"}' >> $arealtemp cat $filetoday2 | grep "Afternoon" | awk -F " " '{ORS=" "} {print $2,"\t"}' >> $arealtemp cat $filetoday3 | grep "Afternoon" | awk -F " " '{ORS=" "} {print $2,"\t"}' >> $arealtemp cat $filetoday4 | grep "Afternoon" | awk -F " " '{ORS=" "} {print $2,"\t"}' >> $arealtemp cat $filetoday5 | grep "Afternoon" | awk -F " " '{ORS=" "} {print $2,"\t"}'>> $arealtemp cat $filetoday6 | grep "Afternoon" | awk -F " " '{print $2,"\t"}' >> $arealtemp cat $arealtemp | awk -F " " '{print $1,"\t",$2,"\t",$3,"\t",$4,"\t",$5,"\t",$6}' > $atrealtemp cat $atrealtemp | awk -F " " '{print $1,$2,$3,$4,$5,$6,$7,$8}' > $alldata cat $filetoday | grep "Evening" | awk -F " " '{ORS=" "} {print $2,"\t"}' > $nrealtemp cat $filetoday1 | grep "Evening" | awk -F " " '{ORS=" "} {print $2,"\t"}' >> $nrealtemp cat $filetoday2 | grep "Evening" | awk -F " " '{ORS=" "} {print $2,"\t"}' >> $nrealtemp cat $filetoday3 | grep "Evening" | awk -F " " '{ORS=" "} {print $2,"\t"}' >> $nrealtemp cat $filetoday4 | grep "Evening" | awk -F " " '{ORS=" "} {print $2,"\t"}' >> $nrealtemp cat $filetoday5 | grep "Evening" | awk -F " " '{ORS=" "} {print $2,"\t"}'>> $nrealtemp cat $filetoday6 | grep "Evening" | awk -F " " '{print $2,"\t"}' >> $nrealtemp cat $nrealtemp | awk -F " " '{print $1,"\t",$2,"\t",$3,"\t",$4,"\t",$5,"\t",$6}' > $ntrealtemp cat $ntrealtemp | awk -F " " '{print $1,$2,$3,$4,$5,$6,$7,$8}' > $alldata cat $filetoday | grep "Morning" | awk -F " " '{ORS=" "} {print $5,"\t"}' > $mwindspd cat $filetoday1 | grep "Morning" | awk -F " " '{ORS=" "} {print $5,"\t"}' >> $mwindspd cat $filetoday2 | grep "Morning" | awk -F " " '{ORS=" "} {print $5,"\t"}' >> $mwindspd cat $filetoday3 | grep "Morning" | awk -F " " '{ORS=" "} {print $5,"\t"}' >> $mwindspd cat $filetoday4 | grep "Morning" | awk -F " " '{ORS=" "} {print $5,"\t"}' >> $mwindspd cat $filetoday5 | grep "Morning" | awk -F " " '{ORS=" "} {print $5,"\t"}' >> $mwindspd cat $filetoday6 | grep "Morning" | awk -F " " '{print $5}' >> $mwindspd cat $mwindspd | awk -F " " '{print $1,"\t",$2,"\t",$3,"\t",$4,"\t",$5,"\t",$6}' > $mtwindspd cat $mtwindspd | awk -F " " '{print $1,$2,$3,$4,$5,$6}' >>$alldata cat $filetoday | grep "Afternoon" | awk -F " " '{ORS=" "} {print $5,"\t"}' > $awindspd cat $filetoday1 | grep "Afternoon" | awk -F " " '{ORS=" "} {print $5,"\t"}' >> $awindspd cat $filetoday2 | grep "Afternoon" | awk -F " " '{ORS=" "} {print $5,"\t"}' >> $awindspd cat $filetoday3 | grep "Afternoon" | awk -F " " '{ORS=" "} {print $5,"\t"}' >> $awindspd cat $filetoday4 | grep "Afternoon" | awk -F " " '{ORS=" "} {print $5,"\t"}' >> $awindspd cat $filetoday5 | grep "Afternoon" | awk -F " " '{ORS=" "} {print $5,"\t"}' >> $awindspd cat $filetoday6 | grep "Afternoon" | awk -F " " '{print $5}' >> $awindspd cat $awindspd | awk -F " " '{print $1,"\t",$2,"\t",$3,"\t",$4,"\t",$5,"\t",$6}' > $atwindspd cat $atwindspd | awk -F " " '{print $1,$2,$3,$4,$5,$6}' >>$alldata cat $filetoday | grep "Evening" | awk -F " " '{ORS=" "} {print $5,"\t"}' > $nwindspd cat $filetoday1 | grep "Evening" | awk -F " " '{ORS=" "} {print $5,"\t"}' >> $nwindspd cat $filetoday2 | grep "Evening" | awk -F " " '{ORS=" "} {print $5,"\t"}' >> $nwindspd cat $filetoday3 | grep "Evening" | awk -F " " '{ORS=" "} {print $5,"\t"}' >> $nwindspd cat $filetoday4 | grep "Evening" | awk -F " " '{ORS=" "} {print $5,"\t"}' >> $nwindspd cat $filetoday5 | grep "Evening" | awk -F " " '{ORS=" "} {print $5,"\t"}' >> $nwindspd cat $filetoday6 | grep "Evening" | awk -F " " '{print $5}' >> $nwindspd cat $nwindspd | awk -F " " '{print $1,"\t",$2,"\t",$3,"\t",$4,"\t",$5,"\t",$6}' > $ntwindspd cat $ntwindspd | awk -F " " '{print $1,$2,$3,$4,$5,$6}' >>$alldata cat $filetoday | grep "Morning" | awk -F " " '{ORS=" "} {print $4,"\t"}' > $mwinddir cat $filetoday1 | grep "Morning" | awk -F " " '{ORS=" "} {print $4,"\t"}' >> $mwinddir cat $filetoday2 | grep "Morning" | awk -F " " '{ORS=" "} {print $4,"\t"}' >> $mwinddir cat $filetoday3 | grep "Morning" | awk -F " " '{ORS=" "} {print $4,"\t"}' >> $mwinddir cat $filetoday4 | grep "Morning" | awk -F " " '{ORS=" "} {print $4,"\t"}' >> $mwinddir cat $filetoday5 | grep "Morning" | awk -F " " '{ORS=" "} {print $4,"\t"}' >> $mwinddir cat $filetoday6 | grep "Morning" | awk -F " " '{print $4}' >> $mwinddir cat $mwinddir | awk -F " " '{print $1,"\t",$2,"\t",$3,"\t",$4,"\t",$5,"\t",$6}' > $mtwinddir cat $mtwinddir | awk -F " " '{print $1,$2,$3,$4,$5,$6}' >>$alldata cat $filetoday | grep "Morning" | awk -F " " '{ORS=" "} {print $6,"\t"}' > $mconditions cat $filetoday1 | grep "Morning" | awk -F " " '{ORS=" "} {print $6,"\t"}' >> $mconditions cat $filetoday2 | grep "Morning" | awk -F " " '{ORS=" "} {print $6,"\t"}' >> $mconditions cat $filetoday3 | grep "Morning" | awk -F " " '{ORS=" "} {print $6,"\t"}' >> $mconditions cat $filetoday4 | grep "Morning" | awk -F " " '{ORS=" "} {print $6,"\t"}' >> $mconditions cat $filetoday5 | grep "Morning" | awk -F " " '{ORS=" "} {print $6,"\t"}' >> $mconditions cat $filetoday6 | grep "Morning" | awk -F " " '{print $6}' >> $mconditions cat $mconditions | awk -F " " '{print $1,"\t",$2,"\t",$3,"\t",$4,"\t",$5,"\t",$6}' > $mtconditions cat $mtconditions | awk -F " " '{print $1,$2,$3,$4,$5,$6}' >>$alldata cat $filetoday | grep "Afternoon" | awk -F " " '{ORS=" "} {print $6,"\t"}' > $aconditions cat $filetoday1 | grep "Afternoon" | awk -F " " '{ORS=" "} {print $6,"\t"}' >> $aconditions cat $filetoday2 | grep "Afternoon" | awk -F " " '{ORS=" "} {print $6,"\t"}' >> $aconditions cat $filetoday3 | grep "Afternoon" | awk -F " " '{ORS=" "} {print $6,"\t"}' >> $aconditions cat $filetoday4 | grep "Afternoon" | awk -F " " '{ORS=" "} {print $6,"\t"}' >> $aconditions cat $filetoday5 | grep "Afternoon" | awk -F " " '{ORS=" "} {print $6,"\t"}' >> $aconditions cat $filetoday6 | grep "Afternoon" | awk -F " " '{print $6}' >> $aconditions cat $aconditions | awk -F " " '{print $1,"\t",$2,"\t",$3,"\t",$4,"\t",$5,"\t",$6}' > $atconditions cat $atconditions | awk -F " " '{print $1,$2,$3,$4,$5,$6}' >>$alldata cat $filetoday | grep "Evening" | awk -F " " '{ORS=" "} {print $6,"\t"}' > $nconditions cat $filetoday1 | grep "Evening" | awk -F " " '{ORS=" "} {print $6,"\t"}' >> $nconditions cat $filetoday2 | grep "Evening" | awk -F " " '{ORS=" "} {print $6,"\t"}' >> $nconditions cat $filetoday3 | grep "Evening" | awk -F " " '{ORS=" "} {print $6,"\t"}' >> $nconditions cat $filetoday4 | grep "Evening" | awk -F " " '{ORS=" "} {print $6,"\t"}' >> $nconditions cat $filetoday5 | grep "Evening" | awk -F " " '{ORS=" "} {print $6,"\t"}' >> $nconditions cat $filetoday6 | grep "Evening" | awk -F " " '{print $6}' >> $nconditions cat $nconditions | sed -e 's/c/n/g' -e 's/d/o/g' -e 's/C/K/g' -e 's/j/t/g' -e 's/i/s/g' -e 's/b/m/g' -e 's/A/K/g' -e 's/e/s/g' > $ntconditions # converts day weather font to night weather font character - NEEDS TO BE ADDED TO cat $ntconditions | awk -F " " '{print $1,"\t",$2,"\t",$3,"\t",$4,"\t",$5,"\t",$6}' > $nconditions cat $nconditions | awk -F " " '{print $1,$2,$3,$4,$5,$6}' >>$alldata
conky-rss.shCode:#!/bin/bash # Section is to capture the temperature from /proc/acpi/ibm/thermal #----------------------------------------------------------------- cat /proc/acpi/ibm/thermal | awk -F " " '{ORS=" "} {print $2,"\t",$3,"\t",$4,"\t",$5}' > /tmp/.conkytemps/thinkpadtemps.txt cat /proc/acpi/ibm/fan | grep "speed:" | awk -F " " '{ORS=" "} {print $2}' > /tmp/.conkytemps/thinkpadfan.txt cat /tmp/.conkytemps/thinkpadtemps.txt | awk -F " " '{ORS=" "} {print $1}' > /tmp/.conkytemps/tpcputemp.txt cat /tmp/.conkytemps/thinkpadtemps.txt | awk -F " " '{ORS=" "} {print $2}' > /tmp/.conkytemps/tppcitemp.txt cat /tmp/.conkytemps/thinkpadtemps.txt | awk -F " " '{ORS=" "} {print $3}' > /tmp/.conkytemps/tphddtemp.txt cat /tmp/.conkytemps/thinkpadtemps.txt | awk -F " " '{ORS=" "} {print $4}' > /tmp/.conkytemps/tpgputemp.txt HOT="HOT" COOL="COOL" WARM="WARM" # Now we have to convert those temps into filenames that identify the temp range #------------------------------------------------------------------------------- # create the directory if [ ! -d /tmp/.conkytemps/.hardwaretemp ]; then mkdir /tmp/.conkytemps/.hardwaretemp; fi # Get the cpu temp and set the status cat /tmp/.conkytemps/tpcputemp.txt | sed -e 's/2[0-9]/COOL/g;s/3[0-9]/COOL/g;s/4[0-9]/COOL/g;s/5[0-9]/COOL/g;s/6[0-9]/WARM/g;s/7[0-5]/WARM/g;s/7[6-9]/HOT/g;s/8[0-9]/HOT/g;s/9[0-9]/HOT/g' > /tmp/.conkytemps/thinkpadcputemp.txt STATUSCPU="`cat /tmp/.conkytemps/thinkpadcputemp.txt`" # Remove the old status if [ -f /tmp/.conkytemps/CPU. ]; then rm /tmp/.conkytemps/CPU.; fi if [ -f /tmp/.conkytemps/CPU.$COOL ]; then rm /tmp/.conkytemps/CPU.$COOL; fi if [ -f /tmp/.conkytemps/CPU.$WARM ]; then rm /tmp/.conkytemps/CPU.$WARM; fi if [ -f /tmp/.conkytemps/CPU.$HOT ]; then rm /tmp/.conkytemps/CPU.$HOT; fi # Create the new status file if [ ! -f /tmp/.conkytemps/CPU.$STATUSCPU ]; then touch /tmp/.conkytemps/CPU.$STATUSCPU; fi # Get the pci(mobo) temp and set the status cat /tmp/.conkytemps/tppcitemp.txt | sed -e 's/2[0-9]/COOL/g;s/3[0-9]/COOL/g;s/4[0-9]/COOL/g;s/5[0-9]/COOL/g;s/6[0-4]/COOL/g;s/6[5-9]/WARM/g;s/7[0-9]/HOT/g;s/8[0-9]/HOT/g' > /tmp/.conkytemps/thinkpadpcitemp.txt STATUSPCI="`cat /tmp/.conkytemps/thinkpadpcitemp.txt`" # Remove the old status if [ -f /tmp/.conkytemps/PCI. ]; then rm /tmp/.conkytemps/PCI.; fi if [ -f /tmp/.conkytemps/PCI.$COOL ]; then rm /tmp/.conkytemps/PCI.$COOL; fi if [ -f /tmp/.conkytemps/PCI.$WARM ]; then rm /tmp/.conkytemps/PCI.$WARM; fi if [ -f /tmp/.conkytemps/PCI.$HOT ]; then rm /tmp/.conkytemps/PCI.$HOT; fi # Create the new status file if [ ! -f /tmp/.conkytemps/PCI.$STATUSPCI ]; then touch /tmp/.conkytemps/PCI.$STATUSPCI; fi # Get the HDD temp and set the status cat /tmp/.conkytemps/tphddtemp.txt | sed -e 's/2[0-9]/COOL/g;s/3[0-9]/COOL/g;s/4[0-9]/COOL/g;s/5[0-5]/WARM/g;s/5[6-9]/HOT/g;s/6[0-9]/HOT/g;s/7[0-9]/HOT/g;s/8[0-9]/HOT/g' > /tmp/.conkytemps/thinkpadhddtemp.txt STATUSHDD="`cat /tmp/.conkytemps/thinkpadhddtemp.txt`" # Remove the old status if [ -f /tmp/.conkytemps/HDD.$COOL ]; then rm /tmp/.conkytemps/HDD.$COOL; fi if [ -f /tmp/.conkytemps/HDD.$WARM ]; then rm /tmp/.conkytemps/HDD.$WARM; fi if [ -f /tmp/.conkytemps/HDD.$HOT ]; then rm /tmp/.conkytemps/HDD.$HOT; fi # Create the new status file if [ ! -f /tmp/.conkytemps/HDD.$STATUSHDD ]; then touch /tmp/.conkytemps/HDD.$STATUSHDD; fi # Get the GPU temp and set the status cat /tmp/.conkytemps/tpgputemp.txt | sed -e 's/2[0-9]/COOL/g;s/3[0-9]/COOL/g;s/4[0-9]/COOL/g;s/5[0-9]/COOL/g;s/6[0-9]/COOL/g;s/7[0-9]/COOL/g;s/8[0-9]/COOL/g;s/9[0-9]/HOT/g;s/10[0-9]/HOT/g' > /tmp/.conkytemps/thinkpadgputemp.txt STATUSGPU="`cat /tmp/.conkytemps/thinkpadgputemp.txt`" # Remove the old status if [ -f /tmp/.conkytemps/GPU.$COOL ]; then rm /tmp/.conkytemps/GPU.$COOL; fi if [ -f /tmp/.conkytemps/GPU.$WARM ]; then rm /tmp/.conkytemps/GPU.$WARM; fi if [ -f /tmp/.conkytemps/GPU.$HOT ]; then rm /tmp/.conkytemps/GPU.$HOT; fi # Create the new status file if [ ! -f /tmp/.conkytemps/GPU.$STATUSGPU ]; then touch /tmp/.conkytemps/GPU.$STATUSGPU; fi # Section is to identify amount of free space left on disk # -------------------------------------------------------- df /dev/sda3 -h > /tmp/.conkytemps/hddspace.txt cat /tmp/.conkytemps/hddspace.txt | tail -n 1 | awk -F " " '{ORS=" "} {print $4}' > /tmp/.conkytemps/harddiskspace.txt cat /tmp/.conkytemps/harddiskspace.txt | sed -e 's/1G/LOW/g' >/tmp/.conkytemps/harddisklow.txt cat /var/log/messages | tail -n 6 > /tmp/.conkytemps/currenttail.txt cat /tmp/.conkytemps/currenttail.txt | awk -F " " '{ORS=" "} {print "\n",$3,$5,$6,$7,$8,$9,$10,$11,$12}' > /tmp/.conkytemps/shorttail.txt
silentping.shCode:#!/bin/bash # RSS Display Script by Bill Woodford (admin@sdesign.us) v1.0 # # This script is designed to output story titles for most any RSS Feed. # # This script depends on curl. Please ensure it is installed and in your $PATH # Gentoo: emerge -av net-misc/curl # Debian: apt-get install curl # Homepage: http://curl.haxx.se/ # # Usage: # .conkyrc: ${execi [time] /path/to/script/conky-rss.sh URI LINES TITLENUM} # URI = Location of feed, ex. http://www.gentoo.org/rdf/en/glsa-index.rdf # LINES = How many titles to display (default 5) # TITLENUM = How many times the title of the feed itself is specified, usually 1 or 2 (default 2) # # Usage Example # ${execi 300 /home/youruser/scripts/conky-rss.sh http://www.foxnews.com/xmlfeed/rss/0,4313,1,00.rss 4 2} #RSS Setup - Don't change unless you want these values hard-coded! uri=$1 #URI of RSS Feed lines=$2 #Number of headlines titlenum=$3 #Number of extra titles #Script start #Require a uri, as a minimum if [[ "$uri" == "" ]]; then echo "No URI specified, cannot continue!" >&2 echo "Please read script for more information" >&2 else #Set defaults if none specified if [[ $lines == "" ]]; then lines=5 ; fi if [[ $titlenum == "" ]]; then titlenum=2 ; fi #The actual work curl -s --connect-timeout 30 $uri |\ sed -e 's/<\/title>/\n/g' |\ grep -o '<title>.*' |\ sed -e 's/<title>//' |\ head -n $(($lines + $titlenum)) |\ tail -n $(($lines)) fi
Code:#!/bin/bash if [[ "$#" != "3" ]]; then echo "Usage: silentping IP onsign offsign"; fi # Get the status STATUS="$(ping $1 -c 1 -w 2 | grep packets | sed "s/^.*tted, //;s/1/$2/;s/0/$3/;s/ re.*$//")" # Create the directory if [ ! -d /tmp/.status ]; then mkdir /tmp/.status; fi # Remove the old status if [ "$STATUS" == "$2" ]; then if [ -f /tmp/.status/$1.$3 ]; then rm /tmp/.status/$1.$3; fi else if [ -f /tmp/.status/$1.$2 ]; then rm /tmp/.status/$1.$2; fi fi # Create the new status file if [ ! -f /tmp/.status/$1.$STATUS ]; then touch /tmp/.status/$1.$STATUS; fi
$alignc in front of your calendar should centre it.
Heres my .conkyrcs. I didn't like my previous one so I modified the first one I posted on this thread and added the Folding@Home status. I'm having a bit of trouble with the $if_mounted on my external harddrive, it claims to be unmounted unless I remove the whole $if and $else functions in which it displays fine (unless, of course it's not mounted).
.conkyrc:
.conkyrc2:Code:maximum_width 230 background yes use_xft yes xftfont Bitstream Vera Sans Mono:size=8 xftalpha 0.8 mail_spool $MAIL update_interval 1 total_run_times 0 own_window yes own_window_type override own_window_transparent yes own_window_colour 7D191B own_window_hints undecorated below sticky skip_taskbar skip_pager double_buffer yes minimum_size 5 5 draw_shades no draw_outline yes draw_borders no draw_graph_borders yes default_color white default_shade_color black default_outline_color black alignment top_left gap_x 5 gap_y 27 no_buffers yes uppercase no cpu_avg_samples 2 net_avg_samples 2 override_utf8_locale no use_spacer no TEXT ${font size=13}${time %H:%M:%S} $alignr${time %a, }${time %e %B} $font${color aeaeae}Uptime: $color$uptime${alignr}${color aeaeae}CPU Temp:$color${acpitemp} ${color aeaeae}Kernel: $color$kernel ${color aeaeae}$hr ${color aeaeae}RAM: $color$mem/$memmax${alignr}${membar 5,100} ${color aeaeae}Swap: $color$swap/$swapmax${alignr}${swapbar 5,100} ${color aeaeae}CPU Usage: $color$cpu%${alignr}${cpubar 5,100} ${cpugraph 0000ff 00ff00} ${color aeaeae}$hr ${color aeaeae}Root: $color${fs_used /}/${fs_size /}${alignr}${fs_free_perc /}% ${fs_bar /} ${color aeaeae}Ext Harddrive:${if_mounted /media/FREECOM HDD}$color${fs_used /media/FREECOM HDD}/${fs_size /media/FREECOM HDD}${alignr}${fs_free_perc /media/FREECOM HDD}% ${fs_bar /media/FREECOM HDD}$else${color de0b0b} Not Mounted$endif ${color aeaeae}iPod:${if_mounted /media/IPOD}$color${fs_used /media/IPOD}/${fs_size /media/IPOD}${alignr}${fs_free_perc /media/IPOD}% ${fs_bar /media/IPOD}$else${color de0b0b} Not Mounted$endif ${color aeaeae}$hr ${color aeaeae}Network: $color${exec iwconfig eth1 | sed 's/ /\n/g' | grep ESSID | sed 's/ESSID:"//'| sed 's/"//'}${alignr}${linkstatus eth1}% ${color aeaeae}IP: $color${addr eth1} ${color aeaeae}${offset 83}DOWN:${alignr}UP: ${downspeedgraph eth1 20,110 440c09 f17f1f} ${alignr}${upspeedgraph eth1 20,110 440c09 f17f1f} ${color aeaeae}Speed:${offset 39}$color${downspeedf eth1}k/s${alignr}${upspeedf eth1}k/s ${color aeaeae}Total:${offset 33}$color${totaldown eth1}${alignr}${totalup eth1} ${color aeaeae}$hr ${color aeaeae}Processes: $color$processes ${alignr}${color aeaeae}Running: $color$running_processes ${color aeaeae}Highest CPU: ${color de0b0b}${top name 1}${top cpu 1} $color${top name 2}${top cpu 2} ${top name 3}${top cpu 3} ${top name 4}${top cpu 4} ${color aeaeae}Highest MEM: ${color de0b0b}${top_mem name 1}${top_mem mem 1} $color${top_mem name 2}${top_mem mem 2} ${top_mem name 3}${top_mem mem 3} ${top_mem name 4}${top_mem mem 4}
Code:maximum_width 320 background yes use_xft yes xftfont Bitstream Vera Sans Mono:size=8 xftalpha 0.8 mail_spool $MAIL update_interval 1 total_run_times 0 own_window yes own_window_type override own_window_transparent yes own_window_colour 701618 own_window_hints undecorated below sticky skip_taskbar skip_pager double_buffer yes minimum_size 50 5 draw_shades no draw_outline yes draw_borders yes draw_graph_borders yes default_color white default_shade_color black default_outline_color black alignment bottom_left gap_x 0 gap_y 0 no_buffers yes uppercase no cpu_avg_samples 2 net_avg_samples 2 override_utf8_locale no use_spacer no TEXT ${color aeaeae}FAH Status: $color${execi 60 tail -n 12 /opt/foldingathome/1/FAHlog.txt}
Last.fm | Linux User#449102 | Ubuntu User#15213
NEVER type a command you don't understand eg. sudo rm -rf / or something similar
I wish it would work on my notebook, I can't enable the double buffer so it flickers? Looks dope though nice job! I want it so badly!!!!
and I get alot of squares (unix noobie still), haven't really messed with it to much, I need to get to bed!!!
http://i220.photobucket.com/albums/d.../conky_big.png
Last edited by Sphex; August 21st, 2007 at 07:39 AM.
Did you add
to your xorg.conf? That usually eliminates the double-buffer flicker.Code:Load "dbe"
Ubuntu user #7247 :: Linux user #409907
inconsolation.wordpress.com
Advantages and Disadvantages of 64bit.(Plus install Guides)
‘In search of some small measure of peace, that we all seek, and few of us ever find.’
I'm having issues getting conky to start at boot. I've already started usr/bin/conky in sessions. Everytime I run it, I have to start it in cmd, and as soon as I close the window. What am I doing wrong?
For sessions, just use the command 'conky'.
Bookmarks