diff options
| author | Mattias Andrée <maandree@operamail.com> | 2013-09-30 07:36:48 +0200 |
|---|---|---|
| committer | Mattias Andrée <maandree@operamail.com> | 2013-09-30 07:37:04 +0200 |
| commit | 493495a1fbe55dfae1a988a115c2a3ed9b6eaa4c (patch) | |
| tree | e49682dbef33abe090acf5987cb8694d518b6d1e /gotrc-examples/lower-left-ponysay | |
| parent | separate username reading and logging in (diff) | |
| download | gates-of-tartaros-493495a1fbe55dfae1a988a115c2a3ed9b6eaa4c.tar.gz gates-of-tartaros-493495a1fbe55dfae1a988a115c2a3ed9b6eaa4c.tar.bz2 gates-of-tartaros-493495a1fbe55dfae1a988a115c2a3ed9b6eaa4c.tar.xz | |
add another example rc file
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'gotrc-examples/lower-left-ponysay')
| -rw-r--r-- | gotrc-examples/lower-left-ponysay | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gotrc-examples/lower-left-ponysay b/gotrc-examples/lower-left-ponysay new file mode 100644 index 0000000..563790d --- /dev/null +++ b/gotrc-examples/lower-left-ponysay @@ -0,0 +1,21 @@ +# -*- 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=$'\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=$(wc -l <<< "${pony}") + height=$(stty size | cut -d ' ' -f 1) + echo -n $'\e['"$(( $height - $lines + 1 ));1H$(sed -e 's:\x1b\[H\x1b\[2J::' <<< "${pony}")${PALETTE}"$'\e[H' + echo -e "\e[${ANSI_COLOR}m${NAME} (${tty})\e[00m" + echo + echo -n 'Login: ' +} + |
