Skip to content

Commit

Permalink
Merge branch 'main' into evan/layout-doc
Browse files Browse the repository at this point in the history
  • Loading branch information
esimkowitz authored Nov 8, 2024
2 parents 945308c + e3370eb commit 2e68186
Show file tree
Hide file tree
Showing 9 changed files with 179 additions and 165 deletions.
66 changes: 66 additions & 0 deletions docs/docs/customization.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
sidebar_position: 1.5
id: "customization"
title: "Customization"
---

## Tab Themes

<img
title="Tab Context Menu"
style={{ float: "right", margin: "0 0 10px 10px" }}
src="/img/tab-context-menu.png"
width="300"
/>

Right click on any tab to bring up a menu which allows you to rename the tab and select different backgrounds.

It is also possible to create your own themes using custom colors, gradients, images and more by editing your presets.json config file. To see how Wave's built in tab themes are defined, you can check out our [default presets file](https://github.com/wavetermdev/waveterm/blob/main/pkg/wconfig/defaultconfig/presets.json).

<div style={{ clear: "both" }} />

## Terminal Customization

<img
title="Terminal Context Menu"
style={{ float: "right", margin: "0 0 10px 10px" }}
src="/img/terminal-context-menu.png"
width="300"
/>

#### Terminal Theme

Right click in the header area of any terminal block to bring up a menu which allows you to set a terminal
theme for that terminal.

You can set the default theme for all terminals (which haven't had their theme manually overridden) by editing your settings.json file and adding the key `term:theme` and setting it to the appropriate key. The keys can be found
in the [default termthemes.json file](https://github.com/wavetermdev/waveterm/blob/main/pkg/wconfig/defaultconfig/termthemes.json).

If you add your own termthemes.json file in the config directory, you can also add your own custom terminal themes (just follow the same format).

<div style={{ clear: "both" }} />

#### Font Size

From the same context menu you can also change the font-size of the terminal. To change the default font size across all of your (non-overridden) terminals, you can set the config key `term:fontsize` to the size you want. e.g. `{ "term:fontsize": 14}`.

#### Font Family

There is no UI to edit your default terminal font family. But, it _can_ be overridden. In your settings.json file you can add the key `term:fontfamily` and set it to a font that is _installed_ on your local system. If type a font that is not installed, or use a non-monospace font, your terminal will look terrible (don't do that 🙂), delete the key to return to using the default.

## Widgets Sidebar

<img
title="Terminal Context Menu"
style={{ float: "right", margin: "0 0 10px 10px" }}
src="/img/custom-widgets.png"
width="120"
/>

See [Custom Widgets](/customwidgets) for detailed documentation around changing what appears in your right widget sidebar.

Using widgets.json (and defaultwidgets.json) you'll be able to remove any default widgets and add widgets of your own. You can fully customize the icons, colors, text, and defaults (like directories, webpages, AI model, remote connection, commands, etc.) of your custom widgets.

You can also suppress the help widgets in the bottom right by setting the config key `widget:showhelp` to `false`.

<div style={{ clear: "both" }} />
40 changes: 20 additions & 20 deletions docs/docs/faq.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 7
sidebar_position: 101
id: "faq"
title: "FAQ"
---
Expand All @@ -10,27 +10,27 @@ title: "FAQ"

You must manually edit the [config file](./config) located at `~/.config/waveterm/settings.json`.

| Key Name | Type | Function |
|----------|------|----------|
| ai:baseurl | string | Set the AI Base Url (must be OpenAI compatible) |
| ai:apitoken | string | your AI api token |
| ai:name | string | string to display in the Wave AI block header |
| ai:model | string | model name to pass to API |
| ai:maxtokens | int | max tokens to pass to API |
| ai:timeoutms | int | timeout (in milliseconds) for AI calls |

Here's an example of pointing it to a local Ollama instance. Note that to get the text in the header of the AI block
to update, you'll need to set the "ai:name" key. For ollama, you'll also need to provide something for the
| Key Name | Type | Function |
| ------------ | ------ | ----------------------------------------------- |
| ai:baseurl | string | Set the AI Base Url (must be OpenAI compatible) |
| ai:apitoken | string | your AI api token |
| ai:name | string | string to display in the Wave AI block header |
| ai:model | string | model name to pass to API |
| ai:maxtokens | int | max tokens to pass to API |
| ai:timeoutms | int | timeout (in milliseconds) for AI calls |

Here's an example of pointing it to a local Ollama instance. Note that to get the text in the header of the AI block
to update, you'll need to set the "ai:name" key. For ollama, you'll also need to provide something for the
apitoken (even though it is ignored).

Here are the ollma open AI compatibility docs: https://github.com/ollama/ollama/blob/main/docs/openai.md

```json
{
"ai:baseurl": "http://localhost:11434/v1",
"ai:name": "llama3.2",
"ai:model": "llama3.2",
"ai:apitoken": "ollama"
"ai:baseurl": "http://localhost:11434/v1",
"ai:name": "llama3.2",
"ai:model": "llama3.2",
"ai:apitoken": "ollama"
}
```

Expand All @@ -39,7 +39,7 @@ Here are the ollma open AI compatibility docs: https://github.com/ollama/ollama/
You must manually edit the [config file](./config) located at `~/.config/waveterm/settings.json`.

You'll need to set your `ai:baseurl` to your Azure AI Base URL (do not include query parameters or `api-version`).
You'll also need to set `ai:apitype` to `azure`. You can then set the `ai:model`, and `ai:apitoken` appropriately
You'll also need to set `ai:apitype` to `azure`. You can then set the `ai:model`, and `ai:apitoken` appropriately
for your setup.

### How can I see the block numbers?
Expand All @@ -48,14 +48,14 @@ The block numbers will appear when you hold down Ctrl-Shift (and disappear once

### How do I make a remote connection?

There is a button in the header. Click the <i className="fa-sharp fa-laptop"/> or <i className="fa-sharp fa-arrow-right-arrow-left"/>
There is a button in the header. Click the <i className="fa-sharp fa-laptop"/> or <i className="fa-sharp fa-arrow-right-arrow-left"/>
and type the `[user]@[host]` that you wish to connect to.

### On Windows, how can I use Git Bash as my default shell?

In order to make Git Bash your default shell you'll need to set the configuration variable `term:localshellpath` to
the location of the Git Bash "bash.exe" binary. By default it is located at "C:\Program Files\Git\bin\bash.exe".
Just remember in JSON, backslashes need to be escaped. So add this to your [settings.json](./config) file:
the location of the Git Bash "bash.exe" binary. By default it is located at "C:\Program Files\Git\bin\bash.exe".
Just remember in JSON, backslashes need to be escaped. So add this to your [settings.json](./config) file:

```json
"term:localshellpath": "C:\\Program Files\\Git\\bin\\bash.exe"
Expand Down
Loading

0 comments on commit 2e68186

Please sign in to comment.