aboutsummaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-05-21 16:31:04 -0400
committerDrew DeVault <sir@cmpwn.com>2019-05-21 16:53:50 -0400
commit6811143925384ba1cfda8b3e1b338b0cfb9ac6e3 (patch)
tree584ce88b40ab87828d6adbfdb6bef7a5d3046600 /config
parent176245208d40a9ca2ec324be7863a22819de29bc (diff)
New account wizard, part one
Diffstat (limited to 'config')
-rw-r--r--config/config.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/config/config.go b/config/config.go
index d885402..c6136cf 100644
--- a/config/config.go
+++ b/config/config.go
@@ -11,6 +11,7 @@ import (
"strings"
"unicode"
+ "github.com/gdamore/tcell"
"github.com/go-ini/ini"
"github.com/kyoh86/xdg"
)
@@ -45,6 +46,7 @@ type AccountConfig struct {
type BindingConfig struct {
Global *KeyBindings
+ AccountWizard *KeyBindings
Compose *KeyBindings
ComposeEditor *KeyBindings
ComposeReview *KeyBindings
@@ -208,6 +210,7 @@ func LoadConfig(root *string) (*AercConfig, error) {
config := &AercConfig{
Bindings: BindingConfig{
Global: NewKeyBindings(),
+ AccountWizard: NewKeyBindings(),
Compose: NewKeyBindings(),
ComposeEditor: NewKeyBindings(),
ComposeReview: NewKeyBindings(),
@@ -229,6 +232,12 @@ func LoadConfig(root *string) (*AercConfig, error) {
EmptyMessage: "(no messages)",
},
}
+ // These bindings are not configurable
+ config.Bindings.AccountWizard.ExKey = KeyStroke{
+ Key: tcell.KeyCtrlE,
+ }
+ quit, _ := ParseBinding("<C-q>", ":quit<Enter>")
+ config.Bindings.AccountWizard.Add(quit)
if filters, err := file.GetSection("filters"); err == nil {
// TODO: Parse the filter more finely, e.g. parse the regex
for _, match := range filters.KeyStrings() {