Documentation ¶
Index ¶
- Constants
- Variables
- func CreateProcCompHome() string
- func GetConfigDefault() []string
- func GetLogFilePath() string
- func GetSettingsPath() string
- func GetShortCutsPath() string
- func GetThemesPath() string
- func GetUnixSocketPath() string
- func IsLogSelectionOn() bool
- type Body
- type Color
- type Colors
- type Dialog
- type Flags
- type Help
- type ProcTable
- type Settings
- type Sort
- type StatTable
- type Style
- type StyleListener
- type Styles
- func (s *Styles) AttentionBgColor() tcell.Color
- func (s *Styles) BgColor() tcell.Color
- func (s *Styles) Body() Body
- func (s *Styles) BorderColor() tcell.Color
- func (s *Styles) ContrastBgColor() tcell.Color
- func (s *Styles) Dialog() Dialog
- func (s *Styles) Dump(w io.Writer)
- func (s *Styles) FgColor() tcell.Color
- func (s *Styles) GetStyleName() string
- func (s *Styles) Help() Help
- func (s *Styles) Load(path string) error
- func (s *Styles) ProcTable() ProcTable
- func (s *Styles) StatTable() StatTable
- func (s *Styles) Update()
- type Themes
Constants ¶
const ( // DefaultRefreshRate represents the refresh interval. DefaultRefreshRate = 1 * time.Second // DefaultLogLevel represents the default log level. DefaultLogLevel = "info" // DefaultPortNum represents the default port number. DefaultPortNum = 8080 // DefaultAddress represents the default address. DefaultAddress = "localhost" // DefaultLogLength represents the default log length. DefaultLogLength = 1000 // DefaultSortColumn represents the default sort column. DefaultSortColumn = "NAME" // DefaultThemeName represents the default theme DefaultThemeName = "Default" )
const ( EnvVarNamePort = "PC_PORT_NUM" EnvVarNameTui = "PC_DISABLE_TUI" EnvVarNameConfig = "PC_CONFIG_FILES" EnvVarNameNoServer = "PC_NO_SERVER" EnvVarUnixSocketPath = "PC_SOCKET_PATH" EnvVarReadOnlyMode = "PC_READ_ONLY" EnvVarDisableDotEnv = "PC_DISABLE_DOTENV" EnvVarTuiFullScreen = "PC_TUI_FULL_SCREEN" EnvVarHideDisabled = "PC_HIDE_DISABLED_PROC" )
const ( LogPathEnvVarName = "PC_LOG_FILE" LogFileFlags = os.O_CREATE | os.O_APPEND | os.O_WRONLY | os.O_TRUNC LogFileMode = os.FileMode(0600) )
const (
CustomStyleName = "Custom Style"
)
Variables ¶
var ( Version = "undefined" Commit = "undefined" Date = "undefined" CheckForUpdates = "false" License = "Apache-2.0" Discord = "https://discord.gg/S4xgmRSHdC" ProjectName = "Process Compose 🔥" RemoteProjectName = "Process Compose ⚡" )
Functions ¶
func CreateProcCompHome ¶ added in v1.5.0
func CreateProcCompHome() string
func GetConfigDefault ¶ added in v0.65.0
func GetConfigDefault() []string
func GetLogFilePath ¶ added in v0.43.1
func GetLogFilePath() string
func GetSettingsPath ¶ added in v1.0.0
func GetSettingsPath() string
func GetShortCutsPath ¶ added in v0.29.4
func GetShortCutsPath() string
func GetThemesPath ¶ added in v1.0.0
func GetThemesPath() string
func GetUnixSocketPath ¶ added in v1.2.0
func GetUnixSocketPath() string
func IsLogSelectionOn ¶ added in v0.80.0
func IsLogSelectionOn() bool
Types ¶
type Body ¶ added in v1.0.0
type Body struct { FgColor Color `yaml:"fgColor"` BgColor Color `yaml:"bgColor"` SecondaryTextColor Color `yaml:"secondaryTextColor"` TertiaryTextColor Color `yaml:"tertiaryTextColor"` BorderColor Color `yaml:"borderColor"` }
Body tracks body styles.
type Dialog ¶ added in v1.0.0
type Dialog struct { FgColor Color `yaml:"fgColor"` BgColor Color `yaml:"bgColor"` ContrastBgColor Color `yaml:"contrastBgColor"` AttentionBgColor Color `yaml:"attentionBgColor"` ButtonFgColor Color `yaml:"buttonFgColor"` ButtonBgColor Color `yaml:"buttonBgColor"` ButtonFocusFgColor Color `yaml:"buttonFocusFgColor"` ButtonFocusBgColor Color `yaml:"buttonFocusBgColor"` LabelFgColor Color `yaml:"labelFgColor"` FieldFgColor Color `yaml:"fieldFgColor"` FieldBgColor Color `yaml:"fieldBgColor"` }
Dialog tracks dialog styles.
type Flags ¶ added in v0.65.0
type Flags struct { RefreshRate *time.Duration PortNum *int Address *string LogLevel *string LogFile *string LogLength *int LogFollow *bool LogTailLength *int IsTuiEnabled *bool Command *string Write *bool NoDependencies *bool HideDisabled *bool SortColumn *string SortColumnChanged bool IsReverseSort *bool NoServer *bool KeepTuiOn *bool KeepProjectOn *bool IsOrderedShutDown *bool PcTheme *string PcThemeChanged bool UnixSocketPath *string IsUnixSocket *bool IsReadOnlyMode *bool OutputFormat *string DisableDotEnv *bool IsTuiFullScreen *bool IsDetached *bool }
Flags represents PC configuration flags.
type Help ¶ added in v1.0.0
type Help struct { KeyColor Color `yaml:"keyColor"` FgColor Color `yaml:"fgColor"` HlColor Color `yaml:"hlColor"` ButtonBgColor Color `yaml:"buttonBgColor"` FgCategoryColor Color `yaml:"categoryFgColor"` }
Help tracks help styles.
type ProcTable ¶ added in v1.0.0
type ProcTable struct { FgColor Color `yaml:"fgColor"` FgWarning Color `yaml:"fgWarning"` FgPending Color `yaml:"fgPending"` FgCompleted Color `yaml:"fgCompleted"` FgError Color `yaml:"fgError"` BgColor Color `yaml:"bgColor"` HeaderFgColor Color `yaml:"headerFgColor"` }
ProcTable tracks processes table styles.
type Settings ¶ added in v1.0.0
type Settings struct { Theme string `yaml:"theme"` Sort Sort `yaml:"sort"` DisableExitConfirmation bool `yaml:"disable_exit_confirmation"` }
func NewSettings ¶ added in v1.0.0
func NewSettings() *Settings
type StatTable ¶ added in v1.0.0
type StatTable struct { KeyFgColor Color `yaml:"keyFgColor"` ValueFgColor Color `yaml:"valueFgColor"` BgColor Color `yaml:"bgColor"` LogoColor Color `yaml:"logoColor"` }
StatTable tracks stats table styles.
type Style ¶ added in v1.0.0
type Style struct { Name string `yaml:"name"` Body Body `yaml:"body"` StatTable StatTable `yaml:"stat_table"` ProcTable ProcTable `yaml:"proc_table"` Help Help `yaml:"help"` Dialog Dialog `yaml:"dialog"` }
Style tracks PC styles.
type StyleListener ¶ added in v1.0.0
type StyleListener interface { // StylesChanged notifies listener the skin changed. StylesChanged(*Styles) }
StyleListener represents a skin's listener.
type Styles ¶ added in v1.0.0
type Styles struct {
Style Style `yaml:"style"`
}
Styles tracks process compose styling options.
func (*Styles) AttentionBgColor ¶ added in v1.5.0
func (s *Styles) AttentionBgColor() tcell.Color
AttentionBgColor returns the Contrast background color.
func (*Styles) BgColor ¶ added in v1.0.0
func (s *Styles) BgColor() tcell.Color
BgColor returns the background color.
func (*Styles) BorderColor ¶ added in v1.0.0
func (s *Styles) BorderColor() tcell.Color
BorderColor returns the border color.
func (*Styles) ContrastBgColor ¶ added in v1.5.0
func (s *Styles) ContrastBgColor() tcell.Color
ContrastBgColor returns the Contrast background color.
func (*Styles) FgColor ¶ added in v1.0.0
func (s *Styles) FgColor() tcell.Color
FgColor returns the foreground color.
func (*Styles) GetStyleName ¶ added in v1.0.0
GetStyleName returns the style name
type Themes ¶ added in v1.0.0
type Themes struct {
// contains filtered or unexported fields
}
Themes represents a list of styles.
func (*Themes) AddListener ¶ added in v1.0.0
func (t *Themes) AddListener(l StyleListener)
AddListener registers a new listener.
func (*Themes) GetActiveStyles ¶ added in v1.0.0
GetActiveStyles returns the active styles.
func (*Themes) GetThemeNames ¶ added in v1.0.0
func (*Themes) RemoveListener ¶ added in v1.0.0
func (t *Themes) RemoveListener(l StyleListener)
RemoveListener removes a listener.
func (*Themes) SelectStyles ¶ added in v1.0.0
func (*Themes) SelectStylesFromFile ¶ added in v1.0.0
func (t *Themes) SelectStylesFromFile()