~jshsj/dots

69a4c379e860ade795dedaebd083849ba26f9348 — JSH 1 year, 6 months ago d560d34 master
add fish, vscode_extensions, tabnine, .Xresources and .profile
73 files changed, 2970 insertions(+), 397 deletions(-)

M .Xresources
A .directory
A .profile
A TabNine/TabNineExample.toml
A TabNine/registration_key
M bspwm/bspwmrc
D firefoxChrome.sh
D firefoxTheme.css
A fish/completions/fisher.fish
A fish/conf.d/done.fish
A fish/conf.d/fzf.fish
A fish/conf.d/fzf_key_bindings.fish
A fish/conf.d/z.fish
A fish/config.fish
A fish/fish_variables
A fish/fishfile
A fish/functions/__fzf_cd.fish
A fish/functions/__fzf_complete.fish
A fish/functions/__fzf_complete_preview.fish
A fish/functions/__fzf_find_file.fish
A fish/functions/__fzf_get_dir.fish
A fish/functions/__fzf_open.fish
A fish/functions/__fzf_parse_commandline.fish
A fish/functions/__fzf_reverse_isearch.fish
A fish/functions/__fzfcmd.fish
A fish/functions/__sf_lib_section.fish
A fish/functions/__sf_section_aws.fish
A fish/functions/__sf_section_battery.fish
A fish/functions/__sf_section_char.fish
A fish/functions/__sf_section_conda.fish
A fish/functions/__sf_section_dir.fish
A fish/functions/__sf_section_docker.fish
A fish/functions/__sf_section_dotnet.fish
A fish/functions/__sf_section_exec_time.fish
A fish/functions/__sf_section_exit_code.fish
A fish/functions/__sf_section_git.fish
A fish/functions/__sf_section_git_branch.fish
A fish/functions/__sf_section_git_status.fish
A fish/functions/__sf_section_golang.fish
A fish/functions/__sf_section_haskell.fish
A fish/functions/__sf_section_host.fish
A fish/functions/__sf_section_jobs.fish
A fish/functions/__sf_section_julia.fish
A fish/functions/__sf_section_kubecontext.fish
A fish/functions/__sf_section_line_sep.fish
A fish/functions/__sf_section_node.fish
A fish/functions/__sf_section_package.fish
A fish/functions/__sf_section_php.fish
A fish/functions/__sf_section_pyenv.fish
A fish/functions/__sf_section_ruby.fish
A fish/functions/__sf_section_rust.fish
A fish/functions/__sf_section_time.fish
A fish/functions/__sf_section_user.fish
A fish/functions/__sf_section_vi_mode.fish
A fish/functions/__sf_util_git_branch.fish
A fish/functions/__sf_util_human_time.fish
A fish/functions/__sf_util_set_default.fish
A fish/functions/__sf_util_truncate_dir.fish
A fish/functions/__z.fish
A fish/functions/__z_add.fish
A fish/functions/__z_clean.fish
A fish/functions/__z_complete.fish
A fish/functions/fish_mode_prompt.fish
A fish/functions/fish_prompt.fish
A fish/functions/fish_prompt.fish~
A fish/functions/fish_right_prompt.fish
A fish/functions/fisher.fish
A fish/functions/humanize_duration.fish
A fish/functions/ssh-ipp.fish
D gtk-2.0/gtk.css
D gtk-2.0/gtkfilechooser.ini
D gtk-3.0/gtk.css
A vscode_extensions
M .Xresources => .Xresources +48 -40
@@ 1,54 1,62 @@
! special
*.foreground:   #a2a2a2
*.background:   #282828
*.cursorColor:  #a2a2a2

! black
*.color0:       #555555
*.color8:       #888888

! red
*.color1:       #9c3528
*.color9:       #d64937

! green
*.color2:       #61bc3b
*.color10:      #86df5d

! yellow
*.color3:       #f3b43a
*.color11:      #fdd75a

! blue
*.color4:       #0d68a8
*.color12:      #0f75bd

! magenta
*.color5:       #744560
*.color13:      #9e5e83

! cyan
*.color6:       #288e9c
*.color14:      #37c3d6

! white
*.color7:       #a2a2a2
*.color15:      #f9f9f9
! Generated with :
! XRDB2Xreources.py
!
*.foreground:  #aea47a
*.background:  #191c27
*.cursorColor: #92805b
!
! Black
*.color0:      #181818
*.color8:      #555555
!
! Red
*.color1:      #810009
*.color9:      #ac3835
!
! Green
*.color2:      #48513b
*.color10:     #a6a75d
!
! Yellow
*.color3:      #cc8b3f
*.color11:     #dcdf7c
!
! Blue
*.color4:      #576d8c
*.color12:     #3097c6
!
! Magenta
*.color5:      #724d7c
*.color13:     #d33061
!
! Cyan
*.color6:      #5c4f4b
*.color14:     #f3dbb2
!
! White
*.color7:      #aea47f
*.color15:     #f4f4f4
!
! Bold, Italic, Underline
*.colorBD:     #f4f4f4
!*.colorIT:
!*.colorUL:

! Fonts {{{
Xft.antialias:	true
Xft.hinting:	true
Xft.rgba:	rgb
Xft.hintstyle:	hintfull
Xft.dpi:	220
Xft.dpi:	96
! }}}


!URXVT Config
URxvt.boldFont: xft:FuraCodeNerdFont:style=Regular:size=10:antialias=true
URxvt.font: xft:FuraCodeNerdFont:size=10:antialias=true
URxvt.scrollbar: false
URxvt.boldFont: xft:FuraCodeNerdFont:style=Regular:size=11:antialias=true
URxvt.font: xft:FuraCodeNerdFont:size=11:antialias=true
URxvt*scrollBar: false
URxvt*internalBorder: 42
URxvt.letterSpace: -1

URxvt.saveLines:	10000


A .directory => .directory +6 -0
@@ 0,0 1,6 @@
[Dolphin]
Timestamp=2019,4,4,22,44,34
Version=4

[Settings]
HiddenFilesShown=true

A .profile => .profile +34 -0
@@ 0,0 1,34 @@
#source /usr/share/defaults/etc/profile

#(cat ~/.cache/wal/sequences &)

export PATH=~/.npm-global/bin:$PATH

export PATH="$HOME/.cargo/bin:$PATH"

export PATH="$HOME/.local/bin:$PATH"

export XDG_CONFIG_HOME="$HOME/.config"

export _JAVA_AWT_WM_NONREPARENTING=1

export QT_STYLE_OVERRIDE=kvantum


export PATH="$HOME/.poetry/bin:$PATH"
export PATH="$HOME/tools/flutter/bin:$PATH"
export PATH="$HOME/tools/android-studio/bin:$PATH"
export PATH="$HOME/tools/flutter/bin:$PATH"


export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"

export GOPATH="$HOME/go"
export PATH=$PATH:$(go env GOPATH)/bin

export PATH="/usr/local/pgsql/bin:$PATH"

source $HOME/.asdf/asdf.sh
source $HOME/.asdf/completions/asdf.bash


A TabNine/TabNineExample.toml => TabNine/TabNineExample.toml +46 -0
@@ 0,0 1,46 @@
[language.rust]
command = "rls"
install = [
  ["rustup", "update"],
  ["rustup", "component", "add", "rls-preview", "rust-analysis", "rust-src"],
]

[language.javascript]
command = "flow"
args = ["lsp"]
install = [["npm", "install", "-g", "flow-bin"]]

[language.html]
command = "html-languageserver"
args = ["--stdio"]
install = [["npm", "install", "-g", "vscode-html-languageserver-bin"]]

[language.ocaml]
command = "ocaml-language-server"
args = ["--stdio"]
install = [["npm", "install", "-g", "ocaml-language-server"]]

[language.python]
command = "pyls"
install = [["pip", "install", "python-language-server"]]

[language.cpp]
command = "cquery"
args = ["--init={\"cacheDirectory\": \"${project_root}/.cquery_cache\"}"]

[language.haskell]
command = "hie"
args = ["--lsp"]

[language.go]
command = "go-langserver"
args = ["-mode", "stdio", "-gocodecompletion"]
install = [["go", "get", "-u", "github.com/sourcegraph/go-langserver"]]

[language.bash]
command = "bash-language-server"
args = ["start"]

[language.dart]
command = "dart_language_server"
install = [["pub", "global", "activate", "dart_language_server"]]

A TabNine/registration_key => TabNine/registration_key +1 -0
@@ 0,0 1,1 @@
joshstuebner@gmail.comxiuzclkqpjqkvuwnsudjzewupyoyyxwr
\ No newline at end of file

M bspwm/bspwmrc => bspwm/bspwmrc +1 -0
@@ 36,5 36,6 @@ redshift &
unclutter &
xfsettingsd &
sxhkd &
protonmail-bridge &

~/.config/ui-update.sh &

D firefoxChrome.sh => firefoxChrome.sh +0 -3
@@ 1,3 0,0 @@
#!/usr/bin/env bash

cat ~/.cache/wal/colors.css ~/.config/firefoxTheme.css > ~/.mozilla/firefox/isk0smsr.default/chrome/userChrome.css

D firefoxTheme.css => firefoxTheme.css +0 -287
@@ 1,287 0,0 @@
n-window[lwthemetextcolor="bright"] .panel-arrow 
{
  filter: invert(33%);
}

.panel-subview-body, #appMenu-zoomReset-button, .panel-mainview, .panel-subviews
{
  color: var(--color1) !important;
  background: var(--background) !important;
}

.panel-subview-footer,[class^="PanelUI-"]
{
  color: var(--color1) !important;
  background: var(--background) !important;
}

/* Darken urlbar popups to match theme */

#PopupAutoCompleteRichResult .ac-title-text
{
  color: var(--color1) !important;
  filter: opacity(.7);
}

#PopupAutoCompleteRichResult .autocomplete-richlistbox 
{
  background: var(--background) !important;
}

#main-window[lwthemetextcolor="bright"] [class^="search-"]
{
  color: var(--color1) !important;
  background: var(--background) !important;
}

panel[type="autocomplete"], panel[type="autocomplete-richlistbox"], .autocomplete-history-popup 
{
  border-width: 0px !important;
}

/* Stops possible clashes with extension popups */

.webextension-popup-browser
{
  background: var(--background);
}

:root
{
  --tabs-border: transparent !important; /* Remove borders from active tab and below tabs */
}


/* Tab bar customization */

:root:-moz-lwtheme-brighttext
{
 --chrome-background-color: var(--background) !important;
 --chrome-color: var(--color1) !important;
 --chrome-secondary-background-color: var(--background) !important;
 /* --toolbox-border-bottom-color: #232324 !important; */
 --toolbox-border-bottom-color: var(--background) !important;
}

/*
.tabbrowser-tab[visuallyselected="true"]:-moz-lwtheme
{
  color: #dddddd !important;
}
*/


/* Fixing tabGroups menu */

#tabGroups-tabview-button .toolbarbutton-text 
{
  max-height: inherit !important;
}

toolbar 
{
  min-height: 37px !important;
}

toolbar .toolbarbutton-1 
{
  padding: 3px 2px !important;
}


/*
 * Description: Makes the activity stream page look decent with the dark theme.
 *
 * Screenshot: https://imgur.com/a/WcxGk
 *
 * Contributor(s): Andrei Cristian Petcu
 */

.browserContainer
{
  background-color: var(--background, hsla(0,0%,100%,.8)) !important;
}

#sidebar
{
    background-color: var(--background) !important;
}

.sidebar-placesTree
{
    background-color: var(--background) !important;
}


/* Recolor sidebar to match rest of dark theme */

#sidebar-header
{
    background-color: var(--background) !important;
    color: var(--color1) !important;
    border: 0px !important;
}

#sidebar, #sidebar-header
{
  border-right: 0px solid var(--background) !important;
}


scrollbar, scrollbar *
{
  -moz-appearance: none !important;
  background: none !important;
  margin-left: -19px !important;
}


#urlbar
{
    background-color: var(--background) !important;
    color: var(--color1) !important;
    border-color: var(--color1)!important;
}

#forward-button,
#reload-button,
#stop-button,
#back-forward-dropmarker
{
    display: none;
}

tab[selected="true"]
{
    background-color: var(--background) !important;
    color: var(--color2) !important;
    font-weight: bold !important;
}

tab
{
    background-color: var(--background) !important;
    color: var(--color1) !important;
    font-weight: bold !important;
}

.tab-content[selected="true"]
{
    background-color: var(--color2) !important;
    color: var(--background) !important;
    font-weight: bold !important;
}

/* Hide white bar. Not necessary, but helpful. */

#sidebar-splitter
{
  opacity: 0 !important;
}


/* Change up usercontext label */

#userContext-icons
{
  background: var(--background)!important;
  margin: auto 3px!important;
  border-radius: 2px!important;
  padding: 0 2px 0 5px!important;
}

#userContext-label
{
  color: var(--background) !important;
}

#userContext-indicator
{
  fill: var(--background)!important;
  margin-right: 2px!important;
}

#userContext-indicator[data-identity-icon="circle"]
{
  display: none!important;
}


/*
 * Automatically hides the info/Firefox icon on the location bar when a website doesn't
 * have any permissions.
 *
 * Contributor(s): Madis0
 */

/* Hide info icon for sites that don't have permissions */

#urlbar :not(.grantedPermissions) #identity-icon
{
  transition: 300ms !important;
  opacity: 0 !important;
  -moz-margin-end: -1.1em !important;
}

/* Show info icon on navbar hover, except for new tab page search icon */

#urlbar[pageproxystate="valid"]:hover #identity-icon
{
        transition: 300ms !important;
	opacity: 1 !important;
	-moz-margin-end: initial !important;
}


/* Minimize sidebar header to a light blue stripe (except Bookmarks, History, Sync'd Tabs); appears normally on hover */

#sidebar-box:not([sidebarcommand="viewBookmarksSidebar"]):not([sidebarcommand="viewHistorySidebar"]):not([sidebarcommand="viewTabsSidebar"])
#sidebar-header:not(:hover)
{
  max-height: 5px !important;
  min-height: 5px !important;
  padding: 0 !important;
  background-color: var(--background) !important;
  opacity: 1 !important;
}

#sidebar-box:not([sidebarcommand="viewBookmarksSidebar"]):not([sidebarcommand="viewHistorySidebar"]):not([sidebarcommand="viewTabsSidebar"])
#sidebar-header:not(:hover) #sidebar-switcher-target
{
  opacity: 0 !important;
}

#minimize-button,
#restore-button,
#close-button
{
  display: none !important;
}

#nav-bar.browser-toolbar
{
  background-color: var(--background) !important;
}

#TabsToolbar
{
  background-color: var(--background) !important;
}

#tabbrowser-tabs ~ #alltabs-button,
tabbrowser toolbarbutton[class^="scrollbutton"],
#TabsToolbar toolbarbutton[class^="scrollbutton"],
.tab-close-button.close-icon,
#TabsToolbar .tabbrowser-tab:after,
#TabsToolbar .tabbrowser-tab:before
{
  display: none !important;
}

#content browser
{
 margin-right: -14px !important;
 overflow-y: scroll;
 overflow-x: hidden;
}


A fish/completions/fisher.fish => fish/completions/fisher.fish +1 -0
@@ 0,0 1,1 @@
fisher complete

A fish/conf.d/done.fish => fish/conf.d/done.fish +131 -0
@@ 0,0 1,131 @@
# MIT License

# Copyright (c) 2016 Francisco Lourenço & Daniel Wehner

# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:

# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.

# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

set -g __done_version 1.7.3

function __done_get_focused_window_id
	if type -q lsappinfo
		lsappinfo info -only bundleID (lsappinfo front) | cut -d '"' -f4
	else if type -q xprop
	and test $DISPLAY
		xprop -root 32x '\t$0' _NET_ACTIVE_WINDOW | cut -f 2
	end
end

function __done_is_tmux_window_active
	set -q fish_pid; or set -l fish_pid %self

	not tmux list-panes -a -F "#{session_attached} #{window_active} #{pane_pid}" | string match -q "1 0 $fish_pid"
end

function __done_is_process_window_focused
	# Return false if the window is not focused
	if test $__done_initial_window_id != (__done_get_focused_window_id)
		return 1
	end
	# If inside a tmux session, check if the tmux window is focused
	if type -q tmux
	and test -n "$TMUX"
		__done_is_tmux_window_active
		return $status
	end

	return 0
end


# verify that the system has graphical capabilites before initializing
if test -z "$SSH_CLIENT"  # not over ssh
and test -n __done_get_focused_window_id  # is able to get window id

	set -g __done_initial_window_id ''
	set -q __done_min_cmd_duration; or set -g __done_min_cmd_duration 5000
	set -q __done_exclude; or set -g __done_exclude 'git (?!push|pull)'

	function __done_started --on-event fish_preexec
		set __done_initial_window_id (__done_get_focused_window_id)
	end

	function __done_ended --on-event fish_prompt
		set -l exit_status $status

		# backwards compatibilty for fish < v3.0
		set -q cmd_duration; or set -l cmd_duration $CMD_DURATION

		if test $cmd_duration
		and test $cmd_duration -gt $__done_min_cmd_duration # longer than notify_duration
		and not __done_is_process_window_focused  # process pane or window not focused
		and not string match -qr $__done_exclude $history[1] # don't notify on git commands which might wait external editor

			# Store duration of last command
			set -l humanized_duration (echo "$cmd_duration" | humanize_duration)

			set -l title "Done in $humanized_duration"
			set -l wd (pwd | sed "s,^$HOME,~,")
			set -l message "$wd/ $history[1]"
			set -l sender $__done_initial_window_id

			# workarout terminal notifier bug when sending notifications from inside tmux
			# https://github.com/julienXX/terminal-notifier/issues/216
			if test $TMUX
				set sender "tmux"
			end

			if test $exit_status -ne 0
				set title "Failed ($exit_status) after $humanized_duration"
			end

			if set -q __done_notification_command
				eval $__done_notification_command
			else if type -q terminal-notifier  # https://github.com/julienXX/terminal-notifier
				terminal-notifier -message "$message" -title "$title" -sender "$sender" -activate "$__done_initial_window_id"

			else if type -q osascript  # AppleScript
				osascript -e "display notification \"$message\" with title \"$title\""

			else if type -q notify-send # Linux notify-send
				set -l urgency
				if test $exit_status -ne 0
					set urgency "--urgency=critical"
				end
				notify-send $urgency --icon=terminal --app-name=fish "$title" "$message"

			else  # anything else
				echo -e "\a" # bell sound
			end

		end
	end
end

function __done_uninstall -e done_uninstall
  # Erase all __done_* functions
  functions -e __done_ended
  functions -e __done_started
  functions -e __done_get_focused_window_id
  functions -e __done_is_tmux_window_active
  functions -e __done_is_process_window_focused

  # Erase __done variables
  set -e __done_version
end


A fish/conf.d/fzf.fish => fish/conf.d/fzf.fish +13 -0
@@ 0,0 1,13 @@
set -q FZF_TMUX_HEIGHT; or set -U FZF_TMUX_HEIGHT "40%"
set -q FZF_DEFAULT_OPTS; or set -U FZF_DEFAULT_OPTS "--height $FZF_TMUX_HEIGHT"
set -q FZF_LEGACY_KEYBINDINGS; or set -U FZF_LEGACY_KEYBINDINGS 1
set -q FZF_PREVIEW_FILE_CMD; or set -U FZF_PREVIEW_FILE_CMD "head -n 10"
set -q FZF_PREVIEW_DIR_CMD; or set -U FZF_PREVIEW_DIR_CMD "ls"

function fzf_uninstall -e fzf_uninstall
    set -l _vars (set | command grep -E "^FZF.*\$" | command awk '{print $1;}')
    for var in $_vars
        echo $var
        eval (set -e $var)
    end
end

A fish/conf.d/fzf_key_bindings.fish => fish/conf.d/fzf_key_bindings.fish +44 -0
@@ 0,0 1,44 @@
if test "$FZF_LEGACY_KEYBINDINGS" -eq 1
    bind \ct '__fzf_find_file'
    bind \cr '__fzf_reverse_isearch'
    bind \ec '__fzf_cd'
    bind \eC '__fzf_cd --hidden'
    bind \cg '__fzf_open'
    bind \co '__fzf_open --editor'

    if bind -M insert >/dev/null 2>/dev/null
        bind -M insert \ct '__fzf_find_file'
        bind -M insert \cr '__fzf_reverse_isearch'
        bind -M insert \ec '__fzf_cd'
        bind -M insert \eC '__fzf_cd --hidden'
        bind -M insert \cg '__fzf_open'
        bind -M insert \co '__fzf_open --editor'
    end
else
    bind \cf '__fzf_find_file'
    bind \cr '__fzf_reverse_isearch'
    bind \eo '__fzf_cd'
    bind \eO '__fzf_cd --hidden'
    bind \cg '__fzf_open'
    bind \co '__fzf_open --editor'

    if bind -M insert >/dev/null 2>/dev/null
        bind -M insert \cf '__fzf_find_file'
        bind -M insert \cr '__fzf_reverse_isearch'
        bind -M insert \eo '__fzf_cd'
        bind -M insert \eO '__fzf_cd --hidden'
        bind -M insert \cg '__fzf_open'
        bind -M insert \co '__fzf_open --editor'
    end
end

if set -q FZF_COMPLETE
    bind \t '__fzf_complete'
end

function fzf_key_bindings_uninstall -e fzf_key_bindings_uninstall
    set -l _bindings (bind -a | sed -En "s/(')?__fzf.*\$//p" | sed 's/bind/bind -e/')
    for binding in $_bindings
        eval $binding
    end
end

A fish/conf.d/z.fish => fish/conf.d/z.fish +44 -0
@@ 0,0 1,44 @@
if test -z "$Z_DATA"
  if test -z "$XDG_DATA_HOME"
    set -U Z_DATA_DIR "$HOME/.local/share/z"
  else 
    set -U Z_DATA_DIR "$XDG_DATA_HOME/z"
  end
  set -U Z_DATA "$Z_DATA_DIR/data"
end

if test ! -e "$Z_DATA"
  if test ! -e "$Z_DATA_DIR"
    mkdir -p -m 700 "$Z_DATA_DIR"  
  end
  touch "$Z_DATA"
end

if test -z "$Z_CMD"
  set -U Z_CMD "z"
end

set -U ZO_CMD "$Z_CMD"o

if test ! -z $Z_CMD
  function $Z_CMD -d "jump around"
    __z $argv
  end
end

if test ! -z $ZO_CMD
  function $ZO_CMD -d "open target dir"
    __z -d $argv
  end
end

if not set -q Z_EXCLUDE
  set -U Z_EXCLUDE $HOME
end

# Setup completions once first
__z_complete

function __z_on_variable_pwd --on-variable PWD
  __z_add
end

A fish/config.fish => fish/config.fish +1 -0
@@ 0,0 1,1 @@
status --is-interactive; and source (pyenv init -|psub)

A fish/fish_variables => fish/fish_variables +45 -0
@@ 0,0 1,45 @@
# This file contains fish universal variable definitions.
# VERSION: 3.0
SETUVAR FZF_DEFAULT_OPTS:\x2d\x2dheight\x2040\x25
SETUVAR FZF_LEGACY_KEYBINDINGS:1
SETUVAR FZF_PREVIEW_DIR_CMD:ls
SETUVAR FZF_PREVIEW_FILE_CMD:head\x20\x2dn\x2010
SETUVAR FZF_TMUX_HEIGHT:40\x25
SETUVAR ZO_CMD:zo
SETUVAR Z_CMD:z
SETUVAR Z_DATA:/home/josh/\x2elocal/share/z/data
SETUVAR Z_DATA_DIR:/home/josh/\x2elocal/share/z
SETUVAR Z_EXCLUDE:/home/josh
SETUVAR __fish_init_2_39_8:\x1d
SETUVAR __fish_init_2_3_0:\x1d
SETUVAR __fish_init_3_x:\x1d
SETUVAR _fish_abbr_setbg:/home/josh/\x2econfig/scripts/setbg\x2esh
SETUVAR _fish_abbr_update__ui:\x7e/tools/warnai/warnai\x20\x2d\x2dwal\x20\x2d\x2dgtk\x20fantome\x20\x2d\x2dxfwm\x20one_new
SETUVAR fish_color_autosuggestion:FFC473
SETUVAR fish_color_cancel:\x2dr
SETUVAR fish_color_command:FF9400
SETUVAR fish_color_comment:A63100
SETUVAR fish_color_cwd:green
SETUVAR fish_color_cwd_root:red
SETUVAR fish_color_end:FF4C00
SETUVAR fish_color_error:FFDD73
SETUVAR fish_color_escape:00a6b2
SETUVAR fish_color_history_current:\x2d\x2dbold
SETUVAR fish_color_host:normal
SETUVAR fish_color_match:\x2d\x2dbackground\x3dbrblue
SETUVAR fish_color_normal:normal
SETUVAR fish_color_operator:00a6b2
SETUVAR fish_color_param:FFC000
SETUVAR fish_color_quote:BF9C30
SETUVAR fish_color_redirection:BF5B30
SETUVAR fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dbrblack
SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack
SETUVAR fish_color_status:red
SETUVAR fish_color_user:brgreen
SETUVAR fish_color_valid_path:\x2d\x2dunderline
SETUVAR fish_greeting:Hi\x20Josh
SETUVAR fish_key_bindings:fish_default_key_bindings
SETUVAR fish_pager_color_completion:normal
SETUVAR fish_pager_color_description:B3A06D\x1eyellow
SETUVAR fish_pager_color_prefix:white\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan

A fish/fishfile => fish/fishfile +4 -0
@@ 0,0 1,4 @@
matchai/spacefish
franciscolourenco/done
jethrokuan/z
jethrokuan/fzf

A fish/functions/__fzf_cd.fish => fish/functions/__fzf_cd.fish +49 -0
@@ 0,0 1,49 @@
function __fzf_cd -d "Change directory"
    set -l commandline (__fzf_parse_commandline)
    set -l dir $commandline[1]
    set -l fzf_query $commandline[2]

    if not type -q argparse
        # Fallback for fish shell version < 2.7
        function argparse
            functions -e argparse # deletes itself
        end
        if contains -- --hidden $argv; or contains -- -h $argv
            set _flag_hidden "yes"
        end
    end

    # Fish shell version >= v2.7, use argparse
    set -l options  "h/hidden"
    argparse $options -- $argv

    set -l COMMAND

    set -q FZF_CD_COMMAND
    or set -l FZF_CD_COMMAND "
    command find -L \$dir -mindepth 1 \\( -path \$dir'*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' \\) -prune \
    -o -type d -print 2> /dev/null | sed 's@^\./@@'"

    set -q FZF_CD_WITH_HIDDEN_COMMAND
    or set -l FZF_CD_WITH_HIDDEN_COMMAND "
    command find -L \$dir \
    \\( -path '*/\\.git*' -o -fstype 'dev' -o -fstype 'proc' \\) -prune \
    -o -type d -print 2> /dev/null | sed 1d | cut -b3-"

    if set -q _flag_hidden
        set COMMAND $FZF_CD_WITH_HIDDEN_COMMAND
    else
        set COMMAND $FZF_CD_COMMAND
    end

    eval "$COMMAND | "(__fzfcmd)" +m $FZF_DEFAULT_OPTS $FZF_CD_OPTS --query \"$fzf_query\"" | read -l select

    if not test -z "$select"
        builtin cd "$select"

        # Remove last token from commandline.
        commandline -t ""
    end

    commandline -f repaint
end

A fish/functions/__fzf_complete.fish => fish/functions/__fzf_complete.fish +162 -0
@@ 0,0 1,162 @@
##
# Use fzf as fish completion widget.
#
#
# When FZF_COMPLETE variable is set, fzf is used as completion
# widget for the fish shell by binding the TAB key.
#
# FZF_COMPLETE can have some special numeric values:
#
#   `set FZF_COMPLETE 0` basic widget accepts with TAB key
#   `set FZF_COMPLETE 1` extends 0 with candidate preview window
#   `set FZF_COMPLETE 2` same as 1 but TAB walks on candidates
#   `set FZF_COMPLETE 3` multi TAB selection, RETURN accepts selected ones.
#
# Any other value of FZF_COMPLETE is given directly as options to fzf.
#
# If you prefer to set more advanced options, take a look at the
# `__fzf_complete_opts` function and override that in your environment.


# modified from https://github.com/junegunn/fzf/wiki/Examples-(fish)#completion
function __fzf_complete -d 'fzf completion and print selection back to commandline'
    # As of 2.6, fish's "complete" function does not understand
    # subcommands. Instead, we use the same hack as __fish_complete_subcommand and
    # extract the subcommand manually.
    set -l cmd (commandline -co) (commandline -ct)

    switch $cmd[1]
        case env sudo
            for i in (seq 2 (count $cmd))
                switch $cmd[$i]
                    case '-*'
                    case '*=*'
                    case '*'
                        set cmd $cmd[$i..-1]
                        break
                end
            end
    end

    set -l cmd_lastw $cmd[-1]
    set cmd (string join -- ' ' $cmd)

    set -l initial_query ''
    test -n "$cmd_lastw"; and set initial_query --query="$cmd_lastw"

    set -l complist (complete -C$cmd)
    set -l result

    # do nothing if there is nothing to select from
    test -z "$complist"; and return

    set -l compwc (echo $complist | wc -w)
    if test $compwc -eq 1
        # if there is only one option dont open fzf
        set result "$complist"
    else

        set -l query
        string join -- \n $complist \
        | sort \
        | eval (__fzfcmd) $initial_query --print-query (__fzf_complete_opts) \
        | cut -f1 \
        | while read -l r
            # first line is the user entered query
            if test -z "$query"
                set query $r
            # rest of lines are selected candidates
            else
                set result $result $r
            end
          end

        # exit if user canceled
        if test -z "$query" ;and test -z "$result"
            return
        end

        # if user accepted but no candidate matches, use the input as result
        if test -z "$result"
            set result $query
        end
    end

    set prefix (string sub -s 1 -l 1 -- (commandline -t))
    for i in (seq (count $result))
        set -l r $result[$i]
        switch $prefix
            case "'"
                commandline -t -- (string escape -- $r)
            case '"'
                if string match '*"*' -- $r >/dev/null
                    commandline -t --  (string escape -- $r)
                else
                    commandline -t -- '"'$r'"'
                end
            case '~'
                commandline -t -- (string sub -s 2 (string escape -n -- $r))
            case '*'
                commandline -t -- (string escape -n -- $r)
        end
        [ $i -lt (count $result) ]; and commandline -i ' '
    end

    commandline -f repaint
end

function __fzf_complete_opts_common
    echo --cycle --reverse --inline-info
end

function __fzf_complete_opts_tab_accepts
    echo --bind tab:accept,btab:cancel
end

function __fzf_complete_opts_tab_walks
    echo --bind tab:down,btab:up
end

function __fzf_complete_opts_preview
    set -l file (status -f)
    echo --with-nth=1 --preview-window=right:wrap --preview="fish\ '$file'\ __fzf_complete_preview\ '{1}'\ '{2..}'"
end

test "$argv[1]" = "__fzf_complete_preview"; and __fzf_complete_preview $argv[2..3]

function __fzf_complete_opts_0 -d 'basic single selection with tab accept'
    __fzf_complete_opts_common
    echo --no-multi
    __fzf_complete_opts_tab_accepts
end

function __fzf_complete_opts_1 -d 'single selection with preview and tab accept'
    __fzf_complete_opts_0
    __fzf_complete_opts_preview
end

function __fzf_complete_opts_2 -d 'single selection with preview and tab walks'
    __fzf_complete_opts_1
    __fzf_complete_opts_tab_walks
end

function __fzf_complete_opts_3 -d 'multi selection with preview'
    __fzf_complete_opts_common
    echo --multi
    __fzf_complete_opts_preview
end

function __fzf_complete_opts -d 'fzf options for fish tab completion'
    switch $FZF_COMPLETE
        case 0
            __fzf_complete_opts_0
        case 1
            __fzf_complete_opts_1
        case 2
            __fzf_complete_opts_2
        case 3
            __fzf_complete_opts_3
        case '*'
            echo $FZF_COMPLETE
    end
end

A fish/functions/__fzf_complete_preview.fish => fish/functions/__fzf_complete_preview.fish +29 -0
@@ 0,0 1,29 @@
function __fzf_complete_preview -d 'generate preview for completion widget.
    argv[1] is the currently selected candidate in fzf
    argv[2] is a string containing the rest of the output produced by `complete -Ccmd`
    '

    if test "$argv[2]" = "Redefine variable"
        # show environment variables current value
        set -l evar (echo $argv[1] | cut -d= -f1)
        echo $argv[1]$$evar
    else
        echo $argv[1]
    end

    # list directories on preview
    if test -d "$argv[1]"
        eval $FZF_PREVIEW_DIR_CMD (string escape $argv[1])
    end

    # show ten lines of non-binary files preview
    if test -f "$argv[1]"; and grep -qI . "$argv[1]"
        eval $FZF_PREVIEW_FILE_CMD (string escape $argv[1])
    end

    # if fish knows about it, let it show info
    type -q "$argv[1]" 2>/dev/null; and type -a "$argv[1]"

    # show aditional data
    echo $argv[2]
end

A fish/functions/__fzf_find_file.fish => fish/functions/__fzf_find_file.fish +29 -0
@@ 0,0 1,29 @@
function __fzf_find_file -d "List files and folders"
    set -l commandline (__fzf_parse_commandline)
    set -l dir $commandline[1]
    set -l fzf_query $commandline[2]

    set -q FZF_FIND_FILE_COMMAND
    or set -l FZF_FIND_FILE_COMMAND "
    command find -L \$dir -mindepth 1 \\( -path \$dir'*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' \\) -prune \
    -o -type f -print \
    -o -type d -print \
    -o -type l -print 2> /dev/null | sed 's@^\./@@'"

    begin
        eval "$FZF_FIND_FILE_COMMAND | "(__fzfcmd) "-m $FZF_DEFAULT_OPTS $FZF_FIND_FILE_OPTS --query \"$fzf_query\"" | while read -l s; set results $results $s; end
    end

    if test -z "$results"
        commandline -f repaint
        return
    else
        commandline -t ""
    end

    for result in $results
        commandline -it -- (string escape $result)
        commandline -it -- " "
    end
    commandline -f repaint
end

A fish/functions/__fzf_get_dir.fish => fish/functions/__fzf_get_dir.fish +17 -0
@@ 0,0 1,17 @@
function __fzf_get_dir -d 'Find the longest existing filepath from input string'
    set dir $argv

    # Strip all trailing slashes. Ignore if $dir is root dir (/)
    if [ (string length $dir) -gt 1 ]
        set dir (string replace -r '/*$' '' $dir)
    end

    # Iteratively check if dir exists and strip tail end of path
    while [ ! -d "$dir" ]
        # If path is absolute, this can keep going until ends up at /
        # If path is relative, this can keep going until entire input is consumed, dirname returns "."
        set dir (dirname "$dir")
    end

    echo $dir
end

A fish/functions/__fzf_open.fish => fish/functions/__fzf_open.fish +63 -0
@@ 0,0 1,63 @@
function __fzf_open -d "Open files and directories."
    function __fzf_open_get_open_cmd -d "Find appropriate open command."
        if type -q xdg-open
            echo "xdg-open"
        else if type -q open
            echo "open"
        end
    end

    set -l commandline (__fzf_parse_commandline)
    set -l dir $commandline[1]
    set -l fzf_query $commandline[2]

    if not type -q argparse
        set created_argparse
        function argparse
            functions -e argparse # deletes itself
        end
        if contains -- --editor $argv; or contains -- -e $argv
            set _flag_editor "yes"
        end
        if contains -- --preview $argv; or contains -- -p $argv
            set _flag_preview "yes"
        end
    end

    set -l options "e/editor" "p/preview=?"
    argparse $options -- $argv

    set -l preview_cmd
    if set -q FZF_ENABLE_OPEN_PREVIEW
        set preview_cmd "--preview-window=right:wrap --preview='fish -c \"__fzf_complete_preview {}\"'"
    end

    set -q FZF_OPEN_COMMAND
    or set -l FZF_OPEN_COMMAND "
    command find -L \$dir -mindepth 1 \\( -path \$dir'*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' \\) -prune \
    -o -type f -print \
    -o -type d -print \
    -o -type l -print 2> /dev/null | sed 's@^\./@@'"

    eval "$FZF_OPEN_COMMAND | "(__fzfcmd) $preview_cmd "-m $FZF_DEFAULT_OPTS $FZF_OPEN_OPTS --query \"$fzf_query\"" | read -l select

    # set how to open
    set -l open_cmd
    if set -q _flag_editor
        set open_cmd "$EDITOR"
    else
        set open_cmd (__fzf_open_get_open_cmd)
        if test -z "$open_cmd"
            echo "Couldn't find appropriate open command to use. Do you have 'xdg-open' or 'open' installed?"; and return 1
        end
    end

    set -l open_status 0
    if not test -z "$select"
        commandline "$open_cmd \"$select\"" ;and commandline -f execute
        set open_status $status
    end

    commandline -f repaint
    return $open_status
end

A fish/functions/__fzf_parse_commandline.fish => fish/functions/__fzf_parse_commandline.fish +23 -0
@@ 0,0 1,23 @@
function __fzf_parse_commandline -d 'Parse the current command line token and return split of existing filepath and rest of token'
    # eval is used to do shell expansion on paths
    set -l commandline (eval "printf '%s' "(commandline -t))

    if [ -z $commandline ]
        # Default to current directory with no --query
        set dir '.'
        set fzf_query ''
    else
        set dir (__fzf_get_dir $commandline)

        if [ "$dir" = "." -a (string sub -l 1 $commandline) != '.' ]
            # if $dir is "." but commandline is not a relative path, this means no file path found
            set fzf_query $commandline
        else
            # Also remove trailing slash after dir, to "split" input properly
            set fzf_query (string replace -r "^$dir/?" '' "$commandline")
        end
    end

    echo $dir
    echo $fzf_query
end

A fish/functions/__fzf_reverse_isearch.fish => fish/functions/__fzf_reverse_isearch.fish +5 -0
@@ 0,0 1,5 @@
function __fzf_reverse_isearch
    history -z | eval (__fzfcmd) --read0 --tiebreak=index --toggle-sort=ctrl-r $FZF_DEFAULT_OPTS $FZF_REVERSE_ISEARCH_OPTS -q '(commandline)' | perl -pe 'chomp if eof' | read -lz result
    and commandline -- $result
    commandline -f repaint
end

A fish/functions/__fzfcmd.fish => fish/functions/__fzfcmd.fish +9 -0
@@ 0,0 1,9 @@
function __fzfcmd
    set -q FZF_TMUX; or set FZF_TMUX 0
    set -q FZF_TMUX_HEIGHT; or set FZF_TMUX_HEIGHT 40%
    if [ $FZF_TMUX -eq 1 ]
        echo "fzf-tmux -d$FZF_TMUX_HEIGHT"
    else
        echo "fzf"
    end
end

A fish/functions/__sf_lib_section.fish => fish/functions/__sf_lib_section.fish +28 -0
@@ 0,0 1,28 @@
function __sf_lib_section -a color prefix content suffix
	# If there are only 2 args, they're content and prefix
	if test (count $argv) -eq 2
		set content $argv[2]
		set prefix
	end

	if test "$sf_prompt_opened" = "true" -a "$SPACEFISH_PROMPT_PREFIXES_SHOW" = "true"
		# Echo prefixes in bold white
		set_color --bold
		echo -e -n -s $prefix
		set_color normal
	end

	# Set the prompt as having been opened
	set -g sf_prompt_opened true

	set_color --bold $color
	echo -e -n $content
	set_color normal

	if test "$SPACEFISH_PROMPT_SUFFIXES_SHOW" = "true"
		# Echo suffixes in bold white
		set_color --bold
		echo -e -n -s $suffix
		set_color normal
	end
end

A fish/functions/__sf_section_aws.fish => fish/functions/__sf_section_aws.fish +39 -0
@@ 0,0 1,39 @@
#
# Amazon Web Services (AWS)
#
# The AWS Command Line Interface (CLI) is a unified tool to manage AWS services.
# Link: https://aws.amazon.com/cli/

function __sf_section_aws -d "Display the selected aws profile"
	# ------------------------------------------------------------------------------
	# Configuration
	# ------------------------------------------------------------------------------

	__sf_util_set_default SPACEFISH_AWS_SHOW true
	__sf_util_set_default SPACEFISH_AWS_PREFIX "using "
	__sf_util_set_default SPACEFISH_AWS_SUFFIX $SPACEFISH_PROMPT_DEFAULT_SUFFIX
	__sf_util_set_default SPACEFISH_AWS_SYMBOL "☁️ "
	__sf_util_set_default SPACEFISH_AWS_COLOR ff8700

	# ------------------------------------------------------------------------------
	# Section
	# ------------------------------------------------------------------------------

	# Show the selected AWS-cli profile
	[ $SPACEFISH_AWS_SHOW = false ]; and return

	# Ensure the aws command is available
	type -q aws; or return

	# Early return if there's no AWS_PROFILE, or it's set to default
	if test -z "$AWS_PROFILE" \
		-o "$AWS_PROFILE" = "default"
		return
	end

	__sf_lib_section \
		$SPACEFISH_AWS_COLOR \
		$SPACEFISH_AWS_PREFIX \
		"$SPACEFISH_AWS_SYMBOL""$AWS_PROFILE" \
		$SPACEFISH_AWS_SUFFIX
end

A fish/functions/__sf_section_battery.fish => fish/functions/__sf_section_battery.fish +114 -0
@@ 0,0 1,114 @@
#
# Battery
#

function __sf_section_battery -d "Displays battery symbol and charge"
	# ------------------------------------------------------------------------------
	# Configuration
	# ------------------------------------------------------------------------------

	# ------------------------------------------------------------------------------
	# | SPACEFISH_BATTERY_SHOW | below threshold | above threshold | fully charged |
	# |------------------------+-----------------+-----------------+---------------|
	# | false                  | hidden          | hidden          | hidden        |
	# | always                 | shown           | shown           | shown         |
	# | true                   | shown           | hidden          | hidden        |
	# | charged                | shown           | hidden          | shown         |
	# ------------------------------------------------------------------------------

	__sf_util_set_default SPACEFISH_BATTERY_SHOW true
	__sf_util_set_default SPACEFISH_BATTERY_PREFIX ""
	__sf_util_set_default SPACEFISH_BATTERY_SUFFIX " "
	__sf_util_set_default SPACEFISH_BATTERY_SYMBOL_CHARGING ⇡
	__sf_util_set_default SPACEFISH_BATTERY_SYMBOL_DISCHARGING ⇣
	__sf_util_set_default SPACEFISH_BATTERY_SYMBOL_FULL •
	__sf_util_set_default SPACEFISH_BATTERY_THRESHOLD 10

	# ------------------------------------------------------------------------------
	# Section
	# ------------------------------------------------------------------------------

	# Show section only if any of the following is true
	# - SPACEFISH_BATTERY_SHOW = "always"
	# - SPACEFISH_BATTERY_SHOW = "true" and
	#	- battery percentage is below the given limit (default: 10%)
	# - SPACEFISH_BATTERY_SHOW = "charged" and
	#	- Battery is fully charged

	# Check that user wants to show battery levels
	[ $SPACEFISH_BATTERY_SHOW = false ]; and return

	set -l battery_data
	set -l battery_percent
	set -l battery_status
	set -l battery_color
	set -l battery_symbol

	# Darwin and macOS machines
	if type -q pmset
		set battery_data (pmset -g batt | grep "InternalBattery")

		# Return if no internal battery
		if test -z (echo $battery_data)
			return
		end

		set battery_percent (echo $battery_data | grep -oE "[0-9]{1,3}%")
		# spaceship has echo $battery_data | awk -F '; *' 'NR==2 { print $2 }', but NR==2 did not return anything.
		set battery_status (echo $battery_data | awk -F '; *' '{ print $2 }')

	# Linux machines
	else if type -q upower
		set -l battery (upower -e | grep battery | head -1)

		[ -z $battery ]; and return

		set -l IFS # Clear IFS to allow for multi-line variables
		set battery_data (upower -i $battery)
		set battery_percent (echo $battery_data | grep percentage | awk '{print $2}')
		set battery_status (echo $battery_data | grep state | awk '{print $2}')

	# Windows machines.
	else if type -q acpi
		set -l battery_data (acpi -b 2>/dev/null | head -1)

		# Return if no battery
		[ -z $battery_data ]; and return

		set battery_percent ( echo $battery_data | awk '{print $4}' )
		set battery_status ( echo $battery_data | awk '{print tolower($3)}' )
	else
		return
	end

	 # Remove trailing % and symbols for comparison
	set battery_percent (echo $battery_percent | string trim --chars=%[,;])

	if test "$battery_percent" -eq 100 -o -n (echo (string match -r "(charged|full)" $battery_status))
		set battery_color green
	else if test "$battery_percent" -lt "$SPACEFISH_BATTERY_THRESHOLD"
		set battery_color red
	else
		set battery_color yellow
	end

	# Battery indicator based on current status of battery
	if test "$battery_status" = "charging"
		set battery_symbol $SPACEFISH_BATTERY_SYMBOL_CHARGING
	else if test -n (echo (string match -r "^[dD]ischarg.*" $battery_status))
		set battery_symbol $SPACEFISH_BATTERY_SYMBOL_DISCHARGING
	else
		set battery_symbol $SPACEFISH_BATTERY_SYMBOL_FULL
	end

	if test "$SPACEFISH_BATTERY_SHOW" = "always" \
	-o "$battery_percent" -lt "$SPACEFISH_BATTERY_THRESHOLD" \
	-o "$SPACEFISH_BATTERY_SHOW" = "charged" \
	-a -n (echo (string match -r "(charged|full)" $battery_status))
		__sf_lib_section \
			$battery_color \
			$SPACEFISH_BATTERY_PREFIX \
			"$battery_symbol$battery_percent%" \
			$SPACEFISH_BATTERY_SUFFIX
	end
end

A fish/functions/__sf_section_char.fish => fish/functions/__sf_section_char.fish +35 -0
@@ 0,0 1,35 @@
#
# Prompt character
#

function __sf_section_char -d "Display the prompt character"
	# ------------------------------------------------------------------------------
	# Configuration
	# ------------------------------------------------------------------------------

	__sf_util_set_default SPACEFISH_CHAR_PREFIX ""
	__sf_util_set_default SPACEFISH_CHAR_SUFFIX " "
	__sf_util_set_default SPACEFISH_CHAR_SYMBOL ➜
	__sf_util_set_default SPACEFISH_CHAR_COLOR_SUCCESS green
	__sf_util_set_default SPACEFISH_CHAR_COLOR_FAILURE red

	# ------------------------------------------------------------------------------
	# Section
	# ------------------------------------------------------------------------------

	# Color $SPACEFISH_CHAR_SYMBOL red if previous command failed and
	# color it in green if the command succeeded.
	set -l color

	if test $sf_exit_code -eq 0
		set color $SPACEFISH_CHAR_COLOR_SUCCESS
	else
		set color $SPACEFISH_CHAR_COLOR_FAILURE
	end

	__sf_lib_section \
		$color \
		$SPACEFISH_CHAR_PREFIX \
		$SPACEFISH_CHAR_SYMBOL \
		$SPACEFISH_CHAR_SUFFIX
end

A fish/functions/__sf_section_conda.fish => fish/functions/__sf_section_conda.fish +36 -0
@@ 0,0 1,36 @@
#
# Conda
#
# Current Conda version.

function __sf_section_conda -d "Display current Conda version"
	# ------------------------------------------------------------------------------
	# Configuration
	# ------------------------------------------------------------------------------

	__sf_util_set_default SPACEFISH_CONDA_SHOW true
	__sf_util_set_default SPACEFISH_CONDA_PREFIX $SPACEFISH_PROMPT_DEFAULT_PREFIX
	__sf_util_set_default SPACEFISH_CONDA_SUFFIX $SPACEFISH_PROMPT_DEFAULT_SUFFIX
	__sf_util_set_default SPACEFISH_CONDA_SYMBOL "🅒 "
	__sf_util_set_default SPACEFISH_CONDA_COLOR blue

	# ------------------------------------------------------------------------------
	# Section
	# ------------------------------------------------------------------------------

	[ $SPACEFISH_CONDA_SHOW = false ]; and return

	# Show Conda version only if conda is installed and CONDA_DEFAULT_ENV is set
	if not type -q conda; \
		or test -z "$CONDA_DEFAULT_ENV";
		return
	end

	set -l conda_version (conda -V | string split ' ')[2]

	__sf_lib_section \
		$SPACEFISH_CONDA_COLOR \
		$SPACEFISH_CONDA_PREFIX \
		"$SPACEFISH_CONDA_SYMBOL"v"$conda_version" \
		$SPACEFISH_CONDA_SUFFIX
end

A fish/functions/__sf_section_dir.fish => fish/functions/__sf_section_dir.fish +54 -0
@@ 0,0 1,54 @@
#
# Working directory
#

function __sf_section_dir -d "Display the current truncated directory"
	# ------------------------------------------------------------------------------
	# Configuration
	# ------------------------------------------------------------------------------

	__sf_util_set_default SPACEFISH_DIR_SHOW true
	__sf_util_set_default SPACEFISH_DIR_PREFIX "in "
	__sf_util_set_default SPACEFISH_DIR_SUFFIX $SPACEFISH_PROMPT_DEFAULT_SUFFIX
	__sf_util_set_default SPACEFISH_DIR_TRUNC 3
	__sf_util_set_default SPACEFISH_DIR_TRUNC_REPO true
	__sf_util_set_default SPACEFISH_DIR_COLOR cyan

	# Write Permissions lock symbol
	__sf_util_set_default SPACEFISH_DIR_LOCK_SHOW true
	__sf_util_set_default SPACEFISH_DIR_LOCK_SYMBOL ""
	__sf_util_set_default SPACEFISH_DIR_LOCK_COLOR red

	# ------------------------------------------------------------------------------
	# Section
	# ------------------------------------------------------------------------------

	[ $SPACEFISH_DIR_SHOW = false ]; and return

	set -l dir
	set -l tmp
	set -l git_root (command git rev-parse --show-toplevel 2>/dev/null)

	if test "$SPACEFISH_DIR_TRUNC_REPO" = "true" -a -n "$git_root"
		# Resolve to physical PWD instead of logical
		set -l resolvedPWD (pwd -P 2>/dev/null; or pwd)
		# Treat repo root as top level directory
		set tmp (string replace $git_root (basename $git_root) $resolvedPWD)
	else
		set -l realhome ~
		set tmp (string replace -r '^'"$realhome"'($|/)' '~$1' $PWD)
	end

	# Truncate the path to have a limited number of dirs
	set dir (__sf_util_truncate_dir $tmp $SPACEFISH_DIR_TRUNC)

	if [ $SPACEFISH_DIR_LOCK_SHOW = true -a ! -w . ]
		set DIR_LOCK_SYMBOL (set_color $SPACEFISH_DIR_LOCK_COLOR)" $SPACEFISH_DIR_LOCK_SYMBOL"(set_color --bold)
	end

	__sf_lib_section \
		$SPACEFISH_DIR_COLOR \
		$SPACEFISH_DIR_PREFIX \
		$dir \
		"$DIR_LOCK_SYMBOL""$SPACEFISH_DIR_SUFFIX"
end

A fish/functions/__sf_section_docker.fish => fish/functions/__sf_section_docker.fish +51 -0
@@ 0,0 1,51 @@
#
# Docker
#
# Current Docker version and Machine name.

function __sf_section_docker -d "Display docker version and machine name"
	# ------------------------------------------------------------------------------
	# Configuration
	# ------------------------------------------------------------------------------

	__sf_util_set_default SPACEFISH_DOCKER_SHOW true
	__sf_util_set_default SPACEFISH_DOCKER_PREFIX "is "
	__sf_util_set_default SPACEFISH_DOCKER_SUFFIX $SPACEFISH_PROMPT_DEFAULT_SUFFIX
	__sf_util_set_default SPACEFISH_DOCKER_SYMBOL "🐳 "
	__sf_util_set_default SPACEFISH_DOCKER_COLOR cyan
	__sf_util_set_default SPACEFISH_DOCKER_VERBOSE_VERSION false

	# ------------------------------------------------------------------------------
	# Section
	# ------------------------------------------------------------------------------

	[ $SPACEFISH_DOCKER_SHOW = false ]; and return

	# Show Docker version only if docker is installed
	type -q docker; or return

	# Show docker version only when pwd has dockerfile or docker-compose.yml or COMPOSE_FILE
if not test -f Dockerfile \
	-o -f docker-compose.yml \
	-o -f "$COMPOSE_FILE"
	return
end

	set -l docker_version (docker version -f "{{.Server.Version}}" 2>/dev/null)
	# if docker daemon isn't running you'll get an error like 'Bad response from Docker engine'
	[ -z $docker_version ]; and return

	if test "$SPACEFISH_DOCKER_VERBOSE_VERSION" = "false"
			set docker_version (string split - $docker_version)[1]
	end

	if test -n "$DOCKER_MACHINE_NAME"
			set docker_version $docker_version via $DOCKER_MACHINE_NAME
	end

	__sf_lib_section \
	$SPACEFISH_DOCKER_COLOR \
	$SPACEFISH_DOCKER_PREFIX \
	"$SPACEFISH_DOCKER_SYMBOL"v"$docker_version" \
	$SPACEFISH_DOCKER_SUFFIX
end

A fish/functions/__sf_section_dotnet.fish => fish/functions/__sf_section_dotnet.fish +48 -0
@@ 0,0 1,48 @@
#
# .NET
#
# .NET Framework is a software framework developed by Microsoft.
# It includes a large class library and provides language interoperability
# across several programming languages.
# Link: https://www.microsoft.com/net

function __sf_section_dotnet -d "Display the .NET SDK version"
	# ------------------------------------------------------------------------------
	# Configuration
	# ------------------------------------------------------------------------------

	__sf_util_set_default SPACEFISH_DOTNET_SHOW true
	__sf_util_set_default SPACEFISH_DOTNET_PREFIX $SPACEFISH_PROMPT_DEFAULT_PREFIX
	__sf_util_set_default SPACEFISH_DOTNET_SUFFIX $SPACEFISH_PROMPT_DEFAULT_SUFFIX
	__sf_util_set_default SPACEFISH_DOTNET_SYMBOL ".NET "
	__sf_util_set_default SPACEFISH_DOTNET_COLOR "af00d7" # 128 in the original version, but renders as blue in iTerm2?

	# ------------------------------------------------------------------------------
	# Section
	# ------------------------------------------------------------------------------

	# Show current version of .NET SDK
	[ $SPACEFISH_DOTNET_SHOW = false ]; and return

	# Ensure the dotnet command is available
	type -q dotnet; or return

	if not test -f project.json \
		-o -f global.json \
		-o (count *.csproj) -gt 0 \
		-o (count *.xproj) -gt 0 \
		-o (count *.sln) -gt 0
		return
	end

	# From the
	# dotnet-cli automatically handles SDK pinning (specified in a global.json file)
	# therefore, this already returns the expected version for the current directory
	set -l dotnet_version (dotnet --version 2>/dev/null)

	__sf_lib_section \
		$SPACEFISH_DOTNET_COLOR \
		$SPACEFISH_DOTNET_PREFIX \
		"$SPACEFISH_DOTNET_SYMBOL""$dotnet_version" \
		$SPACEFISH_DOTNET_SUFFIX
end

A fish/functions/__sf_section_exec_time.fish => fish/functions/__sf_section_exec_time.fish +33 -0
@@ 0,0 1,33 @@
#
# Execution time
#

function __sf_section_exec_time -d "Display the execution time of the last command"
	# ------------------------------------------------------------------------------
	# Configuration
	# ------------------------------------------------------------------------------

	__sf_util_set_default SPACEFISH_EXEC_TIME_SHOW true
	__sf_util_set_default SPACEFISH_EXEC_TIME_PREFIX "took "
	__sf_util_set_default SPACEFISH_EXEC_TIME_SUFFIX $SPACEFISH_PROMPT_DEFAULT_SUFFIX
	__sf_util_set_default SPACEFISH_EXEC_TIME_COLOR yellow
	__sf_util_set_default SPACEFISH_EXEC_TIME_ELAPSED 5

	# ------------------------------------------------------------------------------
	# Section
	# ------------------------------------------------------------------------------

	[ $SPACEFISH_EXEC_TIME_SHOW = false ]; and return

	# Allow for compatibility between fish 2.7 and 3.0
	set -l command_duration "$CMD_DURATION$cmd_duration"

	if test -n "$command_duration" -a "$command_duration" -gt (math "$SPACEFISH_EXEC_TIME_ELAPSED * 1000")
		set -l human_command_duration (echo $command_duration | __sf_util_human_time)
		__sf_lib_section \
			$SPACEFISH_EXEC_TIME_COLOR \
			$SPACEFISH_EXEC_TIME_PREFIX \
			$human_command_duration \
			$SPACEFISH_EXEC_TIME_SUFFIX
	end
end

A fish/functions/__sf_section_exit_code.fish => fish/functions/__sf_section_exit_code.fish +26 -0
@@ 0,0 1,26 @@
# Exit-code
#

function __sf_section_exit_code -d "Shows the exit code from the previous command."
	# ------------------------------------------------------------------------------
	# Configuration
	# ------------------------------------------------------------------------------

	__sf_util_set_default SPACEFISH_EXIT_CODE_SHOW false
	__sf_util_set_default SPACEFISH_EXIT_CODE_PREFIX ""
	__sf_util_set_default SPACEFISH_EXIT_CODE_SUFFIX " "
	__sf_util_set_default SPACEFISH_EXIT_CODE_SYMBOL ✘
	__sf_util_set_default SPACEFISH_EXIT_CODE_COLOR red

	# ------------------------------------------------------------------------------
	# Section
	# ------------------------------------------------------------------------------

	[ $SPACEFISH_EXIT_CODE_SHOW = false ]; or test $sf_exit_code -eq 0; and return

	__sf_lib_section \
		$SPACEFISH_EXIT_CODE_COLOR \
		$SPACEFISH_EXIT_CODE_PREFIX \
		"$SPACEFISH_EXIT_CODE_SYMBOL$sf_exit_code" \
		$SPACEFISH_EXIT_CODE_SUFFIX
end

A fish/functions/__sf_section_git.fish => fish/functions/__sf_section_git.fish +35 -0
@@ 0,0 1,35 @@
#
# Git
#

function __sf_section_git -d "Display the git branch and status"
	# ------------------------------------------------------------------------------
	# Configuration
	# ------------------------------------------------------------------------------

	__sf_util_set_default SPACEFISH_GIT_SHOW true
	__sf_util_set_default SPACEFISH_GIT_PREFIX "on "
	__sf_util_set_default SPACEFISH_GIT_SUFFIX $SPACEFISH_PROMPT_DEFAULT_SUFFIX
	__sf_util_set_default SPACEFISH_GIT_SYMBOL " "

	# ------------------------------------------------------------------------------
	# Section
	# ------------------------------------------------------------------------------

	# Show both git branch and git status:
	#   spacefish_git_branch
	#   spacefish_git_status

	[ $SPACEFISH_GIT_SHOW = false ]; and return

	set -l git_branch (__sf_section_git_branch)
	set -l git_status (__sf_section_git_status)

	[ -z $git_branch ]; and return

	__sf_lib_section \
		fff \
		$SPACEFISH_GIT_PREFIX \
		"$git_branch$git_status" \
		$SPACEFISH_GIT_SUFFIX
end

A fish/functions/__sf_section_git_branch.fish => fish/functions/__sf_section_git_branch.fish +28 -0
@@ 0,0 1,28 @@
#
# Git branch
#

function __sf_section_git_branch -d "Format the displayed branch name"
	# ------------------------------------------------------------------------------
	# Configuration
	# ------------------------------------------------------------------------------

	__sf_util_set_default SPACEFISH_GIT_BRANCH_SHOW true
	__sf_util_set_default SPACEFISH_GIT_BRANCH_PREFIX $SPACEFISH_GIT_SYMBOL
	__sf_util_set_default SPACEFISH_GIT_BRANCH_SUFFIX ""
	__sf_util_set_default SPACEFISH_GIT_BRANCH_COLOR magenta

	# ------------------------------------------------------------------------------
	# Section
	# ------------------------------------------------------------------------------

	[ $SPACEFISH_GIT_BRANCH_SHOW = false ]; and return

	set -l git_branch (__sf_util_git_branch)

	[ -z $git_branch ]; and return

	__sf_lib_section \
		$SPACEFISH_GIT_BRANCH_COLOR \
		$SPACEFISH_GIT_BRANCH_PREFIX$git_branch$SPACEFISH_GIT_BRANCH_SUFFIX
end

A fish/functions/__sf_section_git_status.fish => fish/functions/__sf_section_git_status.fish +98 -0
@@ 0,0 1,98 @@
#
# Git status
#

function __sf_section_git_status -d "Display the current git status"
	# ------------------------------------------------------------------------------
	# Configuration
	# ------------------------------------------------------------------------------

	__sf_util_set_default SPACEFISH_GIT_STATUS_SHOW true
	__sf_util_set_default SPACEFISH_GIT_STATUS_PREFIX " ["
	__sf_util_set_default SPACEFISH_GIT_STATUS_SUFFIX ]
	__sf_util_set_default SPACEFISH_GIT_STATUS_COLOR red
	__sf_util_set_default SPACEFISH_GIT_STATUS_UNTRACKED \?
	__sf_util_set_default SPACEFISH_GIT_STATUS_ADDED +
	__sf_util_set_default SPACEFISH_GIT_STATUS_MODIFIED !
	__sf_util_set_default SPACEFISH_GIT_STATUS_RENAMED »
	__sf_util_set_default SPACEFISH_GIT_STATUS_DELETED ✘
	__sf_util_set_default SPACEFISH_GIT_STATUS_STASHED \$
	__sf_util_set_default SPACEFISH_GIT_STATUS_UNMERGED =
	__sf_util_set_default SPACEFISH_GIT_STATUS_AHEAD ⇡
	__sf_util_set_default SPACEFISH_GIT_STATUS_BEHIND ⇣
	__sf_util_set_default SPACEFISH_GIT_STATUS_DIVERGED ⇕
	__sf_util_set_default SPACEFISH_GIT_PROMPT_ORDER untracked added modified renamed deleted stashed unmerged diverged ahead behind

	# ------------------------------------------------------------------------------
	# Section
	# ------------------------------------------------------------------------------

	set -l git_status
	set -l is_ahead
	set -l is_behind

	set -l index (command git status --porcelain 2>/dev/null -b)
	set -l trimmed_index (string split \n $index | string sub --start 1 --length 2)

	for i in $trimmed_index
		if test (string match '\?\?' $i)
			set git_status untracked $git_status
		end
		if test (string match '*A*' $i)
			set git_status added $git_status
		end
		if test (string match '*M*' $i)
			set git_status modified $git_status
		end
		if test (string match '*R*' $i)
			set git_status renamed $git_status
		end
		if test (string match '*D*' $i)
			set git_status deleted $git_status
		end
		if test (string match '*U*' $i)
			set git_status deleted $git_status
		end
	end

	# Check for stashes
	if test -n (echo (command git rev-parse --verify refs/stash 2>/dev/null))
		set git_status stashed $git_status
	end

	# Check whether the branch is ahead
	if test (string match '*ahead*' $index)
		set is_ahead true
	end

	# Check whether the branch is behind
	if test (string match '*behind*' $index)
		set is_behind true
	end

	# Check whether the branch has diverged
	if test "$is_ahead" = "true" -a "$is_behind" = "true"
		set git_status diverged $git_status
	else if test "$is_ahead" = "true"
		set git_status ahead $git_status
	else if test "$is_behind" = "true"
		set git_status behind $git_status
	end

	set -l full_git_status
	for i in $SPACEFISH_GIT_PROMPT_ORDER
		set i (string upper $i)
		set git_status (string upper $git_status)
		if contains $i in $git_status
			set -l status_symbol SPACEFISH_GIT_STATUS_$i
			set full_git_status "$$status_symbol$full_git_status"
		end
	end

	# Check if git status
	if test -n "$full_git_status"
		__sf_lib_section \
			$SPACEFISH_GIT_STATUS_COLOR \
			"$SPACEFISH_GIT_STATUS_PREFIX$full_git_status$SPACEFISH_GIT_STATUS_SUFFIX"
	end
end

A fish/functions/__sf_section_golang.fish => fish/functions/__sf_section_golang.fish +46 -0
@@ 0,0 1,46 @@
#
# Go
#
# Go is an open source programming language that makes it easy
# to build efficient software.
# Link: https://golang.org/

function __sf_section_golang -d "Display the current go version if you're inside GOPATH"
	# ------------------------------------------------------------------------------
	# Configuration
	# ------------------------------------------------------------------------------

	__sf_util_set_default SPACEFISH_GOLANG_SHOW true
	__sf_util_set_default SPACEFISH_GOLANG_PREFIX $SPACEFISH_PROMPT_DEFAULT_PREFIX
	__sf_util_set_default SPACEFISH_GOLANG_SUFFIX $SPACEFISH_PROMPT_DEFAULT_SUFFIX
	__sf_util_set_default SPACEFISH_GOLANG_SYMBOL "🐹 "
	__sf_util_set_default SPACEFISH_GOLANG_COLOR cyan

	# ------------------------------------------------------------------------------
	# Section
	# ------------------------------------------------------------------------------

	# Show the current version of Golang
	[ $SPACEFISH_GOLANG_SHOW = false ]; and return

	# Ensure the go command is available
	type -q go; or return

	if not test -f go.mod \
		-o -d Godeps \
		-o -f glide.yaml \
		-o (count *.go) -gt 0 \
		-o -f Gopkg.yml \
		-o -f Gopkg.lock \
		-o ([ -n $GOPATH ]; and string match $GOPATH $PWD)
		return
	end

	set -l go_version (go version | awk '{ print substr($3, 3) }')

	__sf_lib_section \
		$SPACEFISH_GOLANG_COLOR \
		$SPACEFISH_GOLANG_PREFIX \
		"$SPACEFISH_GOLANG_SYMBOL"v"$go_version" \
		$SPACEFISH_GOLANG_SUFFIX
end

A fish/functions/__sf_section_haskell.fish => fish/functions/__sf_section_haskell.fish +38 -0
@@ 0,0 1,38 @@
#
# Haskell Stack
#
# An advanced, purely functional programming language.
# Link: https://www.haskell.org/

function __sf_section_haskell -d "Show current version of Haskell Tool Stack"
	# ------------------------------------------------------------------------------
	# Configuration
	# ------------------------------------------------------------------------------

	__sf_util_set_default SPACEFISH_HASKELL_SHOW true
	__sf_util_set_default SPACEFISH_HASKELL_PREFIX $SPACEFISH_PROMPT_DEFAULT_PREFIX
	__sf_util_set_default SPACEFISH_HASKELL_SUFFIX $SPACEFISH_PROMPT_DEFAULT_SUFFIX
	__sf_util_set_default SPACEFISH_HASKELL_SYMBOL "λ "
	__sf_util_set_default SPACEFISH_HASKELL_COLOR red

	# ------------------------------------------------------------------------------
	# Section
	# ------------------------------------------------------------------------------

	# Show current version of Haskell Tool Stack.
	[ $SPACEFISH_HASKELL_SHOW = false ]; and return

	# Ensure the stack command is available
	type -q stack; or return

	# If there are stack files in current directory
	[ -f ./stack.yaml ]; or return

	set -l haskell_version (stack ghc -- --numeric-version --no-install-ghc)

	__sf_lib_section \
		$SPACEFISH_HASKELL_COLOR \
		$SPACEFISH_HASKELL_PREFIX \
		"$SPACEFISH_HASKELL_SYMBOL"v"$haskell_version" \
		$SPACEFISH_HASKELL_SUFFIX
end

A fish/functions/__sf_section_host.fish => fish/functions/__sf_section_host.fish +41 -0
@@ 0,0 1,41 @@
#
# Hostname
#


# If there is an ssh connections, current machine name.
function __sf_section_host -d "Display the current hostname if connected over SSH"

	# ------------------------------------------------------------------------------
	# Configuration
	# ------------------------------------------------------------------------------

	__sf_util_set_default SPACEFISH_HOST_SHOW true
	__sf_util_set_default SPACEFISH_HOST_PREFIX "at "
	__sf_util_set_default SPACEFISH_HOST_SUFFIX $SPACEFISH_PROMPT_DEFAULT_SUFFIX
	__sf_util_set_default SPACEFISH_HOST_COLOR blue
	__sf_util_set_default SPACEFISH_HOST_COLOR_SSH green

	# ------------------------------------------------------------------------------
	# Section
	# ------------------------------------------------------------------------------

	[ "$SPACEFISH_HOST_SHOW" = false ]; and return

	if test "$SPACEFISH_HOST_SHOW" = "always"; or set -q SSH_CONNECTION;

		# Determination of what color should be used
		set -l host_color
		if set -q SSH_CONNECTION;
			set host_color $SPACEFISH_HOST_COLOR_SSH
		else
			set host_color $SPACEFISH_HOST_COLOR
		end

		__sf_lib_section \
			$host_color \
			$SPACEFISH_HOST_PREFIX \
			(hostname) \
			$SPACEFISH_HOST_SUFFIX
		end
end

A fish/functions/__sf_section_jobs.fish => fish/functions/__sf_section_jobs.fish +43 -0
@@ 0,0 1,43 @@
# Jobs
#

function __sf_section_jobs -d "Show icon, if there's a working jobs in the background."
	# ------------------------------------------------------------------------------
	# Configuration
	# ------------------------------------------------------------------------------

	__sf_util_set_default SPACEFISH_JOBS_SHOW true
	__sf_util_set_default SPACEFISH_JOBS_PREFIX ""
	__sf_util_set_default SPACEFISH_JOBS_SUFFIX " "
	__sf_util_set_default SPACEFISH_JOBS_SYMBOL ✦
	__sf_util_set_default SPACEFISH_JOBS_COLOR blue
	__sf_util_set_default SPACEFISH_JOBS_AMOUNT_PREFIX ""
	__sf_util_set_default SPACEFISH_JOBS_AMOUNT_SUFFIX ""
	__sf_util_set_default SPACEFISH_JOBS_AMOUNT_THRESHOLD 1

	# ------------------------------------------------------------------------------
	# Section
	# ------------------------------------------------------------------------------

	[ $SPACEFISH_JOBS_SHOW = false ]; and return

	set jobs_amount (jobs | wc -l | xargs) # Zsh had a much more complicated command.

	if test $jobs_amount -eq 0
		return
	end

	if test $jobs_amount -le $SPACEFISH_JOBS_AMOUNT_THRESHOLD
		set jobs_amount ''
		set SPACEFISH_JOBS_AMOUNT_PREFIX ''
		set SPACEFISH_JOBS_AMOUNT_SUFFIX ''
	end

	set SPACEFISH_JOBS_SECTION "$SPACEFISH_JOBS_SYMBOL$SPACEFISH_JOBS_AMOUNT_PREFIX$jobs_amount$SPACEFISH_JOBS_AMOUNT_SUFFIX"

	__sf_lib_section \
		$SPACEFISH_JOBS_COLOR \
		$SPACEFISH_JOBS_PREFIX \
		$SPACEFISH_JOBS_SECTION \
		$SPACEFISH_JOBS_SUFFIX
end

A fish/functions/__sf_section_julia.fish => fish/functions/__sf_section_julia.fish +36 -0
@@ 0,0 1,36 @@
#
# Julia
#
# Current Julia version.

function __sf_section_julia -d "Display julia version"
	# ------------------------------------------------------------------------------
	# Configuration
	# ------------------------------------------------------------------------------

	__sf_util_set_default SPACEFISH_JULIA_SHOW true
	__sf_util_set_default SPACEFISH_JULIA_PREFIX "is "
	__sf_util_set_default SPACEFISH_JULIA_SUFFIX $SPACEFISH_PROMPT_DEFAULT_SUFFIX
	__sf_util_set_default SPACEFISH_JULIA_SYMBOL "ஃ "
	__sf_util_set_default SPACEFISH_JULIA_COLOR green

	# ------------------------------------------------------------------------------
	# Section
	# ------------------------------------------------------------------------------

	[ $SPACEFISH_JULIA_SHOW = false ]; and return

	# Show Julia version only if julia is installed
	type -q julia; or return

	# Show julia version only when pwd has *.jl file(s)
	[ (count *.jl) -gt 0 ]; or return

	set -l julia_version (julia --version | grep --color=never -oE '[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]')

	__sf_lib_section \
	$SPACEFISH_JULIA_COLOR \
	$SPACEFISH_JULIA_PREFIX \
	"$SPACEFISH_JULIA_SYMBOL"v"$julia_version" \
	$SPACEFISH_JULIA_SUFFIX
end

A fish/functions/__sf_section_kubecontext.fish => fish/functions/__sf_section_kubecontext.fish +39 -0
@@ 0,0 1,39 @@
#
#  Kubernetes (kubectl)
#
# Kubernetes is an open-source system for deployment, scaling,
# and management of containerized applications.
# Link: https://kubernetes.io/

function __sf_section_kubecontext -d "Display the kubernetes context"
	# ------------------------------------------------------------------------------
	# Configuration
	# ------------------------------------------------------------------------------

	__sf_util_set_default SPACEFISH_KUBECONTEXT_SHOW true
	__sf_util_set_default SPACEFISH_KUBECONTEXT_PREFIX "at "
	__sf_util_set_default SPACEFISH_KUBECONTEXT_SUFFIX $SPACEFISH_PROMPT_DEFAULT_SUFFIX
	# Additional space is added because ☸️ is wider than other symbols
	# See: https://github.com/denysdovhan/spaceship-prompt/pull/432
	__sf_util_set_default SPACEFISH_KUBECONTEXT_SYMBOL "☸️  "
	__sf_util_set_default SPACEFISH_KUBECONTEXT_COLOR cyan

	# ------------------------------------------------------------------------------
	# Section
	# ------------------------------------------------------------------------------

	# Show current kubecontext
	[ $SPACEFISH_KUBECONTEXT_SHOW = false ]; and return

	# Ensure the kubectl command is available
	type -q kubectl; or return

	set -l kube_context (kubectl config current-context 2>/dev/null)
	[ -z $kube_context ]; and return

	__sf_lib_section \
		$SPACEFISH_KUBECONTEXT_COLOR \
		$SPACEFISH_KUBECONTEXT_PREFIX \
		"$SPACEFISH_KUBECONTEXT_SYMBOL""$kube_context" \
		$SPACEFISH_KUBECONTEXT_SUFFIX
end

A fish/functions/__sf_section_line_sep.fish => fish/functions/__sf_section_line_sep.fish +19 -0
@@ 0,0 1,19 @@
#
# Line separator
#

function __sf_section_line_sep -d "Separate the prompt into two lines"
	# ------------------------------------------------------------------------------
	# Configuration
	# ------------------------------------------------------------------------------

	__sf_util_set_default SPACEFISH_PROMPT_SEPARATE_LINE true

	# ------------------------------------------------------------------------------
	# Section
	# ------------------------------------------------------------------------------

	if test "$SPACEFISH_PROMPT_SEPARATE_LINE" = "true"
		echo -e -n \n
	end
end

A fish/functions/__sf_section_node.fish => fish/functions/__sf_section_node.fish +58 -0
@@ 0,0 1,58 @@
#
# Node.js
#
# Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine.
# Link: https://nodejs.org/

function __sf_section_node -d "Display the local node version"
	# ------------------------------------------------------------------------------
	# Configuration
	# ------------------------------------------------------------------------------

	__sf_util_set_default SPACEFISH_NODE_SHOW true
	__sf_util_set_default SPACEFISH_NODE_PREFIX $SPACEFISH_PROMPT_DEFAULT_PREFIX
	__sf_util_set_default SPACEFISH_NODE_SUFFIX $SPACEFISH_PROMPT_DEFAULT_SUFFIX
	__sf_util_set_default SPACEFISH_NODE_SYMBOL "⬢ "
	__sf_util_set_default SPACEFISH_NODE_DEFAULT_VERSION ""
	__sf_util_set_default SPACEFISH_NODE_COLOR green

	# ------------------------------------------------------------------------------
	# Section
	# ------------------------------------------------------------------------------

	# Show the current version of Node
	[ $SPACEFISH_NODE_SHOW = false ]; and return

	# Show versions only for Node-specific folders
	if not test -f ./package.json \
		-o -d ./node_modules \
		-o (count *.js) -gt 0
		return
	end

	if type -q nvm
		# Only recheck the node version if the nvm bin has changed
		if test "$NVM_BIN" != "$sf_last_nvm_bin" -o -z "$sf_node_version"
			set -g sf_node_version (nvm current 2>/dev/null)
			set -g sf_last_nvm_bin $NVM_BIN
		end
	else if type -q nodenv
		set -g sf_node_version (nodenv version-name 2>/dev/null)
	else if type -q node
		set -g sf_node_version (node -v 2>/dev/null)
	else
		return
	end

	# Don't echo section if the system verison of node is being used
	[ "$sf_node_version" = "system" -o "$sf_node_version" = "node" ]; and return

	# Don't echo section if the node version matches the default version
	[ "$sf_node_version" = "$SPACEFISH_NODE_DEFAULT_VERSION" ]; and return

	__sf_lib_section \
		$SPACEFISH_NODE_COLOR \
		$SPACEFISH_NODE_PREFIX \
		"$SPACEFISH_NODE_SYMBOL$sf_node_version" \
		$SPACEFISH_NODE_SUFFIX
end

A fish/functions/__sf_section_package.fish => fish/functions/__sf_section_package.fish +44 -0
@@ 0,0 1,44 @@
#
# Package
#
# Current package version.
# These package managers supported:
#   * NPM

function __sf_section_package -d "Display the local package version"
	# ------------------------------------------------------------------------------
	# Configuration
	# ------------------------------------------------------------------------------

	__sf_util_set_default SPACEFISH_PACKAGE_SHOW true
	__sf_util_set_default SPACEFISH_PACKAGE_PREFIX "is "
	__sf_util_set_default SPACEFISH_PACKAGE_SUFFIX $SPACEFISH_PROMPT_DEFAULT_SUFFIX
	__sf_util_set_default SPACEFISH_PACKAGE_SYMBOL "📦 "
	__sf_util_set_default SPACEFISH_PACKAGE_COLOR red

	# ------------------------------------------------------------------------------
	# Section
	# ------------------------------------------------------------------------------

	[ $SPACEFISH_PACKAGE_SHOW = false ]; and return

	# Show package version only when repository is a package
	[ -f ./package.json ]; or return
	# Show package version only if npm is installed
	type -q npm; or return

	set -l version_line (grep -E '"version": "v?([0-9]+\.){1,}' package.json)
	set -l package_version (string split \" $version_line)[4]

	if test -z "$package_version"
		set package_version ⚠
	else
		set package_version "v$package_version"
	end

	__sf_lib_section \
		$SPACEFISH_PACKAGE_COLOR \
		$SPACEFISH_PACKAGE_PREFIX \
		"$SPACEFISH_PACKAGE_SYMBOL$package_version" \
		$SPACEFISH_PACKAGE_SUFFIX
end

A fish/functions/__sf_section_php.fish => fish/functions/__sf_section_php.fish +40 -0
@@ 0,0 1,40 @@
#
# PHP
#
# PHP is a server-side scripting language designed primarily for web development.
# Link: http://www.php.net/

function __sf_section_php -d "Display the current php version"
	# ------------------------------------------------------------------------------
	# Configuration
	# ------------------------------------------------------------------------------

	__sf_util_set_default SPACEFISH_PHP_SHOW true
	__sf_util_set_default SPACEFISH_PHP_PREFIX $SPACEFISH_PROMPT_DEFAULT_PREFIX
	__sf_util_set_default SPACEFISH_PHP_SUFFIX $SPACEFISH_PROMPT_DEFAULT_SUFFIX
	__sf_util_set_default SPACEFISH_PHP_SYMBOL "🐘 "
	__sf_util_set_default SPACEFISH_PHP_COLOR blue

	# ------------------------------------------------------------------------------
	# Section
	# ------------------------------------------------------------------------------

	# Show current version of PHP
	[ $SPACEFISH_PHP_SHOW = false ]; and return

	# Ensure the php command is available
	type -q php; or return

	if not test -f composer.json \
		-o (count *.php) -gt 0
		return
	end

	set -l php_version (php -v | string match -r 'PHP\s*[0-9.]+' | string split ' ')[2]

	__sf_lib_section \
		$SPACEFISH_PHP_COLOR \
		$SPACEFISH_PHP_PREFIX \
		"$SPACEFISH_PHP_SYMBOL"v"$php_version" \
		$SPACEFISH_PHP_SUFFIX
end

A fish/functions/__sf_section_pyenv.fish => fish/functions/__sf_section_pyenv.fish +38 -0
@@ 0,0 1,38 @@
# pyenv
#

function __sf_section_pyenv -d "Show current version of pyenv Python, including system."
	# ------------------------------------------------------------------------------
	# Configuration
	# ------------------------------------------------------------------------------

	__sf_util_set_default SPACEFISH_PYENV_SHOW true
	__sf_util_set_default SPACEFISH_PYENV_PREFIX $SPACEFISH_PROMPT_DEFAULT_PREFIX
	__sf_util_set_default SPACEFISH_PYENV_SUFFIX $SPACEFISH_PROMPT_DEFAULT_SUFFIX
	__sf_util_set_default SPACEFISH_PYENV_SYMBOL "🐍 "
	__sf_util_set_default SPACEFISH_PYENV_COLOR yellow

	# ------------------------------------------------------------------------------
	# Section
	# ------------------------------------------------------------------------------

	# Show pyenv python version
	[ $SPACEFISH_PYENV_SHOW = false ]; and return

	# Ensure the pyenv command is available
	type -q pyenv; or return

	# Show pyenv python version only for Python-specific folders
	if not test -f requirements.txt \
		-o (count *.py) -gt 0
		return
	end

	set -l pyenv_status (pyenv version-name 2>/dev/null) # This line needs explicit testing in an enviroment that has pyenv.

	__sf_lib_section \
		$SPACEFISH_PYENV_COLOR \
		$SPACEFISH_PYENV_PREFIX \
		"$SPACEFISH_PYENV_SYMBOL""$pyenv_status" \
		$SPACEFISH_PYENV_SUFFIX
end

A fish/functions/__sf_section_ruby.fish => fish/functions/__sf_section_ruby.fish +58 -0
@@ 0,0 1,58 @@
#
# Ruby
#
# A dynamic, reflective, object-oriented, general-purpose programming language.
# Link: https://www.ruby-lang.org/

function __sf_section_ruby -d "Show current version of Ruby"
	# ------------------------------------------------------------------------------
	# Configuration
	# ------------------------------------------------------------------------------

	__sf_util_set_default SPACEFISH_RUBY_SHOW true
	__sf_util_set_default SPACEFISH_RUBY_PREFIX $SPACEFISH_PROMPT_DEFAULT_PREFIX
	__sf_util_set_default SPACEFISH_RUBY_SUFFIX $SPACEFISH_PROMPT_DEFAULT_SUFFIX
	__sf_util_set_default SPACEFISH_RUBY_SYMBOL "💎 "
	__sf_util_set_default SPACEFISH_RUBY_COLOR red

	# ------------------------------------------------------------------------------
	# Section
	# ------------------------------------------------------------------------------

	# Check if that user wants to show ruby version
	[ $SPACEFISH_RUBY_SHOW = false ]; and return

	# Show versions only for Ruby-specific folders
	if not test -f Gemfile \
		-o -f Rakefile \
		-o (count *.rb) -gt 0
		return
	end

	set -l ruby_version

	if type -q rvm-prompt
		set ruby_version (rvm-prompt i v g)
	else if type -q rbenv
		set ruby_version (rbenv version-name)
	else if type -q chruby
		set ruby_version $RUBY_AUTO_VERSION
	else if type -q asdf
		set ruby_version (asdf current ruby | awk '{print $1}')
	else
		return
	end

	[ -z "$ruby_version" -o "$ruby_version" = "system" ]; and return

	# Add 'v' before ruby version that starts with a number
	if test -n (echo (string match -r "^[0-9].+\$" "$ruby_version"))
		set ruby_version "v$ruby_version"
	end

	__sf_lib_section \
		$SPACEFISH_RUBY_COLOR \
		$SPACEFISH_RUBY_PREFIX \
		"$SPACEFISH_RUBY_SYMBOL""$ruby_version" \
		$SPACEFISH_RUBY_SUFFIX
end

A fish/functions/__sf_section_rust.fish => fish/functions/__sf_section_rust.fish +45 -0
@@ 0,0 1,45 @@
#
# Rust
#
# Rust is a systems programming language sponsored by Mozilla Research.
# Link: https://www.rust-lang.org

function __sf_section_rust -d "Display the current Rust version"
	# ------------------------------------------------------------------------------
	# Configuration
	# ------------------------------------------------------------------------------

	__sf_util_set_default SPACEFISH_RUST_SHOW true
	__sf_util_set_default SPACEFISH_RUST_PREFIX $SPACEFISH_PROMPT_DEFAULT_PREFIX
	__sf_util_set_default SPACEFISH_RUST_SUFFIX $SPACEFISH_PROMPT_DEFAULT_SUFFIX
	__sf_util_set_default SPACEFISH_RUST_SYMBOL "𝗥 "
	__sf_util_set_default SPACEFISH_RUST_COLOR red
	__sf_util_set_default SPACEFISH_RUST_VERBOSE_VERSION false

	# ------------------------------------------------------------------------------
	# Section
	# ------------------------------------------------------------------------------

	# Show current version of Rust
	[ $SPACEFISH_RUST_SHOW = false ]; and return

	# Ensure the rustc command is available
	type -q rustc; or return

	if not test -f Cargo.toml \
		-o (count *.rs) -gt 0
		return
	end

	set -l rust_version (rustc --version | string split ' ')[2]

	if test $SPACEFISH_RUST_VERBOSE_VERSION = false
        set rust_version (string split '-' $rust_version)[1] # Cut off -suffixes from version. "v1.30.0-beta" vs "v1.30.0"
	end

	__sf_lib_section \
		$SPACEFISH_RUST_COLOR \
		$SPACEFISH_RUST_PREFIX \
		"$SPACEFISH_RUST_SYMBOL"v"$rust_version" \
		$SPACEFISH_RUST_SUFFIX
end

A fish/functions/__sf_section_time.fish => fish/functions/__sf_section_time.fish +41 -0
@@ 0,0 1,41 @@
#
# Time
#

function __sf_section_time -d "Display the current time!"
	# ------------------------------------------------------------------------------
	# Configuration
	# ------------------------------------------------------------------------------

	__sf_util_set_default SPACEFISH_TIME_SHOW false
	__sf_util_set_default SPACEFISH_DATE_SHOW false
	__sf_util_set_default SPACEFISH_TIME_PREFIX "at "
	__sf_util_set_default SPACEFISH_TIME_SUFFIX $SPACEFISH_PROMPT_DEFAULT_SUFFIX
	__sf_util_set_default SPACEFISH_TIME_FORMAT false
	__sf_util_set_default SPACEFISH_TIME_12HR false
	__sf_util_set_default SPACEFISH_TIME_COLOR "yellow"

	# ------------------------------------------------------------------------------
	# Section
	# ------------------------------------------------------------------------------

	[ $SPACEFISH_TIME_SHOW = false ]; and return

	if test $SPACEFISH_DATE_SHOW = true
		set time_str (date '+%Y-%m-%d')" "
	end

	if not test $SPACEFISH_TIME_FORMAT = false
		set time_str $SPACEFISH_TIME_FORMAT
	else if test $SPACEFISH_TIME_12HR = true
		set time_str "$time_str"(date '+%I:%M:%S') # Fish doesn't seem to have date/time formatting.
	else
		set time_str "$time_str"(date '+%H:%M:%S')
	end

	__sf_lib_section \
		$SPACEFISH_TIME_COLOR \
		$SPACEFISH_TIME_PREFIX \
		$time_str \
		$SPACEFISH_TIME_SUFFIX
end

A fish/functions/__sf_section_user.fish => fish/functions/__sf_section_user.fish +49 -0
@@ 0,0 1,49 @@
#
# Username
#

function __sf_section_user -d "Display the username"
	# ------------------------------------------------------------------------------
	# Configuration
	# ------------------------------------------------------------------------------

	# --------------------------------------------------------------------------
	# | SPACEFISH_USER_SHOW | show username on local | show username on remote |
	# |---------------------+------------------------+-------------------------|
	# | false               | never                  | never                   |
	# | always              | always                 | always                  |
	# | true                | if needed              | always                  |
	# | needed              | if needed              | if needed               |
	# --------------------------------------------------------------------------

	__sf_util_set_default SPACEFISH_USER_SHOW true
	__sf_util_set_default SPACEFISH_USER_PREFIX "with "
	__sf_util_set_default SPACEFISH_USER_SUFFIX $SPACEFISH_PROMPT_DEFAULT_SUFFIX
	__sf_util_set_default SPACEFISH_USER_COLOR yellow
	__sf_util_set_default SPACEFISH_USER_COLOR_ROOT red

	# ------------------------------------------------------------------------------
	# Section
	# ------------------------------------------------------------------------------

	[ $SPACEFISH_USER_SHOW = false ]; and return

	if test "$SPACEFISH_USER_SHOW" = "always" \
	-o "$LOGNAME" != "$USER" \
	-o "$UID" = "0" \
	-o \( "$SPACEFISH_USER_SHOW" = "true" -a -n "$SSH_CONNECTION" \)

		set -l user_color
		if test "$USER" = "root"
			set user_color $SPACEFISH_USER_COLOR_ROOT
		else
			set user_color $SPACEFISH_USER_COLOR
		end

		__sf_lib_section \
			$user_color \
			$SPACEFISH_USER_PREFIX \
			$USER \
			$SPACEFISH_USER_SUFFIX
	end
end

A fish/functions/__sf_section_vi_mode.fish => fish/functions/__sf_section_vi_mode.fish +51 -0
@@ 0,0 1,51 @@
#
# Vi Mode
#

function __sf_section_vi_mode -d "Display vi mode status"
	# ------------------------------------------------------------------------------
	# Configuration
	# ------------------------------------------------------------------------------

	__sf_util_set_default SPACEFISH_VI_MODE_SHOW true
	__sf_util_set_default SPACEFISH_VI_MODE_PREFIX " "
	__sf_util_set_default SPACEFISH_VI_MODE_SUFFIX $SPACEFISH_PROMPT_DEFAULT_SUFFIX
	__sf_util_set_default SPACEFISH_VI_MODE_INSERT [I]
	__sf_util_set_default SPACEFISH_VI_MODE_NORMAL [N]
	__sf_util_set_default SPACEFISH_VI_MODE_VISUAL [V]
	__sf_util_set_default SPACEFISH_VI_MODE_REPLACE_ONE [R]
	__sf_util_set_default SPACEFISH_VI_MODE_COLOR white

	# ------------------------------------------------------------------------------
	# Section
	# ------------------------------------------------------------------------------

	[ $SPACEFISH_VI_MODE_SHOW = false ]; and return

	# Ensure fish_vi_key_bindings or fish_hybrid_key_bindings are used
	# Here we are trying to be compatible with default fish_mode_prompt implementation,
	# wich handle both "fish_vi_key_bindings" and "fish_hybrid_key_bindings"
	[ "$fish_key_bindings" = "fish_vi_key_bindings" ]; or [ "$fish_key_bindings" = "fish_hybrid_key_bindings" ]; or return

	# Use `set -l` to define local variables to avoid populating
  	# the global namespace
	set -l vi_mode_symbol

	# Check current mode and set vi_mode_symbol based on it
	switch $fish_bind_mode
		case default
			set vi_mode_symbol $SPACEFISH_VI_MODE_NORMAL
		case insert
			set vi_mode_symbol $SPACEFISH_VI_MODE_INSERT
		case replace_one
			set vi_mode_symbol $SPACEFISH_VI_MODE_REPLACE_ONE
		case visual
			set vi_mode_symbol $SPACEFISH_VI_MODE_VISUAL
	end

	__sf_lib_section \
		$SPACEFISH_VI_MODE_COLOR \
		$SPACEFISH_VI_MODE_PREFIX \
		$vi_mode_symbol \
		$SPACEFISH_VI_MODE_SUFFIX
end

A fish/functions/__sf_util_git_branch.fish => fish/functions/__sf_util_git_branch.fish +7 -0
@@ 0,0 1,7 @@
#
# Git branch
#

function __sf_util_git_branch -d "Display the current branch name"
	echo (command git rev-parse --abbrev-ref HEAD 2>/dev/null)
end

A fish/functions/__sf_util_human_time.fish => fish/functions/__sf_util_human_time.fish +23 -0
@@ 0,0 1,23 @@
#
# Human time
#

function __sf_util_human_time -d "Humanize a time interval for display"
	command awk '
		function hmTime(time,   stamp) {
			split("h:m:s:ms", units, ":")
			for (i = 2; i >= -1; i--) {
				if (t = int( i < 0 ? time % 1000 : time / (60 ^ i * 1000) % 60 )) {
					stamp = stamp t units[sqrt((i - 2) ^ 2) + 1] " "
				}
			}
			if (stamp ~ /^ *$/) {
				return "0ms"
			}
			return substr(stamp, 1, length(stamp) - 1)
		}
		{
			print hmTime($0)
		}
	'
end

A fish/functions/__sf_util_set_default.fish => fish/functions/__sf_util_set_default.fish +10 -0
@@ 0,0 1,10 @@
#
# Set default
#

function __sf_util_set_default -a var -d "Set the default value for a global variable"
	if not set -q $var
		# Multiple arguments will become a list
		set -g $var $argv[2..-1]
	end
end

A fish/functions/__sf_util_truncate_dir.fish => fish/functions/__sf_util_truncate_dir.fish +17 -0
@@ 0,0 1,17 @@
#
# Truncate directory
#

function __sf_util_truncate_dir -a path truncate_to -d "Truncate a directory path"
	if test "$truncate_to" -eq 0
		echo $path
	else
		set -l folders (string split / $path)

		if test (count $folders) -le "$truncate_to"
			echo $path
		else
			echo (string join / $folders[(math 0 - $truncate_to)..-1])
		end
	end
end

A fish/functions/__z.fish => fish/functions/__z.fish +151 -0
@@ 0,0 1,151 @@
function __z -d "Jump to a recent directory."
    function __print_help -d "Print z help."
        printf "Usage: $Z_CMD  [-celrth] regex1 regex2...\n\n"
        printf "         -c --clean    Removes directories that no longer exist from $Z_DATA\n"
        printf "         -d --dir      Opens matching directory using system file manager.\n"
        printf "         -e --echo     Prints best match, no cd\n"
        printf "         -l --list     List matches and scores, no cd\n"
        printf "         -p --purge    Delete all entries from $Z_DATA\n"
        printf "         -r --rank     Search by rank\n"
        printf "         -t --recent   Search by recency\n"
        printf "         -x --delete   Removes the current directory from $Z_DATA\n"
        printf "         -h --help     Print this help\n\n"

        if type -q fisher
            printf "Run `fisher help z` for more information.\n"
        end
    end

    set -l options "h/help" "c/clean" "e/echo" "l/list" "p/purge" "r/rank" "t/recent" "d/directory" "x/delete"

    argparse $options -- $argv

    if set -q _flag_help
        __print_help
        return 0
    else if set -q _flag_clean
        __z_clean
        printf "%s cleaned!\n" $Z_DATA
        return 0
    else if set -q _flag_purge
        echo > $Z_DATA
        printf "%s purged!\n" $Z_DATA
        return 0
    else if set -q _flag_delete
        sed -i -e "\:^$PWD|.*:d" $Z_DATA
        return 0
    end

    set -l typ

    if set -q _flag_rank
        set typ "rank"
    else if set -q _flag_recent
        set typ "recent"
    end

    set -l z_script '
        function frecent(rank, time) {
            dx = t-time
            if( dx < 3600 ) return rank*4
            if( dx < 86400 ) return rank*2
            if( dx < 604800 ) return rank/2
            return rank/4
        }

        function output(matches, best_match, common) {
            # list or return the desired directory
            if( list ) {
                cmd = "sort -nr"
                for( x in matches ) {
                    if( matches[x] ) {
                        printf "%-10s %s\n", matches[x], x | cmd
                    }
                }
                if( common ) {
                    printf "%-10s %s\n", "common:", common > "/dev/stderr"
                }
            } else {
                if( common ) best_match = common
                print best_match
            }
        }

        function common(matches) {
            # find the common root of a list of matches, if it exists
            for( x in matches ) {
                if( matches[x] && (!short || length(x) < length(short)) ) {
                    short = x
                }
            }
            if( short == "/" ) return
            for( x in matches ) if( matches[x] && index(x, short) != 1 ) {
                    return
                }
            return short
        }

        BEGIN {
            gsub(" ", ".*", q)
            hi_rank = ihi_rank = -9999999999
        }
        {
            if( typ == "rank" ) {
                rank = $2
            } else if( typ == "recent" ) {
                rank = $3 - t
            } else rank = frecent($2, $3)
            if( $1 ~ q ) {
                matches[$1] = rank
            } else if( tolower($1) ~ tolower(q) ) imatches[$1] = rank
            if( matches[$1] && matches[$1] > hi_rank ) {
                best_match = $1
                hi_rank = matches[$1]
            } else if( imatches[$1] && imatches[$1] > ihi_rank ) {
                ibest_match = $1
                ihi_rank = imatches[$1]
            }
        }

        END {
        # prefer case sensitive
            if( best_match ) {
                output(matches, best_match, common(matches))
            } else if( ibest_match ) {
                output(imatches, ibest_match, common(imatches))
            }
        }
    '

    if set -q _flag_list
        # Handle list separately as it can print common path information to stderr
        # which cannot be captured from a subcommand.
        command awk -v t=(date +%s) -v list="list" -v typ="$typ" -v q="$argv" -F "|" $z_script "$Z_DATA"
    else
        set target (command awk -v t=(date +%s) -v typ="$typ" -v q="$argv" -F "|" $z_script "$Z_DATA")

        if test "$status" -gt 0
            return
        end

        if test -z "$target"
            printf "'%s' did not match any results\n" "$argv"
            return 1
        end

        if set -q _flag_list
            echo "$target" | tr ";" "\n" | sort -nr
            return 0
        end

        if set -q _flag_echo
            printf "%s\n" "$target"
        else if set -q _flag_directory
            type -q xdg-open;and xdg-open "$target"; and return $status;
            type -q open;and open "$target"; and return $status;
            echo "Not sure how to open file manager"; and return 1;
        else
            pushd "$target"
        end
    end
end

A fish/functions/__z_add.fish => fish/functions/__z_add.fish +48 -0
@@ 0,0 1,48 @@
function __z_add -d "Add PATH to .z file"
  for i in $Z_EXCLUDE
    if contains -- $PWD $i
      return 0 #Path excluded
    end
  end

  set -l tmpfile (mktemp $Z_DATA.XXXXXX)

  if test -f $tmpfile
    command awk -v path="$PWD" -v now=(date +%s) -F "|" '
      BEGIN {
          rank[path] = 1
          time[path] = now
      }
      $2 >= 1 {
          if( $1 == path ) {
              rank[$1] = $2 + 1
              time[$1] = now
          }
          else {
              rank[$1] = $2
              time[$1] = $3
          }
          count += $2
      }
      END {
          if( count > 1000 ) {
              for( i in rank ) print i "|" 0.9*rank[i] "|" time[i] # aging
          }
          else for( i in rank ) print i "|" rank[i] "|" time[i]
      }
    ' $Z_DATA 2>/dev/null >$tmpfile
    
    if test ! -z "$Z_OWNER"
      chown $Z_OWNER:(id -ng $Z_OWNER) $tmpfile
    end
    #
    # Don't use redirection here as it can lead to a race condition where $Z_DATA is clobbered.
    # Note: There is a still a possible race condition where an old version of $Z_DATA is
    #       read by one instance of Fish before another instance of Fish writes its copy.
    #
    command mv $tmpfile $Z_DATA
    or command rm $tmpfile
  end

  __z_complete
end

A fish/functions/__z_clean.fish => fish/functions/__z_clean.fish +10 -0
@@ 0,0 1,10 @@
function __z_clean -d "Clean up .z file to remove paths no longer valid"
  set -l tmpfile (mktemp $Z_DATA.XXXXXX)

  if test -f $tmpfile
    command awk -F "|" 'system("test -d \"" $1 "\"") == 0 { print $0 }' $Z_DATA > $tmpfile
    command mv -f $tmpfile $Z_DATA
  end

  __z_complete
end

A fish/functions/__z_complete.fish => fish/functions/__z_complete.fish +14 -0
@@ 0,0 1,14 @@
function __z_complete -d "add completions"
  set -l __z_marks (string replace -r '\|.*' '' < $Z_DATA | string escape)

  complete -c $Z_CMD -a "$__z_marks" -f
  complete -c $ZO_CMD -a "$__z_marks" -f

  complete -c $Z_CMD -s c -l clean  -d "Cleans out $Z_DATA"
  complete -c $Z_CMD -s e -l echo   -d "Prints best match, no cd"
  complete -c $Z_CMD -s l -l list   -d "List matches, no cd"
  complete -c $Z_CMD -s p -l purge  -d "Purges $Z_DATA"
  complete -c $Z_CMD -s r -l rank   -d "Searches by rank, cd"
  complete -c $Z_CMD -s t -l recent -d "Searches by recency, cd"
  complete -c $Z_CMD -s h -l help   -d "Print help"
end

A fish/functions/fish_mode_prompt.fish => fish/functions/fish_mode_prompt.fish +4 -0
@@ 0,0 1,4 @@
function fish_mode_prompt
	# Overriden by Spacefish fishshell theme
	# To see vi mode in prompt add 'vi_mode' to SPACEFISH_PROMPT_ORDER
end

A fish/functions/fish_prompt.fish => fish/functions/fish_prompt.fish +33 -0
@@ 0,0 1,33 @@
function fish_prompt
	# Store the exit code of the last command
	set -g sf_exit_code $status
	set -g SPACEFISH_VERSION 2.0.1

	# ------------------------------------------------------------------------------
	# Configuration
	# ------------------------------------------------------------------------------

	__sf_util_set_default SPACEFISH_PROMPT_ADD_NEWLINE true
	__sf_util_set_default SPACEFISH_PROMPT_FIRST_PREFIX_SHOW false
	__sf_util_set_default SPACEFISH_PROMPT_PREFIXES_SHOW true
	__sf_util_set_default SPACEFISH_PROMPT_SUFFIXES_SHOW true
	__sf_util_set_default SPACEFISH_PROMPT_DEFAULT_PREFIX "via "
	__sf_util_set_default SPACEFISH_PROMPT_DEFAULT_SUFFIX " "
	__sf_util_set_default SPACEFISH_PROMPT_ORDER time user dir host git package node ruby golang php rust haskell julia docker aws conda pyenv dotnet kubecontext exec_time line_sep battery vi_mode jobs exit_code char

	# ------------------------------------------------------------------------------
	# Sections
	# ------------------------------------------------------------------------------

	# Keep track of whether the prompt has already been opened
	set -g sf_prompt_opened $SPACEFISH_PROMPT_FIRST_PREFIX_SHOW

	if test "$SPACEFISH_PROMPT_ADD_NEWLINE" = "true"
		echo
	end

	for i in $SPACEFISH_PROMPT_ORDER
		eval __sf_section_$i
	end
	set_color normal
end

A fish/functions/fish_prompt.fish~ => fish/functions/fish_prompt.fish~ +33 -0
@@ 0,0 1,33 @@
function fish_prompt
	# Store the exit code of the last command
	set -g sf_exit_code $status
	set -g SPACEFISH_VERSION 2.0.1

	# ------------------------------------------------------------------------------
	# Configuration
	# ------------------------------------------------------------------------------

	__sf_util_set_default SPACEFISH_PROMPT_ADD_NEWLINE true
	__sf_util_set_default SPACEFISH_PROMPT_FIRST_PREFIX_SHOW false
	__sf_util_set_default SPACEFISH_PROMPT_PREFIXES_SHOW true
	__sf_util_set_default SPACEFISH_PROMPT_SUFFIXES_SHOW true
	__sf_util_set_default SPACEFISH_PROMPT_DEFAULT_PREFIX "via "
	__sf_util_set_default SPACEFISH_PROMPT_DEFAULT_SUFFIX " "
	__sf_util_set_default SPACEFISH_PROMPT_ORDER time user dir host git package node ruby golang php rust haskell julia docker aws conda pyenv dotnet kubecontext exec_time line_sep battery vi_mode jobs exit_code char

	# ------------------------------------------------------------------------------
	# Sections
	# ------------------------------------------------------------------------------

	# Keep track of whether the prompt has already been opened
	set -g sf_prompt_opened $SPACEFISH_PROMPT_FIRST_PREFIX_SHOW

	if test "$SPACEFISH_PROMPT_ADD_NEWLINE" = "true"
		echo
	end

	for i in $SPACEFISH_PROMPT_ORDER
		eval __sf_section_$i
	end
	set_color normal
end

A fish/functions/fish_right_prompt.fish => fish/functions/fish_right_prompt.fish +19 -0
@@ 0,0 1,19 @@
function fish_right_prompt

	# ------------------------------------------------------------------------------
	# Configuration
	# ------------------------------------------------------------------------------

	__sf_util_set_default SPACEFISH_RPROMPT_ORDER ""

	# ------------------------------------------------------------------------------
	# Sections
	# ------------------------------------------------------------------------------

	[ -n "$SPACEFISH_RPROMPT_ORDER" ]; or return

	for i in $SPACEFISH_RPROMPT_ORDER
		eval __sf_section_$i
	end
	set_color normal
end

A fish/functions/fisher.fish => fish/functions/fisher.fish +442 -0
@@ 0,0 1,442 @@
set -g fisher_version 3.2.5

function fisher -a cmd -d "fish package manager"
    set -q XDG_CACHE_HOME; or set XDG_CACHE_HOME ~/.cache
    set -q XDG_CONFIG_HOME; or set XDG_CONFIG_HOME ~/.config

    set -g fish_config $XDG_CONFIG_HOME/fish
    set -g fisher_cache $XDG_CACHE_HOME/fisher
    set -g fisher_config $XDG_CONFIG_HOME/fisher

    set -q fisher_path; or set -g fisher_path $fish_config

    for path in {$fish_config,$fisher_path}/{functions,completions,conf.d} $fisher_cache
        if test ! -d $path
            command mkdir -p $path
        end
    end

    if test ! -e $fisher_path/completions/fisher.fish
        echo "fisher complete" >$fisher_path/completions/fisher.fish
        _fisher_complete
    end

    if test -e $fisher_path/conf.d/fisher.fish
        switch "$version"
            case \*-\*
                command rm -f $fisher_path/conf.d/fisher.fish
            case 2\*
            case \*
                command rm -f $fisher_path/conf.d/fisher.fish
        end
    else
        switch "$version"
            case \*-\*
            case 2\*
                echo "fisher copy-user-key-bindings" >$fisher_path/conf.d/fisher.fish
        end
    end

    switch "$cmd"
        case {,self-}complete
            _fisher_complete
        case copy-user-key-bindings
            _fisher_copy_user_key_bindings
        case ls
            set -e argv[1]
            if test -s "$fisher_path/fishfile"
                set -l file (_fisher_fmt <$fisher_path/fishfile | _fisher_diff R)
                _fisher_ls | _fisher_fmt | command awk -v FILE="$file" "
                    BEGIN { for (n = split(FILE, f); ++i <= n;) file[f[i]] } \$0 in file && /$argv[1]/
                "
            end
        case self-update
            _fisher_self_update (status -f)
        case self-uninstall
            _fisher_self_uninstall
        case -v {,--}version
            _fisher_version (status -f)
        case -h {,--}help
            _fisher_help
        case ""
            _fisher_commit --
        case add rm
            if not isatty
                while read -l arg
                    set argv $argv $arg
                end
            end

            if test (count $argv) = 1
                echo "fisher: invalid number of arguments" >&2
                _fisher_help >&2
                return 1
            end

            _fisher_commit $argv
        case \*
            echo "fisher: unknown flag or command \"$cmd\"" >&2
            _fisher_help >&2
            return 1
    end
end

function _fisher_complete
    complete -ec fisher
    complete -xc fisher -n __fish_use_subcommand -a add -d "Add packages"
    complete -xc fisher -n __fish_use_subcommand -a rm -d "Remove packages"
    complete -xc fisher -n __fish_use_subcommand -a ls -d "List installed packages matching REGEX"
    complete -xc fisher -n __fish_use_subcommand -a help -d "Show usage help"
    complete -xc fisher -n __fish_use_subcommand -a version -d "$fisher_version"
    complete -xc fisher -n __fish_use_subcommand -a self-update -d "Update to the latest version"
    for pkg in (fisher ls)
        complete -xc fisher -n "__fish_seen_subcommand_from rm" -a $pkg
    end
end

function _fisher_copy_user_key_bindings
    if functions -q fish_user_key_bindings
        functions -c fish_user_key_bindings fish_user_key_bindings_copy
    end
    function fish_user_key_bindings
        for file in $fisher_path/conf.d/*_key_bindings.fish
            source $file >/dev/null 2>/dev/null
        end
        if functions -q fish_user_key_bindings_copy
            fish_user_key_bindings_copy
        end
    end
end

function _fisher_ls
    for pkg in $fisher_config/*/*/*
        command readlink $pkg; or echo $pkg
    end
end

function _fisher_fmt
    command sed "s|^[[:space:]]*||;s|^$fisher_config/||;s|^$HOME|~|;s|^\.\/|$PWD/|;s|^github\.com/||;s|^https*://||;s|/*\$||"
end

function _fisher_version -a file
    echo "fisher version $fisher_version $file" | command sed "s|$HOME|~|"
end

function _fisher_help
    echo "usage:"
    echo "       fisher add <PACKAGES>    Add packages"
    echo "       fisher rm  <PACKAGES>    Remove packages"
    echo "       fisher                   Update all packages"
    echo "       fisher ls  [REGEX]       List installed packages matching REGEX"
    echo "       fisher help              Show this help"
    echo "       fisher version           Show the current version"
    echo "       fisher self-update       Update to the latest version"
    echo "       fisher self-uninstall    Uninstall from your system"
    echo "examples:"
    echo "       fisher add jethrokuan/z rafaelrinaldi/pure"
    echo "       fisher add gitlab.com/foo/bar@v2"
    echo "       fisher add ~/path/to/local/pkg"
    echo "       fisher add < file"
    echo "       fisher rm rafaelrinaldi/pure"
    echo "       fisher ls | fisher rm"
    echo "       fisher ls fish-\*"
end

function _fisher_self_update -a file
    set -l url "https://raw.githubusercontent.com/jorgebucaran/fisher/master/fisher.fish"
    echo "fetching $url" >&2
    command curl -s "$url?nocache" >$file.

    set -l next_version (command awk 'NR == 1 { print $4 }' < $file.)
    switch "$next_version"
        case "" $fisher_version
            command rm -f $file.
            if test -z "$next_version"
                echo "fisher: cannot update fisher -- are you offline?" >&2
                return 1
            end
            echo "fisher is already up-to-date" >&2
        case \*
            echo "linking $file" | command sed "s|$HOME|~|" >&2
            command mv -f $file. $file
            source $file
            echo "updated to $fisher_version -- hooray!" >&2
            _fisher_complete
    end
end

function _fisher_self_uninstall
    for pkg in (_fisher_ls)
        _fisher_rm $pkg
    end

    for file in $fisher_cache $fisher_config $fisher_path/{functions,completions,conf.d}/fisher.fish $fisher_path/fishfile
        echo "removing $file"
        command rm -Rf $file 2>/dev/null
    end | command sed "s|$HOME|~|" >&2

    for name in (set -n | command awk '/^fisher_/')
        set -e "$name"
    end

    functions -e (functions -a | command awk '/^_fisher/') fisher
    complete -c fisher --erase
end

function _fisher_commit -a cmd
    set -e argv[1]
    set -l elapsed (_fisher_now)
    set -l fishfile $fisher_path/fishfile

    if test ! -e "$fishfile"
        command touch $fishfile
        echo "created new fishfile in $fishfile" | command sed "s|$HOME|~|" >&2
    end

    set -l rm_pkgs (_fisher_ls | _fisher_fmt)
    for pkg in (_fisher_ls)
        _fisher_rm $pkg
    end
    command rm -Rf $fisher_config
    command mkdir -p $fisher_config

    set -l next_pkgs (_fisher_fmt <$fishfile | _fisher_diff R $cmd (printf "%s\n" $argv | _fisher_fmt))
    set -l new_pkgs (_fisher_fetch $next_pkgs)
    set -l old_pkgs
    for pkg in $rm_pkgs
        if contains -- $pkg $new_pkgs
            set old_pkgs $old_pkgs $pkg
        end
    end

    if test -z "$new_pkgs$old_pkgs$rm_pkgs$next_pkgs"
        echo "nothing to commit -- try adding some packages" >&2
        return 1
    end

    set -l actual_pkgs
    if test "$cmd" = "rm"
        set actual_pkgs $next_pkgs
    else
        for pkg in $next_pkgs
            if contains -- (echo $pkg | command sed "s|@.*||") $new_pkgs
                set actual_pkgs $actual_pkgs $pkg
            end
        end
    end

    printf "%s\n" (_fisher_fmt <$fishfile | _fisher_diff W $cmd $actual_pkgs) >$fishfile

    _fisher_complete

    command awk -v N=(count $new_pkgs) -v O=(count $old_pkgs) -v R=(count $rm_pkgs) -v E=(_fisher_now $elapsed) '
        BEGIN {
            res = fmt("removed", R - O, fmt("updated", O, fmt("added", N - O)))
            printf((res ? res : "done") " in %.2fs\n", E / 1000)
        }
        function fmt(action, n, s) {
            return n ? (s ? s ", " : s) action " " n " package" (n > 1 ? "s" : "") : s
        }
    ' >&2
end

function _fisher_diff -a diff cmd
    set -e argv[1..2]
    command awk -v FS="[[:space:]]*#" -v DIFF="$diff" -v CMD="$cmd" -v ARGSTR="$argv" '
        BEGIN {
            for (n = split(ARGSTR, a, " "); i++ < n;) pkgs[getkey(a[i])] = a[i]
        }
        { k = getkey($1) }
        DIFF == "R" && !(k in pkgs) && $0 = $1
        DIFF == "W" && (/^#/ || !NF || (k in pkgs && $0 = pkgs[k]) || CMD != "rm")
        DIFF == "W" || CMD == "rm" { delete pkgs[k] }
        END {
            for (k in pkgs) {
                if (CMD != "rm" || DIFF == "W") print pkgs[k]
                else print "package not in fishfile: \""k"\"" > "/dev/stderr"
            }
        }
        function getkey(s,  a) {
            return (split(s, a, /@+|:/) > 2) ? a[2]"/"a[1]"/"a[3] : a[1]
        }
    '
end

function _fisher_fetch
    set -l pkg_jobs
    set -l next_pkgs
    set -l local_pkgs
    set -l actual_pkgs
    set -q fisher_user_api_token; and set -l curl_opts -u $fisher_user_api_token

    for i in $argv
        switch $i
            case \~\* /\*
                set -l path (echo "$i" | command sed "s|~|$HOME|")
                if test -e "$path"
                    set local_pkgs $local_pkgs $path
                else
                    echo "fisher: cannot add \"$i\" -- is this a valid file?" >&2
                end
                continue
        end

        command awk -v NAME=$i -v FS=/ '
            BEGIN {
                if (split(NAME, tmp, /@+|:/) > 2) {
                    if (tmp[4]) sub("@"tmp[4], "", NAME)
                    print NAME "\t" tmp[2]"/"tmp[1]"/"tmp[3] "\t" (tmp[4] ? tmp[4] : "master")
                } else {
                    pkg = split(NAME, _, "/") <= 2 ? "github.com/"tmp[1] : tmp[1]
                    tag = tmp[2] ? tmp[2] : "master"
                    print (\
                        pkg ~ /^github/ ? "https://codeload."pkg"/tar.gz/"tag : \
                        pkg ~ /^gitlab/ ? "https://"pkg"/-/archive/"tag"/"tmp[split(pkg, tmp, "/")]"-"tag".tar.gz" : \
                        pkg ~ /^bitbucket/ ? "https://"pkg"/get/"tag".tar.gz" : pkg \
                    ) "\t" pkg
                }
            }
        ' | read -l url pkg branch

        if test ! -d "$fisher_config/$pkg"
            fish -c "
                echo fetching $url >&2
                command mkdir -p $fisher_config/$pkg $fisher_cache/(command dirname $pkg)
                if test ! -z \"$branch\"
                     command git clone $url $fisher_config/$pkg --branch $branch --depth 1 2>/dev/null
                     or echo fisher: cannot clone \"$url\" -- is this a valid url\? >&2
                else if command curl $curl_opts -Ss $url 2>&1 | command tar -xzf- -C $fisher_config/$pkg 2>/dev/null
                    command rm -Rf $fisher_cache/$pkg
                    command mv -f $fisher_config/$pkg/* $fisher_cache/$pkg
                    command rm -Rf $fisher_config/$pkg
                    command cp -Rf {$fisher_cache,$fisher_config}/$pkg
                else if test -d \"$fisher_cache/$pkg\"
                    echo fisher: cannot connect to server -- searching in \"$fisher_cache/$pkg\" | command sed 's|$HOME|~|' >&2
                    command cp -Rf $fisher_cache/$pkg $fisher_config/$pkg/..
                else
                    command rm -Rf $fisher_config/$pkg
                    echo fisher: cannot add \"$pkg\" -- is this a valid package\? >&2
                end
            " >/dev/null &

            set pkg_jobs $pkg_jobs (_fisher_jobs --last)
            set next_pkgs $next_pkgs "$fisher_config/$pkg"
        end
    end

    if test ! -z "$pkg_jobs"
        _fisher_wait $pkg_jobs
        for pkg in $next_pkgs
            if test -d "$pkg"
                set actual_pkgs $actual_pkgs $pkg
                _fisher_add $pkg
            end
        end
    end

    set -l local_path $fisher_config/local/$USER
    for src in $local_pkgs
        command mkdir -p $local_path
        command ln -sf $src $local_path/(command basename $src)
        set actual_pkgs $actual_pkgs $src
        _fisher_add $src --link
    end

    if test ! -z "$actual_pkgs"
        _fisher_fetch (_fisher_deps $actual_pkgs | command awk '!seen[$0]++')
        printf "%s\n" $actual_pkgs | _fisher_fmt
    end
end

function _fisher_deps
    for pkg in $argv
        if test ! -d "$pkg"
            echo $pkg
        else if test -s "$pkg/fishfile"
            _fisher_deps (_fisher_fmt < $pkg/fishfile | _fisher_diff R)
        end
    end
end

function _fisher_add -a pkg opts
    set -l name (command basename $pkg)
    for src in $pkg/{functions,completions,conf.d}/**.* $pkg/*.fish
        set -l target (command basename $src)
        switch $src
            case $pkg/conf.d\*
                set target $fisher_path/conf.d/$target
            case $pkg/completions\*
                set target $fisher_path/completions/$target
            case $pkg/{functions,}\*
                switch $target
                    case uninstall.fish
                        continue
                    case init.fish key_bindings.fish
                        set target $fisher_path/conf.d/$name\_$target
                    case \*
                        set target $fisher_path/functions/$target
                end
        end
        echo "linking $target" | command sed "s|$HOME|~|" >&2
        if test -z "$opts"
            command cp -f $src $target
        else
            command ln -sf $src $target
        end
        switch $target
            case \*.fish
                source $target >/dev/null 2>/dev/null
        end
    end
end

function _fisher_rm -a pkg
    set -l name (command basename $pkg)
    for src in $pkg/{conf.d,completions,functions}/**.* $pkg/*.fish
        set -l target (command basename $src)
        set -l filename (command basename $target .fish)
        switch $src
            case $pkg/conf.d\*
                test "$filename.fish" = "$target"; and emit "$filename"_uninstall
                set target conf.d/$target
            case $pkg/completions\*
                test "$filename.fish" = "$target"; and complete -ec $filename
                set target completions/$target
            case $pkg/{,functions}\*
                test "$filename.fish" = "$target"; and functions -e $filename
                switch $target
                    case uninstall.fish
                        source $src
                        continue
                    case init.fish key_bindings.fish
                        set target conf.d/$name\_$target
                    case \*
                        set target functions/$target
                end
        end
        command rm -f $fisher_path/$target
    end
    if not functions -q fish_prompt
        source "$__fish_datadir$__fish_data_dir/functions/fish_prompt.fish"
    end
end

function _fisher_jobs
    jobs $argv | command awk '/^[0-9]+\t/ { print $1 }'
end

function _fisher_wait
    while for job in $argv
            contains -- $job (_fisher_jobs); and break
        end
    end
end

function _fisher_now -a elapsed
    switch (command uname)
        case Darwin \*BSD
            command perl -MTime::HiRes -e 'printf("%.0f\n", (Time::HiRes::time() * 1000) - $ARGV[0])' $elapsed
        case \*
            math (command date "+%s%3N") - "0$elapsed"
    end
end

A fish/functions/humanize_duration.fish => fish/functions/humanize_duration.fish +19 -0
@@ 0,0 1,19 @@
function humanize_duration -d "Make a time interval human readable"
    command awk '
        function hmTime(time,   stamp) {
            split("h:m:s:ms", units, ":")
            for (i = 2; i >= -1; i--) {
                if (t = int( i < 0 ? time % 1000 : time / (60 ^ i * 1000) % 60 )) {
                    stamp = stamp t units[sqrt((i - 2) ^ 2) + 1] " "
                }
            }
            if (stamp ~ /^ *$/) {
                return "0ms"
            }
            return substr(stamp, 1, length(stamp) - 1)
        }
        { 
            print hmTime($0) 
        }
    '
end

A fish/functions/ssh-ipp.fish => fish/functions/ssh-ipp.fish +4 -0
@@ 0,0 1,4 @@
# Defined in - @ line 1
function ssh-ipp --description 'alias ssh-ipp ssh josh@134.255.247.131'
	ssh josh@134.255.247.131 $argv;
end

D gtk-2.0/gtk.css => gtk-2.0/gtk.css +0 -28
@@ 1,28 0,0 @@
/* CSS variables
   Generated by 'wal' */
:root {
    --wallpaper: url("/home/josh/.config/wall.png");

    /* Special */
    --background: #0C151E;
    --foreground: #f1c19b;
    --cursor: #f1c19b;

    /* Colors */
    --color0: #0C151E;
    --color1: #8B5E3B;
    --color2: #96643D;
    --color3: #996741;
    --color4: #AF7243;
    --color5: #C37E47;
    --color6: #D4884B;
    --color7: #f1c19b;
    --color8: #a8876c;
    --color9: #8B5E3B;
    --color10: #96643D;
    --color11: #996741;
    --color12: #AF7243;
    --color13: #C37E47;
    --color14: #D4884B;
    --color15: #f1c19b;
}

D gtk-2.0/gtkfilechooser.ini => gtk-2.0/gtkfilechooser.ini +0 -11
@@ 1,11 0,0 @@
[Filechooser Settings]
LocationMode=path-bar
ShowHidden=true
ShowSizeColumn=true
GeometryX=0
GeometryY=0
GeometryWidth=1740
GeometryHeight=1305
SortColumn=name
SortOrder=ascending
StartupMode=recent

D gtk-3.0/gtk.css => gtk-3.0/gtk.css +0 -28
@@ 1,28 0,0 @@
/* CSS variables
   Generated by 'wal' */
:root {
    --wallpaper: url("/home/josh/.config/wall.png");

    /* Special */
    --background: #0C151E;
    --foreground: #f1c19b;
    --cursor: #f1c19b;

    /* Colors */
    --color0: #0C151E;
    --color1: #8B5E3B;
    --color2: #96643D;
    --color3: #996741;
    --color4: #AF7243;
    --color5: #C37E47;
    --color6: #D4884B;
    --color7: #f1c19b;
    --color8: #a8876c;
    --color9: #8B5E3B;
    --color10: #96643D;
    --color11: #996741;
    --color12: #AF7243;
    --color13: #C37E47;
    --color14: #D4884B;
    --color15: #f1c19b;
}

A vscode_extensions => vscode_extensions +20 -0
@@ 0,0 1,20 @@
code --install-extension bungcip.better-toml
code --install-extension Dart-Code.dart-code
code --install-extension Dart-Code.flutter
code --install-extension eamodio.gitlens
code --install-extension formulahendry.code-runner
code --install-extension JakeBecker.elixir-ls
code --install-extension jolaleye.horizon-theme-vscode
code --install-extension kalitaalexey.vscode-rust
code --install-extension konart.ciapre
code --install-extension liximomo.sftp
code --install-extension mikestead.dotenv
code --install-extension mjmcloug.vscode-elixir
code --install-extension ms-python.python
code --install-extension ms-vscode.cpptools
code --install-extension ms-vscode.Go
code --install-extension Nash.awesome-flutter-snippets
code --install-extension octref.vetur
code --install-extension rust-lang.rust
code --install-extension sammkj.vscode-elixir-formatter
code --install-extension TabNine.tabnine-vscode