Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SystemInfo ¶
type SystemInfo struct {
// OS Information
OS string // runtime.GOOS (darwin, linux, windows)
Architecture string // runtime.GOARCH (amd64, arm64, etc.)
OSVersion string // OS version (from getOSVersion())
// Terminal Information
TermType string // $TERM
ColorTerm string // $COLORTERM (truecolor indicator)
ColorFGBG string // $COLORFGBG
DetectedTheme string // "dark", "light", "unknown"
// Terminal Dimensions (requires tcell.Screen)
TerminalWidth int
TerminalHeight int
// Terminal Capabilities
ColorSupport string // "monochrome", "16-color", "256-color", "truecolor"
ColorCount int // Actual color count
// Environment Variables
XDGConfigHome string // $XDG_CONFIG_HOME
XDGCacheHome string // $XDG_CACHE_HOME
Shell string // $SHELL
Editor string // $VISUAL or $EDITOR
// Paths (from config.PathManager)
ConfigDir string // From config.GetConfigDir()
CacheDir string // From config.GetCacheDir()
ProjectRoot string // From os.Getwd()
}
SystemInfo contains client environment information including OS details, terminal capabilities, and environment variables affecting visual appearance.
func NewSystemInfo ¶
func NewSystemInfo() *SystemInfo
NewSystemInfo collects all system information using terminfo lookup (no screen needed). This is the fastest method and suitable for CLI commands and early bootstrap. Terminal dimensions are not available without a running screen.
func NewSystemInfoWithScreen ¶
func NewSystemInfoWithScreen(screen tcell.Screen) *SystemInfo
NewSystemInfoWithScreen collects all system information including actual terminal dimensions from a running screen. This requires an initialized tcell.Screen.
func (*SystemInfo) String ¶
func (s *SystemInfo) String() string
String returns a human-readable string representation of system information.
func (*SystemInfo) ToMap ¶
func (s *SystemInfo) ToMap() map[string]interface{}
ToMap returns system information as a map for serialization.