aboutsummaryrefslogtreecommitdiffstats
path: root/gotrc-examples/lower-left-ponysay
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2026-02-22 13:50:59 +0100
committerMattias Andrée <m@maandree.se>2026-02-22 13:50:59 +0100
commit5593186c998c3f63c7abadd3eaa97e55004fc182 (patch)
tree29a236c52d30257ea67d933fbd7bdf14bc400258 /gotrc-examples/lower-left-ponysay
parentFix issue-file example, it stopped working (diff)
downloadgates-of-tartaros-5593186c998c3f63c7abadd3eaa97e55004fc182.tar.gz
gates-of-tartaros-5593186c998c3f63c7abadd3eaa97e55004fc182.tar.bz2
gates-of-tartaros-5593186c998c3f63c7abadd3eaa97e55004fc182.tar.xz
m fixesHEADmaster
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 'gotrc-examples/lower-left-ponysay')
-rw-r--r--gotrc-examples/lower-left-ponysay27
1 files changed, 12 insertions, 15 deletions
diff --git a/gotrc-examples/lower-left-ponysay b/gotrc-examples/lower-left-ponysay
index 62da1cc..387665f 100644
--- a/gotrc-examples/lower-left-ponysay
+++ b/gotrc-examples/lower-left-ponysay
@@ -2,7 +2,7 @@
# gates-of-tartaros – Minimal replacement for agetty with SSH support
#
-# Copyright © 2013, 2014, 2015 Mattias Andrée (maandree@member.fsf.org)
+# Copyright © 2013, 2014, 2015 Mattias Andrée (m@maandree.se)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -23,18 +23,15 @@
# as well as set a nice palette to the TTY.
-_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'
- 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: '
+_display () {
+ PALETTE="$(printf '\033]P0020840\033]P1CD656C\033]P232A679\033]P3CCAD47\033]P42495BE\033]P5A46EB0\033]P600A09F\033]P7D3D7CF\033]P8555753\033]P9EB5E6A\033]PA0EC287\033]PBF2CA38\033]PC00ACE0\033]PDC473D1\033]PE00C3C7\033]PFEEEEEE')"
+ printf '%s' "${PALETTE}"
+ printf '\033[H\033[2J'
+ pony="$(PONYSAY_SHELL_LINES=5 PONYSAY_KMS_PALETTE="${PALETTE}" ponysay -o <&2)"
+ lines=$(echo "${pony}" | wc -l)
+ height=$(stty size | cut -d ' ' -f 1)
+ printf '\033[%s;1H' "$(( $height - $lines + 1 ))"
+ printf '%s%s' "$(echo "${pony}" | sed -e 's:\x1b\[H\x1b\[2J::')" "${PALETTE}"
+ echo -e "\033[H\033[%sm%s (%s)\033[0m" "${ANSI_COLOR}" "${NAME}" "${tty}"
+ printf '\nLogin: '
}
-