1lirc-config-tool(1)         General Commands Manual        lirc-config-tool(1)
2
3
4

NAME

6       lirc-config-tool - tool to scan and generate lirc config files
7

SYNOPSIS

9       lirc-config-tool   -s|-u [ -c FILE]
10
11       lirc-config-tool  [-o DIR] [-d] [-c FILE] [FILES]
12
13       lirc-config-tool   -l
14

OPTIONS

16       Without  options,  generates  all available application specific lircrc
17       files  in ~/.config/lirc. The optional [files] is a list  of  files  to
18       build or dump, as listed by -l.
19
20       -s     Scan  lircd  file for key symbols which are duplicated or not in
21              namespace.
22
23       -u     Update existing lircd file to use key symbols in namespace.
24
25       -l     List available files to generate.
26
27       -d     Dump file templates usable as stdin on stdout.
28
29       -o  <dir>
30              Output directory, defaults to ~/.config/lirc
31
32       -c  <lircd-filename>
33              lircd(8) config file, defaults to /etc/lirc/lircd.conf
34
35       -h     Print help message
36

DESCRIPTION

38       The script is designed to assist in the setup of the lirc(8) configura‐
39       tion  files  for  ordinary  remote  controls. It is not aimed to handle
40       full-blown keyboards or joystick devices. The  generated  lircrc  files
41       represents a starting point which will need further, manual refinements
42       but might "work" in a basic sense in many cases.
43
44       The setup involves normalizing the lircd.conf to  use  symbols  in  the
45       legal  namespace, and to create application specific lircrc files which
46       uses the normalized symbols.
47
48       To assist normalizing /etc/lircd.conf, the script  can  report  symbols
49       used  which  not  are  in the namespace. It can can also update many of
50       these symbols to corresponding symbols within the namespace.
51
52       The script also can create application specific lircrc  files  such  as
53       mythtv.lircrc  or vlc.lircrc. It then  uses  the normalized key symbols
54       in /etc/lirdc.conf. By default, files are created in ~/.config/lirc.
55
56       Generated   lircrc   files   basically   combines   known   keys   from
57       /etc/lirc/lircd.conf with template data for an application. The process
58       results in a lircrc file, a list a of  unused  keys  and  some  entries
59       which  don't  match  any  existing  key.  The unused keys and unmatched
60       entries are written as comments into the generated file.
61
62       An 'illegal' key i. e., a key not in  namespace,  will  not  match  any
63       entry  and will thus always be unused. However, it's perfectly possible
64       to use it later on while manually modifying the lircrc files.
65
66       When updating files, script always makes backup copies.
67
68       The generated lircrc files are  intended  to  be  included  in  a  main
69       ~/.config/lircrc file. A minimal such might look like
70
71                  include ~/.config/lirc/mythtv.lircrc
72
73

EXAMPLES

75       Scan  /etc/lirc/lircd.conf  for  duplicated  symbols and symbols not in
76       namespace:
77
78              lirc-config-tool -s
79
80       Update a local lircd.conf file to use symbols in namespace:
81
82              lirc-config-tool -uc ./lircd.conf
83
84       List available files to generate:
85
86              lirc-config-tool -l
87
88       Generate  one  of   the   files   listed   by   -l,   creates   ~/.con‐
89       fig/lirc/mythtv.lircrc:
90
91              lirc-config-tool mythtv
92
93       Dump template data  for mythtv:
94
95              lirc-config-tool -d mythtv >mythtv.lircdata
96
97       Use  possibly edited data to create a modified mythtv.lircrc in current
98       dir:
99
100              lirc-config-tool -o . stdin < mythtv.lircdata
101
102

LIRCD.CONF CONVERSIONS

104       The -s option simply reports all key symbols not in namespace. It  also
105       reports  some  symbols  which  although legal are inappropriate in this
106       context, notably KEY_NUMERIC_0..KEY_NUMERIC_9. If  present,  duplicated
107       keys are also reported.
108
109       The  -u  option  converts  several known symbols to their corresponding
110       KEY_* symbols. Symbols which have names like KEY_WINDOWS but not are in
111       namespace  gets  a  X_  prefix e. g., KEY_WINDOWS -> X_KEY_WINDOWS. The
112       converted file thus guarantees that any key symbol starting  with  KEY_
113       is a legal symbol.
114
115       All known numeric keys such as '1', 'KEY_1', 'KEY_KP_1', 'KEY_NUMERIC_1
116       are converted to KEY_1.
117
118       All modifications are marked by comments in file.
119
120

EXTENDING

122       The script can be extended to support more applications by providing  a
123       shell  function named *.lircdata. E. g., to add a new application named
124       "my_app" based on the built-in vlc application:
125
126                $ lirc-config-tool -d vlc >my_app.lircdata
127                $ function my_app_lircdata()
128                > {
129                >    cat my_app.lircdata
130                > }
131                $ export -f my_app_lircdata
132                $ lirc-config-tool  my_app
133
134

DATA FORMAT

136       The script uses a simple, line-oriented format to represent the  lircrc
137       files.   The  purpose of the format is to be compact and thus to give a
138       good overview, and also to be easy to parse.  Each line is  divided  in
139       comma-separated tokens.  There are four kind of lines.
140
141       Comment  lines begins with a '#'. These are copied verbatim to the out‐
142       put file.
143
144       The first data line represents global items, applicable to all  entrys.
145       The  first  word is the program name. It's used in the first 'program='
146       line.  Following words, if present, are optional lines  which  will  be
147       appended to each entry in the file.
148
149       A data line starting with 'begin' or 'end' is a  mode block designator.
150       It's copied verbatim to output file.
151
152       All other data lines represents a button/config entry. The format is
153           <button> <config> [extra]...
154       The button value  is used in the  button = line, and the config item is
155       used in the config = line. Both are mandatory. Following items, if any,
156       are copied as verbatim lines to the entry.
157
158       An unlikely example: The data format
159
160           myprog, flags = quit
161           begin volume_mode
162           KEY_VOLUMEUP, volume-up, delay=4, repeat=1
163           KEY_VOLUMEDOWN, volume-down
164           end volume_mode
165
166       translates to:
167
168           begin volume_mode
169               begin
170                   program = myprog
171                   button  = KEY_VOLUME_UP
172                   config  = volume-up
173                   delay   = 4
174                   repeat  = 1
175                   flags   = quit
176               end
177               begin
178                   program = myprog
179                   button  = KEY_VOLUME_DOWN
180                   config  = volume-down
181                   flags   = quit
182               end
183           end volume_mode
184
185
187       License     GPLv2+:     GNU     GPL     version     2     or      later
188       <http://gnu.org/licenses/gpl.html>.   This  is  free  software: you are
189       free to change and redistribute it.   There  is  NO  WARRANTY,  to  the
190       extent permitted by law.
191

SEE ALSO

193       lircd(8)
194       http://www.lirc.org/ - Main lirc documentation
195
196
197
198
199User Commands                      Aug 2015                lirc-config-tool(1)
Impressum