Documentation
¶
Index ¶
- Constants
- Variables
- func LoadConfig(lua *lua.Lua) error
- type ActionConfig
- type Config
- type DefaultUIConfig
- type ExplorerTableConfig
- type ExplorerTableHeaderConfig
- type FrameUI
- type GeneralConfig
- type Icon
- type KeyBindingsConfig
- type MessageConfig
- type ModeConfig
- type ModesConfig
- type NodeTypeConfig
- type NodeTypesConfig
- type SortingConfig
- type StyleConfig
- type UIConfig
Constants ¶
const AppDir = "fm"
AppDir is the name of the directory where the config file is stored.
const ConfigFileName = "config.lua"
ConfigFileName is the name of the config file that gets created.
Variables ¶
var IconsByDir = map[string]*Icon{
"icons": {Glyph: "", Color: "#2b9689"},
".environment": {Glyph: "", Color: "#66bb6a"},
"provider": {Glyph: "", Color: "#ffc23d"},
".git": {Glyph: "", Color: "#fa6f42"},
"githooks": {Glyph: "", Color: "#fa6f42"},
".githooks": {Glyph: "", Color: "#fa6f42"},
"downloads": {Glyph: "", Color: "#4caf50"},
"config": {Glyph: "", Color: "#20adc2"},
"certs": {Glyph: "", Color: "#f9a93c"},
"screenshot": {Glyph: "", Color: "#2b9689"},
"download": {Glyph: "", Color: "#4caf50"},
"includes": {Glyph: "", Color: "#039be5"},
"pics": {Glyph: "", Color: "#2b9689"},
"environment": {Glyph: "", Color: "#66bb6a"},
"node_modules": {Glyph: "", Color: "#cb3837"},
"icon": {Glyph: "", Color: "#2b9689"},
"include": {Glyph: "", Color: "#039be5"},
"secure": {Glyph: "", Color: "#f9a93c"},
"cert": {Glyph: "", Color: "#f9a93c"},
"certificates": {Glyph: "", Color: "#f9a93c"},
"import": {Glyph: "", Color: "#afb42b"},
".submodules": {Glyph: "", Color: "#fa6f42"},
"certificate": {Glyph: "", Color: "#f9a93c"},
"controller": {Glyph: "", Color: "#ffc23d"},
"META-INF": {Glyph: "", Color: "#20adc2"},
"service": {Glyph: "", Color: "#ffc23d"},
"authentication": {Glyph: "", Color: "#f9a93c"},
"img": {Glyph: "", Color: "#2b9689"},
"configs": {Glyph: "", Color: "#20adc2"},
".env": {Glyph: "", Color: "#66bb6a"},
"images": {Glyph: "", Color: "#2b9689"},
"security": {Glyph: "", Color: "#f9a93c"},
"pic": {Glyph: "", Color: "#2b9689"},
"screenshots": {Glyph: "", Color: "#2b9689"},
"services": {Glyph: "", Color: "#ffc23d"},
"picture": {Glyph: "", Color: "#2b9689"},
"imports": {Glyph: "", Color: "#afb42b"},
"uploads": {Glyph: "", Color: "#fa6f42"},
"auth": {Glyph: "", Color: "#f9a93c"},
"providers": {Glyph: "", Color: "#ffc23d"},
"ssl": {Glyph: "", Color: "#f9a93c"},
"ico": {Glyph: "", Color: "#2b9689"},
"env": {Glyph: "", Color: "#66bb6a"},
"settings": {Glyph: "", Color: "#20adc2"},
".settings": {Glyph: "", Color: "#20adc2"},
".github": {Glyph: "", Color: "#546e7a"},
"_includes": {Glyph: "", Color: "#039be5"},
"imported": {Glyph: "", Color: "#afb42b"},
"upload": {Glyph: "", Color: "#fa6f42"},
"configuration": {Glyph: "", Color: "#20adc2"},
"controllers": {Glyph: "", Color: "#ffc23d"},
"image": {Glyph: "", Color: "#2b9689"},
"environments": {Glyph: "", Color: "#66bb6a"},
".config": {Glyph: "", Color: "#20adc2"},
"submodules": {Glyph: "", Color: "#fa6f42"},
"pictures": {Glyph: "", Color: "#2b9689"},
"configurations": {Glyph: "", Color: "#20adc2"},
}
var IconsByExtension = map[string]*Icon{}/* 221 elements not displayed */
var IconsByFilename = map[string]*Icon{
".gitlab-ci.yml": {Glyph: "", Color: "#e24329"},
"r": {Glyph: "", Color: "#358a5b"},
"package.json": {Glyph: "", Color: "#e8274b"},
".gitmodules": {Glyph: "", Color: "#41535b"},
"copying": {Glyph: "", Color: "#cbcb41"},
"brewfile": {Glyph: "", Color: "#701516"},
"cmakelists.txt": {Glyph: "", Color: "#6d8086"},
".zshrc": {Glyph: "", Color: "#89e051"},
".editorconfig": {Glyph: "", Color: "#ffffff"},
".eslintrc": {Glyph: "", Color: "#4b32c3"},
"commit_editmsg": {Glyph: "", Color: "#41535b"},
".vimrc": {Glyph: "", Color: "#019833"},
"rakefile": {Glyph: "", Color: "#701516"},
"gemfile$": {Glyph: "", Color: "#701516"},
"build": {Glyph: "", Color: "#89e051"},
".npmignore": {Glyph: "", Color: "#E8274B"},
".babelrc": {Glyph: "", Color: "#cbcb41"},
"license": {Glyph: "", Color: "#d0bf41"},
"unlicense": {Glyph: "", Color: "#d0bf41"},
"svelte.config.js": {Glyph: "", Color: "#ff3e00"},
"dockerfile": {Glyph: "", Color: "#458ee6"},
"procfile": {Glyph: "", Color: "#a074c4"},
"webpack": {Glyph: "", Color: "#519aba"},
"_gvimrc": {Glyph: "", Color: "#019833"},
"gruntfile": {Glyph: "", Color: "#e37933"},
".gitattributes": {Glyph: "", Color: "#41535b"},
"R": {Glyph: "", Color: "#358a5b"},
"containerfile": {Glyph: "", Color: "#458ee6"},
"mix.lock": {Glyph: "", Color: "#a074c4"},
"makefile": {Glyph: "", Color: "#6d8086"},
"gnumakefile": {Glyph: "", Color: "#6d8086"},
"favicon.ico": {Glyph: "", Color: "#cbcb41"},
"package-lock.json": {Glyph: "", Color: "#7a0d21"},
"vagrantfile$": {Glyph: "", Color: "#1563FF"},
".ds_store": {Glyph: "", Color: "#41535b"},
".npmrc": {Glyph: "", Color: "#E8274B"},
".bash_profile": {Glyph: "", Color: "#89e051"},
"_vimrc": {Glyph: "", Color: "#019833"},
"gulpfile": {Glyph: "", Color: "#cc3e44"},
".gvimrc": {Glyph: "", Color: "#019833"},
".zprofile": {Glyph: "", Color: "#89e051"},
".dockerignore": {Glyph: "", Color: "#458ee6"},
".gitignore": {Glyph: "", Color: "#41535b"},
"docker-compose.yaml": {Glyph: "", Color: "#458ee6"},
".bashrc": {Glyph: "", Color: "#89e051"},
"docker-compose.yml": {Glyph: "", Color: "#458ee6"},
"copying.lesser": {Glyph: "", Color: "#cbcb41"},
".gitconfig": {Glyph: "", Color: "#41535b"},
".env": {Glyph: "", Color: "#faf743"},
"avif": {Glyph: "", Color: "#a074c4"},
".settings.json": {Glyph: "", Color: "#854CC7"},
".zshenv": {Glyph: "", Color: "#89e051"},
"workspace": {Glyph: "", Color: "#89e051"},
"node_modules": {Glyph: "", Color: "#E8274B"},
"rmd": {Glyph: "", Color: "#519aba"},
}
Functions ¶
func LoadConfig ¶
LoadConfig loads the config from config file and default config then merges them.
Types ¶
type ActionConfig ¶
type ActionConfig struct {
Help string `mapper:"help"`
Messages []*MessageConfig `mapper:"messages"`
}
ActionConfig represents the config for the action.
type Config ¶
type Config struct {
General *GeneralConfig `mapper:"general"`
Modes *ModesConfig `mapper:"modes"`
NodeTypes *NodeTypesConfig `mapper:"node_types"`
}
Config represents the config for the application.
var AppConfig *Config
type DefaultUIConfig ¶
type DefaultUIConfig struct {
Prefix string `mapper:"prefix"`
Suffix string `mapper:"suffix"`
FileStyle *StyleConfig `mapper:"file_style"`
DirectoryStyle *StyleConfig `mapper:"directory_style"`
}
DefaultUIConfig represents the config for UI
type ExplorerTableConfig ¶
type ExplorerTableConfig struct {
IndexHeader *ExplorerTableHeaderConfig `mapper:"index_header"`
NameHeader *ExplorerTableHeaderConfig `mapper:"name_header"`
DefaultUI *DefaultUIConfig `mapper:"default_ui"`
FocusUI *UIConfig `mapper:"focus_ui"`
SelectionUI *UIConfig `mapper:"selection_ui"`
FocusSelectionUI *UIConfig `mapper:"focus_selection_ui"`
FirstEntryPrefix string `mapper:"first_entry_prefix"`
EntryPrefix string `mapper:"entry_prefix"`
LastEntryPrefix string `mapper:"last_entry_prefix"`
}
ExplorerTableConfig represents the config for the explorer table.
type ExplorerTableHeaderConfig ¶
type ExplorerTableHeaderConfig struct {
Name string `mapper:"name"`
Percentage int `mapper:"percentage"`
Style *StyleConfig `mapper:"style"`
}
ExplorerTableHeaderConfig represents the config for the explorer table header.
type FrameUI ¶
type FrameUI struct {
SelFrameColor string `mapper:"sel_frame_color"`
FrameColor string `mapper:"frame_color"`
}
FrameUI represents config for frame ui
type GeneralConfig ¶
type GeneralConfig struct {
FrameUI *FrameUI `mapper:"frame_ui"`
LogInfoUI *UIConfig `mapper:"log_info_ui"`
LogWarningUI *UIConfig `mapper:"log_warning_ui"`
LogErrorUI *UIConfig `mapper:"log_error_ui"`
ExplorerTable *ExplorerTableConfig `mapper:"explorer_table"`
Sorting *SortingConfig `mapper:"sorting"`
ShowHidden bool `mapper:"show_hidden"`
}
GeneralConfig represents the general config for the application.
type KeyBindingsConfig ¶
type KeyBindingsConfig struct {
OnKeys map[string]*ActionConfig `mapper:"on_keys"`
OnNumber *ActionConfig `mapper:"on_number"`
Default *ActionConfig `mapper:"default"`
}
KeyBindingsConfig represents the config for the key bindings.
type MessageConfig ¶
MessageConfig represents the config for the message.
type ModeConfig ¶
type ModeConfig struct {
Name string `mapper:"name"`
KeyBindings KeyBindingsConfig `mapper:"key_bindings"`
}
ModeConfig represents the config for the mode.
type ModesConfig ¶
type ModesConfig struct {
Customs map[string]*ModeConfig `mapper:"customs"`
Builtins map[string]*ModeConfig `mapper:"builtins"`
}
ModesConfig represents the config for the custom and builtin modes.
type NodeTypeConfig ¶
type NodeTypeConfig struct {
Icon string `mapper:"icon"`
Style *StyleConfig `mapper:"style"`
}
NodeTypeConfig represents the config for the node type (file/directory).
type NodeTypesConfig ¶
type NodeTypesConfig struct {
File *NodeTypeConfig `mapper:"file"`
Directory *NodeTypeConfig `mapper:"directory"`
FileSymlink *NodeTypeConfig `mapper:"file_symlink"`
DirectorySymlink *NodeTypeConfig `mapper:"directory_symlink"`
Extensions map[string]*NodeTypeConfig `mapper:"extensions"`
Specials map[string]*NodeTypeConfig `mapper:"specials"`
}
NodeTypesConfig represents the config for node types
type SortingConfig ¶
type SortingConfig struct {
SortType string `mapper:"sort_type"`
Reverse *bool `mapper:"reverse"`
IgnoreCase *bool `mapper:"ignore_case"`
IgnoreDiacritics *bool `mapper:"ignore_diacritics"`
}
SortingConfig represents the config for sorting
type StyleConfig ¶
type StyleConfig struct {
Fg string `mapper:"fg"`
Bg string `mapper:"bg"`
Decorations []string `mapper:"decorations"`
}
StyleConfig represents the config for style
type UIConfig ¶
type UIConfig struct {
Prefix string `mapper:"prefix"`
Suffix string `mapper:"suffix"`
Style *StyleConfig `mapper:"style"`
}