-
Notifications
You must be signed in to change notification settings - Fork 0
/
archista.go
73 lines (63 loc) · 1.54 KB
/
archista.go
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
package main
import (
"flag"
"fmt"
barista "barista.run"
"barista.run/pango/icons/mdi"
"github.com/KarolosLykos/archista/bt"
"github.com/KarolosLykos/archista/config"
"github.com/KarolosLykos/archista/cpu"
"github.com/KarolosLykos/archista/date"
"github.com/KarolosLykos/archista/disk"
"github.com/KarolosLykos/archista/docker"
"github.com/KarolosLykos/archista/language"
"github.com/KarolosLykos/archista/lights"
"github.com/KarolosLykos/archista/logo"
medias "github.com/KarolosLykos/archista/media"
"github.com/KarolosLykos/archista/sound"
"github.com/KarolosLykos/archista/updates"
"github.com/KarolosLykos/archista/utils"
)
func main() {
if err := mdi.Load(utils.Home("Downloads/MaterialDesign-Webfont")); err != nil {
panic(err)
}
var path string
flag.StringVar(&path, "config", "", "configuration file path")
flag.Parse()
cfg, err := config.Load(path)
if err != nil {
fmt.Println(err)
return
}
s, err := sound.New()
if err != nil {
panic(err)
}
localDate := date.GetLocalDate()
localTime := date.GetLocalTime()
volume := s.GetVolume()
source := s.GetSource()
temperatureModule := cpu.GetCPUTemp()
mediaModule := medias.New(volume)
logoModule := logo.New()
lightsModule := lights.New(cfg)
updateModule := updates.New()
dockerModule := docker.New()
bluetoothModule := bt.New(cfg)
diskModule := disk.New(cfg)
panic(barista.Run(
dockerModule,
updateModule,
lightsModule,
bluetoothModule,
source,
mediaModule,
diskModule,
temperatureModule,
language.New(),
localDate,
localTime,
logoModule,
))
}