1
0
Fork 0
scripts/fish/prompt

39 Zeilen
689 B
Plaintext

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)(
2020-11-15 13:03:33 -08:00
if test $_stat -eq 0
echo '@'
else
echo '!'
end)
echo -n (
if test $_agw_chroot
set_color f54f4c
else
set_color c792ea
end)$hostname
2019-07-29 03:36:13 -07:00
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