[PR] dylanaraps/neofetch#2167 from walking-octopus - Add Ubuntu Touch support

Upstream PR: https://github.com/dylanaraps/neofetch/pull/2167
Thanks to @walking-octopus

Co-authored-by: walking-octopus <46994949+walking-octopus@users.noreply.github.com>
This commit is contained in:
Azalea (on HyDEV-Daisy) 2022-07-30 17:22:40 -04:00
commit cbf2e8dfb1

26
neofetch Executable file → Normal file
View file

@ -805,7 +805,7 @@ image_source="auto"
# SereneLinux, SharkLinux, Siduction, SkiffOS, Slackware, SliTaz, SmartOS,
# Solus, Source_Mage, Sparky, Star, SteamOS, SunOS, openSUSE_Leap, t2,
# openSUSE_Tumbleweed, openSUSE, SwagArch, Tails, Trisquel,
# Ubuntu-Cinnamon, Ubuntu-Budgie, Ubuntu-GNOME, Ubuntu-MATE,
# Ubuntu-Cinnamon, Ubuntu-Budgie, Ubuntu-GNOME, Ubuntu Touch, Ubuntu-MATE,
# Ubuntu-Studio, Ubuntu, Univalent, Univention, Venom, Void, VNux, LangitKetujuh, semc,
# Obarun, windows10, Windows7, Xubuntu, Zorin, and IRIX have ascii logos.
# NOTE: Arch, Ubuntu, Redhat, Fedora and Dragonfly have 'old' logo variants.
@ -1127,6 +1127,15 @@ get_distro() {
distro=$(trim_quotes "$distro")
distro=${distro/NAME=}
if [[ -f /usr/bin/system-image-cli ]]; then
local ut_ota
ut_ota=$(system-image-cli -i | awk '/version tag:/ { print $3 }');
distro="Ubuntu Touch $ut_ota";
# There's a weird UT bug where the HOSTNAME is set to android.
HOSTNAME=$(hostname);
fi
# Get Ubuntu flavor.
if [[ $distro == "Ubuntu"* ]]; then
case $XDG_CONFIG_DIRS in
@ -1553,6 +1562,7 @@ get_packages() {
has kiss && tot kiss l
has cpt-list && tot cpt-list
has pacman-key && tot pacman -Qq --color never
has click && tot click list
has dpkg && tot dpkg-query -f '.\n' -W
has xbps-query && tot xbps-query -l
has apk && tot apk info
@ -11030,6 +11040,20 @@ ${c4} `soooo. .oooo`
EOF
;;
"Ubuntu Touch"*)
set_colors 3 7
read -rd '' ascii_data <<'EOF'
${c1}
###############
## ##
## ${c2}##${c1} ${c2}##${c1} ##
## ${c2}##${c1} ${c2}#${c1} ${c2}#${c1} ${c2}##${c1} ##
## ${c2}###${c1} ##
## ##
###############
EOF
;;
"Ubuntu MATE"* | "Ubuntu-MATE"*)
set_colors 2 7
read -rd '' ascii_data <<'EOF'