Downloads
release
dev builds
extras
themes
Documentation
manual
wiki
device status
Support
forums
mailing lists
IRC
Development
bugs
patches
dev guide
Search
Search
| Go
Wiki
>
Main
>
CustomFiletypeColours
---+!! Custom Filetype Colours %TOC% <br /> --- ---++ Description Rockbox has the capability to modify the File Browser to show different filetypes in different colours, depending upon the file extension. It makes your file view look something like this: <img src="%ATTACHURLPATH%/CustomColours.png"> This is achieved by creating or modifying a =.colours= file and then activating the option using a config file. <br /> --- ---++ Location The =.colours= file should be stored in =/.rockbox/themes=. It is a simple text file and can be created from scratch, or a sample can be copied from =/.rockbox/docs= <br /> --- ---++ Syntax The file syntax is the file extension (or =folder=) followed by a colon and then the colour required as an RGB value in hexadecimal. <verbatim> folder:808080 ipod:00B0B0 mp3:00FF00 flac:00FF00 ogg:00FF00 txt:FF0000 cfg:D00000 ???:AABBCC </verbatim> The only limitation is that the extension must be one of Rockbox's 'known' filetypes, as listed in [[http://svn.rockbox.org/viewvc.cgi/trunk/apps/filetypes.c?view=markup][filetypes.c]]. This does not include, for example, =.config=. It also recognises the firmware extensions (=.ipod=, =.mi4= etc.). The last item in the above example (=???=) is the colour to use for files which are not recognised. --- ---++ Activation In order to activate the filetype colours option, it has to be invoked from within a standard Rockbox configuration file (=*.cfg=). The easiest way is to create a new text file containg the following single line: filetype colours: /.rockbox/themes/filename.colours where _filename_ is replaced by the filename you used when creating the =.colours= file. Save this file as =colours.cfg= in the =/.rockbox/themes= directory and then activate the config file from the menu as normal (Settings > Theme Settings > Browse Themes) Alternatively, you could save a config file (Settings > Manage Settings > Save .cfg File), edit the =filetype colours= entry and then select your re-saved config file. <br /> --- ---++ Editing The built-in Text Editor automatically understands the file format, but an external text editor can also be used. To edit the =.colours= file using Rockbox, just select it in the File Browser. The file will open in the Text Editor. Click on a line to edit it and the following choice will appear: <img src="%ATTACHURLPATH%/SelectWhat.png"> If =Extension= is selected, the virtual keyboard appears, allowing the file extension to be modified. <img src="%ATTACHURLPATH%/FiletypeEdit.png"> If =Color= is selected, the standard colour selector screen appears (as per changing foreground and background colours) <img src="%ATTACHURLPATH%/ColourEdit.png"> ---
E
dit
|
A
ttach
|
P
rint version
|
H
istory
: r5
<
r4
<
r3
<
r2
|
B
acklinks
|
V
iew topic
|
M
ore topic actions
r5 - 17 Nov 2008 - 11:53:30 -
JonathanGordon
Parents:
WebHome
Copyright © by the contributing authors.