categories

package
v0.0.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: May 2, 2025 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

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{},
}
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"},
				{Value: "es", Label: "Spanish"},
			},
		},
	},
}
View Source
var Terminal = settings.Category{
	ID:          "terminal",
	Label:       "Terminal",
	Description: "Customize the behavior of the terminal",
	Icon:        "LuSquareTerminal",
	Settings: map[string]settings.Setting{
		"defaultShell": {
			ID:          "defaultShell",
			Type:        settings.Text,
			Label:       "Default Shell",
			Default:     "/bin/zsh",
			Description: "The default shell to use when opening a terminal",
			Validator: func(value interface{}) error {
				val, ok := value.(string)
				if !ok {
					return settings.ErrSettingTypeMismatch
				}
				path, err := exec.LookPath(val)
				if err != nil {
					return fmt.Errorf("could not find executable: %w", err)
				}

				if _, err := os.Stat(path); os.IsNotExist(err) {
					return fmt.Errorf("could not find shell '%s'", val)
				}

				return nil
			},
		},

		"fontSize": {
			ID:          "fontSize",
			Type:        settings.Integer,
			Label:       "Font Size",
			Default:     12,
			Description: "The size of the font in the terminal",
		},
		"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"},
				{Value: "underline", Label: "Underline"},
				{Value: "bar", Label: "Bar"},
			},
		},
		"cursorBlink": {
			ID:          "cursorBlink",
			Type:        settings.Toggle,
			Label:       "Cursor Blink",
			Default:     true,
			Description: "Whether the cursor should blink in the terminal",
		},
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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