Skip to content

Commit a711640

Browse files
committed
Added new feature doc on configuring a custom theme
1 parent 0298bd3 commit a711640

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

docs/features/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
- [Shortcuts, Aliases, and Macros](shortcuts_aliases_macros.md)
2828
- [Startup Commands](startup_commands.md)
2929
- [Table Creation](table_creation.md)
30+
- [Theme](theme.md)
3031
- [Transcripts](transcripts.md)
3132
<!--intro-end-->
3233
</div>

docs/features/theme.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Theme
2+
3+
`cmd2` provides the ability to configure an overall theme for your application using the
4+
[cmd2.rich_utils.set_theme][] function. This is based o the
5+
[rich.theme](https://rich.readthedocs.io/en/stable/reference/theme.html) container for style
6+
information. You can use this to brand your application and set an overall consistent look and feel
7+
that is appealing to your user base.
8+
9+
See [rich_theme.py](https://github.com/python-cmd2/cmd2/blob/main/examples/rich_theme.py) for a
10+
simple example of configuring a custom theme for your `cmd2` application.

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ nav:
186186
- features/shortcuts_aliases_macros.md
187187
- features/startup_commands.md
188188
- features/table_creation.md
189+
- features/theme.md
189190
- features/transcripts.md
190191
- Examples:
191192
- examples/index.md

0 commit comments

Comments
 (0)