Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Add Ubuntu Touch support #2167

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 26 additions & 2 deletions neofetch
Original file line number Diff line number Diff line change
Expand Up @@ -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, 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.
Expand Down Expand Up @@ -1124,6 +1124,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
Expand Down Expand Up @@ -1235,7 +1244,7 @@ get_distro() {
get_model() {
case $os in
Linux)
if [[ -d /system/app/ && -d /system/priv-app ]]; then
if [[ -d /android/system/ || -d /system/app/ ]]; then
model="$(getprop ro.product.brand) $(getprop ro.product.model)"

elif [[ -f /sys/devices/virtual/dmi/id/board_vendor ||
Expand Down Expand Up @@ -1549,6 +1558,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
Expand Down Expand Up @@ -10939,6 +10949,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'
Expand Down