noted credits

main
Matej Nemček 2016-11-08 03:06:45 +01:00
parent 3548586519
commit cc6447f054
1 changed files with 39 additions and 37 deletions

View File

@ -1,21 +1,23 @@
set __toaster_color_orange FD971F # forked from Toaster https://github.com/oh-my-fish/theme-toaster
set __toaster_color_blue 6EC9DD
set __toaster_color_green A6E22E
set __toaster_color_yellow E6DB7E
set __toaster_color_pink F92672
set __toaster_color_grey 554F48
set __toaster_color_white F1F1F1
set __toaster_color_purple 9458FF
set __toaster_color_lilac AE81FF
function __toaster_color_echo set __slavic_color_orange FD971F
set __slavic_color_blue 6EC9DD
set __slavic_color_green A6E22E
set __slavic_color_yellow E6DB7E
set __slavic_color_pink F92672
set __slavic_color_grey 554F48
set __slavic_color_white F1F1F1
set __slavic_color_purple 9458FF
set __slavic_color_lilac AE81FF
function __slavic_color_echo
set_color $argv[1] set_color $argv[1]
if test (count $argv) -eq 2 if test (count $argv) -eq 2
echo -n $argv[2] echo -n $argv[2]
end end
end end
function __toaster_current_folder function __slavic_current_folder
if test $PWD = '/' if test $PWD = '/'
echo -n '/' echo -n '/'
else else
@ -23,51 +25,51 @@ function __toaster_current_folder
end end
end end
function __toaster_git_status_codes function __slavic_git_status_codes
echo (git status --porcelain ^/dev/null | sed -E 's/(^.{3}).*/\1/' | tr -d ' \n') echo (git status --porcelain ^/dev/null | sed -E 's/(^.{3}).*/\1/' | tr -d ' \n')
end end
function __toaster_git_branch_name function __slavic_git_branch_name
echo (git rev-parse --abbrev-ref HEAD ^/dev/null) echo (git rev-parse --abbrev-ref HEAD ^/dev/null)
end end
function __toaster_rainbow function __slavic_rainbow
if echo $argv[1] | grep -q -e $argv[3] if echo $argv[1] | grep -q -e $argv[3]
__toaster_color_echo $argv[2] "彡ミ" __slavic_color_echo $argv[2] "彡ミ"
end end
end end
function __toaster_git_status_icons function __slavic_git_status_icons
set -l git_status (__toaster_git_status_codes) set -l git_status (__slavic_git_status_codes)
__toaster_rainbow $git_status $__toaster_color_pink 'D' __slavic_rainbow $git_status $__slavic_color_pink 'D'
__toaster_rainbow $git_status $__toaster_color_orange 'R' __slavic_rainbow $git_status $__slavic_color_orange 'R'
__toaster_rainbow $git_status $__toaster_color_white 'C' __slavic_rainbow $git_status $__slavic_color_white 'C'
__toaster_rainbow $git_status $__toaster_color_green 'A' __slavic_rainbow $git_status $__slavic_color_green 'A'
__toaster_rainbow $git_status $__toaster_color_blue 'U' __slavic_rainbow $git_status $__slavic_color_blue 'U'
__toaster_rainbow $git_status $__toaster_color_lilac 'M' __slavic_rainbow $git_status $__slavic_color_lilac 'M'
__toaster_rainbow $git_status $__toaster_color_grey '?' __slavic_rainbow $git_status $__slavic_color_grey '?'
end end
function __toaster_git_status function __slavic_git_status
# In git # In git
if test -n (__toaster_git_branch_name) if test -n (__slavic_git_branch_name)
__toaster_color_echo $__toaster_color_blue " ☭ " __slavic_color_echo $__slavic_color_blue " ☭ "
__toaster_color_echo $__toaster_color_white (__toaster_git_branch_name) __slavic_color_echo $__slavic_color_white (__slavic_git_branch_name)
if test -n (__toaster_git_status_codes) if test -n (__slavic_git_status_codes)
__toaster_color_echo $__toaster_color_pink ' ●' __slavic_color_echo $__slavic_color_pink ' ●'
__toaster_color_echo $__toaster_color_white ' (^._.^)ノ' __slavic_color_echo $__slavic_color_white ' (^._.^)ノ'
__toaster_git_status_icons __slavic_git_status_icons
else else
__toaster_color_echo $__toaster_color_green ' ○' __slavic_color_echo $__slavic_color_green ' ○'
end end
end end
end end
function fish_prompt function fish_prompt
__toaster_color_echo $__toaster_color_blue "" __slavic_color_echo $__slavic_color_blue ""
printf '[' printf '['
switch $fish_bind_mode switch $fish_bind_mode
case default case default
@ -82,9 +84,9 @@ function fish_prompt
end end
set_color normal set_color normal
printf '] ' printf '] '
__toaster_color_echo $__toaster_color_purple (prompt_pwd) __slavic_color_echo $__slavic_color_purple (prompt_pwd)
__toaster_git_status __slavic_git_status
echo echo
__toaster_color_echo $__toaster_color_pink "⫸ " __slavic_color_echo $__slavic_color_pink "⫸ "
end end