mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-11-23 22:24:51 +02:00
allow hiding bottom line
This commit is contained in:
@@ -50,6 +50,7 @@ gui:
|
|||||||
showFileTree: true # for rendering changes files in a tree format
|
showFileTree: true # for rendering changes files in a tree format
|
||||||
showListFooter: true # for seeing the '5 of 20' message in list panels
|
showListFooter: true # for seeing the '5 of 20' message in list panels
|
||||||
showRandomTip: true
|
showRandomTip: true
|
||||||
|
showBottomLine: true # for hiding the bottom information line (unless it has important information to tell you)
|
||||||
showCommandLog: true
|
showCommandLog: true
|
||||||
commandLogSize: 8
|
commandLogSize: 8
|
||||||
git:
|
git:
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ type GuiConfig struct {
|
|||||||
ShowFileTree bool `yaml:"showFileTree"`
|
ShowFileTree bool `yaml:"showFileTree"`
|
||||||
ShowRandomTip bool `yaml:"showRandomTip"`
|
ShowRandomTip bool `yaml:"showRandomTip"`
|
||||||
ShowCommandLog bool `yaml:"showCommandLog"`
|
ShowCommandLog bool `yaml:"showCommandLog"`
|
||||||
|
ShowBottomLine bool `yaml:"showBottomLine"`
|
||||||
CommandLogSize int `yaml:"commandLogSize"`
|
CommandLogSize int `yaml:"commandLogSize"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -351,6 +352,7 @@ func GetDefaultConfig() *UserConfig {
|
|||||||
SkipNoStagedFilesWarning: false,
|
SkipNoStagedFilesWarning: false,
|
||||||
ShowListFooter: true,
|
ShowListFooter: true,
|
||||||
ShowCommandLog: true,
|
ShowCommandLog: true,
|
||||||
|
ShowBottomLine: true,
|
||||||
ShowFileTree: true,
|
ShowFileTree: true,
|
||||||
ShowRandomTip: true,
|
ShowRandomTip: true,
|
||||||
CommandLogSize: 8,
|
CommandLogSize: 8,
|
||||||
|
|||||||
@@ -170,6 +170,12 @@ func (gui *Gui) getWindowDimensions(informationStr string, appStatus string) map
|
|||||||
|
|
||||||
extrasWindowSize := gui.getExtrasWindowSize(height)
|
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{
|
root := &boxlayout.Box{
|
||||||
Direction: boxlayout.ROW,
|
Direction: boxlayout.ROW,
|
||||||
Children: []*boxlayout.Box{
|
Children: []*boxlayout.Box{
|
||||||
@@ -201,7 +207,7 @@ func (gui *Gui) getWindowDimensions(informationStr string, appStatus string) map
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
Direction: boxlayout.COLUMN,
|
Direction: boxlayout.COLUMN,
|
||||||
Size: 1,
|
Size: infoSectionSize,
|
||||||
Children: gui.infoSectionChildren(informationStr, appStatus),
|
Children: gui.infoSectionChildren(informationStr, appStatus),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -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 {
|
func (gui *Gui) handleInfoClick() error {
|
||||||
if !gui.g.Mouse {
|
if !gui.g.Mouse {
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
Reference in New Issue
Block a user