param

package
v0.0.0-...-1afcac7 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Spotlight = "Spotlight"
	Launchpad = "Launchpad"
	Alfred    = "Alfred"

	Default = "Default"
	ITerm   = "iTerm"
	Warp    = "Warp"

	PC   = "PC"
	Mac  = "Mac"
	None = "None"

	Spotify           = "Spotify"
	Finder            = "Finder"
	SystemPreferences = "System Preferences"
	AltTab            = "AltTab"
)

Variables

View Source
var AppToBundleMapping = map[string]string{
	strings.ToLower(Spotify):           "com.spotify.client",
	strings.ToLower(Finder):            "com.apple.finder",
	strings.ToLower(SystemPreferences): "com.apple.systempreferences",
	strings.ToLower(ITerm):             "com.googlecode.iterm2",
	strings.ToLower(AltTab):            "com.lwouis.alt-tab-macos",
}
View Source
var IDEKeymaps = []IDE{IntelliJ(), IntelliJCE(), PyCharm(), GoLand(), Fleet()}
View Source
var SystemSettings = []string{
	"Enable Dock auto-hide (2s delay)",
	`Change Dock minimize animation to "scale"`,
	"Enable Home and End keys",
	"Show hidden files in Finder",
	"Show directories on top in Finder",
	"Show full POSIX paths in Finder window title",
}

Functions

func IdeKeymapOptions

func IdeKeymapOptions() []string

func ToSimpleParamName

func ToSimpleParamName(name string) string

func ValidateAll

func ValidateAll(params ...func() error) error

func ValidateParamValues

func ValidateParamValues(param string, values *[]string, validValues []string) error

Types

type FileParams

type FileParams struct {
	AppLauncher    *string `yaml:"app-launcher"`
	Terminal       *string
	KeyboardLayout *string `yaml:"keyboard-layout"`
	Keymaps        *[]string
	SystemSettings *[]string `yaml:"system-settings"`
	Blacklist      *[]string
	Extra          map[string]string `yaml:",inline"`
}

func CollectYamlParams

func CollectYamlParams(yml string) (FileParams, error)

type IDE

type IDE struct {
	ParentDir       string // relative to homedir
	Dir             string // relative to parentDir
	KeymapsDir      string // relative to dir
	FullName        string
	SrcKeymapsFile  string
	DestKeymapsFile string
	MultipleDirs    bool
}

func Fleet

func Fleet() IDE

func GoLand

func GoLand() IDE

func IdeKeymapByFullName

func IdeKeymapByFullName(fullName string) (IDE, error)

func IntelliJ

func IntelliJ() IDE

func IntelliJCE

func IntelliJCE() IDE

func PyCharm

func PyCharm() IDE

type Params

type Params struct {
	AppLauncher    string
	Terminal       string
	KeyboardLayout string
	Keymaps        []string
	SystemSettings []string
	Blacklist      []string
}

func CollectParams

func CollectParams(paramsFile string) (Params, error)

func CollectSurveyParams

func CollectSurveyParams(fileParams FileParams) Params

Jump to

Keyboard shortcuts

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