lcdexec: parameter support using widgets enabled (currently only marginally
documented in lcdexec.conf)
This commit is contained in:
@@ -59,76 +59,77 @@ Exec="echo P"
|
||||
[CmdQ]
|
||||
DisplayName="Show environment"
|
||||
Exec="env"
|
||||
# When lcdexec is compiled with compiler option -DLCDEXEC_PARAMS
|
||||
# you can change parameters for commands within lcdexec.
|
||||
# Now 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: command with parameters get an action entry
|
||||
# added to the parameter menu automatically.
|
||||
# Activating this entry will execute the program.
|
||||
# This is IMHO not ideal, but the best idea I could come up with
|
||||
# Please note: commands with parameters get an action entry
|
||||
# added to end of the parameter menu automatically.
|
||||
# Activating this action named "Apply!" will execute the program.
|
||||
# This is IMHO not ideal, but the best idea I could come up with.
|
||||
# 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
|
||||
# Here's how paramters get 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=yes
|
||||
# replacement texts for the possible values
|
||||
OffText="off"
|
||||
OnText="on"
|
||||
GrayText="gray"
|
||||
|
||||
[RING_ARG]
|
||||
DisplayName="Ring"
|
||||
Type=Ring
|
||||
Value=0
|
||||
# list of alternative strings to choose from
|
||||
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
|
||||
|
||||
|
||||
# Ideas for further extensions:
|
||||
# Ideas for further extensions (patches welcome):
|
||||
# - shell selectable in command sections
|
||||
# - type definitions instead implicit depending on Exec/Entry
|
||||
# (the latter only as fallback)
|
||||
# - display configurable result of a command on the display
|
||||
# - jump to other menus depending on the output/result of a command
|
||||
|
||||
|
||||
Reference in New Issue
Block a user