diff --git a/docs/Config.md b/docs/Config.md index 48e15f69f..bb0fe77e4 100644 --- a/docs/Config.md +++ b/docs/Config.md @@ -33,6 +33,7 @@ to the top of your config file or via [Visual Studio Code settings.json config][ gui: scrollHeight: 2 language: 'auto' # one of 'auto' | 'en' | 'pl' | 'nl' | 'de' | 'tr' + border: 'single' # one of 'single' | 'rounded' | 'double' | 'hidden' theme: activeBorderColor: - green diff --git a/pkg/config/app_config.go b/pkg/config/app_config.go index d35a244d6..6ee73bb86 100644 --- a/pkg/config/app_config.go +++ b/pkg/config/app_config.go @@ -138,6 +138,10 @@ type GuiConfig struct { // containers panel. "long": full words (default), "short": one or two characters, // "icon": unicode emoji. ContainerStatusHealthStyle string `yaml:"containerStatusHealthStyle"` + + // Window border style. + // One of 'single' (default) | 'rounded' | 'double' | 'hidden' + Border string `yaml:"border"` } // CommandTemplatesConfig determines what commands actually get called when we diff --git a/pkg/gui/views.go b/pkg/gui/views.go index 8cadf3c7f..865496f35 100644 --- a/pkg/gui/views.go +++ b/pkg/gui/views.go @@ -92,12 +92,23 @@ func (gui *Gui) orderedViewNameMappings() []viewNameMapping { } func (gui *Gui) createAllViews() error { + frameRunes := []rune{'─', '│', '┌', '┐', '└', '┘'} + switch gui.Config.UserConfig.Gui.Border { + case "double": + frameRunes = []rune{'═', '║', '╔', '╗', '╚', '╝'} + case "rounded": + frameRunes = []rune{'─', '│', '╭', '╮', '╰', '╯'} + case "hidden": + frameRunes = []rune{' ', ' ', ' ', ' ', ' ', ' '} + } + var err error for _, mapping := range gui.orderedViewNameMappings() { *mapping.viewPtr, err = gui.prepareView(mapping.name) if err != nil && err.Error() != UNKNOWN_VIEW_ERROR_MSG { return err } + (*mapping.viewPtr).FrameRunes = frameRunes (*mapping.viewPtr).FgColor = gocui.ColorDefault }