colors

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package colors derives a color scheme from the wallpaper video with pywal, so terminals and bars match what is playing on the desktop.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pywal

type Pywal struct {
	Runner shell.Runner
	// TempDir is where the frame's directory is created; "" means os.TempDir().
	TempDir string
	// Pick chooses the frame's timestamp in [0, limit). nil picks uniformly at
	// random; tests set it to get a deterministic frame.
	Pick func(limit time.Duration) time.Duration
}

Pywal feeds a random frame of a video to pywal. The frame is only needed while wal reads it, so it lives in a private temporary directory that is always removed.

func New

func New(r shell.Runner) *Pywal

New returns a Pywal that runs ffprobe, ffmpeg and wal through r.

func (*Pywal) Apply

func (p *Pywal) Apply(v wallpaper.Video) (err error)

Apply sets pywal's color scheme from a random frame of v, leaving the wallpaper itself to lazywal.

func (*Pywal) Check

func (p *Pywal) Check() error

Check reports every missing program at once, so one install fixes them all.

Jump to

Keyboard shortcuts

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