From ef9e297ee7cec55b3d2ee2eeae63f466206e1a24 Mon Sep 17 00:00:00 2001 From: Christoph Schlosser Date: Fri, 13 Jun 2025 15:59:03 +0200 Subject: Add first dump of fish config files --- fish/.gitignore | 2 + fish/completions/bat.fish | 245 +++++ fish/completions/fisher.fish | 7 + fish/completions/rg.fish | 175 +++ fish/conf.d/fzf.fish | 1 + fish/config.fish | 6 + fish/fish_plugins | 2 + fish/functions/__bobthefish_colors.fish | 1102 +++++++++++++++++++ fish/functions/__bobthefish_display_colors.fish | 3 + fish/functions/__bobthefish_glyphs.fish | 104 ++ fish/functions/bobthefish_display_colors.fish | 170 +++ fish/functions/fish_greeting.fish | 9 + fish/functions/fish_mode_prompt.fish | 42 + fish/functions/fish_prompt.fish | 1338 +++++++++++++++++++++++ fish/functions/fish_right_prompt.fish | 80 ++ fish/functions/fish_title.fish | 30 + fish/functions/fisher.fish | 240 ++++ fish/functions/m.fish | 4 + fish/functions/state.fish | 4 + 19 files changed, 3564 insertions(+) create mode 100644 fish/.gitignore create mode 100644 fish/completions/bat.fish create mode 100644 fish/completions/fisher.fish create mode 100644 fish/completions/rg.fish create mode 100644 fish/conf.d/fzf.fish create mode 100644 fish/fish_plugins create mode 100644 fish/functions/__bobthefish_colors.fish create mode 100644 fish/functions/__bobthefish_display_colors.fish create mode 100644 fish/functions/__bobthefish_glyphs.fish create mode 100644 fish/functions/bobthefish_display_colors.fish create mode 100644 fish/functions/fish_greeting.fish create mode 100644 fish/functions/fish_mode_prompt.fish create mode 100644 fish/functions/fish_prompt.fish create mode 100644 fish/functions/fish_right_prompt.fish create mode 100644 fish/functions/fish_title.fish create mode 100644 fish/functions/fisher.fish create mode 100644 fish/functions/m.fish create mode 100644 fish/functions/state.fish diff --git a/fish/.gitignore b/fish/.gitignore new file mode 100644 index 0000000..ee8ccf3 --- /dev/null +++ b/fish/.gitignore @@ -0,0 +1,2 @@ +fish_variables +functions/kara.fish diff --git a/fish/completions/bat.fish b/fish/completions/bat.fish new file mode 100644 index 0000000..a6e2d96 --- /dev/null +++ b/fish/completions/bat.fish @@ -0,0 +1,245 @@ +# Fish Shell Completions +# Copy or symlink to $XDG_CONFIG_HOME/fish/completions/bat.fish +# ($XDG_CONFIG_HOME is usually set to ~/.config) + +# `bat` is `batcat` on Debian and Ubuntu +set bat bat + +# Helper functions: + +function __bat_complete_files -a token + # Cheat to complete files by calling `complete -C` on a fake command name, + # like `__fish_complete_directories` does. + set -l fake_command aaabccccdeeeeefffffffffgghhhhhhiiiii + complete -C"$fake_command $token" +end + +function __bat_complete_one_language -a comp + command $bat --list-languages | string split -f1 : | string match -e "$comp" +end + +function __bat_complete_list_languages + for spec in (command $bat --list-languages) + set -l name (string split -f1 : $spec) + for ext in (string split -f2 : $spec | string split ,) + test -n "$ext"; or continue + string match -rq '[/*]' $ext; and continue + printf "%s\t%s\n" $ext $name + end + printf "%s\t\n" $name + end +end + +function __bat_complete_map_syntax + set -l token (commandline -ct) + + if string match -qr '(?.+):(?.*)' -- $token + # If token ends with a colon, complete with the list of language names. + set -f comps $glob:(__bat_complete_one_language $syntax) + else if string match -qr '\*' -- $token + # If token contains a globbing character (`*`), complete only possible + # globs in the current directory + set -f comps (__bat_complete_files $token | string match -er '[*]'): + else + # Complete files (and globs). + set -f comps (__bat_complete_files $token | string match -erv '/$'): + end + + if set -q comps[1] + printf "%s\t\n" $comps + end +end + +function __bat_cache_subcommand + __fish_seen_subcommand_from cache +end + +# Returns true if no exclusive arguments seen. +function __bat_no_excl_args + not __bat_cache_subcommand; and not __fish_seen_argument \ + -s h -l help \ + -s V -l version \ + -l acknowledgements \ + -l config-dir -l config-file \ + -l diagnostic \ + -l list-languages -l list-themes +end + +# Returns true if the 'cache' subcommand is seen without any exclusive arguments. +function __bat_cache_no_excl + __bat_cache_subcommand; and not __fish_seen_argument \ + -s h -l help \ + -l acknowledgements -l build -l clear +end + +function __bat_style_opts + set -l style_opts \ + "default,recommended components" \ + "auto,same as 'default' unless piped" \ + "full,all components" \ + "plain,no components" \ + "changes,Git change markers" \ + "header,alias for header-filename" \ + "header-filename,filename above content" \ + "header-filesize,filesize above content" \ + "grid,lines b/w sidebar/header/content" \ + "numbers,line numbers in sidebar" \ + "rule,separate files" \ + "snip,separate ranges" + + string replace , \t $style_opts +end + +# Use option argument descriptions to indicate which is the default, saving +# horizontal space and making sure the option description isn't truncated. +set -l color_opts ' + auto\tdefault + never\t + always\t +' +set -l decorations_opts $color_opts +set -l paging_opts $color_opts + +# Include some examples so we can indicate the default. +set -l pager_opts ' + less\tdefault + less\ -FR\t + more\t + vimpager\t +' + +set -l italic_text_opts ' + always\t + never\tdefault +' + +set -l wrap_opts ' + auto\tdefault + never\t + character\t +' + +# While --tabs theoretically takes any number, most people should be OK with these. +# Specifying a list lets us explain what 0 does. +set -l tabs_opts ' + 0\tpass\ tabs\ through\ directly + 1\t + 2\t + 4\t + 8\t +' + +set -l special_themes ' + auto\tdefault,\ Choose\ a\ theme\ based\ on\ dark\ or\ light\ mode + auto:always\tChoose\ a\ theme\ based\ on\ dark\ or\ light\ mode + auto:system\tChoose\ a\ theme\ based\ on\ dark\ or\ light\ mode + dark\tUse\ the\ theme\ specified\ by\ --theme-dark + light\tUse\ the\ theme\ specified\ by\ --theme-light +' + +# Completions: + +complete -c $bat -l acknowledgements -d "Print acknowledgements" -n __fish_is_first_arg + +complete -c $bat -l cache-dir -f -d "Show bat's cache directory" -n __fish_is_first_arg + +complete -c $bat -l color -x -a "$color_opts" -d "When to use colored output" -n __bat_no_excl_args + +complete -c $bat -l config-dir -f -d "Display location of configuration directory" -n __fish_is_first_arg + +complete -c $bat -l config-file -f -d "Display location of configuration file" -n __fish_is_first_arg + +complete -c $bat -l decorations -x -a "$decorations_opts" -d "When to use --style decorations" -n __bat_no_excl_args + +complete -c $bat -l diagnostic -d "Print diagnostic info for bug reports" -n __fish_is_first_arg + +complete -c $bat -s d -l diff -d "Only show lines with Git changes" -n __bat_no_excl_args + +complete -c $bat -l diff-context -x -d "Show N context lines around Git changes" -n "__fish_seen_argument -s d -l diff" + +complete -c $bat -l generate-config-file -f -d "Generates a default configuration file" -n __fish_is_first_arg + +complete -c $bat -l file-name -x -d "Specify the display name" -n __bat_no_excl_args + +complete -c $bat -s f -l force-colorization -d "Force color and decorations" -n __bat_no_excl_args + +complete -c $bat -s h -d "Print a concise overview" -n __fish_is_first_arg + +complete -c $bat -l help -f -d "Print all help information" -n __fish_is_first_arg + +complete -c $bat -s H -l highlight-line -x -d "Highlight line(s) N[:M]" -n __bat_no_excl_args + +complete -c $bat -l ignored-suffix -x -d "Ignore extension" -n __bat_no_excl_args + +complete -c $bat -l italic-text -x -a "$italic_text_opts" -d "When to use italic text in the output" -n __bat_no_excl_args + +complete -c $bat -s l -l language -x -k -a "(__bat_complete_list_languages)" -d "Set the syntax highlighting language" -n __bat_no_excl_args + +complete -c $bat -l lessopen -d "Enable the $LESSOPEN preprocessor" -n __fish_is_first_arg + +complete -c $bat -s r -l line-range -x -d "Only print lines [M]:[N] (either optional)" -n __bat_no_excl_args + +complete -c $bat -l list-languages -f -d "List syntax highlighting languages" -n __fish_is_first_arg + +complete -c $bat -l list-themes -f -d "List syntax highlighting themes" -n __fish_is_first_arg + +complete -c $bat -s m -l map-syntax -x -a "(__bat_complete_map_syntax)" -d "Map :" -n __bat_no_excl_args + +complete -c $bat -l no-config -d "Do not use the configuration file" + +complete -c $bat -l no-custom-assets -d "Do not load custom assets" + +complete -c $bat -l no-lessopen -d "Disable the $LESSOPEN preprocessor if enabled (overrides --lessopen)" + +complete -c $bat -s n -l number -d "Only show line numbers, no other decorations" -n __bat_no_excl_args + +complete -c $bat -l pager -x -a "$pager_opts" -d "Which pager to use" -n __bat_no_excl_args + +complete -c $bat -l paging -x -a "$paging_opts" -d "When to use the pager" -n __bat_no_excl_args + +complete -c $bat -s p -l plain -d "Disable decorations" -n __bat_no_excl_args + +complete -c $bat -o pp -d "Disable decorations and paging" -n __bat_no_excl_args + +complete -c $bat -s P -d "Disable paging" -n __bat_no_excl_args + +complete -c $bat -s A -l show-all -d "Show non-printable characters" -n __bat_no_excl_args + +complete -c $bat -l style -x -k -a "(__fish_complete_list , __bat_style_opts)" -d "Specify which non-content elements to display" -n __bat_no_excl_args + +complete -c $bat -l tabs -x -a "$tabs_opts" -d "Set tab width" -n __bat_no_excl_args + +complete -c $bat -l terminal-width -x -d "Set terminal , +, or -" -n __bat_no_excl_args + +complete -c $bat -l theme -x -a "$special_themes(command $bat --list-themes | command cat)" -d "Set the syntax highlighting theme" -n __bat_no_excl_args + +complete -c $bat -l theme-dark -x -a "(command $bat --list-themes | command cat)" -d "Set the syntax highlighting theme for dark backgrounds" -n __bat_no_excl_args + +complete -c $bat -l theme-light -x -a "(command $bat --list-themes | command cat)" -d "Set the syntax highlighting theme for light backgrounds" -n __bat_no_excl_args + +complete -c $bat -s V -l version -f -d "Show version information" -n __fish_is_first_arg + +complete -c $bat -l wrap -x -a "$wrap_opts" -d "Text-wrapping mode" -n __bat_no_excl_args + +# Sub-command 'cache' completions +## Completion of the 'cache' command itself is removed for better UX +## See https://github.com/sharkdp/bat/issues/2085#issuecomment-1271646802 + +complete -c $bat -l build -f -d "Parse new definitions into cache" -n __bat_cache_no_excl + +complete -c $bat -l clear -f -d "Reset definitions to defaults" -n __bat_cache_no_excl + +complete -c $bat -l blank -f -d "Create new data instead of appending" -n "__bat_cache_subcommand; and not __fish_seen_argument -l clear" + +complete -c $bat -l source -x -a "(__fish_complete_directories)" -d "Load syntaxes and themes from DIR" -n "__bat_cache_subcommand; and not __fish_seen_argument -l clear" + +complete -c $bat -l target -x -a "(__fish_complete_directories)" -d "Store cache in DIR" -n __bat_cache_subcommand + +complete -c $bat -l acknowledgements -d "Build acknowledgements.bin" -n __bat_cache_no_excl + +complete -c $bat -s h -d "Print a concise overview of $bat-cache help" -n __bat_cache_no_excl + +complete -c $bat -l help -f -d "Print all $bat-cache help" -n __bat_cache_no_excl + +# vim:ft=fish + diff --git a/fish/completions/fisher.fish b/fish/completions/fisher.fish new file mode 100644 index 0000000..6d23ce4 --- /dev/null +++ b/fish/completions/fisher.fish @@ -0,0 +1,7 @@ +complete --command fisher --exclusive --long help --description "Print help" +complete --command fisher --exclusive --long version --description "Print version" +complete --command fisher --exclusive --condition __fish_use_subcommand --arguments install --description "Install plugins" +complete --command fisher --exclusive --condition __fish_use_subcommand --arguments update --description "Update installed plugins" +complete --command fisher --exclusive --condition __fish_use_subcommand --arguments remove --description "Remove installed plugins" +complete --command fisher --exclusive --condition __fish_use_subcommand --arguments list --description "List installed plugins matching regex" +complete --command fisher --exclusive --condition "__fish_seen_subcommand_from update remove" --arguments "(fisher list)" diff --git a/fish/completions/rg.fish b/fish/completions/rg.fish new file mode 100644 index 0000000..687931e --- /dev/null +++ b/fish/completions/rg.fish @@ -0,0 +1,175 @@ +complete -c rg -s e -l regexp -d 'A pattern to search for.' -r -f +complete -c rg -s f -l file -d 'Search for patterns from the given file.' -r -F +complete -c rg -s A -l after-context -d 'Show NUM lines after each match.' -r -f +complete -c rg -s B -l before-context -d 'Show NUM lines before each match.' -r -f +complete -c rg -l binary -d 'Search binary files.' +complete -c rg -l no-binary -n '__fish_contains_opt binary' -d 'Search binary files.' +complete -c rg -l block-buffered -d 'Force block buffering.' +complete -c rg -l no-block-buffered -n '__fish_contains_opt block-buffered' -d 'Force block buffering.' +complete -c rg -s b -l byte-offset -d 'Print the byte offset for each matching line.' +complete -c rg -l no-byte-offset -n '__fish_contains_opt -s b byte-offset' -d 'Print the byte offset for each matching line.' +complete -c rg -s s -l case-sensitive -d 'Search case sensitively (default).' +complete -c rg -l color -d 'When to use color.' -r -f -a 'never auto always ansi' +complete -c rg -l colors -d 'Configure color settings and styles.' -r -f +complete -c rg -l column -d 'Show column numbers.' +complete -c rg -l no-column -n '__fish_contains_opt column' -d 'Show column numbers.' +complete -c rg -s C -l context -d 'Show NUM lines before and after each match.' -r -f +complete -c rg -l context-separator -d 'Set the separator for contextual chunks.' -r -f +complete -c rg -l no-context-separator -n '__fish_contains_opt context-separator' -d 'Set the separator for contextual chunks.' +complete -c rg -s c -l count -d 'Show count of matching lines for each file.' +complete -c rg -l count-matches -d 'Show count of every match for each file.' +complete -c rg -l crlf -d 'Use CRLF line terminators (nice for Windows).' +complete -c rg -l no-crlf -n '__fish_contains_opt crlf' -d 'Use CRLF line terminators (nice for Windows).' +complete -c rg -l debug -d 'Show debug messages.' +complete -c rg -l dfa-size-limit -d 'The upper size limit of the regex DFA.' -r -f +complete -c rg -s E -l encoding -d 'Specify the text encoding of files to search.' -r -f -a '# This is impossible to read, but these encodings rarely if ever change, so +# it probably does not matter. They are derived from the list given here: +# https://encoding.spec.whatwg.org/#concept-encoding-get +# +# The globbing here works in both fish and zsh (though they expand it in +# different orders). It may work in other shells too. + +{{,us-}ascii,arabic,chinese,cyrillic,greek{,8},hebrew,korean} +logical visual mac {,cs}macintosh x-mac-{cyrillic,roman,ukrainian} +866 ibm{819,866} csibm866 +big5{,-hkscs} {cn-,cs}big5 x-x-big5 +cp{819,866,125{0,1,2,3,4,5,6,7,8}} x-cp125{0,1,2,3,4,5,6,7,8} +csiso2022{jp,kr} csiso8859{6,8}{e,i} +csisolatin{1,2,3,4,5,6,9} csisolatin{arabic,cyrillic,greek,hebrew} +ecma-{114,118} asmo-708 elot_928 sun_eu_greek +euc-{jp,kr} x-euc-jp cseuckr cseucpkdfmtjapanese +{,x-}gbk csiso58gb231280 gb18030 {,cs}gb2312 gb_2312{,-80} hz-gb-2312 +iso-2022-{cn,cn-ext,jp,kr} +iso8859{,-}{1,2,3,4,5,6,7,8,9,10,11,13,14,15} +iso-8859-{1,2,3,4,5,6,7,8,9,10,11,{6,8}-{e,i},13,14,15,16} iso_8859-{1,2,3,4,5,6,7,8,9,15} +iso_8859-{1,2,6,7}:1987 iso_8859-{3,4,5,8}:1988 iso_8859-9:1989 +iso-ir-{58,100,101,109,110,126,127,138,144,148,149,157} +koi{,8,8-r,8-ru,8-u,8_r} cskoi8r +ks_c_5601-{1987,1989} ksc{,_}5691 csksc56011987 +latin{1,2,3,4,5,6} l{1,2,3,4,5,6,9} +shift{-,_}jis csshiftjis {,x-}sjis ms_kanji ms932 +utf{,-}8 utf-16{,be,le} unicode-1-1-utf-8 +windows-{31j,874,949,125{0,1,2,3,4,5,6,7,8}} dos-874 tis-620 ansi_x3.4-1968 +x-user-defined auto none +' +complete -c rg -l no-encoding -n '__fish_contains_opt -s E encoding' -d 'Specify the text encoding of files to search.' +complete -c rg -l engine -d 'Specify which regex engine to use.' -r -f -a 'default pcre2 auto' +complete -c rg -l field-context-separator -d 'Set the field context separator.' -r -f +complete -c rg -l field-match-separator -d 'Set the field match separator.' -r -f +complete -c rg -l files -d 'Print each file that would be searched.' +complete -c rg -s l -l files-with-matches -d 'Print the paths with at least one match.' +complete -c rg -l files-without-match -d 'Print the paths that contain zero matches.' +complete -c rg -s F -l fixed-strings -d 'Treat all patterns as literals.' +complete -c rg -l no-fixed-strings -n '__fish_contains_opt -s F fixed-strings' -d 'Treat all patterns as literals.' +complete -c rg -s L -l follow -d 'Follow symbolic links.' +complete -c rg -l no-follow -n '__fish_contains_opt -s L follow' -d 'Follow symbolic links.' +complete -c rg -l generate -d 'Generate man pages and completion scripts.' -r -f -a 'man complete-bash complete-zsh complete-fish complete-powershell' +complete -c rg -s g -l glob -d 'Include or exclude file paths.' -r -f +complete -c rg -l glob-case-insensitive -d 'Process all glob patterns case insensitively.' +complete -c rg -l no-glob-case-insensitive -n '__fish_contains_opt glob-case-insensitive' -d 'Process all glob patterns case insensitively.' +complete -c rg -l heading -d 'Print matches grouped by each file.' +complete -c rg -l no-heading -n '__fish_contains_opt heading' -d 'Print matches grouped by each file.' +complete -c rg -s h -l help -d 'Show help output.' +complete -c rg -s . -l hidden -d 'Search hidden files and directories.' +complete -c rg -l no-hidden -n '__fish_contains_opt -s . hidden' -d 'Search hidden files and directories.' +complete -c rg -l hostname-bin -d 'Run a program to get this system\'s hostname.' -r -f -a '(__fish_complete_command)' +complete -c rg -l hyperlink-format -d 'Set the format of hyperlinks.' -r -f +complete -c rg -l iglob -d 'Include/exclude paths case insensitively.' -r -f +complete -c rg -s i -l ignore-case -d 'Case insensitive search.' +complete -c rg -l ignore-file -d 'Specify additional ignore files.' -r -F +complete -c rg -l ignore-file-case-insensitive -d 'Process ignore files case insensitively.' +complete -c rg -l no-ignore-file-case-insensitive -n '__fish_contains_opt ignore-file-case-insensitive' -d 'Process ignore files case insensitively.' +complete -c rg -l include-zero -d 'Include zero matches in summary output.' +complete -c rg -l no-include-zero -n '__fish_contains_opt include-zero' -d 'Include zero matches in summary output.' +complete -c rg -s v -l invert-match -d 'Invert matching.' +complete -c rg -l no-invert-match -n '__fish_contains_opt -s v invert-match' -d 'Invert matching.' +complete -c rg -l json -d 'Show search results in a JSON Lines format.' +complete -c rg -l no-json -n '__fish_contains_opt json' -d 'Show search results in a JSON Lines format.' +complete -c rg -l line-buffered -d 'Force line buffering.' +complete -c rg -l no-line-buffered -n '__fish_contains_opt line-buffered' -d 'Force line buffering.' +complete -c rg -s n -l line-number -d 'Show line numbers.' +complete -c rg -s N -l no-line-number -d 'Suppress line numbers.' +complete -c rg -s x -l line-regexp -d 'Show matches surrounded by line boundaries.' +complete -c rg -s M -l max-columns -d 'Omit lines longer than this limit.' -r -f +complete -c rg -l max-columns-preview -d 'Show preview for lines exceeding the limit.' +complete -c rg -l no-max-columns-preview -n '__fish_contains_opt max-columns-preview' -d 'Show preview for lines exceeding the limit.' +complete -c rg -s m -l max-count -d 'Limit the number of matching lines.' -r -f +complete -c rg -s d -l max-depth -d 'Descend at most NUM directories.' -r -f +complete -c rg -l max-filesize -d 'Ignore files larger than NUM in size.' -r -f +complete -c rg -l mmap -d 'Search with memory maps when possible.' +complete -c rg -l no-mmap -n '__fish_contains_opt mmap' -d 'Search with memory maps when possible.' +complete -c rg -s U -l multiline -d 'Enable searching across multiple lines.' +complete -c rg -l no-multiline -n '__fish_contains_opt -s U multiline' -d 'Enable searching across multiple lines.' +complete -c rg -l multiline-dotall -d 'Make \'.\' match line terminators.' +complete -c rg -l no-multiline-dotall -n '__fish_contains_opt multiline-dotall' -d 'Make \'.\' match line terminators.' +complete -c rg -l no-config -d 'Never read configuration files.' +complete -c rg -l no-ignore -d 'Don\'t use ignore files.' +complete -c rg -l ignore -n '__fish_contains_opt no-ignore' -d 'Don\'t use ignore files.' +complete -c rg -l no-ignore-dot -d 'Don\'t use .ignore or .rgignore files.' +complete -c rg -l ignore-dot -n '__fish_contains_opt no-ignore-dot' -d 'Don\'t use .ignore or .rgignore files.' +complete -c rg -l no-ignore-exclude -d 'Don\'t use local exclusion files.' +complete -c rg -l ignore-exclude -n '__fish_contains_opt no-ignore-exclude' -d 'Don\'t use local exclusion files.' +complete -c rg -l no-ignore-files -d 'Don\'t use --ignore-file arguments.' +complete -c rg -l ignore-files -n '__fish_contains_opt no-ignore-files' -d 'Don\'t use --ignore-file arguments.' +complete -c rg -l no-ignore-global -d 'Don\'t use global ignore files.' +complete -c rg -l ignore-global -n '__fish_contains_opt no-ignore-global' -d 'Don\'t use global ignore files.' +complete -c rg -l no-ignore-messages -d 'Suppress gitignore parse error messages.' +complete -c rg -l ignore-messages -n '__fish_contains_opt no-ignore-messages' -d 'Suppress gitignore parse error messages.' +complete -c rg -l no-ignore-parent -d 'Don\'t use ignore files in parent directories.' +complete -c rg -l ignore-parent -n '__fish_contains_opt no-ignore-parent' -d 'Don\'t use ignore files in parent directories.' +complete -c rg -l no-ignore-vcs -d 'Don\'t use ignore files from source control.' +complete -c rg -l ignore-vcs -n '__fish_contains_opt no-ignore-vcs' -d 'Don\'t use ignore files from source control.' +complete -c rg -l no-messages -d 'Suppress some error messages.' +complete -c rg -l messages -n '__fish_contains_opt no-messages' -d 'Suppress some error messages.' +complete -c rg -l no-require-git -d 'Use .gitignore outside of git repositories.' +complete -c rg -l require-git -n '__fish_contains_opt no-require-git' -d 'Use .gitignore outside of git repositories.' +complete -c rg -l no-unicode -d 'Disable Unicode mode.' +complete -c rg -l unicode -n '__fish_contains_opt no-unicode' -d 'Disable Unicode mode.' +complete -c rg -s 0 -l null -d 'Print a NUL byte after file paths.' +complete -c rg -l null-data -d 'Use NUL as a line terminator.' +complete -c rg -l one-file-system -d 'Skip directories on other file systems.' +complete -c rg -l no-one-file-system -n '__fish_contains_opt one-file-system' -d 'Skip directories on other file systems.' +complete -c rg -s o -l only-matching -d 'Print only matched parts of a line.' +complete -c rg -l path-separator -d 'Set the path separator for printing paths.' -r -f +complete -c rg -l passthru -d 'Print both matching and non-matching lines.' +complete -c rg -s P -l pcre2 -d 'Enable PCRE2 matching.' +complete -c rg -l no-pcre2 -n '__fish_contains_opt -s P pcre2' -d 'Enable PCRE2 matching.' +complete -c rg -l pcre2-version -d 'Print the version of PCRE2 that ripgrep uses.' +complete -c rg -l pre -d 'Search output of COMMAND for each PATH.' -r -f -a '(__fish_complete_command)' +complete -c rg -l no-pre -n '__fish_contains_opt pre' -d 'Search output of COMMAND for each PATH.' +complete -c rg -l pre-glob -d 'Include or exclude files from a preprocessor.' -r -f +complete -c rg -s p -l pretty -d 'Alias for colors, headings and line numbers.' +complete -c rg -s q -l quiet -d 'Do not print anything to stdout.' +complete -c rg -l regex-size-limit -d 'The size limit of the compiled regex.' -r -f +complete -c rg -s r -l replace -d 'Replace matches with the given text.' -r -f +complete -c rg -s z -l search-zip -d 'Search in compressed files.' +complete -c rg -l no-search-zip -n '__fish_contains_opt -s z search-zip' -d 'Search in compressed files.' +complete -c rg -s S -l smart-case -d 'Smart case search.' +complete -c rg -l sort -d 'Sort results in ascending order.' -r -f -a 'none path modified accessed created' +complete -c rg -l sortr -d 'Sort results in descending order.' -r -f -a 'none path modified accessed created' +complete -c rg -l stats -d 'Print statistics about the search.' +complete -c rg -l no-stats -n '__fish_contains_opt stats' -d 'Print statistics about the search.' +complete -c rg -l stop-on-nonmatch -d 'Stop searching after a non-match.' +complete -c rg -s a -l text -d 'Search binary files as if they were text.' +complete -c rg -l no-text -n '__fish_contains_opt -s a text' -d 'Search binary files as if they were text.' +complete -c rg -s j -l threads -d 'Set the approximate number of threads to use.' -r -f +complete -c rg -l trace -d 'Show trace messages.' +complete -c rg -l trim -d 'Trim prefix whitespace from matches.' +complete -c rg -l no-trim -n '__fish_contains_opt trim' -d 'Trim prefix whitespace from matches.' +complete -c rg -s t -l type -d 'Only search files matching TYPE.' -r -f -a '(rg --type-list | string replace : \t)' +complete -c rg -s T -l type-not -d 'Do not search files matching TYPE.' -r -f -a '(rg --type-list | string replace : \t)' +complete -c rg -l type-add -d 'Add a new glob for a file type.' -r -f +complete -c rg -l type-clear -d 'Clear globs for a file type.' -r -f +complete -c rg -l type-list -d 'Show all supported file types.' +complete -c rg -s u -l unrestricted -d 'Reduce the level of "smart" filtering.' +complete -c rg -s V -l version -d 'Print ripgrep\'s version.' +complete -c rg -l vimgrep -d 'Print results in a vim compatible format.' +complete -c rg -s H -l with-filename -d 'Print the file path with each matching line.' +complete -c rg -s I -l no-filename -d 'Never print the path with each matching line.' +complete -c rg -s w -l word-regexp -d 'Show matches surrounded by word boundaries.' +complete -c rg -l auto-hybrid-regex -d '(DEPRECATED) Use PCRE2 if appropriate.' +complete -c rg -l no-auto-hybrid-regex -n '__fish_contains_opt auto-hybrid-regex' -d '(DEPRECATED) Use PCRE2 if appropriate.' +complete -c rg -l no-pcre2-unicode -d '(DEPRECATED) Disable Unicode mode for PCRE2.' +complete -c rg -l pcre2-unicode -n '__fish_contains_opt no-pcre2-unicode' -d '(DEPRECATED) Disable Unicode mode for PCRE2.' +complete -c rg -l sort-files -d '(DEPRECATED) Sort results by file path.' +complete -c rg -l no-sort-files -n '__fish_contains_opt sort-files' -d '(DEPRECATED) Sort results by file path.' diff --git a/fish/conf.d/fzf.fish b/fish/conf.d/fzf.fish new file mode 100644 index 0000000..086cf45 --- /dev/null +++ b/fish/conf.d/fzf.fish @@ -0,0 +1 @@ +set -x FZF_DEFAULT_OPTS_FILE ~/.config/fzf/config diff --git a/fish/config.fish b/fish/config.fish index d714361..c940fe2 100644 --- a/fish/config.fish +++ b/fish/config.fish @@ -1,3 +1,9 @@ if status is-interactive # Commands to run in interactive sessions can go here + set -g default_user christoph + set -g fish_prompt_pwd_dir_length 0 + set -g theme_powerline_fonts no + set -g theme_nerd_fonts yes + set -g theme_newline_cursor yes + set -g theme_date_timezone Europe/Berlin end diff --git a/fish/fish_plugins b/fish/fish_plugins new file mode 100644 index 0000000..70035f7 --- /dev/null +++ b/fish/fish_plugins @@ -0,0 +1,2 @@ +jorgebucaran/fisher +oh-my-fish/theme-bobthefish diff --git a/fish/functions/__bobthefish_colors.fish b/fish/functions/__bobthefish_colors.fish new file mode 100644 index 0000000..34a5d16 --- /dev/null +++ b/fish/functions/__bobthefish_colors.fish @@ -0,0 +1,1102 @@ +function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthefish' + switch "$color_scheme" + case 'user' + __bobthefish_user_color_scheme_deprecated + return + + case 'terminal' 'terminal-dark*' + set -l colorfg black + [ "$color_scheme" = 'terminal-dark-white' ]; and set colorfg white + set -x color_initial_segment_exit white red --bold + set -x color_initial_segment_private white black + set -x color_initial_segment_su white green --bold + set -x color_initial_segment_jobs white blue --bold + + set -x color_path black white + set -x color_path_basename black white --bold + set -x color_path_nowrite magenta $colorfg + set -x color_path_nowrite_basename magenta $colorfg --bold + + set -x color_repo green $colorfg + set -x color_repo_work_tree black $colorfg --bold + set -x color_repo_dirty brred $colorfg + set -x color_repo_staged yellow $colorfg + + set -x color_vi_mode_default brblue $colorfg --bold + set -x color_vi_mode_insert brgreen $colorfg --bold + set -x color_vi_mode_visual bryellow $colorfg --bold + + set -x color_vagrant brcyan $colorfg + set -x color_k8s magenta white --bold + set -x color_aws_vault blue $colorfg --bold + set -x color_aws_vault_expired blue red --bold + set -x color_username white black --bold + set -x color_hostname white black + set -x color_screen brgreen $colorfg --bold + set -x color_rvm brmagenta $colorfg --bold + set -x color_node brgreen $colorfg --bold + set -x color_virtualfish brblue $colorfg --bold + set -x color_virtualgo brblue $colorfg --bold + set -x color_desk brblue $colorfg --bold + set -x color_nix brblue $colorfg --bold + + case 'terminal-light*' + set -l colorfg white + [ "$color_scheme" = 'terminal-light-black' ]; and set colorfg black + set -x color_initial_segment_exit black red --bold + set -x color_initial_segment_private black white + set -x color_initial_segment_su black green --bold + set -x color_initial_segment_jobs black blue --bold + + set -x color_path white black + set -x color_path_basename white black --bold + set -x color_path_nowrite magenta $colorfg + set -x color_path_nowrite_basename magenta $colorfg --bold + + set -x color_repo green $colorfg + set -x color_repo_work_tree white $colorfg --bold + set -x color_repo_dirty brred $colorfg + set -x color_repo_staged yellow $colorfg + + set -x color_vi_mode_default brblue $colorfg --bold + set -x color_vi_mode_insert brgreen $colorfg --bold + set -x color_vi_mode_visual bryellow $colorfg --bold + + set -x color_vagrant brcyan $colorfg + set -x color_k8s magenta white --bold + set -x color_aws_vault blue $colorfg --bold + set -x color_aws_vault_expired blue red --bold + set -x color_username black white --bold + set -x color_hostname black white + set -x color_screen brgreen $colorfg --bold + set -x color_rvm brmagenta $colorfg --bold + set -x color_node brgreen $colorfg --bold + set -x color_virtualfish brblue $colorfg --bold + set -x color_virtualgo brblue $colorfg --bold + set -x color_desk brblue $colorfg --bold + set -x color_nix brblue $colorfg --bold + + case 'terminal2' 'terminal2-dark*' + set -l colorfg black + [ "$color_scheme" = 'terminal2-dark-white' ]; and set colorfg white + set -x color_initial_segment_exit grey red --bold + set -x color_initial_segment_private grey black + set -x color_initial_segment_su grey green --bold + set -x color_initial_segment_jobs grey blue --bold + + set -x color_path brgrey white + set -x color_path_basename brgrey white --bold + set -x color_path_nowrite magenta $colorfg + set -x color_path_nowrite_basename magenta $colorfg --bold + + set -x color_repo green $colorfg + set -x color_repo_work_tree brgrey $colorfg --bold + set -x color_repo_dirty brred $colorfg + set -x color_repo_staged yellow $colorfg + + set -x color_vi_mode_default brblue $colorfg --bold + set -x color_vi_mode_insert brgreen $colorfg --bold + set -x color_vi_mode_visual bryellow $colorfg --bold + + set -x color_vagrant brcyan $colorfg + set -x color_k8s magenta white --bold + set -x color_aws_vault blue $colorfg --bold + set -x color_aws_vault_expired blue red --bold + set -x color_username brgrey white --bold + set -x color_hostname brgrey white + set -x color_screen brgreen $colorfg --bold + set -x color_rvm brmagenta $colorfg --bold + set -x color_node brgreen $colorfg --bold + set -x color_virtualfish brblue $colorfg --bold + set -x color_virtualgo brblue $colorfg --bold + set -x color_desk brblue $colorfg --bold + set -x color_nix brblue $colorfg --bold + + case 'terminal2-light*' + set -l colorfg white + [ "$color_scheme" = 'terminal2-light-black' ]; and set colorfg black + set -x color_initial_segment_exit brgrey red --bold + set -x color_initial_segment_private brgrey black + set -x color_initial_segment_su brgrey green --bold + set -x color_initial_segment_jobs brgrey blue --bold + + set -x color_path grey black + set -x color_path_basename grey black --bold + set -x color_path_nowrite magenta $colorfg + set -x color_path_nowrite_basename magenta $colorfg --bold + + set -x color_repo green $colorfg + set -x color_repo_work_tree grey $colorfg --bold + set -x color_repo_dirty brred $colorfg + set -x color_repo_staged yellow $colorfg + + set -x color_vi_mode_default brblue $colorfg --bold + set -x color_vi_mode_insert brgreen $colorfg --bold + set -x color_vi_mode_visual bryellow $colorfg --bold + + set -x color_vagrant brcyan $colorfg + set -x color_k8s magenta white --bold + set -x color_aws_vault blue $colorfg --bold + set -x color_aws_vault_expired blue red --bold + set -x color_username grey black --bold + set -x color_hostname grey black + set -x color_screen brgreen $colorfg --bold + set -x color_rvm brmagenta $colorfg --bold + set -x color_node brgreen $colorfg --bold + set -x color_virtualfish brblue $colorfg --bold + set -x color_virtualgo brblue $colorfg --bold + set -x color_desk brblue $colorfg --bold + set -x color_nix brblue $colorfg --bold + + case 'zenburn' + set -l grey 333333 # a bit darker than normal zenburn grey + set -l red CC9393 + set -l green 7F9F7F + set -l yellow E3CEAB + set -l orange DFAF8F + set -l blue 8CD0D3 + set -l white DCDCCC + + set -x color_initial_segment_exit $white $red --bold + set -x color_initial_segment_private $white $grey + set -x color_initial_segment_su $white $green --bold + set -x color_initial_segment_jobs $white $blue --bold + + set -x color_path $grey $white + set -x color_path_basename $grey $white --bold + set -x color_path_nowrite $grey $red + set -x color_path_nowrite_basename $grey $red --bold + + set -x color_repo $green $grey + set -x color_repo_work_tree $grey $grey --bold + set -x color_repo_dirty $red $grey + set -x color_repo_staged $yellow $grey + + set -x color_vi_mode_default $grey $yellow --bold + set -x color_vi_mode_insert $green $white --bold + set -x color_vi_mode_visual $yellow $grey --bold + + set -x color_vagrant $blue $green --bold + set -x color_k8s $green $white --bold + set -x color_aws_vault $blue $grey --bold + set -x color_aws_vault_expired $blue $red --bold + set -x color_username $grey $blue --bold + set -x color_hostname $grey $blue + set -x color_screen $green $grey --bold + set -x color_rvm $red $grey --bold + set -x color_node $green $white --bold + set -x color_virtualfish $blue $grey --bold + set -x color_virtualgo $blue $grey --bold + set -x color_desk $blue $grey --bold + set -x color_nix $blue $grey --bold + + case 'base16-light' + set -l base00 181818 + set -l base01 282828 + set -l base02 383838 + set -l base03 585858 + set -l base04 b8b8b8 + set -l base05 d8d8d8 + set -l base06 e8e8e8 + set -l base07 f8f8f8 + set -l base08 ab4642 # red + set -l base09 dc9656 # orange + set -l base0A f7ca88 # yellow + set -l base0B a1b56c # green + set -l base0C 86c1b9 # cyan + set -l base0D 7cafc2 # blue + set -l base0E ba8baf # violet + set -l base0F a16946 # brown + + set -l colorfg $base00 + + set -x color_initial_segment_exit $base02 $base08 --bold + set -x color_initial_segment_private $base02 $base06 + set -x color_initial_segment_su $base02 $base0B --bold + set -x color_initial_segment_jobs $base02 $base0D --bold + + set -x color_path $base06 $base02 + set -x color_path_basename $base06 $base01 --bold + set -x color_path_nowrite $base06 $base08 + set -x color_path_nowrite_basename $base06 $base08 --bold + + set -x color_repo $base0B $colorfg + set -x color_repo_work_tree $base06 $colorfg --bold + set -x color_repo_dirty $base08 $colorfg + set -x color_repo_staged $base09 $colorfg + + set -x color_vi_mode_default $base04 $colorfg --bold + set -x color_vi_mode_insert $base0B $colorfg --bold + set -x color_vi_mode_visual $base09 $colorfg --bold + + set -x color_vagrant $base0C $colorfg --bold + set -x color_k8s $base06 $colorfg --bold + set -x color_aws_vault $base0D $colorfg --bold + set -x color_aws_vault_expired $base0D $base08 --bold + set -x color_username $base02 $base0D --bold + set -x color_hostname $base02 $base0D + set -x color_screen $base06 $colorfg --bold + set -x color_rvm $base08 $colorfg --bold + set -x color_node $base0B $colorfg --bold + set -x color_virtualfish $base0D $colorfg --bold + set -x color_virtualgo $base0D $colorfg --bold + set -x color_desk $base0D $colorfg --bold + set -x color_nix $base0D $colorfg --bold + + case 'base16' 'base16-dark' + set -l base00 181818 + set -l base01 282828 + set -l base02 383838 + set -l base03 585858 + set -l base04 b8b8b8 + set -l base05 d8d8d8 + set -l base06 e8e8e8 + set -l base07 f8f8f8 + set -l base08 ab4642 # red + set -l base09 dc9656 # orange + set -l base0A f7ca88 # yellow + set -l base0B a1b56c # green + set -l base0C 86c1b9 # cyan + set -l base0D 7cafc2 # blue + set -l base0E ba8baf # violet + set -l base0F a16946 # brown + + set -l colorfg $base07 + + set -x color_initial_segment_exit $base05 $base08 --bold + set -x color_initial_segment_private $base05 $base02 + set -x color_initial_segment_su $base05 $base0B --bold + set -x color_initial_segment_jobs $base05 $base0D --bold + + set -x color_path $base02 $base05 + set -x color_path_basename $base02 $base06 --bold + set -x color_path_nowrite $base02 $base08 + set -x color_path_nowrite_basename $base02 $base08 --bold + + set -x color_repo $base0B $colorfg + set -x color_repo_work_tree $base02 $colorfg --bold + set -x color_repo_dirty $base08 $colorfg + set -x color_repo_staged $base09 $colorfg + + set -x color_vi_mode_default $base03 $colorfg --bold + set -x color_vi_mode_insert $base0B $colorfg --bold + set -x color_vi_mode_visual $base09 $colorfg --bold + + set -x color_vagrant $base0C $colorfg --bold + set -x color_k8s $base0B $colorfg --bold + set -x color_aws_vault $base0D $base0A --bold + set -x color_aws_vault_expired $base0D $base08 --bold + set -x color_username $base02 $base0D --bold + set -x color_hostname $base02 $base0D + set -x color_screen $base0B $colorfg --bold + set -x color_rvm $base08 $colorfg --bold + set -x color_node $base0B $colorfg --bold + set -x color_virtualfish $base0D $colorfg --bold + set -x color_virtualgo $base0D $colorfg --bold + set -x color_desk $base0D $colorfg --bold + set -x color_nix $base0D $colorfg --bold + + case 'solarized-light' + set -l base03 002b36 + set -l base02 073642 + set -l base01 586e75 + set -l base00 657b83 + set -l base0 839496 + set -l base1 93a1a1 + set -l base2 eee8d5 + set -l base3 fdf6e3 + set -l yellow b58900 + set -l orange cb4b16 + set -l red dc322f + set -l magenta d33682 + set -l violet 6c71c4 + set -l blue 268bd2 + set -l cyan 2aa198 + set -l green 859900 + + set colorfg $base03 + + set -x color_initial_segment_exit $base02 $red --bold + set -x color_initial_segment_private $base02 $base2 + set -x color_initial_segment_su $base02 $green --bold + set -x color_initial_segment_jobs $base02 $blue --bold + + set -x color_path $base2 $base00 + set -x color_path_basename $base2 $base01 --bold + set -x color_path_nowrite $base2 $orange + set -x color_path_nowrite_basename $base2 $orange --bold + + set -x color_repo $green $colorfg + set -x color_repo_work_tree $base2 $colorfg --bold + set -x color_repo_dirty $red $colorfg + set -x color_repo_staged $yellow $colorfg + + set -x color_vi_mode_default $blue $colorfg --bold + set -x color_vi_mode_insert $green $colorfg --bold + set -x color_vi_mode_visual $yellow $colorfg --bold + + set -x color_vagrant $violet $colorfg --bold + set -x color_k8s $green $colorfg --bold + set -x color_aws_vault $violet $base3 --bold + set -x color_aws_vault_expired $violet $orange --bold + set -x color_username $base2 $blue --bold + set -x color_hostname $base2 $blue + set -x color_screen $green $colorfg --bold + set -x color_rvm $red $colorfg --bold + set -x color_node $green $colorfg --bold + set -x color_virtualfish $cyan $colorfg --bold + set -x color_virtualgo $cyan $colorfg --bold + set -x color_desk $cyan $colorfg --bold + set -x color_nix $cyan $colorfg --bold + + case 'solarized' 'solarized-dark' + set -l base03 002b36 + set -l base02 073642 + set -l base01 586e75 + set -l base00 657b83 + set -l base0 839496 + set -l base1 93a1a1 + set -l base2 eee8d5 + set -l base3 fdf6e3 + set -l yellow b58900 + set -l orange cb4b16 + set -l red dc322f + set -l magenta d33682 + set -l violet 6c71c4 + set -l blue 268bd2 + set -l cyan 2aa198 + set -l green 859900 + + set colorfg $base3 + + set -x color_initial_segment_exit $base2 $red --bold + set -x color_initial_segment_private $base2 $base02 + set -x color_initial_segment_su $base2 $green --bold + set -x color_initial_segment_jobs $base2 $blue --bold + + set -x color_path $base02 $base0 + set -x color_path_basename $base02 $base1 --bold + set -x color_path_nowrite $base02 $orange + set -x color_path_nowrite_basename $base02 $orange --bold + + set -x color_repo $green $colorfg + set -x color_repo_work_tree $base02 $colorfg --bold + set -x color_repo_dirty $red $colorfg + set -x color_repo_staged $yellow $colorfg + + set -x color_vi_mode_default $blue $colorfg --bold + set -x color_vi_mode_insert $green $colorfg --bold + set -x color_vi_mode_visual $yellow $colorfg --bold + + set -x color_vagrant $violet $colorfg --bold + set -x color_k8s $green $colorfg --bold + set -x color_aws_vault $violet $base3 --bold + set -x color_aws_vault_expired $violet $orange --bold + set -x color_username $base02 $blue --bold + set -x color_hostname $base02 $blue + set -x color_screen $green $colorfg --bold + set -x color_rvm $red $colorfg --bold + set -x color_node $green $colorfg --bold + set -x color_virtualfish $cyan $colorfg --bold + set -x color_virtualgo $cyan $colorfg --bold + set -x color_desk $cyan $colorfg --bold + set -x color_nix $cyan $colorfg --bold + + case 'light' + # light medium dark + # ------ ------ ------ + set -l red cc9999 ce000f 660000 + set -l green addc10 189303 0c4801 + set -l blue 48b4fb 005faf 255e87 + set -l orange f6b117 unused 3a2a03 + set -l brown bf5e00 803f00 4d2600 + set -l grey cccccc 999999 333333 + set -l white ffffff + set -l black 000000 + set -l ruby_red af0000 + + set -x color_initial_segment_exit $grey[3] $red[2] --bold + set -x color_initial_segment_private $grey[3] $grey[1] + set -x color_initial_segment_su $grey[3] $green[2] --bold + set -x color_initial_segment_jobs $grey[3] $blue[3] --bold + + set -x color_path $grey[1] $grey[2] + set -x color_path_basename $grey[1] $grey[3] --bold + set -x color_path_nowrite $red[1] $red[3] + set -x color_path_nowrite_basename $red[1] $red[3] --bold + + set -x color_repo $green[1] $green[3] + set -x color_repo_work_tree $grey[1] $white --bold + set -x color_repo_dirty $red[2] $white + set -x color_repo_staged $orange[1] $orange[3] + + set -x color_vi_mode_default $grey[2] $grey[3] --bold + set -x color_vi_mode_insert $green[2] $grey[3] --bold + set -x color_vi_mode_visual $orange[1] $orange[3] --bold + + set -x color_vagrant $blue[1] $white --bold + set -x color_k8s $green[1] $colorfg --bold + set -x color_aws_vault $blue[3] $orange[1] --bold + set -x color_aws_vault_expired $blue[3] $red[3] --bold + set -x color_username $grey[1] $blue[3] --bold + set -x color_hostname $grey[1] $blue[3] + set -x color_screen $green[1] $colorfg --bold + set -x color_rvm $ruby_red $grey[1] --bold + set -x color_node $green $grey[1] --bold + set -x color_virtualfish $blue[2] $grey[1] --bold + set -x color_virtualgo $blue[2] $grey[1] --bold + set -x color_desk $blue[2] $grey[1] --bold + set -x color_nix $blue[2] $grey[1] --bold + + case 'gruvbox' + # light medium dark darkest + # ------ ------ ------ ------- + set -l red fb4934 cc241d + set -l green b8bb26 98971a + set -l yellow fabd2f d79921 + set -l aqua 8ec07c 689d6a + set -l blue 83a598 458588 + set -l grey cccccc 999999 333333 + set -l fg fbf1c7 ebdbb2 d5c4a1 a89984 + set -l bg 504945 282828 + + set -x color_initial_segment_exit $fg[1] $red[2] --bold + set -x color_initial_segment_private $fg[1] $bg[1] + set -x color_initial_segment_su $fg[1] $green[2] --bold + set -x color_initial_segment_jobs $fg[1] $aqua[2] --bold + + set -x color_path $bg[1] $fg[2] + set -x color_path_basename $bg[1] $fg[2] --bold + set -x color_path_nowrite $red[1] $fg[2] + set -x color_path_nowrite_basename $red[1] $fg[2] --bold + + set -x color_repo $green[2] $bg[1] + set -x color_repo_work_tree $bg[1] $fg[2] --bold + set -x color_repo_dirty $red[2] $fg[2] + set -x color_repo_staged $yellow[1] $bg[1] + + set -x color_vi_mode_default $fg[4] $bg[2] --bold + set -x color_vi_mode_insert $blue[1] $bg[2] --bold + set -x color_vi_mode_visual $yellow[1] $bg[2] --bold + + set -x color_vagrant $blue[2] $fg[2] --bold + set -x color_k8s $green[2] $fg[2] --bold + set -x color_aws_vault $blue[2] $yellow[1] --bold + set -x color_aws_vault_expired $blue[2] $red[1] --bold + set -x color_username $fg[3] $blue[2] --bold + set -x color_hostname $fg[3] $blue[2] + set -x color_screen $green[1] $fg[2] --bold + set -x color_rvm $red[2] $fg[2] --bold + set -x color_node $green[1] $fg[2] --bold + set -x color_virtualfish $blue[2] $fg[2] --bold + set -x color_virtualgo $blue[2] $fg[2] --bold + set -x color_desk $blue[2] $fg[2] --bold + set -x color_nix $blue[2] $fg[2] --bold + + case 'gruvbox-light' + # light medium dark darkest + # ------ ------ ------ ------- + set -l red 9d0006 cc241d + set -l green 79740e 98971a + set -l yellow b57614 d79921 + set -l aqua 427b58 689d6a + set -l blue 076678 458588 + set -l grey a89984 928374 + set -l orange af3a03 d65d0e + set -l fg 282828 3c3836 504945 7c6f64 + set -l bg d5c4a1 fbf1c7 + + set -x color_initial_segment_exit $red[1] $bg[2] --bold + set -x color_initial_segment_su $fg[1] $green[2] --bold + set -x color_initial_segment_jobs $fg[1] $aqua[2] --bold + + set -x color_path $bg[1] $fg[2] + set -x color_path_basename $bg[1] $fg[2] --bold + set -x color_path_nowrite $red[1] $bg[2] + set -x color_path_nowrite_basename $red[1] $bg[2] --bold + + set -x color_repo $green[2] $fg[1] + set -x color_repo_work_tree $bg[1] $fg[2] --bold + set -x color_repo_dirty $orange[2] $bg[2] + set -x color_repo_staged $yellow[1] $bg[1] + + set -x color_vi_mode_default $fg[4] $bg[2] --bold + set -x color_vi_mode_insert $blue[1] $bg[2] --bold + set -x color_vi_mode_visual $yellow[1] $bg[2] --bold + + set -x color_vagrant $blue[2] $fg[2] --bold + set -x color_k8s $green[2] $fg[2] --bold + set -x color_username $fg[3] $blue[2] --bold + set -x color_hostname $fg[3] $blue[2] + set -x color_screen $green[2] $fg[2] --bold + set -x color_rvm $red[2] $bg[2] --bold + set -x color_nvm $green[1] $fg[2] --bold + set -x color_virtualfish $blue[2] $fg[2] --bold + set -x color_virtualgo $blue[2] $fg[2] --bold + set -x color_desk $blue[2] $fg[2] --bold + set -x color_nix $blue[2] $fg[2] --bold + + case 'dracula' # https://draculatheme.com + set -l bg 282a36 + set -l current_line 44475a + set -l selection 44475a + set -l fg f8f8f2 + set -l comment 6272a4 + set -l cyan 8be9fd + set -l green 50fa7b + set -l orange ffb86c + set -l pink ff79c6 + set -l purple bd93f9 + set -l red ff5555 + set -l yellow f1fa8c + + set -x color_initial_segment_exit $fg $red --bold + set -x color_initial_segment_private $fg $selection + set -x color_initial_segment_su $fg $purple --bold + set -x color_initial_segment_jobs $fg $comment --bold + + set -x color_path $selection $fg + set -x color_path_basename $selection $fg --bold + set -x color_path_nowrite $selection $red + set -x color_path_nowrite_basename $selection $red --bold + + set -x color_repo $green $bg + set -x color_repo_work_tree $selection $fg --bold + set -x color_repo_dirty $red $bg + set -x color_repo_staged $yellow $bg + + set -x color_vi_mode_default $bg $yellow --bold + set -x color_vi_mode_insert $green $bg --bold + set -x color_vi_mode_visual $orange $bg --bold + + set -x color_vagrant $pink $bg --bold + set -x color_k8s $purple $bg --bold + set -x color_aws_vault $comment $yellow --bold + set -x color_aws_vault_expired $comment $red --bold + set -x color_username $selection $cyan --bold + set -x color_hostname $selection $cyan + set -x color_screen $green $bg --bold + set -x color_rvm $red $bg --bold + set -x color_node $green $bg --bold + set -x color_virtualfish $comment $bg --bold + set -x color_virtualgo $cyan $bg --bold + set -x color_desk $comment $bg --bold + set -x color_nix $cyan $bg --bold + + case 'nord' + set -l base00 2E3440 + set -l base01 3B4252 + set -l base02 434C5E + set -l base03 4C566A + set -l base04 D8DEE9 + set -l base05 E5E9F0 + set -l base06 ECEFF4 + set -l base07 8FBCBB + set -l base08 88C0D0 + set -l base09 81A1C1 + set -l base0A 5E81AC + set -l base0B BF616A + set -l base0C D08770 + set -l base0D EBCB8B + set -l base0E A3BE8C + set -l base0F B48EAD + + set -l colorfg $base00 + + set -x color_initial_segment_exit $base05 $base0B --bold + set -x color_initial_segment_private $base05 $base02 + set -x color_initial_segment_su $base05 $base0E --bold + set -x color_initial_segment_jobs $base05 $base0C --bold + + set -x color_path $base02 $base05 + set -x color_path_basename $base02 $base06 --bold + set -x color_path_nowrite $base02 $base08 + set -x color_path_nowrite_basename $base02 $base08 --bold + + set -x color_repo $base0E $colorfg + set -x color_repo_work_tree $base02 $colorfg --bold + set -x color_repo_dirty $base0B $colorfg + set -x color_repo_staged $base0D $colorfg + + set -x color_vi_mode_default $base08 $colorfg --bold + set -x color_vi_mode_insert $base06 $colorfg --bold + set -x color_vi_mode_visual $base07 $colorfg --bold + + set -x color_vagrant $base02 $colorfg --bold + set -x color_k8s $base02 $colorfg --bold + set -x color_aws_vault $base0A $base0D --bold + set -x color_aws_vault_expired $base0A $base0B --bold + set -x color_username $base02 $base0D --bold + set -x color_hostname $base02 $base0D + set -x color_screen $base02 $colorfg --bold + set -x color_rvm $base09 $colorfg --bold + set -x color_node $base09 $colorfg --bold + set -x color_virtualfish $base09 $colorfg --bold + set -x color_virtualgo $base09 $colorfg --bold + set -x color_desk $base09 $colorfg --bold + + case 'catppuccin-latte' + set -l rosewater dc8a78 + set -l flamingo dd7878 + set -l pink ea76cb + set -l mauve 8839ef + set -l red d20f39 + set -l maroon e64553 + set -l peach fe640b + set -l yellow df8e1d + set -l green 40a02b + set -l teal 179299 + set -l sky 04a5e5 + set -l sapphire 209fb5 + set -l blue 1e66f5 + set -l lavender 7287fd + set -l text 4c4f69 + set -l subtext1 5c5f77 + set -l subtext0 6c6f85 + set -l overlay2 7c7f93 + set -l overlay1 8c8fa1 + set -l overlay0 9ca0b0 + set -l surface2 acb0be + set -l surface1 bcc0cc + set -l surface0 ccd0da + set -l base eff1f5 + set -l mantle e6e9ef + set -l crust dce0e8 + + set -x color_initial_segment_exit $surface2 $red --bold + set -x color_initial_segment_private $surface2 $flamingo + set -x color_initial_segment_su $surface2 $green --bold + set -x color_initial_segment_jobs $surface2 $peach --bold + + set -x color_path $surface0 $text + set -x color_path_basename $surface0 $text --bold + set -x color_path_nowrite $surface0 $mauve + set -x color_path_nowrite_basename $surface0 $mauve --bold + + set -x color_repo $green $mantle + set -x color_repo_work_tree $surface2 $mantle --bold + set -x color_repo_dirty $red $mantle + set -x color_repo_staged $yellow $mantle + + set -x color_vi_mode_default $sky $mantle --bold + set -x color_vi_mode_insert $green $mantle --bold + set -x color_vi_mode_visual $mauve $mantle --bold + + set -x color_vagrant $surface2 $text --bold + set -x color_k8s $surface2 $text --bold + set -x color_aws_vault $yellow $mantle --bold + set -x color_aws_vault_expired $red $mantle --bold + set -x color_username $surface2 $yellow --bold + set -x color_hostname $surface2 $yellow + set -x color_screen $green $mantle --bold + set -x color_rvm $red $mantle --bold + set -x color_node $green $mantle --bold + set -x color_virtualfish $peach $mantle --bold + set -x color_virtualgo $sky $mantle --bold + set -x color_desk $peach $mantle --bold + set -x color_nix $sky $mantle --bold + + case 'catppuccin-frappe' + set -l rosewater f2d5cf + set -l flamingo eebebe + set -l pink f4b8e4 + set -l mauve ca9ee6 + set -l red e78284 + set -l maroon ea999c + set -l peach ef9f76 + set -l yellow e5c890 + set -l green a6d189 + set -l teal 81c8be + set -l sky 99d1db + set -l sapphire 85c1dc + set -l blue 8caaee + set -l lavender babbf1 + set -l text c6d0f5 + set -l subtext1 b5bfe2 + set -l subtext0 a5adce + set -l overlay2 949cbb + set -l overlay1 838ba7 + set -l overlay0 737994 + set -l surface2 626880 + set -l surface1 51576d + set -l surface0 414559 + set -l base 303446 + set -l mantle 292c3c + set -l crust 232634 + + set -x color_initial_segment_exit $surface2 $red --bold + set -x color_initial_segment_private $surface2 $flamingo + set -x color_initial_segment_su $surface2 $green --bold + set -x color_initial_segment_jobs $surface2 $peach --bold + + set -x color_path $surface0 $text + set -x color_path_basename $surface0 $text --bold + set -x color_path_nowrite $surface0 $mauve + set -x color_path_nowrite_basename $surface0 $mauve --bold + + set -x color_repo $green $mantle + set -x color_repo_work_tree $surface2 $mantle --bold + set -x color_repo_dirty $red $mantle + set -x color_repo_staged $yellow $mantle + + set -x color_vi_mode_default $sky $mantle --bold + set -x color_vi_mode_insert $green $mantle --bold + set -x color_vi_mode_visual $mauve $mantle --bold + + set -x color_vagrant $surface2 $text --bold + set -x color_k8s $surface2 $text --bold + set -x color_aws_vault $yellow $mantle --bold + set -x color_aws_vault_expired $red $mantle --bold + set -x color_username $surface2 $yellow --bold + set -x color_hostname $surface2 $yellow + set -x color_screen $green $mantle --bold + set -x color_rvm $red $mantle --bold + set -x color_node $green $mantle --bold + set -x color_virtualfish $peach $mantle --bold + set -x color_virt