root menu: Use - to reset the root menu order from a config
[maemo-rb.git] / manual / advanced_topics / main.tex
blobeaa0494691fc1ecb8c3176c12dd637e9666c5948
1 % $Id$ %
2 \chapter{Advanced Topics}
4 \section{\label{ref:CustomisingUI}Customising the User Interface}
6 \subsection{\label{ref:CustomisingTheMainMenu}Customising The Main Menu}
8 It is possible to customise the main menu, i.e. to reorder or to hide some
9 of its items. To accomplish this, the file \fname{/.rockbox/config.cfg} must
10 be edited (presumably on the computer while the \dap{} is connected to it
11 via USB). There, the line starting with \config{root\_menu\_order:} must
12 be edited (or created if it is not present yet).
14 The line should look like \config{root\_menu\_order:items}, where ``items''
15 is a comma separated list (no spaces around the commas!) of the following
16 words: \config{bookmarks}, \config{files}, \opt{database}{\config{database}, }%
17 \config{wps}, \config{settings}, \opt{recording}{\config{recording}, }%
18 \opt{radio}{\config{radio}, }\config{playlists}, \config{plugins},
19 \config{system\_menu}, \opt{PLAYER_PAD}{\config{shutdown}, }\config{shortcuts}.
20 Each of the words, if it occurs in the list, activates the appropriate item
21 in the main menu. The order of the items is given by the order of the words
22 in the list. The items whose words do not occur in the list will be hidden,
23 with one exception: the menu item ``Settings'' will be shown even if its word
24 is not in the list (it is added as the last item then).
26 Use the line \config{root\_menu\_order:-} to reset the menu order
28 Only the main menu can be customised this way, submenus can not.
30 \opt{lcd_bitmap}{
31 \subsection{\label{ref:GettingExtras}Getting Extras}
33 Rockbox supports custom fonts. A collection of fonts is available for download
34 in the font package at \url{http://www.rockbox.org/daily.shtml}.}
36 \opt{lcd_bitmap}{
37 \subsection{\label{ref:Loadingfonts}Loading Fonts}\index{Fonts}
38 Rockbox can load fonts dynamically. Simply copy the \fname{.fnt} file to the
39 \dap{} and ``play'' it in the \setting{File Browser}. If you want a font to
40 be loaded automatically every time you start up, it must be located in the
41 \fname{/.rockbox/fonts} directory and the filename must be at most 24 characters
42 long. You can browse the fonts in \fname{/.rockbox/fonts} under
43 \setting{Settings $\rightarrow$ Theme Settings $\rightarrow$ Font}
44 in the \setting{Main Menu}.\\
46 \note{Advanced Users Only: Any BDF font should
47 be usable with Rockbox. To convert from \fname{.bdf} to \fname{.fnt}, use
48 the \fname{convbdf} tool. This tool can be found in the \fname{tools}
49 directory of the Rockbox source code. See \wikilink{CreateFonts\#ConvBdf}
50 for more details. Or just run \fname{convbdf} without any parameters to
51 see the possible options.}
54 \subsection{\label{ref:Loadinglanguages}Loading Languages}
55 \index{Language files}%
56 Rockbox can load language files at runtime. Simply copy the \fname{.lng} file
57 \emph{(do not use the .lang file)} to the \dap\ and ``play'' it in the
58 Rockbox directory browser or select \setting{Settings $\rightarrow$
59 General Settings $\rightarrow$ Language }from the \setting{Main Menu}.\\
61 \note{If you want a language to be loaded automatically every time you start
62 up, it must be located in the \fname{/.rockbox/langs} directory and the filename
63 must be a maximum of 24 characters long.\\}
65 If your language is not yet supported and you want to write your own language
66 file find the instructions on the Rockbox website:
67 \wikilink{LangFiles}
69 \opt{lcd_color}{
70 \subsection{\label{ref:ChangingFiletypeColours}Changing Filetype Colours}
71 Rockbox has the capability to modify the \setting{File Browser} to show
72 files of different types in different colours, depending on the file extension.
74 \subsubsection{Set-up}
75 There are two steps to changing the filetype colours -- creating
76 a file with the extension \fname{.colours} and then activating it using
77 a config file. The \fname{.colours} files \emph{must} be stored in
78 the \fname{/.rockbox/themes/} directory.
79 The \fname{.colours} file is just a text file, and can be edited with
80 your text editor of choice.
82 \subsubsection{Creating the .colours file}
83 The \fname{.colours} file consists of the file extension
84 (or \fname{folder}) followed by a colon and then the colour desired
85 as an RGB value in hexadecimal, as in the following example:\\*
87 \config{folder:808080}\\
88 \config{mp3:00FF00}\\
89 \config{ogg:00FF00}\\
90 \config{txt:FF0000}\\
91 \config{???:FFFFFF}\\*
93 The permissible extensions are as follows:\\*
94 \\
95 \config{folder, m3u, m3u8, cfg, wps, lng, rock, bmark, cue, colours, mpa,
96 \firmwareextension{}, %
97 \opt{swcodec}{mp1, }mp2, mp3%
98 \opt{swcodec}{, ogg, oga, wma, wmv, asf, wav, flac, ac3, a52, mpc,
99 wv, m4a, m4b, mp4, mod, shn, aif, aiff, spx, sid, adx, nsf, nsfe,
100 spc, ape, mac, sap}%
101 \opt{lcd_bitmap}{\opt{swcodec}{, mpg, mpeg}}%
102 \opt{HAVE_REMOTE_LCD}{, rwps}%
103 \opt{lcd_non-mono}{, bmp}%
104 \opt{radio}{, fmr}%
105 \opt{lcd_bitmap}{, fnt, kbd}}\\*
106 %It'd be ideal to get these from filetypes.c
108 All file extensions that are not either specifically listed in the
109 \fname{.colours} files or are not in the list above will be
110 set to the colour given by \config{???}. Extensions that
111 are in the above list but not in the \fname{.colours}
112 file will be set to the foreground colour as normal.
114 \subsubsection{Activating}
115 To activate the filetype colours, the \fname{.colours} file needs to be
116 invoked from a \fname{.cfg} configuration file. The easiest way to do
117 this is to create a new text file containing the following single
118 line:\\*
120 \config{filetype colours: /.rockbox/themes/filename.colours}\\*
122 where filename is replaced by the filename you used when creating the
123 \fname{.colours} file. Save this file as e.g. \fname{colours.cfg} in the
124 \fname{/.rockbox/themes} directory and then activate the config file
125 from the menu as normal
126 (\setting{Settings} $\rightarrow$ \setting{Theme Settings}%
127 $\rightarrow$ \setting{Browse Theme Files}).
129 \subsubsection{Editing}
130 The built-in \setting{Text Editor} (see \reference{sec:text_editor})
131 automatically understands the
132 \fname{.colours} file format, but an external text editor can
133 also be used. To edit the \fname{.colours} file using Rockbox,
134 ``play'' it in the \setting{File Browser}. The file will open in
135 the \setting{Text Editor}. Upon selecting a line, the following choices
136 will appear:\\*
138 \config{Extension}\\
139 \config{Colour}\\*
141 If \config{Extension} is selected, the \setting{virtual keyboard}
142 (see \reference{sec:virtual_keyboard}) appears,
143 allowing the file extension to be modified. If \config{Colour}
144 is selected, the colour selector screen appears. Choose the desired
145 colour, then save the \fname{.colours} file using the standard
146 \setting{Text Editor} controls.
149 \opt{lcd_non-mono}{%
150 \subsection{\label{ref:LoadingBackdrops}Loading Backdrops}
151 Rockbox supports showing an image as a backdrop in the \setting{File Browser}
152 and the menus. The backdrop image must be a \fname{.bmp} file of the exact
153 same dimensions as the display in your \dap{} (\dapdisplaysize{} with the last
154 number giving the colour depth in bits). To use an image as a backdrop browse
155 to it in the \setting{File Browser} and open the \setting{Context Menu}
156 (see \reference{ref:Contextmenu}) on it and select the option
157 \setting{Set As Backdrop}. If you want rockbox to remember your
158 backdrop the next time you start your \dap{} the backdrop must be placed in
159 the \fname{/.rockbox/backdrops} directory.
162 \nopt{lcd_charcell}{
163 \subsection{UI Viewport}
164 By default, the UI is drawn on the whole screen. This can be changed so that
165 the UI is confined to a specific area of the screen, by use of a UI
166 viewport. This is done by adding the following line to the
167 \fname{.cfg} file for a theme:\\*
169 \nopt{lcd_non-mono}{\config{ui viewport: X,Y,[width],[height],[font]}}
170 \nopt{lcd_color}{\opt{lcd_non-mono}{
171 \config{ui viewport: X,Y,[width],[height],[font],[fgshade],[bgshade]}}}
172 \opt{lcd_color}{
173 \config{ui viewport: X,Y,[width],[height],[font],[fgcolour],[bgcolour]}}
176 \opt{HAVE_REMOTE_LCD}{
177 The dimensions of the menu that is displayed on the remote control of your
178 \dap\ can be set in the same way. The line to be added to the theme
179 \fname{.cfg} is the following:\\*
181 \nopt{lcd_non-mono}{\config{remote ui viewport: X,Y,[width],[height],[font]}}
182 \nopt{lcd_color}{\opt{lcd_non-mono}{
183 \config{remote ui viewport: X,Y,[width],[height],[font],[fgshade],[bgshade]}}}
184 \opt{lcd_color}{
185 \config{remote ui viewport: X,Y,[width],[height],[font],[fgcolour],[bgcolour]}}
189 Only the first two parameters \emph{have} to be specified, the others can
190 be omitted using `-' as a placeholder. The syntax is very similar to WPS
191 viewports (see \reference{ref:Viewports}). Briefly:
193 \nopt{lcd_non-mono}{\input{advanced_topics/viewports/mono-uivp-syntax.tex}}
194 \nopt{lcd_color}{\opt{lcd_non-mono}{\input{advanced_topics/viewports/grayscale-uivp-syntax.tex}}}
195 \opt{lcd_color}{\input{advanced_topics/viewports/colour-uivp-syntax.tex}}
198 \section{\label{ref:ConfiguringtheWPS}Configuring the Theme}
200 \subsection{Themeing -- General Info}
202 There are various different aspects of the Rockbox interface
203 that can be themed -- the WPS or \setting{While Playing Screen}, the FMS or
204 \setting{FM Screen} (if the \dap{} has a tuner), and the SBS or
205 \setting{Base Skin}. The WPS is the name used to
206 describe the information displayed on the \daps{} screen whilst an audio
207 track is being played, the FMS is the screen shown while listening to the
208 radio, and the SBS lets you specify a base skin that is shown in the
209 menus and browsers, as well as the WPS and FMS. The SBS also allows you to
210 control certain aspects of the appearance of the menus/browsers.
211 There are a number of themes included in Rockbox, and
212 you can load one of these at any time by selecting it in
213 \setting{Settings $\rightarrow$ Theme Settings $\rightarrow$ Browse Theme Files}.
214 It is also possible to set individual items of a theme from within the
215 \setting{Settings $\rightarrow$ Theme Settings} menu.
218 \subsection{\label{ref:CreateYourOwnWPS}Themes -- Create Your Own}
219 The theme files are simple text files, and can be created (or edited) in your
220 favourite text editor. To make sure non-English characters
221 display correctly in your theme you must save the theme files with UTF-8
222 character encoding. This can be done in most editors, for example Notepad in
223 Windows 2000 or XP (but not in 9x/ME) can do this.
225 \begin{description}
226 \item [Files Locations: ] Each different ``themeable'' aspect requires its own file --
227 WPS files have the extension \fname{.wps}, FM screen files have the extension
228 \fname{.fms}, and SBS files have the extension \fname{.sbs}. The main theme
229 file has the extension \fname{.cfg}. All files should have the same name.
231 The theme \fname{.cfg} file should be placed in the \fname{/.rockbox/themes}
232 directory, while the \fname{.wps}, \fname{.fms} and \fname{.sbs} files should
233 be placed in the \fname{/.rockbox/wps} directory. Any images used by the
234 theme should be placed in a subdirectory of \fname{/.rockbox/wps} with the
235 same name as the theme, e.g. if the theme files are named
236 \fname{mytheme.wps, mytheme.sbs} etc., then the images should be placed in
237 \fname{/.rockbox/wps/mytheme}.
238 \end{description}
240 All full list of the available tags are given in appendix
241 \reference{ref:wps_tags}; some of the more powerful concepts in theme design
242 are discussed below.
244 \begin{itemize}
245 \item All characters not preceded by \% are displayed as typed.
246 \item Lines beginning with \# are comments and will be ignored.
247 \end{itemize}
249 \note{Keep in mind that your \daps{} resolution is \dapdisplaysize{} (with
250 the last number giving the colour depth in bits) when
251 designing your own WPS, or if you use a WPS designed for another target.
252 \opt{HAVE_REMOTE_LCD}{The resolution of the remote is
253 \opt{iriverh100,iriverh300}{128$\times$64$\times$1}%
254 \opt{iaudiox5,iaudiom5,iaudiom3}{128$\times$96$\times$2}
255 pixels.
259 \nopt{lcd_charcell}{
260 \subsubsection{\label{ref:Viewports}Viewports}
262 By default, a viewport filling the whole screen contains all the elements
263 defined in each theme file. The
264 \opt{lcd_non-mono}{elements in this viewport are displayed
265 with the same background/\linebreak{}foreground
266 \opt{lcd_color}{colours}\nopt{lcd_color}{shades} and the}
267 text is rendered in the
268 same font as in the main menu. To change this behaviour a custom viewport can
269 be defined. A viewport is a rectangular window on the screen%
270 \opt{lcd_non-mono}{ with its own foreground/background
271 \opt{lcd_color}{colours}\nopt{lcd_color}{shades}}.
272 This window also has variable dimensions. To
273 define a viewport a line starting \config{{\%V(\dots}} has to be
274 present in the theme file. The full syntax will be explained later in
275 this section. All elements placed before the
276 line defining a viewport are displayed in the default viewport. Elements
277 defined after a viewport declaration are drawn within that viewport.
278 \opt{lcd_bitmap}{Loading images (see Appendix \reference{ref:wps_images})
279 should be done within the default viewport.}
280 A viewport ends either with the end of the file, or with the next viewport
281 declaration line. Viewports sharing the same
282 coordinates and dimensions cannot be displayed at the same time. Viewports
283 cannot be layered \emph{transparently} over one another. Subsequent viewports
284 will be drawn over any other viewports already drawn onto that
285 area of the screen.
287 \nopt{lcd_non-mono}{\input{advanced_topics/viewports/mono-vp-syntax.tex}}
288 \nopt{lcd_color}{\opt{lcd_non-mono}{\input{advanced_topics/viewports/grayscale-vp-syntax.tex}}}
289 \opt{lcd_color}{\input{advanced_topics/viewports/colour-vp-syntax.tex}}
291 \opt{lcd_non-mono}{
292 \subsubsection{Viewport Line Text Styles}
293 \begin{tagmap}
294 \config{\%Vs(mode[,param])}
295 & Set the viewport text style to `mode' from this point forward\\
296 \end{tagmap}
298 Mode can be the following:
300 \begin{rbtabular}{.75\textwidth}{lX}{\textbf{Mode} & \textbf{Description}}{}{}
301 clear & Restore the default style\\
302 invert & Draw lines inverted\\
303 color & Draw the text coloured by the value given in `param'. Functionally
304 equivalent to using the \%Vf() tag\\
305 \opt{lcd_color}{%
306 gradient & Draw the next `param' lines using a gradient as
307 defined by \%Vg. By default the gradient is drawn over 1 line.
308 \%Vs(gradient,2) will use 2 lines to fully change from the start colour to
309 the end colour\\}
310 \end{rbtabular}
313 \subsubsection{Conditional Viewports}
315 Any viewport can be displayed either permanently or conditionally.
316 Defining a viewport as \config{{\%V(\dots}}
317 will display it permanently.
319 \begin{itemize}
320 \item {\config{\%Vl('identifier',\dots)}}
321 This tag preloads a viewport for later display. `identifier' is a single
322 lowercase letter (a-z) and the `\dots' parameters use the same logic as
323 the \config{\%V} tag explained above.
324 \item {\config{\%Vd('identifier')}} Display the `identifier' viewport.
325 \end{itemize}
327 Viewports can share identifiers so that you can display multiple viewports
328 with one \%Vd line.
330 \nopt{lcd_non-mono}{\input{advanced_topics/viewports/mono-conditional.tex}}
331 \nopt{lcd_color}{%
332 \opt{lcd_non-mono}{\input{advanced_topics/viewports/grayscale-conditional.tex}}}
333 \opt{lcd_color}{\input{advanced_topics/viewports/colour-conditional.tex}}
336 \note{The tag to display conditional viewports must come before the tag to
337 preload the viewport in the \fname{.wps} file.}
339 \subsection{Info Viewport (SBS only)}
340 As mentioned above, it is possible to set a UI viewport via the theme
341 \fname{.cfg} file. It is also possible to set the UI viewport through the SBS
342 file, and to conditionally select different UI viewports.
344 \begin{itemize}
345 \item {\config{\%Vi('label',\dots)}}
346 This viewport is used as Custom UI Viewport in the case that the theme
347 doesn't have a ui viewport set in the theme \fname{.cfg} file. Having this
348 is strongly recommended since it makes you able to use the SBS
349 with other themes. If label is set this viewport can be selectivly used as the
350 Info Viewport using the \%VI tag. The `\dots' parameters use the same logic as
351 the \config{\%V} tag explained above.
353 \item {\config{\%VI('label')}} Set the Info Viewport to use the viewport called
354 label, as declared with the previous tag.
355 \end{itemize}
357 \subsection{\label{ref:multifont}Additional Fonts}
358 Additional fonts can be loaded within each screen file to be used in that
359 screen. In this way not only can you have different fonts between e.g. the menu
360 and the WPS, but you can use multiple fonts in each of the individual screens.\\
362 \config{\%Fl('id',filename,glyphs)}
364 \begin{itemize}
365 \item `id' is the number you want to use in viewport declarations, 0 and 1
366 are reserved and so can't be used.
367 \item `filename' is the font filename to load. Fonts should be stored in
368 \fname{/.rockbox/fonts/}
369 \item `glyphs' is an optional specification of how many unique glyphs to
370 store in memory. Default is from the system setting
371 \setting{Glyphs To Load}.
372 \end{itemize}
374 An example would be: \config{\%Fl(2,12-Nimbus.fnt,100)}
378 \subsubsection{Conditional Tags}
380 \begin{description}
381 \item[If/else: ]
382 Syntax: \config{\%?xx{\textless}true{\textbar}false{\textgreater}}
384 If the tag specified by ``\config{xx}'' has a value, the text between the
385 ``\config{{\textless}}'' and the ``\config{{\textbar}}'' is displayed (the true
386 part), else the text between the ``\config{{\textbar}}'' and the
387 ``\config{{\textgreater}}'' is displayed (the false part).
388 The else part is optional, so the ``\config{{\textbar}}'' does not have to be
389 specified if no else part is desired. The conditionals nest, so the text in the
390 if and else part can contain all \config{\%} commands, including conditionals.
392 \item[Enumerations: ]
393 Syntax: \config{\%?xx{\textless}alt1{\textbar}alt2{\textbar}alt3{\textbar}\dots{\textbar}else{\textgreater}}
395 For tags with multiple values, like Play status, the conditional can hold a
396 list of alternatives, one for each value the tag can have.
397 Example enumeration:
398 \begin{example}
399 \%?mp{\textless}Stop{\textbar}\%Play{\textbar}Pause{\textbar}Ffwd{\textbar}Rew{\textgreater}
400 \end{example}
402 The last else part is optional, and will be displayed if the tag has no value.
403 The WPS parser will always display the last part if the tag has no value, or if
404 the list of alternatives is too short.
405 \end{description}
407 \subsubsection{Next Song Info}
408 You can display information about the next song -- the song that is
409 about to play after the one currently playing (unless you change the
410 plan).
412 If you use the upper-case versions of the
413 three tags: \config{F}, \config{I} and \config{D}, they will instead refer to
414 the next song instead of the current one. Example: \config{\%Ig} is the genre
415 name used in the next song and \config{\%Ff} is the mp3 frequency.\\
417 \note{The next song information \emph{will not} be available at all
418 times, but will most likely be available at the end of a song. We
419 suggest you use the conditional display tag a lot when displaying
420 information about the next song!}
422 \subsubsection{\label{ref:AlternatingSublines}Alternating Sublines}
424 It is possible to group items on each line into 2 or more groups or
425 ``sublines''. Each subline will be displayed in succession on the line for a
426 specified time, alternating continuously through each defined subline.
428 Items on a line are broken into sublines with the semicolon
429 `\config{;}' character. The display time for
430 each subline defaults to 2 seconds unless modified by using the
431 `\config{\%t}' tag to specify an alternate
432 time (in seconds and optional tenths of a second) for the subline to be
433 displayed.
435 Subline related special characters and tags:
436 \begin{description}
437 \item[;] Split items on a line into separate sublines
438 \item[\%t] Set the subline display time. The
439 `\config{\%t}' is followed by either integer seconds (\config{\%t5}), or seconds
440 and tenths of a second within () e.g. (\config{\%t(3.5)}).
441 \end{description}
443 Each alternating subline can still be optionally scrolled while it is
444 being displayed, and scrollable formats can be displayed on the same
445 line with non{}-scrollable formats (such as track elapsed time) as long
446 as they are separated into different sublines.
447 Example subline definition:
448 \begin{example}
449 %s%t(4)%ia;%s%it;%t(3)%pc %pr : Display id3 artist for 4 seconds,
450 Display id3 title for 2 seconds,
451 Display current and remaining track time
452 for 3 seconds,
453 repeat...
454 \end{example}
456 Conditionals can be used with sublines to display a different set and/or number
457 of sublines on the line depending on the evaluation of the conditional.
458 Example subline with conditionals:
459 \begin{example}
460 %?it{\textless}%t(8)%s%it{\textbar}%s%fn{\textgreater};%?ia{\textless}%t(3)%s%ia{\textbar}%t(0){\textgreater}\\
461 \end{example}
463 The format above will do two different things depending if ID3 tags are
464 present. If the ID3 artist and title are present:
465 \begin{itemize}
466 \item Display id3 title for 8 seconds,
467 \item Display id3 artist for 3 seconds,
468 \item repeat\dots
469 \end{itemize}
470 If the ID3 artist and title are not present:
471 \begin{itemize}
472 \item Display the filename continuously.
473 \end{itemize}
474 Note that by using a subline display time of 0 in one branch of a conditional,
475 a subline can be skipped (not displayed) when that condition is met.
477 \subsubsection{Using Images}
478 You can have as many as 52 images in your WPS. There are various ways of
479 displaying images:
480 \begin{enumerate}
481 \item Load and always show the image, using the \config{\%x} tag
482 \item Preload the image with \config{\%xl} and show it with \config{\%xd}.
483 This way you can have your images displayed conditionally.
484 \nopt{archos}{%
485 \item Load an image and show as backdrop using the \config{\%X} tag. The
486 image must be of the same exact dimensions as your display.
488 \end{enumerate}
490 \optv{swcodec}{% This doesn't depend on swcodec but we don't have a \noptv
491 % command.
492 Example on background image use:
493 \begin{example}
494 %X(background.bmp)
495 \end{example}
496 The image with filename \fname{background.bmp} is loaded and used in the WPS.
499 Example on bitmap preloading and use:
500 \begin{example}
501 %x(a,static_icon.bmp,50,50)
502 %xl(b,rep\_off.bmp,16,64)
503 %xl(c,rep\_all.bmp,16,64)
504 %xl(d,rep\_one.bmp,16,64)
505 %xl(e,rep\_shuffle.bmp,16,64)
506 %?mm<%xd(b)|%xd(c)|%xd(d)|%xd(e)>
507 \end{example}
508 Four images at the same x and y position are preloaded in the example. Which
509 image to display is determined by the \config{\%mm} tag (the repeat mode).
511 \subsubsection{Example File}
512 \begin{example}
513 %s%?in<%in - >%?it<%it|%fn> %?ia<[%ia%?id<, %id>]>
514 %pb%pc/%pt
515 \end{example}
516 That is, ``tracknum -- title [artist, album]'', where most fields are only
517 displayed if available. Could also be rendered as ``filename'' or ``tracknum --
518 title [artist]''.
520 %\opt{lcd_bitmap}{
521 % \begin{verbatim}
522 % %s%?it<%?in<%in. |>%it|%fn>
523 % %s%?ia<%ia|%?d2<%d(2)|(root)>>
524 % %s%?id<%id|%?d1<%d(1)|(root)>> %?iy<(%iy)|>
526 % %al%pc/%pt%ar[%pp:%pe]
527 % %fbkBit %?fv<avg|> %?iv<(id3v%iv)|(no id3)>
528 % %pb
529 % %pm
530 % % \end{verbatim}
533 \section{\label{ref:manage_settings}Managing Rockbox Settings}
535 \subsection{Introduction to \fname{.cfg} Files}
536 Rockbox allows users to store and load multiple settings through the use of
537 configuration files. A configuration file is simply a text file with the
538 extension \fname{.cfg}.
540 A configuration file may reside anywhere on the disk. Multiple
541 configuration files are permitted. So, for example, you could have
542 a \fname{car.cfg} file for the settings that you use while playing your
543 jukebox in your car, and a \fname{headphones.cfg} file to store the
544 settings that you use while listening to your \dap{} through headphones.
546 See \reference{ref:cfg_specs} below for an explanation of the format
547 for configuration files. See \reference{ref:manage_settings_menu} for an
548 explanation of how to create, edit and load configuration files.
550 \subsection{\label{ref:cfg_specs}Specifications for \fname{.cfg} Files}
552 The Rockbox configuration file is a plain text file, so once you use the
553 \setting{Save .cfg file} option to create the file, you can edit the file on
554 your computer using any text editor program. See
555 Appendix \reference{ref:config_file_options} for available settings. Configuration
556 files use the following formatting rules: %
558 \begin{enumerate}
559 \item Each setting must be on a separate line.
560 \item Each line has the format ``setting: value''.
561 \item Values must be within the ranges specified in this manual for each
562 setting.
563 \item Lines starting with \# are ignored. This lets you write comments into
564 your configuration files.
565 \end{enumerate}
567 Example of a configuration file:
568 \begin{example}
569 volume: 70
570 bass: 11
571 treble: 12
572 balance: 0
573 time format: 12hour
574 volume display: numeric
575 show files: supported
576 wps: /.rockbox/car.wps
577 lang: /.rockbox/afrikaans.lng
578 \end{example}
580 \note{As you can see from the example, configuration files do not need to
581 contain all of the Rockbox options. You can create configuration files
582 that change only certain settings. So, for example, suppose you
583 typically use the \dap{} at one volume in the car, and another when using
584 headphones. Further, suppose you like to use an inverse LCD when you are
585 in the car, and a regular LCD setting when you are using headphones. You
586 could create configuration files that control only the volume and LCD
587 settings. Create a few different files with different settings, give
588 each file a different name (such as \fname{car.cfg},
589 \fname{headphones.cfg}, etc.), and you can then use the \setting{Browse .cfg
590 files} option to quickly change settings.\\}
592 A special case configuration file can be used to force a particular setting
593 or settings every time Rockbox starts up (e.g. to set the volume to a safe
594 level). Format a new configuration file as above with the required setting(s)
595 and save it into the \fname{/.rockbox} directory with the filename
596 \fname{fixed.cfg}.
598 \subsection{\label{ref:manage_settings_menu}The \setting{Manage Settings}
599 menu} The \setting{Manage Settings} menu can be found in the \setting{Main
600 Menu}. The \setting{Manage Settings} menu allows you to save and load
601 \fname{.cfg} files.
603 \begin{description}
605 \item [Browse .cfg Files]Opens the \setting{File Browser} in the
606 \fname{/.rockbox} directory and displays all \fname{.cfg} (configuration)
607 files. Selecting a \fname{.cfg} file will cause Rockbox to load the settings
608 contained in that file. Pressing \ActionStdCancel{} will exit back to the
609 \setting{Manage Settings} menu. See the \setting{Write .cfg files} option on
610 the \setting{Manage Settings} menu for details of how to save and edit a
611 configuration file.
613 \item [Reset Settings]This wipes the saved settings
614 in the \dap{} and resets all settings to their default values.
616 \opt{IRIVER_H100_PAD,IRIVER_H300_PAD,IAUDIO_X5_PAD,SANSA_E200_PAD,SANSA_C200_PAD%
617 ,PBELL_VIBE500_PAD}{
618 \note{You can also reset all settings to their default
619 values by turning off the \dap, turning it back on, and holding the
620 \ButtonRec{} button immediately after the \dap{} turns on.}
622 \opt{IRIVER_H10_PAD}{\note{You can also reset all settings to
623 their default values by turning off the \dap, and turning it back on
624 with the \ButtonHold{} button on.}
626 \opt{IPOD_4G_PAD}{\note{You can also reset all settings to their default
627 values by turning off the \dap, turning it back on, and activating the
628 \ButtonHold{} button immediately after the backlight comes on.}
630 \opt{GIGABEAT_PAD}{\note{You can also reset all settings to their default
631 values by turning off the \dap, turning it back on and pressing the
632 \ButtonA{} button immediately after the \dap{} turns on.}
635 \item [Save .cfg File]This option writes a \fname{.cfg} file to
636 your \daps{} disk. The configuration file has the \fname{.cfg}
637 extension and is used to store all of the user settings that are described
638 throughout this manual.
640 Hint: Use the \setting{Save .cfg File} feature (\setting{Main Menu
641 $\rightarrow$ Manage Settings}) to save the current settings, then
642 use a text editor to customize the settings file. See Appendix
643 \reference{ref:config_file_options} for the full reference of available
644 options.
646 \item [Save Sound Settings]This option writes a \fname{.cfg} file to
647 your \daps{} disk. The configuration file has the \fname{.cfg}
648 extension and is used to store all of the sound related settings.
650 \item [Save Theme Settings]This option writes a \fname{.cfg} file to
651 your \daps{} disk. The configuration file has the \fname{.cfg}
652 extension and is used to store all of the theme related settings.
654 \end{description}
656 \section{\label{ref:FirmwareLoading}Firmware Loading}
657 \opt{player,recorder,recorderv2fm,ondio}{
658 When your \dap{} powers on, it loads the Archos firmware in ROM, which
659 automatically checks your \daps{} root directory for a file named
660 \firmwarefilename. Note that Archos firmware can only read the first
661 ten characters of each filename in this process, so do not rename your old
662 firmware files with names like \firmwarefilename.\fname{old} and so on,
663 because it is possible that the \dap{} will load a file other than the one
664 you intended.
667 \subsection{\label{ref:using_rolo}Using ROLO (Rockbox Loader)}
668 Rockbox is able to load and start another firmware file without rebooting.
669 You just ``play'' a file with the extension %
670 \opt{recorder,recorderv2fm,ondio}{\fname{.ajz}.} %
671 \opt{player}{\fname{.mod}.} %
672 \opt{iriverh100,iriverh300}{\fname{.iriver}.} %
673 \opt{ipod}{\fname{.ipod}.} %
674 \opt{iaudio}{\fname{.iaudio}.} %
675 \opt{sansa,iriverh10,iriverh10_5gb,vibe500}{\fname{.mi4}.} %
676 \opt{sansaAMS}{\fname{.sansa}.} %
677 \opt{gigabeatf,gigabeats}{\fname{.gigabeat}.} %
678 This can be used to test new firmware versions without deleting your
679 current version.
681 \opt{archos}{\input{advanced_topics/archos-flashing.tex}}
683 \section{Optimising battery runtime}
684 Rockbox offers a lot of settings that have high impact on the battery runtime
685 of your \dap{}. The largest power savings can be achieved through disabling
686 unneeded hardware components -- for some of those there are settings
687 available.
688 \opt{swcodec}{
689 Another area of savings is avoiding or reducing CPU boosting
690 through disabling computing intense features (e.g. sound processing) or
691 using effective audio codecs.
692 } The following provides a short overview of the most relevant settings and
693 rules of thumb.
695 \nopt{ondio}{
696 \subsection{Display backlight}
697 The active backlight consumes a lot of power. Therefore choose a setting that
698 disables the backlight after timeout (for setting \setting{Backlight} see
699 \reference{ref:Displayoptions}). Avoid to have the backlight enabled all the
700 time.
703 \opt{lcd_sleep}{
704 \subsection{Display power-off}
705 Shutting down the display and the display controller saves a reasonable amount
706 of power. Choose a setting that will put the display to sleep after timeout
707 (for setting \setting{Sleep} see \reference{ref:Displayoptions}). Avoid to
708 have the display enabled all the time -- even, if the display is transflective
709 and is readable without backlight. Depending on your \dap{} it might be
710 significantly more efficient to re-enable the display and its backlight for a
711 glimpse a few times per hour than to keep the display enabled.
714 \opt{accessory_supply}{
715 \subsection{Accessory power supply}
716 As default your \dap{}'s accessory power supply is always enabled to ensure
717 proper function of connected accessory devices. Disable this power supply, if
718 -- or as long as -- you do not use any accessory device with your \dap{} while
719 running Rockbox (see \reference{ref:AccessoryPowerSupply}).
722 \opt{lineout_poweroff}{
723 \subsection{Line Out}
724 Rockbox allows to switch off the line-out on your \dap{}. If you do not need
725 the line-out, switch it off (see \reference{ref:LineoutOnOff}).
728 \opt{spdif_power}{
729 \subsection{Optical Output}
730 Rockbox allows to switch off the S/PDIF output on your \dap{}. If you do not
731 need this output, switch it off (see \reference{ref:SPDIF_OnOff}).
734 \opt{disk_storage}{
735 \subsection{Anti-Skip Buffer}
736 Having a large anti-skip buffer tends to use more power, and may reduce your
737 battery life. It is recommended to always use the lowest possible setting
738 that allows correct and continuous playback (see \reference{ref:AntiSkipBuf}).
741 \opt{swcodec}{
742 \subsection{Replaygain}
743 Replaygain is a post processing that equalises the playback volume of audio
744 files to the same perceived loudness. This post processing applies a factor
745 to each single PCM sample and is therefore consuming additional CPU time. If
746 you want to achieve some (minor) savings in runtime, switch this feature off
747 (see \reference{ref:ReplayGain}).
750 \opt{lcd_bitmap}{
751 \subsection{Peak Meter}
752 The peak meter is a feature of the While Playing Screen and will be updated with a
753 high framerate. Depending on your \dap{} this might result in a high CPU load. To
754 save battery runtime you should switch this feature off (see \reference{ref:peak_meter}).
755 \opt{ipodvideo}{
756 \note{Especially the \playerman{} \playertype{} suffers from an enabled peak meter.}
760 \opt{swcodec,disk_storage,flash_storage}{
761 \subsection{Audio format and bitrate}
762 \opt{swcodec}{
763 In general the fastest decoding audio format will be the best in terms of
764 battery runtime on your \dap{}. An overview of different codec's performance
765 on different \dap{}s can be found at \wikilink{CodecPerformanceComparison}.
768 \opt{flash_storage}{
769 Your target uses flash that consumes a certain amount of power during access.
770 The less often the flash needs to be switched on for buffering and the shorter
771 the buffering duration is, the lower is the overall power consumption.
772 Therefore the bitrate of the audio files does have an impact on the battery
773 runtime as well. Lower bitrate audio files will result in longer battery
774 runtime.
776 \opt{disk_storage}{
777 Your target uses a hard disk which consumes a large amount of power while
778 spinning -- up to several hundred mA. The less often the hard disk needs to
779 spin up for buffering and the shorter the buffering duration is, the lower is
780 the power consumption. Therefore the bitrate of the audio files does have an
781 impact on the battery runtime as well. Lower bitrate audio files will result
782 in longer battery runtime.
785 Please do not re-encode any existing audio files from one lossy format to
786 another based upon the above mentioned. This will reduce the audio quality.
787 If you have the choice, select the best suiting codec when encoding the
788 original source material.
791 \opt{swcodec}{
792 \subsection{Sound settings}
793 In general all kinds of sound processing will need more CPU time and therefore
794 consume more power. The less sound processing you use, the better it is for
795 the battery runtime (for options see \reference{ref:configure_rockbox_sound}).