feat(theme): add catppuccin themes with transparency and 256-color support

Add a theme package providing all four catppuccin flavors (mocha,
frappe, macchiato, latte) mapped to the xterm-256 palette. Themes are
selected with -theme or the CTOP_THEME environment variable; -i inverts
the flavor. Background slots use the terminal's native color for
transparency (opt out with -solid / CTOP_SOLID), and termbox is switched
to Output256 so colors render correctly. Replace hardcoded colors in the
compact and single views with ctheme portrait slots.
This commit is contained in:
ahp
2026-09-14 14:06:49 +03:30
parent 59f00dd6aa
commit 78e85dc4df
12 changed files with 454 additions and 67 deletions
+1 -5
View File
@@ -5,7 +5,7 @@ require (
github.com/c9s/goprocinfo v0.0.0-20170609001544-b34328d6e0cd
github.com/fsouza/go-dockerclient v1.7.0
github.com/gizak/termui v2.3.1-0.20180817033724-8d4faad06196+incompatible
github.com/hako/durafmt v0.0.0-20210608085754-5c1018a4e16b // indirect
github.com/hako/durafmt v0.0.0-20210608085754-5c1018a4e16b
github.com/jgautheron/codename-generator v0.0.0-20150829203204-16d037c7cc3c
github.com/mattn/go-runewidth v0.0.2
github.com/nsf/termbox-go v0.0.0-20190121233118-02980233997d
@@ -14,7 +14,6 @@ require (
github.com/opencontainers/runc v1.1.0
github.com/pkg/browser v0.0.0-20201207095918-0426ae3fba23
github.com/pkg/errors v0.9.1
github.com/stretchr/testify v1.4.0
)
require (
@@ -29,7 +28,6 @@ require (
github.com/containerd/continuity v0.0.0-20200928162600-f2cc35102c2a // indirect
github.com/coreos/go-systemd/v22 v22.3.2 // indirect
github.com/cyphar/filepath-securejoin v0.2.3 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/docker/docker v20.10.0-beta1.0.20201113105859-b6bfff2a628f+incompatible // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.4.0 // indirect
@@ -47,7 +45,6 @@ require (
github.com/opencontainers/image-spec v1.0.1 // indirect
github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417 // indirect
github.com/opencontainers/selinux v1.10.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/seccomp/libseccomp-golang v0.9.2-0.20210429002308-3879420cc921 // indirect
github.com/sirupsen/logrus v1.8.1 // indirect
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 // indirect
@@ -58,7 +55,6 @@ require (
golang.org/x/sync v0.0.0-20190423024810-112230192c58 // indirect
golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c // indirect
google.golang.org/protobuf v1.27.1 // indirect
gopkg.in/yaml.v2 v2.2.8 // indirect
)
go 1.18