scripts/fish/prompt

33 lines
638 B
Plaintext
Raw Normal View History

2019-08-18 06:26:48 -07:00
#!/usr/bin/env fish
2019-06-24 06:23:58 -07:00
function fish_prompt
2019-08-15 20:39:12 -07:00
set _stat $status
2019-07-29 03:36:13 -07:00
echo -n (set_color 70a9ff)(date +%H:%M:%S)
2019-08-15 20:39:12 -07:00
echo -n (set_color normal)(
if test $_stat -eq 0
echo '@'
else
echo '!'
end)
2019-07-29 03:36:13 -07:00
echo -n (set_color c792ea)$hostname
echo (set_color normal)"% "
2019-06-24 06:23:58 -07:00
end
function fish_right_prompt
2019-07-29 03:36:13 -07:00
echo -n (set_color c3e88d)(pwd)
echo (set_color normal)
2019-06-24 06:23:58 -07:00
end
function fish_greeting
if test -f /usr/share/dict/words && test (which shuf) && test (which ruby)
set_color c50ed2
2019-06-25 16:13:32 -07:00
echo -n "Word of the moment: "(shuf -n1 /usr/share/dict/words) |
ruby -e 'puts $stdin.read.center ARGV[0].to_i' $COLUMNS
2019-06-25 16:13:32 -07:00
set_color normal
end
2019-06-24 06:23:58 -07:00
end
## EOF