DC - doublecmd.xml

# 2.12. Settings in doublecmd.xml

## Content

1. Presentation
2. Location
3. Options to change manually

## 1. Presentation

Main settings of Double Commander are saved/restored to/from an XML file named `doublecmd.xml`.

(back to top)

## 2. Location

The location of this `doublecmd.xml` file may be in different places:

- It may be configured to be in the user home directory.
- It may be configured to be in the program directory itself, which is commonly the case when used in a portable context.
- We may define its location via a command line parameter when launching the application.

We follow this link if we want to specify it by with the command line paramter `--config-dir`.

Other than that, we do Configuration > Options > select in the tree > set the option Location of configuration files.

Another way to quickly find out where is located the `doublecmd.xml` the current instance of Double Commander is using is by accessing the Directory Hotlist. At the end of it there is a sub section called "Special Dirs". Then we select "Go to Double Commander special path" and then "%DC_CONFIG_PATH%". We will find there the `doublecmd.xml` that application is currently using.

(back to top)

## 3. Options to change manually

The large majority of possible settings in Double Commander may be set via the application itself through the various option categories.

We simply click from the main menu bar Configuration > Options and the various settings we'll configured there will be saved to the `doublecmd.xml` file when we close the application. Then, they will be restored on the next usage of the application.

So generally, we don't have to manually edit the content of the configuration file.

But there are some very rare specific settings that required to be edited manually from the configuration file if we want to tweak the application.

WARNING: We will not edit that file WHILE Double Commander is running! Not only because anyway their values are read only when we're starting the application, but also because if we edited the file while DC is running, when we'll close the application the values we would have wrote will be overwritten by the application re-saving its current context for next session. If we need to edit the `doublecmd.xml` file, we need to make sure we close Double Commander, then we edit file, and then we re-launch the application.

The following table gives us these rare specific settings that we need to manually edit the file if we need to change them:

Setting required to be changed manually if necessary
Tag | Description
--- | ---
<ActiveRight> from <Behaviours> | The right panel will be active when Double Commander starts.
Value | Description
--- | ---
True | Right panel
False | Left panel (default)
Example: `<ActiveRight>True</ActiveRight>`
<SingleClickStart> from <Behaviours><Mouse> | This will determine what will launch the action when we're using the mouse button on an element from the displayed file list in a panel.
Value | Description
--- | ---
0 | A double click is necessary to launch the action (default).
1 | A single click opens files and folders.
2 | A single click only opens folders. For files, a double click is needed.
4 added to above | The text cursor no longer follows the mouse cursor.
If we want... ...a single click opens files and folders: 1 + 0 = 1 so `<SingleClickStart>1</SingleClickStart>` ...a single click only opens folders, for files, a double click is needed: 2 + 0 = 2 so `<SingleClickStart>2</SingleClickStart>` ...a single click opens files and folders, the text cursor not follows the mouse cursor: 1 + 4 = 5 so `<SingleClickStart>5</SingleClickStart>` ...a single click only opens folders, the text cursor not follows the mouse cursor: 2 + 4 = 6 so `<SingleClickStart>6</SingleClickStart>`
<Quality> from many tags <Font> | Determine what type of font rasterization that will be used. In other words, it determine the font quality. There are many tags where it's applicable individually.
Value | Description
--- | ---
0 | Default: The quality is determined by the system settings (default).
1 | Draft: For raster fonts, scaling is enabled; the font size can be increased but the quality may be lower. Also the font supports Bold, Italic, Underline or Strikeout if necessary. The quality is less important than when Proof is used.
2 | Proof: The quality of the characters is important, so for the raster fonts, scaling is disabled and the font closest in size is chosen.
3 | NonAntialiased: The font is never antialiased.
4 | Antialiased: The font is always antialiased if it supports it. The size of the font cannot be too small or too large.
5 | ClearType: The font is rendered using the ClearType anti-aliasing method.
6 | ClearTypeNatural: The font is rendered using the Natural ClearType antialiasing method.
Example: `<Quality>1</Quality>`
<gBorderFrameWidth> from <Colors> | We may configure DC so it will draw a rectangle around the active entry as we we cycle through them in a panel. This <gBorderFrameWidth> setting allows us to configure the width of the lines used to draw a rectangle around the current active entry. To view that rectangle, we must go in Configuration > Options > Colors > File panels and check the option Use frame cursor. Example: `<gBorderFrameWidth>1</gBorderFrameWidth>`
<TitleStyle> from <FilesViews><ColumnsView> | Changes the look of tabstop headers bar. Default value depends on your OS.
Value | Description
--- | ---
0 | tsLazarus: The default Lazarus's look.
1 | tsStandard: A more contrasted look, like Delphi grids.
2 | tsNative: Tries to set a look that is in concordance with current widgetset theme.
Example: `<TitleStyle>2</TitleStyle>`
<ExtraLineSpan> from <FilesViews> | This setting allows to add some extra pixels to the height allowed for each element displayed in the file panels. The value is interpreted directly in pixels. Default value is 2. Example: `<ExtraLineSpan>2</ExtraLineSpan>`
<NtfsHourTimeDelay> from <FileOperations> | Ignore time difference of exactly one hour between entries when comparing their date and time. This takes place when using internal commands cm_CompareDirectories or cm_SyncDirs. It is useful when comparing items located on a NTFS partition to another one not on such partition. Since the time stamp of a file changes on a NTFS partition when daylight savings period occurs and not when the same exact file is from a FAT32, we want the two files to be consider identical even if we visibly see a one hour difference between the two.
Value | Description
--- | ---
True | Enable, a difference of exactly one hour will be considered the same time
False | Disable (default)
Example: `<NtfsHourTimeDelay>True</NtfsHourTimeDelay>`
<AutoExtractOpenMask> from <FileOperations> | Suppose we've "entered" into a compressed file and browing its content in the active panel. The files with the specified extension of this setting will be automatically unpacked from the archive when we press `Enter` or double-click on them instead of showing the properties window. Example: `<AutoExtractOpenMask>*.txt;*.mp3;*.mp4</AutoExtractOpenMask>`
<Mode> from <AutoRefresh> | The ability to delete watched directories. A "watched directory" is a directory that Double Commander has a kind of hook on it so it can monitor any modification in it. This way, it can refresh the displayable content of it if it's content changed. This setting allows to control how Double Commander will react if we attempt to delete one of these "watched directory" currently displayed in a panel, even in a non-activated tab.
Value | Description
--- | ---
0 | Prevents deleting watched directories.
1 | Does not prevent deleting watched directories (default).
2 | Watch whole drives instead of single directories to omit problems with deleting watched directories.
Example: `<Mode>1</Mode>`
<CustomIcons> from <Icons> | This option will help to determine if the icons used for drives, folders or archives will be the default ones from the system (Windows only) OR if it will be custom ones that we may set ourselves. The `CustomIcons` option will be set to a single number representing the sum of the numbers from the following table depending on what are our preferences:
Element | From system | Custom
--- | --- | ---
Drives | 0 | 1
Folders | 0 | 2
Archives | 0 | 4
If we want... ...everything from the system: 0 + 0 + 0= 0 so `<CustomIcons>0</CustomIcons>` ...everything custom: 1 + 2 + 4 = 7 so `<CustomIcons>7</CustomIcons>` ...drive custom, other system: 1 + 0 + 0 = 1 so `<CustomIcons>1</CustomIcons>` etc... If we wish to use custom icons, here is the location for each items:
Element | Location
--- | ---
Drives | %commander_path%\pixmaps\theme\XxX\devices\
Folders | %commander_path%\pixmaps\theme\XxX\places\folder.png
Archives | %commander_path%\pixmaps\theme\XxX\mimetypes\package-x-generic.png
<DiskAlpha> from <Icons> | Option to set the transparency level of unmounted drive icons.
Value | Description
--- | ---
1 to 99 | Valid transparency level (default is 50).
0 or 100 | Disables function.
<ImageExifRotate> from <Viewer> | Double Commander is able to recognize the metadata from Exif structure that might be encoded into a JPG image file. Inside that structure, there is an orientation flag that may be used to display the picture into the same orientation as it was taken like if was in portrait, landscape, upside-down, mirror, etc. The `ImageExifRotate` tag configures Double Commander to indicate if we want the viewer to display the image using that information or not.
Value | Description
--- | ---
True | Use the orientation flag embedded into the image file (default).
False | Ignore the orientation flag.
Example: `<ImageExifRotate>True</ImageExifRotate>`
<TabSpaces> from <Viewer> | For the internal viewer, set the width of tab stops to use. The valid range goes from 1 to 32 and default value is 8. Example: `<TabSpaces>4</TabSpaces>`
<MaxTextWidth> from <Viewer> | For the internal viewer, configure the maximum number of characters to be displayed on one text line prior to wrap it up to the next one. The valid range goes from 80 to 16384 and default value is 1024. Example: `<MaxTextWidth>1024</MaxTextWidth>`
<PathToLibrary> from <Lua> | This is the path to indicate where is the Lua library. It will indicate the location of the required dll file `lua5.1.dll` when doing Lua Scripting. This path may be relative to the Double Commander executable file. Example: `<PathToLibrary>..\..\Other\dll\lua5.1.dll</PathToLibrary>`
<UseShellForFileOperations> | To use the rename function as in Explorer. Works correctly with UAC.
Value | Description
--- | ---
True | Enable (default)
False | Disable
Example: `<UseShellForFileOperations>True</UseShellForFileOperations>`
<Info>, <Error> and <Success> from <Colors><LogWindow> | Change text color of log window (info, error, success messages). We can set color as hex number using format $BBGGRR. For example, if we want to use blue color for text of info messages: `<Info>$FF0000</Info>`
Attribute Save from <SyncDirs><Asymmetric> | Synchronize directories: save or not asymmetric mode by default. If we want to save state of mode then `<Asymmetric Save="True">` or `<Asymmetric Save="False">` otherwise (by default).

(back to top)