Rewrote help and description.

This commit is contained in:
Shy 2024-08-04 10:11:16 +02:00
parent 3081b16a22
commit 1f825347ab
2 changed files with 15 additions and 11 deletions

View file

@ -1,21 +1,24 @@
# wled.sh
Simple shell script to turn predefined wled instances on/off, change brightness
and switch presets.
Requires *curl* version 7.82.0 or newer.
Turn WLED installations in the C4 hackspace on/off, change brightness or switch
between presets.
## Usage
Switch on/off:
`wled f(nordcenter)|w(ohnzimmer) on|off`
`$ wled -f(nordcenter)|-w(wohnzimmer) on|off`
Switch between presets 1 to 17 or list available presets:
`wled f(nordcenter)|w(ohnzimmer) 1-17|l(ist)`
`$ wled -f|-w 1-17|l`
Change brightness:
`wled f(nordcenter)|w(ohnzimmer) b(rightness) 1-255`
`$ wled -f|-w -b 1-255`
## Requirements
*curl* version 7.82.0 or newer.
You have to be connected to the local network.

9
wled
View file

@ -1,17 +1,18 @@
#!/bin/sh
#
# Simpel command line tool to turn predefined wled instances on/off or switch
# presets.
# Turn WLED installations in the C4 hackspace on/off, change brightness or
# switch between presets.
#
# Author: Shy
# License: CC0
NAME="wled.sh"
COMMAND="wled"
VERSION="0.0.1"
print_usage() {
echo "\
Usage: $COMMAND -f|-w [on|off]
Usage: $COMMAND -f(norcenter)|-w(wohnzimmer) [on|off]
$COMMAND -f|-w [1-17|list]
$COMMAND -f|-w -b [1-255]"
}
@ -41,7 +42,7 @@ case "$1" in
exit 0
;;
-v|--version)
echo "wled.sh version $VERSION"
echo "$NAME version $VERSION"
exit 0
;;
-f|--fnordcenter)