mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-04-19 12:12:42 +02:00
bump dependencies
This commit is contained in:
parent
284c534251
commit
6b150a4be0
18
Gopkg.lock
generated
18
Gopkg.lock
generated
@ -155,6 +155,14 @@
|
|||||||
pruneopts = "NUT"
|
pruneopts = "NUT"
|
||||||
revision = "58046073cbffe2f25d425fe1331102f55cf719de"
|
revision = "58046073cbffe2f25d425fe1331102f55cf719de"
|
||||||
|
|
||||||
|
[[projects]]
|
||||||
|
branch = "master"
|
||||||
|
digest = "1:5fe20cfe4ef484c237cec9f947b2a6fa90bad4b8610fd014f0e4211e13d82d5d"
|
||||||
|
name = "github.com/mitchellh/mapstructure"
|
||||||
|
packages = ["."]
|
||||||
|
pruneopts = "NUT"
|
||||||
|
revision = "f15292f7a699fcc1a38a80977f80a046874ba8ac"
|
||||||
|
|
||||||
[[projects]]
|
[[projects]]
|
||||||
digest = "1:2c34c77bf3ec848da26e48af58fc511ed52750961fa848399d122882b8890928"
|
digest = "1:2c34c77bf3ec848da26e48af58fc511ed52750961fa848399d122882b8890928"
|
||||||
name = "github.com/nicksnyder/go-i18n"
|
name = "github.com/nicksnyder/go-i18n"
|
||||||
@ -167,14 +175,6 @@
|
|||||||
revision = "a16b91a3ba80db3a2301c70d1d302d42251c9079"
|
revision = "a16b91a3ba80db3a2301c70d1d302d42251c9079"
|
||||||
version = "v2.0.0-beta.5"
|
version = "v2.0.0-beta.5"
|
||||||
|
|
||||||
[[projects]]
|
|
||||||
branch = "master"
|
|
||||||
digest = "1:5fe20cfe4ef484c237cec9f947b2a6fa90bad4b8610fd014f0e4211e13d82d5d"
|
|
||||||
name = "github.com/mitchellh/mapstructure"
|
|
||||||
packages = ["."]
|
|
||||||
pruneopts = "NUT"
|
|
||||||
revision = "f15292f7a699fcc1a38a80977f80a046874ba8ac"
|
|
||||||
|
|
||||||
[[projects]]
|
[[projects]]
|
||||||
branch = "master"
|
branch = "master"
|
||||||
digest = "1:34d9354c2c5d916c05864327553047df59fc10e86ff1f408e4136eba0a25a5ec"
|
digest = "1:34d9354c2c5d916c05864327553047df59fc10e86ff1f408e4136eba0a25a5ec"
|
||||||
@ -438,9 +438,9 @@
|
|||||||
"github.com/golang-collections/collections/stack",
|
"github.com/golang-collections/collections/stack",
|
||||||
"github.com/jesseduffield/gocui",
|
"github.com/jesseduffield/gocui",
|
||||||
"github.com/mgutz/str",
|
"github.com/mgutz/str",
|
||||||
|
"github.com/nicksnyder/go-i18n/v2/i18n",
|
||||||
"github.com/shibukawa/configdir",
|
"github.com/shibukawa/configdir",
|
||||||
"github.com/spf13/viper",
|
"github.com/spf13/viper",
|
||||||
"github.com/nicksnyder/go-i18n/v2/i18n",
|
|
||||||
"github.com/tcnksm/go-gitconfig",
|
"github.com/tcnksm/go-gitconfig",
|
||||||
"golang.org/x/text/language",
|
"golang.org/x/text/language",
|
||||||
"gopkg.in/src-d/go-git.v4",
|
"gopkg.in/src-d/go-git.v4",
|
||||||
|
39
docs/Config.md
Normal file
39
docs/Config.md
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
# User Config:
|
||||||
|
|
||||||
|
## Default:
|
||||||
|
|
||||||
|
```
|
||||||
|
gui:
|
||||||
|
# stuff relating to the UI
|
||||||
|
scrollHeight: 2 # how many lines you scroll by
|
||||||
|
theme:
|
||||||
|
activeBorderColor:
|
||||||
|
- white
|
||||||
|
- bold
|
||||||
|
inactiveBorderColor:
|
||||||
|
- white
|
||||||
|
optionsTextColor:
|
||||||
|
- blue
|
||||||
|
git:
|
||||||
|
# stuff relating to git
|
||||||
|
os:
|
||||||
|
# stuff relating to the OS
|
||||||
|
```
|
||||||
|
|
||||||
|
## Color Attributes:
|
||||||
|
|
||||||
|
For color attributes you can choose an array of attributes (with max one color attribute)
|
||||||
|
The available attributes are:
|
||||||
|
|
||||||
|
- default
|
||||||
|
- black
|
||||||
|
- red
|
||||||
|
- green
|
||||||
|
- yellow
|
||||||
|
- blue
|
||||||
|
- magenta
|
||||||
|
- cyan
|
||||||
|
- white
|
||||||
|
- bold
|
||||||
|
- reverse # useful for high-contrast
|
||||||
|
- underline
|
@ -2,8 +2,6 @@ package config
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"log"
|
|
||||||
"os/user"
|
|
||||||
|
|
||||||
"github.com/shibukawa/configdir"
|
"github.com/shibukawa/configdir"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
@ -117,7 +115,9 @@ func LoadUserConfigFromFile(v *viper.Viper) error {
|
|||||||
if folder == nil {
|
if folder == nil {
|
||||||
// create the file as an empty config and load it
|
// create the file as an empty config and load it
|
||||||
folders := configDirs.QueryFolders(configdir.Global)
|
folders := configDirs.QueryFolders(configdir.Global)
|
||||||
folders[0].WriteFile("config.yml", []byte{})
|
if err := folders[0].WriteFile("config.yml", []byte{}); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
folder = configDirs.QueryFolderContainsFile("config.yml")
|
folder = configDirs.QueryFolderContainsFile("config.yml")
|
||||||
}
|
}
|
||||||
v.AddConfigPath(folder.Path)
|
v.AddConfigPath(folder.Path)
|
||||||
@ -150,11 +150,14 @@ func getDefaultConfig() []byte {
|
|||||||
gui:
|
gui:
|
||||||
## stuff relating to the UI
|
## stuff relating to the UI
|
||||||
scrollHeight: 2
|
scrollHeight: 2
|
||||||
|
theme:
|
||||||
activeBorderColor:
|
activeBorderColor:
|
||||||
- white
|
- white
|
||||||
- bold
|
- bold
|
||||||
inactiveBorderColor:
|
inactiveBorderColor:
|
||||||
- white
|
- white
|
||||||
|
optionsTextColor:
|
||||||
|
- blue
|
||||||
git:
|
git:
|
||||||
# stuff relating to git
|
# stuff relating to git
|
||||||
os:
|
os:
|
||||||
@ -163,10 +166,11 @@ func getDefaultConfig() []byte {
|
|||||||
`)
|
`)
|
||||||
}
|
}
|
||||||
|
|
||||||
func homeDirectory() string {
|
// // commenting this out until we use it again
|
||||||
usr, err := user.Current()
|
// func homeDirectory() string {
|
||||||
if err != nil {
|
// usr, err := user.Current()
|
||||||
log.Fatal(err)
|
// if err != nil {
|
||||||
}
|
// log.Fatal(err)
|
||||||
return usr.HomeDir
|
// }
|
||||||
}
|
// return usr.HomeDir
|
||||||
|
// }
|
||||||
|
@ -231,8 +231,10 @@ func (gui *Gui) layout(g *gocui.Gui) error {
|
|||||||
if err != gocui.ErrUnknownView {
|
if err != gocui.ErrUnknownView {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
v.FgColor = gocui.ColorBlue
|
|
||||||
v.Frame = false
|
v.Frame = false
|
||||||
|
if v.FgColor, err = gui.GetOptionsPanelTextColor(); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if gui.getCommitMessageView(g) == nil {
|
if gui.getCommitMessageView(g) == nil {
|
||||||
|
@ -36,10 +36,18 @@ func (gui *Gui) GetColor(keys []string) gocui.Attribute {
|
|||||||
return attribute
|
return attribute
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetOptionsPanelTextColor gets the color of the options panel text
|
||||||
|
func (gui *Gui) GetOptionsPanelTextColor() (gocui.Attribute, error) {
|
||||||
|
userConfig := gui.Config.GetUserConfig()
|
||||||
|
optionsColor := userConfig.GetStringSlice("gui.theme.optionsTextColor")
|
||||||
|
return gui.GetColor(optionsColor), nil
|
||||||
|
}
|
||||||
|
|
||||||
// SetColorScheme sets the color scheme for the app based on the user config
|
// SetColorScheme sets the color scheme for the app based on the user config
|
||||||
func (gui *Gui) SetColorScheme() error {
|
func (gui *Gui) SetColorScheme() error {
|
||||||
activeBorderColor := gui.Config.GetUserConfig().GetStringSlice("gui.activeBorderColor")
|
userConfig := gui.Config.GetUserConfig()
|
||||||
inactiveBorderColor := gui.Config.GetUserConfig().GetStringSlice("gui.inactiveBorderColor")
|
activeBorderColor := userConfig.GetStringSlice("gui.theme.activeBorderColor")
|
||||||
|
inactiveBorderColor := userConfig.GetStringSlice("gui.theme.inactiveBorderColor")
|
||||||
gui.g.FgColor = gui.GetColor(inactiveBorderColor)
|
gui.g.FgColor = gui.GetColor(inactiveBorderColor)
|
||||||
gui.g.SelFgColor = gui.GetColor(activeBorderColor)
|
gui.g.SelFgColor = gui.GetColor(activeBorderColor)
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
x
Reference in New Issue
Block a user