-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstructs.go
More file actions
46 lines (41 loc) · 1.33 KB
/
structs.go
File metadata and controls
46 lines (41 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package main
import "fmt"
// Browser types
const (
BrowserTypeFirefox = 0
BrowserTypeFirefoxFlatpak = 1
BrowserTypeFirefoxSnap = 2
BrowserTypeLibreWolfFlatpak = 3
BrowserTypeWaterfoxFlatpak = 4
BrowserTypeFloorpFlatpak = 5
BrowserTypeChromium = 6
BrowserTypeEpiphany = 7
BrowserTypeFalkon = 8
BrowserTypeZenFlatpak = 9
)
type Browser struct {
Type int `json:"type"`
Name string `json:"name"`
ExecPath string `json:"exec_path"`
TestPath string `json:"test_path"`
}
type WebApp struct {
Name string `json:"name"`
Codename string `json:"codename"`
Icon string `json:"icon"`
URL string `json:"url"`
Category string `json:"category"`
Browser string `json:"browser"` // Name of the browser
Exec string `json:"exec"` // Calculated
IsValid bool `json:"is_valid"`
IsolateProfile bool `json:"isolate_profile"`
Navbar bool `json:"navbar"`
PrivateWindow bool `json:"private_window"`
CustomParameters string `json:"custom_parameters"`
Comment string `json:"comment"`
Path string `json:"path"` // .desktop file path
Description string `json:"description"`
}
func (w WebApp) String() string {
return fmt.Sprintf("%s (%s)", w.Name, w.Browser)
}