Documentation
¶
Overview ¶
Package output provides the interface and base types for output plugins.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExecutionContext ¶
type ExecutionContext struct {
DryRun bool // Whether this is a dry-run
Verbose bool // Whether verbose output is enabled
OutputDir string // The output directory being used
WallpaperPath string // Optional path to source wallpaper (from input plugin)
}
ExecutionContext provides context for hook execution.
type Plugin ¶
type Plugin interface {
// Name returns the plugin's name (e.g., "tailwind", "hyprland").
Name() string
// Description returns a human-readable description of the plugin.
Description() string
// Version returns the plugin version (e.g., "1.0.0").
Version() string
// Generate creates output file(s) from the given theme data.
// Returns map of filename -> content to support plugins that generate multiple files.
Generate(themeData *colour.ThemeData) (map[string][]byte, error)
// RegisterFlags registers plugin-specific flags with cobra command.
RegisterFlags(cmd *cobra.Command)
// Validate checks if the plugin configuration is valid.
Validate() error
// DefaultOutputDir returns the default output directory for this plugin.
DefaultOutputDir() string
// GetFlagHelp returns help information for plugin-specific flags.
// This allows dynamic help generation based on selected plugins.
GetFlagHelp() []input.FlagHelp
}
Plugin represents an output plugin that can generate configuration files. from a categorised colour palette.
type PostExecuteHook ¶
type PostExecuteHook interface {
// PostExecute runs after successful Generate() and file writing.
// The execCtx contains execution context including wallpaper path if available.
// The writtenFiles contains the paths that were written.
// Errors are logged but don't fail the overall operation.
PostExecute(ctx context.Context, execCtx ExecutionContext, writtenFiles []string) error
}
PostExecuteHook is an optional interface that plugins can implement to perform. actions after successful file generation.
Common use cases:.
- Reload application configuration
- Send signals to running processes
- Restart services
- Notify users of changes
- Set wallpaper (when --set-wallpaper flag is used)
type PreExecuteHook ¶
type PreExecuteHook interface {
// PreExecute runs before Generate(). Returns:.
// - skip: if true, plugin is skipped (not an error, just bypassed)
// - reason: human-readable explanation for skipping
// - error: actual error that should stop execution
PreExecute(ctx context.Context) (skip bool, reason string, err error)
}
PreExecuteHook is an optional interface that plugins can implement to perform. checks before generation. If the hook returns an error or skip=true, the plugin will be skipped without generating output.
Common use cases:.
- Check if required executables exist on $PATH
- Verify configuration directories exist
- Validate environment prerequisites
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry holds all registered output plugins.
type TemplateProvider ¶
type TemplateProvider interface {
// GetEmbeddedFS returns the embedded filesystem containing template files.
// This should return the same embed.FS used by the plugin's generateTheme method.
GetEmbeddedFS() any
}
TemplateProvider is an optional interface that plugins can implement to expose. their embedded template filesystem for template management commands.
type VerbosePlugin ¶
type VerbosePlugin interface {
// SetVerbose enables or disables verbose logging for the plugin.
SetVerbose(verbose bool)
}
VerbosePlugin is an optional interface that plugins can implement to receive. verbose logging settings from the CLI.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package alacritty provides an output plugin for Alacritty terminal colour themes.
|
Package alacritty provides an output plugin for Alacritty terminal colour themes. |
|
Package common provides shared utilities for output plugins.
|
Package common provides shared utilities for output plugins. |
|
Package dunst provides an output plugin for Dunst notification daemon colour themes.
|
Package dunst provides an output plugin for Dunst notification daemon colour themes. |
|
Package fuzzel provides an output plugin for Fuzzel application launcher colour themes.
|
Package fuzzel provides an output plugin for Fuzzel application launcher colour themes. |
|
Package ghostty provides an output plugin for Ghostty terminal emulator colour themes.
|
Package ghostty provides an output plugin for Ghostty terminal emulator colour themes. |
|
Package hyprland provides an output plugin for Hyprland window manager colour themes.
|
Package hyprland provides an output plugin for Hyprland window manager colour themes. |
|
Package hyprlock provides an output plugin for Hyprlock screen lock colour themes.
|
Package hyprlock provides an output plugin for Hyprlock screen lock colour themes. |
|
Package hyprpaper provides an output plugin for Hyprpaper wallpaper manager configuration.
|
Package hyprpaper provides an output plugin for Hyprpaper wallpaper manager configuration. |
|
Package kitty provides an output plugin for Kitty terminal colour themes.
|
Package kitty provides an output plugin for Kitty terminal colour themes. |
|
Package neovim provides an output plugin for Neovim colour themes.
|
Package neovim provides an output plugin for Neovim colour themes. |
|
Package swayosd provides an output plugin for SwayOSD on-screen display colour themes.
|
Package swayosd provides an output plugin for SwayOSD on-screen display colour themes. |
|
Package template provides utilities for loading plugin templates with custom override support.
|
Package template provides utilities for loading plugin templates with custom override support. |
|
Package testing provides shared test utilities for output plugins.
|
Package testing provides shared test utilities for output plugins. |
|
Package walker provides an output plugin for Walker application launcher colour themes.
|
Package walker provides an output plugin for Walker application launcher colour themes. |
|
Package waybar provides an output plugin for Waybar status bar colour themes.
|
Package waybar provides an output plugin for Waybar status bar colour themes. |
|
Package wofi provides an output plugin for Wofi application launcher colour themes.
|
Package wofi provides an output plugin for Wofi application launcher colour themes. |
|
Package zellij provides an output plugin for Zellij terminal multiplexer colour themes.
|
Package zellij provides an output plugin for Zellij terminal multiplexer colour themes. |