summaryrefslogtreecommitdiffstats
path: root/pkg/gui/arrangement.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2020-08-12 22:18:03 +1000
committerJesse Duffield <jessedduffield@gmail.com>2020-08-13 21:50:23 +1000
commit8430b04492e74b760fc92fc65a619e46e61d3a6a (patch)
tree1d1e1c3333fa7f5b8fede31a99c2f4803c72f280 /pkg/gui/arrangement.go
parent35b72420adebf7118f92e6d07109f4f0bfe204a7 (diff)
allow configurable main panel split
Diffstat (limited to 'pkg/gui/arrangement.go')
-rw-r--r--pkg/gui/arrangement.go13
1 files changed, 11 insertions, 2 deletions
diff --git a/pkg/gui/arrangement.go b/pkg/gui/arrangement.go
index aeb6ce59d..9380465a2 100644
--- a/pkg/gui/arrangement.go
+++ b/pkg/gui/arrangement.go
@@ -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,