blob: 686535a443afce776a68317c048f498e5f7528e7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# -*- shell-script -*-
# This requires KMS support and that the packages ponysay and util-say are installed.
# It will print a random pony (not speech bubble) in the lower left corner of the screen,
# as well as set a nice palette to the TTY and set up to use block cursor.
function _display
{
PALETTE=$(echo -e '\e]P0020840\e]P1CD656C\e]P232A679\e]P3CCAD47\e]P42495BE\e]P5A46EB0\e]P600A09F\e]P7D3D7CF\e]P8555753\e]P9EB5E6A\e]PA0EC287\e]PBF2CA38\e]PC00ACE0\e]PDC473D1\e]PE00C3C7\e]PFEEEEEE')
echo -n "${PALETTE}"
echo -en '\e[H\e[2J\e[?8c'
pony="$(PONYSAY_SHELL_LINES=5 PONYSAY_KMS_PALETTE="${PALETTE}" ponysay -o <&2)"
lines=$(echo "${pony}" | wc -l)
height=$(stty size | cut -d ' ' -f 1)
echo -en $'\e['"$(( $height - $lines + 1 ));1H"
echo -n "$(echo "${pony}" | sed -e 's:\x1b\[H\x1b\[2J::')${PALETTE}"
echo -e "\e[H\e[${ANSI_COLOR}m${NAME} (${tty})\e[00m"
echo
echo -n 'Login: '
}
|