wconfig

package
v0.8.4-beta.6 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2024 License: Apache-2.0 Imports: 17 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	ConfigKey_AiClear     = "ai:*"
	ConfigKey_AiBaseURL   = "ai:baseurl"
	ConfigKey_AiApiToken  = "ai:apitoken"
	ConfigKey_AiName      = "ai:name"
	ConfigKey_AiModel     = "ai:model"
	ConfigKey_AiMaxTokens = "ai:maxtokens"
	ConfigKey_AiTimeoutMs = "ai:timeoutms"

	ConfigKey_TermClear        = "term:*"
	ConfigKey_TermFontSize     = "term:fontsize"
	ConfigKey_TermFontFamily   = "term:fontfamily"
	ConfigKey_TermDisableWebGl = "term:disablewebgl"

	ConfigKey_EditorMinimapEnabled      = "editor:minimapenabled"
	ConfigKey_EditorStickyScrollEnabled = "editor:stickyscrollenabled"

	ConfigKey_WebClear               = "web:*"
	ConfigKey_WebOpenLinksInternally = "web:openlinksinternally"
	ConfigKey_WebDefaultUrl          = "web:defaulturl"
	ConfigKey_WebDefaultSearch       = "web:defaultsearch"

	ConfigKey_BlockHeaderClear        = "blockheader:*"
	ConfigKey_BlockHeaderShowBlockIds = "blockheader:showblockids"

	ConfigKey_AutoUpdateClear         = "autoupdate:*"
	ConfigKey_AutoUpdateEnabled       = "autoupdate:enabled"
	ConfigKey_AutoUpdateIntervalMs    = "autoupdate:intervalms"
	ConfigKey_AutoUpdateInstallOnQuit = "autoupdate:installonquit"
	ConfigKey_AutoUpdateChannel       = "autoupdate:channel"

	ConfigKey_WidgetClear    = "widget:*"
	ConfigKey_WidgetShowHelp = "widget:showhelp"

	ConfigKey_WindowClear                       = "window:*"
	ConfigKey_WindowTransparent                 = "window:transparent"
	ConfigKey_WindowBlur                        = "window:blur"
	ConfigKey_WindowOpacity                     = "window:opacity"
	ConfigKey_WindowBgColor                     = "window:bgcolor"
	ConfigKey_WindowReducedMotion               = "window:reducedmotion"
	ConfigKey_WindowTileGapSize                 = "window:tilegapsize"
	ConfigKey_WindowNativeTitleBar              = "window:nativetitlebar"
	ConfigKey_WindowDisableHardwareAcceleration = "window:disablehardwareacceleration"

	ConfigKey_TelemetryClear   = "telemetry:*"
	ConfigKey_TelemetryEnabled = "telemetry:enabled"
)
View Source
const SettingsFile = "settings.json"

Variables

This section is empty.

Functions

func SetBaseConfigValue

func SetBaseConfigValue(toMerge waveobj.MetaMapType) error

func WriteWaveHomeConfigFile

func WriteWaveHomeConfigFile(fileName string, m waveobj.MetaMapType) error

Types

type ConfigError

type ConfigError struct {
	File string `json:"file"`
	Err  string `json:"err"`
}

func ReadConfigPart

func ReadConfigPart(partName string, simpleMerge bool) (waveobj.MetaMapType, []ConfigError)

func ReadDefaultsConfigFile

func ReadDefaultsConfigFile(fileName string) (waveobj.MetaMapType, []ConfigError)

func ReadWaveHomeConfigFile

func ReadWaveHomeConfigFile(fileName string) (waveobj.MetaMapType, []ConfigError)

type FullConfigType

type FullConfigType struct {
	Settings       SettingsType                   `json:"settings" merge:"meta"`
	MimeTypes      map[string]MimeTypeConfigType  `json:"mimetypes"`
	DefaultWidgets map[string]WidgetConfigType    `json:"defaultwidgets"`
	Widgets        map[string]WidgetConfigType    `json:"widgets"`
	Presets        map[string]waveobj.MetaMapType `json:"presets"`
	TermThemes     map[string]TermThemeType       `json:"termthemes"`
	ConfigErrors   []ConfigError                  `json:"configerrors" configfile:"-"`
}

func ReadFullConfig

func ReadFullConfig() FullConfigType

type MetaSettingsType

type MetaSettingsType struct {
	waveobj.MetaMapType
}

func (MetaSettingsType) MarshalJSON

func (m MetaSettingsType) MarshalJSON() ([]byte, error)

func (*MetaSettingsType) UnmarshalJSON

func (m *MetaSettingsType) UnmarshalJSON(data []byte) error

type MimeTypeConfigType

type MimeTypeConfigType struct {
	Icon  string `json:"icon"`
	Color string `json:"color"`
}

type SettingsType

type SettingsType struct {
	AiClear     bool    `json:"ai:*,omitempty"`
	AiBaseURL   string  `json:"ai:baseurl,omitempty"`
	AiApiToken  string  `json:"ai:apitoken,omitempty"`
	AiName      string  `json:"ai:name,omitempty"`
	AiModel     string  `json:"ai:model,omitempty"`
	AiMaxTokens float64 `json:"ai:maxtokens,omitempty"`
	AiTimeoutMs float64 `json:"ai:timeoutms,omitempty"`

	TermClear        bool    `json:"term:*,omitempty"`
	TermFontSize     float64 `json:"term:fontsize,omitempty"`
	TermFontFamily   string  `json:"term:fontfamily,omitempty"`
	TermDisableWebGl bool    `json:"term:disablewebgl,omitempty"`

	EditorMinimapEnabled      bool `json:"editor:minimapenabled,omitempty"`
	EditorStickyScrollEnabled bool `json:"editor:stickyscrollenabled,omitempty"`

	WebClear               bool   `json:"web:*,omitempty"`
	WebOpenLinksInternally bool   `json:"web:openlinksinternally,omitempty"`
	WebDefaultUrl          string `json:"web:defaulturl,omitempty"`
	WebDefaultSearch       string `json:"web:defaultsearch,omitempty"`

	BlockHeaderClear        bool `json:"blockheader:*,omitempty"`
	BlockHeaderShowBlockIds bool `json:"blockheader:showblockids,omitempty"`

	AutoUpdateClear         bool    `json:"autoupdate:*,omitempty"`
	AutoUpdateEnabled       bool    `json:"autoupdate:enabled,omitempty"`
	AutoUpdateIntervalMs    float64 `json:"autoupdate:intervalms,omitempty"`
	AutoUpdateInstallOnQuit bool    `json:"autoupdate:installonquit,omitempty"`
	AutoUpdateChannel       string  `json:"autoupdate:channel,omitempty"`

	WidgetClear    bool `json:"widget:*,omitempty"`
	WidgetShowHelp bool `json:"widget:showhelp,omitempty"`

	WindowClear                       bool     `json:"window:*,omitempty"`
	WindowTransparent                 bool     `json:"window:transparent,omitempty"`
	WindowBlur                        bool     `json:"window:blur,omitempty"`
	WindowOpacity                     *float64 `json:"window:opacity,omitempty"`
	WindowBgColor                     string   `json:"window:bgcolor,omitempty"`
	WindowReducedMotion               bool     `json:"window:reducedmotion,omitempty"`
	WindowTileGapSize                 *int64   `json:"window:tilegapsize,omitempty"`
	WindowNativeTitleBar              bool     `json:"window:nativetitlebar,omitempty"`
	WindowDisableHardwareAcceleration bool     `json:"window:disablehardwareacceleration,omitempty"`

	TelemetryClear   bool `json:"telemetry:*,omitempty"`
	TelemetryEnabled bool `json:"telemetry:enabled,omitempty"`
}

type TermThemeType

type TermThemeType struct {
	DisplayName         string  `json:"display:name"`
	DisplayOrder        float64 `json:"display:order"`
	Black               string  `json:"black"`
	Red                 string  `json:"red"`
	Green               string  `json:"green"`
	Yellow              string  `json:"yellow"`
	Blue                string  `json:"blue"`
	Magenta             string  `json:"magenta"`
	Cyan                string  `json:"cyan"`
	White               string  `json:"white"`
	BrightBlack         string  `json:"brightBlack"`
	BrightRed           string  `json:"brightRed"`
	BrightGreen         string  `json:"brightGreen"`
	BrightYellow        string  `json:"brightYellow"`
	BrightBlue          string  `json:"brightBlue"`
	BrightMagenta       string  `json:"brightMagenta"`
	BrightCyan          string  `json:"brightCyan"`
	BrightWhite         string  `json:"brightWhite"`
	Gray                string  `json:"gray"`
	CmdText             string  `json:"cmdtext"`
	Foreground          string  `json:"foreground"`
	SelectionBackground string  `json:"selectionBackground"`
	Background          string  `json:"background"`
	CursorAccent        string  `json:"cursorAccent"`
}

type Watcher

type Watcher struct {
	// contains filtered or unexported fields
}

func GetWatcher

func GetWatcher() *Watcher

GetWatcher returns the singleton instance of the Watcher

func (*Watcher) Close

func (w *Watcher) Close()

func (*Watcher) GetFullConfig

func (w *Watcher) GetFullConfig() FullConfigType

func (*Watcher) Start

func (w *Watcher) Start()

type WatcherUpdate

type WatcherUpdate struct {
	FullConfig FullConfigType `json:"fullconfig"`
}

type WidgetConfigType

type WidgetConfigType struct {
	DisplayOrder float64          `json:"display:order,omitempty"`
	Icon         string           `json:"icon,omitempty"`
	Color        string           `json:"color,omitempty"`
	Label        string           `json:"label,omitempty"`
	Description  string           `json:"description,omitempty"`
	BlockDef     waveobj.BlockDef `json:"blockdef"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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