Skip to content

Commit

Permalink
Merge pull request #121 from ggozad/feature/disable-splash
Browse files Browse the repository at this point in the history
Allow disabling the splash screen.
  • Loading branch information
ggozad authored Sep 25, 2024
2 parents 2b6d269 + e351408 commit 24629b4
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Changelog
=========

0.6.3 -
------------------

- Allow disabling the splash screen.
[ggozad]

0.6.2 - 2024-09-25
------------------

Expand Down
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,23 @@ All your chat sessions are stored locally in a sqlite database. You can customiz

You can find the location of the database by running `oterm --db`.

### App configuration

The app configuration is stored in a directory specific to your operating system, by default:

* Linux: `~/.local/share/oterm/config.json`
* macOS: `~/Library/Application Support/oterm/config.json`
* Windows: `C:/Users/<USER>/AppData/Roaming/oterm/config.json`

If in doubt you can get the directory where `config.json` can be found by running `oterm --data-dir`.

You can set the following options in the configuration file:
```json
{ "theme": "dark", "splash-screen": true }
```

`theme` can be either `dark` or `light`. `splash-screen` controls whether the splash screen is shown on startup.

### Screenshots
![Splash](screenshots/splash.gif)
![Chat](screenshots/chat.png)
Expand Down
5 changes: 4 additions & 1 deletion src/oterm/app/oterm.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,10 @@ async def on_splash_done(message) -> None:
pane = TabPane(name, container, id=f"chat-{id}")
tabs.add_pane(pane)

self.push_screen(splash, callback=on_splash_done)
if appConfig.get("splash-screen"):
self.push_screen(splash, callback=on_splash_done)
else:
await on_splash_done("")

@on(TabbedContent.TabActivated)
async def on_tab_activated(self, event: TabbedContent.TabActivated) -> None:
Expand Down
4 changes: 4 additions & 0 deletions src/oterm/cli/oterm.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def oterm(
upgrade: bool = typer.Option(None, "--upgrade"),
config: bool = typer.Option(None, "--config"),
sqlite: bool = typer.Option(None, "--db"),
data_dir: str = typer.Option(None, "--data-dir"),
):
if version:
typer.echo(f"oterm v{metadata.version('oterm')}")
Expand All @@ -31,6 +32,9 @@ def oterm(
if sqlite:
typer.echo(envConfig.OTERM_DATA_DIR / "store.db")
exit(0)
if data_dir:
typer.echo(envConfig.OTERM_DATA_DIR)
exit(0)
if config:
typer.echo(pprint(envConfig))
exit(0)
Expand Down

0 comments on commit 24629b4

Please sign in to comment.