dotfiles

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const UnixLikePlatformName = "unixlike"

UnixLikePlatformName is a special platform name used commonly for Unix-like platform

Variables

View Source
var DefaultMappings = map[string]MappingsJSON{
	"windows": MappingsJSON{
		".gvimrc": []string{"~/vimfiles/gvimrc"},
		".vim":    []string{"~/vimfiles"},
		".vimrc":  []string{"~/vimfiles/vimrc"},
	},
	UnixLikePlatformName: MappingsJSON{
		".agignore":      []string{"~/.agignore"},
		".bash_login":    []string{"~/.bash_login"},
		".bash_profile":  []string{"~/.bash_profile"},
		".bashrc":        []string{"~/.bashrc"},
		".emacs.d":       []string{"~/.emacs.d"},
		".emacs.el":      []string{"~/.emacs.d/init.el"},
		".eslintrc":      []string{"~/.eslintrc"},
		".eslintrc.json": []string{"~/.eslintrc.json"},
		".eslintrc.yml":  []string{"~/.eslintrc.yml"},
		".gvimrc":        []string{"~/.gvimrc"},
		".npmrc":         []string{"~/.npmrc"},
		".profile":       []string{"~/.profile"},
		".pryrc":         []string{"~/.pryrc"},
		".pylintrc":      []string{"~/.pylintrc"},
		".tmux.conf":     []string{"~/.tmux.conf"},
		".vim":           []string{"~/.vim"},
		".vimrc":         []string{"~/.vimrc"},
		".zlogin":        []string{"~/.zlogin"},
		".zprofile":      []string{"~/.zprofile"},
		".zshenv":        []string{"~/.zshenv"},
		".zshrc":         []string{"~/.zshrc"},
		"agignore":       []string{"~/.agignore"},
		"bash_login":     []string{"~/.bash_login"},
		"bash_profile":   []string{"~/.bash_profile"},
		"bashrc":         []string{"~/.bashrc"},
		"emacs.d":        []string{"~/.emacs.d"},
		"emacs.el":       []string{"~/.emacs.d/init.el"},
		"eslintrc":       []string{"~/.eslintrc"},
		"eslintrc.json":  []string{"~/.eslintrc.json"},
		"eslintrc.yml":   []string{"~/.eslintrc.yml"},
		"gvimrc":         []string{"~/.gvimrc"},
		"npmrc":          []string{"~/.npmrc"},
		"profile":        []string{"~/.profile"},
		"pryrc":          []string{"~/.pryrc"},
		"pylintrc":       []string{"~/.pylintrc"},
		"tmux.conf":      []string{"~/.tmux.conf"},
		"vim":            []string{"~/.vim"},
		"vimrc":          []string{"~/.vimrc"},
		"zlogin":         []string{"~/.zlogin"},
		"zprofile":       []string{"~/.zprofile"},
		"zshenv":         []string{"~/.zshenv"},
		"zshrc":          []string{"~/.zshrc"},
		"init.el":        []string{"~/.emacs.d/init.el"},
		"peco":           []string{"~/.config/peco"},
	},
	"linux": MappingsJSON{
		".Xmodmap":    []string{"~/.Xmodmap"},
		".Xresources": []string{"~/.Xresources"},
		"Xmodmap":     []string{"~/.Xmodmap"},
		"Xresources":  []string{"~/.Xresources"},
		"rc.lua":      []string{"~/.config/rc.lua"},
	},
	"darwin": MappingsJSON{
		".htoprc": []string{"~/.htoprc"},
		"htoprc":  []string{"~/.htoprc"},
	},
}

Functions

func Clean

func Clean(repoInput string) error

func Clone

func Clone(spec, specified string, https bool) error
func Link(repoInput string, specified []string, dry bool) error

func List

func List(specified string) error

func Update

func Update(repoInput string) error

func Version

func Version() string

Types

type Mappings

type Mappings map[string][]abspath.AbsPath

func GetMappings

func GetMappings(configDir abspath.AbsPath) (Mappings, error)

func GetMappingsForPlatform

func GetMappingsForPlatform(platform string, parent abspath.AbsPath) (Mappings, error)
func (mappings Mappings) ActualLinks(repo abspath.AbsPath) (map[string]string, error)
func (mappings Mappings) CreateAllLinks(dry bool) error
func (mappings Mappings) CreateSomeLinks(specified []string, dry bool) error

func (Mappings) UnlinkAll

func (mappings Mappings) UnlinkAll(repo abspath.AbsPath) error

type MappingsJSON added in v0.2.1

type MappingsJSON map[string][]string

type NothingLinkedError

type NothingLinkedError struct {
	RepoPath string
}

func (NothingLinkedError) Error

func (err NothingLinkedError) Error() string

type Repository

type Repository struct {
	URL             string
	Path            abspath.AbsPath
	IncludesRepoDir bool
}

Repository represents a repository on local filesystem TODO: Enable to specify branch name?

func NewRepository

func NewRepository(spec, specified string, https bool) (*Repository, error)

func (*Repository) Clone

func (repo *Repository) Clone() error

Jump to

Keyboard shortcuts

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