diff --git a/.config/fish/functions/fish_prompt.fish b/.config/fish/functions/fish_prompt.fish new file mode 100644 index 0000000..75a7662 --- /dev/null +++ b/.config/fish/functions/fish_prompt.fish @@ -0,0 +1,39 @@ +function fish_prompt --description 'Write out the prompt' + + # Just calculate these once, to save a few cycles when displaying the prompt + if not set -q __fish_prompt_hostname + set -g __fish_prompt_hostname (hostname|cut -d . -f 1) + end + + if not set -q __fish_prompt_normal + set -g __fish_prompt_normal (set_color normal) + end + + switch $USER + + case root + + if not set -q __fish_prompt_cwd + if set -q fish_color_cwd_root + set -g __fish_prompt_cwd (set_color $fish_color_cwd_root) + else + set -g __fish_prompt_cwd (set_color $fish_color_cwd) + end + end + + echo -n -s (set_color red) "$USER" (set_color normal) @ (set_color green) "$__fish_prompt_hostname" (set_color normal) ':[' "$__fish_prompt_cwd" (prompt_pwd) "$__fish_prompt_normal" ']' + echo + echo -n '# ' + + case '*' + + if not set -q __fish_prompt_cwd + set -g __fish_prompt_cwd (set_color $fish_color_cwd) + end + + echo -n -s (set_color green) "$USER" (set_color normal) @ (set_color green) "$__fish_prompt_hostname" (set_color normal) ':[' "$__fish_prompt_cwd" (prompt_pwd) "$__fish_prompt_normal" ']' + echo + echo -n '> ' + + end +end diff --git a/.gitmodules b/.gitmodules index ad98fb7..44b922e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -52,3 +52,9 @@ [submodule ".vim/bundle/DrawIt"] path = .vim/bundle/DrawIt url = https://github.com/vim-scripts/DrawIt.git +[submodule ".vim/bundle/vim-multiple-cursors"] + path = .vim/bundle/vim-multiple-cursors + url = https://github.com/terryma/vim-multiple-cursors +[submodule ".vim/bundle/fish-syntax"] + path = .vim/bundle/fish-syntax + url = https://github.com/vim-scripts/fish-syntax diff --git a/.vim/bundle/fish-syntax b/.vim/bundle/fish-syntax new file mode 160000 index 0000000..34883e2 --- /dev/null +++ b/.vim/bundle/fish-syntax @@ -0,0 +1 @@ +Subproject commit 34883e28bbc021eae07d85f259150c4d5797457e diff --git a/.vim/bundle/vim-multiple-cursors b/.vim/bundle/vim-multiple-cursors new file mode 160000 index 0000000..714e92b --- /dev/null +++ b/.vim/bundle/vim-multiple-cursors @@ -0,0 +1 @@ +Subproject commit 714e92bef48386ad1a42e22decfaca1f379b4716