This repository contains a default configuration file for the WezTerm terminal and a Python script to automatically generate a the wezterm.lua config file by fetching and parsing the default key bindings from the official WezTerm GitHub page.
- wezterm.lua: The default configuration file for WezTerm.
- script/get_config.py: A Python script that fetches the default key bindings from WezTerm's GitHub repository, parses them, and generates a- wezterm.luaconfiguration file.
- Clone the repository:
git clone https://github.com/Iooon/wezterm-default-config.git 
- Once generated, you can move the wezterm.luafile to your WezTerm configuration directory (~/.config/wezterm/for Linux/macOS or in the same directory as thewezterm.exefor Windows). For more information about the configuration check here.
Or alternativly
- 
Backup your configuration mv ~/.config/wezterm{,.bak}
- 
Clone the config git clone https://github.com/Iooon/wezterm-default-config.git ~/.config/wezterm
The configuratio file disables the default key bindings by setting config.disable_default_key_bindings = true. This allows to customize the key bindings as needed in the generated config.
Example of the configuration file:
-- Disable default key bindings and allow custom bindings
config.disable_default_key_bindings = true
-- Custom key bindings can be added here, for example:
config.keys = {
    { key="C", mods="CTRL", action=wezterm.action.CopyTo("Clipboard") },
    { key="V", mods="CTRL", action=wezterm.action.PasteFrom("Clipboard") },
    -- Add more custom key bindings here
}This allows you to customize your key bindings while ensuring that the default bindings do not conflict with your custom configuration.
- 
Run the Python script to generate the WezTerm config file: python3 get_config.py This will: - The script uses the requestslibrary to download the markdown file from the WezTerm GitHub repository containing the default key bindings.
- It then uses the re(regex) module to extract key bindings in the format of the table from the markdown file.
- The key bindings are then transformed into Lua configuration format and written to a new wezterm.luafile.
 
- The script uses the 
- Thanks to the WezTerm project for their amazing terminal emulator.
- This project leverages the WezTerm community and documentation to automate the generation of configuration files.
Feel free to contribute to this repository by submitting issues or pull requests to improve the functionality or add new features!