Skip to content

Commit

Permalink
ShowTotal flag
Browse files Browse the repository at this point in the history
  • Loading branch information
waffleboot committed Jun 10, 2021
1 parent 9fdf92b commit 7588d52
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/Config.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ gui:
skipUnstageLineWarning: false
skipStashWarning: true
showFileTree: false # for rendering changes files in a tree format
showTotal: true
showRandomTip: true
showCommandLog: true
commandLogSize: 8
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ require (
github.com/imdario/mergo v0.3.11
github.com/integrii/flaggy v1.4.0
github.com/jesseduffield/go-git/v5 v5.1.2-0.20201006095850-341962be15a4
github.com/jesseduffield/gocui v0.3.1-0.20210417110745-37f79434200d
github.com/jesseduffield/gocui v0.3.2
github.com/jesseduffield/termbox-go v0.0.0-20200823212418-a2289ed6aafe // indirect
github.com/jesseduffield/yaml v2.1.0+incompatible
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0
Expand Down
2 changes: 2 additions & 0 deletions pkg/config/user_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ type GuiConfig struct {
Theme ThemeConfig `yaml:"theme"`
CommitLength CommitLengthConfig `yaml:"commitLength"`
SkipNoStagedFilesWarning bool `yaml:"skipNoStagedFilesWarning"`
ShowTotal bool `yaml:"showTotal"`
ShowFileTree bool `yaml:"showFileTree"`
ShowRandomTip bool `yaml:"showRandomTip"`
ShowCommandLog bool `yaml:"showCommandLog"`
Expand Down Expand Up @@ -306,6 +307,7 @@ func GetDefaultConfig() *UserConfig {
},
CommitLength: CommitLengthConfig{Show: true},
SkipNoStagedFilesWarning: false,
ShowTotal: true,
ShowCommandLog: true,
ShowFileTree: false,
ShowRandomTip: true,
Expand Down
2 changes: 2 additions & 0 deletions pkg/gui/gui.go
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,8 @@ func (gui *Gui) Run() error {

g.ASCII = runtime.GOOS == "windows" && runewidth.IsEastAsian()

g.ShowTotal = userConfig.Gui.ShowTotal

if userConfig.Gui.MouseEvents {
g.Mouse = true
}
Expand Down

0 comments on commit 7588d52

Please sign in to comment.