tmux

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultCfg = Config{
	Symbols: symbols{
		Branch:     "⎇ ",
		Staged:     "● ",
		Conflict:   "✖ ",
		Modified:   "✚ ",
		Untracked:  "… ",
		Stashed:    "⚑ ",
		Clean:      "✔",
		Ahead:      "↑·",
		Behind:     "↓·",
		HashPrefix: ":",
	},
	Styles: styles{
		State:     "#[fg=red,bold]",
		Branch:    "#[fg=white,bold]",
		Remote:    "#[fg=cyan]",
		Staged:    "#[fg=green,bold]",
		Conflict:  "#[fg=red,bold]",
		Modified:  "#[fg=red,bold]",
		Untracked: "#[fg=magenta,bold]",
		Stashed:   "#[fg=cyan,bold]",
		Clean:     "#[fg=green,bold]",
	},
	Layout: []string{"branch", "..", "remote-branch", "divergence", " - ", "flags"},
	Options: options{
		BranchMaxLen: 0,
	},
}

DefaultCfg is the default tmux configuration.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Symbols contains the symbols printed before the Git status components.
	Symbols symbols
	// Styles contains the tmux style strings for symbols and Git status
	// components.
	Styles styles
	// Layout sets the output format of the Git status.
	Layout []string `yaml:",flow"`
	// Options contains additional configuration options.
	Options options
}

Config is the configuration of the Git status tmux formatter.

type Formater

type Formater struct {
	Config
	// contains filtered or unexported fields
}

A Formater formats git status to a tmux style string.

func (*Formater) Format

func (f *Formater) Format(w io.Writer, st *gitstatus.Status) error

Format writes st as json into w.

Jump to

Keyboard shortcuts

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