Page 95 of 287 FirstFirst ... 45859394959697105145195 ... LastLast
Results 941 to 950 of 2865

Thread: HOWTO: VinDSL Conky Script

  1. #941
    Join Date
    Aug 2010
    Location
    Arizona USA
    Beans
    3,001
    Distro
    Ubuntu Development Release

    Re: HOWTO: VinDSL Conky Script

    Quote Originally Posted by paramvir View Post
    OK - HOLD the press - got that pesky curly brace Vin you can unwrap your mind - or actually 2 minds better than one lol

    Now we can look for it - it is in the code some where in template_cleanup / showtime thing...

    I have saved that currdata.html and shall go through ... ha !!!
    I swear, we must have been twins, separated at birth. LoL!

    We always seem to come up with the same idea(s), at the same time, independently. How can that be?!?!?

    I got rid of the closing brace by removing the ${font} tag, at the end of the line that contains [MP], in my template.






    AFAIK, this would indeed point to the "template_cleanup / showtime thing", which I've been working on, since 4:00AM.

    It would appear that the 'cleanup' routine is wiping out or corrupting everything on that line, to the right of [MP] (except for some aberrations like not removing the closing brace in ${font} et cetera). It just fubars everything I insert on that line, to the right of [MP].

    From what I tell, everything else is being handled correctly (time will tell). [MP] is the problem child. Weird!

    I'll keep putzing around with it, and see what I can come up with...
    Last edited by VinDSL; May 18th, 2013 at 06:53 PM. Reason: Added screenie
    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. #942
    Join Date
    Aug 2010
    Location
    Arizona USA
    Beans
    3,001
    Distro
    Ubuntu Development Release

    On Wondering & Wandering...

    w00t! Think I got it...

    I was wondering why only '[MP]' was being difficult, and nothing else, and my mind started wandering.

    I changed the '[p]' in the 'cleanup' function to something more unique (easier to find when editing/testing code).

    Added '${font}' to the end of the '[MP]' line, in my template, and it seems to be working now. LoL!

    UPDATE 1

    * Changed the logical OR operator to AND ('||' to '&&') also.

    Not sure how this will affect the langs. Guess I should go test it, huh?

    UPDATE 2

    Spanish is working in '[MP]' now. I don't *think* it was doing jack before.

    If I remember correctly, '[MP]' was displaying in English, even when Spanish was selected.

    UPDATE 3

    Changed the AND operator back to OR. AND operator was causing everything but '[MP]' to fail. LoL!

    Funny thing is, everything is working normally now -- no close bracket et cetera.

    This is a grand cat n' mouse game!

    Think I'll turn my back on it, for a few minutes, and let it sneak up on me again. Heh!

    Code:
    # -----------------------------------------------------------------------
    # Process the final template before showtime
    # -----------------------------------------------------------------------
    pre_showtime_template () {
    	# set -x
    	if [[ $language_to_use ]]; then
    		lang_path="${cwxpath}/lang"
    		language_to_use2=${language_to_use,,}
    		language_file="${lang_path}/${language_to_use2}.lang"
    		if [[ -s $language_file ]]; then
    			source $language_file
    		else
    			msgout "$no_lang_display"
    		fi
    	fi
    
    	if [[ $template_cleanup ]] &&  [[ $language_to_use ]]; then
    		template_cleanup2=( "${do_lang[@]}" "${template_cleanup[@]}" )
    	elif [[ ! $template_cleanup ]] &&  [[ $language_to_use ]]; then
    		template_cleanup2=( "${do_lang[@]}" )
    	elif [[ $template_cleanup ]] &&  [[ ! $language_to_use ]]; then
    		template_cleanup2=( "${template_cleanup[@]}" )
    	fi
    
    	if [[ $template_cleanup ]] && [[ $language_to_use ]]; then
    		for vindsl in ${!template_cleanup2[@]}
    			do
    				local bl_text="${template_cleanup2[vindsl]}"
    				if [[ $bl_text == *:* ]]; then
    					local lt1=${bl_text/\:*}		# get value left of :
    					local rt1=${bl_text#*\:}		# get value right of :
    					local rt1=$(do_pc_what_case "$rt1")
    					# local test1='s`'"$lt1"'`'"$rt1"'`gi'
    					local test1='s`\<'"${lt1}"'\>`'"${rt1}"'`gi'
    					local test2+="$test1; "
    					err_1=0
    				else
    					err_1=1
    				fi
    			done
    		case $err_1 in
    		0)	sed -i -e "${test2[@]}" $temp_template			;;
    		1)	msgout "$showtime_err"					;;
    		esac
    	fi
    	# set +x
    }
    Go figure!

    That was too easy!

    I'll keep an eye on it for a while...
    Last edited by VinDSL; May 18th, 2013 at 05:42 PM. Reason: Update
    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. #943

    Cool Re: On Wondering & Wandering...

    Quote Originally Posted by VinDSL View Post
    w00t! Think I got it...

    I'll keep an eye on it for a while...
    HI there - I had to run out shortly after I posted my smoke signal [ damn that wet blanket dried up real fast]

    But before I did - I did some checking but just could not report my findings.

    We certainly are twins in our mind - if nothing else [there is some obtuse research some where that states that speed of thought is 3 times or is 3 cube times the speed of light ] - I saw your post on the phone and felt I should have made that post - but ...

    Yes - the real issue is with sed searching and replacing whole words - I had to make this change last time as language substitution was going wild changing half the words.

    If I go back to the old code which is commented just above the present line

    Code:
    # local test1='s`'"$lt1"'`'"$rt1"'`gi' 
    local test1='s`\<'"${lt1}"'\>`'"${rt1}"'`gi'
    If we remove \< \> it all works fine. Otherwise it is including ${font as part of the whole word - so in cases where you have any ${some text} - it will replace that text you have asked for plus ${some text and you get left with replaced text plus }.

    SO I need to get elegant enough code to handle both - because I have so far found that you cannot ask sed to look for whole words and also use regex between \< and \>.

    Perhaps I need to make a function which will be called by either or both the arrays to be handled.

  4. #944

    Cool Re: HOWTO: VinDSL Conky Script

    OK - here is the change - please test it with language_to_use option also - looking fine

    PHP Code:
    # -----------------------------------------------------------------------
    # process pre_showtime_template template_cleanup and or language_to_use
    # -----------------------------------------------------------------------
    do_cleanup_lang () {
        case $
    1 in
        1
    )    temp_clean=( "${template_cleanup[@]}) ;;
        
    2)    temp_clean=( "${do_lang[@]})    ;;
        
    esac

        
    for p in ${!temp_clean[@]}
            do
                
    local bl_text="${temp_clean[p]}"
                
    if [[ $bl_text == *:* ]]; then
                    local lt1
    =${bl_text/\:*}        # get value left of :
                    
    local rt1=${bl_text#*\:}        # get value right of :
                    
    local rt1=$(do_pc_what_case "$rt1")
                    case $
    1 in
                    1
    )    local test1='s`'"${lt1}"'`'"${rt1}"'`gi'        ;;
                    
    2)    local test1='s`\<'"${lt1}"'\>`'"${rt1}"'`gi'    ;;
                    
    esac
                    local test2
    +="$test1; "
                    
    err_1=0
                
    else
                    
    err_1=1
                fi
            done

        
    case $err_1 in
        0
    )    sed --"${test2[@]}$temp_template            ;;
        
    1)    msgout "$showtime_err"                            ;;
        
    esac

    }

    # -----------------------------------------------------------------------
    # Process the final template before showtime
    # -----------------------------------------------------------------------
    pre_showtime_template () {

        if [[ 
    $template_cleanup ]]; then
            do_cleanup_lang 1
        fi

        
    if [[ $language_to_use ]]; then
            lang_path
    ="${cwxpath}/lang"
            
    language_to_use2=${language_to_use,,}
            
    language_file="${lang_path}/${language_to_use2}.lang"
            
    if [[ -s $language_file ]]; then
                source $language_file
                do_cleanup_lang 2
            
    else
                
    msgout "$no_lang_display"
            
    fi
        fi


    Last edited by paramvir; May 19th, 2013 at 07:48 PM. Reason: change in code

  5. #945
    Join Date
    Aug 2010
    Location
    Arizona USA
    Beans
    3,001
    Distro
    Ubuntu Development Release

    Re: HOWTO: VinDSL Conky Script

    Quote Originally Posted by paramvir View Post
    HI there - I had to run out shortly after I posted my smoke signal [...]

    I saw your post on the phone and felt I should have made that post - but [...]
    No probs, paramvir!

    I'm probably the only guy on the web that doesn't support his own work. You're a saint, by comparison! LoL!

    Why not?!?!? No spare time. That's the reason 42dorian started this thread. He didn't have a lot spare time either.

    Life would be sooo much easier, if there were 52 hours in a day and 365 days in a week, you know?


    Quote Originally Posted by paramvir View Post
    OK - here is the change - please test it with language_to_use option also - looking fine
    WoW! Looks great!

    I'll plug in it, right now...

    Thanks!

    EDIT

    Ran it for an hour in French -- 2 hours in Spanish -- and, an hour in English, so far.

    Looks like you aced it!
    Last edited by VinDSL; May 19th, 2013 at 11:59 PM. Reason: Update
    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

  6. #946

    Cool Conkywx 0.9.2 Released - Now with Scrolling Weather ALerts


    Conkywx Conky Weather Program With Scrolling Weather Alerts - Conkywx 0.9.2 Released


    Many Improvements and changes ...



    Visit my blog for details http://foreverquest.blogspot.in/2013...t-program.html

    Cheers

  7. #947
    Join Date
    Jul 2012
    Beans
    24

    Re: HOWTO: VinDSL Conky Script

    Is there a way to turn off the '!' notification? I like the idea but don't personally need the alert notification. Sorry if it's obvious and I'm just blind.

  8. #948

    Cool Re: HOWTO: VinDSL Conky Script

    Quote Originally Posted by AK44 View Post
    Is there a way to turn off the '!' notification? I like the idea but don't personally need the alert notification. Sorry if it's obvious and I'm just blind.
    HI there AK44 [ I bet you were looking at AK47 as an alternative user name ha ha lol ]

    In your conkywx config file you have a variable template_cleanup - to this add '! :' make sure there is a space before and after the single quote characters. Follow the comments for this variable in the config file or the conkywx wiki.

    It will look something like so
    Code:
    template_cleanup=( 'NonFedAWOS SAFDARJUNG.*:Safdarjung MADIS' '! :' 'IDELHINE8:GK2' '.*Safdarjung:Saf. Airport' 'Waxing.*:Waxing' 'Waning.*:Waning'  )
    On another thought - at 47 C ambient temperature you realise you have sweat pores you never thought existed...

    cheers

  9. #949
    Join Date
    Jul 2012
    Beans
    24

    Re: HOWTO: VinDSL Conky Script

    Quote Originally Posted by paramvir View Post
    HI there AK44 [ I bet you were looking at AK47 as an alternative user name ha ha lol ]

    In your conkywx config file you have a variable template_cleanup - to this add '! :' make sure there is a space before and after the single quote characters. Follow the comments for this variable in the config file or the conkywx wiki.

    It will look something like so
    Code:
    template_cleanup=( 'NonFedAWOS SAFDARJUNG.*:Safdarjung MADIS' '! :' 'IDELHINE8:GK2' '.*Safdarjung:Saf. Airport' 'Waxing.*:Waxing' 'Waning.*:Waning'  )
    On another thought - at 47 C ambient temperature you realise you have sweat pores you never thought existed...

    cheers
    Actually AK are my initials and 44 is my favorite baseball players number (Hank Aaron). I do use AK47 for some things though Thanks for the help!

  10. #950

    Cool Re: HOWTO: VinDSL Conky Script

    Quote Originally Posted by AK44 View Post
    Actually AK are my initials and 44 is my favorite baseball players number (Hank Aaron). I do use AK47 for some things though Thanks for the help!
    Kewl AK44

    ok last update did not account for numbers after the exclamation - well we have 5 alerts for a place so
    Code:
    change '! :' to '![0-9]* :'
    That is - the square brackets have zero dash nine.

    cheers

Page 95 of 287 FirstFirst ... 45859394959697105145195 ... 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
  •