Skip to content
Gabe Gonzalez edited this page Jan 25, 2023 · 13 revisions

There is currently 14 segments available for you. In this part I will cover everyone of them, how they look, how to configure them and customize them.

Feel free to create more and make fishline a better tool for our favorite shell.

ARROW arrow_preview

Defined as FLSEG_ARROW in segments/arrow.fish, this segment is just a simple arrow to point in the beginning of your writing zone.

You can customize via two variables:

  • FLCLR_ARROW_FG: specify the foreground color of the segment (must be valid color)
  • FLCLR_ARROR_BG: specify the background color of the segment (must be valid color)

CLOCK clock_preview

Defined as FLSEG_CLOCK in segments/clock.fish, this segment is just a simple clock.

You can customize via two variables:

  • FLCLR_CLOCK_FG: specify the foreground color of the segment (must be valid color)
  • FLCLR_CLOCK_BG: specify the background color of the segment (must be valid color)

FULLPWD fullpwd_preview

Defined as FLSEG_FULLPWD in segments/fullpwd.fish, this is a simple PWD segment showing your current working folder and the full path before.

You can customize via two variables:

  • FLCLR_FULLPWD_FG: specify the foreground color of the segment (must be valid color)
  • FLCLR_FULLPWD_BG: specify the background color of the segment (must be valid color)

GIT git_clean_preview git_dirty_previewgit_dirty_preview

Defined as FLSEG_GIT in segments/git.pwd, this segment show the current status of your GIT repository. It only shows up when you are in a GIT repository.

It show you how many commit you are ahead, behind, as well as if you have change to commit, untracked files, ...

This segment will show you:

  • ⇌ commit: if you are detached from HEAD
  •  branch: if your workflow is clean
  •  branch X↑X↓: if you have some commit ahead or behind upstream
  •  master ×: if you have untracked files
  •  master +: if you have unstaged files with no untracked files
  •  master ∙: if all your current modifications have been staged

This segment consider your workflow clean if there's nothing to commit or stage and no untracked file.

You can customize via six variables:

  • FLCLR_GIT_FG_CLEAN: specify the foreground color of the segment when your workflow is clean (must be valid color)
  • FLCLR_GIT_BG_CLEAN: specify the background color of the segment when your workflow is clean (must be valid color)
  • FLCLR_GIT_FG_DIRTY: specify the foreground color of the segment when your workflow is dirty (must be valid color)
  • FLCLR_GIT_BG_DIRTY: specify the background color of the segment when your workflow is dirty (must be valid color)
  • FLCLR_GIT_FG_DETACHED: specify the foreground color of the segment when your current commit is detached from HEAD
  • FLCLR_GIT_BG_DETACHED: specify the background color of the segment when your current commit is detached from HEAD

JOBS jobs_preview

Defined as FLSEG_JOBS in segments/jobs.fish, this segment will show you a when jobs are running in the background

You can customize this segment via 2 variables:

  • FLCLR_JOBS_FG: specify the foreground color of the segment (must be valid color)
  • FLCLR_JOBS_BG: specify the background color of the segment (must be valid color)

N

Defined as FLSEG_N in segments/n.fish, this segment is basically a carriage return that close the previous segment without opening a new one.

You can not customize this segment.

PWD pwd_preview

Defined as FLSEG_PWD in segments/clock.pwd, this segment is showing you your current working directory with previous folder shortened to 1 character as well as if your base directory is your $HOME or the root folder.

You can customize via four variables:

  • FLCLR_PWD_FG: specify the foreground color of the second part of the segment (must be valid color)
  • FLCLR_PWD_BG: specify the background color of the second part of the segment (must be valid color)
  • FLCLR_PWD_FG_HOME: specify the foreground color of the home part of the segment (must be valid color)
  • FLCLR_PWD_BG_HOME: specify the background color of the home part of the segment (must be valid color)

ROOT root_preview

Defined as FLSEG_ROOT in segments/root.fish, this segment show you just a simple arrow (same as the ARROW segment) but will change color and show an infinity sign when the current user is root.

You can customize via four variables:

  • FLCLR_ROOT_FG_USER: specify the foreground color of the segment when user != root (must be valid color)
  • FLCLR_ROOT_BG_USER: specify the background color of the segment when user != root (must be valid color)
  • FLCLR_ROOT_FG_ROOT: specify the foreground color of the segment when user == root (must be valid color)
  • FLCLR_ROOT_BG_ROOT: specify the background color of the segment when user == root (must be valid color)

SIGSTATUS sigstatus_preview

Defined as FLSEG_SIGSTATUS in segments/sigstatus.fish, this segment shows up when the return code of the last command is greater than 0, in this case it will show it in the segment. If the return code of the last command was caused by a signal the signal name will be shown instead of the return code.

You can customize via two variables:

  • FLCLR_STATUS_FG: specify the foreground color of the segment (must be valid color)
  • FLCLR_STATUS_BG: specify the background color of the segment (must be valid color)

SPACE

Defined as FLSEG_SPACE in segments/space.fish, this segment is basically an empty segment with containing just a space that close the previous segment without opening a new one.

You can not customize this segment.

STATUS status_preview

Defined as FLSEG_STATUS in segments/status.fish, this segment shows up when the return code of the last command is greater than 0, in this case it will show it in the segment.

You can customize via two variables:

  • FLCLR_STATUS_FG: specify the foreground color of the segment (must be valid color)
  • FLCLR_STATUS_BG: specify the background color of the segment (must be valid color)

USERHOST userhost_preview

Defined as FLSEG_USERHOST in segments/userhost.fish, this segment shows you you current user name and you hostname.

You can customize via two variables:

  • FLCLR_USERHOST_FG: specify the foreground color of the segment (must be valid color)
  • FLCLR_USERHOST_BG: specify the background color of the segment (must be valid color)

VFISH vfish_preview

Defined as FLSEG_VFISH in segments/vfish.fish, this segment shows up if you are currently working under a virtualfish environment, in this case it show you the name of the current virtual environment in the segment.

You can customize via two variables:

  • FLCLR_VFISH_FG: specify the foreground color of the segment (must be valid color)
  • FLCLR_VFISH_BG: specify the background color of the segment (must be valid color)

WRITE write_preview

Defined as FLSEG_WRITE in segments/write.fish, this specific segment will show a padlock when the current working directory is not writeable.

You can customize via two variables:

  • FLCLR_WRITE_FG: specify the foreground color of the segment (must be valid color)
  • FLCLR_WRITE_BG: specify the background color of the segment (must be valid color)