tg

package
v0.0.0-...-11bff1d Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultPath = "telegram-desktop"

DefaultPath is the default path/name of Telegram Desktop executable

Variables

This section is empty.

Functions

func GetFlatpakDataHome

func GetFlatpakDataHome() (string, error)

GetFlatpakHome returns XDG_DATA_HOME of Telegram Desktop Flatpak app or error

func GetSnapDataHome

func GetSnapDataHome() (string, error)

GetSnapDataHome returns XDG_DATA_HOME of Telegram Desktop snap or error

Types

type TelegramDesktop

type TelegramDesktop struct {
	Path     string
	FullPath string
	RealPath string
	Args     []string
}

TelegramDesktop represents Telegram Desktop executable

func Executable

func Executable(path string, args []string) (*TelegramDesktop, error)

Executable returns TelegramDesktop struct or error if executable not found

func Flatpak

func Flatpak() (*TelegramDesktop, error)

Flatpak returns TelegramDesktop struct representing Telegram Desktop Flatpak app or error if Flatpak or app is not installed

func (*TelegramDesktop) IsSnap

func (tg *TelegramDesktop) IsSnap() bool

IsSnap returns true if executable seems installed with snap

func (*TelegramDesktop) Run

func (tg *TelegramDesktop) Run(profilePath string, extraArgs []string, wait bool) error

Run executes telegram-desktop executable

Jump to

Keyboard shortcuts

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