Documentation ¶
Index ¶
- Constants
- func GetConfigSubdirs() []string
- func SetBaseConfigValue(toMerge waveobj.MetaMapType) error
- func SortFileNameDescend(files []fs.DirEntry)
- func WriteWaveHomeConfigFile(fileName string, m waveobj.MetaMapType) error
- type ConfigError
- type FullConfigType
- type MetaSettingsType
- type MimeTypeConfigType
- type SettingsType
- type TermThemeType
- type Watcher
- type WatcherUpdate
- type WidgetConfigType
Constants ¶
View Source
const ( ConfigKey_AiClear = "ai:*" ConfigKey_AiPreset = "ai:preset" ConfigKey_AiApiType = "ai:apitype" ConfigKey_AiBaseURL = "ai:baseurl" ConfigKey_AiApiToken = "ai:apitoken" ConfigKey_AiName = "ai:name" ConfigKey_AiModel = "ai:model" ConfigKey_AiOrgID = "ai:orgid" ConfigKey_AIApiVersion = "ai:apiversion" ConfigKey_AiMaxTokens = "ai:maxtokens" ConfigKey_AiTimeoutMs = "ai:timeoutms" ConfigKey_TermClear = "term:*" ConfigKey_TermFontSize = "term:fontsize" ConfigKey_TermFontFamily = "term:fontfamily" ConfigKey_TermTheme = "term:theme" ConfigKey_TermDisableWebGl = "term:disablewebgl" ConfigKey_TermLocalShellPath = "term:localshellpath" ConfigKey_TermLocalShellOpts = "term:localshellopts" ConfigKey_TermScrollback = "term:scrollback" ConfigKey_TermCopyOnSelect = "term:copyonselect" 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_PreviewShowHiddenFiles = "preview:showhiddenfiles" 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_WindowShowMenuBar = "window:showmenubar" ConfigKey_WindowNativeTitleBar = "window:nativetitlebar" ConfigKey_WindowDisableHardwareAcceleration = "window:disablehardwareacceleration" ConfigKey_WindowMaxTabCacheSize = "window:maxtabcachesize" ConfigKey_TelemetryClear = "telemetry:*" ConfigKey_TelemetryEnabled = "telemetry:enabled" ConfigKey_ConnClear = "conn:*" ConfigKey_ConnAskBeforeWshInstall = "conn:askbeforewshinstall" )
View Source
const AnySchema = `
{
"type": "object",
"additionalProperties": true
}
`
View Source
const SettingsFile = "settings.json"
Variables ¶
This section is empty.
Functions ¶
func GetConfigSubdirs ¶ added in v0.9.0
func GetConfigSubdirs() []string
func SetBaseConfigValue ¶
func SetBaseConfigValue(toMerge waveobj.MetaMapType) error
func SortFileNameDescend ¶ added in v0.9.0
func WriteWaveHomeConfigFile ¶
func WriteWaveHomeConfigFile(fileName string, m waveobj.MetaMapType) error
Types ¶
type 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 SettingsType ¶
type SettingsType struct { AiClear bool `json:"ai:*,omitempty"` AiPreset string `json:"ai:preset,omitempty"` AiApiType string `json:"ai:apitype,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"` AiOrgID string `json:"ai:orgid,omitempty"` AIApiVersion string `json:"ai:apiversion,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"` TermTheme string `json:"term:theme,omitempty"` TermDisableWebGl bool `json:"term:disablewebgl,omitempty"` TermLocalShellPath string `json:"term:localshellpath,omitempty"` TermLocalShellOpts []string `json:"term:localshellopts,omitempty"` TermScrollback *int64 `json:"term:scrollback,omitempty"` TermCopyOnSelect *bool `json:"term:copyonselect,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"` PreviewShowHiddenFiles *bool `json:"preview:showhiddenfiles,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"` WindowShowMenuBar bool `json:"window:showmenubar,omitempty"` WindowNativeTitleBar bool `json:"window:nativetitlebar,omitempty"` WindowDisableHardwareAcceleration bool `json:"window:disablehardwareacceleration,omitempty"` WindowMaxTabCacheSize int `json:"window:maxtabcachesize,omitempty"` TelemetryClear bool `json:"telemetry:*,omitempty"` TelemetryEnabled bool `json:"telemetry:enabled,omitempty"` ConnClear bool `json:"conn:*,omitempty"` ConnAskBeforeWshInstall bool `json:"conn:askbeforewshinstall,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"` Cursor string `json:"cursor"` }
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) GetFullConfig ¶
func (w *Watcher) GetFullConfig() FullConfigType
type WatcherUpdate ¶
type WatcherUpdate struct {
FullConfig FullConfigType `json:"fullconfig"`
}
type WidgetConfigType ¶
Click to show internal directories.
Click to hide internal directories.