Skip to content

Commit

Permalink
Documenting themes, adding location of themes to options menu
Browse files Browse the repository at this point in the history
  • Loading branch information
darrenburns committed Sep 12, 2024
1 parent e14e60e commit 9814277
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,23 @@ name = "gpt-3.5-turbo"
display_name = "GPT 3.5 Turbo (Personal)"
```

## Custom themes

Add a custom theme YAML file to the themes directory.
Here's an example:

```yaml
name: example # use this name in your config file
primary: '#4e78c4'
secondary: '#f39c12'
accent: '#e74c3c'
background: '#0e1726'
surface: '#17202a'
error: '#e74c3c' # error messages
success: '#2ecc71' # success messages
warning: '#f1c40f' # warning messages
```
## Changing keybindings
Right now, keybinds cannot be changed. Terminals are also rather limited in what keybinds they support.
Expand Down
2 changes: 1 addition & 1 deletion elia_chat/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ class LaunchConfig(BaseModel):
builtin_models: list[EliaChatModel] = Field(
default_factory=get_builtin_models, init=False
)
theme: str = Field(default="galaxy")
theme: str = Field(default="nebula")

@property
def all_models(self) -> list[EliaChatModel]:
Expand Down
5 changes: 3 additions & 2 deletions elia_chat/widgets/chat_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from textual.widgets import Footer, RadioSet, RadioButton, Static, TextArea

from elia_chat.config import EliaChatModel
from elia_chat.locations import config_file
from elia_chat.locations import config_file, theme_directory
from elia_chat.runtime_config import RuntimeConfig
from elia_chat.database.database import sqlite_file_name

Expand Down Expand Up @@ -91,7 +91,8 @@ def compose(self) -> ComposeResult:
with Vertical(id="xdg-info") as xdg_info:
xdg_info.border_title = "More Information"
yield Static(f"{sqlite_file_name.absolute()}\n[dim]Database[/]\n")
yield Static(f"{config_file()}\n[dim]Config[/]")
yield Static(f"{config_file()}\n[dim]Config[/]\n")
yield Static(f"{theme_directory()}\n[dim]Themes directory[/]")
# TODO - yield and dock a label to the bottom explaining
# that the changes made here only apply to the current session
# We can probably do better when it comes to system prompts.
Expand Down

0 comments on commit 9814277

Please sign in to comment.