# lcdexec LCDproc client configuration file

## general options for lcdexec ##
[lcdexec]
# address of the LCDd server to connect to
Address=localhost

# Port of the server to connect to
Port=13666

# set reporting level
ReportLevel=2

# report to to syslog ?
ReportToSyslog=false

# run in foreground [default: false; legal: true, false]
Foreground=false

# PidFile location when running as daemon [default: /var/run/lcdexec.pid]
#PidFile=/var/run/lcdexec.pid

# shell to use for executing programsi
# [default: $SHELL or /bin/sh; legal: any shell that understands: -c COMMAND]
#Shell=/bin/sh

# display name for the main menu [default: lcdexec HOST]
#DisplayName=lcdexec


# main menu definition
[MainMenu]
# the Entry=... lines (one for each menu entry) tell it is a menu definition
Entry=CmdA
Entry=CmdB
Entry=MenuC

# definition of a command
[CmdA]
# name to display in the menu instead of the section name
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"
Exec="echo b"

# definition of a menu
# a menu contains an Entry=... line for each menu entry
[MenuC]
DisplayName="A menu"
Entry=CmdP
Entry=CmdQ

[CmdP]
DisplayName=P
Exec="echo P"

[CmdQ]
DisplayName="Show environment"
Exec="env"
#   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: 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 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 (patches welcome):
# - shell selectable in command sections
# - display configurable result of a command on the display
# - jump to other menus depending on the output/result of a command

# EOF
