Page 49 of 180 FirstFirst ... 3947484950515999149 ... LastLast
Results 481 to 490 of 1800

Thread: HOWTO: VinDSL Conky Script

  1. #481

    Talking Re: HOWTO: VinDSL Conky Script

    So if you use element MP1 your sed calls would look like this ofr Metric - actually you can use only one such file and add the mph here itself and use the same file for both metric and imperial - what say ???

    Code:
    sed -e 's/Calm km\/h'/'\$\{offset 8\}Calm/g' |
    sed -e 's/Calm mph'/'\$\{offset 8\}Calm/g' |
    sed -e 's/New'/'\$\{offset -13\}New Moon/g' |
    sed -e 's/First'/'\$\{offset -5\}First Qtr/g' |
    sed -e 's/Full'/'\$\{offset 6\}Full Moon/g' |
    sed -e 's/Last'/'\$\{offset -5\}Last Qtr/g'
    See if this works

  2. #482
    Join Date
    Aug 2010
    Location
    Arizona USA
    Beans
    2,801
    Distro
    Ubuntu Development Release

    Re: HOWTO: VinDSL Conky Script

    Quote Originally Posted by paramvir View Post
    [...] have you looked at element MP1?

    Then you have the trend fonts[...] it is handled by conkywx use elements FCTPF for pressure trend font and FCTTF for temperature trend font.
    Oops! New version, and I forgot to RTFM... LoL!

    Yes, the new elements narrow things even further. Good job!

    As an aside, it sure is easier to work with Metric weather stats -- no triple-digits to deal with.

    Anyway, I've incorporated most of your suggestions, which allowed me to lessen the text buffer size even further:

    Code:
    ####
    ## This buffer is used for single lines, text, output from $exec, and other variables.
    ## Increasing the 'text_buffer_size' (too high) will drastically reduce Conky's performance.
    ## Decreasing the buffer size (too low) will truncate content and cause strange display output.
    ## Standard text buffer size is 256 bytes (cannot be less). Adjust YOUR buffer wisely!
    ## Tips n' Tricks from dk75:"You don't need to create a 12KiB buffer for every Conky config line."
    #
    text_buffer_size 2816
    I use multiples of "256" [256*11=2816]. It'll run fine in the 2600-ish range, but 2816 gives it some "fudge room".

    I'm going to stay with separate SEDs files for now, for aesthetic reasons. It adds a level of control, without being cumbersome, IMO.

    Here's where it stands, right now...

    "/usr/share/conkywx/examples/wx-wu-vindsl-imperial-weather-template.sh"
    Code:
    ##################################
    ## VinDSL | rev. 12-10-02 15:51 ##
    ##################################
    ##  IMPERIAL WEATHER TEMPLATE   ##
    ##################################
    ${voffset 6}${goto 34}${font Weather:size=44}${color6}y${font}${voffset -35}${font Arrows:size=28}${goto 160}${color6}[FCTTF]${font}
    ${voffset -43}${font RadioSpace:size=33}${color6}${alignc 13}[PT]${font}
    ${voffset 2}${font DroidSansFallback:bold:size=7.4}${alignc 6}${color5}Feels${offset 3}like${offset 1}:${offset 2}${color6}[FL]${offset 2}${color5}/${offset 3}${color6}[FCTT]${font}
    ${voffset -40}${goto 203}${font DroidSansFallback:bold:size=8.75}${color6}[D1T]${font}
    ${voffset 0}${goto 203}${font DroidSansFallback:bold:size=7.3}${color5}CoR${offset 3}${color6}[D1P]${font}
    ${voffset -45}${goto 188}${font KRARound:size=41.5}${color6}I${font}
    ${voffset 6}${font Ubuntu:size=22.75}${color5}${alignc}[CT]${font}
    ${voffset 7}${alignc 5}${font}${font DroidSansFallback:bold:size=8}${color5}Sunrise${offset 1}:${offset 1}${color6}[SR]${offset 6}${color5}Sunset${offset 1}:${offset 1}${color6}[SS]${font}
    ${voffset 8}${goto 85}${font DroidSansFallback:bold:size=7.55}${color5}Humidity${offset 1}:${offset 2}${color6}[HM]${font}${voffset 11}${goto 84}${font DroidSansFallback:bold:size=7.55}${color5}Barometer${offset 1}:${offset 2}${color6}[BR]${font}${voffset 11}${goto 84}${font DroidSansFallback:bold:size=7.55}${color5}Bar${offset 3}Trend${offset 1}:${offset 2}${color6}[FCTP]${font}${voffset 11}${goto 84}${font DroidSansFallback:bold:size=7.55}${color5}Moonrise${offset 1}:${color6}[MR]${font}${voffset 11}${goto 85}${font DroidSansFallback:bold:size=7.55}${color5}Moonset${offset 1}:${color6}[MS]${font}
    ${voffset -61}${goto 16}${font ConkyWindNESW:size=41.6}${color6}[BF]${font}${voffset -36}${goto 196}${font MoonPhases:size=35}${color6}[MIF]${font}${voffset -36}${goto 198}${font MoonPhases:size=35}${color6}8${font}
    ${voffset -1}${goto 22}${font DroidSansFallback:bold:size=8.45}${color3}[WS] mph${voffset -1}${goto 203}[MP]${font}
    ${voffset 8}${goto 25}${font DroidSans:bold:size=8.5}${color5}[D2D]${goto 85}[D3D]${goto 144}[D4D]${goto 201}[D5D]${font}
    ${voffset 2}${goto 23}${font ConkyWeather:size=32}${color6}[D2F]${goto 83}[D3F]${goto 142}[D4F]${goto 200}[D5F]${font}
    ${voffset 1}${goto 25}${font DroidSans:bold:size=8.5}${color3}[D2T]${goto 85}[D3T]${goto 144}[D4T]${goto 201}[D5T]${font}
    ${voffset -1}${goto 24}${font DroidSans:bold:size=8.45}${color5}CoR${offset 3}${color3}[D2P]${goto 84}${color5}CoR${offset 3}${color3}[D3P]${goto 144}${color5}CoR${offset 3}${color3}[D4P]${goto 201}${color5}CoR${offset 3}${color3}[D5P]${font}
    "/usr/share/conkywx/examples/wx-wu-vindsl-imperial-weather-seds.sh"
    Code:
    ##################################
    ## VinDSL | rev. 12-10-02 14:34 ##
    ##################################
    ##    IMPERIAL WEATHER SEDs     ##
    ##################################
    sed -e 's/Calm mph'/'\$\{offset 8\}Calm/g' |
    sed -e 's/New Moon'/'\$\{offset -13\}New Moon/g' |
    sed -e 's/Waxing Crescent'/'\$\{offset -3\}Waxing/g' |
    sed -e 's/First Quarter'/'\$\{offset -5\}First Qtr/g' |
    sed -e 's/Waxing Gibbous'/'\$\{offset -3\}Waxing/g' |
    sed -e 's/Full'/'\$\{offset 6\}Full/g' |
    sed -e 's/Waning Gibbous'/'\$\{offset -4\}Waning/g' |
    sed -e 's/Last Quarter'/'\$\{offset -5\}Last Qtr/g' |
    sed -e 's/Waning Crescent'/'\$\{offset -3\}Waning/g' |
    sed -e 's/N\/A'/'/g'
    "/usr/share/conkywx/examples/wx-wu-vindsl-metric-weather-template.sh"
    Code:
    ##################################
    ## VinDSL | rev. 12-10-02 14:50 ##
    ##################################
    ##   CONKYWX WEATHER TEMPLATE   ##
    ##################################
    ${voffset 6}${goto 34}${font Weather:size=44}${color6}y${font}${voffset -35}${font Arrows:size=28}${goto 155}${color6}[FCTTF]${font}
    ${voffset -43}${font RadioSpace:size=33}${color6}${alignc 14}[PT]${font}
    ${voffset 2}${font DroidSansFallback:bold:size=7.4}${alignc 6}${color5}Feels${offset 3}like${offset 1}:${offset 2}${color6}[FL]${offset 2}${color5}/${offset 3}${color6}[FCTT]${font}
    ${voffset -40}${goto 203}${font DroidSansFallback:bold:size=8.75}${color6}[D1T]${font}
    ${voffset 0}${goto 203}${font DroidSansFallback:bold:size=7.3}${color5}CoR${offset 3}${color6}[D1P]${font}
    ${voffset -45}${goto 188}${font KRARound:size=41.5}${color6}I${font}
    ${voffset 6}${font Ubuntu:size=22.75}${color5}${alignc}[CT]${font}
    ${voffset 7}${alignc 5}${font}${font DroidSansFallback:bold:size=8}${color5}Sunrise${offset 1}:${offset 1}${color6}[SR]${offset 6}${color5}Sunset${offset 1}:${offset 1}${color6}[SS]${font}
    ${voffset 8}${goto 85}${font DroidSansFallback:bold:size=7.55}${color5}Humidity${offset 1}:${offset 2}${color6}[HM]${font}${voffset 11}${goto 84}${font DroidSansFallback:bold:size=7.55}${color5}Barometer${offset 1}:${offset 2}${color6}[BR]${font}${voffset 11}${goto 84}${font DroidSansFallback:bold:size=7.55}${color5}Bar${offset 3}Trend${offset 1}:${offset 2}${color6}[FCTP]${font}${voffset 11}${goto 84}${font DroidSansFallback:bold:size=7.55}${color5}Moonrise${offset 1}:${color6}[MR]${font}${voffset 11}${goto 85}${font DroidSansFallback:bold:size=7.55}${color5}Moonset${offset 1}:${color6}[MS]${font}
    ${voffset -61}${goto 16}${font ConkyWindNESW:size=41.6}${color6}[BF]${font}${voffset -36}${goto 196}${font MoonPhases:size=35}${color6}[MIF]${font}${voffset -36}${goto 198}${font MoonPhases:size=35}${color6}8${font}
    ${voffset -1}${goto 21}${font DroidSansFallback:bold:size=8.45}${color3}[WS] km/h${voffset -1}${goto 203}[MP]${font}
    ${voffset 8}${goto 25}${font DroidSans:bold:size=8.5}${color5}[D2D]${goto 85}[D3D]${goto 144}[D4D]${goto 201}[D5D]${font}
    ${voffset 2}${goto 23}${font ConkyWeather:size=32}${color6}[D2F]${goto 83}[D3F]${goto 142}[D4F]${goto 200}[D5F]${font}
    ${voffset 1}${goto 25}${font DroidSans:bold:size=8.5}${color3}[D2T]${goto 85}[D3T]${goto 144}[D4T]${goto 201}[D5T]${font}
    ${voffset -1}${goto 24}${font DroidSans:bold:size=8.45}${color5}CoR${offset 3}${color3}[D2P]${goto 84}${color5}CoR${offset 3}${color3}[D3P]${goto 144}${color5}CoR${offset 3}${color3}[D4P]${goto 201}${color5}CoR${offset 3}${color3}[D5P]${font}
    "/usr/share/conkywx/examples/wx-wu-vindsl-metric-weather-seds.sh"
    Code:
    ##################################
    ## VinDSL | rev. 12-10-02 14:33 ##
    ##################################
    ##     METRIC WEATHER SEDs      ##
    ##################################
    sed -e 's/Calm km\/h'/'\$\{offset 8\}Calm/g' |
    sed -e 's/New Moon'/'\$\{offset -13\}New Moon/g' |
    sed -e 's/Waxing Crescent'/'\$\{offset -3\}Waxing/g' |
    sed -e 's/First Quarter'/'\$\{offset -5\}First Qtr/g' |
    sed -e 's/Waxing Gibbous'/'\$\{offset -3\}Waxing/g' |
    sed -e 's/Full'/'\$\{offset 6\}Full/g' |
    sed -e 's/Waning Gibbous'/'\$\{offset -4\}Waning/g' |
    sed -e 's/Last Quarter'/'\$\{offset -5\}Last Qtr/g' |
    sed -e 's/Waning Crescent'/'\$\{offset -3\}Waning/g' |
    sed -e 's/N\/A'/'/g'
    Oh, BTW...

    Quote Originally Posted by paramvir View Post
    I have not noticed wunderground using first or last quarter in their moon phase for a while - though I recall it being used once which was when I put it into my code for handling moon phase [...]
    I'm new to using WU as a data feed, but I've been goofing around with it for almost a full lunar cycle.

    Maybe it depends on your locale, language, et cetera, but the weather reports I've been receiving (from my area) have included "First Quarter" and "Last Quarter".

    Then again, maybe Conkywx is generating that text. I haven't specifically looked at how it's being parsed.

    [MP1] is probably the way to go, as you suggested, but I haven't crossed that bridge yet...

    Anyway, thanks again, Paramvir! I appreciate all the hard work you're doing!
    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

  3. #483
    Join Date
    Jan 2009
    Location
    Harborcreek Pa
    Beans
    343
    Distro
    Ubuntu Development Release

    Re: HOWTO: VinDSL Conky Script

    Quote Originally Posted by hallansing View Post
    Hi all,

    MINT 10 ( Maverik ), 64 bit...
    conky was working before with google api weather script,
    as you might know googled ditched weather api in august,
    searched for replacement conky weather scripts, found this one...

    Anyways,
    I've got a problem with this conkywx:
    followed the instructions on page 41 of this thread...
    what i get under WEATHER section in conky are these 2 lines:

    Usage: wget [OPTION]...[URL]...
    Try `wget --help' for more options.

    no weather information other than those 2 lines...
    looks like wget is not working at all here...

    Mike.
    On my Ubuntu 11.10 install I had to change this line in conkywx.sh from.
    Code:
    wget --tries=99 --timeout=60 --no-use-server-timestamps --user-agent="$user_agent" --save-cookies $imp_cookies -O $currdata $curr_url
    To
    Code:
    wget --tries=99 --timeout=60 --user-agent="$user_agent" --save-cookies $imp_cookies -O $currdata $curr_url
    As the option --no-use-server-timestamps does not seem to be available in Ubuntu 11.10 vesion of wget.

    Bill
    LINUX Flight Simulator Machine - AMD 8-Core FX-8350 - Antec KUHLER H2O 920 - 32G Ram - Nvidia GeForce GTX 680 PCI/Express 4096 MB - Driver Version 310.14 - Asus VE278 - Ubuntu 64 bit 12.04 - 12.10 - 13.04 - 13.10 - 14.04 - X-Plane 10.25b1

  4. #484
    Join Date
    Jan 2009
    Location
    Harborcreek Pa
    Beans
    343
    Distro
    Ubuntu Development Release

    Re: HOWTO: VinDSL Conky Script

    I have moved my config and templates to /home/bill/.config/conkywx. I have to use full paths and seems to be stable in this location.

    Code:
    ####
    ## Define the locations of Conkywx files (required)
    ## Set the path to your .confs, seds, and templates here.
    ## Tips n' Tricks: seds files must be marked as executable, e.g. have execute permissions.
    #
    template0 "/usr/share/conkywx/conkywx.sh"
    template1 "/home/bill/.config/conkywx/vindsl-imperial-conkywx.conf"
    template2 "/home/bill/.config/conkywx/wx-wu-vindsl-imperial-weather-template.sh"
    template3 "/home/bill/.config/conkywx/wx-wu-vindsl-imperial-weather-seds.sh"
    template4 "/home/bill/.config/conkywx/vindsl-metric-conkywx.conf"
    template5 "/home/bill/.config/conkywx/examples/wx-wu-vindsl-metric-weather-template.sh"
    template6 "/home/bill/.config/conkywx/examples/wx-wu-vindsl-metric-weather-seds.sh"
    Also since my config is in a default location I do not need the -c option.

    Code:
    ##################################
    ##      CONKYWX WEATHER         ##
    ##################################
    ${voffset 4}${font DroidSans:bold:size=8.25}${color4}CONKYWX${offset 8}${color6}${voffset -2}${hr 1}${font}
    ####
    ## Uncomment for Imperial Weather Stats.
    ${execpi 900 conkywx -t "${template2}" | "${template3}"}${font}
    ####
    ## Uncomment for Metric Weather Stats.
    # ${execpi 900 conkywx -t "${template5}" | "${template6}"}${font}
    Thanks to Paramvir & VinDSL and all others in this very active thread.

    Bill
    LINUX Flight Simulator Machine - AMD 8-Core FX-8350 - Antec KUHLER H2O 920 - 32G Ram - Nvidia GeForce GTX 680 PCI/Express 4096 MB - Driver Version 310.14 - Asus VE278 - Ubuntu 64 bit 12.04 - 12.10 - 13.04 - 13.10 - 14.04 - X-Plane 10.25b1

  5. #485

    Talking Re: HOWTO: VinDSL Conky Script

    Quote Originally Posted by sparker256 View Post
    On my Ubuntu 11.10 install I had to change this line in conkywx.sh from.
    Code:
    wget --tries=99 --timeout=60 --no-use-server-timestamps --user-agent="$user_agent" --save-cookies $imp_cookies -O $currdata $curr_url
    To
    Code:
    wget --tries=99 --timeout=60 --user-agent="$user_agent" --save-cookies $imp_cookies -O $currdata $curr_url
    As the option --no-use-server-timestamps does not seem to be available in Ubuntu 11.10 vesion of wget.

    Bill
    As a work around you could add just after that line "touch $currdata".
    I had tried that first but saw this --no-use-server-timestamps.

    This was when I was doing the version check code.

    You will probably need to do this change more in that otherwise the program makes a new version check each call.

    Thanks for the kind words Bill

    Also you can export your path in the starting script like I have done in conky-restart.sh using $WX_DIR and then use that in your conkyrc

    for example "WX_DIR=$HOME/.config/conkywx; export $WX_DIR"

    you can call the variable what ever you like actually

    Edit:
    So your calls like
    Code:
    template1 "/home/bill/.config/conkywx/vindsl-imperial-conkywx.conf"
    would look like
    Code:
    template1 "$WX_DIR/vindsl-imperial-conkywx.conf"
    I use this all the time as I need to switch around between the installed version and the development version
    Last edited by paramvir; October 3rd, 2012 at 04:29 AM.

  6. #486

    Talking Re: HOWTO: VinDSL Conky Script

    Quote Originally Posted by VinDSL View Post
    Oops! New version, and I forgot to RTFM... LoL!

    [MP1] is probably the way to go, as you suggested, but I haven't crossed that bridge yet...

    Anyway, thanks again, Paramvir! I appreciate all the hard work you're doing!
    yes the MP1 thing came about many moons back while I was fine tuning the template and did not have space so split the moon element into MP1 and MP2 and last night made MP3 to handle the rest of the "qtr" statements so next version that part of your sed calls also go - finally I think we will be left with the mpg and km/h call only - maybe that will also become redundant too

    thank you for the kind words

  7. #487
    Join Date
    Jan 2009
    Location
    Harborcreek Pa
    Beans
    343
    Distro
    Ubuntu Development Release

    Re: HOWTO: VinDSL Conky Script

    One other thing that would be nice to be in the config file is removing the leading zeros in the time. So 07:20 am becomes 7:20 am.

    A option to switch from
    Code:
    				echo $( date --date "$corrtime 1 hour 30 min" "+%I:%M %p")
    			else
    				# echo $( date --date="$corrtime" +%R )
    				case $show_lowercase_ampm in
    				0)
    					echo "$( date --date="$corrtime" "+%I:%M %p" )"
    					;;
    				1)
    					echo "$( date --date="$corrtime" "+%I:%M %P" )"
    					;;
    				2)
    					echo "$( date --date="$corrtime" "+%I:%M" )"
    					;;
    To
    Code:
    				echo $( date --date "$corrtime 1 hour 30 min" "+%l:%M %p")
    			else
    				# echo $( date --date="$corrtime" +%R )
    				case $show_lowercase_ampm in
    				0)
    					echo "$( date --date="$corrtime" "+%l:%M %p" )"
    					;;
    				1)
    					echo "$( date --date="$corrtime" "+%l:%M %P" )"
    					;;
    				2)
    					echo "$( date --date="$corrtime" "+%l:%M" )"
    					;;
    Thanks Bill
    LINUX Flight Simulator Machine - AMD 8-Core FX-8350 - Antec KUHLER H2O 920 - 32G Ram - Nvidia GeForce GTX 680 PCI/Express 4096 MB - Driver Version 310.14 - Asus VE278 - Ubuntu 64 bit 12.04 - 12.10 - 13.04 - 13.10 - 14.04 - X-Plane 10.25b1

  8. #488

    Smile Re: HOWTO: VinDSL Conky Script

    Quote Originally Posted by sparker256 View Post
    One other thing that would be nice to be in the config file is removing the leading zeros in the time. So 07:20 am becomes 7:20 am.
    Thanks Bill
    Thanks for the suggestion

    Option 3 gives you that already in ver 0.7.5
    However I have now added a custom_time_format
    PHP Code:
    # -----------------------------------------------------------------------
    # use upper or lower case AM PM or am pm for 12 hour time format
    # -----------------------------------------------------------------------
    #+ 0 for uppercase, 1 for lower, 2 for no am pm, 3 no padding and space, 
    #+ 4 use custom time format - state the format in custom_time_format
    #+ NOTE: this will only work if Time_format=12
    show_lowercase_ampm=4

    # -----------------------------------------------------------------------
    # set custom time format - see man date in a terminal to get more options
    #+ ensure to quote the format in single quotes as shown
    # -----------------------------------------------------------------------
    # custom_time_format='+%_I:%M %P'
    custom_time_format='+%_I:%M' 
    trust this should work for everyone

    My preference is 24 hour format - so much simpler
    Last edited by paramvir; October 3rd, 2012 at 03:50 PM.

  9. #489
    Join Date
    Feb 2011
    Beans
    15

    Re: HOWTO: VinDSL Conky Script

    Quote Originally Posted by sparker256 View Post
    On my Ubuntu 11.10 install I had to change this line in conkywx.sh from.
    Code:
    wget --tries=99 --timeout=60 --no-use-server-timestamps --user-agent="$user_agent" --save-cookies $imp_cookies -O $currdata $curr_url
    To
    Code:
    wget --tries=99 --timeout=60 --user-agent="$user_agent" --save-cookies $imp_cookies -O $currdata $curr_url
    As the option --no-use-server-timestamps does not seem to be available in Ubuntu 11.10 vesion of wget.

    Bill
    Thank you Bill,

    I changed the lines per your suggestion, still same problem...
    under weather section i get wget usage/help errors...
    i've got 10.10 mint(ubuntu) 64 bit, my wget version is 1.12

    Also, if I go to wunderground.com and plug in any US city in there
    ( my browser is firefox ) for Location i get this type of web address
    ocation=http://www.wunderground.com/q/zmw:33427.1.99999
    ie, 33427 and then a period and some more numbers...
    for example if I plug in New York, it gives me similar format address
    so for Location in conkywx.conf I tried these:
    Location=33427
    Location=33427.1.99999
    Location=http://www.wunderground.com/q/zmw:33427.1.99999

    xml_ID=KFLBOCAR29

    so far nothing worked...
    snapshot file attached

    Please, need more help... wget is not working for me here...
    it looks like conkyrc is calling conkywx script by wget is stuck...

    ***It would be nice if somebody like Vindsl posted clear step by step instructions
    of definite working conkywx section*** like the older weather.com Vindsl script
    that I had used before for conky and had absolutely no problem with ( untill weather.com pulled the plug on their API ), was a good script

    Vindsl, could you be so kind and post step by step instructions for conkywx and
    you template, sed, conf and conkyrc files ... Please.


    Thanks.
    Attached Images Attached Images

  10. #490
    Join Date
    Jan 2009
    Location
    Harborcreek Pa
    Beans
    343
    Distro
    Ubuntu Development Release

    Re: HOWTO: VinDSL Conky Script

    @ hallansing
    Understand most of us are running very current versions of Ubuntu so running a older version may be the issue.

    No mater what running from the terminal and post the errors may be your best chance to getting this to work.

    Bill
    LINUX Flight Simulator Machine - AMD 8-Core FX-8350 - Antec KUHLER H2O 920 - 32G Ram - Nvidia GeForce GTX 680 PCI/Express 4096 MB - Driver Version 310.14 - Asus VE278 - Ubuntu 64 bit 12.04 - 12.10 - 13.04 - 13.10 - 14.04 - X-Plane 10.25b1

Page 49 of 180 FirstFirst ... 3947484950515999149 ... 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
  •