config

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// CacheDir a "cache" directory where all the temporary files reside.
	CacheDir string

	// WithAnyWindowManager if true, muro will try to set wallpaper for
	// current window manager, including Gnome, KDE, etc.
	WithAnyWindowManager bool

	// WithClearCache if true, removes all files from cache.
	WithClearCache bool

	// WithLastImage if true, path is set to the last image from cache.
	WithLastImage bool

	// ImgPath a directory with wallpaper images or a path to a single image.
	ImgPath string

	// TileImgPath is a path to an image that can be used for creating a tiling
	// background.
	TileImgPath string

	// Background surrounding an image.
	ent.Background

	// BgRGBA contains the value of a color if Background is set to color.
	BgRGBA *color.RGBA

	// Fit describes how to fit an image on the desktop.
	ent.Fit

	// ImageOrder defines sorting of the images.
	ent.ImgOrder

	// Recursive is true if images are searched recursively in ImgPath.
	Recursive bool
}

func New

func New(opts ...Option) Config

type Option

type Option func(*Config)

func OptBackground

func OptBackground(s string) Option

func OptBgRGBA

func OptBgRGBA(s string) Option

func OptCacheDir

func OptCacheDir(s string) Option

func OptFit

func OptFit(s string) Option

func OptImgOrder

func OptImgOrder(s string) Option

func OptImgPath

func OptImgPath(s string) Option

func OptRecursive

func OptRecursive(b bool) Option

func OptTileImgPath added in v0.1.0

func OptTileImgPath(s string) Option

func OptWithAnyWindowManager

func OptWithAnyWindowManager(b bool) Option

func OptWithClearCache

func OptWithClearCache(b bool) Option

func OptWithLastImage

func OptWithLastImage(b bool) Option

Jump to

Keyboard shortcuts

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