scripts/fish/prompt

39 lines
689 B
Fish

#!/usr/bin/env fish
function fish_prompt
set _stat $status
echo -n (set_color 70a9ff)(date +%H:%M:%S)
echo -n (set_color normal)(
if test $_stat -eq 0
echo '@'
else
echo '!'
end)
echo -n (
if test $_agw_chroot
set_color f54f4c
else
set_color c792ea
end)$hostname
echo (set_color normal)"% "
end
function fish_right_prompt
echo -n (set_color c3e88d)(pwd)
echo (set_color normal)
end
function fish_greeting
if test -f /usr/share/dict/words && test (which shuf) && test (which ruby)
set_color c50ed2
echo -n "Word of the moment: "(shuf -n1 /usr/share/dict/words) |
ruby -e 'puts $stdin.read.center ARGV[0].to_i' $COLUMNS
set_color normal
end
end
## EOF