wpscheduler

package
v0.0.0-...-0310982 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TimeInterval = 60
	Wallpaper    = "/System/Library/Desktop Pictures/Monterey Graphic.heic"
)

Functions

func GetConfigRelativePath

func GetConfigRelativePath() string

GetConfigRelativePath works when app is built, gets the config relative path

func GetTimeInterval

func GetTimeInterval() int

GetTimeInterval returns the time interval

func GetWallpaper

func GetWallpaper() (string, error)

GetWallpaper Get returns the path to the current wallpaper.

func GetWallpaperPath

func GetWallpaperPath() string

GetWallpaperPath returns the wallpaper path

func SetFromFile

func SetFromFile(file string) error

SetFromFile uses AppleScript to tell Finder to set the desktop wallpaper to specified file.

func SetWallpaper

func SetWallpaper(wallpaper string) (bool, error)

SetWallpaper Check if the wallpaper is changed. If so, update it to the default one

Types

type WallpaperScheduler

type WallpaperScheduler struct {
	// contains filtered or unexported fields
}

WallpaperScheduler is the main struct for the app

func GetInstance

func GetInstance() *WallpaperScheduler

GetInstance gets the singleton instance for wallpaper scheduler app

func (*WallpaperScheduler) Quit

func (wp *WallpaperScheduler) Quit()

Quit the main app

func (*WallpaperScheduler) Start

func (wp *WallpaperScheduler) Start()

Start the main app

Jump to

Keyboard shortcuts

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