categories

package
v0.32.1 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: AGPL-3.0 Imports: 15 Imported by: 0 modules, 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 DefaultMarketplaceURL = "https://mkt.omniview.dev"

DefaultMarketplaceURL is the public marketplace API used without an explicit override.

Variables

View Source
var Appearance = settings.Category{
	ID:          "appearance",
	Label:       "Appearance",
	Description: "Customize the look and feel of the application",
	Icon:        "LuPaintbrush",
	Settings: map[string]settings.Setting{

		"density": {
			ID:          "density",
			Type:        settings.Text,
			Label:       "UI Density",
			Default:     "comfortable",
			Description: "Choose comfortable spacing or a compact layout.",
			Options: []settings.SettingOption{
				{Value: "comfortable", Label: "Comfortable"},
				{Value: "compact", Label: "Compact"},
			},
			Validator: validateAppearanceChoice("comfortable", "compact"),
		},
		"textSize": {
			ID:          "textSize",
			Type:        settings.Text,
			Label:       "UI Text Size",
			Default:     "100",
			Description: "Scale interface text independently of density. Terminal and code editor fonts stay unchanged.",
			Options: []settings.SettingOption{
				{Value: "80", Label: "80%"},
				{Value: "90", Label: "90%"},
				{Value: "100", Label: "100%"},
				{Value: "110", Label: "110%"},
				{Value: "125", Label: "125%"},
			},
			Validator: validateAppearanceChoice("80", "90", "100", "110", "125"),
		},
		"motion": {
			ID:          "motion",
			Type:        settings.Text,
			Label:       "Motion",
			Default:     "system",
			Description: "Follow the system accessibility preference or choose animation behavior.",
			Options: []settings.SettingOption{
				{Value: "system", Label: "Follow System"},
				{Value: "normal", Label: "Normal"},
				{Value: "reduced", Label: "Reduced"},
			},
			Validator: validateAppearanceChoice("system", "normal", "reduced"),
		},
		// contains filtered or unexported fields
	},
}
View Source
var Developer = settings.Category{
	ID:          "developer",
	Label:       "Developer Settings",
	Description: "Settings for developing or writing plugins within Omniview",
	Icon:        "LuBeaker",
	Settings: map[string]settings.Setting{
		"ui_inspection_enabled": {
			ID:              "ui_inspection_enabled",
			Label:           "UI inspection (WebKit)",
			Description:     "Inspect this app from Safari Develop after restarting. Captures can expose sensitive application data.",
			Type:            settings.Toggle,
			Default:         false,
			RequiresRestart: true,
		},
		"pprof_enabled": {
			ID:    "pprof_enabled",
			Label: "Enable local pprof",
			Description: "Enable unauthenticated profiling on 127.0.0.1 after restarting Omniview. " +
				"Captures can expose sensitive process data. Do not forward this endpoint.",
			Type:            settings.Toggle,
			Default:         false,
			RequiresRestart: true,
		},
		"plugin_pprof_enabled": {
			ID:    "plugin_pprof_enabled",
			Label: "Enable plugin pprof",
			Description: "Enable unauthenticated plugin profiling on 127.0.0.1 after restarting Omniview. " +
				"Captures can expose sensitive process data. Do not forward these endpoints.",
			Type:            settings.Toggle,
			Default:         false,
			RequiresRestart: true,
		},
		"pprof_port": {
			ID:              "pprof_port",
			Label:           "Host profiling port",
			Description:     "Local pprof port after restarting Omniview. Use 0 to select an available port.",
			Type:            settings.Integer,
			Default:         defaultPprofPort,
			Validator:       validatePprofPort,
			RequiresRestart: true,
		},
		"marketplace_url": {
			ID:          "marketplace_url",
			Label:       "Marketplace URL",
			Description: "Base URL for the plugin marketplace API. Change this to point to a staging or self-hosted instance.",
			Type:        settings.Text,
			Default:     DefaultMarketplaceURL,
		},
		"registry_public_key": {
			ID:    "registry_public_key",
			Label: "Marketplace Signing Key",
			Description: "Hex-encoded Ed25519 public key used to verify plugin artifacts. Leave empty to use " +
				"the built-in key; set it when the marketplace URL points to a staging or self-hosted instance " +
				"that signs with its own key.",
			Type:    settings.Text,
			Default: "",
		},
		"gopath": {
			ID:          "gopath",
			Label:       "Go Path",
			Description: "Path to the Go binary",
			Type:        settings.Text,
			Default:     "",
			Validator:   validateGoExecutable,
			FileSelection: &settings.SettingFileSelection{
				Enabled:      true,
				AllowFolders: false,
				Multiple:     false,
				Extensions:   nil,
				Relative:     false,
				DefaultPath:  "",
			},
		},
		"pnpmpath": {
			ID:          "pnpmpath",
			Label:       "PNPM Path",
			Description: "PNPM binary for standalone plugin development. Named workspaces require their owned launcher; select native pnpm with OMNIVIEW_PNPM_EXECUTABLE when starting the workspace instead.",
			Type:        settings.Text,
			Default:     "",
			FileSelection: &settings.SettingFileSelection{
				Enabled:      true,
				AllowFolders: false,
				Multiple:     false,
				Extensions:   nil,
				Relative:     false,
				DefaultPath:  "",
			},
		},
		"nodepath": {
			ID:          "nodepath",
			Label:       "Node Path",
			Description: "Path to the Node binary",
			Type:        settings.Text,
			Default:     "",
			FileSelection: &settings.SettingFileSelection{
				Enabled:      true,
				AllowFolders: false,
				Multiple:     false,
				Extensions:   nil,
				Relative:     false,
				DefaultPath:  "",
			},
		},
	},
}
View Source
var Editor = settings.Category{
	ID:          "editor",
	Label:       "Editor",
	Description: "Change settings within the code editor",
	Icon:        "LuCode",
	Settings: map[string]settings.Setting{

		"folding": {
			ID:          "folding",
			Type:        settings.Toggle,
			Label:       "Folding",
			Default:     true,
			Description: "Enable code folding. Defaults to true.",
		},
		"foldingHighlight": {
			ID:          "foldingHighlight",
			Type:        settings.Toggle,
			Label:       "Folding Highlight",
			Default:     true,
			Description: "Enable highlight for folded regions. Defaults to true.",
		},

		"fontWeight": {
			ID:          "fontWeight",
			Type:        settings.Text,
			Label:       "Font Weight",
			Default:     defaultEditorFontWeight,
			Description: "The font weight.",
		},
		"formatOnPaste": {
			ID:          "formatOnPaste",
			Type:        settings.Toggle,
			Label:       "Format On Paste",
			Default:     false,
			Description: "Enable format on paste. Defaults to false.",
		},
		"formatOnType": {
			ID:          "formatOnType",
			Type:        settings.Toggle,
			Label:       "Format On Type",
			Default:     false,
			Description: "Enable format on type. Defaults to false.",
		},
		"lineHeight": {
			ID:          "lineHeight",
			Type:        settings.Integer,
			Label:       "Line Height",
			Default:     1,
			Description: "The line height.",
		},
		"lineNumbers": {
			ID:   "lineNumbers",
			Type: settings.Text,
			Options: []settings.SettingOption{
				{Value: "on", Label: "On", Description: ""},
				{Value: "off", Label: "Off", Description: ""},
				{Value: "relative", Label: "Relative", Description: ""},
				{Value: "interval", Label: "Interval", Description: ""},
			},
			Label:       "Line Numbers",
			Default:     "on",
			Description: "Control the rendering of line numbers. Defaults to 'on'.",
		},
		"lineNumbersMinChars": {
			ID:      "lineNumbersMinChars",
			Type:    settings.Integer,
			Label:   "Line Number Width",
			Default: defaultLineNumbersMinChars,
			Description: "Control the width of line numbers, by reserving horizontal space for rendering " +
				"at least an amount of digits. Defaults to 5.",
		},
		"minimapEnabled": {
			ID:          "minimapEnabled",
			Type:        settings.Toggle,
			Label:       "Minimap Enabled",
			Default:     true,
			Description: "Enable the rendering of the minimap. Defaults to 'true'",
		},
		"minimapScale": {
			ID:          "minimapScale",
			Type:        settings.Integer,
			Label:       "Minimap Scale",
			Default:     1,
			Description: "Relative size of the font in the minimap. Defaults to 1.",
		},
		"minimapShowSlider": {
			ID:    "minimapShowSlider",
			Type:  settings.Text,
			Label: "Minimap Slider",
			Options: []settings.SettingOption{
				{Value: "mouseover", Label: "Mouseover", Description: ""},
				{Value: "always", Label: "Always", Description: ""},
			},
			Default:     "mouseover",
			Description: "Control the rendering of the minimap slider. Defaults to 'mouseover'.",
		},
		"minimapSide": {
			ID:      "minimapSide",
			Type:    settings.Text,
			Label:   "Minimap Side",
			Default: "right",
			Options: []settings.SettingOption{
				{Value: "right", Label: "Right", Description: ""},
				{Value: "left", Label: "Left", Description: ""},
			},
			Description: "Control the side of the minimap in editor. Defaults to 'right'",
		},
		"minimapSize": {
			ID:      "minimapSize",
			Type:    settings.Text,
			Label:   "Minimap Size",
			Default: "actual",
			Options: []settings.SettingOption{
				{Value: "actual", Label: "Actual", Description: ""},
				{Value: "proportional", Label: "Proportional", Description: ""},
				{Value: "fill", Label: "Fill", Description: ""},
				{Value: "fit", Label: "Fit", Description: ""},
			},
			Description: "Control the minimap rendering mode. Defaults to 'actual'.",
		},
		// contains filtered or unexported fields
	},
}
View Source
var General = settings.Category{
	ID:          "general",
	Label:       "General",
	Description: "General settings for the application",
	Icon:        "LuSettings2",
	Settings: map[string]settings.Setting{

		"language": {
			ID:          "language",
			Type:        settings.Text,
			Label:       "Language",
			Default:     "en",
			Description: "The language to use when displaying text",
			Options: []settings.SettingOption{
				{Value: "en", Label: "English", Description: ""},
				{Value: "es", Label: "Spanish", Description: ""},
			},
		},
	},
}
View Source
var Telemetry = settings.Category{
	ID:          "telemetry",
	Label:       "Telemetry",
	Description: "Configure observability, logging, tracing, metrics, and profiling",
	Icon:        "LuActivity",
	Settings:    buildTelemetrySettings(false),
}
View Source
var Terminal = settings.Category{
	ID:          "terminal",
	Label:       "Terminal",
	Description: "Customize the behavior of the terminal",
	Icon:        "LuSquareTerminal",
	Settings: map[string]settings.Setting{
		"nativeApplication": {
			ID:          "nativeApplication",
			Type:        settings.Text,
			Label:       "Native Terminal Application",
			Default:     "terminal",
			Description: "macOS application for a fresh external resource shell. Built-in terminals are unchanged.",
			Validator: func(value interface{}) settings.ValidationResult {
				app, ok := value.(string)
				if !ok {
					return settings.ValidationResult{Code: "native_application", Message: "Choose an installed supported application."}
				}
				if _, supported := nativeapps.BundleID(app); !supported {
					return settings.ValidationResult{Code: "native_application", Message: "Choose an installed supported application."}
				}
				return settings.ValidationResult{Valid: true}
			},
		},
		"defaultShell": {
			ID:          "defaultShell",
			Type:        settings.Text,
			Label:       "Default Shell",
			Default:     defaultShell(),
			Description: "The default shell to use when opening a terminal",
			Validator: func(value interface{}) settings.ValidationResult {
				val, ok := value.(string)
				if !ok {
					return settings.ValidationResult{Code: "shell_type", Message: "Enter a shell executable name or path."}
				}
				path, _, err := shellenv.Resolve([]string{val})
				if err != nil {
					return settings.ValidationResult{Code: "shell_executable", Message: "Choose an executable shell installed on this system."}
				}

				if _, statErr := os.Stat(path); os.IsNotExist(statErr) {
					return settings.ValidationResult{Code: "shell_missing", Message: "The selected shell no longer exists. Choose an installed shell."}
				}

				return settings.ValidationResult{Valid: true, Code: "shell_executable", Message: "Shell executable is available."}
			},
		},

		"cursorStyle": {
			ID:          "cursorStyle",
			Type:        settings.Text,
			Label:       "Cursor Style",
			Default:     "block",
			Description: "The style of the cursor in the terminal",
			Options: []settings.SettingOption{
				{Value: "block", Label: "Block", Description: ""},
				{Value: "underline", Label: "Underline", Description: ""},
				{Value: "bar", Label: "Bar", Description: ""},
			},
		},
		"cursorBlink": {
			ID:          "cursorBlink",
			Type:        settings.Toggle,
			Label:       "Cursor Blink",
			Default:     true,
			Description: "Whether the cursor should blink in the terminal",
		},
		// contains filtered or unexported fields
	},
}

Functions

func Definitions added in v0.14.0

func Definitions(isDev bool) []settings.Category

Definitions is the single category source for startup and configured-value UI reads. The host initializer copies these definitions before registering them.

func MigrateAppearanceValues added in v0.5.0

func MigrateAppearanceValues(values map[string]any) (map[string]any, bool)

MigrateAppearanceValues upgrades known legacy theme IDs without changing extension-provided or otherwise unknown IDs.

func MigrateTerminalValues added in v0.5.0

func MigrateTerminalValues(values map[string]any) (map[string]any, bool)

MigrateTerminalValues upgrades the legacy application-theme sentinel.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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