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

SettingDefaultWhat 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.
greetingtrueShow the opal banner when a new terminal opens. Shells started inside that terminal don't show it again.
suggestionstrueGrey as-you-type suggestions (zsh engine, ble.sh in bash).
completionstrueLoad completion scripts generated by installed tools.
pluginsall built-inWhich plugins to load. See Plugins.
path["~/.local/bin", "~/bin"]Folders added to the front of PATH if they exist.

[prompt]

SettingDefaultWhat it does
blank_linefalsePrint an empty line before each prompt.
duration_threshold2.0Seconds a command has to run before its duration is shown.
git_timeout_ms200How 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_depth4How many folder names to show before shortening the path.
timefalseShow the time.
transienttrueRedraw finished prompts as just the prompt symbol (zsh, fish, PowerShell).
semantic_markstrueSend OSC 133 and OSC 7 marks, which let terminals jump between commands and open new tabs in the same folder.

[history]

SettingDefaultWhat it does
sharedtrueRecord commands from every shell into the shared history.
ctrl_rtrueBind Ctrl+R to opal's history search.

[shell.fish] and [shell.pwsh]

SettingDefaultWhat it does
shell.fish.abbreviationstrueTurn aliases into fish abbreviations, which expand as you type. Set to false for wrapper functions instead.
shell.fish.greetingfalseKeep fish's own welcome message.
shell.pwsh.clobber_builtin_aliasesfalseLet 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.utf8trueSwitch the console to UTF-8, so output from native programs keeps its characters.

[core], [pkg] and [update]

SettingDefaultWhat it does
core.defaultstrueHistory size, completion and key binding defaults for each shell.
pkg.preferWhich 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.

SettingDefaultWhat it does
font_familysee rightA 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_size12 (13 on macOS)In points.
line_height1.0Row height, as a multiple of the font's.
cell_width1.0Widens or narrows every cell.
shellthe first shell foundWhat 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.
scrollback10000Lines kept above the screen in each pane.
grapheme_clusteringtrueTreat 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_blinktrueBlink the cursor.
copy_on_selectfalseCopy 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_brightfalseShow bold text in the bright version of its color.
min_contrast1.0Lightens 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.
padding8Space 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_after10Seconds 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_sessiontrueReopen the last window's tabs, panes and recent output at launch.
theme, backgroundthe prompt'sGive 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:

SettingDefaultWhat it does
terminal.clipboard.writetruePrograms may set the clipboard.
terminal.clipboard.readfalsePrograms 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.

KeyWhat it does
nameWhat the palette and the tab show.
command, argsThe program and its arguments.
cwdThe folder it starts in.
envEnvironment variables to set, as a table.
loginStart 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

VariableWhat it does
OPAL_THEME, OPAL_ICONS, OPAL_COLOROverride the config for one session, for example OPAL_THEME=black.
OPAL_GREETING=0Don't show the banner.
OPAL_CONFIG_DIRUse another folder instead of ~/.config/opal.
OPAL_DATA_DIRUse another folder for the jump database, the shared history and caches.