Add visual power indicator character

This commit is contained in:
2021-04-04 23:34:52 +00:00
parent a4c305c2e9
commit 9c92d7945d
3 changed files with 22 additions and 4 deletions

View File

@ -39,12 +39,13 @@ func ShowCmd(ctx Context) (int, error) {
for i, l := range lights {
indent = 0
fmt.Printf(
"Light ID: %s, %s, Power: %s\n",
"%s Light ID: %s, %s, Power: %s\n",
ColorizeIndicator(l.Power),
l.Id,
connected(l.Connected),
ColorizePower(l.Power),
)
indent += Tabstop
indent += Tabstop + 2
PrintfWithIndent(indent, "Label: %s, ID: %s\n", l.Label, l.Id)
PrintfWithIndent(indent, "UUID: %s\n", l.UUID)
PrintfWithIndent(indent, "Location: %s, ID: %s\n", l.Location.Name, l.Location.Id)