mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-01-04 03:48:07 +02:00
allow configurable main panel split
This commit is contained in:
parent
35b72420ad
commit
8430b04492
@ -15,6 +15,7 @@ Default path for the config file:
|
||||
scrollPastBottom: true # enable scrolling past the bottom
|
||||
sidePanelWidth: 0.3333 # number from 0 to 1
|
||||
expandFocusedSidePanel: false
|
||||
mainPanelSplitMode: 'flexible' # one of 'horizontal' | 'flexible' | 'vertical'
|
||||
theme:
|
||||
lightTheme: false # For terminals with a light background
|
||||
activeBorderColor:
|
||||
|
@ -247,6 +247,7 @@ func GetDefaultConfig() []byte {
|
||||
skipStashWarning: true
|
||||
sidePanelWidth: 0.3333
|
||||
expandFocusedSidePanel: false
|
||||
mainPanelSplitMode: 'flexible' # one of 'horizontal' | 'flexible' | 'vertical'
|
||||
theme:
|
||||
lightTheme: false
|
||||
activeBorderColor:
|
||||
|
@ -132,10 +132,19 @@ func (gui *Gui) getViewDimensions(informationStr string, appStatus string) map[s
|
||||
},
|
||||
{
|
||||
conditionalDirection: func(width int, height int) int {
|
||||
if width < 160 && height > 30 { // 2 80 character width panels
|
||||
mainPanelSplitMode := gui.Config.GetUserConfig().GetString("gui.mainPanelSplitMode")
|
||||
|
||||
switch mainPanelSplitMode {
|
||||
case "vertical":
|
||||
return ROW
|
||||
} else {
|
||||
case "horizontal":
|
||||
return COLUMN
|
||||
default:
|
||||
if width < 160 && height > 30 { // 2 80 character width panels
|
||||
return ROW
|
||||
} else {
|
||||
return COLUMN
|
||||
}
|
||||
}
|
||||
},
|
||||
direction: COLUMN,
|
||||
|
Loading…
Reference in New Issue
Block a user