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:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user