mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
A few minor changes made while updating documentation
Signed-off-by: Chris Cummer <chriscummer@me.com>
This commit is contained in:
parent
ac2817613b
commit
fa0d8761ae
6
Makefile
6
Makefile
@ -72,7 +72,7 @@ install:
|
|||||||
|
|
||||||
## lint: runs a number of code quality checks against the source code
|
## lint: runs a number of code quality checks against the source code
|
||||||
lint:
|
lint:
|
||||||
# https://github.com/kisielk/errcheck
|
@echo "\033[35mhttps://github.com/kisielk/errcheck\033[0m"
|
||||||
errcheck ./app
|
errcheck ./app
|
||||||
errcheck ./cfg
|
errcheck ./cfg
|
||||||
errcheck ./flags
|
errcheck ./flags
|
||||||
@ -84,7 +84,7 @@ lint:
|
|||||||
errcheck ./wtf
|
errcheck ./wtf
|
||||||
errcheck ./main.go
|
errcheck ./main.go
|
||||||
|
|
||||||
# https://golang.org/cmd/vet/
|
@echo "\033[35mhttps://golang.org/cmd/vet/k\033[0m"
|
||||||
go vet ./app
|
go vet ./app
|
||||||
go vet ./cfg
|
go vet ./cfg
|
||||||
go vet ./flags
|
go vet ./flags
|
||||||
@ -96,7 +96,7 @@ lint:
|
|||||||
go vet ./wtf
|
go vet ./wtf
|
||||||
go vet ./main.go
|
go vet ./main.go
|
||||||
|
|
||||||
# https://staticcheck.io/docs/
|
@echo "\033[35m# https://staticcheck.io/docs/k\033[0m"
|
||||||
staticcheck ./app
|
staticcheck ./app
|
||||||
staticcheck ./cfg
|
staticcheck ./cfg
|
||||||
staticcheck ./flags
|
staticcheck ./flags
|
||||||
|
@ -16,11 +16,11 @@ const (
|
|||||||
type Settings struct {
|
type Settings struct {
|
||||||
common *cfg.Common
|
common *cfg.Common
|
||||||
|
|
||||||
labelColor string
|
|
||||||
apiToken string `help:"Your Azure DevOps Access Token."`
|
apiToken string `help:"Your Azure DevOps Access Token."`
|
||||||
|
labelColor string
|
||||||
|
maxRows int
|
||||||
orgURL string `help:"Your Azure DevOps organization URL."`
|
orgURL string `help:"Your Azure DevOps organization URL."`
|
||||||
projectName string
|
projectName string
|
||||||
maxRows int
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewSettingsFromYAML creates and returns an instance of Settings with configuration options populated
|
// NewSettingsFromYAML creates and returns an instance of Settings with configuration options populated
|
||||||
@ -28,11 +28,11 @@ func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *co
|
|||||||
settings := Settings{
|
settings := Settings{
|
||||||
common: cfg.NewCommonSettingsFromModule(name, defaultTitle, defaultFocus, ymlConfig, globalConfig),
|
common: cfg.NewCommonSettingsFromModule(name, defaultTitle, defaultFocus, ymlConfig, globalConfig),
|
||||||
|
|
||||||
|
apiToken: ymlConfig.UString("apiToken", os.Getenv("WTF_AZURE_DEVOPS_API_TOKEN")),
|
||||||
labelColor: ymlConfig.UString("labelColor", "white"),
|
labelColor: ymlConfig.UString("labelColor", "white"),
|
||||||
apiToken: ymlConfig.UString("apiToken", os.Getenv("WTF_AZURE DEVOPS_API_TOKEN")),
|
maxRows: ymlConfig.UInt("maxRows", 3),
|
||||||
orgURL: ymlConfig.UString("orgURL", os.Getenv("WTF_AZURE_DEVOPS_ORG_URL")),
|
orgURL: ymlConfig.UString("orgURL", os.Getenv("WTF_AZURE_DEVOPS_ORG_URL")),
|
||||||
projectName: ymlConfig.UString("projectName", os.Getenv("WTF_AZURE_DEVOPS_PROJECT_NAME")),
|
projectName: ymlConfig.UString("projectName", os.Getenv("WTF_AZURE_DEVOPS_PROJECT_NAME")),
|
||||||
maxRows: ymlConfig.UInt("maxRows", 3),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return &settings
|
return &settings
|
||||||
|
@ -18,7 +18,7 @@ type Settings struct {
|
|||||||
func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *config.Config) *Settings {
|
func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *config.Config) *Settings {
|
||||||
settings := Settings{
|
settings := Settings{
|
||||||
common: cfg.NewCommonSettingsFromModule(name, defaultTitle, defaultFocusable, ymlConfig, globalConfig),
|
common: cfg.NewCommonSettingsFromModule(name, defaultTitle, defaultFocusable, ymlConfig, globalConfig),
|
||||||
cpuCombined: ymlConfig.UBool("cpuCombined"),
|
cpuCombined: ymlConfig.UBool("cpuCombined", false),
|
||||||
}
|
}
|
||||||
|
|
||||||
return &settings
|
return &settings
|
||||||
|
@ -5,17 +5,17 @@ import "github.com/gdamore/tcell"
|
|||||||
func (widget *Widget) initializeKeyboardControls() {
|
func (widget *Widget) initializeKeyboardControls() {
|
||||||
widget.InitializeCommonControls(widget.Refresh)
|
widget.InitializeCommonControls(widget.Refresh)
|
||||||
|
|
||||||
|
widget.SetKeyboardChar("c", widget.Close, "Close item")
|
||||||
widget.SetKeyboardChar("d", widget.Delete, "Delete item")
|
widget.SetKeyboardChar("d", widget.Delete, "Delete item")
|
||||||
|
widget.SetKeyboardChar("h", widget.PrevSource, "Select previous project")
|
||||||
widget.SetKeyboardChar("j", widget.Prev, "Select previous item")
|
widget.SetKeyboardChar("j", widget.Prev, "Select previous item")
|
||||||
widget.SetKeyboardChar("k", widget.Next, "Select next item")
|
widget.SetKeyboardChar("k", widget.Next, "Select next item")
|
||||||
widget.SetKeyboardChar("h", widget.PrevSource, "Select previous project")
|
|
||||||
widget.SetKeyboardChar("c", widget.Close, "Close item")
|
|
||||||
widget.SetKeyboardChar("l", widget.NextSource, "Select next project")
|
widget.SetKeyboardChar("l", widget.NextSource, "Select next project")
|
||||||
widget.SetKeyboardChar("u", widget.Unselect, "Clear selection")
|
widget.SetKeyboardChar("u", widget.Unselect, "Clear selection")
|
||||||
|
|
||||||
widget.SetKeyboardKey(tcell.KeyDown, widget.Next, "Select next item")
|
widget.SetKeyboardKey(tcell.KeyDown, widget.Next, "Select next item")
|
||||||
widget.SetKeyboardKey(tcell.KeyUp, widget.Prev, "Select previous item")
|
|
||||||
widget.SetKeyboardKey(tcell.KeyEsc, widget.Unselect, "Clear selection")
|
widget.SetKeyboardKey(tcell.KeyEsc, widget.Unselect, "Clear selection")
|
||||||
widget.SetKeyboardKey(tcell.KeyLeft, widget.PrevSource, "Select previous project")
|
widget.SetKeyboardKey(tcell.KeyLeft, widget.PrevSource, "Select previous project")
|
||||||
widget.SetKeyboardKey(tcell.KeyRight, widget.NextSource, "Select next project")
|
widget.SetKeyboardKey(tcell.KeyRight, widget.NextSource, "Select next project")
|
||||||
|
widget.SetKeyboardKey(tcell.KeyUp, widget.Prev, "Select previous item")
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *co
|
|||||||
common: cfg.NewCommonSettingsFromModule(name, defaultTitle, defaultFocusable, ymlConfig, globalConfig),
|
common: cfg.NewCommonSettingsFromModule(name, defaultTitle, defaultFocusable, ymlConfig, globalConfig),
|
||||||
|
|
||||||
accessToken: ymlConfig.UString("accessToken", ymlConfig.UString("apikey", os.Getenv("WTF_TRELLO_ACCESS_TOKEN"))),
|
accessToken: ymlConfig.UString("accessToken", ymlConfig.UString("apikey", os.Getenv("WTF_TRELLO_ACCESS_TOKEN"))),
|
||||||
apiKey: ymlConfig.UString("apiKey", os.Getenv("WTF_TRELLO_APP_KEY")),
|
apiKey: ymlConfig.UString("apiKey", os.Getenv("WTF_TRELLO_API_KEY")),
|
||||||
board: ymlConfig.UString("board"),
|
board: ymlConfig.UString("board"),
|
||||||
username: ymlConfig.UString("username"),
|
username: ymlConfig.UString("username"),
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user