Compare commits

..

No commits in common. "6b033f10de4f9748f00922c5740ea5b063bb2c54" and "1b054466cf0efa363bd967b2dbbaf94ad172ae0a" have entirely different histories.

3 changed files with 15 additions and 12 deletions

View File

@ -8,15 +8,10 @@ import (
"git.kill0.net/chill9/lume"
)
type Config struct {
AccessToken string
Colors map[string]string `toml:"colors"`
}
type CmdArgs struct {
Flags Flags
Client *lifx.Client
Config Config
Flags Flags
Client *lifx.Client
Selector string
}
type Flags struct {

View File

@ -13,8 +13,16 @@ import (
const lumercFile = ".lumerc"
type Config struct {
AccessToken string
}
func main() {
var config lumecmd.Config
var (
selector string
)
var config Config
homeDir, err := os.UserHomeDir()
_, err = toml.DecodeFile(path.Join(homeDir, lumercFile), &config)
if os.IsNotExist(err) {
@ -33,8 +41,8 @@ func main() {
c := lifx.NewClient(config.AccessToken)
cmdArgs := lumecmd.CmdArgs{
Client: c,
Config: config,
Client: c,
Selector: selector,
}
cmd, ok := lumecmd.GetCommand(command)

View File

@ -6,7 +6,7 @@ import (
)
func init() {
var cmdName string = "toggle"
var cmdName string = "set-state"
fs := flag.NewFlagSet(cmdName, flag.ExitOnError)