app

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Overview

Package app is the Wails bind target that wires together all business packages.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSpecifiedThemeFileNotFound = errors.New("specified Omarchy theme config file was not found")
	ErrDefaultThemeFilesNotFound  = errors.New("no config file was found in the default Omarchy 3 and 4 locations")
)

Functions

This section is empty.

Types

type App

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

App is the Wails bind target. It owns startup/shutdown and delegates to business packages.

func NewApp

func NewApp(log *slog.Logger, cfg Config) *App

NewApp creates an App with the provided configuration.

func (*App) CopyItem

func (a *App) CopyItem(id string) error

CopyItem writes the entry with the given ID back to the system clipboard and triggers the copy hook.

func (*App) CopyRemoteImage

func (a *App) CopyRemoteImage(imageDataBase64 string, mimeType string) error

CopyRemoteImage writes base64-encoded image data from a remote peer to the system clipboard and triggers the copy hook.

func (*App) CopyRemoteItem

func (a *App) CopyRemoteItem(content string) error

CopyRemoteItem writes the given text directly to the system clipboard and triggers the copy hook.

func (*App) GetConfigPath

func (a *App) GetConfigPath() string

GetConfigPath returns the path to the configuration file.

func (*App) GetHistory

func (a *App) GetHistory() []clipboard.ClipboardEntry

GetHistory returns all clipboard entries in reverse-chronological order.

func (*App) GetMaxPinned added in v0.6.0

func (a *App) GetMaxPinned() int

GetMaxPinned returns the maximum number of clipboard items that can be pinned.

func (*App) GetRemoteClipboards

func (a *App) GetRemoteClipboards() []peersclipsync.PeerClipboard

GetRemoteClipboards returns clipboard entries from all discovered peers.

func (*App) GetTheme

func (a *App) GetTheme() theme.ThemeColors

GetTheme returns the currently loaded theme colors.

func (*App) NeedsPassphrase

func (a *App) NeedsPassphrase() bool

NeedsPassphrase reports whether a passphrase has not yet been configured.

func (*App) RemoteClipboardsEnabled

func (a *App) RemoteClipboardsEnabled() bool

RemoteClipboardsEnabled reports whether remote clipboard sync is enabled.

func (*App) SetPinnedIDs added in v0.6.0

func (a *App) SetPinnedIDs(ids []string)

SetPinnedIDs tells the monitor which entry IDs are currently pinned so they survive history trimming.

func (*App) Shutdown

func (a *App) Shutdown(ctx context.Context)

Shutdown is called by Wails when the application is closing.

func (*App) Startup

func (a *App) Startup(ctx context.Context)

Startup is called by Wails when the application starts.

func (*App) SubmitPassphrase

func (a *App) SubmitPassphrase(p string) error

SubmitPassphrase validates, saves the passphrase provided by the user, and starts networking.

type Config

type Config struct {
	MaxHistory                   int
	MaxPinned                    int
	MaxPngImageMB                int
	MaxNonPngImageMB             int
	ThemeColorPath               string
	ConfigPath                   string
	CopyHook                     string
	PollInterval                 time.Duration
	RemoteClipboardsPollInterval time.Duration
	RemoteClipboardsMaxHistory   int
	PeersPollInterval            time.Duration
	PeersMDNSInterface           string
	DisableRemoteClipboards      bool
	ManualPeersList              []string
	SyncServerPort               int
}

Config holds all configurable values for the application.

Directories

Path Synopsis
Package handlers contains HTTP handlers for the sync server.
Package handlers contains HTTP handlers for the sync server.

Jump to

Keyboard shortcuts

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