desktop

package
v0.26.2 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package desktop provides desktop environment integration for Linux (XDG).

Index

Constants

View Source
const RestoreSessionEnvVar = "DUMBER_RESTORE_SESSION"

RestoreSessionEnvVar is the environment variable used to pass session ID for restoration.

Variables

This section is empty.

Functions

func New

New creates a new desktop integration adapter.

Types

type Adapter

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

Adapter implements port.DesktopIntegration using XDG tools.

func (*Adapter) GetStatus

func (a *Adapter) GetStatus(ctx context.Context) (*port.DesktopIntegrationStatus, error)

GetStatus checks the current desktop integration state.

func (*Adapter) InstallDesktopFile

func (a *Adapter) InstallDesktopFile(ctx context.Context) (string, error)

InstallDesktopFile writes the desktop file to XDG applications directory.

func (*Adapter) InstallIcon

func (a *Adapter) InstallIcon(ctx context.Context, svgData []byte) (string, error)

InstallIcon writes the icon file to XDG icons directory.

func (*Adapter) RemoveDesktopFile

func (a *Adapter) RemoveDesktopFile(ctx context.Context) error

RemoveDesktopFile removes the desktop file from XDG applications directory.

func (*Adapter) RemoveIcon

func (a *Adapter) RemoveIcon(ctx context.Context) error

RemoveIcon removes the icon file from XDG icons directory.

func (*Adapter) SetAsDefaultBrowser

func (a *Adapter) SetAsDefaultBrowser(ctx context.Context) error

SetAsDefaultBrowser sets dumber as the default web browser.

func (*Adapter) UnsetAsDefaultBrowser

func (a *Adapter) UnsetAsDefaultBrowser(ctx context.Context) error

UnsetAsDefaultBrowser resets default browser if dumber is currently default.

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.

Jump to

Keyboard shortcuts

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