launcher

package
v0.36.1 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BravePathLinux = ".config/brave-browser/Local State"
View Source
var BravePathMac = "Library/Application Support/BraveSoftware/Brave-Browser/Local State"
View Source
var BravePathWindows = `AppData\Local\BraveSoftware\Brave-Browser\Local State`
View Source
var ChromePathLinux = ".config/google-chrome/Local State"
View Source
var ChromePathMac = "Library/Application Support/Google/Chrome/Local State"
View Source
var ChromePathWindows = `AppData\Local\Google\Chrome\User Data/Local State`
View Source
var ChromiumPathLinux = ".config/chromium/Local State"
View Source
var ChromiumPathMac = "Library/Application Support/Chromium/Local State"
View Source
var ChromiumPathWindows = `AppData\Local\Chromium\User Data/Local State`
View Source
var EdgePathLinux = ".config/microsoft-edge/Local State"
View Source
var EdgePathMac = `Library/Application Support/Microsoft\ Edge/Local State`
View Source
var EdgePathWindows = `AppData\Local\Microsoft Edge\User Data/Local State`
View Source
var ErrLaunchTemplateNotConfigured = errors.New("launch template is not configured")

Functions

This section is empty.

Types

type Arc added in v0.16.0

type Arc struct {
}

func (Arc) LaunchCommand added in v0.16.0

func (l Arc) LaunchCommand(url string, profile string) ([]string, error)

func (Arc) UseForkProcess added in v0.16.0

func (l Arc) UseForkProcess() bool

type ChromeProfile

type ChromeProfile struct {
	// ExecutablePath is the path to the Chrome binary on the system.
	ExecutablePath string

	BrowserType string
}

func (ChromeProfile) LaunchCommand

func (l ChromeProfile) LaunchCommand(url string, profile string) ([]string, error)

func (ChromeProfile) UseForkProcess added in v0.9.0

func (l ChromeProfile) UseForkProcess() bool

type Custom added in v0.33.0

type Custom struct {
	// Command to execute. The command is a series of arguments which may include templated variables.
	// For example: '/usr/bin/firefox --new-tab --profile={{.Profile}} --url={{.URL}}'
	Command     string
	ForkProcess bool

	// TemplateArgs are additional custom arguments which are provided by specifying
	// --browser-template-argument key=value when calling Granted.
	//
	// These arguments are available for use when creating the browser template to launch.
	TemplateArgs map[string]string
}

func CustomFromLaunchTemplate added in v0.33.0

func CustomFromLaunchTemplate(lt *config.BrowserLaunchTemplate, args []string) (Custom, error)

CustomFromLaunchTemplate creates a custom browser launcher from a configuration launch template.

It prevents a panic if the launch template is nil.

func (Custom) LaunchCommand added in v0.33.0

func (l Custom) LaunchCommand(url string, profile string) ([]string, error)

func (Custom) UseForkProcess added in v0.33.0

func (l Custom) UseForkProcess() bool

type Firefox

type Firefox struct {
	// ExecutablePath is the path to the Firefox binary on the system.
	ExecutablePath string
}

func (Firefox) LaunchCommand

func (l Firefox) LaunchCommand(url string, profile string) ([]string, error)

func (Firefox) UseForkProcess added in v0.9.0

func (l Firefox) UseForkProcess() bool

type FirefoxDevEdition added in v0.16.0

type FirefoxDevEdition struct {
	ExecutablePath string
}

func (FirefoxDevEdition) LaunchCommand added in v0.16.0

func (l FirefoxDevEdition) LaunchCommand(url string, profile string) ([]string, error)

func (FirefoxDevEdition) UseForkProcess added in v0.16.0

func (l FirefoxDevEdition) UseForkProcess() bool

type FirefoxNightly added in v0.27.5

type FirefoxNightly struct {
	ExecutablePath string
}

func (FirefoxNightly) LaunchCommand added in v0.27.5

func (l FirefoxNightly) LaunchCommand(url string, profile string) ([]string, error)

func (FirefoxNightly) UseForkProcess added in v0.27.5

func (l FirefoxNightly) UseForkProcess() bool

type Open

type Open struct{}

Open calls the 'open' command to open a URL. This is the same command as when you run 'open https://commonfate.io' in your own terminal.

func (Open) LaunchCommand

func (l Open) LaunchCommand(url string, profile string) ([]string, error)

func (Open) UseForkProcess added in v0.9.0

func (l Open) UseForkProcess() bool

type Safari added in v0.9.0

type Safari struct{}

Open calls the 'open' command to open a URL. This is the same command as when you run 'open -a Safari https://commonfate.io' in your own terminal.

func (Safari) LaunchCommand added in v0.9.0

func (l Safari) LaunchCommand(url string, profile string) ([]string, error)

func (Safari) UseForkProcess added in v0.9.0

func (l Safari) UseForkProcess() bool

type TemplateData added in v0.33.0

type TemplateData struct {
	Profile string
	URL     string
	Args    map[string]string
}

Jump to

Keyboard shortcuts

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