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

Additional data into documentation

This commit is contained in:
Chris Cummer
2018-05-09 17:06:19 -07:00
parent 25430c228d
commit a757a01963
33 changed files with 465 additions and 47 deletions

View File

@@ -11,6 +11,17 @@ import (
// Config is a pointer to the global config object
var Config *config.Config
const helpText = `
Keyboard commands for Git:
/: Show/hide this help window
h: Previous weather location
l: Next weather location
arrow left: Previous weather location
arrow right: Next weather location
`
type Widget struct {
wtf.TextWidget
@@ -87,6 +98,15 @@ func (widget *Widget) gitRepos(repoPaths []string) []*GitRepo {
}
func (widget *Widget) keyboardIntercept(event *tcell.EventKey) *tcell.EventKey {
switch string(event.Rune()) {
case "h":
widget.Prev()
return nil
case "l":
widget.Next()
return nil
}
switch event.Key() {
case tcell.KeyLeft:
widget.Prev()