diff options
| author | Paul Buetow <paul@buetow.org> | 2021-07-30 08:51:05 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2021-07-30 08:51:05 +0300 |
| commit | cf3308564c7ca46caba4a8a8649743f5cf0319bc (patch) | |
| tree | 14bd4bfcefbec10346e250e93ee5e35afd2cbb6f /internal/config | |
| parent | 5b077bfcd68f84892a7ed66bbf92ec8d602ae8ec (diff) | |
initial color config support
Diffstat (limited to 'internal/config')
| -rw-r--r-- | internal/config/client.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/internal/config/client.go b/internal/config/client.go index 1515aae..3d8c45a 100644 --- a/internal/config/client.go +++ b/internal/config/client.go @@ -1,8 +1,25 @@ package config +// ClientColorConfig allows to override the default terminal color codes. +type ClientColorConfig struct { + OkBgColor Color +} + +/* + splitted := strings.Split(line, "|") + if splitted[2] == "100" { + splitted[2] = Paint(BgGreen, splitted[2]) + } else { + splitted[2] = Paint(BgRed, splitted[2]) + } + info := strings.Join(splitted[0:5], "|") + log := strings.Join(splitted[5:], "|") +*/ + // ClientConfig represents a DTail client configuration (empty as of now as there // are no available config options yet, but that may changes in the future). type ClientConfig struct { + TerminalColors ClientColorConfig `json:",omitempty"` } // Create a new default client configuration. |
