Update greet function
This commit is contained in:
parent
46e2f06928
commit
4669dc7353
|
@ -1,17 +1,22 @@
|
|||
function fish_greeting
|
||||
echo ' '(set_color F00)'___
|
||||
___======____='(set_color FF7F00)'-'(set_color FF0)'-'(set_color FF7F00)'-='(set_color F00)')
|
||||
/T \_'(set_color FF0)'--='(set_color FF7F00)'=='(set_color F00)') '(set_color red)(whoami)'@'(hostname)'
|
||||
[ \ '(set_color FF7F00)'('(set_color FF0)'0'(set_color FF7F00)') '(set_color F00)'\~ \_'(set_color FF0)'-='(set_color FF7F00)'='(set_color F00)')'(set_color yellow)' Uptime:'(set_color white)(uptime | sed 's/.*up \([^,]*\), .*/\1/')(set_color red)'
|
||||
\ / )J'(set_color FF7F00)'~~ \\'(set_color FF0)'-='(set_color F00)') Theme: '(set_color white)(echo $fish_theme)(set_color red)'
|
||||
\\\\___/ )JJ'(set_color FF7F00)'~'(set_color FF0)'~~ '(set_color F00)'\) '(set_color yellow)'Version: '(set_color white)(echo $FISH_VERSION)(set_color red)'
|
||||
\_____/JJJ'(set_color FF7F00)'~~'(set_color FF0)'~~ '(set_color F00)'\\
|
||||
'(set_color FF7F00)'/ '(set_color FF0)'\ '(set_color FF0)', \\'(set_color F00)'J'(set_color FF7F00)'~~~'(set_color FF0)'~~ '(set_color FF7F00)'\\
|
||||
(-'(set_color FF0)'\)'(set_color F00)'\='(set_color FF7F00)'|'(set_color FF0)'\\\\\\'(set_color FF7F00)'~~'(set_color FF0)'~~ '(set_color FF7F00)'L_'(set_color FF0)'_
|
||||
'(set_color FF7F00)'('(set_color F00)'\\'(set_color FF7F00)'\\) ('(set_color FF0)'\\'(set_color FF7F00)'\\\)'(set_color F00)'_ '(set_color FF0)'\=='(set_color FF7F00)'__
|
||||
'(set_color F00)'\V '(set_color FF7F00)'\\\\'(set_color F00)'\) =='(set_color FF7F00)'=_____ '(set_color FF0)'\\\\\\\\'(set_color FF7F00)'\\\\
|
||||
'(set_color F00)'\V) \_) '(set_color FF7F00)'\\\\'(set_color FF0)'\\\\JJ\\'(set_color FF7F00)'J\)
|
||||
'(set_color F00)'/'(set_color FF7F00)'J'(set_color FF0)'\\'(set_color FF7F00)'J'(set_color F00)'T\\'(set_color FF7F00)'JJJ'(set_color F00)'J)
|
||||
(J'(set_color FF7F00)'JJ'(set_color F00)'| \UUU)
|
||||
(UU)'(set_color normal)
|
||||
function table_row -a COLOR KEY VAL LEN
|
||||
set -l repeats (math $LEN - (string length $KEY) - (string length $VAL) - 2)
|
||||
echo (set_color $COLOR)$KEY(set_color normal) \
|
||||
(set_color grey)(string repeat '.' -n $repeats) \
|
||||
(set_color -i brwhite)$VAL(set_color normal)
|
||||
end
|
||||
|
||||
function fish_greeting
|
||||
set -l user (whoami)@(hostname)
|
||||
set -l uptime (uptime | sed 's/.*up \([^,]*\), .*/\1/')
|
||||
set -l shell_version (echo $FISH_VERSION)
|
||||
set -l date (date)
|
||||
|
||||
set -l len (math $COLUMNS - 2)
|
||||
|
||||
echo (string repeat '░' -n $COLUMNS)
|
||||
set_color grey; echo 1 (table_row brblue 'CURRENT USER' $user $len)
|
||||
set_color grey; echo 2 (table_row brmagenta 'DATE' $date $len)
|
||||
set_color grey; echo 3 (table_row brcyan 'SHELL VERSION' fish-$shell_version $len)
|
||||
set_color grey; echo 4 (table_row bryellow 'RUST' (rustc --version) $len)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue