From 29d22a10240161987878e68a90d71a5c8222592a Mon Sep 17 00:00:00 2001 From: Andrew Stowell Date: Thu, 28 Aug 2025 16:31:00 -0400 Subject: [PATCH] ascii-image-converter, along with alias "show" to setup scripts. --- setup/1-choose-packages.sh | 17 +++++++++++++++++ setup/2-config.sh | 22 ++++++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/setup/1-choose-packages.sh b/setup/1-choose-packages.sh index 24a6ad7..0a62a25 100755 --- a/setup/1-choose-packages.sh +++ b/setup/1-choose-packages.sh @@ -221,6 +221,23 @@ fi # ---------------------------------------------------------- +read -p 'Install ascii-image-converter? [y/N]: ' response +case "${response}" in + [Yy]* ) + echo \ + 'deb [trusted=yes] https://apt.fury.io/ascii-image-converter/ /' | \ + sudo tee /etc/apt/sources.list.d/ascii-image-converter.list > /dev/null + sudo apt update + sudo apt install -y ascii-image-converter + ;; + * ) + echo 'Skipping' + ;; +esac +echo '' + +# ---------------------------------------------------------- + if [ "${show_note}" = true ]; then echo -e "\e[33myou will need to logout and back in before the 'docker' group will show up" echo '' diff --git a/setup/2-config.sh b/setup/2-config.sh index 9ae9f55..c72307c 100755 --- a/setup/2-config.sh +++ b/setup/2-config.sh @@ -287,6 +287,28 @@ echo '' # ---------------------------------------------------------- +if [[ -n $(command -v 'ascii-image-converter') ]]; then + read -p 'Set up alias "show" to call ascii-image-converter? [y/N]: ' response + case "${response}" in + [Yy]* ) + make_bashrc_backup + ( cat << 'TERM' + +# ABS make show command ASCII print the given file +alias show='ascii-image-converter --color --braille --full --color-bg' + +TERM +) >> "${HOME}/.bashrc" + ;; + * ) + echo 'Skipping' + ;; + esac + echo '' +fi + +# ---------------------------------------------------------- + if [ "${called_backup}" = true ]; then echo -e "\e[33mremember some changes will not take effect until you run:" echo -e "\e[36msource ~/.bashrc\e[m"