config

package
v0.0.0-...-52cf187 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package config provides configuration management for WinStatGo. It supports INI format configuration files with automatic saving.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppearanceConfig

type AppearanceConfig struct {
	Skin           string
	Opacity        int
	AlwaysOnTop    bool
	MousePenetrate bool
	LockPosition   bool
	WindowX        int
	WindowY        int
}

AppearanceConfig holds appearance settings.

type Config

type Config struct {

	// General settings
	General GeneralConfig

	// Display settings
	Display DisplayConfig

	// Network settings
	Network NetworkConfig

	// Appearance settings
	Appearance AppearanceConfig

	// Plugin settings
	Plugin PluginConfig
	// contains filtered or unexported fields
}

Config holds all application configuration.

func Default

func Default() *Config

Default returns the default configuration.

func Load

func Load(filePath string) (*Config, error)

Load loads configuration from a file. If the file doesn't exist, returns default configuration.

func (*Config) GetFilePath

func (c *Config) GetFilePath() string

GetFilePath returns the configuration file path.

func (*Config) Save

func (c *Config) Save() error

Save saves the configuration to file.

type DisplayConfig

type DisplayConfig struct {
	ShowCPU         bool
	ShowMemory      bool
	ShowNetwork     bool
	ShowTemperature bool
	ShowGPU         bool
}

DisplayConfig holds display settings.

type GeneralConfig

type GeneralConfig struct {
	Language       string
	AutoStart      bool
	CheckUpdate    bool
	StartMinimized bool
}

GeneralConfig holds general application settings.

type NetworkConfig

type NetworkConfig struct {
	Adapter        string
	UpdateInterval int
}

NetworkConfig holds network monitoring settings.

type PluginConfig

type PluginConfig struct {
	EnablePlugins bool
	PluginDir     string
}

PluginConfig holds plugin settings.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL