* feat(settings): Allow to set a key when saving settings * chore(settings)!: Move all history-related config under "history" key * feat(settings)!: Remove dependency on gsettings Now every setting is read from the `settings.json` file. I added a model "default_settings.json" that might be used as a fallback in the future. The old schema has been gutted out until and kept until it won't be considered necessary to compile/install anymore. * chore(build): Remove GTK Schema * chore(docs): Update Documentation * chore(docs): Fix some typos * chore(build): Replace compile_schemas with update_desktop_database * chore(build): Copy default settings Edited the meson build file to copy the `default_settings.json` to `/usr/local/share/libresplit` and insert the path in a generated header file as per https://mesonbuild.com/Configuration.html This should fix the "defaults" problem. * fix(settings): Add missing checks and change copy of default settings For practicality, the settings file will be stat-ed first and copied over if it doesn't exist. * chore(build): Remove update_desktop_database due to actions * fix(settings): Merge default and user settings This allows us to update the default settings without breaking existing setups. If we add a keybind or anything, and it is missing from the user config, LibreSplit will do its best to fall back to the default value for each setting. * enhancement(settings): Rework settings loading logic
3 KiB
Settings and keybinds
LibreSplit uses JSON as its way to keep track of your preferences.
The settings file
Settings are saved in the settings.json file inside your XDG_CONFIG_HOME folder (it will usually be situated in ~/.config/libresplit/settings.json).
The settings file is divided in 3 main parts:
- libresplit: Which contains the general settings;
- keybinds: Which contains your key bindings;
- history: Which tracks the last splits, auto splitters, split folder and auto splitters folder you opened.
General settings
Under the libresplit section, you will find the following settings:
| Setting | Type | Description | Default |
|---|---|---|---|
start_decorated |
Boolean | Start with window decorations | false |
start_on_top |
Boolean | Start with window as always on top | true |
hide_cursor |
Boolean | Hide cursor in window | false |
global_hotkeys |
Boolean | Enables global hotkeys | false |
start_on_top |
Boolean | Start with window as always on top | false |
theme |
String | Default theme name | 'standard' |
theme_variant |
String | Default theme variant | '' |
Keybind settings
Under the keybind section, you will find the following key bindings:
| Keybind | Type | Description | Default |
|---|---|---|---|
start_split |
String | Start/split keybind | space |
stop_reset |
String | Stop/Reset keybind | Backspace |
cancel |
String | Cancel keybind | Delete |
unsplit |
String | Unsplit keybind | Page_Up |
skip_split |
String | Skip split keybind | Page_Down |
toggle_decorations |
String | Toggle window decorations keybind | Control_R |
toggle_win_on_top |
String | Toggle window "Always on top" state keybind | <Control>k |
Keybind strings must be parsable by the gtk_accelerator_parse.
See the complete list of keynames for gdk. Modifiers are enclosed in angular brackets <>: <Shift>, <Ctrl>, <Alt>, <Meta>, <Super>, <Hyper>. Note that you should use <Alt>a instead of <Alt>-a or similar.
Modifying the default values
You can edit the settings by directly changing the settings.json file inside of LibreSplit's configuration directory.