# 2.17. 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.

About color format: We can set color as hex number using format $BBGGRR (for example, if we want to use blue color, we would write `$FF0000`).

Setting required to be changed manually if necessary
Tag | Description
--- | ---
<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>`
<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>`
<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>`
<PathLabel> from <Colors> | Change colors of current directory bar:
Tag | File panel | Description
--- | --- | ---
<ActiveColor> | active | background color
<ActiveFontColor> | font color
<InactiveColor> | inactive | background color
<InactiveFontColor> | font color
<Info>, <Error> and <Success> from <Colors><LogWindow> | Change text color of log window (info, error, success messages).
<Added>, <Deleted> and <Modified> from <Differ><Colors> | For the internal Differ tool, set colors for added, deleted and modified lines.
<Modified> from <Differ><Colors><Binary> | For the internal Differ tool, set the color for differing characters in binary mode.
<FindWordAtCursor>(Alpha version) from <Editor> | Internal editor and differ tool: if nothing is selected, the search and replace dialog will use the word under the cursor (`True`) or text from the search history (`False`). `True` by default.
<AutoExtractOpenMask> from <FileOperations> | Suppose we've "entered" into a compressed file and browsing 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>`
<LongNameAlert> from <FileOperations> | Warn if target path is longer than maximum length for a path (some programs will not be able to access a file/directory with such a long name). In Windows this value (MAX_PATH) is defined as 260 characters. `True` by default.
<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>`
<CopyAttributes> from <FileOperations><Options> | Windows: if `True`, the attributes of the source file will be copied when copying/moving files; if `False`, the attributes of the source file will also be copied and Double Commander will set the "archive" attribute. Linux and othes: use the Copy attributes parameter in the copy/move dialog window. `True` by default.
<CopyTime> from <FileOperations><Options> | Windows: if `True`, the timestamps of the source file will be copied (creation date, modification date, last access date) when copying/moving files, otherwise, only the modification date will be copied and the current date will be used for others. Linux and othes: use the Copy date/time parameter in the copy/move dialog window. `True` by default.
<CopyXattributes> from <FileOperations><Options> | Copy filesystem extended attributes when copying/moving files or not. Windows: if `True`, compressed and encrypted attributes will also be copied. Linux and other Unix-like systems: if `True`, Double Commander will copy filesystem extended attributes (xattr, i.e. the named attributes). `True` by default.
<AutoCopy>(Alpha version) from <Viewer> | For the internal viewer, enables (`True`) or disables automatic copying of the selected text to the clipboard. `True` by default.
<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>`
<FolderPrefix> and <FolderPostfix> from <FilesViews> | By default DC shows square brackets around directory names (it's optional parameter in Files views > Files views extra), but we can use any symbols instead them. Note: In XML some special symbols are reserved as part of markup and we can not use them as is. There are five predefined entities: `<` should write as `&lt;`, `>` as `&gt;`, `&` as `&amp;`, `'` as `&apos;` and `"` as `&quot;`.
<AutoSaveWidth> from <FilesViews><ColumnsView> | When we manually change the column width with the mouse help, by default DC changes it for both panels and saves a new value for the next launches. If we want to disable this behavior and use new value only in the current session, we must replace `True` with `False`, i.e. use `<AutoSaveWidth>False</AutoSaveWidth>`.
<LongInStatus>(Alpha version) from <FilesViews><ColumnsView> | If the columns view is set and there are no selected files, the status bar displays the file name under the cursor (`True`) or the number of files (`False`, by default). If `True`, the status bar will also show the number of files when the cursor is on the ".." item. For links, target objects will additionally be displayed.
<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>`
<Quality> from many tags <Fonts> | 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>`
<CustomIcons> from <Icons> | Windows only: this option will help to determine if the icons used for drives, folders or archives will be the default ones from the system 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.
<ToolSize> from <Icons> | Size of toolbar icons in the internal editor, viewer and differ tool, supported values: 16, 24 or 32.
<ShowColonAfterDrive> from <Layout> | Windows only: show colon after letters of disks in the drives button bar and in the drives list. `False` by default.
<UppercaseDriveLetter> from <Layout> | Windows only: use uppercase letters in the drives button bar and in the drives list. `False` by default.
<DefaultTextEncoding> from <Miscellaneous> | By default (NONE), the built-in file viewer and the built-in editor use automatic encoding detection, but you can specify one of the supported single-byte encodings as the default value. The list of supported encodings can be viewed, for example, in the internal editor in the "Encoding" menu. Special values are also available:
Value | Description
--- | ---
ANSI | Default system ANSI encoding (depends on user locale).
OEM | Default system OEM (DOS) encoding (depends on user locale).
This parameter does not affect the automatic detection of multibyte encodings (UTF-8, UTF-16 and others).
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).
<Left>, <Right> and <Unknown> from <SyncDirs><Colors> | Text colors in the directory synchronization tool:
Tag | Description
--- | ---
<Left> | Files selected for copying or deleting on the left.
<Right> | Files selected for copying or deleting on the right.
<Unknown> | Files with the same names, but not identical.
<ExtraLineSpan> from <Viewer> | For the internal viewer, this setting allows to add some extra pixels to the height allowed for each line. The value is interpreted directly in pixels. Default value is 0. Example: `<ExtraLineSpan>2</ExtraLineSpan>`
<ImageBackColor1>(Alpha version) from <Viewer> | For the internal viewer, sets the background color of the window when viewing images.
<ImageBackColor2>(Alpha version) from <Viewer> | If Image > Show transparency is enabled, the internal viewer indicates transparency using a checkerboard pattern as background and `ImageBackColor2` defines the color of the squares. If not set, the viewer will automatically calculate the value: for a dark background, light squares will be used and vice versa.
<ImageExifRotate> from <Viewer> | Double Commander is able to recognize the EXIF metadata format that might be encoded into a JPEG image file. Inside that metadata, 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>`
<LeftMargin> from <Viewer> | For the internal viewer, this setting allows to add space between the left border of the window and the text border. The value is interpreted directly in pixels. Default value is 4. Example: `<LeftMargin>4</LeftMargin>`
<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>`
<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>`

(back to top)