Skip to content

Commit

Permalink
additional version 1.6.0 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
neroist committed Jan 4, 2023
1 parent 804904e commit 91b9be6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 19 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
bin/
bin/
*.exe
*.KEY
32 changes: 14 additions & 18 deletions src/nova.nim
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ const
OutputHelp = "Whether or not the command will produce output. " &
"This also silences errors and will let commands fail silently." ## "Output" option help text.

NotSetupErrorMsg = "Nova is not setup properly. Use the command `nova setup` to setup Nova."
## Error message when Nova is not setup properly.
NotSetupErrorMsg = "Nova is not setup properly. Use the command `nova setup` to setup Nova." ## Error message when Nova is not setup properly.

Version = "v1.5.0" ## Nova version

Expand Down Expand Up @@ -109,8 +108,6 @@ if isSetup(output=false):

# ---- commands ----

{. push discardable .}

proc setup =
## Setup Nova

Expand Down Expand Up @@ -671,7 +668,7 @@ proc picker(device = 0; set_property: bool = true; output = on) =
if set_property:
if output: echo ""

color device, pickedColor.hex, output
discard color(device, pickedColor.hex, output)

proc version =
## Get Nova current version
Expand Down Expand Up @@ -710,7 +707,6 @@ proc docs =

openDefaultBrowser("https://github.com/nonimportant/Nova/blob/main/DOCS.md")

{. pop .}

when isMainModule:
# String consts are cast into strings becuase if I dont it throws an error
Expand Down Expand Up @@ -738,8 +734,8 @@ when isMainModule:
help = {
"state": "The state you want to put the device in. Has to be the string \"on\" or \"off.\" " &
" If left blank, the command will print the current power state of the device.",
"device": $DeviceHelp,
"output": $OutputHelp
"device": DeviceHelp,
"output": OutputHelp
},
noAutoEcho = true
],
Expand All @@ -748,8 +744,8 @@ when isMainModule:
help = {
"brightness": "The brightness you want to set on the device. Supports values 1-100 only. "&
"If left blank, the command will print the current brightness of the device.",
"device": $DeviceHelp,
"output": $OutputHelp
"device": DeviceHelp,
"output": OutputHelp
},
noAutoEcho = true
],
Expand All @@ -760,8 +756,8 @@ when isMainModule:
"Has to be a hex/HTML color code, optionally prefixed with '#', or the string \"rand\" or \"random.\" " &
"If left blank, will return the current color of the device. " &
"If `color` is \"rand\" or \"random\" a random color will be displayed on the device",
"device": $DeviceHelp,
"output": $OutputHelp
"device": DeviceHelp,
"output": OutputHelp
},
noAutoEcho = true
],
Expand All @@ -771,29 +767,29 @@ when isMainModule:
help = {
"temperature": "The color temperature you want to set on the device. " &
"Has to be in the valid range your Govee device supports.",
"device": $DeviceHelp,
"output": $OutputHelp
"device": DeviceHelp,
"output": OutputHelp
},
noAutoEcho = true
],
[
state,
help = {"device": $DeviceHelp}
help = {"device": DeviceHelp}
],
[
state,
cmdName = "device",
doc = "Alias for state",
help = {"device": $DeviceHelp}
help = {"device": DeviceHelp}
],
[
rgb_cmd,
help = {
"device": $DeviceHelp,
"device": DeviceHelp,
"rgb": "The color you want to set on the device in an RGB format. " &
"Has to be 3 numbers seperated by a space. " &
"If left blank, the command will print the current color in an RGB function.",
"output": $OutputHelp
"output": OutputHelp
},
noAutoEcho = true,
cmdName = "rgb"
Expand Down

0 comments on commit 91b9be6

Please sign in to comment.