Skip to content

Commit

Permalink
ref: print shortcuts
Browse files Browse the repository at this point in the history
  • Loading branch information
leukipp committed Jun 12, 2024
1 parent 8b470bd commit ad15ebd
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions common/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"
"os"

"encoding/json"
"path/filepath"

"github.com/BurntSushi/toml"
Expand Down Expand Up @@ -70,11 +71,21 @@ func ConfigFolderPath(name string) string {
}

func readConfig(configFilePath string) {
fmt.Println(fmt.Errorf("LOAD %s [%s]", configFilePath, Build.Summary))
log.Info("Starting [", Build.Summary, "]")
fmt.Printf("LOAD %s [%s]\n", configFilePath, Build.Summary)

// Decode contents into struct
toml.DecodeFile(configFilePath, &Config)

// Print shortcuts
keys, _ := json.MarshalIndent(Config.Keys, "", " ")
Corners, _ := json.MarshalIndent(Config.Corners, "", " ")
Systray, _ := json.MarshalIndent(Config.Systray, "", " ")

fmt.Printf("KEYS %s\n", string(keys))
fmt.Printf("CORNERS %s\n", string(Corners))
fmt.Printf("SYSTRAY %s\n", string(Systray))

log.Info("Starting [", Build.Summary, "]")
}

func watchConfig(configFilePath string) {
Expand Down

0 comments on commit ad15ebd

Please sign in to comment.