mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-13 22:17:05 +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
|
scrollPastBottom: true # enable scrolling past the bottom
|
||||||
sidePanelWidth: 0.3333 # number from 0 to 1
|
sidePanelWidth: 0.3333 # number from 0 to 1
|
||||||
expandFocusedSidePanel: false
|
expandFocusedSidePanel: false
|
||||||
|
mainPanelSplitMode: 'flexible' # one of 'horizontal' | 'flexible' | 'vertical'
|
||||||
theme:
|
theme:
|
||||||
lightTheme: false # For terminals with a light background
|
lightTheme: false # For terminals with a light background
|
||||||
activeBorderColor:
|
activeBorderColor:
|
||||||
|
@ -247,6 +247,7 @@ func GetDefaultConfig() []byte {
|
|||||||
skipStashWarning: true
|
skipStashWarning: true
|
||||||
sidePanelWidth: 0.3333
|
sidePanelWidth: 0.3333
|
||||||
expandFocusedSidePanel: false
|
expandFocusedSidePanel: false
|
||||||
|
mainPanelSplitMode: 'flexible' # one of 'horizontal' | 'flexible' | 'vertical'
|
||||||
theme:
|
theme:
|
||||||
lightTheme: false
|
lightTheme: false
|
||||||
activeBorderColor:
|
activeBorderColor:
|
||||||
|
@ -132,10 +132,19 @@ func (gui *Gui) getViewDimensions(informationStr string, appStatus string) map[s
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
conditionalDirection: func(width int, height int) int {
|
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
|
return ROW
|
||||||
} else {
|
case "horizontal":
|
||||||
return COLUMN
|
return COLUMN
|
||||||
|
default:
|
||||||
|
if width < 160 && height > 30 { // 2 80 character width panels
|
||||||
|
return ROW
|
||||||
|
} else {
|
||||||
|
return COLUMN
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
direction: COLUMN,
|
direction: COLUMN,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user