diff options
| author | ewy <ewy0@protonmail.com> | 2026-04-29 22:38:36 +0200 |
|---|---|---|
| committer | ewy <ewy0@protonmail.com> | 2026-04-29 22:38:36 +0200 |
| commit | 984f85dd590af6f54a9e245484d38dfd31bf81c8 (patch) | |
| tree | f250c07cb1b9da06dc4115a86a6bd9ae5a10aca0 | |
| parent | 42fb6efd01e3640ea9d15dc1e0a072c1ea8295b1 (diff) | |
stop pik from tweaking out in jediterm
| -rw-r--r-- | menu/model.go | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/menu/model.go b/menu/model.go index d1b9435..e5b4b88 100644 --- a/menu/model.go +++ b/menu/model.go @@ -4,6 +4,7 @@ import ( tea "github.com/charmbracelet/bubbletea" "github.com/charmbracelet/x/term" "github.com/spf13/pflag" + "os" "pik/model" "pik/motd" "pik/spool" @@ -97,13 +98,24 @@ func (m *Model) Validate() { } } +var ForcedInlineTerminals = map[string]string{ + "TERMINAL_EMULATOR": "JetBrains-JediTerm", +} + func NewModel(st *model.State, hydrators []model.Modder) *Model { + isBanned := false + for k, v := range ForcedInlineTerminals { + if os.Getenv(k) == v { + isBanned = true + break + } + } m := &Model{ HydratedState: Hydrate(st, hydrators), Index: 0, Indices: make(map[int]model.HydratedTarget), SourceIndices: make(map[int]*model.HydratedSource), - AutoAlt: !pflag.Lookup("inline").Changed, + AutoAlt: !pflag.Lookup("inline").Changed && !isBanned, Motd: motd.One(), } idx := 0 |
