bobthefish
is a Powerline-style, Git-aware fish theme optimized for awesome.
Be sure to have Oh My Fish installed. Then just:
omf install bobthefish
You will need a Powerline-patched font for this to work, unless you enable the compatibility fallback option:
set -g theme_powerline_fonts no
I recommend picking one of these. For more advanced awesome, install a nerd fonts patched font, and enable nerd fonts support:
set -g theme_nerd_fonts yes
This theme is based loosely on agnoster.
- A helpful, but not too distracting, greeting.
- A subtle timestamp hanging out off to the right.
- Powerline-style visual hotness.
- More colors than you know what to do with.
- An abbreviated path which doesn't abbreviate the name of the current project.
- All the things you need to know about Git in a glance.
- Visual indication that you can't write to the current directory.
- Status flags:
- Previous command failed (
!
) - Private mode (🔒 or
⦸
) - You currently have superpowers (
$
) - Background jobs (
%
)
- Previous command failed (
- Current vi mode
User@Host
(unless you're the default user)- Current RVM, rbenv or chruby (Ruby) version
- Current virtualenv (Python) version
- If you use virtualenv, you will probably need to disable the default virtualenv prompt, since it doesn't play nice with fish:
set -x VIRTUAL_ENV_DISABLE_PROMPT 1
- If you use virtualenv, you will probably need to disable the default virtualenv prompt, since it doesn't play nice with fish:
- Current NVM/FNM version (Nodejs) (inactive by default; see configurations in the next paragraph)
- Abbreviated parent directory
- Current directory, or Git or Mercurial project name
- Current project's repo branch ( master) or detached head (
➦
d0dfd9b) - Git or Mercurial status, via colors and flags:
- Dirty working directory (
*
) - Untracked files (
…
) - Staged changes (
~
) - Stashed changes (
$
) - Unpulled commits (
-
) - Unpushed commits (
+
) - Unpulled and unpushed commits (
±
) - Note that not all of these have been implemented for hg yet :)
- Dirty working directory (
- Fossil status:
- Dirty working directory (
*
) - Untracked files (
…
) - Conflicts (
!
)
- Dirty working directory (
- Abbreviated project-relative path
You can override theme defaults in a Fish config file (for example ~/.config/fish/conf.d/bobthefish.fish
):
set -g theme_nerd_fonts yes
set -g theme_color_scheme dark
set -g theme_display_user ssh
set -g default_user bobthecow
See (many) more options below.
By default the vi mode indicator will be shown if vi or hybrid key bindings are enabled. Use no
to always hide the indicator, or yes
to always show the indicator.
Use yes
to show any non-zero exit code next to the exclamation mark.
Use yes
to display the number of currently running background jobs next to the percent sign.
Set to yes
to always display the username, to ssh
to display only when an SSH session is active, or to no
to never display the username.
If a default_user
is provided, the username will only be shown when it differs from the default.
If set to yes
, displays the sudoer's username in a root shell. For example, when calling sudo -s
with this option set to yes
, the user who called sudo -s
will be displayed.
Set to yes
to always display the hostname, to ssh
to display only when an SSH session is active, or to no
to never display the hostname.
Bobthefish respects the Fish $fish_prompt_pwd_dir_length
setting to abbreviate the prompt path; set to 0
to show the full path, 1
(default) to show only the first character of each parent directory name, or any other number to show up to that many characters.
The same as $fish_prompt_pwd_dir_length
, but for the path relative to the current project root. Defaults to 0
; set to any other number to show an abbreviated path.
Use no
to only show the project directory name, and not its parent path, when inside a project.
Use yes
to place the cursor on the next line, rather than the same line as the prompt. Setting this to clean
instead of yes
suppresses the caret on the new line.
Use a custom prompt with newline cursor. By default this is the chevron right glyph or >
when powerline fonts are disabled.
You probably don't need this option, unless your terminal doesn't like Unicode. Setting to yes
will avoid ambiguous-width characters in an attempt to
Bobthefish really likes Powerline-enhanced fonts. If you can't make that work, set to no
to use plaintext fallbacks.
Bobthefish likes Nerd Fonts even better! Use yes
if you've got Nerd Font capable fonts.
See below for all the color scheming you can handle.
Use no
to disable screen session information.
This feature is disabled by default, use yes
to display Vagrant status in your prompt. Please note that only the VirtualBox and VMWare providers are supported.
Use no
to disable the current Docker machine name.
Use no
to disable Ruby version information. By default, the Ruby version is displayed unless it's your system Ruby version.
Use no
to disable Python version information. By default, the Python version is shown when it's interesting, along with the Virtualenv or Conda environmenmt.
Use no
to disable the Go version information. Set to verbose
to show both the required and current Go version.
This feature is disabled by default. Use yes
, display the version if an .nvmrc
, .node-version
or package.json
file is found in the parent path. Set to always
to always display the current NPM, NVM or FNM node version.
Use no
to disable Nix environment information.
This feature is disabled by default. Use yes
to show the current Kubernetes context (> kubectl config current-context
).
This feature is disabled by default. Use yes
to show the current Kubernetes namespace.
This feature is disabled by default. Use yes
to show the currently executing AWS Vault profile.
Use no
to disable Git integration. If you're doing this for performance reasons, try some of the options below before disabling it entirely!
Use no
to hide Git dirty state. Set the Git bash.showDirtyState
option on a per-repository basis to disable it just for especially large repos.
This feature is disabled by default. Use yes
to show more verbose dirty state information.
Use no
to hide Git untracked file state. Set the Git bash.showUntrackedFiles
option on a per-repository basis to disable it just for especially large repos.
This feature is disabled by default. Use yes
to show more verbose ahead/behind state information.
This feature is disabled by default. Use yes
to show more verbose stashed state information.
By default, Bobthefish hides the default branch name (e.g. main
or master
). Use yes
to always show these branche names.
By default, Bobthefish hides default branch names (e.g. main
or master
). To hide other branch names, you can set a custom default branch name via the init.defaultBranch
Git config option, or override the list entirely.
This feature is disabled by default. Use yes
to truncate extremely long Git branch names.
If you do any Git worktree shenanigans, setting this to yes
will fix incorrect project-relative paths. If you don't do any Git worktree shenanigans, leave it disabled. It's faster this way :)
This feature is disabled by default. Use yes
to enable Mercurial support in Bobthefish. If you don't use Mercurial, leave it disabled because it's ... not fast.
This feature is also disabled by default. It should be faster than Mercurial, but if you aren't using Fossil it's safe to leave disabled.
Ignore project paths for Git or Mercurial. Supports glob patterns.
The right prompt can be configured with the following options, or overridden entirely by supplying your own fish_right_prompt
function.
Use no
to disable the date in the right prompt.
Customize date formatting. See man date
for more information.
Supply a TZ argument variable for date formatting. See man date
for more information.
Use no
to disable command duration in the right prompt.
This feature is disabled by default. Use yes
to show current process name in the terminal title.
Use no
to hide current working directory from the terminal title.
Use yes
to show the current user in the tab title (unless you're the default user).
By default, directory names will be abbreviated in the terminal title, for example ~
instead of $HOME
and /u/local
instead of /usr/local
. Set to no
to always show full paths in the title.
You can use the function bobthefish_display_colors
to preview the prompts in
any color scheme.
Set theme_color_scheme
in a terminal session or in your fish startup files to
one of the following options to change the prompt colors.
dark
. The default bobthefish theme.light
. A lighter version of the default theme.solarized
(orsolarized-dark
),solarized-light
. Dark and light variants of Solarized.base16
(orbase16-dark
),base16-light
. Dark and light variants of the default Base16 theme.zenburn
. An adaptation of Zenburn.gruvbox
,gruvbox-light
. An adaptation of gruvbox dark and light variants.dracula
. An adaptation of dracula.nord
. An adaptation of nord.catpuccin-latte
,catpuccin-frappe
,catpuccin-macchiato
,catpuccin-mocha
. Adaptations of the Cattpuccin themes.
Some of these may not look right if your terminal does not support 24 bit color,
in which case you can try one of the terminal
schemes (below). However, if
you're using Solarized, Base16 (default), or Zenburn in your terminal and the
terminal does support 24 bit color, the built in schemes will look nicer.
There are several scheme that use whichever colors you currently have loaded into your terminal. The advantage of using the schemes that fall through to the terminal colors is that they automatically adapt to something acceptable whenever you change the 16 colors in your terminal profile.
terminal
(orterminal-dark
orterminal-dark-black
)terminal-dark-white
. Same asterminal
, but use white as the foreground color on top of colored segments (in case your colors are very dark).terminal-light
(orterminal-light-white
)terminal-light-black
. Same asterminal-light
, but use black as the foreground color on top of colored segments (in case your colors are very bright).
For some terminal themes, like dark base16 themes, the path segments in the
prompt will be indistinguishable from the background. In those cases, try one of
the following variations; they are identical to the terminal
schemes except
for using bright black (brgrey
) and dull white (grey
) in the place of black
and bright white.
terminal2
(orterminal2-dark
orterminal2-dark-black
)terminal2-dark-white
terminal2-light
(orterminal2-light-white
)terminal2-light-black
To override the colors provided by a theme, set up a bobthefish_colors
function in your configuration (config.fish
or otherwise):
function bobthefish_colors -S -d 'Define a custom bobthefish color scheme'
# optionally include a base color scheme...
___bobthefish_colors default
# then override everything you want! note that these must be defined with `set -x`
set -x color_initial_segment_exit ffffff ce000f --bold
set -x color_initial_segment_private ffffff 255e87
set -x color_initial_segment_su ffffff 189303 --bold
set -x color_initial_segment_jobs ffffff 255e87 --bold
set -x color_path 333333 999999
set -x color_path_basename 333333 ffffff --bold
set -x color_path_nowrite 660000 cc9999
set -x color_path_nowrite_basename 660000 cc9999 --bold
set -x color_repo addc10 0c4801
set -x color_repo_work_tree 333333 ffffff --bold
set -x color_repo_dirty ce000f ffffff
set -x color_repo_staged f6b117 3a2a03
set -x color_vi_mode_default 999999 333333 --bold
set -x color_vi_mode_insert 189303 333333 --bold
set -x color_vi_mode_visual f6b117 3a2a03 --bold
set -x color_vagrant 48b4fb ffffff --bold
set -x color_aws_vault
set -x color_aws_vault_expired
set -x color_username cccccc 255e87 --bold
set -x color_hostname cccccc 255e87
set -x color_rvm af0000 cccccc --bold
set -x color_virtualfish 005faf cccccc --bold
set -x color_virtualgo 005faf cccccc --bold
set -x color_desk 005faf cccccc --bold
set -x color_nix 005faf cccccc --bold
end
You can disable the theme default greeting, vi mode prompt, right prompt, or title entirely — or override with your own — by adding custom functions to ~/.config/fish/functions
:
~/.config/fish/functions/fish_greeting.fish
~/.config/fish/functions/fish_mode_prompt.fish
~/.config/fish/functions/fish_right_prompt.fish
~/.config/fish/functions/fish_title.fish
To disable them completely, use an empty function:
function fish_right_prompt; end
… Or copy one from your favorite theme, make up something of your own, or copy/paste a bobthefish default function and modify it to your taste!
function fish_greeting
set_color $fish_color_autosuggestion
echo "I'm completely operational, and all my circuits are functioning perfectly."
set_color normal
end