Documentation · Settings
Lang Switcher’s settings file: where it is and what to edit
%APPDATA%\. Some things can only be changed there: how many seconds it takes for a word to be forgotten, the replacement method and the clipboard pauses — and letters and news from my feed, which no window has a switch for.
Where it is
%APPDATA%\. Each Windows user has their own. There are no settings in the program folder, C:\. Next to the file you may find the diag.log journal, if you’ve turned it on, and config.toml.bad, a copy of a corrupted file.
Win+E opens File Explorer; type %APPDATA%\Lang_Switcher in the address bar and press Enter: config.toml is in that folder.How to edit it
- Exit the program: tray menu → “Exit”.
- Open
config.tomlin Notepad, make your changes and save. - Start Lang Switcher again from the Start menu.
Ctrl+S.Win → type “lang” → “Lang Switcher”: the program is running again, and its icon is back in the tray.Why exit first? The program writes the file from scratch, using what it has in memory, after every change in the settings window and when it exits. A change made while it’s running will be lost, and comments, the order of lines and lines the program doesn’t know won’t survive the rewrite.
What’s only in the file
The settings window doesn’t show everything. These keys can only be changed in the file:
| Section and key | What it sets |
|---|---|
| [buffer] idle_timeout_s | How many seconds without typing before a word is forgotten. The default is 300, and 0 means never; otherwise, from 30 to 86,400. |
| [buffer] capacity | How many recent keystrokes the program remembers. The default is 256, from 1 to 4,096; 0 is read as 256. |
| [replacement] method | How the text is replaced. auto (the default) picks a method for each window and suits almost everyone; backspace and selection force one by hand, as a last resort. |
| [replacement] inter_event_delay_ms | A pause between the events of a replacement, in milliseconds, for programs that lose fast input. The default is 0, and the maximum is 250. |
| [selection] clipboard_timeout_ms | How long to wait for selected text to reach the clipboard, in milliseconds. The default is 300, and the maximum is 5,000. |
| [selection] clipboard_restore_delay_ms | How long to wait before putting back what was on the clipboard. The default is 200, and the maximum is 5,000. If the old clipboard contents get pasted instead of the converted selection, raise it. |
| [letters] feed | Whether to show letters, news and cards from the author’s feed: true or false. None of the program’s windows has a switch for the feed. |
What matches the window
The other sections hold the same settings as the window:
[general]:enabled(falsemeans the program is suspended),autostart,language(the interface language: a code such asen,ruorhe, 66 in all; it’s easier to choose the language in the settings window, and the program writes the code itself) andtheme(system,lightordark);[hotkey]: the hotkey, and[switch_hotkey]: “Two keys” and the second key, both explained on the hotkey page;[layouts]: a pair or a cycle, explained in Three or more layouts;[general] tray_flag: “Layout flag in the tray”;[selection] enabled: “Fix the selected text”;[exclusions] processes: the exclusions;[feedback] sound: “Sound feedback”;[diagnostics] log_enabled: “Keep a journal”;[letters] release_window: “Tell me about program updates”.
The rest of [letters], and schema_version, are kept by the program itself: the dates and state of letters, and the version of the file’s format. Leave them alone.
If you made a mistake
- Not a valid number in a number field (
300ms,-1): that key gets its default value, and the rest of the file is read as usual. A number outside the limits in the table is set to the nearest limit. - A mistake anywhere else, such as a typo in
mode,methodorlanguage, or a broken quote or bracket, makes the whole file count as corrupted. The program renames it toconfig.toml.badand starts with the default settings. It doesn’t tell you about it, so take a look in the folder. - An unknown key name in
[hotkey]: the hotkey falls back toPause, and under the field in the settings window you’ll see “The key name is not recognized — the default key, Pause, is in force.” - A second key in
[switch_hotkey]that’s no good (an unknown name, or the same main key as the first): it does nothing,Pausedoesn’t step in for it, and under the field you’ll see “The second key in the settings file is not valid; it does nothing.” - A layout that Windows doesn’t have: the “Layouts” section shows “The session has no layout named in the file (…) — choose again.”
See also
Questions and problemson GitHub Issues ↗ or by email: send.me@panda-pishet-kod.dev