4.8. Editing the preference file

There are a couple of options in XNap which can't be configured through its graphical user interface. The reason for this is that most of these options are very special and often only exist due to small disagreements in the development team which crept up when the corresponding features were implemented.

The preference file can be found in the folder .xnap in your home directory. Its name is xnap3.properties. The syntax is pretty straightforward: each line contains one preference key and a preference value separated by a "=".

Before editing this file manually you should close XNap, otherwise all your changes will be lost since XNap will overwrite the file on exit.

The first settings you can change manually are the color settings for the progress bar in the transfer panels. The corresponding keys are "xnap.progressRunningColor" and "xnap.progressFinishedColor". The value you can set for these keys must be a natural number. Here is how you compute this number:

Choose values between 0 and 256 for the red, green and blue portion and compute red + 256 * green + 256 * 256 * blue.

My preferred values are:

Example 4-1. Configuring the progress bar colors


	  xnap.progressRunningColor=2677288
	  xnap.progressFinishedColor=586747
	

One of our developers noticed that XNap's main window height shrunk a little on each restart under KDE. In case you experience the same you can set the key "xnap.correctivePixels" to a small number like 5.

This will add five pixels to the window's height on each restart.

Example 4-2. Setting the corrective pixels


	  xnap.correctivePixels=5
	

When editing the preference file you can also change the order of the toplevel folders which are shown in the library panel. Here is my preferred order:

Example 4-3. Changing the order of toplevel folders


	  xnap.libraryTreeNodes=incompletes;downloads;shares;home;root
	

Make sure to use exactly these values and only change the order in which they appear, otherwise the missing folders won't show up in the library panel.

The number of entries you can have in your "open with" history is editable too:

Example 4-4. Setting the size of the "open with" command history


	  xnap.maxOpenWithCommands=10
	

You can have small icons in the transfer panel if you edit the following preference entry:

Example 4-5. Small icons in the transfer panel


	  xnap.useSmallTransferIcons=true