Re: [orca-list] GNOME Weather applet?



Hi Mario:

I don't see a way to modify the GNOME Weather applet.  :-(  I needed a
short break from stuff that was spinning my head around, though, so I
took a look at a way for you to add your own keyboard command to speak
the result of calling a command line application.  In this case, I used
'weather', which I grabbed via "sudo apt-get install weather-util" on
Ubuntu.

Here's what I put in my ~/.orca/orca-customizations.py file.  It binds
Insert+w to the weather as output by the weather application.  I see
that Concord NH has 16MPH winds with gusts up to 24MPH.  That's going to
make the bike races a challenge tonight.

import commands
import orca.input_event
import orca.keybindings
import orca.orca
import orca.speech
from orca.orca_i18n import _

def sayWeather(script, inputEvent=None):
    message = commands.getoutput("weather con | tail -4")
    orca.speech.speak(message)
    return True

sayWeatherHandler = orca.input_event.InputEventHandler(
    sayWeather,
    _("Prints weather information."))

myKeyBindings = orca.keybindings.KeyBindings()

myKeyBindings.add(orca.keybindings.KeyBinding(
    "w",
    1 << orca.settings.MODIFIER_ORCA,
    1 << orca.settings.MODIFIER_ORCA,
    sayWeatherHandler))

orca.settings.keyBindingsMap["default"] = myKeyBindings

Will

On Thu, 2007-05-03 at 13:16 +0200, Mario Lang wrote:
Hi.

When I use the GNOME Weather applet with Orca, I have to invoke
Ctrl+d (Details) on the panel icon to actually be able
to read the weather report.

Is it possible to enhance the GNOME Weather applet such that
it directly displays the temperature, just like the Clock
applet directly displays the time?





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]