Skip to content

Instantly share code, notes, and snippets.

@toastal
Last active June 27, 2018 03:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save toastal/d7383b8cd5d27d23fad3e88ac6c58cd9 to your computer and use it in GitHub Desktop.
Save toastal/d7383b8cd5d27d23fad3e88ac6c58cd9 to your computer and use it in GitHub Desktop.
# set -U fish_user_paths $fish_user_paths /sbin /usr/sbin /usr/local/sbin ~/bin ~/.node/bin ~/.local/bin
set -U fish_key_bindings fish_vi_key_bindings
set -x TERM xterm-256color
set -x VISUAL nvim
set -x EDITOR nvim
set -x NVIM_TUI_ENABLE_TRUE_COLOR 1
set -x GITHUB_AUTH_TOKEN 2f26b867e07c04b22f6b6e95c78288b86d6fe636
set -x GDK_DPI_SCALE 1.25
# fish git prompt
set __fish_git_prompt_showdirtystate 'yes'
set __fish_git_prompt_showstashstate 'yes'
set __fish_git_prompt_showupstream 'yes'
set __fish_git_prompt_color_branch yellow
set __fish_git_prompt_color_upstream_ahead green
set __fish_git_prompt_color_upstream_behind red
# Status Chars
set __fish_git_prompt_char_dirtystate '*'
set __fish_git_prompt_char_stagedstate '→'
set __fish_git_prompt_char_stashstate '='
set __fish_git_prompt_char_upstream_ahead '↑'
set __fish_git_prompt_char_upstream_behind '↓'
function fish_prompt
set last_status $status
printf 'λ '
#printf '☭ '
set_color $fish_color_cwd
printf '%s' (prompt_pwd)
set_color normal
printf '%s ' (__fish_git_prompt)
set_color normal
end
function fish_greeting
set_color grey
printf '%s' (whoami)
printf '@'
printf '%s' (hostname)
printf ' | '
printf '%s' (uname -o)
printf ' '
printf '%s' (uname -r)
printf ' | '
printf '%s' (cat /sys/class/power_supply/BAT0/capacity)
printf '%% | '
printf '%s' (date +'%T')
printf '\n'
set_color normal
end
function __node_binpath_cwd -v PWD
set -l node_modules_path "$PWD/node_modules/.bin"
if test -e "$node_modules_path"
set -g __node_binpath "$node_modules_path"
set -x PATH $PATH $__node_binpath
else
set -q __node_binpath
and set -l index (contains -i -- $__node_binpath $PATH)
and set -e PATH[$index]
and set -e __node_binpath
end
end
__node_binpath_cwd $PWD
test -s /home/toastal/.nvm-fish/nvm.fish; and source /home/toastal/.nvm-fish/nvm.fish
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment