From 65e0ed690a6c1575580353c3c95793bf824f1173 Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Sat, 27 Jan 2018 23:55:36 -0500 Subject: [PATCH] Add base fish config, managed with stow --- stow/fish/.config/fish/config.fish | 22 ++++++++++++++++ .../.config/fish/functions/fish_prompt.fish | 25 +++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 stow/fish/.config/fish/config.fish create mode 100644 stow/fish/.config/fish/functions/fish_prompt.fish diff --git a/stow/fish/.config/fish/config.fish b/stow/fish/.config/fish/config.fish new file mode 100644 index 00000000..8ee0c606 --- /dev/null +++ b/stow/fish/.config/fish/config.fish @@ -0,0 +1,22 @@ +#set -U fish_greeting "" +#set -U fish_history "" +#set -U fish_user_paths +#set -U BROWSER "waterfox" + +fish_vi_key_bindings + +alias c="clear" +alias cf="tput reset" +alias pls="sudo" +alias rm="rm -i" +alias mkdir="mkdir -p" + +alias exa="exa --group-directories-first" +alias ls="exa" +alias l="ls -l" +alias lsa="ls -a" +alias tree="exa --long --tree" +alias t="tree -L 1" + +alias todo="rg TODO" +alias pwd="pwd | sed -e 's!$HOME!~!g'" diff --git a/stow/fish/.config/fish/functions/fish_prompt.fish b/stow/fish/.config/fish/functions/fish_prompt.fish new file mode 100644 index 00000000..3e5e4463 --- /dev/null +++ b/stow/fish/.config/fish/functions/fish_prompt.fish @@ -0,0 +1,25 @@ +function fish_prompt + set -l color_cwd + set -l suffix + set host (prompt_hostname) + set pwd (basename $PWD) + if [ $pwd = $USER ] + set pwd "~" + end + switch "$USER" + case root toor + if set -q fish_color_cwd_root + set color_cwd $fish_color_cwd_root + else + set color_cwd $fish_color_cwd + end + set suffix '#' + case '*' + set color_cwd $fish_color_cwd + set suffix "" + end + + # $USER@$host + echo -n "$pwd ➤➤➤ " +end +