config

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	XdgConfigHome     = "XDG_CONFIG_HOME"
	XdgDataHome       = "XDG_DATA_HOME"
	XdgSessionDesktop = "XDG_SESSION_DESKTOP"
	XdgCurrentDesktop = "XDG_CURRENT_DESKTOP"
)

Variables

This section is empty.

Functions

func EnvOrDefault

func EnvOrDefault(key, def string) string

func GetConfigHome

func GetConfigHome() string

func GetDataHome

func GetDataHome() string

func GetStateFilePath

func GetStateFilePath() string

func GetWallpaperPath

func GetWallpaperPath(ext string) (string, error)

func Home

func Home(location string) string

func WriteStateFile

func WriteStateFile(state *State) error

Types

type State

type State struct {
	SetAt         time.Time `json:"set_at"`
	SearchTerm    string    `json:"search_term"`
	WallpaperPath string    `json:"wallpaper_path" json:"wallpaperPath,omitempty"`
	Post          *api.Post `json:"post" json:"post,omitempty"`
}

func LoadStateFile

func LoadStateFile() (*State, error)

Jump to

Keyboard shortcuts

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