shortcuts

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: AGPL-3.0, AGPL-3.0-or-later Imports: 15 Imported by: 0

Documentation

Overview

Package shortcuts provides Steam shortcut management for the Agent. Shortcuts are tracked in memory and persisted to a JSON file, mirroring the approach used by the Decky plugin. This avoids both the non-existent SteamClient.Apps.GetAllShortcuts API and the VDF lazy-write race condition.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

Manager handles Steam shortcut operations locally on the Agent. Shortcuts created/deleted via CEF are tracked in memory and persisted to a JSON file for instant reads without querying Steam.

func NewManager

func NewManager() (*Manager, error)

NewManager creates a new shortcut manager.

func NewManagerWithPaths

func NewManagerWithPaths(paths *steam.Paths, trackingPath string) *Manager

NewManagerWithPaths creates a manager with custom paths (for testing).

func (*Manager) Create

func (m *Manager) Create(userID string, cfg protocol.ShortcutConfig) (uint32, error)

Create adds a new shortcut via CEF API (instant, no Steam restart needed). The userID parameter is kept for signature compatibility but is not used for creation — CEF handles persistence internally.

func (*Manager) CreateWithArtwork

func (m *Manager) CreateWithArtwork(userID string, cfg protocol.ShortcutConfig) (uint32, *artwork.ApplyResult, error)

CreateWithArtwork creates a shortcut and applies artwork if provided.

func (*Manager) Delete

func (m *Manager) Delete(userID string, appID uint32) error

Delete removes a shortcut by AppID via CEF API, and optionally deletes the game folder.

func (*Manager) DeleteWithCleanup

func (m *Manager) DeleteWithCleanup(userID string, appID uint32, deleteGameFolder bool) error

DeleteWithCleanup removes a shortcut via CEF API and optionally its game folder.

func (*Manager) List

func (m *Manager) List(userID string) ([]protocol.ShortcutInfo, error)

List returns all tracked shortcuts for a user. On first call, seeds from the VDF file if no tracking data exists.

Jump to

Keyboard shortcuts

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