From 8b67c02cc02d3fe41e6992a748453566089c136b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=9E=E3=83=AA=E3=82=A6=E3=82=B9?= Date: Mon, 16 Jan 2023 14:32:50 -0500 Subject: [PATCH] Added workaround for #14, made shadow configurable --- config/config.go | 4 +++- go.mod | 2 +- ui/windowmanager/windowmanager.go | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/config/config.go b/config/config.go index 78efbb8..083a262 100644 --- a/config/config.go +++ b/config/config.go @@ -43,7 +43,8 @@ type Config struct { Log string Proxy string - RenderImages bool + RenderShadows bool + RenderImages bool Systems []SystemConfig @@ -188,6 +189,7 @@ func SetDefaults(cacheDir string) { viper.SetDefault("Log", path.Join(cacheDir, "neonmodem.log")) viper.SetDefault("Proxy", "") + viper.SetDefault("RenderShadows", "true") viper.SetDefault("RenderImages", "true") // --- Header --- diff --git a/go.mod b/go.mod index a1afce9..c2ccd35 100644 --- a/go.mod +++ b/go.mod @@ -9,6 +9,7 @@ require ( github.com/charmbracelet/bubbletea v0.23.1 github.com/charmbracelet/glamour v0.6.0 github.com/charmbracelet/lipgloss v0.6.0 + github.com/eliukblau/pixterm v1.3.1 github.com/google/uuid v1.3.0 github.com/hashicorp/go-retryablehttp v0.7.2 github.com/hermanschaaf/hackernews v1.0.1 @@ -37,7 +38,6 @@ require ( github.com/containerd/console v1.0.3 // indirect github.com/disintegration/imaging v1.6.2 // indirect github.com/dlclark/regexp2 v1.7.0 // indirect - github.com/eliukblau/pixterm v1.3.1 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/gorilla/css v1.0.0 // indirect diff --git a/ui/windowmanager/windowmanager.go b/ui/windowmanager/windowmanager.go index 85a5c93..e63b526 100644 --- a/ui/windowmanager/windowmanager.go +++ b/ui/windowmanager/windowmanager.go @@ -213,7 +213,7 @@ func (wm *WM) View(view string, onlyFocused bool) string { wm.stack[i].XYWH[1]+(wm.ctx.Screen[1]-wm.ctx.Content[1]), wm.stack[i].Win.View(), v, - true, + wm.ctx.Config.RenderShadows, ) }