freedesktop

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BrowserIconLoader added in v1.6.0

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 added in v1.6.0

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

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 added in v1.6.0

type DefaultBrowserIconLoader struct {
	XdgService          *XdgService
	DesktopEntryService *DesktopEntryService
}

func (*DefaultBrowserIconLoader) LoadIcon added in v1.6.0

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 SettingsService

type SettingsService struct {
	BrowserService linkquisition.BrowserService
}

func (*SettingsService) GetConfigFilePath

func (s *SettingsService) GetConfigFilePath() string

func (*SettingsService) GetConfigFolderPath

func (s *SettingsService) GetConfigFolderPath() string

func (*SettingsService) GetLogFilePath

func (s *SettingsService) GetLogFilePath() string

func (*SettingsService) GetLogFolderPath

func (s *SettingsService) GetLogFolderPath() string

func (*SettingsService) GetPluginFolderPath

func (s *SettingsService) GetPluginFolderPath() string

func (*SettingsService) GetSettings

func (s *SettingsService) GetSettings() *linkquisition.Settings

func (*SettingsService) IsConfigured

func (s *SettingsService) IsConfigured() (bool, error)

func (*SettingsService) ReadSettings

func (s *SettingsService) ReadSettings() (*linkquisition.Settings, error)

func (*SettingsService) ScanBrowsers

func (s *SettingsService) ScanBrowsers() error

func (*SettingsService) WriteSettings added in v1.4.6

func (s *SettingsService) WriteSettings(settings *linkquisition.Settings) error

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