1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-09-16 09:16:26 +02:00

allow hiding bottom line

This commit is contained in:
Jesse Duffield
2022-04-18 09:41:40 +10:00
parent 3477cbc81f
commit 9b947b74a2
4 changed files with 16 additions and 1 deletions

View File

@@ -50,6 +50,7 @@ gui:
showFileTree: true # for rendering changes files in a tree format
showListFooter: true # for seeing the '5 of 20' message in list panels
showRandomTip: true
showBottomLine: true # for hiding the bottom information line (unless it has important information to tell you)
showCommandLog: true
commandLogSize: 8
git:

View File

@@ -43,6 +43,7 @@ type GuiConfig struct {
ShowFileTree bool `yaml:"showFileTree"`
ShowRandomTip bool `yaml:"showRandomTip"`
ShowCommandLog bool `yaml:"showCommandLog"`
ShowBottomLine bool `yaml:"showBottomLine"`
CommandLogSize int `yaml:"commandLogSize"`
}
@@ -351,6 +352,7 @@ func GetDefaultConfig() *UserConfig {
SkipNoStagedFilesWarning: false,
ShowListFooter: true,
ShowCommandLog: true,
ShowBottomLine: true,
ShowFileTree: true,
ShowRandomTip: true,
CommandLogSize: 8,

View File

@@ -170,6 +170,12 @@ func (gui *Gui) getWindowDimensions(informationStr string, appStatus string) map
extrasWindowSize := gui.getExtrasWindowSize(height)
showInfoSection := gui.c.UserConfig.Gui.ShowBottomLine || (gui.State.Searching.isSearching || gui.isAnyModeActive())
infoSectionSize := 0
if showInfoSection {
infoSectionSize = 1
}
root := &boxlayout.Box{
Direction: boxlayout.ROW,
Children: []*boxlayout.Box{
@@ -201,7 +207,7 @@ func (gui *Gui) getWindowDimensions(informationStr string, appStatus string) map
},
{
Direction: boxlayout.COLUMN,
Size: 1,
Size: infoSectionSize,
Children: gui.infoSectionChildren(informationStr, appStatus),
},
},

View File

@@ -28,6 +28,12 @@ func (gui *Gui) getActiveMode() (modeStatus, bool) {
})
}
func (gui *Gui) isAnyModeActive() bool {
return slices.Some(gui.modeStatuses(), func(mode modeStatus) bool {
return mode.isActive()
})
}
func (gui *Gui) handleInfoClick() error {
if !gui.g.Mouse {
return nil