Documentation
¶
Overview ¶
Package mc provides an output plugin for Midnight Commander (mc) skin themes.
MC skins use INI format with color specifications in the form:
foreground;background;attributes
where colors use xterm-256 color indices (colorN for N=0-255). This plugin uses the xterm256 template function from pkg/colour to convert tinct's hex RGB colors to the nearest xterm-256 index, skipping the first 16 system colors (0-15) for terminal independence.
Index ¶
- func GetEmbeddedTemplates() embed.FS
- type Plugin
- func (p *Plugin) DefaultOutputDir() string
- func (p *Plugin) Description() string
- func (p *Plugin) Generate(themeData *colour.ThemeData) (map[string][]byte, error)
- func (p *Plugin) GetEmbeddedFS() any
- func (p *Plugin) GetFlagHelp() []output.FlagHelp
- func (p *Plugin) Name() string
- func (p *Plugin) PostExecute(_ context.Context, execCtx output.ExecutionContext, _ []string) error
- func (p *Plugin) PreExecute(_ context.Context) (skip bool, reason string, err error)
- func (p *Plugin) RegisterFlags(cmd *cobra.Command)
- func (p *Plugin) SetVerbose(verbose bool)
- func (p *Plugin) Validate() error
- func (p *Plugin) Version() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetEmbeddedTemplates ¶
GetEmbeddedTemplates returns the embedded template filesystem. This is used by the template management commands.
Types ¶
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
Plugin implements the output.Plugin interface for Midnight Commander.
func (*Plugin) DefaultOutputDir ¶
DefaultOutputDir returns the default output directory for this plugin.
func (*Plugin) Description ¶
Description returns the plugin description.
func (*Plugin) GetEmbeddedFS ¶
GetEmbeddedFS returns the embedded template filesystem. Implements the output.TemplateProvider interface.
func (*Plugin) GetFlagHelp ¶
GetFlagHelp returns help information for all plugin flags.
func (*Plugin) PostExecute ¶
PostExecute prints usage instructions after successful skin generation. Implements the output.PostExecuteHook interface.
func (*Plugin) PreExecute ¶
PreExecute checks if mc is available before generating the skin. Implements the output.PreExecuteHook interface.
func (*Plugin) RegisterFlags ¶
RegisterFlags registers plugin-specific flags with the cobra command.
func (*Plugin) SetVerbose ¶
SetVerbose enables or disables verbose logging for the plugin. Implements the output.VerbosePlugin interface.