freedesktop

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BrowserIconLoader

type BrowserIconLoader interface {
	LoadIcon(browser linkquisition.Browser) ([]byte, error)
}

type BrowserService

type BrowserService struct {
	XdgService          *XdgService
	DesktopEntryService *DesktopEntryService
	BrowserIconLoader   BrowserIconLoader
}

func (*BrowserService) AreWeTheDefaultBrowser

func (b *BrowserService) AreWeTheDefaultBrowser() bool

func (*BrowserService) GetAvailableBrowsers

func (b *BrowserService) GetAvailableBrowsers() ([]linkquisition.Browser, error)

func (*BrowserService) GetDefaultBrowser

func (b *BrowserService) GetDefaultBrowser() (linkquisition.Browser, error)

func (*BrowserService) GetIconForBrowser

func (b *BrowserService) GetIconForBrowser(browser linkquisition.Browser) ([]byte, error)

GetIconForBrowser returns the icon for the given browser

func (*BrowserService) MakeUsTheDefaultBrowser

func (b *BrowserService) MakeUsTheDefaultBrowser() error

func (*BrowserService) NewBrowser

func (b *BrowserService) NewBrowser(command string) (linkquisition.Browser, error)

func (*BrowserService) OpenUrlWithBrowser

func (b *BrowserService) OpenUrlWithBrowser(u string, browser *linkquisition.Browser) error

func (*BrowserService) OpenUrlWithDefaultBrowser

func (b *BrowserService) OpenUrlWithDefaultBrowser(url string) error

func (*BrowserService) SetDefaultBrowser

func (b *BrowserService) SetDefaultBrowser(browser linkquisition.Browser) error

type DefaultBrowserIconLoader

type DefaultBrowserIconLoader struct {
	XdgService          *XdgService
	DesktopEntryService *DesktopEntryService
}

func (*DefaultBrowserIconLoader) LoadIcon

func (l *DefaultBrowserIconLoader) LoadIcon(browser linkquisition.Browser) ([]byte, error)

type DesktopEntry

type DesktopEntry struct {
	Version        string
	Type           string
	Exec           string
	Terminal       bool
	XMultipleArgs  bool
	Icon           string
	StartupWMClass string
	Categories     string
	MimeType       string
	StartupNotify  bool
	Actions        string
	Name           string
}

DesktopEntry represents the "Desktop Entry" -section of a .desktop file.

See https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#desktop-entry-file @todo add support for translations

type DesktopEntryService

type DesktopEntryService struct {
}

func (*DesktopEntryService) CreateFromPath

func (d *DesktopEntryService) CreateFromPath(path string) (*DesktopEntry, error)

type PathProvider

type PathProvider struct{}

func (*PathProvider) GetConfigFolderPath

func (p *PathProvider) GetConfigFolderPath() string

func (*PathProvider) GetLogFolderPath

func (p *PathProvider) GetLogFolderPath() string

func (*PathProvider) GetPluginFolderPath

func (p *PathProvider) GetPluginFolderPath() string

type XdgService

type XdgService struct {
}

func (*XdgService) GetApplicationPaths

func (x *XdgService) GetApplicationPaths() []string

func (*XdgService) GetDesktopEntryPathForBinary

func (x *XdgService) GetDesktopEntryPathForBinary(binary string) (string, error)

func (*XdgService) GetDesktopEntryPathForFilename

func (x *XdgService) GetDesktopEntryPathForFilename(name string) (string, error)

func (*XdgService) SettingsCheck

func (x *XdgService) SettingsCheck(property, subProperty string) (string, error)

func (*XdgService) SettingsGet

func (x *XdgService) SettingsGet(property string) (string, error)

func (*XdgService) SettingsSet

func (x *XdgService) SettingsSet(property, value string) error

Jump to

Keyboard shortcuts

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