From b0e7277826f8227bf2c2ffc6587f5b05869a3a32 Mon Sep 17 00:00:00 2001 From: neroist Date: Wed, 13 Mar 2024 07:16:50 -0400 Subject: [PATCH] add `--all` flag and add new alias for brightness cmd --- src/commands/brightness.nim | 6 +++++- src/commands/color.nim | 8 ++++++-- src/commands/color_temp.nim | 6 +++++- src/commands/picker.nim | 6 +++++- src/commands/rgb.nim | 6 +++++- src/commands/state.nim | 6 +++++- src/commands/turn.nim | 10 ++++++--- src/common/vars.nim | 3 +++ src/nova.nim | 41 ++++++++++++++++++++++++++----------- 9 files changed, 70 insertions(+), 22 deletions(-) diff --git a/src/commands/brightness.nim b/src/commands/brightness.nim index 7102355..daffcd6 100644 --- a/src/commands/brightness.nim +++ b/src/commands/brightness.nim @@ -7,10 +7,14 @@ import puppy import ../common -proc brightness*(device: int = 0; brightness = -1; output: bool = on): int = +proc brightness*(device = 0, brightness: int = -1; output = on, all: bool = false): int = ## Set device brightness if not isSetup(output) or not checkDevices(device, output = output): return + + if all: + for i in 0..