fuzzel

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2026 License: MIT Imports: 14 Imported by: 0

README

Fuzzel Output Plugin

Generate colour themes for Fuzzel, a lightweight application launcher for Wayland.

Overview

The Fuzzel plugin generates a theme configuration file (tinct.ini) that can be included in your main Fuzzel configuration or used standalone.

Features

  • Single INI file generation
  • RGBA colour format with transparency support
  • Semantic colour mapping (background, foreground, accents, etc.)
  • Include-based configuration support
  • Automatic config directory creation

Generated Files

  • tinct.ini - Complete Fuzzel colour theme

Default Output Location

~/.config/fuzzel/tinct.ini

Configuration

Enable the Plugin

In your ~/.config/tinct/config.toml:

[[output.fuzzel]]
enabled = true
Custom Output Directory
[[output.fuzzel]]
enabled = true
output_dir = "/custom/path"
Command Line Options
# Specify output directory
tinct generate --fuzzel.output-dir ~/.config/fuzzel

# Enable fuzzel only
tinct generate --output fuzzel

Usage

Method 1: Include in Main Config

Create or edit ~/.config/fuzzel/fuzzel.ini:

# Include tinct theme
include=~/.config/fuzzel/tinct.ini

# Your other fuzzel settings
[main]
font=monospace:size=12
lines=15
width=30
Method 2: Standalone Config

Use the generated theme as a complete config:

fuzzel --config ~/.config/fuzzel/tinct.ini
Method 3: Merge Configs

You can have multiple include files:

# Base settings
include=/etc/xdg/fuzzel/fuzzel.ini

# Tinct colours
include=~/.config/fuzzel/tinct.ini

# Personal overrides
[main]
lines=20

Colour Mapping

The plugin maps Tinct's semantic colours to Fuzzel's colour scheme:

Fuzzel Property Tinct Role Description
background Background (93% opacity) Main background colour
text Foreground Unselected entry text
prompt Accent1 Prompt character colour
placeholder ForegroundMuted (80% opacity) Placeholder text
input Foreground Input text colour
match Accent2 Matched substring colour
selection Accent1 Selected entry background
selection-text Background Selected entry text
selection-match Accent2 Selected entry matched substring
counter Info Match counter colour
border Accent1 Window border colour

Colour Format

Fuzzel uses RGBA colours in the format RRGGBBAA (8 hex digits, no # prefix):

  • 1a1b26ee - Background with 93% opacity
  • c0caf5ff - Foreground with 100% opacity
  • 7aa2f7ff - Accent1 with 100% opacity

Example Output

# Fuzzel colour theme generated by Tinct
# https://github.com/jmylchreest/tinct

[colours]
# Background colour (with 93% opacity)
background=1a1b26ee

# Text (foreground) colour of unselected entries
text=c0caf5ff

# Prompt character(s) colour
prompt=7aa2f7ff

# Placeholder text colour
placeholder=a9b1d6cc

# Input text colour
input=c0caf5ff

# Matched substring colour
match=bb9af7ff

# Selected entry background
selection=7aa2f7ff

# Selected entry text
selection-text=1a1b26ff

# Selected entry matched substring
selection-match=bb9af7ff

# Match counter colour
counter=7aa2f7ff

# Border colour
border=7aa2f7ff

Customization

Custom Templates

Extract the default template for customization:

tinct plugins templates dump -o fuzzel -l ~/.config/tinct/templates/fuzzel

This creates ~/.config/tinct/templates/fuzzel/tinct.ini.tmpl which you can modify.

Template Variables

Available in the template:

{{ .SourceTheme }}        // "dark" or "light"
{{ .Background }}         // "#1a1b26"
{{ .BackgroundMuted }}    // "#16161e"
{{ .Foreground }}         // "#c0caf5"
{{ .ForegroundMuted }}    // "#a9b1d6"
{{ .Accent1 }}            // "#7aa2f7"
{{ .Accent2 }}            // "#bb9af7"
{{ .Accent3 }}            // "#7dcfff"
{{ .Accent4 }}            // "#9ece6a"
{{ .Danger }}             // "#f7768e"
{{ .Warning }}            // "#e0af68"
{{ .Success }}            // "#9ece6a"
{{ .Info }}               // "#7aa2f7"
RGBA Helper Methods

Convert colours to RGBA format with custom alpha:

{{ .BackgroundRGBA "ee" }}      // Background with 93% opacity
{{ .ForegroundRGBA "ff" }}      // Foreground with 100% opacity
{{ .Accent1RGBA "80" }}         // Accent1 with 50% opacity

Integration with Desktop Environment

Hyprland

Add to ~/.config/hypr/hyprland.conf:

# Launch fuzzel with keybind
bind = $mainMod, D, exec, fuzzel
Sway

Add to ~/.config/sway/config:

# Launch fuzzel
bindsym $mod+d exec fuzzel

Pre-Execute Check

The plugin performs the following checks before generating:

  1. Verifies fuzzel is installed and on $PATH
  2. Creates config directory if it doesn't exist

If fuzzel is not found, the plugin will be skipped with a message.

Troubleshooting

Colours Not Applied

Ensure the include path is correct:

# Check if file exists
ls -l ~/.config/fuzzel/tinct.ini

# Verify fuzzel can find it
fuzzel --config ~/.config/fuzzel/fuzzel.ini
Fuzzel Not Found

If pre-execute check fails:

# Check if fuzzel is installed
which fuzzel

# Install fuzzel
# Arch: pacman -S fuzzel
# Debian: apt install fuzzel
# Fedora: dnf install fuzzel
Include Not Working

Fuzzel's include directive requires absolute paths or ~/ prefix:

# Correct
include=~/.config/fuzzel/tinct.ini
include=/home/username/.config/fuzzel/tinct.ini

# Incorrect
include=tinct.ini
include=./tinct.ini

Resources

See Also

Documentation

Overview

Package fuzzel provides an output plugin for Fuzzel application launcher colour themes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEmbeddedTemplates

func GetEmbeddedTemplates() embed.FS

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 Fuzzel.

func New

func New() *Plugin

New creates a new Fuzzel output plugin with default settings.

func (*Plugin) DefaultOutputDir

func (p *Plugin) DefaultOutputDir() string

DefaultOutputDir returns the default output directory for this plugin.

func (*Plugin) Description

func (p *Plugin) Description() string

Description returns the plugin description.

func (*Plugin) Generate

func (p *Plugin) Generate(themeData *colour.ThemeData) (map[string][]byte, error)

Generate creates the theme file. Returns map of filename -> content.

func (*Plugin) GetEmbeddedFS

func (p *Plugin) GetEmbeddedFS() any

GetEmbeddedFS returns the embedded template filesystem. Implements the output.TemplateProvider interface.

func (*Plugin) GetFlagHelp

func (p *Plugin) GetFlagHelp() []output.FlagHelp

GetFlagHelp returns help information for all plugin flags.

func (*Plugin) Name

func (p *Plugin) Name() string

Name returns the plugin name.

func (*Plugin) PreExecute

func (p *Plugin) PreExecute(_ context.Context) (skip bool, reason string, err error)

PreExecute checks if fuzzel is available and config directory exists. Implements the output.PreExecuteHook interface.

func (*Plugin) RegisterFlags

func (p *Plugin) RegisterFlags(cmd *cobra.Command)

RegisterFlags registers plugin-specific flags with the cobra command.

func (*Plugin) SetVerbose

func (p *Plugin) SetVerbose(verbose bool)

SetVerbose enables or disables verbose logging for the plugin. Implements the output.VerbosePlugin interface.

func (*Plugin) Validate

func (p *Plugin) Validate() error

Validate checks if the plugin configuration is valid.

func (*Plugin) Version

func (p *Plugin) Version() string

Version returns the plugin version.

Jump to

Keyboard shortcuts

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