Configuration
All shells read the same file: ~/.config/opal/config.toml, on Windows as well. opal config edit opens it, and opal config path prints where it is.
Most settings apply at the next prompt. Aliases, functions, plugins and key bindings apply in new terminals, or after running reload.
General
| Setting | Default | What it does |
|---|---|---|
theme | "fire" | The prompt theme: fire, black, boulder, or one of your own. |
icons | "auto" | "nerd" for Nerd Font glyphs, "unicode", or "ascii". "auto" uses Nerd Font glyphs in terminals that include them (Opal Terminal, WezTerm, Ghostty) and Unicode elsewhere. |
color | "auto" | "truecolor", "256", "16" or "none". "auto" asks the terminal. NO_COLOR is respected. |
background | "dark" | Set to "light" on a light terminal background; themes then use darker colors. |
greeting | true | Show the opal banner when a new terminal opens. Shells started inside that terminal don't show it again. |
suggestions | true | Grey as-you-type suggestions (zsh engine, ble.sh in bash). |
completions | true | Load completion scripts generated by installed tools. |
plugins | all built-in | Which plugins to load. See Plugins. |
path | ["~/.local/bin", "~/bin"] | Folders added to the front of PATH if they exist. |
[prompt]
| Setting | Default | What it does |
|---|---|---|
blank_line | false | Print an empty line before each prompt. |
duration_threshold | 2.0 | Seconds a command has to run before its duration is shown. |
git_timeout_ms | 200 | How long the prompt waits for git status. If it takes longer, the prompt shows the last known counts (marked with …) and refreshes them in the background. |
max_dir_depth | 4 | How many folder names to show before shortening the path. |
time | false | Show the time. |
transient | true | Redraw finished prompts as just the prompt symbol (zsh, fish, PowerShell). |
semantic_marks | true | Send OSC 133 and OSC 7 marks, which let terminals jump between commands and open new tabs in the same folder. |
[history]
| Setting | Default | What it does |
|---|---|---|
shared | true | Record commands from every shell into the shared history. |
ctrl_r | true | Bind Ctrl+R to opal's history search. |
[shell.fish] and [shell.pwsh]
| Setting | Default | What it does |
|---|---|---|
shell.fish.abbreviations | true | Turn aliases into fish abbreviations, which expand as you type. Set to false for wrapper functions instead. |
shell.fish.greeting | false | Keep fish's own welcome message. |
shell.pwsh.clobber_builtin_aliases | false | Let plugin aliases replace PowerShell's built-in ones, such as gc (Get-Content) and gl (Get-Location). opal doctor lists the ones that clash. |
shell.pwsh.utf8 | true | Switch the console to UTF-8, so output from native programs keeps its characters. |
[core], [pkg] and [update]
| Setting | Default | What it does |
|---|---|---|
core.defaults | true | History size, completion and key binding defaults for each shell. |
pkg.prefer | Which package manager pkg uses when several are installed, for example "scoop". | |
update.repo | "gjnail/opal" | Where opal update downloads releases from. |
[terminal]
Opal Terminal's settings. Its settings page (Ctrl+Comma, or Cmd+Comma on macOS) edits them and applies each change right away; changes made by hand apply after Reload settings in the command palette, or the next time Opal Terminal starts.
| Setting | Default | What it does |
|---|---|---|
font_family | see right | A font name or a list of them; the first one installed is used. Without it, the first installed of Cascadia Mono, Cascadia Code and Consolas on Windows; SF Mono, Menlo and Monaco on macOS; JetBrains Mono, DejaVu Sans Mono and Noto Sans Mono on Linux. |
font_size | 12 (13 on macOS) | In points. |
line_height | 1.0 | Row height, as a multiple of the font's. |
cell_width | 1.0 | Widens or narrows every cell. |
shell | the first shell found | What new tabs open: a profile name ("PowerShell", "Opal Bash", one of yours) or a command line. On Windows the first shell found is Opal Bash. |
scrollback | 10000 | Lines kept above the screen in each pane. |
grapheme_clustering | true | Treat emoji sequences and letters with combining marks as one character. |
cursor_style | "block" | "block", "bar" or "underline". Programs can change it while they run. |
cursor_blink | true | Blink the cursor. |
copy_on_select | false | Copy text as soon as it's selected. |
word_chars | "-_./~:@+%#?&=" | Characters that count as part of a word when you double-click, besides letters and digits. |
bold_is_bright | false | Show bold text in the bright version of its color. |
min_contrast | 1.0 | Lightens or darkens text that's hard to read on its background. 4.5 is the WCAG level for body text; 1.0 leaves colors alone. |
padding | 8 | Space around the text, in pixels at 100% display scaling. |
bell | "visual" | "visual" flashes the pane, "sound" also plays the system sound (on Windows so far), "none" ignores the bell. |
notify_after | 10 | Seconds a command has to run before its tab gets a note, and you get a notification, when it finishes in the background. |
notifications | "unfocused" | When desktop notifications appear: "unfocused" (only when the window isn't focused), "always" or "never". |
restore_session | true | Reopen the last window's tabs, panes and recent output at launch. |
theme, background | the prompt's | Give the terminal a different theme, or light or dark variant, than the prompt uses. |
Programs can use the clipboard through OSC 52, which is how copying works over ssh:
| Setting | Default | What it does |
|---|---|---|
terminal.clipboard.write | true | Programs may set the clipboard. |
terminal.clipboard.read | false | Programs may read it. Any program you run, including on a remote machine, could then read what you last copied. |
[terminal.colors] overrides colors the theme sets: foreground, background, cursor, cursor_text, selection, and palette, a list of up to 16 colors for the ANSI palette.
[terminal]
font_family = ["JetBrains Mono", "Cascadia Mono"]
font_size = 13
shell = "PowerShell"
[terminal.colors]
background = "#101014"
palette = ["#000000", "#ff5555"] # the first two ANSI colors
Profiles
Each [[terminal.profiles]] entry adds a shell or program to the command palette's "New tab" list, and shell can name it. A profile with the same name as a shell Opal Terminal finds replaces that one.
| Key | What it does |
|---|---|
name | What the palette and the tab show. |
command, args | The program and its arguments. |
cwd | The folder it starts in. |
env | Environment variables to set, as a table. |
login | Start it as a login shell (macOS and Linux). |
[[terminal.profiles]]
name = "work box"
command = "ssh"
args = ["me@work"]
[[terminal.profiles]]
name = "api"
command = "pwsh"
cwd = "~/src/api"
env = { ASPNETCORE_ENVIRONMENT = "Development" }
Keys
[terminal.keys] maps a shortcut to an action. "none" removes a default. Shortcuts are written like "ctrl+shift+t", "alt+enter" or "super+k" (Cmd on macOS). The defaults are on the Opal Terminal page.
[terminal.keys]
"ctrl+shift+t" = "new_tab"
"ctrl+alt+k" = "clear_scrollback"
"f11" = "none"
The actions: new_tab, new_window, duplicate_tab, rename_tab, close_tab, close_pane, next_tab, prev_tab, goto_tab_1 to goto_tab_9, split_right, split_down, split_auto, focus_left, focus_right, focus_up, focus_down, resize_left, resize_right, resize_up, resize_down, toggle_zoom, toggle_broadcast, toggle_fullscreen, copy, paste, select_all, select_last_output, copy_last_output, find, quick_select, command_palette, history_search, recent_dirs, prev_prompt, next_prompt, scroll_up, scroll_down, scroll_page_up, scroll_page_down, scroll_top, scroll_bottom, clear_scrollback, reset_terminal, restart_pane, font_bigger, font_smaller, font_reset, settings, open_config and reload_config.
Your own aliases, functions and environment variables
These go in [aliases], [functions.NAME] and [env], and take precedence over plugins. A plain string works in every shell:
[aliases]
k = "kubectl"
[env]
EDITOR = "nvim"
When a value needs to differ, use a table. The most specific key that exists wins, in this order: the shell with the OS (bash.windows), the shell (zsh, bash, fish, pwsh), sh for bash and zsh together, the OS (wsl, linux, macos, windows), unix for macOS and Linux, and finally default. An empty string means "not in this shell".
[aliases]
ll = { unix = "ls -lh", pwsh = "Get-ChildItem" }
cls = { sh = "clear", fish = "clear", pwsh = "" }
[env]
PAGER = { unix = "less -R", windows = "" }
Functions have one body per shell, because each shell reads arguments differently:
[functions.mkproj]
sh = 'mkdir -p "$HOME/src/$1" && cd "$HOME/src/$1"'
fish = 'mkdir -p ~/src/$argv[1]; and cd ~/src/$argv[1]'
pwsh = '$d = Join-Path $HOME "src/$($args[0])"; New-Item -ItemType Directory -Force $d | Out-Null; Set-Location $d'
Any entry can have requires = ["tool"], to be skipped where a command isn't installed, or unless = ["tool"], to be skipped where it is.
Environment variables
| Variable | What it does |
|---|---|
OPAL_THEME, OPAL_ICONS, OPAL_COLOR | Override the config for one session, for example OPAL_THEME=black. |
OPAL_GREETING=0 | Don't show the banner. |
OPAL_CONFIG_DIR | Use another folder instead of ~/.config/opal. |
OPAL_DATA_DIR | Use another folder for the jump database, the shared history and caches. |