uistate

package
v0.0.0-...-b43479a Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package uistate persists Eta's small, versioned desktop intent state.

Index

Constants

View Source
const Version = 1

Variables

This section is empty.

Functions

func DefaultPath

func DefaultPath() (string, error)

Types

type Shortcut

type Shortcut struct {
	Name string `json:"name"`
	Kind string `json:"kind"`
	Root int    `json:"root,omitempty"`
	Path string `json:"path,omitempty"`
	Peer string `json:"peer,omitempty"`
}

Shortcut is a location pinned to the desktop. It is intent, not a cached listing: the target is resolved when it is opened, so a shortcut to something since deleted simply fails to open.

type State

type State struct {
	Version   int        `json:"version"`
	Windows   []Window   `json:"windows,omitempty"`
	Shortcuts []Shortcut `json:"shortcuts,omitempty"`
}

type Store

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

func New

func New(path string) *Store

func (*Store) Load

func (s *Store) Load() (State, error)

func (*Store) Save

func (s *Store) Save(state State) error

type Window

type Window struct {
	Kind      string `json:"kind"`
	Root      int    `json:"root,omitempty"`
	Path      string `json:"path,omitempty"`
	Peer      string `json:"peer,omitempty"`
	X         int    `json:"x,omitempty"`
	Y         int    `json:"y,omitempty"`
	Width     int    `json:"width,omitempty"`
	Height    int    `json:"height,omitempty"`
	Minimized bool   `json:"minimized,omitempty"`
	Maximized bool   `json:"maximized,omitempty"`
}

Jump to

Keyboard shortcuts

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