# Edit configurations (pre-1.5)

{% hint style="info" %}
This is for versions older than 1.5.
{% endhint %}

## Location of the configuration file

Please take a look at this [page](https://lebao3105.gitbook.io/texteditor_doc/configure-texteditor#configuration-tree).

{% hint style="success" %}
Hint: If you don't see any of these files, please create .config and .logs folders under your home folder first, then open the app. If you still don't see anything, open the app from terminal.
{% endhint %}

## Open the file

{% hint style="info" %}
Note: Don't use`texteditor_bck.ini` as it is a backup of `texteditor_configs.ini`!
{% endhint %}

Since texteditor 1.3, I've added a button which can open the file easily - it's under the Config menu:

<figure><img src="https://2562052849-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FegulBnflHnpuOUT15KA3%2Fuploads%2FjZNegVNnQvqDk9zpcBK6%2FScreenshot%202022-09-10%20152603.png?alt=media&#x26;token=080c5d2d-7055-46d9-9f4e-7044811c5d47" alt=""><figcaption></figcaption></figure>

## Basic configurations

On the first run, Texteditor automatically creates configuration file(s) - it will like this:

```ini
[global]
color = light
sub_color = default
font = default
font_size = 14

[popups]
width = 250
height = 250

[cmd]
defconsole = xterm
isenabled = yes
writelog = no

[filemgr]
autosave = yes
autosave-time = 30
```

All sections available this time are: global, popups, cmd and filemgr. There will be more in future releases.

Let's see what do they mean...

### global section

Description: Define the entrie UI in texteditor what to do. Usually it's font color, background...

* color = UI background. You only can use `light` or `dark`.
* sub\_color = font color. Available colors defined in [constants](https://github.com/lebao3105/texteditor/blob/main/texteditor/miscs/constants.py): default (depends on the UI color), green, blue, red. You can't use green/blue/red if the color variable = light
* (version 1.4+) autocolor\_mode: You can turn it on or off (choose "yes" or "no") - this uses for automatically changes the application theme sync with the system. Disabled by the default.
* font = font style. The default font style is Consolas.
* font\_size = font size: The default is 14.

### popups

{% hint style="info" %}
Note: Actually, this is decrapted before. (from 1.2)
{% endhint %}

Description: Define how popup windows (in Tkinter they're TopLevel) work.

* width and height: width and height of the window (in pixel).

### cmd

Description: Configs the Command Window widget.

* `defconsole`: Default terminal EMULATOR (NOT shell please) - in Linux it's xterm, and Windows is cmd.
* `isenabled`: Whetever enable this widget or not. Only accept `yes` or `no`.
* `writelog` (not implemented yet): It should be in [global](#global-section) section - write logs into a file and nothing more.

### filemgr

Description: File manager class - now only autosave is implemented.

* `autosave`: Enable autosaving or not - only affect to the current opening tab. Only accept `yes` or `no`.
* `autosave-time`: Autosave time delay (in seconds): 30 - 60 (1 minute) - 900 (15 mins) - 1200 (20 mins) and 1800 (30 mins)

## Change a configuration

Just change the default value to any accepted value, then restart the application.

Start from version 1.3, we have some new configurations - both of them are accessible on Config menu:

* Toggle dark (or light mode): switch your theme to dark/light mode.
* Wrap (by word): Enable wrap (or disable it) for the editor

To turn a configuration on, set it to "yes". To turn off just set to "no".

## Reset configurations

There is a button in the config menu - yelp, just click OK on the new message and restart the application. Done!


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://lebao3105.gitbook.io/texteditor_doc/textworker-pre-1.6/edit-configurations-pre-1.5.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
