internal

package
v0.3.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SupportedResolutions = []string{"1024x768", "1600x900", "1920x1080", "3840x2160"}
)

Functions

func CheckFileExists

func CheckFileExists(filePath string) bool

func ClearTemp added in v0.2.0

func ClearTemp()

ClearTemp deletes all the wallpapers present in ~/.iris/temp.

func GetIrisDir added in v0.2.0

func GetIrisDir() string

GetIrisDir returns the iris home directory, namely `~/.iris`. Also creates the directory if it doesn't exists, and the necessary subfolders wallpapers, temp and cache.

func SetVideoWallpaper added in v0.3.0

func SetVideoWallpaper(videoPath string) error

SetVideoWallpaper sets a video as wallpaper by breaking the video into frames and then changes the wallpaper every few milliseconds to imitate that wallpaper is a video.

func SetWallpaper added in v0.3.0

func SetWallpaper(filename string) error

SetWallpaper sets the wallpaper to the given file.

func StringInSlice

func StringInSlice(s string, slice []string) bool

Types

type Configuration

type Configuration struct {
	SearchTerms             []string `json:"search_terms"`              // wallpaper search terms for unsplash
	Resolution              string   `json:"resolution"`                // wallpaper resolution, defaults to 1600x900
	ChangeWallpaper         bool     `json:"change_wallpaper"`          // whether change wallpaper after a duration
	ChangeWallpaperDuration string   `json:"change_wallpaper_duration"` // if wallpaper has to be changed, then after how many minutes
	WallpaperDirectory      string   `json:"wallpaper_directory"`       // use wallpapers from a user specified directory instead of unsplash
	SelectionType           string   `json:"selection_type"`            // directory wallpaper selection type, either sorted or random
	SaveWallpaper           bool     `json:"save_wallpaper"`            // whether to save the used wallpapers or not
	SaveWallpaperDirectory  string   `json:"save_wallpaper_directory"`  // directory to save the used wallpapers
}

func ReadConfig

func ReadConfig() *Configuration

func (*Configuration) DirectoryWallpaper

func (c *Configuration) DirectoryWallpaper()

func (*Configuration) Show added in v0.2.0

func (c *Configuration) Show()

func (*Configuration) UnsplashWallpaper

func (c *Configuration) UnsplashWallpaper()

UnsplashWallpaper changes the wallpaper using unsplash.

func (*Configuration) WriteConfig added in v0.2.0

func (c *Configuration) WriteConfig()

Jump to

Keyboard shortcuts

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