wallpaper

package
v0.0.0-prerelease Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WallPapersFolder           = "/Library/Wallpaper/"
	DefaultWallpapersPlistGlob = "DefaultWallpapers~*.plist"
	CollectionsFolder          = "/Library/Wallpaper/Collections/"
	CollectionsPlistGlob       = "Collections~*.plist"
	CapPlayWallpapers          = "/System/Library/PrivateFrameworks/CarPlayUIServices.framework/"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Assets

type Assets struct {
	LockAndHome LockAndHome `plist:"lockAndHome"`
}

type Collection

type Collection struct {
	Meta       WallpaperCollectionPlist
	Wallpapers []Wallpaper
}

type DefaultAsset

type DefaultAsset struct {
	BackgroundAnimationFileName  string `plist:"backgroundAnimationFileName"`
	FloatingAnimationFileNameKey string `plist:"floatingAnimationFileNameKey"`
	Identifier                   int    `plist:"identifier"`
	Name                         string `plist:"name"`
	Type                         string `plist:"type"`
}

type DefaultWallpaper

type DefaultWallpaper struct {
	Default WallpaperID `plist:"default,omitempty"`
}

type LockAndHome

type LockAndHome struct {
	Default DefaultAsset `plist:"default"`
}

type ProminentColors

type ProminentColors struct {
	Dark    string `plist:"dark,omitempty"`
	Default string `plist:"default,omitempty"`
}

type Size

type Size struct {
	Width  int
	Height int
	Scale  int
}

type Wallpaper

type Wallpaper struct {
	Path string
	Meta WallpaperPlist
}

func (Wallpaper) GetSize

func (w Wallpaper) GetSize() (*Size, error)

type WallpaperCollectionPlist

type WallpaperCollectionPlist struct {
	ID              string `plist:"identifier,omitempty"`
	Name            string `plist:"name,omitempty"`
	Order           []int  `plist:"order,omitempty"`
	Source          string `plist:"source,omitempty"`
	IsLegacyContent bool   `plist:"isLegacyContent,omitempty"`
}

type WallpaperCollections

type WallpaperCollections struct {
	Order []string `plist:"order,omitempty"`
}

type WallpaperID

type WallpaperID struct {
	CollectionIdentifier string `plist:"collectionIdentifier,omitempty"`
	WallpaperIdentifier  uint64 `plist:"wallpaperIdentifier,omitempty"`
}

type WallpaperPlist

type WallpaperPlist struct {
	AppearanceAware         bool            `plist:"appearanceAware,omitempty"`
	Assets                  map[string]any  `plist:"assets,omitempty"`
	ContentVersion          float64         `plist:"contentVersion,omitempty"`
	Family                  string          `plist:"family,omitempty"`
	ID                      any             `plist:"identifier,omitempty"`
	LogicalScreenClass      string          `plist:"logicalScreenClass,omitempty"`
	Name                    string          `plist:"name,omitempty"`
	PreferredProminentColor ProminentColors `plist:"preferredProminentColor,omitempty"`
	Version                 any             `plist:"version,omitempty"`
}

type Wallpapers

type Wallpapers struct {
	DefaultWallpaper
	CollectionsOrder WallpaperCollections
	Collections      []Collection
	CarPlays         []string
}

func ParseFolder

func ParseFolder(mountPoint string) (*Wallpapers, error)

Jump to

Keyboard shortcuts

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