Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultDir = "ipfs-monitor" ConfigFile = "config.yml" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Common ¶
type Common struct { PositionSettings Bordered bool Enabled bool RefreshInterval int Title string }
Common Module configs
type Config ¶
type Config struct { Monitor struct { Colors struct { Border struct { Focusable string `yaml:"focusable"` Focused string `yaml:"focused"` Normal string `yaml:"normal"` } `yaml:"border"` Background string `yaml:"background"` Text string `yaml:"text"` } `yaml:"colors"` Grid struct { Columns []int `yaml:"columns"` Rows []int `yaml:"rows"` Background string `yaml:"background"` Border bool `yaml:"border"` } `yaml:"grid"` RefreshInterval int `yaml:"refreshInterval"` Widgets map[string]WidgetConfigs `yaml:"widgets"` } `yaml:"monitor"` }
Config is monitor generated yml config
func CreateOrLoadConfigFile ¶
func CreateOrLoadConfigFile() *Config
CreateOrLoadConfigFile creates or loads config file from config directory
type PositionSettings ¶
type PositionSettings struct { Top int `yaml:"top"` Left int `yaml:"left"` Height int `yaml:"height"` Width int `yaml:"width"` }
PositionSettings places a module in a grid
type WidgetConfigs ¶
type WidgetConfigs struct { Enabled bool `yaml:"enabled"` PositionSettings PositionSettings `yaml:"position"` RefreshInterval int `yaml:"refreshInterval"` Title string `yaml:"title"` }
WidgetConfigs is config for each widgets
Click to show internal directories.
Click to hide internal directories.