config

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2018 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = Config{
	DebugMode: false,
	ColourScheme: ColourScheme{
		Cursor:       strToColourNoErr("#e8dfd6"),
		Foreground:   strToColourNoErr("#e8dfd6"),
		Background:   strToColourNoErr("#021b21"),
		Black:        strToColourNoErr("#032c36"),
		Red:          strToColourNoErr("#c2454e"),
		Green:        strToColourNoErr("#7cbf9e"),
		Yellow:       strToColourNoErr("#8a7a63"),
		Blue:         strToColourNoErr("#065f73"),
		Magenta:      strToColourNoErr("#ff5879"),
		Cyan:         strToColourNoErr("#44b5b1"),
		LightGrey:    strToColourNoErr("#f2f1b9"),
		DarkGrey:     strToColourNoErr("#3e4360"),
		LightRed:     strToColourNoErr("#ef5847"),
		LightGreen:   strToColourNoErr("#a2db91"),
		LightYellow:  strToColourNoErr("#beb090"),
		LightBlue:    strToColourNoErr("#61778d"),
		LightMagenta: strToColourNoErr("#ff99a1"),
		LightCyan:    strToColourNoErr("#9ed9d8"),
		White:        strToColourNoErr("#f6f6c9"),
		Selection:    strToColourNoErr("#333366"),
	},
	KeyMapping: KeyMappingConfig(map[string]string{}),
}

Functions

This section is empty.

Types

type Colour

type Colour [3]float32

func (Colour) MarshalText

func (c Colour) MarshalText() (text []byte, err error)

func (*Colour) UnmarshalText

func (c *Colour) UnmarshalText(data []byte) error

type ColourScheme

type ColourScheme struct {
	Cursor       Colour `toml:"cursor"`
	Foreground   Colour `toml:"foreground"`
	Background   Colour `toml:"background"`
	Black        Colour `toml:"black"`
	Red          Colour `toml:"red"`
	Green        Colour `toml:"green"`
	Yellow       Colour `toml:"yellow"`
	Blue         Colour `toml:"blue"`
	Magenta      Colour `toml:"magenta"`
	Cyan         Colour `toml:"cyan"`
	LightGrey    Colour `toml:"light_grey"`
	DarkGrey     Colour `toml:"dark_grey"`
	LightRed     Colour `toml:"light_red"`
	LightGreen   Colour `toml:"light_green"`
	LightYellow  Colour `toml:"light_yellow"`
	LightBlue    Colour `toml:"light_blue"`
	LightMagenta Colour `toml:"light_magenta"`
	LightCyan    Colour `toml:"light_cyan"`
	White        Colour `toml:"white"`
	Selection    Colour `toml:"selection"`
}

type Config

type Config struct {
	DebugMode    bool             `toml:"debug"`
	Slomo        bool             `toml:"slomo"`
	ColourScheme ColourScheme     `toml:"colours"`
	Shell        string           `toml:"shell"`
	KeyMapping   KeyMappingConfig `toml:"keys"`
}

func Parse

func Parse(data []byte) (*Config, error)

func (*Config) Encode

func (c *Config) Encode() ([]byte, error)

type KeyCombination added in v0.5.0

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

func (KeyCombination) Match added in v0.5.0

func (combi KeyCombination) Match(pressedMods glfw.ModifierKey, pressedKey glfw.Key) bool

type KeyMappingConfig added in v0.5.0

type KeyMappingConfig map[string]string

func (KeyMappingConfig) GenerateActionMap added in v0.5.0

func (keyMapConfig KeyMappingConfig) GenerateActionMap() (map[UserAction]*KeyCombination, error)

type KeyMod added in v0.5.0

type KeyMod string

type UserAction added in v0.5.0

type UserAction string
const (
	ActionCopy        UserAction = "copy"
	ActionPaste       UserAction = "paste"
	ActionGoogle      UserAction = "google"
	ActionReportBug   UserAction = "report"
	ActionToggleDebug UserAction = "debug"
	ActionToggleSlomo UserAction = "slomo"
)

Jump to

Keyboard shortcuts

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