66 Configuration
Austin Ziegler edited this page 2024-02-18 00:27:50 -05:00

The following sections contain tables of variable names, their descriptions, and their types, organized alphabetically.

Type Description
boolean true or false
color argument that set_color would accept
icon a sequence of characters for an icon
integer number without decimals
list collection of other types
string sequence of characters
  • Variables in these sections will be denoted as foo_bar but will actually be tide_<INSERT HEADER>_foo_bar.
  • You can take a look at the default configurations in ~/.config/fish/functions/tide/configure/configs for inspiration.
  • Modify variables using set --universal from the command line or set --global in your config.fish file.
  • Use the sidebar to find the variables you're looking for quickly.

Prompt Variables

A note on default values:

  • they are always omitted for color and icon values
  • list values are wrapped in brackets ([first second]) so that a default empty list is clear ([])
  • default values that vary between configurations will be put as ? (as an example, tide_prompt_pad_items differs between the rainbow and lean configurations; its value will be ?)

If the only configuration options for the variables are color or icon, or all default values vary by configuration, there will be no default column on the table.

prompt

Variable Description Type Default
add_newline_before print an empty line before the prompt boolean true
color_frame_and_connection color of frame and prompt connection color
color_separator_same_color color of the separator between items with the same background color color
icon_connection repeated symbol that spans gap between left and right sides of prompt icon
min_cols if using one-line prompt, Tide attempts to have at least this many columns for you to type in integer 34
pad_items if true, add a space before and after each item boolean ?
transient_enabled if true, transient prompts are enabled boolean false

left_prompt

Variable Description Type
frame_enabled display the left prompt frame boolean
items order of items to print in the left prompt list
prefix string to put at the beginning the left prompt string
separator_diff_color string to separate items with different background colors string
separator_same_color string to separate items with the same background color string
suffix string to put at the end of the left prompt string

The default tide_left_prompt_items varies on configuration, but is [pwd git newline] for rainbow and classic configurations, and is [pwd git newline character] for the lean configuration.

right_prompt

Variable Description Type
frame_enabled display the right prompt frame boolean
items order of items to print in the right prompt list
prefix string to put at the beginning the right prompt string
separator_diff_color string to separate items with different background colors string
separator_same_color string to separate items with the same background color string
suffix string to put at the end of the right prompt string

The default for tide_right_prompt_items is:

  • status
  • cmd_duration
  • context
  • jobs
  • direnv
  • bun not yet released
  • node
  • python
  • rustc
  • java
  • php
  • pulumi
  • ruby
  • go
  • gcloud
  • kubectl
  • distrobox
  • toolbox
  • terraform
  • aws
  • nix_shell
  • crystal
  • elixir
  • zig

Items

These can be added to tide_left_prompt_items or tide_right_prompt_items. For example, to add context to the far left of your left prompt:

set --universal tide_left_prompt_items context $tide_left_prompt_items

If an item version is italicized, it is for a version that may not have been released.

Item Description Version
aws AWS profile/region 5.3
bun bun 6.2
character prompt symbol; turns red on error 1.0
cmd_duration duration of the last run command 1.0
context user@hostname in ssh or root 1.0
crystal crystal language version 5.5
distrobox whether we are in a distrobox 5.6
direnv direnv context 5.6
docker docker context 5.1
elixir elixir 5.6
git git repository status 1.0
go go version 5.0
java java version 5.1
jobs presence of background jobs 2.4
kubectl current kubernetes cluster/namespace 5.0
nix_shell whether the current shell is a nix shell 5.4
node node version number 2.4
os current operating system 1.0
php php version 4.2
private_mode whether fish is private or not 5.1
pulumi pulumi stack 5.6
pwd current directory 1.0
python python virtual environment 1.5
ruby ruby version number using 4.2
rustc rustc version 2.3
shlvl current level of nested shells 5.0
status exit code of the last command 1.0
terraform terraform workspace 5.1
time current time 1.0
toolbox whether we are in a toolbox 5.1
vi_mode vi bind mode display 2.4
zig zig version 6.1
newline new line 1.0

aws

Variable Description Type
bg_color background color of AWS item color
color color of AWS item color
icon icon to display next to the AWS version icon

bun

The bun item is not yet released and will be available in 6.2.0.

Variable Description Type
bg_color background color of bun item color
color color of bun item color
icon icon to display next to the bun version icon

character

Variable Description Type
color color when last command completed with exit code 0 color
color_failure color when last command exited with exit code >0 color
icon icon for when using normal binding or insert in vi binding icon
vi_icon_default vi default bind mode icon icon
vi_icon_replace vi replace bind mode icon icon
vi_icon_visual vi visual bind mode icon icon

cmd_duration

Variable Description Type Default
bg_color background color of the cmd_duration item color
color color of the cmd_duration item color
decimals number of decimals to display after the seconds place integer 0
icon icon for the cmd_duration item icon
threshold number of milliseconds that duration must exceed to produce output integer 3000

context

Variable Description Type Default
always_display display context when not in SSH or root user boolean false
bg_color background color of the context item color
color_default color of the context item when not in SSH or root user color
color_root color of the context item when the user is root color
color_ssh color of the context item when in SSH color
hostname_parts The number of hostname parts, split on dots, to display. integer 1

For tide_context_hostname_parts, if your hostname is foo.bar.baz, 5 would show you user@foo.bar.baz, 1 would show you user@foo, and 0 would show you user.

crystal

Variable Description Type
bg_color background color of crystal item color
color color of crystal item color
icon icon for the crystal item icon

distrobox

Variable Description Type
bg_color background color of distrobox item color
color color of distrobox item color
icon icon to display next to the distrobox name icon

direnv

Variable Description Type
bg_color background color of direnv item color
bg_color_denied background color of direnv item when access is denied color
color color of direnv item color
color_denied color of direnv item when access is denied color
icon icon to display next to the direnv version icon

docker

Variable Description Type Default
bg_color background color of docker item color
color color of docker item color
default_contexts the default context values for docker list [default colima]
icon icon to display next to the docker version icon

elixir

Variable Description Type
bg_color background color of elixir item color
color color of elixir item color
icon icon to display next to the elixir version icon

git

Variable Description Type Default
bg_color default background color of the git_item color
bg_color_unstable background color when repository has dirty, staged, or untracked files color
bg_color_urgent background color when repository has conflicts or ongoing operations color
color_branch color of branch/SHA color
color_conflicted color of conflicted files number color
color_dirty color of dirty files number color
color_operation color of the current operation color
color_staged color of staged files number color
color_stash color of stashes number color
color_untracked color of untracked files number color
color_upstream color of upstream behind/ahead numbers color
icon icon of the git item, colored same as branch icon
truncation_length the length to truncate the branch name to integer 24
truncation_strategy git branch truncation strategy special

The variable tide_git_truncation_strategy indicates which end branch names will be truncated from if they exceed tide_git_branch_truncation_length. The default is empty (set tide_git_truncation_strategy), which truncates the end of the branch name, leaving the beginning. If your branch names start with flow markers (feature/, bug/, etc.), you may want to set this to l to truncate the beginning of the branch name, leaving the end.

As an example, feature/a-long-branch-name becomes:

  • feature/a-long-branch-n… with the default value
  • …ture/a-long-branch-name with l.

go

Variable Description Type
bg_color background color of go item color
color color of go item color
icon go icon icon

java

Variable Description Type
bg_color background color of java item color
color color of java item color
icon java icon icon

jobs

Variable Description Type Default
bg_color background color of jobs item color
color color of jobs item color
icon icon when there are background jobs icon
number_threshold display the number of jobs if at or above this value integer 1000

kubectl

Variable Description Type
bg_color background color of kubectl item color
color color of kubectl item color
icon icon for the kubectl item icon

nix_shell

Variable Description Type
bg_color background color of nix_shell item color
color color of nix_shell item color
icon icon for the nix_shell item icon

node

Variable Description Type
bg_color background color of node item color
color color of node item color
icon icon for the node item icon

os

Variable Description Type
bg_color background color of os item color
color color of os item color
icon the OS branding icon icon

php

Variable Description Type
bg_color background color of php item color
color color of php item color
icon icon for the php item icon

private_mode

Variable Description Type
bg_color background color of private_mode item color
color color of private_mode item color
icon icon for the private_mode item icon

pulumi

Variable Description Type
bg_color background color of pulumi item color
color color of pulumi item color
icon icon for the pulumi item icon

pwd

Variable Description Type
bg_color background color of pwd item color
color_anchors color of anchor directories. These directories are displayed in bold and immune to truncation. color
color_dirs color of normal directories color
color_truncated_dirs color of truncated directories color
icon default icon for pwd item icon
icon_home icon when the the current directory is the user's HOME icon
icon_unwritable icon when the directory is not writable by the user icon
markers if a directory contains any of these files/directories, it will be anchored list

The default tide_pwd_markers list is:

  • .bzr
  • .citc
  • .git
  • .hg
  • .node-version
  • .python-version
  • .ruby-version
  • .shorten_folder_marker
  • .svn
  • .terraform
  • CVS
  • Cargo.toml
  • build.zig
  • bun.lockb not yet released
  • composer.json
  • go.mod
  • package.json

python

Variable Description Type
bg_color background color of virtual_env item color
color color of virtual_env item color
icon icon to display in front of virtual_env item icon

ruby

Variable Description Type
bg_color background color of ruby item color
color color of ruby item color
icon icon to display next to the ruby version icon

rustc

Variable Description Type
bg_color background color of rustc item color
color color of rustc item color
icon icon to display next to the rustc version icon

shlvl

Note: this module is disabled by default.

Variable Description Type Default
bg_color background color of shlvl item color
color color of shlvl item color
icon icon to display next to the shlvl number icon
threshold threshold of showing shlvl item. integer 1

status

Variable Description Type
bg_color background color when $status = 0 color
bg_color_failure background color when $status > 0 color
color color when $status = 0 color
color_failure color when $status > 0 color
icon icon when $status = 0 icon
icon_failure icon when $status > 0 icon

terraform

Variable Description Type
bg_color background color of terraform item color
color color of terraform item color
icon icon to display next to the terraform version icon

time

Variable Description Type Default
bg_color background color of time item color
color color of time item color
format format of time item. Uses date formatting string %T

toolbox

Variable Description Type
bg_color background color of toolbox item color
color color of toolbox item color
icon icon to display next to the toolbox name icon

vi_mode

Variable Description Type
bg_color_default default vi mode background color color
color_default default vi mode color color
icon_default default vi mode icon icon
bg_color_replace replace vi mode background color color
color_replace replace vi mode color color
icon_replace replace vi mode icon icon
bg_color_visual visual vi mode background color color
color_visual visual vi mode color color
icon_visual visual vi mode icon icon

zig

Variable Description Type
bg_color background color of zig item color
color color of zig item color
icon icon to display next to the zig version icon