Documentation
¶
Overview ¶
Package backgroundapps is the sandboxed apps running without a window, as xdg-desktop-portal's background monitor lists them (built from the portal backend's GetAppState answers), and a way to stop one.
Index ¶
Constants ¶
const ( BusName = "org.freedesktop.background.Monitor" Path = dbus.ObjectPath("/org/freedesktop/background/monitor") Interface = "org.freedesktop.background.Monitor" // Property is the monitor's aa{sv} list of background apps. Property = "BackgroundApps" )
D-Bus identity of the frontend's background monitor.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// ID is the app's id, the name of its desktop entry.
ID string
// Instance is the app's Flatpak instance, which Stop kills.
Instance InstanceID
// Message is the status the app set with Background.SetStatus.
Message string
// Name and Icon are the desktop entry's display name and Icon=, or
// the id and "" when no entry matches.
Name, Icon string
}
App is one sandboxed app running in the background.
type Apps ¶
type Apps struct {
// contains filtered or unexported fields
}
Apps follows the background monitor on a session bus: the list is read again on each PropertiesChanged and each time the monitor comes or goes.
func Follow ¶
Follow starts following the background monitor on conn, naming each app with describe.
type InstanceID ¶ added in v0.3.23
type InstanceID struct {
// contains filtered or unexported fields
}
InstanceID is a Flatpak instance id: a decimal number, the name of the instance's directory under $XDG_RUNTIME_DIR/.flatpak, so it can never be a path separator or "..".
func ParseInstanceID ¶ added in v0.3.23
func ParseInstanceID(s string) (InstanceID, error)
ParseInstanceID validates s as an instance id.
func (InstanceID) String ¶ added in v0.3.23
func (i InstanceID) String() string
String is the id as Flatpak writes it.