You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make theme config more flexible so
- it is possible to only set some of the component styles in theme.toml
- it is possible to not set the palette in theme.toml (and just modify component styles)
- it is possible to set the border style with the new component_style attribute border
- it is possible to set the style of the current selection with the new component_style selection
Co-authored-by: Thang Pham <[email protected]>
Copy file name to clipboardExpand all lines: docs/config.md
+7-3Lines changed: 7 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -89,7 +89,7 @@ The application's theme can be modified by setting the `theme` option in `app.to
89
89
90
90
A theme has three main components: `name` (the theme's name), `palette` (the theme's color palette), `component_style` (a list of pre-defined styles for application's components).
91
91
92
-
`name`and `palette` are required when defining a new theme. If `component_style` is not specified, a default value will be used.
92
+
`name`is required when defining a new theme. If `palette` is not set, a palette based on the terminal's colorscheme will be used. If `component_style` is not specified, a default value will be used.
93
93
94
94
An example of user-defined themes can be found in the example [`theme.toml`](../examples/theme.toml) file
95
95
@@ -133,30 +133,34 @@ If specified, a field's value must be set to be a hex representation of a RGB co
133
133
134
134
### Component Styles
135
135
136
-
To define application's component styles, user needs to specify **all of the below fields**:
136
+
To define application's component styles, the user can specify any of the below fields:
137
137
138
138
-`block_title`
139
+
-`border`
139
140
-`playback_track`
140
141
-`playback_album`
141
142
-`playback_metadata`
142
143
-`playback_progress_bar`
143
144
-`current_playing`
144
145
-`page_desc`
145
146
-`table_header`
147
+
-`selection`
146
148
147
-
A field in the component styles is a `Style` struct which has three optional fields: `fg`, `bg` and `modifiers`. `fg` and `bg` can be either a palette's color (string in pascal case) or a custom RGB color using the following format: `fg = { Rgb { r = ..., g = ..., b = ... } }`. `modifiers` can only be either `Italic`or `Bold`.
149
+
A field in the component styles is a `Style` struct which has three optional fields: `fg`, `bg` and `modifiers`. `fg` and `bg` can be either a palette's color (string in pascal case) or a custom RGB color using the following format: `fg = { Rgb { r = ..., g = ..., b = ... } }`. The default values for `fg` and `bg` are the `palette`'s `fg` and `bg`. `modifiers` can only be `Italic`, `Bold`or `Reversed`.
0 commit comments