Author Topic: [SOLVED][OpenBox] Pipe Menu for Weather  (Read 803 times)

Offline DennisD

  • Newbie
  • *
  • Posts: 14
[SOLVED][OpenBox] Pipe Menu for Weather
« on: February 12, 2016, 06:29:08 pm »
I had an issue with the openbox menu when I installed the OB version. (Basically it would not generate) So I scrapped the menu and created a new one, no problem. However, I am not super skilled at pipe menus. Is there somewhere where I can pulled the menu code (maybe a git repo or something) to get the code for the weather pipe menu.

I like having the weather easily accessible, but I do not need it on the conky. The pipe menu is great for me.

Thanks!
« Last Edit: February 14, 2016, 12:09:03 am by DennisD »

Offline paxmark1

  • Full Member
  • ***
  • Posts: 209
Re: [OpenBox] Pipe Menu for Weather
« Reply #1 on: February 13, 2016, 12:11:28 am »
What comes to mind to me when I hear openbox, pipe menu and / or conky is #!.  Tonnes of posts, some quite good at the archived Crunchbang linux forums and at https://www.bunsenlabs.org/  (but they seem to be down).  Also  a dedicated section to conky at vsido.

Are you using the portion of suckless-tools called dmenu for your pipe menu? 

Not a pipe menu but for moi, via  .conkyrc
Code: [Select]
Winnipeg ${execi 300 ~/bin/weather.sh "NAM|CA|MB|WINNIPEG"}and in ~/bin

Code: [Select]
#!/bin/sh
#AccuWeather (r) RSS weather tool for conky
#
#USAGE: weather.sh <locationcode>
#
#(c) Michael Seiler 2007

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

if [ -z $1 ]; then
    echo
    echo "USAGE: weather.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"; }'

old as dirt and I did not write it. 

edited later  I see the post below.  In case others are searching here - it is o.k. to post the source you used from the the Arch forum. 
« Last Edit: February 14, 2016, 01:00:49 am by paxmark1 »
Don't make a FrankenDebian

Offline DennisD

  • Newbie
  • *
  • Posts: 14
Re: [OpenBox] Pipe Menu for Weather
« Reply #2 on: February 14, 2016, 12:08:33 am »
Found my answer on the ARCH forum. Thanks anyway!!

http://imgur.com/ZFtKBjB.png

Offline pavroo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1465
    • SparkyLinux
Re: [SOLVED][OpenBox] Pipe Menu for Weather
« Reply #3 on: February 14, 2016, 01:25:58 pm »
We have Wiki pages with some answers too:
http://sparkylinux.org/wiki/doku.php/weather_location
Nothing is easy as it looks.

Offline DennisD

  • Newbie
  • *
  • Posts: 14
Re: [SOLVED][OpenBox] Pipe Menu for Weather
« Reply #4 on: February 14, 2016, 04:38:57 pm »
Thanks for the reply. I did see that, but it was not just the location. I wound up having an issue with the entire menu and I needed the code for the pipe-menu and the weather script.  It is those I found on the ARCH forum.

But thanks again for the response/