SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#51 2012-11-04 19:15:24

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Ban Conky

pvsage wrote:
Sector11 wrote:

And weather HA!  I have it in my terminal:
04 Nov 12 | 10:13:49 ~

         $ now
Partly Sunny: 22C
 04 Nov 12 | 10:13:53 ~
         $ 

OT:  What script are you calling with `now`?

alias now='accuweather.sh "SAM|AR|AR007|BUENOSAIRES"'

 04 Nov 12 | 16:07:02 ~
         $ now
Sunny: 23C
 04 Nov 12 | 16:07:05 ~
         $ 

accuweather.sh

#!/bin/sh
#(c) Michael Seiler 2007
# locationcode is zip code in usa
# in conky:
# ${exec $HOME/bin/accuweather.sh 97206}
# ${execi 3600 $HOME/bin/accuweather.sh 97206}
# ${execpi 3600 $HOME/bin/accuweather.sh 97206}
# ${execi 3600 $HOME/bin/accuweather.sh SAM|AR|AR007|BUENOSAIRES} -->> DOES NOT WORK
# alias now3='accuweather.sh "SAM|AR|AR007|BUENOSAIRES"' -->> DOES NOT WORK


METRIC=1 #Should be 0 or 1; 0 for F, 1 for C

if [ -z $1 ]; then
    echo
    echo "USAGE: accuweather.sh <locationcode>"
    echo
    exit 0;
fi

curl -s http://rss.accuweather.com/rss/liveweather_rss.asp\?metric\=${METRIC}\&locCode\=$1 | perl -ne 'if (/Currently/) {chomp;/\<title\>Currently: (.*)?\<\/title\>/; print "$1"; }'

alias now2='acc_w_2.sh "SAM|AR|AR007|BUENOSAIRES"'

 04 Nov 12 | 16:09:44 ~
         $ now2
WEATHER:
     Now: Sunny, 23C
   Today: 0-0 C                
Tomorrow: 0-0 C                
 04 Nov 12 | 16:09:51 ~
         $ 

acc_w_2.sh - if anyone can get the rest working I'd be grateful.

# !/usr/bin/bash
METRIC=1 #Should be 0 or 1; 0 for F, 1 for C
if [ -z $1 ]; then
    echo "USAGE: weather.sh <locationcode>"
    exit 0;
fi

#    printf("WEATHER:\nNow: %s\nToday: %s\nTomorrow: %s",CurWeather,forecast[1],forecast[2])
#    printf("WEATHER: %s\n%s\n%s",CurWeather,forecast[1],forecast[2])

wget -q http://rss.accuweather.com/rss/liveweather_rss.asp\?metric\=${METRIC}\&locCode\=$1 -O - | awk \
'/Currently:/ {CurWeather=$0}
/[0-9] Forecast<\/title>/ {nr=NR+5}
NR==nr    {postIndx[++x]=$0}
# x>2    {exit}
END{
    split(CurWeather,tmp,"Currently: ")
    split(tmp[2],tmp1,"<")
    CurWeather=sprintf("%s",tmp1[1])
    sub(":",",",CurWeather)
    for(x in postIndx){
    split(postIndx[x],tmp,";|&")
    split(tmp[1],tmp,">")
    split(tmp[2],statement," C ") # substitute C for F if metric differs
    split(tmp[2],temp)
    forecast[++y]=sprintf("%d-%d C %-15s",temp[5],temp[2],statement[3])
    }
    printf("WEATHER:\n     Now: %s\n   Today: %s\nTomorrow: %s",CurWeather,forecast[1],forecast[2])
}'

·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

Help fund CrunchBang, donate to the project!

#52 2012-11-04 19:53:55

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Ban Conky

dura wrote:

There is a fine line between obsession and genius Sector11!  big_smile Your work is inspiring, as well as dangerously alluring to naive amateur modders such as myself...

I'm glad you think so.  I'm just a layout guy.  There are a lot more out there that create conkys I can not begin to touch, or even come close to  because of LUA, python, and all the support commands, etc.  I consider them the conky geniuses and only borrow from them what I can.  As I have always said, if I can do it "anyone can".

CBizgreat! wrote:

Lmao Sector. big_smile

Yeah ... I'm not a nix-addict (shakez n twitches) ... errrr, I can quit, whenever I want ( more twitchin) ...  tongue

Yea right! Look at the mess you're in just 'talking about' quitting!  lol

CBizgreat! wrote:

+1 Dura ... the first part ...

There is a fine line between obsession and genius Sector11! big_smile Your work is inspiring,

-1 for the ending.

as well as dangerously alluring to naive amateur modders such as myself...

NOOOOO ... I stay away from conky ... Had a brief, tho intense fling w it ... Looked up and 3dys had passed ! Where did it go !??!?! Conky friggin ate it I tell you ! . tongue Sucker really can be addictive. Ooooo if I just put this status bar over here ... nnnnn nah, try a diff font ?<Add endless stuff here?> Totally happy leaving it to the conky pros ... like Sir Sector.

Vll folks ... wink

Will you walk into my parlour?" said Sector11 to CBizgreat!,
'Tis the prettiest little parlour that ever you did spy;
The way into my parlour is up a winding stair,
And I've a many curious conkys to shew when you are there."
Oh no, no," said CBizgreat!, "to ask me is in vain,
For who goes up your winding stair can ne'er come down again."

"I'm sure you must be weary, friend, with soaring up so high;
Will you rest upon this little conky?" said Sector11 to CBizgreat!.
"There are pretty commands drawn around; the sed's are fine and thin,
And if you like to rest awhile, I'll snugly code you in!"
Oh no, no," said CBizgreat!, "for I've often heard it said,
They never, never wake again, who sleep upon that conky!"

Said the cunning Sector11 to CBizgreat!, " Dear friend what can I do,
To prove the warm friendship I've always felt for you?
I have within my conkys, good code of all that's nice;
I'm sure you're very welcome -- will you please to take a peek?"
"Oh no, no," said CBizgreat!, "kind Sir, that cannot be,
I've heard what's in your conkys, and I do not wish to see!"

"Sweet creature!" said Sector11, "you're witty and you're wise,
How handsome are your gauzy wings, how brilliant are your eyes!
I've a little looking-glass upon my parlour shelf,
If you'll step in one moment, you shall behold yourself."
"I thank you, gentle sir," he said, "for what you're pleased to say,
And bidding you good morning now, I'll call another day."

Sector11 turned him round about, and went into his den,
For well he knew the silly CBizgreat! would soon come back again:
So he wove a subtle conky, in a little corner sly,
And set his table ready, to dine upon CBizgreat!.
Then he came out to his door again, and merrily did sing,
"Come hither, hither, pretty CBizgreat!, with the pearl and silver wing;
Your robes are green and purple -- there's a crest upon your head;
Your eyes are like the diamond bright, but mine are dull as lead!"

Alas, alas! how very soon this silly little CBizgreat!,
Hearing his wily, flattering words, came slowly flitting by;
With buzzing wings he hung aloft, then near and nearer drew,
Thinking only of his brilliant eyes, and green and purple hue --
Thinking only of his crested head -- poor foolish thing! At last,
Up jumped the cunning Sector11, and fiercely held him fast.
He dragged him up his winding stair, into his dismal den,
Within his little parlour -- but he ne'er came out again!

And now dear little CrunchBangers, who may this story read,
To idle, silly flattering words, I pray you ne'er give heed:
Unto an evil counsellor, close heart and ear and eye,
And take a lesson from this tale, of Sector11 and CBizgreat!.  ]:D

Graciously borrowed from: Mary Howitt
The Spider and the Fly!


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#53 2012-12-02 07:04:59

antiv0rtex
#! Die Hard
From: Earth
Registered: 2012-10-05
Posts: 574

Re: Ban Conky

I have been a real, legitimate #! user for exactly one day, and already I have caught the custom-config fever which seems to spread via these forums. Arrgh! wink

Offline

#54 2012-12-02 10:49:13

fatmac
#! Die Hard
Registered: 2012-11-14
Posts: 1,948

Re: Ban Conky

.......& I just thought it was desktop decoration..........


Linux since 1999
Currently:  AntiX, & Crunchbang.
A good general beginners book for Linux :- http://rute.2038bug.com/index.html.gz
A good Debian read :- http://debian-handbook.info/get/now/

Offline

#55 2012-12-02 11:02:16

brontosaurusrex
#! Red Menace
Registered: 2012-06-15
Posts: 1,643

Re: Ban Conky

fatmac; it does look innocent at first.

Offline

#56 2012-12-02 14:57:25

CBizgreat!
#! Die Hard
Registered: 2011-07-27
Posts: 1,865

Re: Ban Conky

lol  lol  lollol  lol  lol  +1's him.


Some common cbiz abbreviations. This will save me time and yet @ same time tell folks what the babble is supposed to mean.

Vll ! = ( Viva la gnu/Linux !)    Vl#!! = ( Viva la #! !)    Last but not least, UD ... OD ! = ( Use Debian ... or die !) tongue

Offline

#57 2012-12-02 19:06:13

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Ban Conky

CBizgreat! wrote:

lol  lol  lollol  lol  lol  +1's him.

Yea, you know your hooked when you fill every desktop with different conkys and some of them are just mods of the one beside them.

Of course I'm not saying I do that ... but I'm not saying I don't either.  roll

Question...

If I make a conky with three sections, each section is a slight mod of the section above it is it three conkys or still one?  ]:D

Last edited by Sector11 (2012-12-02 19:06:51)


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat

Debian Logo