Documentation
¶
Overview ¶
Package desktop provides desktop environment integration for Linux (XDG).
Index ¶
- Constants
- func New() port.DesktopIntegration
- type Adapter
- func (a *Adapter) GetStatus(ctx context.Context) (*port.DesktopIntegrationStatus, error)
- func (a *Adapter) InstallDesktopFile(ctx context.Context) (string, error)
- func (a *Adapter) InstallIcon(ctx context.Context, svgData []byte) (string, error)
- func (a *Adapter) RemoveDesktopFile(ctx context.Context) error
- func (a *Adapter) RemoveIcon(ctx context.Context) error
- func (a *Adapter) SetAsDefaultBrowser(ctx context.Context) error
- func (a *Adapter) UnsetAsDefaultBrowser(ctx context.Context) error
- type SessionSpawner
Constants ¶
const RestoreSessionEnvVar = "DUMBER_RESTORE_SESSION"
RestoreSessionEnvVar is the environment variable used to pass session ID for restoration.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
Adapter implements port.DesktopIntegration using XDG tools.
func (*Adapter) InstallDesktopFile ¶
InstallDesktopFile writes the desktop file to XDG applications directory.
func (*Adapter) InstallIcon ¶
InstallIcon writes the icon file to XDG icons directory.
func (*Adapter) RemoveDesktopFile ¶
RemoveDesktopFile removes the desktop file from XDG applications directory.
func (*Adapter) RemoveIcon ¶
RemoveIcon removes the icon file from XDG icons directory.
func (*Adapter) SetAsDefaultBrowser ¶
SetAsDefaultBrowser sets dumber as the default web browser.
type SessionSpawner ¶ added in v0.21.0
type SessionSpawner struct {
// contains filtered or unexported fields
}
SessionSpawner implements port.SessionSpawner by launching a new dumber process.
func NewSessionSpawner ¶ added in v0.21.0
func NewSessionSpawner(ctx context.Context) *SessionSpawner
NewSessionSpawner creates a new session spawner.
func (*SessionSpawner) SpawnWithSession ¶ added in v0.21.0
func (s *SessionSpawner) SpawnWithSession(sessionID entity.SessionID) error
SpawnWithSession starts a new dumber instance to restore a session.