1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

Adds the Weather module to the documentation

This commit is contained in:
Chris Cummer
2018-05-09 11:56:27 -07:00
parent decc8cd5e5
commit 25430c228d
28 changed files with 314 additions and 39 deletions

View File

@@ -17,10 +17,12 @@ var Config *config.Config
const helpText = `
Keyboard commands for Weather:
h: Show/hide this help window
/: Show/hide this help window
h: Previous weather location
l: Next weather location
arrow right: Next weather location
arrow left: Previous weather location
arrow right: Next weather location
`
// Widget is the container for weather data.
@@ -214,9 +216,15 @@ func (widget *Widget) icon(data *owm.CurrentWeatherData) string {
func (widget *Widget) keyboardIntercept(event *tcell.EventKey) *tcell.EventKey {
switch string(event.Rune()) {
case "h":
case "/":
widget.showHelp()
return nil
case "h":
widget.Prev()
return nil
case "l":
widget.Next()
return nil
}
switch event.Key() {