steam

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddToShortcuts added in v0.0.2

func AddToShortcuts(shortcut *Shortcut) error

Add non steam game to the steam shortcuts library

func GenerateAppID

func GenerateAppID(exe string, appName string) uint

Generate appId - Used for big picture grids

func GenerateShortcutID

func GenerateShortcutID(exe string, appName string) uint

Generate shortcutId - Used as appId in shortcuts.vdf

func GetUserPath

func GetUserPath(path string) (string, error)

Retrieve the full user data path with given additonal path

func Use

func Use(config *Config) (func() error, error)

Use given runtime config

Types

type Config

type Config struct {
	ArtworksPath  string      `json:"artworksPath"`
	DebugFile     string      `json:"debugFile"`
	ShortcutsFile string      `json:"shortcutsFile"`
	Shortcuts     []*Shortcut `json:"shortcuts"`
}

func (*Config) AddShortcut

func (c *Config) AddShortcut(shortcut *Shortcut) error

Add shortcut to config

func (*Config) LoadShortcuts

func (c *Config) LoadShortcuts() error

func (*Config) SaveDebug

func (c *Config) SaveDebug() error

Save updated content on the debug file

func (*Config) SaveShortcuts added in v0.0.2

func (c *Config) SaveShortcuts() error

Save updated content on the shortcuts file

func (*Config) SortShortcuts added in v0.0.2

func (c *Config) SortShortcuts() error

Sort shortcuts in alphabetical order

type Shortcut

type Shortcut struct {
	AppID               uint     `json:"appId" vdf:"appid"`
	AppName             string   `json:"appName" vdf:"AppName"`
	Exe                 string   `json:"exe" vdf:"Exe"`
	StartDir            string   `json:"startDir" vdf:"StartDir"`
	Icon                string   `json:"icon" vdf:"icon"`
	ShortcutPath        string   `json:"shortcutPath" vdf:"ShortcutPath"`
	LaunchOptions       string   `json:"launchOptions" vdf:"LaunchOptions"`
	IsHidden            uint     `json:"isHidden" vdf:"IsHidden"`
	AllowDesktopConfig  uint     `json:"allowDesktopConfig" vdf:"AllowDesktopConfig"`
	AllowOverlay        uint     `json:"allowOverlay" vdf:"AllowOverlay"`
	OpenVR              uint     `json:"openVr" vdf:"OpenVR"`
	Devkit              uint     `json:"devkit" vdf:"Devkit"`
	DevkitGameID        string   `json:"devkitGameId" vdf:"DevkitGameID"`
	DevkitOverrideAppID uint     `json:"devkitOverrideAppId" vdf:"DevkitOverrideAppID"`
	FlatpakAppID        string   `json:"flatpakAppId" vdf:"FlatpakAppID"`
	LastPlayTime        uint     `json:"lastPlayTime" vdf:"LastPlayTime"`
	Tags                []string `json:"tags" vdf:"tags"`
	IconURL             string   `json:"iconUrl" vdf:"IconUrl"`
	LogoURL             string   `json:"logoUrl" vdf:"LogoUrl"`
	CoverURL            string   `json:"coverUrl" vdf:"CoverUrl"`
	BannerURL           string   `json:"bannerUrl" vdf:"BannerUrl"`
	HeroURL             string   `json:"heroUrl" vdf:"HeroUrl"`
}

Shortcut struct

Jump to

Keyboard shortcuts

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