dotfiles

My personal dotfiles 💠️

fish_logo.fish (1645B)

      1 function fish_logo \
      2     --description="Fish-shell colorful ASCII-art logo" \
      3     --argument-names outer_color medium_color inner_color mouth eye
      4 
      5     # defaults:
      6     [ $outer_color  ]; or set outer_color  'red'
      7     [ $medium_color ]; or set medium_color 'f70'
      8     [ $inner_color  ]; or set inner_color  'yellow'
      9     [ $mouth ]; or set mouth '['
     10     [ $eye   ]; or set eye   'O'
     11 
     12     set usage 'Usage: fish_logo <outer_color> <medium_color> <inner_color> <mouth> <eye>
     13 See set_color --help for more on available colors.'
     14 
     15     if contains -- $outer_color '--help' '-h' '-help'
     16         echo $usage
     17         return 0
     18     end
     19 
     20     # shortcuts:
     21     set o (set_color $outer_color)
     22     set m (set_color $medium_color)
     23     set i (set_color $inner_color)
     24 
     25     if test (count $o) != 1; or test (count $m) != 1; or test (count $i) != 1
     26         echo 'Invalid color argument'
     27         echo $usage
     28         return 1
     29     end
     30 
     31     echo '                 '$o'___
     32   ___======____='$m'-'$i'-'$m'-='$o')
     33 /T            \_'$i'--='$m'=='$o')
     34 '$mouth' \ '$m'('$i$eye$m')   '$o'\~    \_'$i'-='$m'='$o')
     35  \      / )J'$m'~~    '$o'\\'$i'-='$o')
     36   \\\\___/  )JJ'$m'~'$i'~~   '$o'\)
     37    \_____/JJJ'$m'~~'$i'~~    '$o'\\
     38    '$m'/ '$o'\  '$i', \\'$o'J'$m'~~~'$i'~~     '$m'\\
     39   (-'$i'\)'$o'\='$m'|'$i'\\\\\\'$m'~~'$i'~~       '$m'L_'$i'_
     40   '$m'('$o'\\'$m'\\)  ('$i'\\'$m'\\\)'$o'_           '$i'\=='$m'__
     41    '$o'\V    '$m'\\\\'$o'\) =='$m'=_____   '$i'\\\\\\\\'$m'\\\\
     42           '$o'\V)     \_) '$m'\\\\'$i'\\\\JJ\\'$m'J\)
     43                       '$o'/'$m'J'$i'\\'$m'J'$o'T\\'$m'JJJ'$o'J)
     44                       (J'$m'JJ'$o'| \UUU)
     45                        (UU)'(set_color normal)
     46 end