lcdexec: parameter support using widgets; hidden behind compile time option
This commit is contained in:
@@ -38,6 +38,8 @@ Entry=MenuC
|
||||
DisplayName="You can say A"
|
||||
# the exec=... line tells that it is a command
|
||||
Exec="echo a"
|
||||
# show a temporary feedback screen upon completion [default: no; legal: yes, no]
|
||||
Feedback= yes
|
||||
|
||||
[CmdB]
|
||||
DisplayName="Or you can say B"
|
||||
@@ -55,20 +57,77 @@ DisplayName=P
|
||||
Exec="echo P"
|
||||
|
||||
[CmdQ]
|
||||
DisplayName=Q
|
||||
Exec="echo Q"
|
||||
DisplayName="Show environment"
|
||||
Exec="env"
|
||||
# When lcdexec is compiled with compiler option -DLCDEXEC_PARAMS
|
||||
# you can change parameters for commands within lcdexec.
|
||||
# Parameters are handed to the program as environment variables;
|
||||
# so they can be easily used in the Exec=... line as $XXX
|
||||
# (e.g. "echo $SLIDER_ARG").
|
||||
# Please note a little issue with parameters: after changing the
|
||||
# last parameter of a command the command gets executed automatically.
|
||||
# This is IMHO noti ideal. I'm open for ideas to improve it.
|
||||
# Here's how they are defined:
|
||||
#Parameter=SLIDER_ARG
|
||||
#Parameter=RING_ARG
|
||||
#Parameter=NUMERIC_ARG
|
||||
#Parameter=ALPHA_ARG
|
||||
#Parameter=CHECKBOX_ARG
|
||||
#Parameter=IP_ARG
|
||||
#
|
||||
#[SLIDER_ARG]
|
||||
#DisplayName="Slider"
|
||||
## Type of argument widget [legal: Slider, Checkbox, Ring, Numeric, Alpha, IP]
|
||||
#Type=Slider
|
||||
## inital value of the argument
|
||||
#Value=5
|
||||
## options depending on the widget type
|
||||
#MinValue=0
|
||||
#MaxValue=10
|
||||
#
|
||||
#[CHECKBOX_ARG]
|
||||
#DisplayName="Checkbox"
|
||||
#Type=Checkbox
|
||||
#Value=on
|
||||
#AllowGray=no
|
||||
#
|
||||
#[RING_ARG]
|
||||
#DisplayName="Ring"
|
||||
#Type=Ring
|
||||
#Value=0
|
||||
## list of alternative strings
|
||||
#String=Eins
|
||||
#String=Zwei
|
||||
#String=Drei
|
||||
#
|
||||
#[NUMERIC_ARG]
|
||||
#DisplayName="Numeric"
|
||||
#Type=Numeric
|
||||
#Value=5
|
||||
#MinValue=0
|
||||
#MaxValue=10
|
||||
#
|
||||
#[ALPHA_ARG]
|
||||
#DisplayName="Alpha"
|
||||
#Type=Alpha
|
||||
## range of characters allowed [default: "ABCDEFGHIJKLMNOPQRSTUVWXYZ"]
|
||||
#AllowedChars = "+-0123456789ABCDEF"
|
||||
#Value=5
|
||||
#MinLength=0
|
||||
#MaxLength=10
|
||||
#
|
||||
#[IP_ARG]
|
||||
#DisplayName="IP"
|
||||
#Type=IP
|
||||
#Value=10.230.2.2
|
||||
#v6=no
|
||||
|
||||
|
||||
# Further Extensions:
|
||||
# Ideas for further extensions:
|
||||
# - shell selectable in command sections
|
||||
# - type definitions instead implicit depending on Exec/Entry
|
||||
# (the latter only as fallback)
|
||||
# - use input for parameters e.g. IP-Adresses, Sliders
|
||||
# e.g. Exec="ifconfig ${IF} ${IP} netmask ${MASK} broadcast ${BCAST}"
|
||||
# where
|
||||
# - ${IF} is the result of a selection input screen
|
||||
# - ${IP}, ${MASK}n ${BCAST} are the results of IP input screens
|
||||
# - display result if a command on the display
|
||||
# - display configurable result of a command on the display
|
||||
# - jump to other menus depending on the output/result of a command
|
||||
|
||||
# EOF
|
||||
|
||||
Reference in New Issue
Block a user