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 ¶
- type Manager
- func (m *Manager) Create(userID string, cfg protocol.ShortcutConfig) (uint32, error)
- func (m *Manager) CreateWithArtwork(userID string, cfg protocol.ShortcutConfig) (uint32, *artwork.ApplyResult, error)
- func (m *Manager) Delete(userID string, appID uint32) error
- func (m *Manager) DeleteWithCleanup(userID string, appID uint32, deleteGameFolder bool) error
- func (m *Manager) List(userID string) ([]protocol.ShortcutInfo, error)
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 NewManagerWithPaths ¶
NewManagerWithPaths creates a manager with custom paths (for testing).
func (*Manager) Create ¶
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 ¶
Delete removes a shortcut by AppID via CEF API, and optionally deletes the game folder.
func (*Manager) DeleteWithCleanup ¶
DeleteWithCleanup removes a shortcut via CEF API and optionally its game folder.