Checkpoint
This commit is contained in:
223 files changed
+14770
-18352
No files matched your search
@@ -9,7 +9,7 @@ import (
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/urfave/cli/v3"
|
||||
|
||||
harmon "github.com/BeatGlow/beatglow"
|
||||
"github.com/BeatGlow/beatglow"
|
||||
"github.com/BeatGlow/beatglow/config"
|
||||
|
||||
_ "github.com/BeatGlow/beatglow/player/all" // Player drivers
|
||||
@@ -44,7 +44,7 @@ func runFunc(ctx context.Context, cmd *cli.Command) error {
|
||||
}
|
||||
|
||||
logrus.WithFields(logrus.Fields{
|
||||
"version": harmon.Version,
|
||||
"version": beatglow.Version,
|
||||
"host_os": runtime.GOOS,
|
||||
"host_arch": runtime.GOARCH,
|
||||
}).Info("Harmon starting")
|
||||
@@ -61,7 +61,7 @@ func runFunc(ctx context.Context, cmd *cli.Command) error {
|
||||
logrus.WithError(err).Fatal("configuration file contains errors")
|
||||
}
|
||||
|
||||
controller, err := harmon.NewController(config)
|
||||
controller, err := beatglow.New(config)
|
||||
if err != nil {
|
||||
logrus.WithError(err).Fatal("host setup failed")
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/BeatGlow/beatglow/config"
|
||||
)
|
||||
|
||||
func main() {
|
||||
defaultPath := filepath.Join(os.ExpandEnv("$HOME"), "/.beatglow-settings.conf")
|
||||
settingsFileFlag := flag.String("settings", defaultPath, "User settings file")
|
||||
flag.Parse()
|
||||
|
||||
settings := config.LoadUserSettings(*settingsFileFlag)
|
||||
if err := config.SaveUserSettings(*settingsFileFlag, settings); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/BeatGlow/beatglow/hardware"
|
||||
)
|
||||
|
||||
func main() {
|
||||
logrus.SetLevel(logrus.TraceLevel)
|
||||
|
||||
wifi, err := hardware.WirelessNetworkInfo()
|
||||
if err != nil {
|
||||
fmt.Println("no wireless:", err)
|
||||
} else {
|
||||
fmt.Printf("wireless: %s %s @ %s %ddBm\n", wifi.Name, wifi.IP, wifi.WirelessSSID, wifi.WirelessLevel)
|
||||
}
|
||||
|
||||
wired, err := hardware.WiredNetworkInfo()
|
||||
if err != nil {
|
||||
fmt.Println("no wired:", err)
|
||||
} else {
|
||||
fmt.Printf("wired: %s %s\n", wired.Name, wired.IP)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user