Documentation
¶
Index ¶
- Constants
- func ConfigDir() (string, error)
- func Copy(src, dest string) error
- func CreateConfigDir()
- func CreateConfigFile()
- func CreateFile(fileName string) (string, error)
- func LoadConfigFile(filePath string) *config.Config
- func MigrateOldConfig()
- type Colors
- type Common
- func (common *Common) DefaultFocussedRowColor() string
- func (common *Common) DefaultRowColor() string
- func (common *Common) FocusChar() string
- func (common *Common) RightAlignFormat(width int) string
- func (common *Common) RowColor(idx int) string
- func (common *Common) SigilStr(len, pos int, width int) string
- type Module
- type Position
- type Sigils
Constants ¶
const ConfigDirV1 = "~/.wtf/"
ConfigDirV1 defines the path to the first version of configuration. Do not use this
const ConfigDirV2 = "~/.config/wtf/"
ConfigDirV2 defines the path to the second version of the configuration. Use this.
Variables ¶
This section is empty.
Functions ¶
func Copy ¶ added in v0.0.10
Copy copies src to dest, doesn't matter if src is a directory or a file
func CreateConfigDir ¶
func CreateConfigDir()
CreateConfigDir creates the wtf/ directory in the user's home dir
func CreateConfigFile ¶ added in v0.0.9
func CreateConfigFile()
CreateConfigFile creates a simple config file in the config directory if one does not already exist
func CreateFile ¶
CreateFile creates the named file in the config directory, if it does not already exist. If the file exists it does not recreate it. If successful, eturns the absolute path to the file If unsuccessful, returns an error
func LoadConfigFile ¶
LoadConfigFile loads the config.yml file to configure the app
func MigrateOldConfig ¶ added in v0.0.10
func MigrateOldConfig()
MigrateOldConfig copies any existing configuration from the old location to the new, XDG-compatible location
Types ¶
type Common ¶ added in v0.9.2
type Common struct {
Colors
Module
Position
Sigils
Enabled bool
RefreshInterval int
Title string
Config *config.Config
// contains filtered or unexported fields
}