Skip to content

Commit ec72b6d

Browse files
committed
Document breaking change in changelog
1 parent daaafa2 commit ec72b6d

File tree

2 files changed

+21
-4
lines changed

2 files changed

+21
-4
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2929

3030
### Breaking Change
3131
* `focus_XYZ` key bindings are merged into the `move_XYZ` set, so only one way to bind arrow-like keys from now on ([#1539](https://github.com/extrawurst/gitui/issues/1539))
32-
* The format of `theme.ron` has changed
32+
* Do you use a custom theme?
33+
34+
The way themes work got changed and simplified ([see docs](https://github.com/extrawurst/gitui/blob/master/THEMES.md) for more info):
35+
36+
* The format of `theme.ron` has changed: you only specify the colors etc. that should differ from their default value
37+
* Future additions of colors etc. will not break existing themes anymore
3338

3439
### Added
3540
* allow reset (soft,mixed,hard) from commit log ([#1500](https://github.com/extrawurst/gitui/issues/1500))

THEMES.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,27 @@
33
default on light terminal:
44
![](assets/light-theme.png)
55

6-
to change the colors of the default theme you have to modify `theme.ron` file
7-
[Ron format](https://github.com/ron-rs/ron) located at config path. The path differs depending on the operating system:
6+
To change the colors of the default theme you need to add a `theme.ron` file that contains the colors you want to override. Note that you don’t have to specify the full theme anymore (as of 0.23). Instead, it is sufficient to override just the values that you want to differ from their default values.
7+
8+
The file uses the [Ron format](https://github.com/ron-rs/ron) and is located at one of the following paths, depending on your operating system:
89

910
* `$HOME/.config/gitui/theme.ron` (mac)
1011
* `$XDG_CONFIG_HOME/gitui/theme.ron` (linux using XDG)
1112
* `$HOME/.config/gitui/theme.ron` (linux)
1213
* `%APPDATA%/gitui/theme.ron` (Windows)
1314

14-
Alternatively you may make a theme in the same directory mentioned above with and select with the `-t` flag followed by the name of the file in the directory. E.g. If you are on linux calling `gitui -t arc.ron` wil use `$XDG_CONFIG_HOME/gitui/arc.ron` or `$HOME/.config/gitui/arc.ron`
15+
Alternatively, you can create a theme in the same directory mentioned above and use it with the `-t` flag followed by the name of the file in the directory. E.g. If you are on linux calling `gitui -t arc.ron`, this will load the theme in `$XDG_CONFIG_HOME/gitui/arc.ron` or `$HOME/.config/gitui/arc.ron`.
16+
17+
Example theme override:
18+
19+
```
20+
(
21+
selection_bg: Some(Blue),
22+
selection_fg: Some(White),
23+
)
24+
```
25+
26+
Note that you need to wrap values in `Some` due to the way the overrides work (as of 0.23).
1527

1628
Notes:
1729

0 commit comments

Comments
 (0)