From 5593186c998c3f63c7abadd3eaa97e55004fc182 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 22 Feb 2026 13:50:59 +0100 Subject: m fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- gotrc-examples/lower-left-ponysay | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) (limited to 'gotrc-examples/lower-left-ponysay') 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: ' } - -- cgit v1.2.3-70-g09d2