diff --git a/fish/prompt b/fish/prompt index 5277bbb..e4f0b3e 100644 --- a/fish/prompt +++ b/fish/prompt @@ -22,8 +22,8 @@ function fish_greeting if test -f /usr/share/dict/words && test (which shuf) set_color c50ed2 - echo "Word of the moment: "(shuf -n1 /usr/share/dict/words) | - awk -f $_agw_dir_rc/text/mid.awk col=$COLUMNS + 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 diff --git a/text/mid.awk b/text/mid.awk deleted file mode 100644 index f9832ac..0000000 --- a/text/mid.awk +++ /dev/null @@ -1,6 +0,0 @@ -{ - z = col - length - y = int(z / 2) - x = z - y - printf "%*s%s%*s\n", x, "", $0, y, "" -}