1#!/usr/bin/env bash
2# vim: noai:ts=4:sw=4:expandtab
3# shellcheck source=/dev/null
4# shellcheck disable=2009
5#
6# Neofetch: A command-line system information tool written in bash 3.2+.
7# https://github.com/dylanaraps/neofetch
8#
9# The MIT License (MIT)
10#
11# Copyright (c) 2015-2020 Dylan Araps
12#
13# Permission is hereby granted, free of charge, to any person obtaining a copy
14# of this software and associated documentation files (the "Software"), to deal
15# in the Software without restriction, including without limitation the rights
16# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17# copies of the Software, and to permit persons to whom the Software is
18# furnished to do so, subject to the following conditions:
19#
20# The above copyright notice and this permission notice shall be included in all
21# copies or substantial portions of the Software.
22#
23# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29# SOFTWARE.
30
31version=7.1.0
32
33# Fallback to a value of '5' for shells which support bash
34# but do not set the 'BASH_' shell variables (osh).
35bash_version=${BASH_VERSINFO[0]:-5}
36shopt -s eval_unsafe_arith &>/dev/null
37
38sys_locale=${LANG:-C}
39XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-${HOME}/.config}
40PATH=$PATH:/usr/xpg4/bin:/usr/sbin:/sbin:/usr/etc:/usr/libexec
41reset='\e[0m'
42shopt -s nocasematch
43
44# Speed up script by not using unicode.
45LC_ALL=C
46LANG=C
47
48# Fix issues with gsettings.
49export GIO_EXTRA_MODULES=/usr/lib/x86_64-linux-gnu/gio/modules/
50
51# Neofetch default config.
52read -rd '' config <<'EOF'
53# See this wiki page for more info:
54# https://github.com/dylanaraps/neofetch/wiki/Customizing-Info
55print_info() {
56    info title
57    info underline
58
59    info "OS" distro
60    info "Host" model
61    info "Kernel" kernel
62    info "Uptime" uptime
63    info "Packages" packages
64    info "Shell" shell
65    info "Resolution" resolution
66    info "DE" de
67    info "WM" wm
68    info "WM Theme" wm_theme
69    info "Theme" theme
70    info "Icons" icons
71    info "Terminal" term
72    info "Terminal Font" term_font
73    info "CPU" cpu
74    info "GPU" gpu
75    info "Memory" memory
76
77    # info "GPU Driver" gpu_driver  # Linux/macOS only
78    # info "CPU Usage" cpu_usage
79    # info "Disk" disk
80    # info "Battery" battery
81    # info "Font" font
82    # info "Song" song
83    # [[ "$player" ]] && prin "Music Player" "$player"
84    # info "Local IP" local_ip
85    # info "Public IP" public_ip
86    # info "Users" users
87    # info "Locale" locale  # This only works on glibc systems.
88
89    info cols
90}
91
92# Title
93
94
95# Hide/Show Fully qualified domain name.
96#
97# Default:  'off'
98# Values:   'on', 'off'
99# Flag:     --title_fqdn
100title_fqdn="off"
101
102
103# Kernel
104
105
106# Shorten the output of the kernel function.
107#
108# Default:  'on'
109# Values:   'on', 'off'
110# Flag:     --kernel_shorthand
111# Supports: Everything except *BSDs (except PacBSD and PC-BSD)
112#
113# Example:
114# on:  '4.8.9-1-ARCH'
115# off: 'Linux 4.8.9-1-ARCH'
116kernel_shorthand="on"
117
118
119# Distro
120
121
122# Shorten the output of the distro function
123#
124# Default:  'off'
125# Values:   'on', 'tiny', 'off'
126# Flag:     --distro_shorthand
127# Supports: Everything except Windows and Haiku
128distro_shorthand="off"
129
130# Show/Hide OS Architecture.
131# Show 'x86_64', 'x86' and etc in 'Distro:' output.
132#
133# Default: 'on'
134# Values:  'on', 'off'
135# Flag:    --os_arch
136#
137# Example:
138# on:  'Arch Linux x86_64'
139# off: 'Arch Linux'
140os_arch="on"
141
142
143# Uptime
144
145
146# Shorten the output of the uptime function
147#
148# Default: 'on'
149# Values:  'on', 'tiny', 'off'
150# Flag:    --uptime_shorthand
151#
152# Example:
153# on:   '2 days, 10 hours, 3 mins'
154# tiny: '2d 10h 3m'
155# off:  '2 days, 10 hours, 3 minutes'
156uptime_shorthand="on"
157
158
159# Memory
160
161
162# Show memory pecentage in output.
163#
164# Default: 'off'
165# Values:  'on', 'off'
166# Flag:    --memory_percent
167#
168# Example:
169# on:   '1801MiB / 7881MiB (22%)'
170# off:  '1801MiB / 7881MiB'
171memory_percent="off"
172
173# Change memory output unit.
174#
175# Default: 'mib'
176# Values:  'kib', 'mib', 'gib'
177# Flag:    --memory_unit
178#
179# Example:
180# kib  '1020928KiB / 7117824KiB'
181# mib  '1042MiB / 6951MiB'
182# gib: ' 0.98GiB / 6.79GiB'
183memory_unit="mib"
184
185
186# Packages
187
188
189# Show/Hide Package Manager names.
190#
191# Default: 'tiny'
192# Values:  'on', 'tiny' 'off'
193# Flag:    --package_managers
194#
195# Example:
196# on:   '998 (pacman), 8 (flatpak), 4 (snap)'
197# tiny: '908 (pacman, flatpak, snap)'
198# off:  '908'
199package_managers="on"
200
201
202# Shell
203
204
205# Show the path to $SHELL
206#
207# Default: 'off'
208# Values:  'on', 'off'
209# Flag:    --shell_path
210#
211# Example:
212# on:  '/bin/bash'
213# off: 'bash'
214shell_path="off"
215
216# Show $SHELL version
217#
218# Default: 'on'
219# Values:  'on', 'off'
220# Flag:    --shell_version
221#
222# Example:
223# on:  'bash 4.4.5'
224# off: 'bash'
225shell_version="on"
226
227
228# CPU
229
230
231# CPU speed type
232#
233# Default: 'bios_limit'
234# Values: 'scaling_cur_freq', 'scaling_min_freq', 'scaling_max_freq', 'bios_limit'.
235# Flag:    --speed_type
236# Supports: Linux with 'cpufreq'
237# NOTE: Any file in '/sys/devices/system/cpu/cpu0/cpufreq' can be used as a value.
238speed_type="bios_limit"
239
240# CPU speed shorthand
241#
242# Default: 'off'
243# Values: 'on', 'off'.
244# Flag:    --speed_shorthand
245# NOTE: This flag is not supported in systems with CPU speed less than 1 GHz
246#
247# Example:
248# on:    'i7-6500U (4) @ 3.1GHz'
249# off:   'i7-6500U (4) @ 3.100GHz'
250speed_shorthand="off"
251
252# Enable/Disable CPU brand in output.
253#
254# Default: 'on'
255# Values:  'on', 'off'
256# Flag:    --cpu_brand
257#
258# Example:
259# on:   'Intel i7-6500U'
260# off:  'i7-6500U (4)'
261cpu_brand="on"
262
263# CPU Speed
264# Hide/Show CPU speed.
265#
266# Default: 'on'
267# Values:  'on', 'off'
268# Flag:    --cpu_speed
269#
270# Example:
271# on:  'Intel i7-6500U (4) @ 3.1GHz'
272# off: 'Intel i7-6500U (4)'
273cpu_speed="on"
274
275# CPU Cores
276# Display CPU cores in output
277#
278# Default: 'logical'
279# Values:  'logical', 'physical', 'off'
280# Flag:    --cpu_cores
281# Support: 'physical' doesn't work on BSD.
282#
283# Example:
284# logical:  'Intel i7-6500U (4) @ 3.1GHz' (All virtual cores)
285# physical: 'Intel i7-6500U (2) @ 3.1GHz' (All physical cores)
286# off:      'Intel i7-6500U @ 3.1GHz'
287cpu_cores="logical"
288
289# CPU Temperature
290# Hide/Show CPU temperature.
291# Note the temperature is added to the regular CPU function.
292#
293# Default: 'off'
294# Values:  'C', 'F', 'off'
295# Flag:    --cpu_temp
296# Supports: Linux, BSD
297# NOTE: For FreeBSD and NetBSD-based systems, you'll need to enable
298#       coretemp kernel module. This only supports newer Intel processors.
299#
300# Example:
301# C:   'Intel i7-6500U (4) @ 3.1GHz [27.2°C]'
302# F:   'Intel i7-6500U (4) @ 3.1GHz [82.0°F]'
303# off: 'Intel i7-6500U (4) @ 3.1GHz'
304cpu_temp="off"
305
306
307# GPU
308
309
310# Enable/Disable GPU Brand
311#
312# Default: 'on'
313# Values:  'on', 'off'
314# Flag:    --gpu_brand
315#
316# Example:
317# on:  'AMD HD 7950'
318# off: 'HD 7950'
319gpu_brand="on"
320
321# Which GPU to display
322#
323# Default: 'all'
324# Values:  'all', 'dedicated', 'integrated'
325# Flag:    --gpu_type
326# Supports: Linux
327#
328# Example:
329# all:
330#   GPU1: AMD HD 7950
331#   GPU2: Intel Integrated Graphics
332#
333# dedicated:
334#   GPU1: AMD HD 7950
335#
336# integrated:
337#   GPU1: Intel Integrated Graphics
338gpu_type="all"
339
340
341# Resolution
342
343
344# Display refresh rate next to each monitor
345# Default: 'off'
346# Values:  'on', 'off'
347# Flag:    --refresh_rate
348# Supports: Doesn't work on Windows.
349#
350# Example:
351# on:  '1920x1080 @ 60Hz'
352# off: '1920x1080'
353refresh_rate="off"
354
355
356# Gtk Theme / Icons / Font
357
358
359# Shorten output of GTK Theme / Icons / Font
360#
361# Default: 'off'
362# Values:  'on', 'off'
363# Flag:    --gtk_shorthand
364#
365# Example:
366# on:  'Numix, Adwaita'
367# off: 'Numix [GTK2], Adwaita [GTK3]'
368gtk_shorthand="off"
369
370
371# Enable/Disable gtk2 Theme / Icons / Font
372#
373# Default: 'on'
374# Values:  'on', 'off'
375# Flag:    --gtk2
376#
377# Example:
378# on:  'Numix [GTK2], Adwaita [GTK3]'
379# off: 'Adwaita [GTK3]'
380gtk2="on"
381
382# Enable/Disable gtk3 Theme / Icons / Font
383#
384# Default: 'on'
385# Values:  'on', 'off'
386# Flag:    --gtk3
387#
388# Example:
389# on:  'Numix [GTK2], Adwaita [GTK3]'
390# off: 'Numix [GTK2]'
391gtk3="on"
392
393
394# IP Address
395
396
397# Website to ping for the public IP
398#
399# Default: 'http://ident.me'
400# Values:  'url'
401# Flag:    --ip_host
402public_ip_host="http://ident.me"
403
404# Public IP timeout.
405#
406# Default: '2'
407# Values:  'int'
408# Flag:    --ip_timeout
409public_ip_timeout=2
410
411
412# Desktop Environment
413
414
415# Show Desktop Environment version
416#
417# Default: 'on'
418# Values:  'on', 'off'
419# Flag:    --de_version
420de_version="on"
421
422
423# Disk
424
425
426# Which disks to display.
427# The values can be any /dev/sdXX, mount point or directory.
428# NOTE: By default we only show the disk info for '/'.
429#
430# Default: '/'
431# Values:  '/', '/dev/sdXX', '/path/to/drive'.
432# Flag:    --disk_show
433#
434# Example:
435# disk_show=('/' '/dev/sdb1'):
436#      'Disk (/): 74G / 118G (66%)'
437#      'Disk (/mnt/Videos): 823G / 893G (93%)'
438#
439# disk_show=('/'):
440#      'Disk (/): 74G / 118G (66%)'
441#
442disk_show=('/')
443
444# Disk subtitle.
445# What to append to the Disk subtitle.
446#
447# Default: 'mount'
448# Values:  'mount', 'name', 'dir', 'none'
449# Flag:    --disk_subtitle
450#
451# Example:
452# name:   'Disk (/dev/sda1): 74G / 118G (66%)'
453#         'Disk (/dev/sdb2): 74G / 118G (66%)'
454#
455# mount:  'Disk (/): 74G / 118G (66%)'
456#         'Disk (/mnt/Local Disk): 74G / 118G (66%)'
457#         'Disk (/mnt/Videos): 74G / 118G (66%)'
458#
459# dir:    'Disk (/): 74G / 118G (66%)'
460#         'Disk (Local Disk): 74G / 118G (66%)'
461#         'Disk (Videos): 74G / 118G (66%)'
462#
463# none:   'Disk: 74G / 118G (66%)'
464#         'Disk: 74G / 118G (66%)'
465#         'Disk: 74G / 118G (66%)'
466disk_subtitle="mount"
467
468# Disk percent.
469# Show/Hide disk percent.
470#
471# Default: 'on'
472# Values:  'on', 'off'
473# Flag:    --disk_percent
474#
475# Example:
476# on:  'Disk (/): 74G / 118G (66%)'
477# off: 'Disk (/): 74G / 118G'
478disk_percent="on"
479
480
481# Song
482
483
484# Manually specify a music player.
485#
486# Default: 'auto'
487# Values:  'auto', 'player-name'
488# Flag:    --music_player
489#
490# Available values for 'player-name':
491#
492# amarok
493# audacious
494# banshee
495# bluemindo
496# clementine
497# cmus
498# deadbeef
499# deepin-music
500# dragon
501# elisa
502# exaile
503# gnome-music
504# gmusicbrowser
505# gogglesmm
506# guayadeque
507# io.elementary.music
508# iTunes
509# juk
510# lollypop
511# mocp
512# mopidy
513# mpd
514# muine
515# netease-cloud-music
516# olivia
517# playerctl
518# pogo
519# pragha
520# qmmp
521# quodlibet
522# rhythmbox
523# sayonara
524# smplayer
525# spotify
526# strawberry
527# tauonmb
528# tomahawk
529# vlc
530# xmms2d
531# xnoise
532# yarock
533music_player="auto"
534
535# Format to display song information.
536#
537# Default: '%artist% - %album% - %title%'
538# Values:  '%artist%', '%album%', '%title%'
539# Flag:    --song_format
540#
541# Example:
542# default: 'Song: Jet - Get Born - Sgt Major'
543song_format="%artist% - %album% - %title%"
544
545# Print the Artist, Album and Title on separate lines
546#
547# Default: 'off'
548# Values:  'on', 'off'
549# Flag:    --song_shorthand
550#
551# Example:
552# on:  'Artist: The Fratellis'
553#      'Album: Costello Music'
554#      'Song: Chelsea Dagger'
555#
556# off: 'Song: The Fratellis - Costello Music - Chelsea Dagger'
557song_shorthand="off"
558
559# 'mpc' arguments (specify a host, password etc).
560#
561# Default:  ''
562# Example: mpc_args=(-h HOST -P PASSWORD)
563mpc_args=()
564
565
566# Text Colors
567
568
569# Text Colors
570#
571# Default:  'distro'
572# Values:   'distro', 'num' 'num' 'num' 'num' 'num' 'num'
573# Flag:     --colors
574#
575# Each number represents a different part of the text in
576# this order: 'title', '@', 'underline', 'subtitle', 'colon', 'info'
577#
578# Example:
579# colors=(distro)      - Text is colored based on Distro colors.
580# colors=(4 6 1 8 8 6) - Text is colored in the order above.
581colors=(distro)
582
583
584# Text Options
585
586
587# Toggle bold text
588#
589# Default:  'on'
590# Values:   'on', 'off'
591# Flag:     --bold
592bold="on"
593
594# Enable/Disable Underline
595#
596# Default:  'on'
597# Values:   'on', 'off'
598# Flag:     --underline
599underline_enabled="on"
600
601# Underline character
602#
603# Default:  '-'
604# Values:   'string'
605# Flag:     --underline_char
606underline_char="-"
607
608
609# Info Separator
610# Replace the default separator with the specified string.
611#
612# Default:  ':'
613# Flag:     --separator
614#
615# Example:
616# separator="->":   'Shell-> bash'
617# separator=" =":   'WM = dwm'
618separator=":"
619
620
621# Color Blocks
622
623
624# Color block range
625# The range of colors to print.
626#
627# Default:  '0', '15'
628# Values:   'num'
629# Flag:     --block_range
630#
631# Example:
632#
633# Display colors 0-7 in the blocks.  (8 colors)
634# neofetch --block_range 0 7
635#
636# Display colors 0-15 in the blocks. (16 colors)
637# neofetch --block_range 0 15
638block_range=(0 15)
639
640# Toggle color blocks
641#
642# Default:  'on'
643# Values:   'on', 'off'
644# Flag:     --color_blocks
645color_blocks="on"
646
647# Color block width in spaces
648#
649# Default:  '3'
650# Values:   'num'
651# Flag:     --block_width
652block_width=3
653
654# Color block height in lines
655#
656# Default:  '1'
657# Values:   'num'
658# Flag:     --block_height
659block_height=1
660
661# Color Alignment
662#
663# Default: 'auto'
664# Values: 'auto', 'num'
665# Flag: --col_offset
666#
667# Number specifies how far from the left side of the terminal (in spaces) to
668# begin printing the columns, in case you want to e.g. center them under your
669# text.
670# Example:
671# col_offset="auto" - Default behavior of neofetch
672# col_offset=7      - Leave 7 spaces then print the colors
673col_offset="auto"
674
675# Progress Bars
676
677
678# Bar characters
679#
680# Default:  '-', '='
681# Values:   'string', 'string'
682# Flag:     --bar_char
683#
684# Example:
685# neofetch --bar_char 'elapsed' 'total'
686# neofetch --bar_char '-' '='
687bar_char_elapsed="-"
688bar_char_total="="
689
690# Toggle Bar border
691#
692# Default:  'on'
693# Values:   'on', 'off'
694# Flag:     --bar_border
695bar_border="on"
696
697# Progress bar length in spaces
698# Number of chars long to make the progress bars.
699#
700# Default:  '15'
701# Values:   'num'
702# Flag:     --bar_length
703bar_length=15
704
705# Progress bar colors
706# When set to distro, uses your distro's logo colors.
707#
708# Default:  'distro', 'distro'
709# Values:   'distro', 'num'
710# Flag:     --bar_colors
711#
712# Example:
713# neofetch --bar_colors 3 4
714# neofetch --bar_colors distro 5
715bar_color_elapsed="distro"
716bar_color_total="distro"
717
718
719# Info display
720# Display a bar with the info.
721#
722# Default: 'off'
723# Values:  'bar', 'infobar', 'barinfo', 'off'
724# Flags:   --cpu_display
725#          --memory_display
726#          --battery_display
727#          --disk_display
728#
729# Example:
730# bar:     '[---=======]'
731# infobar: 'info [---=======]'
732# barinfo: '[---=======] info'
733# off:     'info'
734cpu_display="off"
735memory_display="off"
736battery_display="off"
737disk_display="off"
738
739
740# Backend Settings
741
742
743# Image backend.
744#
745# Default:  'ascii'
746# Values:   'ascii', 'caca', 'chafa', 'jp2a', 'iterm2', 'off',
747#           'pot', 'termpix', 'pixterm', 'tycat', 'w3m', 'kitty'
748# Flag:     --backend
749image_backend="ascii"
750
751# Image Source
752#
753# Which image or ascii file to display.
754#
755# Default:  'auto'
756# Values:   'auto', 'ascii', 'wallpaper', '/path/to/img', '/path/to/ascii', '/path/to/dir/'
757#           'command output (neofetch --ascii "$(fortune | cowsay -W 30)")'
758# Flag:     --source
759#
760# NOTE: 'auto' will pick the best image source for whatever image backend is used.
761#       In ascii mode, distro ascii art will be used and in an image mode, your
762#       wallpaper will be used.
763image_source="auto"
764
765
766# Ascii Options
767
768
769# Ascii distro
770# Which distro's ascii art to display.
771#
772# Default: 'auto'
773# Values:  'auto', 'distro_name'
774# Flag:    --ascii_distro
775# NOTE: AIX, Alpine, Anarchy, Android, Antergos, antiX, "AOSC OS",
776#       "AOSC OS/Retro", Apricity, ArcoLinux, ArchBox, ARCHlabs,
777#       ArchStrike, XFerience, ArchMerge, Arch, Artix, Arya, Bedrock,
778#       Bitrig, BlackArch, BLAG, BlankOn, BlueLight, bonsai, BSD,
779#       BunsenLabs, Calculate, Carbs, CentOS, Chakra, ChaletOS,
780#       Chapeau, Chrom*, Cleanjaro, ClearOS, Clear_Linux, Clover,
781#       Condres, Container_Linux, CRUX, Cucumber, Debian, Deepin,
782#       DesaOS, Devuan, DracOS, DarkOs, DragonFly, Drauger, Elementary,
783#       EndeavourOS, Endless, EuroLinux, Exherbo, Fedora, Feren, FreeBSD,
784#       FreeMiNT, Frugalware, Funtoo, GalliumOS, Garuda, Gentoo, Pentoo,
785#       gNewSense, GNOME, GNU, GoboLinux, Grombyang, Guix, Haiku, Huayra,
786#       Hyperbola, janus, Kali, KaOS, KDE_neon, Kibojoe, Kogaion,
787#       Korora, KSLinux, Kubuntu, LEDE, LFS, Linux_Lite,
788#       LMDE, Lubuntu, Lunar, macos, Mageia, MagpieOS, Mandriva,
789#       Manjaro, Maui, Mer, Minix, LinuxMint, MX_Linux, Namib,
790#       Neptune, NetBSD, Netrunner, Nitrux, NixOS, Nurunner,
791#       NuTyX, OBRevenge, OpenBSD, openEuler, OpenIndiana, openmamba,
792#       OpenMandriva, OpenStage, OpenWrt, osmc, Oracle, OS Elbrus, PacBSD,
793#       Parabola, Pardus, Parrot, Parsix, TrueOS, PCLinuxOS, Peppermint,
794#       popos, Porteus, PostMarketOS, Proxmox, Puppy, PureOS, Qubes, Radix,
795#       Raspbian, Reborn_OS, Redstar, Redcore, Redhat, Refracted_Devuan,
796#       Regata, Rosa, sabotage, Sabayon, Sailfish, SalentOS, Scientific,
797#       Septor, SereneLinux, SharkLinux, Siduction, Slackware, SliTaz,
798#       SmartOS, Solus, Source_Mage, Sparky, Star, SteamOS, SunOS,
799#       openSUSE_Leap, openSUSE_Tumbleweed, openSUSE, SwagArch, Tails,
800#       Trisquel, Ubuntu-Budgie, Ubuntu-GNOME, Ubuntu-MATE, Ubuntu-Studio,
801#       Ubuntu, Venom, Void, Obarun, windows10, Windows7, Xubuntu, Zorin,
802#       and IRIX have ascii logos
803# NOTE: Arch, Ubuntu, Redhat, and Dragonfly have 'old' logo variants.
804#       Use '{distro name}_old' to use the old logos.
805# NOTE: Ubuntu has flavor variants.
806#       Change this to Lubuntu, Kubuntu, Xubuntu, Ubuntu-GNOME,
807#       Ubuntu-Studio, Ubuntu-Mate  or Ubuntu-Budgie to use the flavors.
808# NOTE: Arcolinux, Dragonfly, Fedora, Alpine, Arch, Ubuntu,
809#       CRUX, Debian, Gentoo, FreeBSD, Mac, NixOS, OpenBSD, android,
810#       Antrix, CentOS, Cleanjaro, ElementaryOS, GUIX, Hyperbola,
811#       Manjaro, MXLinux, NetBSD, Parabola, POP_OS, PureOS,
812#       Slackware, SunOS, LinuxLite, OpenSUSE, Raspbian,
813#       postmarketOS, and Void have a smaller logo variant.
814#       Use '{distro name}_small' to use the small variants.
815ascii_distro="auto"
816
817# Ascii Colors
818#
819# Default:  'distro'
820# Values:   'distro', 'num' 'num' 'num' 'num' 'num' 'num'
821# Flag:     --ascii_colors
822#
823# Example:
824# ascii_colors=(distro)      - Ascii is colored based on Distro colors.
825# ascii_colors=(4 6 1 8 8 6) - Ascii is colored using these colors.
826ascii_colors=(distro)
827
828# Bold ascii logo
829# Whether or not to bold the ascii logo.
830#
831# Default: 'on'
832# Values:  'on', 'off'
833# Flag:    --ascii_bold
834ascii_bold="on"
835
836
837# Image Options
838
839
840# Image loop
841# Setting this to on will make neofetch redraw the image constantly until
842# Ctrl+C is pressed. This fixes display issues in some terminal emulators.
843#
844# Default:  'off'
845# Values:   'on', 'off'
846# Flag:     --loop
847image_loop="off"
848
849# Thumbnail directory
850#
851# Default: '~/.cache/thumbnails/neofetch'
852# Values:  'dir'
853thumbnail_dir="${XDG_CACHE_HOME:-${HOME}/.cache}/thumbnails/neofetch"
854
855# Crop mode
856#
857# Default:  'normal'
858# Values:   'normal', 'fit', 'fill'
859# Flag:     --crop_mode
860#
861# See this wiki page to learn about the fit and fill options.
862# https://github.com/dylanaraps/neofetch/wiki/What-is-Waifu-Crop%3F
863crop_mode="normal"
864
865# Crop offset
866# Note: Only affects 'normal' crop mode.
867#
868# Default:  'center'
869# Values:   'northwest', 'north', 'northeast', 'west', 'center'
870#           'east', 'southwest', 'south', 'southeast'
871# Flag:     --crop_offset
872crop_offset="center"
873
874# Image size
875# The image is half the terminal width by default.
876#
877# Default: 'auto'
878# Values:  'auto', '00px', '00%', 'none'
879# Flags:   --image_size
880#          --size
881image_size="auto"
882
883# Gap between image and text
884#
885# Default: '3'
886# Values:  'num', '-num'
887# Flag:    --gap
888gap=3
889
890# Image offsets
891# Only works with the w3m backend.
892#
893# Default: '0'
894# Values:  'px'
895# Flags:   --xoffset
896#          --yoffset
897yoffset=0
898xoffset=0
899
900# Image background color
901# Only works with the w3m backend.
902#
903# Default: ''
904# Values:  'color', 'blue'
905# Flag:    --bg_color
906background_color=
907
908
909# Misc Options
910
911# Stdout mode
912# Turn off all colors and disables image backend (ASCII/Image).
913# Useful for piping into another command.
914# Default: 'off'
915# Values: 'on', 'off'
916stdout="off"
917EOF
918
919# DETECT INFORMATION
920
921get_os() {
922    # $kernel_name is set in a function called cache_uname and is
923    # just the output of "uname -s".
924    case $kernel_name in
925        Darwin)   os=$darwin_name ;;
926        SunOS)    os=Solaris ;;
927        Haiku)    os=Haiku ;;
928        MINIX)    os=MINIX ;;
929        AIX)      os=AIX ;;
930        IRIX*)    os=IRIX ;;
931        FreeMiNT) os=FreeMiNT ;;
932
933        Linux|GNU*)
934            os=Linux
935        ;;
936
937        *BSD|DragonFly|Bitrig)
938            os=BSD
939        ;;
940
941        CYGWIN*|MSYS*|MINGW*)
942            os=Windows
943        ;;
944
945        *)
946            printf '%s\n' "Unknown OS detected: '$kernel_name', aborting..." >&2
947            printf '%s\n' "Open an issue on GitHub to add support for your OS." >&2
948            exit 1
949        ;;
950    esac
951}
952
953get_distro() {
954    [[ $distro ]] && return
955
956    case $os in
957        Linux|BSD|MINIX)
958            if [[ -f /bedrock/etc/bedrock-release && $PATH == */bedrock/cross/* ]]; then
959                case $distro_shorthand in
960                    on|tiny) distro="Bedrock Linux" ;;
961                    *) distro=$(< /bedrock/etc/bedrock-release)
962                esac
963
964            elif [[ -f /etc/redstar-release ]]; then
965                case $distro_shorthand in
966                    on|tiny) distro="Red Star OS" ;;
967                    *) distro="Red Star OS $(awk -F'[^0-9*]' '$0=$2' /etc/redstar-release)"
968                esac
969
970            elif [[ -f /etc/siduction-version ]]; then
971                case $distro_shorthand in
972                    on|tiny) distro=Siduction ;;
973                    *) distro="Siduction ($(lsb_release -sic))"
974                esac
975
976            elif [[ -f /etc/mcst_version ]]; then
977                case $distro_shorthand in
978                    on|tiny) distro="OS Elbrus" ;;
979                    *) distro="OS Elbrus $(< /etc/mcst_version)"
980                esac
981
982            elif type -p pveversion >/dev/null; then
983                case $distro_shorthand in
984                    on|tiny) distro="Proxmox VE" ;;
985                    *)
986                        distro=$(pveversion)
987                        distro=${distro#pve-manager/}
988                        distro="Proxmox VE ${distro%/*}"
989                esac
990
991            elif type -p lsb_release >/dev/null; then
992                case $distro_shorthand in
993                    on)   lsb_flags=-si ;;
994                    tiny) lsb_flags=-si ;;
995                    *)    lsb_flags=-sd ;;
996                esac
997                distro=$(lsb_release "$lsb_flags")
998
999            elif [[ -f /etc/os-release || \
1000                    -f /usr/lib/os-release || \
1001                    -f /etc/openwrt_release || \
1002                    -f /etc/lsb-release ]]; then
1003
1004                # Source the os-release file
1005                for file in /etc/lsb-release /usr/lib/os-release \
1006                            /etc/os-release  /etc/openwrt_release; do
1007                    source "$file" && break
1008                done
1009
1010                # Format the distro name.
1011                case $distro_shorthand in
1012                    on)   distro="${NAME:-${DISTRIB_ID}} ${VERSION_ID:-${DISTRIB_RELEASE}}" ;;
1013                    tiny) distro="${NAME:-${DISTRIB_ID:-${TAILS_PRODUCT_NAME}}}" ;;
1014                    off)  distro="${PRETTY_NAME:-${DISTRIB_DESCRIPTION}} ${UBUNTU_CODENAME}" ;;
1015                esac
1016
1017            elif [[ -f /etc/GoboLinuxVersion ]]; then
1018                case $distro_shorthand in
1019                    on|tiny) distro=GoboLinux ;;
1020                    *) distro="GoboLinux $(< /etc/GoboLinuxVersion)"
1021                esac
1022
1023            elif [[ -f /etc/SDE-VERSION ]]; then
1024                distro="$(< /etc/SDE-VERSION)"
1025                case $distro_shorthand in
1026                    on|tiny) distro="${distro% *}" ;;
1027                esac
1028
1029            elif type -p crux >/dev/null; then
1030                distro=$(crux)
1031                case $distro_shorthand in
1032                    on)   distro=${distro//version} ;;
1033                    tiny) distro=${distro//version*}
1034                esac
1035
1036            elif type -p tazpkg >/dev/null; then
1037                distro="SliTaz $(< /etc/slitaz-release)"
1038
1039            elif type -p kpt >/dev/null && \
1040                 type -p kpm >/dev/null; then
1041                distro=KSLinux
1042
1043            elif [[ -d /system/app/ && -d /system/priv-app ]]; then
1044                distro="Android $(getprop ro.build.version.release)"
1045
1046            # Chrome OS doesn't conform to the /etc/*-release standard.
1047            # While the file is a series of variables they can't be sourced
1048            # by the shell since the values aren't quoted.
1049            elif [[ -f /etc/lsb-release && $(< /etc/lsb-release) == *CHROMEOS* ]]; then
1050                distro='Chrome OS'
1051
1052            elif type -p guix >/dev/null; then
1053                case $distro_shorthand in
1054                    on|tiny) distro="Guix System" ;;
1055                    *) distro="Guix System $(guix -V | awk 'NR==1{printf $4}')"
1056                esac
1057
1058            # Display whether using '-current' or '-release' on OpenBSD.
1059            elif [[ $kernel_name = OpenBSD ]] ; then
1060                read -ra kernel_info <<< "$(sysctl -n kern.version)"
1061                distro=${kernel_info[*]:0:2}
1062
1063            else
1064                for release_file in /etc/*-release; do
1065                    distro+=$(< "$release_file")
1066                done
1067
1068                if [[ -z $distro ]]; then
1069                    case $distro_shorthand in
1070                        on|tiny) distro=$kernel_name ;;
1071                        *) distro="$kernel_name $kernel_version" ;;
1072                    esac
1073
1074                    distro=${distro/DragonFly/DragonFlyBSD}
1075
1076                    # Workarounds for some BSD based distros.
1077                    [[ -f /etc/pcbsd-lang ]]       && distro=PCBSD
1078                    [[ -f /etc/trueos-lang ]]      && distro=TrueOS
1079                    [[ -f /etc/pacbsd-release ]]   && distro=PacBSD
1080                    [[ -f /etc/hbsd-update.conf ]] && distro=HardenedBSD
1081                fi
1082            fi
1083
1084            if [[ $(< /proc/version) == *Microsoft* || $kernel_version == *Microsoft* ]]; then
1085                case $distro_shorthand in
1086                    on)   distro+=" [Windows 10]" ;;
1087                    tiny) distro="Windows 10" ;;
1088                    *)    distro+=" on Windows 10" ;;
1089                esac
1090
1091            elif [[ $(< /proc/version) == *chrome-bot* || -f /dev/cros_ec ]]; then
1092                [[ $distro != *Chrome* ]] &&
1093                    case $distro_shorthand in
1094                        on)   distro+=" [Chrome OS]" ;;
1095                        tiny) distro="Chrome OS" ;;
1096                        *)    distro+=" on Chrome OS" ;;
1097                    esac
1098            fi
1099
1100            distro=$(trim_quotes "$distro")
1101            distro=${distro/NAME=}
1102
1103            # Get Ubuntu flavor.
1104            if [[ $distro == "Ubuntu"* ]]; then
1105                case $XDG_CONFIG_DIRS in
1106                    *"plasma"*)   distro=${distro/Ubuntu/Kubuntu} ;;
1107                    *"mate"*)     distro=${distro/Ubuntu/Ubuntu MATE} ;;
1108                    *"xubuntu"*)  distro=${distro/Ubuntu/Xubuntu} ;;
1109                    *"Lubuntu"*)  distro=${distro/Ubuntu/Lubuntu} ;;
1110                    *"budgie"*)   distro=${distro/Ubuntu/Ubuntu Budgie} ;;
1111                    *"studio"*)   distro=${distro/Ubuntu/Ubuntu Studio} ;;
1112                    *"cinnamon"*) distro=${distro/Ubuntu/Ubuntu Cinnamon} ;;
1113                esac
1114            fi
1115        ;;
1116
1117        "Mac OS X"|"macOS")
1118            case $osx_version in
1119                10.4*)  codename="Mac OS X Tiger" ;;
1120                10.5*)  codename="Mac OS X Leopard" ;;
1121                10.6*)  codename="Mac OS X Snow Leopard" ;;
1122                10.7*)  codename="Mac OS X Lion" ;;
1123                10.8*)  codename="OS X Mountain Lion" ;;
1124                10.9*)  codename="OS X Mavericks" ;;
1125                10.10*) codename="OS X Yosemite" ;;
1126                10.11*) codename="OS X El Capitan" ;;
1127                10.12*) codename="macOS Sierra" ;;
1128                10.13*) codename="macOS High Sierra" ;;
1129                10.14*) codename="macOS Mojave" ;;
1130                10.15*) codename="macOS Catalina" ;;
1131                10.16*) codename="macOS Big Sur" ;;
1132                11.0*)  codename="macOS Big Sur" ;;
1133                *)      codename=macOS ;;
1134            esac
1135
1136            distro="$codename $osx_version $osx_build"
1137
1138            case $distro_shorthand in
1139                on) distro=${distro/ ${osx_build}} ;;
1140
1141                tiny)
1142                    case $osx_version in
1143                        10.[4-7]*)            distro=${distro/${codename}/Mac OS X} ;;
1144                        10.[8-9]*|10.1[0-1]*) distro=${distro/${codename}/OS X} ;;
1145                        10.1[2-6]*|11.0*)     distro=${distro/${codename}/macOS} ;;
1146                    esac
1147                    distro=${distro/ ${osx_build}}
1148                ;;
1149            esac
1150        ;;
1151
1152        "iPhone OS")
1153            distro="iOS $osx_version"
1154
1155            # "uname -m" doesn't print architecture on iOS.
1156            os_arch=off
1157        ;;
1158
1159        Windows)
1160            distro=$(wmic os get Caption)
1161            distro=${distro/Caption}
1162            distro=${distro/Microsoft }
1163        ;;
1164
1165        Solaris)
1166            case $distro_shorthand in
1167                on|tiny) distro=$(awk 'NR==1 {print $1,$3}' /etc/release) ;;
1168                *)       distro=$(awk 'NR==1 {print $1,$2,$3}' /etc/release) ;;
1169            esac
1170            distro=${distro/\(*}
1171        ;;
1172
1173        Haiku)
1174            distro=Haiku
1175        ;;
1176
1177        AIX)
1178            distro="AIX $(oslevel)"
1179        ;;
1180
1181        IRIX)
1182            distro="IRIX ${kernel_version}"
1183        ;;
1184
1185        FreeMiNT)
1186            distro=FreeMiNT
1187        ;;
1188    esac
1189
1190    distro=${distro//Enterprise Server}
1191
1192    [[ $distro ]] || distro="$os (Unknown)"
1193
1194    # Get OS architecture.
1195    case $os in
1196        Solaris|AIX|Haiku|IRIX|FreeMiNT)
1197            machine_arch=$(uname -p)
1198        ;;
1199
1200        *)  machine_arch=$kernel_machine ;;
1201    esac
1202
1203    [[ $os_arch == on ]] && \
1204        distro+=" $machine_arch"
1205
1206    [[ ${ascii_distro:-auto} == auto ]] && \
1207        ascii_distro=$(trim "$distro")
1208}
1209
1210get_model() {
1211    case $os in
1212        Linux)
1213            if [[ -d /system/app/ && -d /system/priv-app ]]; then
1214                model="$(getprop ro.product.brand) $(getprop ro.product.model)"
1215
1216            elif [[ -f /sys/devices/virtual/dmi/id/product_name ||
1217                    -f /sys/devices/virtual/dmi/id/product_version ]]; then
1218                model=$(< /sys/devices/virtual/dmi/id/product_name)
1219                model+=" $(< /sys/devices/virtual/dmi/id/product_version)"
1220
1221            elif [[ -f /sys/firmware/devicetree/base/model ]]; then
1222                model=$(< /sys/firmware/devicetree/base/model)
1223
1224            elif [[ -f /tmp/sysinfo/model ]]; then
1225                model=$(< /tmp/sysinfo/model)
1226            fi
1227        ;;
1228
1229        "Mac OS X"|"macOS")
1230            if [[ $(kextstat | grep -F -e "FakeSMC" -e "VirtualSMC") != "" ]]; then
1231                model="Hackintosh (SMBIOS: $(sysctl -n hw.model))"
1232            else
1233                model=$(sysctl -n hw.model)
1234            fi
1235        ;;
1236
1237        "iPhone OS")
1238            case $kernel_machine in
1239                iPad1,1):            "iPad" ;;
1240                iPad2,[1-4]):        "iPad 2" ;;
1241                iPad3,[1-3]):        "iPad 3" ;;
1242                iPad3,[4-6]):        "iPad 4" ;;
1243                iPad6,1[12]):        "iPad 5" ;;
1244                iPad7,[5-6]):        "iPad 6" ;;
1245                iPad7,1[12]):        "iPad 7" ;;
1246                iPad4,[1-3]):        "iPad Air" ;;
1247                iPad5,[3-4]):        "iPad Air 2" ;;
1248                iPad11,[3-4]):       "iPad Air 3" ;;
1249                iPad6,[7-8]):        "iPad Pro (12.9 Inch)" ;;
1250                iPad6,[3-4]):        "iPad Pro (9.7 Inch)" ;;
1251                iPad7,[1-2]):        "iPad Pro 2 (12.9 Inch)" ;;
1252                iPad7,[3-4]):        "iPad Pro (10.5 Inch)" ;;
1253                iPad8,[1-4]):        "iPad Pro (11 Inch)" ;;
1254                iPad8,[5-8]):        "iPad Pro 3 (12.9 Inch)" ;;
1255                iPad8,9 | iPad8,10): "iPad Pro 4 (11 Inch)" ;;
1256                iPad8,1[1-2]):       "iPad Pro 4 (12.9 Inch)" ;;
1257                iPad2,[5-7]):        "iPad mini" ;;
1258                iPad4,[4-6]):        "iPad mini 2" ;;
1259                iPad4,[7-9]):        "iPad mini 3" ;;
1260                iPad5,[1-2]):        "iPad mini 4" ;;
1261                iPad11,[1-2]):       "iPad mini 5" ;;
1262
1263                iPhone1,1):     "iPhone" ;;
1264                iPhone1,2):     "iPhone 3G" ;;
1265                iPhone2,1):     "iPhone 3GS" ;;
1266                iPhone3,[1-3]): "iPhone 4" ;;
1267                iPhone4,1):     "iPhone 4S" ;;
1268                iPhone5,[1-2]): "iPhone 5" ;;
1269                iPhone5,[3-4]): "iPhone 5c" ;;
1270                iPhone6,[1-2]): "iPhone 5s" ;;
1271                iPhone7,2):     "iPhone 6" ;;
1272                iPhone7,1):     "iPhone 6 Plus" ;;
1273                iPhone8,1):     "iPhone 6s" ;;
1274                iPhone8,2):     "iPhone 6s Plus" ;;
1275                iPhone8,4):     "iPhone SE" ;;
1276                iPhone9,[13]):  "iPhone 7" ;;
1277                iPhone9,[24]):  "iPhone 7 Plus" ;;
1278                iPhone10,[14]): "iPhone 8" ;;
1279                iPhone10,[25]): "iPhone 8 Plus" ;;
1280                iPhone10,[36]): "iPhone X" ;;
1281                iPhone11,2):    "iPhone XS" ;;
1282                iPhone11,[46]): "iPhone XS Max" ;;
1283                iPhone11,8):    "iPhone XR" ;;
1284                iPhone12,1):    "iPhone 11" ;;
1285                iPhone12,3):    "iPhone 11 Pro" ;;
1286                iPhone12,5):    "iPhone 11 Pro Max" ;;
1287                iPhone12,8):    "iPhone SE 2020" ;;
1288
1289                iPod1,1): "iPod touch" ;;
1290                ipod2,1): "iPod touch 2G" ;;
1291                ipod3,1): "iPod touch 3G" ;;
1292                ipod4,1): "iPod touch 4G" ;;
1293                ipod5,1): "iPod touch 5G" ;;
1294                ipod7,1): "iPod touch 6G" ;;
1295            esac
1296
1297            model=$_
1298        ;;
1299
1300        BSD|MINIX)
1301            model=$(sysctl -n hw.vendor hw.product)
1302        ;;
1303
1304        Windows)
1305            model=$(wmic computersystem get manufacturer,model)
1306            model=${model/Manufacturer}
1307            model=${model/Model}
1308        ;;
1309
1310        Solaris)
1311            model=$(prtconf -b | awk -F':' '/banner-name/ {printf $2}')
1312        ;;
1313
1314        AIX)
1315            model=$(/usr/bin/uname -M)
1316        ;;
1317
1318        FreeMiNT)
1319            model=$(sysctl -n hw.model)
1320            model=${model/ (_MCH *)}
1321        ;;
1322    esac
1323
1324    # Remove dummy OEM info.
1325    model=${model//To be filled by O.E.M.}
1326    model=${model//To Be Filled*}
1327    model=${model//OEM*}
1328    model=${model//Not Applicable}
1329    model=${model//System Product Name}
1330    model=${model//System Version}
1331    model=${model//Undefined}
1332    model=${model//Default string}
1333    model=${model//Not Specified}
1334    model=${model//Type1ProductConfigId}
1335    model=${model//INVALID}
1336    model=${model//All Series}
1337    model=${model//�}
1338
1339    case $model in
1340        "Standard PC"*) model="KVM/QEMU (${model})" ;;
1341        OpenBSD*)       model="vmm ($model)" ;;
1342    esac
1343}
1344
1345get_title() {
1346    user=${USER:-$(id -un || printf %s "${HOME/*\/}")}
1347
1348    case $title_fqdn in
1349        on) hostname=$(hostname -f) ;;
1350        *)  hostname=${HOSTNAME:-$(hostname)} ;;
1351    esac
1352
1353    title=${title_color}${bold}${user}${at_color}@${title_color}${bold}${hostname}
1354    length=$((${#user} + ${#hostname} + 1))
1355}
1356
1357get_kernel() {
1358    # Since these OS are integrated systems, it's better to skip this function altogether
1359    [[ $os =~ (AIX|IRIX) ]] && return
1360
1361    # Haiku uses 'uname -v' and not - 'uname -r'.
1362    [[ $os == Haiku ]] && {
1363        kernel=$(uname -v)
1364        return
1365    }
1366
1367    # In Windows 'uname' may return the info of GNUenv thus use wmic for OS kernel.
1368    [[ $os == Windows ]] && {
1369        kernel=$(wmic os get Version)
1370        kernel=${kernel/Version}
1371        return
1372    }
1373
1374    case $kernel_shorthand in
1375        on)  kernel=$kernel_version ;;
1376        off) kernel="$kernel_name $kernel_version" ;;
1377    esac
1378
1379    # Hide kernel info if it's identical to the distro info.
1380    [[ $os =~ (BSD|MINIX) && $distro == *"$kernel_name"* ]] &&
1381        case $distro_shorthand in
1382            on|tiny) kernel=$kernel_version ;;
1383            *)       unset kernel ;;
1384        esac
1385}
1386
1387get_uptime() {
1388    # Get uptime in seconds.
1389    case $os in
1390        Linux|Windows|MINIX)
1391            if [[ -r /proc/uptime ]]; then
1392                s=$(< /proc/uptime)
1393                s=${s/.*}
1394            else
1395                boot=$(date -d"$(uptime -s)" +%s)
1396                now=$(date +%s)
1397                s=$((now - boot))
1398            fi
1399        ;;
1400
1401        "Mac OS X"|"macOS"|"iPhone OS"|BSD|FreeMiNT)
1402            boot=$(sysctl -n kern.boottime)
1403            boot=${boot/\{ sec = }
1404            boot=${boot/,*}
1405
1406            # Get current date in seconds.
1407            now=$(date +%s)
1408            s=$((now - boot))
1409        ;;
1410
1411        Solaris)
1412            s=$(kstat -p unix:0:system_misc:snaptime | awk '{print $2}')
1413            s=${s/.*}
1414        ;;
1415
1416        AIX|IRIX)
1417            t=$(LC_ALL=POSIX ps -o etime= -p 1)
1418
1419            [[ $t == *-*   ]] && { d=${t%%-*}; t=${t#*-}; }
1420            [[ $t == *:*:* ]] && { h=${t%%:*}; t=${t#*:}; }
1421
1422            h=${h#0}
1423            t=${t#0}
1424
1425            s=$((${d:-0}*86400 + ${h:-0}*3600 + ${t%%:*}*60 + ${t#*:}))
1426        ;;
1427
1428        Haiku)
1429            s=$(($(system_time) / 1000000))
1430        ;;
1431    esac
1432
1433    d="$((s / 60 / 60 / 24)) days"
1434    h="$((s / 60 / 60 % 24)) hours"
1435    m="$((s / 60 % 60)) mins"
1436
1437    # Remove plural if < 2.
1438    ((${d/ *} == 1)) && d=${d/s}
1439    ((${h/ *} == 1)) && h=${h/s}
1440    ((${m/ *} == 1)) && m=${m/s}
1441
1442    # Hide empty fields.
1443    ((${d/ *} == 0)) && unset d
1444    ((${h/ *} == 0)) && unset h
1445    ((${m/ *} == 0)) && unset m
1446
1447    uptime=${d:+$d, }${h:+$h, }$m
1448    uptime=${uptime%', '}
1449    uptime=${uptime:-$s secs}
1450
1451    # Make the output of uptime smaller.
1452    case $uptime_shorthand in
1453        on) ;;
1454
1455        tiny)
1456            uptime=${uptime/ days/d}
1457            uptime=${uptime/ day/d}
1458            uptime=${uptime/ hours/h}
1459            uptime=${uptime/ hour/h}
1460            uptime=${uptime/ mins/m}
1461            uptime=${uptime/ min/m}
1462            uptime=${uptime/ secs/s}
1463            uptime=${uptime//,}
1464        ;;
1465    esac
1466}
1467
1468get_packages() {
1469    # has: Check if package manager installed.
1470    # dir: Count files or dirs in a glob.
1471    # pac: If packages > 0, log package manager name.
1472    # tot: Count lines in command output.
1473    has() { type -p "$1" >/dev/null && manager=$1; }
1474    dir() { ((packages+=$#)); pac "$#"; }
1475    pac() { (($1 > 0)) && { managers+=("$1 (${manager})"); manager_string+="${manager}, "; }; }
1476    tot() { IFS=$'\n' read -d "" -ra pkgs <<< "$("$@")";((packages+=${#pkgs[@]}));pac "${#pkgs[@]}";}
1477
1478    # Redefine tot() for Bedrock Linux.
1479    [[ -f /bedrock/etc/bedrock-release && $PATH == */bedrock/cross/* ]] && {
1480        tot() {
1481            IFS=$'\n' read -d "" -ra pkgs <<< "$(for s in $(brl list); do strat -r "$s" "$@"; done)"
1482            ((packages+="${#pkgs[@]}"))
1483            pac "${#pkgs[@]}"
1484        }
1485        br_prefix="/bedrock/strata/*"
1486    }
1487
1488    case $os in
1489        Linux|BSD|"iPhone OS"|Solaris)
1490            # Package Manager Programs.
1491            has kiss       && tot kiss l
1492            has pacman-key && tot pacman -Qq --color never
1493            has dpkg       && tot dpkg-query -f '.\n' -W
1494            has rpm        && tot rpm -qa
1495            has xbps-query && tot xbps-query -l
1496            has apk        && tot apk info
1497            has opkg       && tot opkg list-installed
1498            has pacman-g2  && tot pacman-g2 -Q
1499            has lvu        && tot lvu installed
1500            has tce-status && tot tce-status -i
1501            has pkg_info   && tot pkg_info
1502            has tazpkg     && tot tazpkg list && ((packages-=6))
1503            has sorcery    && tot gaze installed
1504            has alps       && tot alps showinstalled
1505            has butch      && tot butch list
1506            has mine       && tot mine -q
1507
1508            # Counting files/dirs.
1509            # Variables need to be unquoted here. Only Bedrock Linux is affected.
1510            # $br_prefix is fixed and won't change based on user input so this is safe either way.
1511            # shellcheck disable=SC2086
1512            {
1513            shopt -s nullglob
1514            has brew    && dir "$(brew --cellar)"/*
1515            has emerge  && dir ${br_prefix}/var/db/pkg/*/*/
1516            has Compile && dir ${br_prefix}/Programs/*/
1517            has eopkg   && dir ${br_prefix}/var/lib/eopkg/package/*
1518            has crew    && dir ${br_prefix}/usr/local/etc/crew/meta/*.filelist
1519            has pkgtool && dir ${br_prefix}/var/log/packages/*
1520            has scratch && dir ${br_prefix}/var/lib/scratchpkg/index/*/.pkginfo
1521            has kagami  && dir ${br_prefix}/var/lib/kagami/pkgs/*
1522            has cave    && dir ${br_prefix}/var/db/paludis/repositories/cross-installed/*/data/*/ \
1523                               ${br_prefix}/var/db/paludis/repositories/installed/data/*/
1524            shopt -u nullglob
1525            }
1526
1527            # Other (Needs complex command)
1528            has kpm-pkg && ((packages+=$(kpm  --get-selections | grep -cv deinstall$)))
1529
1530            has guix && {
1531                manager=guix-system && tot guix package -p "/run/current-system/profile" -I
1532                manager=guix-user   && tot guix package -I
1533            }
1534
1535            has nix-store && {
1536                manager=nix-system  && tot nix-store -q --requisites /run/current-system/sw
1537                manager=nix-user    && tot nix-store -q --requisites ~/.nix-profile
1538                manager=nix-default && tot nix-store -q --requisites /nix/var/nix/profiles/default
1539            }
1540
1541            # pkginfo is also the name of a python package manager which is painfully slow.
1542            # TODO: Fix this somehow.
1543            has pkginfo && tot pkginfo -i
1544
1545            case $kernel_name in
1546                FreeBSD|DragonFly) has pkg && tot pkg info ;;
1547
1548                *)
1549                    has pkg && dir /var/db/pkg/*
1550
1551                    ((packages == 0)) && \
1552                        has pkg && tot pkg list
1553                ;;
1554            esac
1555
1556            # List these last as they accompany regular package managers.
1557            has flatpak && tot flatpak list
1558            has spm     && tot spm list -i
1559            has puyo    && dir ~/.puyo/installed
1560
1561            # Snap hangs if the command is run without the daemon running.
1562            # Only run snap if the daemon is also running.
1563            has snap && ps -e | grep -qFm 1 snapd >/dev/null && tot snap list && ((packages-=1))
1564
1565            # This is the only standard location for appimages.
1566            # See: https://github.com/AppImage/AppImageKit/wiki
1567            manager=appimage && has appimaged && dir ~/.local/bin/*.appimage
1568        ;;
1569
1570        "Mac OS X"|"macOS"|MINIX)
1571            has port  && tot port installed && ((packages-=1))
1572            has brew  && dir /usr/local/Cellar/*
1573            has pkgin && tot pkgin list
1574
1575            has nix-store && {
1576                manager=nix-system && tot nix-store -q --requisites "/run/current-system/sw"
1577                manager=nix-user   && tot nix-store -q --requisites "$HOME/.nix-profile"
1578            }
1579        ;;
1580
1581        AIX|FreeMiNT)
1582            has lslpp && ((packages+=$(lslpp -J -l -q | grep -cv '^#')))
1583            has rpm   && tot rpm -qa
1584        ;;
1585
1586        Windows)
1587            case $kernel_name in
1588                CYGWIN*) has cygcheck && tot cygcheck -cd ;;
1589                MSYS*)   has pacman   && tot pacman -Qq --color never ;;
1590            esac
1591
1592            # Scoop environment throws errors if `tot scoop list` is used
1593            has scoop && dir ~/scoop/apps/* && ((packages-=1))
1594
1595            # Count chocolatey packages.
1596            [[ -d /cygdrive/c/ProgramData/chocolatey/lib ]] && \
1597                dir /cygdrive/c/ProgramData/chocolatey/lib/*
1598        ;;
1599
1600        Haiku)
1601            has pkgman && dir /boot/system/package-links/*
1602            packages=${packages/pkgman/depot}
1603        ;;
1604
1605        IRIX)
1606            manager=swpkg
1607            tot versions -b && ((packages-=3))
1608        ;;
1609    esac
1610
1611    if ((packages == 0)); then
1612        unset packages
1613
1614    elif [[ $package_managers == on ]]; then
1615        printf -v packages '%s, ' "${managers[@]}"
1616        packages=${packages%,*}
1617
1618    elif [[ $package_managers == tiny ]]; then
1619        packages+=" (${manager_string%,*})"
1620    fi
1621
1622    packages=${packages/pacman-key/pacman}
1623}
1624
1625get_shell() {
1626    case $shell_path in
1627        on)  shell="$SHELL " ;;
1628        off) shell="${SHELL##*/} " ;;
1629    esac
1630
1631    [[ $shell_version != on ]] && return
1632
1633    case ${shell_name:=${SHELL##*/}} in
1634        bash)
1635            [[ $BASH_VERSION ]] ||
1636                BASH_VERSION=$("$SHELL" -c "printf %s \"\$BASH_VERSION\"")
1637
1638            shell+=${BASH_VERSION/-*}
1639        ;;
1640
1641        sh|ash|dash|es) ;;
1642
1643        *ksh)
1644            shell+=$("$SHELL" -c "printf %s \"\$KSH_VERSION\"")
1645            shell=${shell/ * KSH}
1646            shell=${shell/version}
1647        ;;
1648
1649        osh)
1650            if [[ $OIL_VERSION ]]; then
1651                shell+=$OIL_VERSION
1652            else
1653                shell+=$("$SHELL" -c "printf %s \"\$OIL_VERSION\"")
1654            fi
1655        ;;
1656
1657        tcsh)
1658            shell+=$("$SHELL" -c "printf %s \$tcsh")
1659        ;;
1660
1661        yash)
1662            shell+=$("$SHELL" --version 2>&1)
1663            shell=${shell/ $shell_name}
1664            shell=${shell/ Yet another shell}
1665            shell=${shell/Copyright*}
1666        ;;
1667
1668        *)
1669            shell+=$("$SHELL" --version 2>&1)
1670            shell=${shell/ $shell_name}
1671        ;;
1672    esac
1673
1674    # Remove unwanted info.
1675    shell=${shell/, version}
1676    shell=${shell/xonsh\//xonsh }
1677    shell=${shell/options*}
1678    shell=${shell/\(*\)}
1679}
1680
1681get_de() {
1682    # If function was run, stop here.
1683    ((de_run == 1)) && return
1684
1685    case $os in
1686        "Mac OS X"|"macOS") de=Aqua ;;
1687
1688        Windows)
1689            case $distro in
1690                "Windows 8"*|"Windows 10"*) de="Modern UI/Metro" ;;
1691                *) de=Aero
1692            esac
1693        ;;
1694
1695        FreeMiNT)
1696            freemint_wm=(/proc/*)
1697
1698            case ${freemint_wm[*]} in
1699                *thing*)  de=Thing ;;
1700                *jinnee*) de=Jinnee ;;
1701                *tera*)   de=Teradesk ;;
1702                *neod*)   de=NeoDesk ;;
1703                *zdesk*)  de=zDesk ;;
1704                *mdesk*)  de=mDesk ;;
1705            esac
1706        ;;
1707
1708        *)
1709            ((wm_run != 1)) && get_wm
1710
1711            # Temporary support for Regolith Linux
1712            if [[ $DESKTOP_SESSION == regolith ]]; then
1713                de=Regolith
1714
1715            elif [[ $XDG_CURRENT_DESKTOP ]]; then
1716                de=${XDG_CURRENT_DESKTOP/X\-}
1717                de=${de/Budgie:GNOME/Budgie}
1718                de=${de/:Unity7:ubuntu}
1719
1720            elif [[ $DESKTOP_SESSION ]]; then
1721                de=${DESKTOP_SESSION##*/}
1722
1723            elif [[ $GNOME_DESKTOP_SESSION_ID ]]; then
1724                de=GNOME
1725
1726            elif [[ $MATE_DESKTOP_SESSION_ID ]]; then
1727                de=MATE
1728
1729            elif [[ $TDE_FULL_SESSION ]]; then
1730                de=Trinity
1731            fi
1732
1733            # When a window manager is started from a display manager
1734            # the desktop variables are sometimes also set to the
1735            # window manager name. This checks to see if WM == DE
1736            # and discards the DE value.
1737            [[ $de == "$wm" ]] && { unset -v de; return; }
1738        ;;
1739    esac
1740
1741    # Fallback to using xprop.
1742    [[ $DISPLAY && -z $de ]] && type -p xprop &>/dev/null && \
1743        de=$(xprop -root | awk '/KDE_SESSION_VERSION|^_MUFFIN|xfce4|xfce5/')
1744
1745    # Format strings.
1746    case $de in
1747        KDE_SESSION_VERSION*) de=KDE${de/* = } ;;
1748        *xfce4*)  de=Xfce4 ;;
1749        *xfce5*)  de=Xfce5 ;;
1750        *xfce*)   de=Xfce ;;
1751        *mate*)   de=MATE ;;
1752        *GNOME*)  de=GNOME ;;
1753        *MUFFIN*) de=Cinnamon ;;
1754    esac
1755
1756    ((${KDE_SESSION_VERSION:-0} >= 4)) && de=${de/KDE/Plasma}
1757
1758    if [[ $de_version == on && $de ]]; then
1759        case $de in
1760            Plasma*)   de_ver=$(plasmashell --version) ;;
1761            MATE*)     de_ver=$(mate-session --version) ;;
1762            Xfce*)     de_ver=$(xfce4-session --version) ;;
1763            GNOME*)    de_ver=$(gnome-shell --version) ;;
1764            Cinnamon*) de_ver=$(cinnamon --version) ;;
1765            Deepin*)   de_ver=$(awk -F'=' '/Version/ {print $2}' /etc/deepin-version) ;;
1766            Budgie*)   de_ver=$(budgie-desktop --version) ;;
1767            LXQt*)     de_ver=$(lxqt-session --version) ;;
1768            Lumina*)   de_ver=$(lumina-desktop --version 2>&1) ;;
1769            Trinity*)  de_ver=$(tde-config --version) ;;
1770            Unity*)    de_ver=$(unity --version) ;;
1771        esac
1772
1773        de_ver=${de_ver/*TDE:}
1774        de_ver=${de_ver/tde-config*}
1775        de_ver=${de_ver/liblxqt*}
1776        de_ver=${de_ver/Copyright*}
1777        de_ver=${de_ver/)*}
1778        de_ver=${de_ver/* }
1779        de_ver=${de_ver//\"}
1780
1781        de="$de $de_ver"
1782    fi
1783
1784    de_run=1
1785}
1786
1787get_wm() {
1788    # If function was run, stop here.
1789    ((wm_run == 1)) && return
1790
1791    case $kernel_name in
1792        *OpenBSD*) ps_flags=(x -c) ;;
1793        *)         ps_flags=(-e) ;;
1794    esac
1795
1796    if [[ $WAYLAND_DISPLAY ]]; then
1797        wm=$(ps "${ps_flags[@]}" | grep -m 1 -o -F \
1798                           -e arcan \
1799                           -e asc \
1800                           -e clayland \
1801                           -e dwc \
1802                           -e fireplace \
1803                           -e gnome-shell \
1804                           -e greenfield \
1805                           -e grefsen \
1806                           -e kwin \
1807                           -e lipstick \
1808                           -e maynard \
1809                           -e mazecompositor \
1810                           -e motorcar \
1811                           -e orbital \
1812                           -e orbment \
1813                           -e perceptia \
1814                           -e rustland \
1815                           -e sway \
1816                           -e ulubis \
1817                           -e velox \
1818                           -e wavy \
1819                           -e way-cooler \
1820                           -e wayfire \
1821                           -e wayhouse \
1822                           -e westeros \
1823                           -e westford \
1824                           -e weston)
1825
1826    elif [[ $DISPLAY && $os != "Mac OS X" && $os != "macOS" && $os != FreeMiNT ]]; then
1827        type -p xprop &>/dev/null && {
1828            id=$(xprop -root -notype _NET_SUPPORTING_WM_CHECK)
1829            id=${id##* }
1830            wm=$(xprop -id "$id" -notype -len 100 -f _NET_WM_NAME 8t)
1831            wm=${wm/*WM_NAME = }
1832            wm=${wm/\"}
1833            wm=${wm/\"*}
1834        }
1835
1836        # Fallback for non-EWMH WMs.
1837        [[ $wm ]] ||
1838            wm=$(ps "${ps_flags[@]}" | grep -m 1 -o \
1839                               -e "[s]owm" \
1840                               -e "[c]atwm" \
1841                               -e "[f]vwm" \
1842                               -e "[d]wm" \
1843                               -e "[2]bwm" \
1844                               -e "[m]onsterwm" \
1845                               -e "[t]inywm" \
1846                               -e "[x]11fs" \
1847                               -e "[x]monad")
1848
1849    else
1850        case $os in
1851            "Mac OS X"|"macOS")
1852                ps_line=$(ps -e | grep -o \
1853                    -e "[S]pectacle" \
1854                    -e "[A]methyst" \
1855                    -e "[k]wm" \
1856                    -e "[c]hun[k]wm" \
1857                    -e "[y]abai" \
1858                    -e "[R]ectangle")
1859
1860                case $ps_line in
1861                    *chunkwm*)   wm=chunkwm ;;
1862                    *kwm*)       wm=Kwm ;;
1863                    *yabai*)     wm=yabai ;;
1864                    *Amethyst*)  wm=Amethyst ;;
1865                    *Spectacle*) wm=Spectacle ;;
1866                    *Rectangle*) wm=Rectangle ;;
1867                    *)           wm="Quartz Compositor" ;;
1868                esac
1869            ;;
1870
1871            Windows)
1872                wm=$(tasklist | grep -m 1 -o -F \
1873                                     -e bugn \
1874                                     -e Windawesome \
1875                                     -e blackbox \
1876                                     -e emerge \
1877                                     -e litestep)
1878
1879                [[ $wm == blackbox ]] && wm="bbLean (Blackbox)"
1880                wm=${wm:+$wm, }Explorer
1881            ;;
1882
1883            FreeMiNT)
1884                freemint_wm=(/proc/*)
1885
1886                case ${freemint_wm[*]} in
1887                    *xaaes* | *xaloader*) wm=XaAES ;;
1888                    *myaes*)              wm=MyAES ;;
1889                    *naes*)               wm=N.AES ;;
1890                    geneva)               wm=Geneva ;;
1891                    *)                    wm="Atari AES" ;;
1892                esac
1893            ;;
1894        esac
1895    fi
1896
1897    # Rename window managers to their proper values.
1898    [[ $wm == *WINDOWMAKER* ]] && wm=wmaker
1899    [[ $wm == *GNOME*Shell* ]] && wm=Mutter
1900
1901    wm_run=1
1902}
1903
1904get_wm_theme() {
1905    ((wm_run != 1)) && get_wm
1906    ((de_run != 1)) && get_de
1907
1908    case $wm  in
1909        E16)
1910            wm_theme=$(awk -F "= " '/theme.name/ {print $2}' "${HOME}/.e16/e_config--0.0.cfg")
1911        ;;
1912
1913        Sawfish)
1914            wm_theme=$(awk -F '\\(quote|\\)' '/default-frame-style/ {print $(NF-4)}' \
1915                       "$HOME/.sawfish/custom")
1916        ;;
1917
1918        Cinnamon|Muffin|"Mutter (Muffin)")
1919            detheme=$(gsettings get org.cinnamon.theme name)
1920            wm_theme=$(gsettings get org.cinnamon.desktop.wm.preferences theme)
1921            wm_theme="$detheme ($wm_theme)"
1922        ;;
1923
1924        Compiz|Mutter|Gala)
1925            if type -p gsettings >/dev/null; then
1926                wm_theme=$(gsettings get org.gnome.shell.extensions.user-theme name)
1927
1928                [[ ${wm_theme//\'} ]] || \
1929                    wm_theme=$(gsettings get org.gnome.desktop.wm.preferences theme)
1930
1931            elif type -p gconftool-2 >/dev/null; then
1932                wm_theme=$(gconftool-2 -g /apps/metacity/general/theme)
1933            fi
1934        ;;
1935
1936        Metacity*)
1937            if [[ $de == Deepin ]]; then
1938                wm_theme=$(gsettings get com.deepin.wrap.gnome.desktop.wm.preferences theme)
1939
1940            elif [[ $de == MATE ]]; then
1941                wm_theme=$(gsettings get org.mate.Marco.general theme)
1942
1943            else
1944                wm_theme=$(gconftool-2 -g /apps/metacity/general/theme)
1945            fi
1946        ;;
1947
1948        E17|Enlightenment)
1949            if type -p eet >/dev/null; then
1950                wm_theme=$(eet -d "$HOME/.e/e/config/standard/e.cfg" config |\
1951                            awk '/value \"file\" string.*.edj/ {print $4}')
1952                wm_theme=${wm_theme##*/}
1953                wm_theme=${wm_theme%.*}
1954            fi
1955        ;;
1956
1957        Fluxbox)
1958            [[ -f $HOME/.fluxbox/init ]] &&
1959                wm_theme=$(awk -F "/" '/styleFile/ {print $NF}' "$HOME/.fluxbox/init")
1960        ;;
1961
1962        IceWM*)
1963            [[ -f $HOME/.icewm/theme ]] &&
1964                wm_theme=$(awk -F "[\",/]" '!/#/ {print $2}' "$HOME/.icewm/theme")
1965        ;;
1966
1967        Openbox)
1968            case $de in
1969                LXDE*) ob_file=lxde-rc ;;
1970                LXQt*) ob_file=lxqt-rc ;;
1971                    *) ob_file=rc ;;
1972            esac
1973
1974            ob_file=$XDG_CONFIG_HOME/openbox/$ob_file.xml
1975
1976            [[ -f $ob_file ]] &&
1977                wm_theme=$(awk '/<theme>/ {while (getline n) {if (match(n, /<name>/))
1978                            {l=n; exit}}} END {split(l, a, "[<>]"); print a[3]}' "$ob_file")
1979        ;;
1980
1981        PekWM)
1982            [[ -f $HOME/.pekwm/config ]] &&
1983                wm_theme=$(awk -F "/" '/Theme/{gsub(/\"/,""); print $NF}' "$HOME/.pekwm/config")
1984        ;;
1985
1986        Xfwm4)
1987            [[ -f $HOME/.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml ]] &&
1988                wm_theme=$(xfconf-query -c xfwm4 -p /general/theme)
1989        ;;
1990
1991        KWin*)
1992            kde_config_dir
1993            kwinrc=$kde_config_dir/kwinrc
1994            kdebugrc=$kde_config_dir/kdebugrc
1995
1996            if [[ -f $kwinrc ]]; then
1997                wm_theme=$(awk '/theme=/ {
1998                                    gsub(/theme=.*qml_|theme=.*svg__/,"",$0);
1999                                    print $0;
2000                                    exit
2001                                 }' "$kwinrc")
2002
2003                [[ "$wm_theme" ]] ||
2004                    wm_theme=$(awk '/library=org.kde/ {
2005                                        gsub(/library=org.kde./,"",$0);
2006                                        print $0;
2007                                        exit
2008                                     }' "$kwinrc")
2009
2010                [[ $wm_theme ]] ||
2011                    wm_theme=$(awk '/PluginLib=kwin3_/ {
2012                                        gsub(/PluginLib=kwin3_/,"",$0);
2013                                        print $0;
2014                                        exit
2015                                     }' "$kwinrc")
2016
2017            elif [[ -f $kdebugrc ]]; then
2018                wm_theme=$(awk '/(decoration)/ {gsub(/\[/,"",$1); print $1; exit}' "$kdebugrc")
2019            fi
2020
2021            wm_theme=${wm_theme/theme=}
2022        ;;
2023
2024        "Quartz Compositor")
2025            global_preferences=$HOME/Library/Preferences/.GlobalPreferences.plist
2026            wm_theme=$(PlistBuddy -c "Print AppleInterfaceStyle" "$global_preferences")
2027            wm_theme_color=$(PlistBuddy -c "Print AppleAccentColor" "$global_preferences")
2028
2029            [[ "$wm_theme" ]] ||
2030                wm_theme=Light
2031
2032            case $wm_theme_color in
2033                -1) wm_theme_color=Graphite ;;
2034                0)  wm_theme_color=Red ;;
2035                1)  wm_theme_color=Orange ;;
2036                2)  wm_theme_color=Yellow ;;
2037                3)  wm_theme_color=Green ;;
2038                5)  wm_theme_color=Purple ;;
2039                6)  wm_theme_color=Pink ;;
2040                *)  wm_theme_color=Blue ;;
2041            esac
2042
2043            wm_theme="$wm_theme_color ($wm_theme)"
2044        ;;
2045
2046        *Explorer)
2047            path=/proc/registry/HKEY_CURRENT_USER/Software/Microsoft
2048            path+=/Windows/CurrentVersion/Themes/CurrentTheme
2049
2050            wm_theme=$(head -n1 "$path")
2051            wm_theme=${wm_theme##*\\}
2052            wm_theme=${wm_theme%.*}
2053        ;;
2054
2055        Blackbox|bbLean*)
2056            path=$(wmic process get ExecutablePath | grep -F "blackbox")
2057            path=${path//\\/\/}
2058
2059            wm_theme=$(grep '^session\.styleFile:' "${path/\.exe/.rc}")
2060            wm_theme=${wm_theme/session\.styleFile: }
2061            wm_theme=${wm_theme##*\\}
2062            wm_theme=${wm_theme%.*}
2063        ;;
2064    esac
2065
2066    wm_theme=$(trim_quotes "$wm_theme")
2067}
2068
2069get_cpu() {
2070    case $os in
2071        "Linux" | "MINIX" | "Windows")
2072            # Get CPU name.
2073            cpu_file="/proc/cpuinfo"
2074
2075            case $kernel_machine in
2076                "frv" | "hppa" | "m68k" | "openrisc" | "or"* | "powerpc" | "ppc"* | "sparc"*)
2077                    cpu="$(awk -F':' '/^cpu\t|^CPU/ {printf $2; exit}' "$cpu_file")"
2078                ;;
2079
2080                "s390"*)
2081                    cpu="$(awk -F'=' '/machine/ {print $4; exit}' "$cpu_file")"
2082                ;;
2083
2084                "ia64" | "m32r")
2085                    cpu="$(awk -F':' '/model/ {print $2; exit}' "$cpu_file")"
2086                    [[ -z "$cpu" ]] && cpu="$(awk -F':' '/family/ {printf $2; exit}' "$cpu_file")"
2087                ;;
2088
2089                *)
2090                    cpu="$(awk -F '\\s*: | @' \
2091                            '/model name|Hardware|Processor|^cpu model|chip type|^cpu type/ {
2092                            cpu=$2; if ($1 == "Hardware") exit } END { print cpu }' "$cpu_file")"
2093                ;;
2094            esac
2095
2096            speed_dir="/sys/devices/system/cpu/cpu0/cpufreq"
2097
2098            # Select the right temperature file.
2099            for temp_dir in /sys/class/hwmon/*; do
2100                [[ "$(< "${temp_dir}/name")" =~ (coretemp|fam15h_power|k10temp) ]] && {
2101                    temp_dirs=("$temp_dir"/temp*_input)
2102                    temp_dir=${temp_dirs[0]}
2103                    break
2104                }
2105            done
2106
2107            # Get CPU speed.
2108            if [[ -d "$speed_dir" ]]; then
2109                # Fallback to bios_limit if $speed_type fails.
2110                speed="$(< "${speed_dir}/${speed_type}")" ||\
2111                speed="$(< "${speed_dir}/bios_limit")" ||\
2112                speed="$(< "${speed_dir}/scaling_max_freq")" ||\
2113                speed="$(< "${speed_dir}/cpuinfo_max_freq")"
2114                speed="$((speed / 1000))"
2115
2116            else
2117                speed="$(awk -F ': |\\.' '/cpu MHz|^clock/ {printf $2; exit}' "$cpu_file")"
2118                speed="${speed/MHz}"
2119            fi
2120
2121            # Get CPU temp.
2122            [[ -f "$temp_dir" ]] && deg="$(($(< "$temp_dir") * 100 / 10000))"
2123
2124            # Get CPU cores.
2125            case $cpu_cores in
2126                "logical" | "on") cores="$(grep -c "^processor" "$cpu_file")" ;;
2127                "physical") cores="$(awk '/^core id/&&!a[$0]++{++i} END {print i}' "$cpu_file")" ;;
2128            esac
2129        ;;
2130
2131        "Mac OS X"|"macOS")
2132            cpu="$(sysctl -n machdep.cpu.brand_string)"
2133
2134            # Get CPU cores.
2135            case $cpu_cores in
2136                "logical" | "on") cores="$(sysctl -n hw.logicalcpu_max)" ;;
2137                "physical")       cores="$(sysctl -n hw.physicalcpu_max)" ;;
2138            esac
2139        ;;
2140
2141        "iPhone OS")
2142            case $kernel_machine in
2143                "iPhone1,"[1-2] | "iPod1,1"): "Samsung S5L8900 (1) @ 412MHz" ;;
2144                "iPhone2,1"):                 "Samsung S5PC100 (1) @ 600MHz" ;;
2145                "iPhone3,"[1-3] | "iPod4,1"): "Apple A4 (1) @ 800MHz" ;;
2146                "iPhone4,1" | "iPod5,1"):     "Apple A5 (2) @ 800MHz" ;;
2147                "iPhone5,"[1-4]): "Apple A6 (2) @ 1.3GHz" ;;
2148                "iPhone6,"[1-2]): "Apple A7 (2) @ 1.3GHz" ;;
2149                "iPhone7,"[1-2]): "Apple A8 (2) @ 1.4GHz" ;;
2150                "iPhone8,"[1-4] | "iPad6,1"[12]): "Apple A9 (2) @ 1.85GHz" ;;
2151                "iPhone9,"[1-4] | "iPad7,"[5-6] | "iPad7,1"[1-2]):
2152                    "Apple A10 Fusion (4) @ 2.34GHz"
2153                ;;
2154                "iPhone10,"[1-6]): "Apple A11 Bionic (6) @ 2.39GHz" ;;
2155                "iPhone11,"[2468] | "iPad11,"[1-4]): "Apple A12 Bionic (6) @ 2.49GHz" ;;
2156                "iPhone12,"[1358]): "Apple A13 Bionic (6) @ 2.65GHz" ;;
2157
2158                "iPod2,1"): "Samsung S5L8720 (1) @ 533MHz" ;;
2159                "iPod3,1"): "Samsung S5L8922 (1) @ 600MHz" ;;
2160                "iPod7,1"): "Apple A8 (2) @ 1.1GHz" ;;
2161                "iPad1,1"): "Apple A4 (1) @ 1GHz" ;;
2162                "iPad2,"[1-7]): "Apple A5 (2) @ 1GHz" ;;
2163                "iPad3,"[1-3]): "Apple A5X (2) @ 1GHz" ;;
2164                "iPad3,"[4-6]): "Apple A6X (2) @ 1.4GHz" ;;
2165                "iPad4,"[1-3]): "Apple A7 (2) @ 1.4GHz" ;;
2166                "iPad4,"[4-9]): "Apple A7 (2) @ 1.4GHz" ;;
2167                "iPad5,"[1-2]): "Apple A8 (2) @ 1.5GHz" ;;
2168                "iPad5,"[3-4]): "Apple A8X (3) @ 1.5GHz" ;;
2169                "iPad6,"[3-4]): "Apple A9X (2) @ 2.16GHz" ;;
2170                "iPad6,"[7-8]): "Apple A9X (2) @ 2.26GHz" ;;
2171                "iPad7,"[1-4]): "Apple A10X Fusion (6) @ 2.39GHz" ;;
2172                "iPad8,"[1-8]): "Apple A12X Bionic (8) @ 2.49GHz" ;;
2173                "iPad8,9" | "iPad8,1"[0-2]): "Apple A12Z Bionic (8) @ 2.49GHz" ;;
2174            esac
2175            cpu="$_"
2176        ;;
2177
2178        "BSD")
2179            # Get CPU name.
2180            cpu="$(sysctl -n hw.model)"
2181            cpu="${cpu/[0-9]\.*}"
2182            cpu="${cpu/ @*}"
2183
2184            # Get CPU speed.
2185            speed="$(sysctl -n hw.cpuspeed)"
2186            [[ -z "$speed" ]] && speed="$(sysctl -n  hw.clockrate)"
2187
2188            # Get CPU cores.
2189            cores="$(sysctl -n hw.ncpu)"
2190
2191            # Get CPU temp.
2192            case $kernel_name in
2193                "FreeBSD"* | "DragonFly"* | "NetBSD"*)
2194                    deg="$(sysctl -n dev.cpu.0.temperature)"
2195                    deg="${deg/C}"
2196                ;;
2197                "OpenBSD"* | "Bitrig"*)
2198                    deg="$(sysctl hw.sensors | \
2199                           awk -F '=| degC' '/lm0.temp|cpu0.temp/ {print $2; exit}')"
2200                    deg="${deg/00/0}"
2201                ;;
2202            esac
2203        ;;
2204
2205        "Solaris")
2206            # Get CPU name.
2207            cpu="$(psrinfo -pv)"
2208            cpu="${cpu//*$'\n'}"
2209            cpu="${cpu/[0-9]\.*}"
2210            cpu="${cpu/ @*}"
2211            cpu="${cpu/\(portid*}"
2212
2213            # Get CPU speed.
2214            speed="$(psrinfo -v | awk '/operates at/ {print $6; exit}')"
2215
2216            # Get CPU cores.
2217            case $cpu_cores in
2218                "logical" | "on") cores="$(kstat -m cpu_info | grep -c -F "chip_id")" ;;
2219                "physical") cores="$(psrinfo -p)" ;;
2220            esac
2221        ;;
2222
2223        "Haiku")
2224            # Get CPU name.
2225            cpu="$(sysinfo -cpu | awk -F '\\"' '/CPU #0/ {print $2}')"
2226            cpu="${cpu/@*}"
2227
2228            # Get CPU speed.
2229            speed="$(sysinfo -cpu | awk '/running at/ {print $NF; exit}')"
2230            speed="${speed/MHz}"
2231
2232            # Get CPU cores.
2233            cores="$(sysinfo -cpu | grep -c -F 'CPU #')"
2234        ;;
2235
2236        "AIX")
2237            # Get CPU name.
2238            cpu="$(lsattr -El proc0 -a type | awk '{printf $2}')"
2239
2240            # Get CPU speed.
2241            speed="$(prtconf -s | awk -F':' '{printf $2}')"
2242            speed="${speed/MHz}"
2243
2244            # Get CPU cores.
2245            case $cpu_cores in
2246                "logical" | "on")
2247                    cores="$(lparstat -i | awk -F':' '/Online Virtual CPUs/ {printf $2}')"
2248                ;;
2249
2250                "physical")
2251                    cores="$(lparstat -i | awk -F':' '/Active Physical CPUs/ {printf $2}')"
2252                ;;
2253            esac
2254        ;;
2255
2256        "IRIX")
2257            # Get CPU name.
2258            cpu="$(hinv -c processor | awk -F':' '/CPU:/ {printf $2}')"
2259
2260            # Get CPU speed.
2261            speed="$(hinv -c processor | awk '/MHZ/ {printf $2}')"
2262
2263            # Get CPU cores.
2264            cores="$(sysconf NPROC_ONLN)"
2265        ;;
2266
2267        "FreeMiNT")
2268            cpu="$(awk -F':' '/CPU:/ {printf $2}' /kern/cpuinfo)"
2269            speed="$(awk -F '[:.M]' '/Clocking:/ {printf $2}' /kern/cpuinfo)"
2270        ;;
2271    esac
2272
2273    # Remove un-needed patterns from cpu output.
2274    cpu="${cpu//(TM)}"
2275    cpu="${cpu//(tm)}"
2276    cpu="${cpu//(R)}"
2277    cpu="${cpu//(r)}"
2278    cpu="${cpu//CPU}"
2279    cpu="${cpu//Processor}"
2280    cpu="${cpu//Dual-Core}"
2281    cpu="${cpu//Quad-Core}"
2282    cpu="${cpu//Six-Core}"
2283    cpu="${cpu//Eight-Core}"
2284    cpu="${cpu//[1-9][0-9]-Core}"
2285    cpu="${cpu//[0-9]-Core}"
2286    cpu="${cpu//, * Compute Cores}"
2287    cpu="${cpu//Core / }"
2288    cpu="${cpu//(\"AuthenticAMD\"*)}"
2289    cpu="${cpu//with Radeon * Graphics}"
2290    cpu="${cpu//, altivec supported}"
2291    cpu="${cpu//FPU*}"
2292    cpu="${cpu//Chip Revision*}"
2293    cpu="${cpu//Technologies, Inc}"
2294    cpu="${cpu//Core2/Core 2}"
2295
2296    # Trim spaces from core and speed output
2297    cores="${cores//[[:space:]]}"
2298    speed="${speed//[[:space:]]}"
2299
2300    # Remove CPU brand from the output.
2301    if [[ "$cpu_brand" == "off" ]]; then
2302        cpu="${cpu/AMD }"
2303        cpu="${cpu/Intel }"
2304        cpu="${cpu/Core? Duo }"
2305        cpu="${cpu/Qualcomm }"
2306    fi
2307
2308    # Add CPU cores to the output.
2309    [[ "$cpu_cores" != "off" && "$cores" ]] && \
2310        case $os in
2311            "Mac OS X"|"macOS") cpu="${cpu/@/(${cores}) @}" ;;
2312            *)                  cpu="$cpu ($cores)" ;;
2313        esac
2314
2315    # Add CPU speed to the output.
2316    if [[ "$cpu_speed" != "off" && "$speed" ]]; then
2317        if (( speed < 1000 )); then
2318            cpu="$cpu @ ${speed}MHz"
2319        else
2320            [[ "$speed_shorthand" == "on" ]] && speed="$((speed / 100))"
2321            speed="${speed:0:1}.${speed:1}"
2322            cpu="$cpu @ ${speed}GHz"
2323        fi
2324    fi
2325
2326    # Add CPU temp to the output.
2327    if [[ "$cpu_temp" != "off" && "$deg" ]]; then
2328        deg="${deg//.}"
2329
2330        # Convert to Fahrenheit if enabled
2331        [[ "$cpu_temp" == "F" ]] && deg="$((deg * 90 / 50 + 320))"
2332
2333        # Format the output
2334        deg="[${deg/${deg: -1}}.${deg: -1}°${cpu_temp:-C}]"
2335        cpu="$cpu $deg"
2336    fi
2337}
2338
2339get_cpu_usage() {
2340    case $os in
2341        "Windows")
2342            cpu_usage="$(wmic cpu get loadpercentage)"
2343            cpu_usage="${cpu_usage/LoadPercentage}"
2344            cpu_usage="${cpu_usage//[[:space:]]}"
2345        ;;
2346
2347        *)
2348            # Get CPU cores if unset.
2349            if [[ "$cpu_cores" != "logical" ]]; then
2350                case $os in
2351                    "Linux" | "MINIX")  cores="$(grep -c "^processor" /proc/cpuinfo)" ;;
2352                    "Mac OS X"|"macOS") cores="$(sysctl -n hw.logicalcpu_max)" ;;
2353                    "BSD")              cores="$(sysctl -n hw.ncpu)" ;;
2354                    "Solaris")          cores="$(kstat -m cpu_info | grep -c -F "chip_id")" ;;
2355                    "Haiku")            cores="$(sysinfo -cpu | grep -c -F 'CPU #')" ;;
2356                    "iPhone OS")        cores="${cpu/*\(}"; cores="${cores/\)*}" ;;
2357                    "IRIX")             cores="$(sysconf NPROC_ONLN)" ;;
2358                    "FreeMiNT")         cores="$(sysctl -n hw.ncpu)" ;;
2359
2360                    "AIX")
2361                        cores="$(lparstat -i | awk -F':' '/Online Virtual CPUs/ {printf $2}')"
2362                    ;;
2363                esac
2364            fi
2365
2366            cpu_usage="$(ps aux | awk 'BEGIN {sum=0} {sum+=$3}; END {print sum}')"
2367            cpu_usage="$((${cpu_usage/\.*} / ${cores:-1}))"
2368        ;;
2369    esac
2370
2371    # Print the bar.
2372    case $cpu_display in
2373        "bar")     cpu_usage="$(bar "$cpu_usage" 100)" ;;
2374        "infobar") cpu_usage="${cpu_usage}% $(bar "$cpu_usage" 100)" ;;
2375        "barinfo") cpu_usage="$(bar "$cpu_usage" 100)${info_color} ${cpu_usage}%" ;;
2376        *)         cpu_usage="${cpu_usage}%" ;;
2377    esac
2378}
2379
2380get_gpu() {
2381    case $os in
2382        "Linux")
2383            # Read GPUs into array.
2384            gpu_cmd="$(lspci -mm | awk -F '\"|\" \"|\\(' \
2385                                          '/"Display|"3D|"VGA/ {a[$0] = $1 " " $3 " " $4}
2386                                           END {for(i in a) {if(!seen[a[i]]++) print a[i]}}')"
2387            IFS=$'\n' read -d "" -ra gpus <<< "$gpu_cmd"
2388
2389            # Remove duplicate Intel Graphics outputs.
2390            # This fixes cases where the outputs are both
2391            # Intel but not entirely identical.
2392            #
2393            # Checking the first two array elements should
2394            # be safe since there won't be 2 intel outputs if
2395            # there's a dedicated GPU in play.
2396            [[ "${gpus[0]}" == *Intel* && "${gpus[1]}" == *Intel* ]] && unset -v "gpus[0]"
2397
2398            for gpu in "${gpus[@]}"; do
2399                # GPU shorthand tests.
2400                [[ "$gpu_type" == "dedicated" && "$gpu" == *Intel* ]] || \
2401                [[ "$gpu_type" == "integrated" && ! "$gpu" == *Intel* ]] && \
2402                    { unset -v gpu; continue; }
2403
2404                case $gpu in
2405                    *"Advanced"*)
2406                        brand="${gpu/*AMD*ATI*/AMD ATI}"
2407                        brand="${brand:-${gpu/*AMD*/AMD}}"
2408                        brand="${brand:-${gpu/*ATI*/ATi}}"
2409
2410                        gpu="${gpu/\[AMD\/ATI\] }"
2411                        gpu="${gpu/\[AMD\] }"
2412                        gpu="${gpu/OEM }"
2413                        gpu="${gpu/Advanced Micro Devices, Inc.}"
2414                        gpu="${gpu/*\[}"
2415                        gpu="${gpu/\]*}"
2416                        gpu="$brand $gpu"
2417                    ;;
2418
2419                    *"NVIDIA"*)
2420                        gpu="${gpu/*\[}"
2421                        gpu="${gpu/\]*}"
2422                        gpu="NVIDIA $gpu"
2423                    ;;
2424
2425                    *"Intel"*)
2426                        gpu="${gpu/*Intel/Intel}"
2427                        gpu="${gpu/\(R\)}"
2428                        gpu="${gpu/Corporation}"
2429                        gpu="${gpu/ \(*}"
2430                        gpu="${gpu/Integrated Graphics Controller}"
2431                        gpu="${gpu/*Xeon*/Intel HD Graphics}"
2432
2433                        [[ -z "$(trim "$gpu")" ]] && gpu="Intel Integrated Graphics"
2434                    ;;
2435
2436                    *"MCST"*)
2437                        gpu="${gpu/*MCST*MGA2*/MCST MGA2}"
2438                    ;;
2439
2440                    *"VirtualBox"*)
2441                        gpu="VirtualBox Graphics Adapter"
2442                    ;;
2443
2444                    *) continue ;;
2445                esac
2446
2447                if [[ "$gpu_brand" == "off" ]]; then
2448                    gpu="${gpu/AMD }"
2449                    gpu="${gpu/NVIDIA }"
2450                    gpu="${gpu/Intel }"
2451                fi
2452
2453                prin "${subtitle:+${subtitle}${gpu_name}}" "$gpu"
2454            done
2455
2456            return
2457        ;;
2458
2459        "Mac OS X"|"macOS")
2460            if [[ -f "${cache_dir}/neofetch/gpu" ]]; then
2461                source "${cache_dir}/neofetch/gpu"
2462
2463            else
2464                gpu="$(system_profiler SPDisplaysDataType |\
2465                       awk -F': ' '/^\ *Chipset Model:/ {printf $2 ", "}')"
2466                gpu="${gpu//\/ \$}"
2467                gpu="${gpu%,*}"
2468
2469                cache "gpu" "$gpu"
2470            fi
2471        ;;
2472
2473        "iPhone OS")
2474            case $kernel_machine in
2475                "iPhone1,"[1-2]):                             "PowerVR MBX Lite 3D" ;;
2476                "iPhone2,1" | "iPhone3,"[1-3] | "iPod3,1" | "iPod4,1" | "iPad1,1"):
2477                    "PowerVR SGX535"
2478                ;;
2479                "iPhone4,1" | "iPad2,"[1-7] | "iPod5,1"):     "PowerVR SGX543MP2" ;;
2480                "iPhone5,"[1-4]):                             "PowerVR SGX543MP3" ;;
2481                "iPhone6,"[1-2] | "iPad4,"[1-9]):             "PowerVR G6430" ;;
2482                "iPhone7,"[1-2] | "iPod7,1" | "iPad5,"[1-2]): "PowerVR GX6450" ;;
2483                "iPhone8,"[1-4] | "iPad6,1"[12]):             "PowerVR GT7600" ;;
2484                "iPhone9,"[1-4] | "iPad7,"[5-6]):             "PowerVR GT7600 Plus" ;;
2485                "iPhone10,"[1-6]):                            "Apple Designed GPU (A11)" ;;
2486                "iPhone11,"[2468]):                           "Apple Designed GPU (A12)" ;;
2487                "iPhone12,"[1358]):                           "Apple Designed GPU (A13)" ;;
2488
2489                "iPad3,"[1-3]):     "PowerVR SGX534MP4" ;;
2490                "iPad3,"[4-6]):     "PowerVR SGX554MP4" ;;
2491                "iPad5,"[3-4]):     "PowerVR GXA6850" ;;
2492                "iPad6,"[3-8]):     "PowerVR 7XT" ;;
2493
2494                "iPod1,1" | "iPod2,1")
2495                    : "PowerVR MBX Lite"
2496                ;;
2497            esac
2498            gpu="$_"
2499        ;;
2500
2501        "Windows")
2502            while read -r line; do
2503                prin "${subtitle:+${subtitle}${gpu_name}}" "$(trim "$line")"
2504            done < <(wmic path Win32_VideoController get caption)
2505
2506            gpu=${gpu//Caption}
2507        ;;
2508
2509        "Haiku")
2510            gpu="$(listdev | grep -A2 -F 'device Display controller' |\
2511                   awk -F':' '/device beef/ {print $2}')"
2512        ;;
2513
2514        *)
2515            case $kernel_name in
2516                "FreeBSD"* | "DragonFly"*)
2517                    gpu="$(pciconf -lv | grep -B 4 -F "VGA" | grep -F "device")"
2518                    gpu="${gpu/*device*= }"
2519                    gpu="$(trim_quotes "$gpu")"
2520                ;;
2521
2522                *)
2523                    gpu="$(glxinfo | grep -F 'OpenGL renderer string')"
2524                    gpu="${gpu/OpenGL renderer string: }"
2525                ;;
2526            esac
2527        ;;
2528    esac
2529
2530    if [[ "$gpu_brand" == "off" ]]; then
2531        gpu="${gpu/AMD}"
2532        gpu="${gpu/NVIDIA}"
2533        gpu="${gpu/Intel}"
2534    fi
2535}
2536
2537get_memory() {
2538    case $os in
2539        "Linux" | "Windows")
2540            # MemUsed = Memtotal + Shmem - MemFree - Buffers - Cached - SReclaimable
2541            # Source: https://github.com/KittyKatt/screenFetch/issues/386#issuecomment-249312716
2542            while IFS=":" read -r a b; do
2543                case $a in
2544                    "MemTotal") ((mem_used+=${b/kB})); mem_total="${b/kB}" ;;
2545                    "Shmem") ((mem_used+=${b/kB}))  ;;
2546                    "MemFree" | "Buffers" | "Cached" | "SReclaimable")
2547                        mem_used="$((mem_used-=${b/kB}))"
2548                    ;;
2549                esac
2550            done < /proc/meminfo
2551
2552            mem_used="$((mem_used / 1024))"
2553            mem_total="$((mem_total / 1024))"
2554        ;;
2555
2556        "Mac OS X" | "macOS" | "iPhone OS")
2557            mem_total="$(($(sysctl -n hw.memsize) / 1024 / 1024))"
2558            mem_wired="$(vm_stat | awk '/ wired/ { print $4 }')"
2559            mem_active="$(vm_stat | awk '/ active/ { printf $3 }')"
2560            mem_compressed="$(vm_stat | awk '/ occupied/ { printf $5 }')"
2561            mem_compressed="${mem_compressed:-0}"
2562            mem_used="$(((${mem_wired//.} + ${mem_active//.} + ${mem_compressed//.}) * 4 / 1024))"
2563        ;;
2564
2565        "BSD" | "MINIX")
2566            # Mem total.
2567            case $kernel_name in
2568                "NetBSD"*) mem_total="$(($(sysctl -n hw.physmem64) / 1024 / 1024))" ;;
2569                *) mem_total="$(($(sysctl -n hw.physmem) / 1024 / 1024))" ;;
2570            esac
2571
2572            # Mem free.
2573            case $kernel_name in
2574                "NetBSD"*)
2575                    mem_free="$(($(awk -F ':|kB' '/MemFree:/ {printf $2}' /proc/meminfo) / 1024))"
2576                ;;
2577
2578                "FreeBSD"* | "DragonFly"*)
2579                    hw_pagesize="$(sysctl -n hw.pagesize)"
2580                    mem_inactive="$(($(sysctl -n vm.stats.vm.v_inactive_count) * hw_pagesize))"
2581                    mem_unused="$(($(sysctl -n vm.stats.vm.v_free_count) * hw_pagesize))"
2582                    mem_cache="$(($(sysctl -n vm.stats.vm.v_cache_count) * hw_pagesize))"
2583                    mem_free="$(((mem_inactive + mem_unused + mem_cache) / 1024 / 1024))"
2584                ;;
2585
2586                "MINIX")
2587                    mem_free="$(top -d 1 | awk -F ',' '/^Memory:/ {print $2}')"
2588                    mem_free="${mem_free/M Free}"
2589                ;;
2590
2591                "OpenBSD"*) ;;
2592                *) mem_free="$(($(vmstat | awk 'END {printf $5}') / 1024))" ;;
2593            esac
2594
2595            # Mem used.
2596            case $kernel_name in
2597                "OpenBSD"*)
2598                    mem_used="$(vmstat | awk 'END {printf $3}')"
2599                    mem_used="${mem_used/M}"
2600                ;;
2601
2602                *) mem_used="$((mem_total - mem_free))" ;;
2603            esac
2604        ;;
2605
2606        "Solaris" | "AIX")
2607            hw_pagesize="$(pagesize)"
2608            case $os in
2609                "Solaris")
2610                    pages_total="$(kstat -p unix:0:system_pages:pagestotal | awk '{print $2}')"
2611                    pages_free="$(kstat -p unix:0:system_pages:pagesfree | awk '{print $2}')"
2612                ;;
2613
2614                "AIX")
2615                    IFS=$'\n'"| " read -d "" -ra mem_stat <<< "$(svmon -G -O unit=page)"
2616                    pages_total="${mem_stat[11]}"
2617                    pages_free="${mem_stat[16]}"
2618                ;;
2619            esac
2620            mem_total="$((pages_total * hw_pagesize / 1024 / 1024))"
2621            mem_free="$((pages_free * hw_pagesize / 1024 / 1024))"
2622            mem_used="$((mem_total - mem_free))"
2623        ;;
2624
2625        "Haiku")
2626            mem_total="$(($(sysinfo -mem | awk -F '\\/ |)' '{print $2; exit}') / 1024 / 1024))"
2627            mem_used="$(sysinfo -mem | awk -F '\\/|)' '{print $2; exit}')"
2628            mem_used="$((${mem_used/max} / 1024 / 1024))"
2629        ;;
2630
2631        "IRIX")
2632            IFS=$'\n' read -d "" -ra mem_cmd <<< "$(pmem)"
2633            IFS=" " read -ra mem_stat <<< "${mem_cmd[0]}"
2634
2635            mem_total="$((mem_stat[3] / 1024))"
2636            mem_free="$((mem_stat[5] / 1024))"
2637            mem_used="$((mem_total - mem_free))"
2638        ;;
2639
2640        "FreeMiNT")
2641            mem="$(awk -F ':|kB' '/MemTotal:|MemFree:/ {printf $2, " "}' /kern/meminfo)"
2642            mem_free="${mem/*  }"
2643            mem_total="${mem/$mem_free}"
2644            mem_used="$((mem_total - mem_free))"
2645            mem_total="$((mem_total / 1024))"
2646            mem_used="$((mem_used / 1024))"
2647        ;;
2648
2649    esac
2650
2651    [[ "$memory_percent" == "on" ]] && ((mem_perc=mem_used * 100 / mem_total))
2652
2653    case $memory_unit in
2654        gib)
2655            mem_used=$(awk '{printf "%.2f", $1 / $2}' <<< "$mem_used 1024")
2656            mem_total=$(awk '{printf "%.2f", $1 / $2}' <<< "$mem_total 1024")
2657            mem_label=GiB
2658        ;;
2659
2660        kib)
2661            mem_used=$((mem_used * 1024))
2662            mem_total=$((mem_total * 1024))
2663            mem_label=KiB
2664        ;;
2665    esac
2666
2667    memory="${mem_used}${mem_label:-MiB} / ${mem_total}${mem_label:-MiB} ${mem_perc:+(${mem_perc}%)}"
2668
2669    # Bars.
2670    case $memory_display in
2671        "bar")     memory="$(bar "${mem_used}" "${mem_total}")" ;;
2672        "infobar") memory="${memory} $(bar "${mem_used}" "${mem_total}")" ;;
2673        "barinfo") memory="$(bar "${mem_used}" "${mem_total}")${info_color} ${memory}" ;;
2674    esac
2675}
2676
2677get_song() {
2678    players=(
2679        "amarok"
2680        "audacious"
2681        "banshee"
2682        "bluemindo"
2683        "clementine"
2684        "cmus"
2685        "deadbeef"
2686        "deepin-music"
2687        "dragon"
2688        "elisa"
2689        "exaile"
2690        "gnome-music"
2691        "gmusicbrowser"
2692        "gogglesmm"
2693        "guayadeque"
2694        "io.elementary.music"
2695        "iTunes"
2696        "juk"
2697        "lollypop"
2698        "mocp"
2699        "mopidy"
2700        "mpd"
2701        "muine"
2702        "netease-cloud-music"
2703        "olivia"
2704        "plasma-browser-integration"
2705        "playerctl"
2706        "pogo"
2707        "pragha"
2708        "qmmp"
2709        "quodlibet"
2710        "rhythmbox"
2711        "sayonara"
2712        "smplayer"
2713        "spotify"
2714        "Spotify"
2715        "strawberry"
2716        "tauonmb"
2717        "tomahawk"
2718        "vlc"
2719        "xmms2d"
2720        "xnoise"
2721        "yarock"
2722    )
2723
2724    printf -v players "|%s" "${players[@]}"
2725    player="$(ps aux | awk -v pattern="(${players:1})" \
2726        '!/ awk / && !/iTunesHelper/ && match($0,pattern){print substr($0,RSTART,RLENGTH); exit}')"
2727
2728    [[ "$music_player" && "$music_player" != "auto" ]] && player="$music_player"
2729
2730    get_song_dbus() {
2731        # Multiple players use an almost identical dbus command to get the information.
2732        # This function saves us using the same command throughout the function.
2733        song="$(\
2734            dbus-send --print-reply --dest=org.mpris.MediaPlayer2."${1}" /org/mpris/MediaPlayer2 \
2735            org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' \
2736            string:'Metadata' |\
2737            awk -F '"' 'BEGIN {RS=" entry"}; /"xesam:artist"/ {a = $4} /"xesam:album"/ {b = $4}
2738                        /"xesam:title"/ {t = $4} END {print a " \n" b " \n" t}'
2739        )"
2740    }
2741
2742    case ${player/*\/} in
2743        "mocp"*)          song="$(mocp -Q '%artist \n%album \n%song')" ;;
2744        "deadbeef"*)      song="$(deadbeef --nowplaying-tf '%artist% \\n%album% \\n%title%')" ;;
2745        "qmmp"*)          song="$(qmmp --nowplaying '%p \n%a \n%t')" ;;
2746        "gnome-music"*)   get_song_dbus "GnomeMusic" ;;
2747        "lollypop"*)      get_song_dbus "Lollypop" ;;
2748        "clementine"*)    get_song_dbus "clementine" ;;
2749        "juk"*)           get_song_dbus "juk" ;;
2750        "bluemindo"*)     get_song_dbus "Bluemindo" ;;
2751        "guayadeque"*)    get_song_dbus "guayadeque" ;;
2752        "yarock"*)        get_song_dbus "yarock" ;;
2753        "deepin-music"*)  get_song_dbus "DeepinMusic" ;;
2754        "tomahawk"*)      get_song_dbus "tomahawk" ;;
2755        "elisa"*)         get_song_dbus "elisa" ;;
2756        "sayonara"*)      get_song_dbus "sayonara" ;;
2757        "audacious"*)     get_song_dbus "audacious" ;;
2758        "vlc"*)           get_song_dbus "vlc" ;;
2759        "gmusicbrowser"*) get_song_dbus "gmusicbrowser" ;;
2760        "pragha"*)        get_song_dbus "pragha" ;;
2761        "amarok"*)        get_song_dbus "amarok" ;;
2762        "dragon"*)        get_song_dbus "dragonplayer" ;;
2763        "smplayer"*)      get_song_dbus "smplayer" ;;
2764        "rhythmbox"*)     get_song_dbus "rhythmbox" ;;
2765        "strawberry"*)    get_song_dbus "strawberry" ;;
2766        "gogglesmm"*)     get_song_dbus "gogglesmm" ;;
2767        "xnoise"*)        get_song_dbus "xnoise" ;;
2768        "tauonmb"*)       get_song_dbus "tauon" ;;
2769        "olivia"*)        get_song_dbus "olivia" ;;
2770        "netease-cloud-music"*)        get_song_dbus "netease-cloud-music" ;;
2771        "plasma-browser-integration"*) get_song_dbus "plasma-browser-integration" ;;
2772        "io.elementary.music"*)        get_song_dbus "Music" ;;
2773
2774        "mpd"* | "mopidy"*)
2775            song="$(mpc -f '%artist% \n%album% \n%title%' current "${mpc_args[@]}")"
2776        ;;
2777
2778        "xmms2d"*)
2779            song="$(xmms2 current -f "\${artist}"$' \n'"\${album}"$' \n'"\${title}")"
2780        ;;
2781
2782        "cmus"*)
2783            # NOTE: cmus >= 2.8.0 supports mpris2
2784            song="$(cmus-remote -Q | awk '/tag artist/ {$1=$2=""; a=$0}
2785                                          /tag album / {$1=$2=""; b=$0}
2786                                          /tag title/  {$1=$2=""; t=$0}
2787                                          END {print a " \n" b " \n" t}')"
2788        ;;
2789
2790        "spotify"*)
2791            case $os in
2792                "Linux") get_song_dbus "spotify" ;;
2793
2794                "Mac OS X"|"macOS")
2795                    song="$(osascript -e 'tell application "Spotify" to artist of current track as¬
2796                                          string & "\n" & album of current track as¬
2797                                          string & "\n" & name of current track as string')"
2798                ;;
2799            esac
2800        ;;
2801
2802        "itunes"*)
2803            song="$(osascript -e 'tell application "iTunes" to artist of current track as¬
2804                                  string & "\n" & album of current track as¬
2805                                  string & "\n" & name of current track as string')"
2806        ;;
2807
2808        "banshee"*)
2809            song="$(banshee --query-artist --query-album --query-title |\
2810                    awk -F':' '/^artist/ {a=$2} /^album/ {b=$2} /^title/ {t=$2}
2811                               END {print a " \n" b " \n"t}')"
2812        ;;
2813
2814        "exaile"*)
2815            # NOTE: Exaile >= 4.0.0 will support mpris2.
2816            song="$(dbus-send --print-reply --dest=org.exaile.Exaile \
2817                    /org/exaile/Exaile org.exaile.Exaile.Query |
2818                    awk -F ':' '{sub(",[^,]*$", "", $3); t=$3;
2819                                 sub(",[^,]*$", "", $4); a=$4;
2820                                 sub(",[^,]*$", "", $5); b=$5}
2821                                 END {print a " \n" b " \n" t}')"
2822        ;;
2823
2824        "muine"*)
2825            song="$(dbus-send --print-reply --dest=org.gnome.Muine /org/gnome/Muine/Player \
2826                    org.gnome.Muine.Player.GetCurrentSong |
2827                    awk -F':' '/^artist/ {a=$2} /^album/ {b=$2} /^title/ {t=$2}
2828                               END {print a " \n" b " \n" t}')"
2829        ;;
2830
2831        "quodlibet"*)
2832            song="$(dbus-send --print-reply --dest=net.sacredchao.QuodLibet \
2833                    /net/sacredchao/QuodLibet net.sacredchao.QuodLibet.CurrentSong |\
2834                    awk -F'"' 'BEGIN {RS=" entry"}; /"artist"/ {a=$4} /"album"/ {b=$4}
2835                    /"title"/ {t=$4} END {print a " \n" b " \n" t}')"
2836        ;;
2837
2838        "pogo"*)
2839            song="$(dbus-send --print-reply --dest=org.mpris.pogo /Player \
2840                    org.freedesktop.MediaPlayer.GetMetadata |
2841                    awk -F'"' 'BEGIN {RS=" entry"}; /"artist"/ {a=$4} /"album"/ {b=$4}
2842                    /"title"/ {t=$4} END {print a " \n" b " \n" t}')"
2843        ;;
2844
2845        "playerctl"*)
2846            song="$(playerctl metadata --format '{{ artist }} \n{{ album }} \n{{ title }}')"
2847         ;;
2848
2849        *) mpc &>/dev/null && song="$(mpc -f '%artist% \n%album% \n%title%' current)" || return ;;
2850    esac
2851
2852    IFS=$'\n' read -d "" -r artist album title <<< "${song//'\n'/$'\n'}"
2853
2854    # Make sure empty tags are truly empty.
2855    artist="$(trim "$artist")"
2856    album="$(trim "$album")"
2857    title="$(trim "$title")"
2858
2859    # Set default values if no tags were found.
2860    : "${artist:=Unknown Artist}" "${album:=Unknown Album}" "${title:=Unknown Song}"
2861
2862    # Display Artist, Album and Title on separate lines.
2863    if [[ "$song_shorthand" == "on" ]]; then
2864        prin "Artist" "$artist"
2865        prin "Album"  "$album"
2866        prin "Song"   "$title"
2867    else
2868        song="${song_format/\%artist\%/$artist}"
2869        song="${song/\%album\%/$album}"
2870        song="${song/\%title\%/$title}"
2871    fi
2872}
2873
2874get_resolution() {
2875    case $os in
2876        "Mac OS X"|"macOS")
2877            if type -p screenresolution >/dev/null; then
2878                resolution="$(screenresolution get 2>&1 | awk '/Display/ {printf $6 "Hz, "}')"
2879                resolution="${resolution//x??@/ @ }"
2880
2881            else
2882                resolution="$(system_profiler SPDisplaysDataType |\
2883                              awk '/Resolution:/ {printf $2"x"$4" @ "$6"Hz, "}')"
2884            fi
2885
2886            if [[ -e "/Library/Preferences/com.apple.windowserver.plist" ]]; then
2887                scale_factor="$(PlistBuddy -c "Print DisplayAnyUserSets:0:0:Resolution" \
2888                                /Library/Preferences/com.apple.windowserver.plist)"
2889            else
2890                scale_factor=""
2891            fi
2892
2893            # If no refresh rate is empty.
2894            [[ "$resolution" == *"@ Hz"* ]] && \
2895                resolution="${resolution//@ Hz}"
2896
2897            [[ "${scale_factor%.*}" == 2 ]] && \
2898                resolution="${resolution// @/@2x @}"
2899
2900            if [[ "$refresh_rate" == "off" ]]; then
2901                resolution="${resolution// @ [0-9][0-9]Hz}"
2902                resolution="${resolution// @ [0-9][0-9][0-9]Hz}"
2903            fi
2904
2905            [[ "$resolution" == *"0Hz"* ]] && \
2906                resolution="${resolution// @ 0Hz}"
2907        ;;
2908
2909        "Windows")
2910            IFS=$'\n' read -d "" -ra sw \
2911                <<< "$(wmic path Win32_VideoController get CurrentHorizontalResolution)"
2912
2913            IFS=$'\n' read -d "" -ra sh \
2914                <<< "$(wmic path Win32_VideoController get CurrentVerticalResolution)"
2915
2916            sw=("${sw[@]//CurrentHorizontalResolution}")
2917            sh=("${sh[@]//CurrentVerticalResolution}")
2918
2919            for ((mn = 0; mn < ${#sw[@]}; mn++)) {
2920                [[ ${sw[mn]//[[:space:]]} && ${sh[mn]//[[:space:]]} ]] &&
2921                    resolution+="${sw[mn]//[[:space:]]}x${sh[mn]//[[:space:]]}, "
2922            }
2923
2924            resolution=${resolution%,}
2925        ;;
2926
2927        "Haiku")
2928            resolution="$(screenmode | awk -F ' |, ' 'END{printf $2 "x" $3 " @ " $6 $7}')"
2929
2930            [[ "$refresh_rate" == "off" ]] && resolution="${resolution/ @*}"
2931        ;;
2932
2933        "FreeMiNT")
2934            # Need to block X11 queries
2935        ;;
2936
2937        *)
2938            if type -p xrandr >/dev/null && [[ $DISPLAY && -z $WAYLAND_DISPLAY ]]; then
2939                case $refresh_rate in
2940                    "on")
2941                        resolution="$(xrandr --nograb --current |\
2942                                      awk 'match($0,/[0-9]*\.[0-9]*\*/) {
2943                                           printf $1 " @ " substr($0,RSTART,RLENGTH) "Hz, "}')"
2944                    ;;
2945
2946                    "off")
2947                        resolution="$(xrandr --nograb --current |\
2948                                      awk -F 'connected |\\+|\\(' \
2949                                             '/ connected.*[0-9]+x[0-9]+\+/ && $2 {printf $2 ", "}')"
2950
2951                        resolution="${resolution/primary, }"
2952                        resolution="${resolution/primary }"
2953                    ;;
2954                esac
2955                resolution="${resolution//\*}"
2956
2957            elif type -p xwininfo >/dev/null && [[ $DISPLAY && -z $WAYLAND_DISPLAY ]]; then
2958                read -r w h \
2959                    <<< "$(xwininfo -root | awk -F':' '/Width|Height/ {printf $2}')"
2960                resolution="${w}x${h}"
2961
2962            elif type -p xdpyinfo >/dev/null && [[ $DISPLAY && -z $WAYLAND_DISPLAY ]]; then
2963                resolution="$(xdpyinfo | awk '/dimensions:/ {printf $2}')"
2964
2965            elif [[ -d /sys/class/drm ]]; then
2966                for dev in /sys/class/drm/*/modes; do
2967                    read -r resolution _ < "$dev"
2968
2969                    [[ $resolution ]] && break
2970                done
2971            fi
2972        ;;
2973    esac
2974
2975    resolution="${resolution%,*}"
2976    [[ -z "${resolution/x}" ]] && resolution=
2977}
2978
2979get_style() {
2980    # Fix weird output when the function is run multiple times.
2981    unset gtk2_theme gtk3_theme theme path
2982
2983    if [[ "$DISPLAY" && $os != "Mac OS X" && $os != "macOS" ]]; then
2984        # Get DE if user has disabled the function.
2985        ((de_run != 1)) && get_de
2986
2987        # Remove version from '$de'.
2988        [[ $de_version == on ]] && de=${de/ *}
2989
2990        # Check for DE Theme.
2991        case $de in
2992            "KDE"* | "Plasma"*)
2993                kde_config_dir
2994
2995                if [[ -f "${kde_config_dir}/kdeglobals" ]]; then
2996                    kde_config_file="${kde_config_dir}/kdeglobals"
2997
2998                    kde_theme="$(grep "^${kde}" "$kde_config_file")"
2999                    kde_theme="${kde_theme/*=}"
3000                    if [[ "$kde" == "font" ]]; then
3001                        kde_font_size="${kde_theme#*,}"
3002                        kde_font_size="${kde_font_size/,*}"
3003                        kde_theme="${kde_theme/,*} ${kde_theme/*,} ${kde_font_size}"
3004                    fi
3005                    kde_theme="$kde_theme [$de], "
3006                else
3007                    err "Theme: KDE config files not found, skipping."
3008                fi
3009            ;;
3010
3011            *"Cinnamon"*)
3012                if type -p gsettings >/dev/null; then
3013                    gtk3_theme="$(gsettings get org.cinnamon.desktop.interface "$gsettings")"
3014                    gtk2_theme="$gtk3_theme"
3015                fi
3016            ;;
3017
3018            "Gnome"* | "Unity"* | "Budgie"*)
3019                if type -p gsettings >/dev/null; then
3020                    gtk3_theme="$(gsettings get org.gnome.desktop.interface "$gsettings")"
3021                    gtk2_theme="$gtk3_theme"
3022
3023                elif type -p gconftool-2 >/dev/null; then
3024                    gtk2_theme="$(gconftool-2 -g /desktop/gnome/interface/"$gconf")"
3025                fi
3026            ;;
3027
3028            "Mate"*)
3029                gtk3_theme="$(gsettings get org.mate.interface "$gsettings")"
3030                gtk2_theme="$gtk3_theme"
3031            ;;
3032
3033            "Xfce"*)
3034                type -p xfconf-query >/dev/null && \
3035                    gtk2_theme="$(xfconf-query -c xsettings -p "$xfconf")"
3036            ;;
3037        esac
3038
3039        # Check for general GTK2 Theme.
3040        if [[ -z "$gtk2_theme" ]]; then
3041            if [[ -n "$GTK2_RC_FILES" ]]; then
3042                IFS=: read -ra rc_files <<< "$GTK2_RC_FILES"
3043                gtk2_theme="$(grep "^[^#]*${name}" "${rc_files[@]}")"
3044            elif [[ -f "${HOME}/.gtkrc-2.0"  ]]; then
3045                gtk2_theme="$(grep "^[^#]*${name}" "${HOME}/.gtkrc-2.0")"
3046
3047            elif [[ -f "/etc/gtk-2.0/gtkrc" ]]; then
3048                gtk2_theme="$(grep "^[^#]*${name}" /etc/gtk-2.0/gtkrc)"
3049
3050            elif [[ -f "/usr/share/gtk-2.0/gtkrc" ]]; then
3051                gtk2_theme="$(grep "^[^#]*${name}" /usr/share/gtk-2.0/gtkrc)"
3052
3053            fi
3054
3055            gtk2_theme="${gtk2_theme/*${name}*=}"
3056        fi
3057
3058        # Check for general GTK3 Theme.
3059        if [[ -z "$gtk3_theme" ]]; then
3060            if [[ -f "${XDG_CONFIG_HOME}/gtk-3.0/settings.ini" ]]; then
3061                gtk3_theme="$(grep "^[^#]*$name" "${XDG_CONFIG_HOME}/gtk-3.0/settings.ini")"
3062
3063            elif type -p gsettings >/dev/null; then
3064                gtk3_theme="$(gsettings get org.gnome.desktop.interface "$gsettings")"
3065
3066            elif [[ -f "/etc/gtk-3.0/settings.ini" ]]; then
3067                gtk3_theme="$(grep "^[^#]*$name" /etc/gtk-3.0/settings.ini)"
3068
3069            elif [[ -f "/usr/share/gtk-3.0/settings.ini" ]]; then
3070                gtk3_theme="$(grep "^[^#]*$name" /usr/share/gtk-3.0/settings.ini)"
3071            fi
3072
3073            gtk3_theme="${gtk3_theme/${name}*=}"
3074        fi
3075
3076        # Trim whitespace.
3077        gtk2_theme="$(trim "$gtk2_theme")"
3078        gtk3_theme="$(trim "$gtk3_theme")"
3079
3080        # Remove quotes.
3081        gtk2_theme="$(trim_quotes "$gtk2_theme")"
3082        gtk3_theme="$(trim_quotes "$gtk3_theme")"
3083
3084        # Toggle visibility of GTK themes.
3085        [[ "$gtk2" == "off" ]] && unset gtk2_theme
3086        [[ "$gtk3" == "off" ]] && unset gtk3_theme
3087
3088        # Format the string based on which themes exist.
3089        if [[ "$gtk2_theme" && "$gtk2_theme" == "$gtk3_theme" ]]; then
3090            gtk3_theme+=" [GTK2/3]"
3091            unset gtk2_theme
3092
3093        elif [[ "$gtk2_theme" && "$gtk3_theme" ]]; then
3094            gtk2_theme+=" [GTK2], "
3095            gtk3_theme+=" [GTK3] "
3096
3097        else
3098            [[ "$gtk2_theme" ]] && gtk2_theme+=" [GTK2] "
3099            [[ "$gtk3_theme" ]] && gtk3_theme+=" [GTK3] "
3100        fi
3101
3102        # Final string.
3103        theme="${kde_theme}${gtk2_theme}${gtk3_theme}"
3104        theme="${theme%, }"
3105
3106        # Make the output shorter by removing "[GTKX]" from the string.
3107        if [[ "$gtk_shorthand" == "on" ]]; then
3108            theme="${theme// '[GTK'[0-9]']'}"
3109            theme="${theme/ '[GTK2/3]'}"
3110            theme="${theme/ '[KDE]'}"
3111            theme="${theme/ '[Plasma]'}"
3112        fi
3113    fi
3114}
3115
3116get_theme() {
3117    name="gtk-theme-name"
3118    gsettings="gtk-theme"
3119    gconf="gtk_theme"
3120    xfconf="/Net/ThemeName"
3121    kde="Name"
3122
3123    get_style
3124}
3125
3126get_icons() {
3127    name="gtk-icon-theme-name"
3128    gsettings="icon-theme"
3129    gconf="icon_theme"
3130    xfconf="/Net/IconThemeName"
3131    kde="Theme"
3132
3133    get_style
3134    icons="$theme"
3135}
3136
3137get_font() {
3138    name="gtk-font-name"
3139    gsettings="font-name"
3140    gconf="font_theme"
3141    xfconf="/Gtk/FontName"
3142    kde="font"
3143
3144    get_style
3145    font="$theme"
3146}
3147
3148get_term() {
3149    # If function was run, stop here.
3150    ((term_run == 1)) && return
3151
3152    # Workaround for macOS systems that
3153    # don't support the block below.
3154    case $TERM_PROGRAM in
3155        "iTerm.app")    term="iTerm2" ;;
3156        "Terminal.app") term="Apple Terminal" ;;
3157        "Hyper")        term="HyperTerm" ;;
3158        *)              term="${TERM_PROGRAM/\.app}" ;;
3159    esac
3160
3161    # Most likely TosWin2 on FreeMiNT - quick check
3162    [[ "$TERM" == "tw52" || "$TERM" == "tw100" ]] && term="TosWin2"
3163    [[ "$SSH_CONNECTION" ]] && term="$SSH_TTY"
3164    [[ "$WT_SESSION" ]]     && term="Windows Terminal"
3165
3166    # Check $PPID for terminal emulator.
3167    while [[ -z "$term" ]]; do
3168        parent="$(get_ppid "$parent")"
3169        [[ -z "$parent" ]] && break
3170        name="$(get_process_name "$parent")"
3171
3172        case ${name// } in
3173            "${SHELL/*\/}"|*"sh"|"screen"|"su"*) ;;
3174
3175            "login"*|*"Login"*|"init"|"(init)")
3176                term="$(tty)"
3177            ;;
3178
3179            "ruby"|"1"|"tmux"*|"systemd"|"sshd"*|"python"*|"USER"*"PID"*|"kdeinit"*|"launchd"*)
3180                break
3181            ;;
3182
3183            "gnome-terminal-") term="gnome-terminal" ;;
3184            "urxvtd")          term="urxvt" ;;
3185            *"nvim")           term="Neovim Terminal" ;;
3186            *"NeoVimServer"*)  term="VimR Terminal" ;;
3187
3188            *)
3189                # Fix issues with long process names on Linux.
3190                [[ $os == Linux ]] && term=$(realpath "/proc/$parent/exe")
3191
3192                term="${name##*/}"
3193
3194                # Fix wrapper names in Nix.
3195                [[ $term == .*-wrapped ]] && {
3196                   term="${term#.}"
3197                   term="${term%-wrapped}"
3198                }
3199            ;;
3200        esac
3201    done
3202
3203    # Log that the function was run.
3204    term_run=1
3205}
3206
3207get_term_font() {
3208    ((term_run != 1)) && get_term
3209
3210    case $term in
3211        "alacritty"*)
3212            shopt -s nullglob
3213            confs=({$XDG_CONFIG_HOME,$HOME}/{alacritty,}/{.,}alacritty.ym?)
3214            shopt -u nullglob
3215
3216            [[ -f "${confs[0]}" ]] || return
3217
3218            term_font="$(awk -F ':|#' '/normal:/ {getline; print}' "${confs[0]}")"
3219            term_font="${term_font/*family:}"
3220            term_font="${term_font/$'\n'*}"
3221            term_font="${term_font/\#*}"
3222        ;;
3223
3224        "Apple_Terminal")
3225            term_font="$(osascript <<END
3226                         tell application "Terminal" to font name of window frontmost
3227END
3228)"
3229        ;;
3230
3231        "iTerm2")
3232            # Unfortunately the profile name is not unique, but it seems to be the only thing
3233            # that identifies an active profile. There is the "id of current session of current win-
3234            # dow" though, but that does not match to a guid in the plist.
3235            # So, be warned, collisions may occur!
3236            # See: https://groups.google.com/forum/#!topic/iterm2-discuss/0tO3xZ4Zlwg
3237            local current_profile_name profiles_count profile_name diff_font
3238
3239            current_profile_name="$(osascript <<END
3240                                    tell application "iTerm2" to profile name \
3241                                    of current session of current window
3242END
3243)"
3244
3245            # Warning: Dynamic profiles are not taken into account here!
3246            # https://www.iterm2.com/documentation-dynamic-profiles.html
3247            font_file="${HOME}/Library/Preferences/com.googlecode.iterm2.plist"
3248
3249            # Count Guids in "New Bookmarks"; they should be unique
3250            profiles_count="$(PlistBuddy -c "Print ':New Bookmarks:'" "$font_file" | \
3251                              grep -w -c "Guid")"
3252
3253            for ((i=0; i<profiles_count; i++)); do
3254                profile_name="$(PlistBuddy -c "Print ':New Bookmarks:${i}:Name:'" "$font_file")"
3255
3256                if [[ "$profile_name" == "$current_profile_name" ]]; then
3257                    # "Normal Font"
3258                    term_font="$(PlistBuddy -c "Print ':New Bookmarks:${i}:Normal Font:'" \
3259                                 "$font_file")"
3260
3261                    # Font for non-ascii characters
3262                    # Only check for a different non-ascii font, if the user checked
3263                    # the "use a different font for non-ascii text" switch.
3264                    diff_font="$(PlistBuddy -c "Print ':New Bookmarks:${i}:Use Non-ASCII Font:'" \
3265                                 "$font_file")"
3266
3267                    if [[ "$diff_font" == "true" ]]; then
3268                        non_ascii="$(PlistBuddy -c "Print ':New Bookmarks:${i}:Non Ascii Font:'" \
3269                                     "$font_file")"
3270
3271                        [[ "$term_font" != "$non_ascii" ]] && \
3272                            term_font="$term_font (normal) / $non_ascii (non-ascii)"
3273                    fi
3274                fi
3275            done
3276        ;;
3277
3278        "deepin-terminal"*)
3279            term_font="$(awk -F '=' '/font=/ {a=$2} /font_size/ {b=$2} END {print a,b}' \
3280                         "${XDG_CONFIG_HOME}/deepin/deepin-terminal/config.conf")"
3281        ;;
3282
3283        "GNUstep_Terminal")
3284             term_font="$(awk -F '>|<' '/>TerminalFont</ {getline; f=$3}
3285                          />TerminalFontSize</ {getline; s=$3} END {print f,s}' \
3286                          "${HOME}/GNUstep/Defaults/Terminal.plist")"
3287        ;;
3288
3289        "Hyper"*)
3290            term_font="$(awk -F':|,' '/fontFamily/ {print $2; exit}' "${HOME}/.hyper.js")"
3291            term_font="$(trim_quotes "$term_font")"
3292        ;;
3293
3294        "kitty"*)
3295            kitty_config="$(kitty --debug-config)"
3296            [[ "$kitty_config" != *font_family* ]] && return
3297
3298            term_font="$(awk '/^font_family|^font_size/ {$1="";gsub("^ *","",$0);print $0}' \
3299                         <<< "$kitty_config")"
3300        ;;
3301
3302        "konsole" | "yakuake")
3303            # Get Process ID of current konsole window / tab
3304            child="$(get_ppid "$$")"
3305
3306            QT_BINDIR="$(qtpaths --binaries-dir)" && PATH+=":$QT_BINDIR"
3307
3308            IFS=$'\n' read -d "" -ra konsole_instances \
3309                <<< "$(qdbus | awk '/org.kde.konsole/ {print $1}')"
3310
3311            for i in "${konsole_instances[@]}"; do
3312                IFS=$'\n' read -d "" -ra konsole_sessions <<< "$(qdbus "$i" | grep -F '/Sessions/')"
3313
3314                for session in "${konsole_sessions[@]}"; do
3315                    if ((child == "$(qdbus "$i" "$session" processId)")); then
3316                        profile="$(qdbus "$i" "$session" environment |\
3317                                   awk -F '=' '/KONSOLE_PROFILE_NAME/ {print $2}')"
3318                        [[ $profile ]] || profile="$(qdbus "$i" "$session" profile)"
3319                        break
3320                    fi
3321                done
3322                [[ $profile ]] && break
3323            done
3324
3325            [[ $profile ]] || return
3326
3327            # We could have two profile files for the same profile name, take first match
3328            profile_filename="$(grep -l "Name=${profile}" "$HOME"/.local/share/konsole/*.profile)"
3329            profile_filename="${profile_filename/$'\n'*}"
3330
3331            [[ $profile_filename ]] && \
3332                term_font="$(awk -F '=|,' '/Font=/ {print $2,$3}' "$profile_filename")"
3333        ;;
3334
3335        "lxterminal"*)
3336            term_font="$(awk -F '=' '/fontname=/ {print $2; exit}' \
3337                         "${XDG_CONFIG_HOME}/lxterminal/lxterminal.conf")"
3338        ;;
3339
3340        "mate-terminal")
3341            # To get the actual config we have to create a temporarily file with the
3342            # --save-config option.
3343            mateterm_config="/tmp/mateterm.cfg"
3344
3345            # Ensure /tmp exists and we do not overwrite anything.
3346            if [[ -d "/tmp" && ! -f "$mateterm_config" ]]; then
3347                mate-terminal --save-config="$mateterm_config"
3348
3349                role="$(xprop -id "${WINDOWID}" WM_WINDOW_ROLE)"
3350                role="${role##* }"
3351                role="${role//\"}"
3352
3353                profile="$(awk -F '=' -v r="$role" \
3354                                  '$0~r {
3355                                            getline;
3356                                            if(/Maximized/) getline;
3357                                            if(/Fullscreen/) getline;
3358                                            id=$2"]"
3359                                         } $0~id {if(id) {getline; print $2; exit}}' \
3360                           "$mateterm_config")"
3361
3362                rm -f "$mateterm_config"
3363
3364                mate_get() {
3365                   gsettings get org.mate.terminal.profile:/org/mate/terminal/profiles/"$1"/ "$2"
3366                }
3367
3368                if [[ "$(mate_get "$profile" "use-system-font")" == "true" ]]; then
3369                    term_font="$(gsettings get org.mate.interface monospace-font-name)"
3370                else
3371                    term_font="$(mate_get "$profile" "font")"
3372                fi
3373                term_font="$(trim_quotes "$term_font")"
3374            fi
3375        ;;
3376
3377        "mintty")
3378            term_font="$(awk -F '=' '!/^($|#)/ && /Font/ {printf $2; exit}' "${HOME}/.minttyrc")"
3379        ;;
3380
3381        "pantheon"*)
3382            term_font="$(gsettings get org.pantheon.terminal.settings font)"
3383
3384            [[ -z "${term_font//\'}" ]] && \
3385                term_font="$(gsettings get org.gnome.desktop.interface monospace-font-name)"
3386
3387            term_font="$(trim_quotes "$term_font")"
3388        ;;
3389
3390        "qterminal")
3391            term_font="$(awk -F '=' '/fontFamily=/ {a=$2} /fontSize=/ {b=$2} END {print a,b}' \
3392                         "${XDG_CONFIG_HOME}/qterminal.org/qterminal.ini")"
3393        ;;
3394
3395        "sakura"*)
3396            term_font="$(awk -F '=' '/^font=/ {print $2; exit}' \
3397                         "${XDG_CONFIG_HOME}/sakura/sakura.conf")"
3398        ;;
3399
3400        "st")
3401            term_font="$(ps -o command= -p "$parent" | grep -F -- "-f")"
3402
3403            if [[ "$term_font" ]]; then
3404                term_font="${term_font/*-f/}"
3405                term_font="${term_font/ -*/}"
3406
3407            else
3408                # On Linux we can get the exact path to the running binary through the procfs
3409                # (in case `st` is launched from outside of $PATH) on other systems we just
3410                # have to guess and assume `st` is invoked from somewhere in the users $PATH
3411                [[ -L "/proc/$parent/exe" ]] && binary="/proc/$parent/exe" || binary="$(type -p st)"
3412
3413                # Grep the output of strings on the `st` binary for anything that looks vaguely
3414                # like a font definition. NOTE: There is a slight limitation in this approach.
3415                # Technically "Font Name" is a valid font. As it doesn't specify any font options
3416                # though it is hard to match it correctly amongst the rest of the noise.
3417                [[ -n "$binary" ]] && \
3418                    term_font="$(strings "$binary" | grep -F -m 1 \
3419                                                          -e "pixelsize=" \
3420                                                          -e "size=" \
3421                                                          -e "antialias=" \
3422                                                          -e "autohint=")"
3423            fi
3424
3425            term_font="${term_font/xft:}"
3426            term_font="${term_font/:*}"
3427        ;;
3428
3429        "terminology")
3430            term_font="$(strings "${XDG_CONFIG_HOME}/terminology/config/standard/base.cfg" |\
3431                         awk '/^font\.name$/{print a}{a=$0}')"
3432            term_font="${term_font/.pcf}"
3433            term_font="${term_font/:*}"
3434        ;;
3435
3436        "termite")
3437            [[ -f "${XDG_CONFIG_HOME}/termite/config" ]] && \
3438                termite_config="${XDG_CONFIG_HOME}/termite/config"
3439
3440            term_font="$(awk -F '= ' '/\[options\]/ {
3441                                          opt=1
3442                                      }
3443                                      /^\s*font/ {
3444                                          if(opt==1) a=$2;
3445                                          opt=0
3446                                      } END {print a}' "/etc/xdg/termite/config" \
3447                         "$termite_config")"
3448        ;;
3449
3450        urxvt|urxvtd|rxvt-unicode|xterm)
3451            xrdb=$(xrdb -query)
3452            term_font=$(grep -im 1 -e "^${term/d}"'\**\.*font:' -e '^\*font:' <<< "$xrdb")
3453            term_font=${term_font/*"*font:"}
3454            term_font=${term_font/*".font:"}
3455            term_font=${term_font/*"*.font:"}
3456            term_font=$(trim "$term_font")
3457
3458            [[ -z $term_font && $term == xterm ]] && \
3459                term_font=$(grep '^XTerm.vt100.faceName' <<< "$xrdb")
3460
3461            term_font=$(trim "${term_font/*"faceName:"}")
3462
3463            # xft: isn't required at the beginning so we prepend it if it's missing
3464            [[ ${term_font:0:1} != '-' && ${term_font:0:4} != xft: ]] && \
3465                term_font=xft:$term_font
3466
3467            # Xresources has two different font formats, this checks which
3468            # one is in use and formats it accordingly.
3469            case $term_font in
3470                *xft:*)
3471                    term_font=${term_font/xft:}
3472                    term_font=${term_font/:*}
3473                ;;
3474
3475                -*)
3476                    IFS=- read -r _ _ term_font _ <<< "$term_font"
3477                ;;
3478            esac
3479        ;;
3480
3481        "xfce4-terminal")
3482            term_font="$(awk -F '=' '/^FontName/{a=$2}/^FontUseSystem=TRUE/{a=$0} END {print a}' \
3483                         "${XDG_CONFIG_HOME}/xfce4/terminal/terminalrc")"
3484
3485            [[ "$term_font" == "FontUseSystem=TRUE" ]] && \
3486                term_font="$(gsettings get org.gnome.desktop.interface monospace-font-name)"
3487
3488            term_font="$(trim_quotes "$term_font")"
3489
3490            # Default fallback font hardcoded in terminal-preferences.c
3491            [[ -z "$term_font" ]] && term_font="Monospace 12"
3492        ;;
3493
3494        conemu-*)
3495            # Could have used `eval set -- "$ConEmuArgs"` instead for arg parsing.
3496            readarray -t ce_arg_list < <(xargs -n1 printf "%s\n" <<< "${ConEmuArgs-}")
3497
3498            for ce_arg_idx in "${!ce_arg_list[@]}"; do
3499                # Search for "-LoadCfgFile" arg
3500                [[ "${ce_arg_list[$ce_arg_idx]}" == -LoadCfgFile ]] && {
3501                    # Conf path is the next arg
3502                    ce_conf=${ce_arg_list[++ce_arg_idx]}
3503                    break
3504                }
3505            done
3506
3507            # https://conemu.github.io/en/ConEmuXml.html#search-sequence
3508            for ce_conf in "$ce_conf" "${ConEmuDir-}\ConEmu.xml" "${ConEmuDir-}\.ConEmu.xml" \
3509                           "${ConEmuBaseDir-}\ConEmu.xml" "${ConEmuBaseDir-}\.ConEmu.xml" \
3510                           "$APPDATA\ConEmu.xml" "$APPDATA\.ConEmu.xml"; do
3511                # Search for first conf file available
3512                [[ -f "$ce_conf" ]] && {
3513                    # Very basic XML parsing
3514                    term_font="$(awk '/name="FontName"/ && match($0, /data="([^"]*)"/) {
3515                        print substr($0, RSTART+6, RLENGTH-7)}' "$ce_conf")"
3516                    break
3517                }
3518            done
3519
3520            # Null-terminated contents in /proc/registry files triggers a Bash warning.
3521            [[ "$term_font" ]] || read -r term_font < \
3522                /proc/registry/HKEY_CURRENT_USER/Software/ConEmu/.Vanilla/FontName
3523        ;;
3524    esac
3525}
3526
3527get_disk() {
3528    type -p df &>/dev/null ||
3529        { err "Disk requires 'df' to function. Install 'df' to get disk info."; return; }
3530
3531    df_version=$(df --version 2>&1)
3532
3533    case $df_version in
3534        *IMitv*)   df_flags=(-P -g) ;; # AIX
3535        *befhikm*) df_flags=(-P -k) ;; # IRIX
3536        *hiklnP*)  df_flags=(-h)    ;; # OpenBSD
3537
3538        *Tracker*) # Haiku
3539            err "Your version of df cannot be used due to the non-standard flags"
3540            return
3541        ;;
3542
3543        *) df_flags=(-P -h) ;;
3544    esac
3545
3546    # Create an array called 'disks' where each element is a separate line from
3547    # df's output. We then unset the first element which removes the column titles.
3548    IFS=$'\n' read -d "" -ra disks <<< "$(df "${df_flags[@]}" "${disk_show[@]:-/}")"
3549    unset "disks[0]"
3550
3551    # Stop here if 'df' fails to print disk info.
3552    [[ ${disks[*]} ]] || {
3553        err "Disk: df failed to print the disks, make sure the disk_show array is set properly."
3554        return
3555    }
3556
3557    for disk in "${disks[@]}"; do
3558        # Create a second array and make each element split at whitespace this time.
3559        IFS=" " read -ra disk_info <<< "$disk"
3560        disk_perc=${disk_info[-2]/\%}
3561
3562        case $disk_percent in
3563            off) disk_perc=
3564        esac
3565
3566        case $df_version in
3567            *befhikm*)
3568                disk="$((disk_info[-4]/1024/1024))G / $((disk_info[-5]/1024/1024))G"
3569                disk+="${disk_perc:+ ($disk_perc%)}"
3570            ;;
3571
3572            *)
3573                disk="${disk_info[-4]/i} / ${disk_info[-5]/i}${disk_perc:+ ($disk_perc%)}"
3574            ;;
3575        esac
3576
3577        case $disk_subtitle in
3578            name)
3579                disk_sub=${disk_info[*]::${#disk_info[@]}-5}
3580            ;;
3581
3582            dir)
3583                disk_sub=${disk_info[-1]/*\/}
3584                disk_sub=${disk_sub:-${disk_info[-1]}}
3585            ;;
3586
3587            none) ;;
3588
3589            *)
3590                disk_sub=${disk_info[-1]}
3591            ;;
3592        esac
3593
3594        case $disk_display in
3595            bar)     disk="$(bar "$disk_perc" "100")" ;;
3596            infobar) disk+=" $(bar "$disk_perc" "100")" ;;
3597            barinfo) disk="$(bar "$disk_perc" "100")${info_color} $disk" ;;
3598            perc)    disk="${disk_perc}% $(bar "$disk_perc" "100")" ;;
3599        esac
3600
3601        # Append '(disk mount point)' to the subtitle.
3602        if [[ "$subtitle" ]]; then
3603            prin "$subtitle${disk_sub:+ ($disk_sub)}" "$disk"
3604        else
3605            prin "$disk_sub" "$disk"
3606        fi
3607    done
3608}
3609
3610get_battery() {
3611    case $os in
3612        "Linux")
3613            # We use 'prin' here so that we can do multi battery support
3614            # with a single battery per line.
3615            for bat in "/sys/class/power_supply/"{BAT,axp288_fuel_gauge,CMB}*; do
3616                capacity="$(< "${bat}/capacity")"
3617                status="$(< "${bat}/status")"
3618
3619                if [[ "$capacity" ]]; then
3620                    battery="${capacity}% [${status}]"
3621
3622                    case $battery_display in
3623                        "bar")     battery="$(bar "$capacity" 100)" ;;
3624                        "infobar") battery+=" $(bar "$capacity" 100)" ;;
3625                        "barinfo") battery="$(bar "$capacity" 100)${info_color} ${battery}" ;;
3626                    esac
3627
3628                    bat="${bat/*axp288_fuel_gauge}"
3629                    prin "${subtitle:+${subtitle}${bat: -1}}" "$battery"
3630                fi
3631            done
3632            return
3633        ;;
3634
3635        "BSD")
3636            case $kernel_name in
3637                "FreeBSD"* | "DragonFly"*)
3638                    battery="$(acpiconf -i 0 | awk -F ':\t' '/Remaining capacity/ {print $2}')"
3639                    battery_state="$(acpiconf -i 0 | awk -F ':\t\t\t' '/State/ {print $2}')"
3640                ;;
3641
3642                "NetBSD"*)
3643                    battery="$(envstat | awk '\\(|\\)' '/charge:/ {print $2}')"
3644                    battery="${battery/\.*/%}"
3645                ;;
3646
3647                "OpenBSD"* | "Bitrig"*)
3648                    battery0full="$(sysctl -n   hw.sensors.acpibat0.watthour0\
3649                                                hw.sensors.acpibat0.amphour0)"
3650                    battery0full="${battery0full%% *}"
3651
3652                    battery0now="$(sysctl -n    hw.sensors.acpibat0.watthour3\
3653                                                hw.sensors.acpibat0.amphour3)"
3654                    battery0now="${battery0now%% *}"
3655
3656                    state="$(sysctl -n hw.sensors.acpibat0.raw0)"
3657                    state="${state##? (battery }"
3658                    state="${state%)*}"
3659
3660                    [[ "${state}" == "charging" ]] && battery_state="charging"
3661                    [[ "$battery0full" ]] && \
3662                    battery="$((100 * ${battery0now/\.} / ${battery0full/\.}))%"
3663                ;;
3664            esac
3665        ;;
3666
3667        "Mac OS X"|"macOS")
3668            battery="$(pmset -g batt | grep -o '[0-9]*%')"
3669            state="$(pmset -g batt | awk '/;/ {print $4}')"
3670            [[ "$state" == "charging;" ]] && battery_state="charging"
3671        ;;
3672
3673        "Windows")
3674            battery="$(wmic Path Win32_Battery get EstimatedChargeRemaining)"
3675            battery="${battery/EstimatedChargeRemaining}"
3676            battery="$(trim "$battery")%"
3677        ;;
3678
3679        "Haiku")
3680            battery0full="$(awk -F '[^0-9]*' 'NR==2 {print $4}' /dev/power/acpi_battery/0)"
3681            battery0now="$(awk -F '[^0-9]*' 'NR==5 {print $4}' /dev/power/acpi_battery/0)"
3682            battery="$((battery0full * 100 / battery0now))%"
3683        ;;
3684    esac
3685
3686    [[ "$battery_state" ]] && battery+=" Charging"
3687
3688    case $battery_display in
3689        "bar")     battery="$(bar "${battery/\%*}" 100)" ;;
3690        "infobar") battery="${battery} $(bar "${battery/\%*}" 100)" ;;
3691        "barinfo") battery="$(bar "${battery/\%*}" 100)${info_color} ${battery}" ;;
3692    esac
3693}
3694
3695get_local_ip() {
3696    case $os in
3697        "Linux" | "BSD" | "Solaris" | "AIX" | "IRIX")
3698            local_ip="$(ip route get 1 | awk -F'src' '{print $2; exit}')"
3699            local_ip="${local_ip/uid*}"
3700            [[ -z "$local_ip" ]] && local_ip="$(ifconfig -a | awk '/broadcast/ {print $2; exit}')"
3701        ;;
3702
3703        "MINIX")
3704            local_ip="$(ifconfig | awk '{printf $3; exit}')"
3705        ;;
3706
3707        "Mac OS X" | "macOS" | "iPhone OS")
3708            local_ip="$(ipconfig getifaddr en0)"
3709            [[ -z "$local_ip" ]] && local_ip="$(ipconfig getifaddr en1)"
3710        ;;
3711
3712        "Windows")
3713            local_ip="$(ipconfig | awk -F ': ' '/IPv4 Address/ {printf $2 ", "}')"
3714            local_ip="${local_ip%\,*}"
3715        ;;
3716
3717        "Haiku")
3718            local_ip="$(ifconfig | awk -F ': ' '/Bcast/ {print $2}')"
3719            local_ip="${local_ip/, Bcast}"
3720        ;;
3721    esac
3722}
3723
3724get_public_ip() {
3725    if type -p dig >/dev/null; then
3726        public_ip="$(dig +time=1 +tries=1 +short myip.opendns.com @resolver1.opendns.com)"
3727       [[ "$public_ip" =~ ^\; ]] && unset public_ip
3728    fi
3729
3730    if [[ -z "$public_ip" ]] && type -p drill >/dev/null; then
3731        public_ip="$(drill myip.opendns.com @resolver1.opendns.com | \
3732                     awk '/^myip\./ && $3 == "IN" {print $5}')"
3733    fi
3734
3735    if [[ -z "$public_ip" ]] && type -p curl >/dev/null; then
3736        public_ip="$(curl --max-time "$public_ip_timeout" -w '\n' "$public_ip_host")"
3737    fi
3738
3739    if [[ -z "$public_ip" ]] && type -p wget >/dev/null; then
3740        public_ip="$(wget -T "$public_ip_timeout" -qO- "$public_ip_host")"
3741    fi
3742}
3743
3744get_users() {
3745    users="$(who | awk '!seen[$1]++ {printf $1 ", "}')"
3746    users="${users%\,*}"
3747}
3748
3749get_locale() {
3750    locale="$sys_locale"
3751}
3752
3753get_gpu_driver() {
3754    case $os in
3755        "Linux")
3756            gpu_driver="$(lspci -nnk | awk -F ': ' \
3757                          '/Display|3D|VGA/{nr[NR+2]}; NR in nr {printf $2 ", "; exit}')"
3758            gpu_driver="${gpu_driver%, }"
3759
3760            if [[ "$gpu_driver" == *"nvidia"* ]]; then
3761                gpu_driver="$(< /proc/driver/nvidia/version)"
3762                gpu_driver="${gpu_driver/*Module  }"
3763                gpu_driver="NVIDIA ${gpu_driver/  *}"
3764            fi
3765        ;;
3766
3767        "Mac OS X"|"macOS")
3768            if [[ "$(kextstat | grep "GeForceWeb")" != "" ]]; then
3769                gpu_driver="NVIDIA Web Driver"
3770            else
3771                gpu_driver="macOS Default Graphics Driver"
3772            fi
3773        ;;
3774    esac
3775}
3776
3777get_cols() {
3778    local blocks blocks2 cols
3779
3780    if [[ "$color_blocks" == "on" ]]; then
3781        # Convert the width to space chars.
3782        printf -v block_width "%${block_width}s"
3783
3784        # Generate the string.
3785        for ((block_range[0]; block_range[0]<=block_range[1]; block_range[0]++)); do
3786            case ${block_range[0]} in
3787                [0-7])
3788                    printf -v blocks  '%b\e[3%bm\e[4%bm%b' \
3789                        "$blocks" "${block_range[0]}" "${block_range[0]}" "$block_width"
3790                ;;
3791
3792                *)
3793                    printf -v blocks2 '%b\e[38;5;%bm\e[48;5;%bm%b' \
3794                        "$blocks2" "${block_range[0]}" "${block_range[0]}" "$block_width"
3795                ;;
3796            esac
3797        done
3798
3799        # Convert height into spaces.
3800        printf -v block_spaces "%${block_height}s"
3801
3802        # Convert the spaces into rows of blocks.
3803        [[ "$blocks"  ]] && cols+="${block_spaces// /${blocks}nl}"
3804        [[ "$blocks2" ]] && cols+="${block_spaces// /${blocks2}nl}"
3805
3806        # Add newlines to the string.
3807        cols=${cols%%nl}
3808        cols=${cols//nl/
3809[${text_padding}C${zws}}
3810
3811        # Add block height to info height.
3812        ((info_height+=block_range[1]>7?block_height+3:block_height+2))
3813
3814        case $col_offset in
3815            "auto") printf '\n\e[%bC%b\n\n' "$text_padding" "${zws}${cols}" ;;
3816            *) printf '\n\e[%bC%b\n\n' "$col_offset" "${zws}${cols}" ;;
3817        esac
3818    fi
3819
3820    unset -v blocks blocks2 cols
3821
3822    # Tell info() that we printed manually.
3823    prin=1
3824}
3825
3826# IMAGES
3827
3828image_backend() {
3829    [[ "$image_backend" != "off" ]] && ! type -p convert &>/dev/null && \
3830        { image_backend="ascii"; err "Image: Imagemagick not found, falling back to ascii mode."; }
3831
3832    case ${image_backend:-off} in
3833        "ascii") print_ascii ;;
3834        "off") image_backend="off" ;;
3835
3836        "caca" | "chafa" | "jp2a" | "iterm2" | "termpix" |\
3837        "tycat" | "w3m" | "sixel" | "pixterm" | "kitty" | "pot")
3838            get_image_source
3839
3840            [[ ! -f "$image" ]] && {
3841                to_ascii "Image: '$image_source' doesn't exist, falling back to ascii mode."
3842                return
3843            }
3844
3845            get_window_size
3846
3847            ((term_width < 1)) && {
3848                to_ascii "Image: Failed to find terminal window size."
3849                err "Image: Check the 'Images in the terminal' wiki page for more info,"
3850                return
3851            }
3852
3853            printf '\e[2J\e[H'
3854            get_image_size
3855            make_thumbnail
3856            display_image || to_off "Image: $image_backend failed to display the image."
3857        ;;
3858
3859        *)
3860            err "Image: Unknown image backend specified '$image_backend'."
3861            err "Image: Valid backends are: 'ascii', 'caca', 'chafa', 'jp2a', 'iterm2', 'kitty',
3862                                            'off', 'sixel', 'pot', 'pixterm', 'termpix', 'tycat',
3863                                            'w3m')"
3864            err "Image: Falling back to ascii mode."
3865            print_ascii
3866        ;;
3867    esac
3868
3869    # Set cursor position next image/ascii.
3870    [[ "$image_backend" != "off" ]] && printf '\e[%sA\e[9999999D' "${lines:-0}"
3871}
3872
3873print_ascii() {
3874    if [[ -f "$image_source" && ! "$image_source" =~ (png|jpg|jpeg|jpe|svg|gif) ]]; then
3875        ascii_data="$(< "$image_source")"
3876    elif [[ "$image_source" == "ascii" || $image_source == auto ]]; then
3877        :
3878    else
3879        ascii_data="$image_source"
3880    fi
3881
3882    # Set locale to get correct padding.
3883    LC_ALL="$sys_locale"
3884
3885    # Calculate size of ascii file in line length / line count.
3886    while IFS=$'\n' read -r line; do
3887        line=${line//\\\\/\\}
3888        line=${line//█/ }
3889        ((++lines,${#line}>ascii_len)) && ascii_len="${#line}"
3890    done <<< "${ascii_data//\$\{??\}}"
3891
3892    # Fallback if file not found.
3893    ((lines==1)) && { lines=; ascii_len=; image_source=auto; get_distro_ascii; print_ascii; return; }
3894
3895    # Colors.
3896    ascii_data="${ascii_data//\$\{c1\}/$c1}"
3897    ascii_data="${ascii_data//\$\{c2\}/$c2}"
3898    ascii_data="${ascii_data//\$\{c3\}/$c3}"
3899    ascii_data="${ascii_data//\$\{c4\}/$c4}"
3900    ascii_data="${ascii_data//\$\{c5\}/$c5}"
3901    ascii_data="${ascii_data//\$\{c6\}/$c6}"
3902
3903    ((text_padding=ascii_len+gap))
3904    printf '%b\n' "$ascii_data${reset}"
3905    LC_ALL=C
3906}
3907
3908get_image_source() {
3909    case $image_source in
3910        "auto" | "wall" | "wallpaper")
3911            get_wallpaper
3912        ;;
3913
3914        *)
3915            # Get the absolute path.
3916            image_source="$(get_full_path "$image_source")"
3917
3918            if [[ -d "$image_source" ]]; then
3919                shopt -s nullglob
3920                files=("${image_source%/}"/*.{png,jpg,jpeg,jpe,gif,svg})
3921                shopt -u nullglob
3922                image="${files[RANDOM % ${#files[@]}]}"
3923
3924            else
3925                image="$image_source"
3926            fi
3927        ;;
3928    esac
3929
3930    err "Image: Using image '$image'"
3931}
3932
3933get_wallpaper() {
3934    case $os in
3935        "Mac OS X"|"macOS")
3936            image="$(osascript <<END
3937                     tell application "System Events" to picture of current desktop
3938END
3939)"
3940        ;;
3941
3942        "Windows")
3943            case $distro in
3944                "Windows XP")
3945                    image="/c/Documents and Settings/${USER}"
3946                    image+="/Local Settings/Application Data/Microsoft/Wallpaper1.bmp"
3947
3948                    [[ "$kernel_name" == *CYGWIN* ]] && image="/cygdrive${image}"
3949                ;;
3950
3951                "Windows"*)
3952                    image="${APPDATA}/Microsoft/Windows/Themes/TranscodedWallpaper.jpg"
3953                ;;
3954            esac
3955        ;;
3956
3957        *)
3958            # Get DE if user has disabled the function.
3959            ((de_run != 1)) && get_de
3960
3961            type -p wal >/dev/null && [[ -f "${HOME}/.cache/wal/wal" ]] && \
3962                { image="$(< "${HOME}/.cache/wal/wal")"; return; }
3963
3964            case $de in
3965                "MATE"*)
3966                    image="$(gsettings get org.mate.background picture-filename)"
3967                ;;
3968
3969                "Xfce"*)
3970                    image="$(xfconf-query -c xfce4-desktop -p \
3971                             "/backdrop/screen0/monitor0/workspace0/last-image")"
3972                ;;
3973
3974                "Cinnamon"*)
3975                    image="$(gsettings get org.cinnamon.desktop.background picture-uri)"
3976                    image="$(decode_url "$image")"
3977                ;;
3978
3979                "GNOME"*)
3980                    image="$(gsettings get org.gnome.desktop.background picture-uri)"
3981                    image="$(decode_url "$image")"
3982                ;;
3983
3984                "Plasma"*)
3985                    image=$XDG_CONFIG_HOME/plasma-org.kde.plasma.desktop-appletsrc
3986                    image=$(awk -F '=' '$1 == "Image" { print $2 }' "$image")
3987                ;;
3988
3989                "LXQt"*)
3990                    image="$XDG_CONFIG_HOME/pcmanfm-qt/lxqt/settings.conf"
3991                    image="$(awk -F '=' '$1 == "Wallpaper" {print $2}' "$image")"
3992                ;;
3993
3994                *)
3995                    if type -p feh >/dev/null && [[ -f "${HOME}/.fehbg" ]]; then
3996                        image="$(awk -F\' '/feh/ {printf $(NF-1)}' "${HOME}/.fehbg")"
3997
3998                    elif type -p setroot >/dev/null && \
3999                         [[ -f "${XDG_CONFIG_HOME}/setroot/.setroot-restore" ]]; then
4000                        image="$(awk -F\' '/setroot/ {printf $(NF-1)}' \
4001                                 "${XDG_CONFIG_HOME}/setroot/.setroot-restore")"
4002
4003                    elif type -p nitrogen >/dev/null; then
4004                        image="$(awk -F'=' '/file/ {printf $2;exit;}' \
4005                                 "${XDG_CONFIG_HOME}/nitrogen/bg-saved.cfg")"
4006
4007                    else
4008                        image="$(gsettings get org.gnome.desktop.background picture-uri)"
4009                        image="$(decode_url "$image")"
4010                    fi
4011                ;;
4012            esac
4013
4014            # Strip un-needed info from the path.
4015            image="${image/file:\/\/}"
4016            image="$(trim_quotes "$image")"
4017        ;;
4018    esac
4019
4020    # If image is an xml file, don't use it.
4021    [[ "${image/*\./}" == "xml" ]] && image=""
4022}
4023
4024get_w3m_img_path() {
4025    # Find w3m-img path.
4026    shopt -s nullglob
4027    w3m_paths=({/usr/{local/,},~/.nix-profile/}{lib,libexec,lib64,libexec64}/w3m/w3mi*)
4028    shopt -u nullglob
4029
4030    [[ -x "${w3m_paths[0]}" ]] && \
4031        { w3m_img_path="${w3m_paths[0]}"; return; }
4032
4033    err "Image: w3m-img wasn't found on your system"
4034}
4035
4036get_window_size() {
4037    # This functions gets the current window size in
4038    # pixels.
4039    #
4040    # We first try to use the escape sequence "\033[14t"
4041    # to get the terminal window size in pixels. If this
4042    # fails we then fallback to using "xdotool" or other
4043    # programs.
4044
4045    # Tmux has a special way of reading escape sequences
4046    # so we have to use a slightly different sequence to
4047    # get the terminal size.
4048    if [[ "$image_backend" == "tycat" ]]; then
4049        printf '%b' '\e}qs\000'
4050
4051    elif [[ -z $VTE_VERSION ]]; then
4052        case ${TMUX:-null} in
4053            "null") printf '%b' '\e[14t' ;;
4054            *)      printf '%b' '\ePtmux;\e\e[14t\e\\ ' ;;
4055        esac
4056    fi
4057
4058    # The escape codes above print the desired output as
4059    # user input so we have to use read to store the out
4060    # -put as a variable.
4061    # The 1 second timeout is required for older bash
4062    #
4063    # False positive.
4064    # shellcheck disable=2141
4065    case $bash_version in
4066        4|5) IFS=';t' read -d t -t 0.05 -sra term_size ;;
4067        *)   IFS=';t' read -d t -t 1 -sra term_size ;;
4068    esac
4069    unset IFS
4070
4071    # Split the string into height/width.
4072    if [[ "$image_backend" == "tycat" ]]; then
4073        term_width="$((term_size[2] * term_size[0]))"
4074        term_height="$((term_size[3] * term_size[1]))"
4075
4076    else
4077        term_height="${term_size[1]}"
4078        term_width="${term_size[2]}"
4079    fi
4080
4081    # Get terminal width/height.
4082    if (( "${term_width:-0}" < 50 )) && [[ "$DISPLAY" && $os != "Mac OS X" && $os != "macOS" ]]; then
4083        if type -p xdotool &>/dev/null; then
4084            IFS=$'\n' read -d "" -ra win \
4085                <<< "$(xdotool getactivewindow getwindowgeometry --shell %1)"
4086            term_width="${win[3]/WIDTH=}"
4087            term_height="${win[4]/HEIGHT=}"
4088
4089        elif type -p xwininfo &>/dev/null; then
4090            # Get the focused window's ID.
4091            if type -p xdo &>/dev/null; then
4092                current_window="$(xdo id)"
4093
4094            elif type -p xprop &>/dev/null; then
4095                current_window="$(xprop -root _NET_ACTIVE_WINDOW)"
4096                current_window="${current_window##* }"
4097
4098            elif type -p xdpyinfo &>/dev/null; then
4099                current_window="$(xdpyinfo | grep -F "focus:")"
4100                current_window="${current_window/*window }"
4101                current_window="${current_window/,*}"
4102            fi
4103
4104            # If the ID was found get the window size.
4105            if [[ "$current_window" ]]; then
4106                term_size=("$(xwininfo -id "$current_window")")
4107                term_width="${term_size[0]#*Width: }"
4108                term_width="${term_width/$'\n'*}"
4109                term_height="${term_size[0]/*Height: }"
4110                term_height="${term_height/$'\n'*}"
4111            fi
4112        fi
4113    fi
4114
4115    term_width="${term_width:-0}"
4116}
4117
4118
4119get_term_size() {
4120    # Get the terminal size in cells.
4121    read -r lines columns <<< "$(stty size)"
4122
4123    # Calculate font size.
4124    font_width="$((term_width / columns))"
4125    font_height="$((term_height / lines))"
4126}
4127
4128get_image_size() {
4129    # This functions determines the size to make the thumbnail image.
4130    get_term_size
4131
4132    case $image_size in
4133        "auto")
4134            image_size="$((columns * font_width / 2))"
4135            term_height="$((term_height - term_height / 4))"
4136
4137            ((term_height < image_size)) && \
4138                image_size="$term_height"
4139        ;;
4140
4141        *"%")
4142            percent="${image_size/\%}"
4143            image_size="$((percent * term_width / 100))"
4144
4145            (((percent * term_height / 50) < image_size)) && \
4146                image_size="$((percent * term_height / 100))"
4147        ;;
4148
4149        "none")
4150            # Get image size so that we can do a better crop.
4151            read -r width height <<< "$(identify -format "%w %h" "$image")"
4152
4153            while ((width >= (term_width / 2) || height >= term_height)); do
4154                ((width=width/2,height=height/2))
4155            done
4156
4157            crop_mode="none"
4158        ;;
4159
4160        *)  image_size="${image_size/px}" ;;
4161    esac
4162
4163    # Check for terminal padding.
4164    [[ "$image_backend" == "w3m" ]] && term_padding
4165
4166    width="${width:-$image_size}"
4167    height="${height:-$image_size}"
4168    text_padding="$(((width + padding + xoffset) / font_width + gap))"
4169}
4170
4171make_thumbnail() {
4172    # Name the thumbnail using variables so we can
4173    # use it later.
4174    image_name="${crop_mode}-${crop_offset}-${width}-${height}-${image//\/}"
4175
4176    # Handle file extensions.
4177    case ${image##*.} in
4178        "eps"|"pdf"|"svg"|"gif"|"png")
4179            image_name+=".png" ;;
4180        *)  image_name+=".jpg" ;;
4181    esac
4182
4183    # Create the thumbnail dir if it doesn't exist.
4184    mkdir -p "${thumbnail_dir:=${XDG_CACHE_HOME:-${HOME}/.cache}/thumbnails/neofetch}"
4185
4186    if [[ ! -f "${thumbnail_dir}/${image_name}" ]]; then
4187        # Get image size so that we can do a better crop.
4188        [[ -z "$size" ]] && {
4189            read -r og_width og_height <<< "$(identify -format "%w %h" "$image")"
4190            ((og_height > og_width)) && size="$og_width" || size="$og_height"
4191        }
4192
4193        case $crop_mode in
4194            "fit")
4195                c="$(convert "$image" \
4196                    -colorspace srgb \
4197                    -format "%[pixel:p{0,0}]" info:)"
4198
4199                convert \
4200                    -background none \
4201                    "$image" \
4202                    -trim +repage \
4203                    -gravity south \
4204                    -background "$c" \
4205                    -extent "${size}x${size}" \
4206                    -scale "${width}x${height}" \
4207                    "${thumbnail_dir}/${image_name}"
4208            ;;
4209
4210            "fill")
4211                convert \
4212                    -background none \
4213                    "$image" \
4214                    -trim +repage \
4215                    -scale "${width}x${height}^" \
4216                    -extent "${width}x${height}" \
4217                    "${thumbnail_dir}/${image_name}"
4218            ;;
4219
4220            "none")
4221                cp "$image" "${thumbnail_dir}/${image_name}"
4222            ;;
4223
4224            *)
4225                convert \
4226                    -background none \
4227                    "$image" \
4228                    -strip \
4229                    -gravity "$crop_offset" \
4230                    -crop "${size}x${size}+0+0" \
4231                    -scale "${width}x${height}" \
4232                    "${thumbnail_dir}/${image_name}"
4233            ;;
4234        esac
4235    fi
4236
4237    # The final image.
4238    image="${thumbnail_dir}/${image_name}"
4239}
4240
4241display_image() {
4242    case $image_backend in
4243        "caca")
4244            img2txt \
4245                -W "$((width / font_width))" \
4246                -H "$((height / font_height))" \
4247                --gamma=0.6 \
4248            "$image"
4249        ;;
4250
4251        "chafa")
4252            chafa --stretch --size="$((width / font_width))x$((height / font_height))" "$image"
4253        ;;
4254
4255        "jp2a")
4256            jp2a \
4257                --colors \
4258                --width="$((width / font_width))" \
4259                --height="$((height / font_height))" \
4260            "$image"
4261        ;;
4262
4263        "kitty")
4264            kitty +kitten icat \
4265                --align left \
4266                --place "$((width/font_width))x$((height/font_height))@${xoffset}x${yoffset}" \
4267            "$image"
4268        ;;
4269
4270        "pot")
4271            pot \
4272                "$image" \
4273                --size="$((width / font_width))x$((height / font_height))"
4274        ;;
4275
4276        "pixterm")
4277            pixterm \
4278                -tc "$((width / font_width))" \
4279                -tr "$((height / font_height))" \
4280            "$image"
4281        ;;
4282
4283        "sixel")
4284            img2sixel \
4285                -w "$width" \
4286                -h "$height" \
4287            "$image"
4288        ;;
4289
4290        "termpix")
4291            termpix \
4292                --width "$((width / font_width))" \
4293                --height "$((height / font_height))" \
4294            "$image"
4295        ;;
4296
4297        "iterm2")
4298            printf -v iterm_cmd '\e]1337;File=width=%spx;height=%spx;inline=1:%s' \
4299                "$width" "$height" "$(base64 < "$image")"
4300
4301            # Tmux requires an additional escape sequence for this to work.
4302            [[ -n "$TMUX" ]] && printf -v iterm_cmd '\ePtmux;\e%b\e'\\ "$iterm_cmd"
4303
4304            printf '%b\a\n' "$iterm_cmd"
4305        ;;
4306
4307        "tycat")
4308            tycat \
4309                -g "${width}x${height}" \
4310            "$image"
4311        ;;
4312
4313        "w3m")
4314            get_w3m_img_path
4315            zws='\xE2\x80\x8B\x20'
4316
4317            # Add a tiny delay to fix issues with images not
4318            # appearing in specific terminal emulators.
4319            ((bash_version>3)) && sleep 0.05
4320            printf '%b\n%s;\n%s\n' "0;1;$xoffset;$yoffset;$width;$height;;;;;$image" 3 4 |\
4321            "${w3m_img_path:-false}" -bg "$background_color" &>/dev/null
4322        ;;
4323    esac
4324}
4325
4326to_ascii() {
4327    err "$1"
4328    image_backend="ascii"
4329    print_ascii
4330
4331    # Set cursor position next image/ascii.
4332    printf '\e[%sA\e[9999999D' "${lines:-0}"
4333}
4334
4335to_off() {
4336    err "$1"
4337    image_backend="off"
4338    text_padding=
4339}
4340
4341
4342# TEXT FORMATTING
4343
4344info() {
4345    # Save subtitle value.
4346    [[ "$2" ]] && subtitle="$1"
4347
4348    # Make sure that $prin is unset.
4349    unset -v prin
4350
4351    # Call the function.
4352    "get_${2:-$1}"
4353
4354    # If the get_func function called 'prin' directly, stop here.
4355    [[ "$prin" ]] && return
4356
4357    # Update the variable.
4358    if [[ "$2" ]]; then
4359        output="$(trim "${!2}")"
4360    else
4361        output="$(trim "${!1}")"
4362    fi
4363
4364    if [[ "$2" && "${output// }" ]]; then
4365        prin "$1" "$output"
4366
4367    elif [[ "${output// }" ]]; then
4368        prin "$output"
4369
4370    else
4371        err "Info: Couldn't detect ${1}."
4372    fi
4373
4374    unset -v subtitle
4375}
4376
4377prin() {
4378    # If $2 doesn't exist we format $1 as info.
4379    if [[ "$(trim "$1")" && "$2" ]]; then
4380        [[ "$json" ]] && { printf '    %s\n' "\"${1}\": \"${2}\","; return; }
4381
4382        string="${1}${2:+: $2}"
4383    else
4384        string="${2:-$1}"
4385        local subtitle_color="$info_color"
4386    fi
4387
4388    string="$(trim "${string//$'\e[0m'}")"
4389    length="$(strip_sequences "$string")"
4390    length="${#length}"
4391
4392    # Format the output.
4393    string="${string/:/${reset}${colon_color}${separator:=:}${info_color}}"
4394    string="${subtitle_color}${bold}${string}"
4395
4396    # Print the info.
4397    printf '%b\n' "${text_padding:+\e[${text_padding}C}${zws}${string//\\n}${reset} "
4398
4399    # Calculate info height.
4400    ((++info_height))
4401
4402    # Log that prin was used.
4403    prin=1
4404}
4405
4406get_underline() {
4407    [[ "$underline_enabled" == "on" ]] && {
4408        printf -v underline "%${length}s"
4409        printf '%b%b\n' "${text_padding:+\e[${text_padding}C}${zws}${underline_color}" \
4410                        "${underline// /$underline_char}${reset} "
4411    }
4412
4413    ((++info_height))
4414    length=
4415    prin=1
4416}
4417
4418get_bold() {
4419    case $ascii_bold in
4420        "on")  ascii_bold='\e[1m' ;;
4421        "off") ascii_bold="" ;;
4422    esac
4423
4424    case $bold in
4425        "on")  bold='\e[1m' ;;
4426        "off") bold="" ;;
4427    esac
4428}
4429
4430trim() {
4431    set -f
4432    # shellcheck disable=2048,2086
4433    set -- $*
4434    printf '%s\n' "${*//[[:space:]]/}"
4435    set +f
4436}
4437
4438trim_quotes() {
4439    trim_output="${1//\'}"
4440    trim_output="${trim_output//\"}"
4441    printf "%s" "$trim_output"
4442}
4443
4444strip_sequences() {
4445    strip="${1//$'\e['3[0-9]m}"
4446    strip="${strip//$'\e['[0-9]m}"
4447    strip="${strip//\\e\[[0-9]m}"
4448    strip="${strip//$'\e['38\;5\;[0-9]m}"
4449    strip="${strip//$'\e['38\;5\;[0-9][0-9]m}"
4450    strip="${strip//$'\e['38\;5\;[0-9][0-9][0-9]m}"
4451
4452    printf '%s\n' "$strip"
4453}
4454
4455# COLORS
4456
4457set_colors() {
4458    c1="$(color "$1")${ascii_bold}"
4459    c2="$(color "$2")${ascii_bold}"
4460    c3="$(color "$3")${ascii_bold}"
4461    c4="$(color "$4")${ascii_bold}"
4462    c5="$(color "$5")${ascii_bold}"
4463    c6="$(color "$6")${ascii_bold}"
4464
4465    [[ "$color_text" != "off" ]] && set_text_colors "$@"
4466}
4467
4468set_text_colors() {
4469    if [[ "${colors[0]}" == "distro" ]]; then
4470        title_color="$(color "$1")"
4471        at_color="$reset"
4472        underline_color="$reset"
4473        subtitle_color="$(color "$2")"
4474        colon_color="$reset"
4475        info_color="$reset"
4476
4477        # If the ascii art uses 8 as a color, make the text the fg.
4478        ((${1:-1} == 8)) && title_color="$reset"
4479        ((${2:-7} == 8)) && subtitle_color="$reset"
4480
4481        # If the second color is white use the first for the subtitle.
4482        ((${2:-7} == 7)) && subtitle_color="$(color "$1")"
4483        ((${1:-1} == 7)) && title_color="$reset"
4484    else
4485        title_color="$(color "${colors[0]}")"
4486        at_color="$(color "${colors[1]}")"
4487        underline_color="$(color "${colors[2]}")"
4488        subtitle_color="$(color "${colors[3]}")"
4489        colon_color="$(color "${colors[4]}")"
4490        info_color="$(color "${colors[5]}")"
4491    fi
4492
4493    # Bar colors.
4494    if [[ "$bar_color_elapsed" == "distro" ]]; then
4495        bar_color_elapsed="$(color fg)"
4496    else
4497        bar_color_elapsed="$(color "$bar_color_elapsed")"
4498    fi
4499
4500    case ${bar_color_total}${1} in
4501        distro[736]) bar_color_total=$(color "$1") ;;
4502        distro[0-9]) bar_color_total=$(color "$2") ;;
4503        *)           bar_color_total=$(color "$bar_color_total") ;;
4504    esac
4505}
4506
4507color() {
4508    case $1 in
4509        [0-6])    printf '%b\e[3%sm'   "$reset" "$1" ;;
4510        7 | "fg") printf '\e[37m%b'    "$reset" ;;
4511        *)        printf '\e[38;5;%bm' "$1" ;;
4512    esac
4513}
4514
4515# OTHER
4516
4517stdout() {
4518    image_backend="off"
4519    unset subtitle_color colon_color info_color underline_color bold title_color at_color \
4520          text_padding zws reset color_blocks bar_color_elapsed bar_color_total \
4521          c1 c2 c3 c4 c5 c6 c7 c8
4522}
4523
4524err() {
4525    err+="$(color 1)[!]${reset} $1
4526"
4527}
4528
4529get_full_path() {
4530    # This function finds the absolute path from a relative one.
4531    # For example "Pictures/Wallpapers" --> "/home/dylan/Pictures/Wallpapers"
4532
4533    # If the file exists in the current directory, stop here.
4534    [[ -f "${PWD}/${1}" ]] && { printf '%s\n' "${PWD}/${1}"; return; }
4535
4536    ! cd "${1%/*}" && {
4537        err "Error: Directory '${1%/*}' doesn't exist or is inaccessible"
4538        err "       Check that the directory exists or try another directory."
4539        exit 1
4540    }
4541
4542    local full_dir="${1##*/}"
4543
4544    # Iterate down a (possible) chain of symlinks.
4545    while [[ -L "$full_dir" ]]; do
4546        full_dir="$(readlink "$full_dir")"
4547        cd "${full_dir%/*}" || exit
4548        full_dir="${full_dir##*/}"
4549    done
4550
4551    # Final directory.
4552    full_dir="$(pwd -P)/${1/*\/}"
4553
4554    [[ -e "$full_dir" ]] && printf '%s\n' "$full_dir"
4555}
4556
4557get_user_config() {
4558    # --config /path/to/config.conf
4559    if [[ -f "$config_file" ]]; then
4560        source "$config_file"
4561        err "Config: Sourced user config. (${config_file})"
4562        return
4563
4564    elif [[ -f "${XDG_CONFIG_HOME}/neofetch/config.conf" ]]; then
4565        source "${XDG_CONFIG_HOME}/neofetch/config.conf"
4566        err "Config: Sourced user config.    (${XDG_CONFIG_HOME}/neofetch/config.conf)"
4567
4568    elif [[ -f "${XDG_CONFIG_HOME}/neofetch/config" ]]; then
4569        source "${XDG_CONFIG_HOME}/neofetch/config"
4570        err "Config: Sourced user config.    (${XDG_CONFIG_HOME}/neofetch/config)"
4571
4572    elif [[ -z "$no_config" ]]; then
4573        config_file="${XDG_CONFIG_HOME}/neofetch/config.conf"
4574
4575        # The config file doesn't exist, create it.
4576        mkdir -p "${XDG_CONFIG_HOME}/neofetch/"
4577        printf '%s\n' "$config" > "$config_file"
4578    fi
4579}
4580
4581bar() {
4582    # Get the values.
4583    elapsed="$(($1 * bar_length / $2))"
4584
4585    # Create the bar with spaces.
4586    printf -v prog  "%${elapsed}s"
4587    printf -v total "%$((bar_length - elapsed))s"
4588
4589    # Set the colors and swap the spaces for $bar_char_.
4590    bar+="${bar_color_elapsed}${prog// /${bar_char_elapsed}}"
4591    bar+="${bar_color_total}${total// /${bar_char_total}}"
4592
4593    # Borders.
4594    [[ "$bar_border" == "on" ]] && \
4595        bar="$(color fg)[${bar}$(color fg)]"
4596
4597    printf "%b" "${bar}${info_color}"
4598}
4599
4600cache() {
4601    if [[ "$2" ]]; then
4602        mkdir -p "${cache_dir}/neofetch"
4603        printf "%s" "${1/*-}=\"$2\"" > "${cache_dir}/neofetch/${1/*-}"
4604    fi
4605}
4606
4607get_cache_dir() {
4608    case $os in
4609        "Mac OS X"|"macOS") cache_dir="/Library/Caches" ;;
4610        *)          cache_dir="/tmp" ;;
4611    esac
4612}
4613
4614kde_config_dir() {
4615    # If the user is using KDE get the KDE
4616    # configuration directory.
4617    if [[ "$kde_config_dir" ]]; then
4618        return
4619
4620    elif type -p kf5-config &>/dev/null; then
4621        kde_config_dir="$(kf5-config --path config)"
4622
4623    elif type -p kde4-config &>/dev/null; then
4624        kde_config_dir="$(kde4-config --path config)"
4625
4626    elif type -p kde-config &>/dev/null; then
4627        kde_config_dir="$(kde-config --path config)"
4628
4629    elif [[ -d "${HOME}/.kde4" ]]; then
4630        kde_config_dir="${HOME}/.kde4/share/config"
4631
4632    elif [[ -d "${HOME}/.kde3" ]]; then
4633        kde_config_dir="${HOME}/.kde3/share/config"
4634    fi
4635
4636    kde_config_dir="${kde_config_dir/$'/:'*}"
4637}
4638
4639term_padding() {
4640    # Get terminal padding to properly align cursor.
4641    [[ -z "$term" ]] && get_term
4642
4643    case $term in
4644        urxvt*|rxvt-unicode)
4645            [[ $xrdb ]] || xrdb=$(xrdb -query)
4646
4647            [[ $xrdb != *internalBorder:* ]] &&
4648                return
4649
4650            padding=${xrdb/*internalBorder:}
4651            padding=${padding/$'\n'*}
4652
4653            [[ $padding =~ ^[0-9]+$ ]] ||
4654                padding=
4655        ;;
4656    esac
4657}
4658
4659dynamic_prompt() {
4660    [[ "$image_backend" == "off" ]]   && { printf '\n'; return; }
4661    [[ "$image_backend" != "ascii" ]] && ((lines=(height + yoffset) / font_height + 1))
4662    [[ "$image_backend" == "w3m" ]]   && ((lines=lines + padding / font_height + 1))
4663
4664    # If the ascii art is taller than the info.
4665    ((lines=lines>info_height?lines-info_height+1:1))
4666
4667    printf -v nlines "%${lines}s"
4668    printf "%b" "${nlines// /\\n}"
4669}
4670
4671cache_uname() {
4672    # Cache the output of uname so we don't
4673    # have to spawn it multiple times.
4674    IFS=" " read -ra uname <<< "$(uname -srm)"
4675
4676    kernel_name="${uname[0]}"
4677    kernel_version="${uname[1]}"
4678    kernel_machine="${uname[2]}"
4679
4680    if [[ "$kernel_name" == "Darwin" ]]; then
4681        IFS=$'\n' read -d "" -ra sw_vers <<< "$(awk -F'<|>' '/key|string/ {print $3}' \
4682                            "/System/Library/CoreServices/SystemVersion.plist")"
4683        for ((i=0;i<${#sw_vers[@]};i+=2)) {
4684            case ${sw_vers[i]} in
4685                ProductName)          darwin_name=${sw_vers[i+1]} ;;
4686                ProductVersion)       osx_version=${sw_vers[i+1]} ;;
4687                ProductBuildVersion)  osx_build=${sw_vers[i+1]}   ;;
4688            esac
4689        }
4690    fi
4691}
4692
4693get_ppid() {
4694    # Get parent process ID of PID.
4695    case $os in
4696        "Windows")
4697            ppid="$(ps -p "${1:-$PPID}" | awk '{printf $2}')"
4698            ppid="${ppid/PPID}"
4699        ;;
4700
4701        "Linux")
4702            ppid="$(grep -i -F "PPid:" "/proc/${1:-$PPID}/status")"
4703            ppid="$(trim "${ppid/PPid:}")"
4704        ;;
4705
4706        *)
4707            ppid="$(ps -p "${1:-$PPID}" -o ppid=)"
4708        ;;
4709    esac
4710
4711    printf "%s" "$ppid"
4712}
4713
4714get_process_name() {
4715    # Get PID name.
4716    case $os in
4717        "Windows")
4718            name="$(ps -p "${1:-$PPID}" | awk '{printf $8}')"
4719            name="${name/COMMAND}"
4720            name="${name/*\/}"
4721        ;;
4722
4723        "Linux")
4724            name="$(< "/proc/${1:-$PPID}/comm")"
4725        ;;
4726
4727        *)
4728            name="$(ps -p "${1:-$PPID}" -o comm=)"
4729        ;;
4730    esac
4731
4732    printf "%s" "$name"
4733}
4734
4735decode_url() {
4736    decode="${1//+/ }"
4737    printf "%b" "${decode//%/\\x}"
4738}
4739
4740# FINISH UP
4741
4742usage() { printf "%s" "\
4743Usage: neofetch func_name --option \"value\" --option \"value\"
4744
4745Neofetch is a CLI system information tool written in BASH. Neofetch
4746displays information about your system next to an image, your OS logo,
4747or any ASCII file of your choice.
4748
4749NOTE: Every launch flag has a config option.
4750
4751Options:
4752
4753INFO:
4754    func_name                   Specify a function name (second part of info() from config) to
4755                                quickly display only that function's information.
4756
4757                                Example: neofetch uptime --uptime_shorthand tiny
4758
4759                                Example: neofetch uptime disk wm memory
4760
4761                                This can be used in bars and scripts like so:
4762
4763                                memory=\"\$(neofetch memory)\"; memory=\"\${memory##*: }\"
4764
4765                                For multiple outputs at once (each line of info in an array):
4766
4767                                IFS=\$'\\n' read -d \"\" -ra info < <(neofetch memory uptime wm)
4768
4769                                info=(\"\${info[@]##*: }\")
4770
4771    --disable infoname          Allows you to disable an info line from appearing
4772                                in the output. 'infoname' is the function name from the
4773                                'print_info()' function inside the config file.
4774                                For example: 'info \"Memory\" memory' would be '--disable memory'
4775
4776                                NOTE: You can supply multiple args. eg. 'neofetch --disable cpu gpu'
4777
4778    --title_fqdn on/off         Hide/Show Fully Qualified Domain Name in title.
4779    --package_managers on/off   Hide/Show Package Manager names . (on, tiny, off)
4780    --os_arch on/off            Hide/Show OS architecture.
4781    --speed_type type           Change the type of cpu speed to display.
4782                                Possible values: current, min, max, bios,
4783                                scaling_current, scaling_min, scaling_max
4784
4785                                NOTE: This only supports Linux with cpufreq.
4786
4787    --speed_shorthand on/off    Whether or not to show decimals in CPU speed.
4788
4789                                NOTE: This flag is not supported in systems with CPU speed less than
4790                                1 GHz.
4791
4792    --cpu_brand on/off          Enable/Disable CPU brand in output.
4793    --cpu_cores type            Whether or not to display the number of CPU cores
4794                                Possible values: logical, physical, off
4795
4796                                NOTE: 'physical' doesn't work on BSD.
4797
4798    --cpu_speed on/off          Hide/Show cpu speed.
4799    --cpu_temp C/F/off          Hide/Show cpu temperature.
4800
4801                                NOTE: This only works on Linux and BSD.
4802
4803                                NOTE: For FreeBSD and NetBSD-based systems, you need to enable
4804                                coretemp kernel module. This only supports newer Intel processors.
4805
4806    --distro_shorthand on/off   Shorten the output of distro (on, tiny, off)
4807
4808                                NOTE: This option won't work in Windows (Cygwin)
4809
4810    --kernel_shorthand on/off   Shorten the output of kernel
4811
4812                                NOTE: This option won't work in BSDs (except PacBSD and PC-BSD)
4813
4814    --uptime_shorthand on/off   Shorten the output of uptime (on, tiny, off)
4815    --refresh_rate on/off       Whether to display the refresh rate of each monitor
4816                                Unsupported on Windows
4817    --gpu_brand on/off          Enable/Disable GPU brand in output. (AMD/NVIDIA/Intel)
4818    --gpu_type type             Which GPU to display. (all, dedicated, integrated)
4819
4820                                NOTE: This only supports Linux.
4821
4822    --de_version on/off         Show/Hide Desktop Environment version
4823    --gtk_shorthand on/off      Shorten output of gtk theme/icons
4824    --gtk2 on/off               Enable/Disable gtk2 theme/font/icons output
4825    --gtk3 on/off               Enable/Disable gtk3 theme/font/icons output
4826    --shell_path on/off         Enable/Disable showing \$SHELL path
4827    --shell_version on/off      Enable/Disable showing \$SHELL version
4828    --disk_show value           Which disks to display.
4829                                Possible values: '/', '/dev/sdXX', '/path/to/mount point'
4830
4831                                NOTE: Multiple values can be given. (--disk_show '/' '/dev/sdc1')
4832
4833    --disk_subtitle type        What information to append to the Disk subtitle.
4834                                Takes: name, mount, dir, none
4835
4836                                'name' shows the disk's name (sda1, sda2, etc)
4837
4838                                'mount' shows the disk's mount point (/, /mnt/Local Disk, etc)
4839
4840                                'dir' shows the basename of the disks's path. (/, Local Disk, etc)
4841
4842                                'none' shows only 'Disk' or the configured title.
4843
4844    --disk_percent on/off       Hide/Show disk percent.
4845
4846    --ip_host url               URL to query for public IP
4847    --ip_timeout int            Public IP timeout (in seconds).
4848    --song_format format        Print the song data in a specific format (see config file).
4849    --song_shorthand on/off     Print the Artist/Album/Title on separate lines.
4850    --memory_percent on/off     Display memory percentage.
4851    --memory_unit kib/mib/gib   Memory output unit.
4852    --music_player player-name  Manually specify a player to use.
4853                                Available values are listed in the config file
4854
4855TEXT FORMATTING:
4856    --colors x x x x x x        Changes the text colors in this order:
4857                                title, @, underline, subtitle, colon, info
4858    --underline on/off          Enable/Disable the underline.
4859    --underline_char char       Character to use when underlining title
4860    --bold on/off               Enable/Disable bold text
4861    --separator string          Changes the default ':' separator to the specified string.
4862
4863COLOR BLOCKS:
4864    --color_blocks on/off       Enable/Disable the color blocks
4865    --col_offset auto/num      Left-padding of color blocks
4866    --block_width num           Width of color blocks in spaces
4867    --block_height num          Height of color blocks in lines
4868    --block_range num num       Range of colors to print as blocks
4869
4870BARS:
4871    --bar_char 'elapsed char' 'total char'
4872                                Characters to use when drawing bars.
4873    --bar_border on/off         Whether or not to surround the bar with '[]'
4874    --bar_length num            Length in spaces to make the bars.
4875    --bar_colors num num        Colors to make the bar.
4876                                Set in this order: elapsed, total
4877    --cpu_display mode          Bar mode.
4878                                Possible values: bar, infobar, barinfo, off
4879    --memory_display mode       Bar mode.
4880                                Possible values: bar, infobar, barinfo, off
4881    --battery_display mode      Bar mode.
4882                                Possible values: bar, infobar, barinfo, off
4883    --disk_display mode         Bar mode.
4884                                Possible values: bar, infobar, barinfo, off
4885
4886IMAGE BACKEND:
4887    --backend backend           Which image backend to use.
4888                                Possible values: 'ascii', 'caca', 'chafa', 'jp2a', 'iterm2',
4889                                'off', 'sixel', 'tycat', 'w3m', 'kitty'
4890    --source source             Which image or ascii file to use.
4891                                Possible values: 'auto', 'ascii', 'wallpaper', '/path/to/img',
4892                                '/path/to/ascii', '/path/to/dir/', 'command output' [ascii]
4893
4894    --ascii source              Shortcut to use 'ascii' backend.
4895
4896                                NEW: neofetch --ascii \"\$(fortune | cowsay -W 30)\"
4897
4898    --caca source               Shortcut to use 'caca' backend.
4899    --chafa source              Shortcut to use 'chafa' backend.
4900    --iterm2 source             Shortcut to use 'iterm2' backend.
4901    --jp2a source               Shortcut to use 'jp2a' backend.
4902    --kitty source              Shortcut to use 'kitty' backend.
4903    --pot source                Shortcut to use 'pot' backend.
4904    --pixterm source            Shortcut to use 'pixterm' backend.
4905    --sixel source              Shortcut to use 'sixel' backend.
4906    --termpix source            Shortcut to use 'termpix' backend.
4907    --tycat source              Shortcut to use 'tycat' backend.
4908    --w3m source                Shortcut to use 'w3m' backend.
4909    --off                       Shortcut to use 'off' backend (Disable ascii art).
4910
4911    NOTE: 'source; can be any of the following: 'auto', 'ascii', 'wallpaper', '/path/to/img',
4912    '/path/to/ascii', '/path/to/dir/'
4913
4914ASCII:
4915    --ascii_colors x x x x x x  Colors to print the ascii art
4916    --ascii_distro distro       Which Distro's ascii art to print
4917
4918                                NOTE: AIX, Alpine, AlterLinux, Anarchy, Android, Antergos, antiX,
4919                                \"AOSC OS\", \"AOSC OS/Retro\", Apricity, ArcoLinux, ArchBox,
4920                                ARCHlabs, ArchStrike, XFerience, ArchMerge, Arch, Artix, Arya,
4921                                Bedrock, Bitrig, BlackArch, BLAG, BlankOn, BlueLight, bonsai, BSD,
4922                                BunsenLabs, Calculate, Carbs, CentOS, Chakra, ChaletOS, Chapeau,
4923                                Chrom, Cleanjaro, ClearOS, Clear_Linux, Clover, Condres,
4924                                Container_Linux, CRUX, Cucumber, Debian, Deepin, DesaOS, Devuan,
4925                                DracOS, DarkOs, DragonFly, Drauger, Elementary, EndeavourOS, Endless,
4926                                EuroLinux, Exherbo, Fedora, Feren, FreeBSD, FreeMiNT, Frugalware,
4927                                Funtoo, GalliumOS, Garuda, Gentoo, Pentoo, gNewSense, GNOME, GNU,
4928                                GoboLinux, Grombyang, Guix, Haiku, Huayra, Hyperbola, janus, Kali,
4929                                KaOS, KDE_neon, Kibojoe, Kogaion, Korora, KSLinux, Kubuntu, LEDE,
4930                                LFS, Linux_Lite, LMDE, Lubuntu, Lunar, macos, Mageia, MagpieOS,
4931                                Mandriva, Manjaro, Maui, Mer, Minix, LinuxMint, MX_Linux, Namib,
4932                                Neptune, NetBSD, Netrunner, Nitrux, NixOS, Nurunner, NuTyX,
4933                                OBRevenge, OpenBSD, openEuler, OpenIndiana, openmamba, OpenMandriva,
4934                                OpenStage, OpenWrt, osmc, Oracle, OS Elbrus, PacBSD, Parabola,
4935                                Pardus, Parrot, Parsix, TrueOS, PCLinuxOS, Peppermint, popos,
4936                                Porteus, PostMarketOS, Proxmox, Puppy, PureOS, Qubes, Radix,
4937                                Raspbian, Reborn_OS, Redstar, Redcore, Redhat, Refracted_Devuan,
4938                                Regata, Rosa, sabotage, Sabayon, Sailfish, SalentOS, Scientific,
4939                                Septor, SereneLinux, SharkLinux, Siduction, Slackware, SliTaz,
4940                                SmartOS, Solus, Source_Mage, Sparky, Star, SteamOS, SunOS,
4941                                openSUSE_Leap, openSUSE_Tumbleweed, openSUSE, SwagArch, Tails,
4942                                Trisquel, Ubuntu-Budgie, Ubuntu-GNOME, Ubuntu-MATE, Ubuntu-Studio,
4943                                Ubuntu, Venom, Void, Obarun, windows10, Windows7, Xubuntu, Zorin,
4944                                and IRIX have ascii logos
4945
4946                                NOTE: Arch, Ubuntu, Redhat, and Dragonfly have 'old' logo variants.
4947
4948                                NOTE: Use '{distro name}_old' to use the old logos.
4949
4950                                NOTE: Ubuntu has flavor variants.
4951
4952                                NOTE: Change this to Lubuntu, Kubuntu, Xubuntu, Ubuntu-GNOME,
4953                                Ubuntu-Studio, Ubuntu-Mate  or Ubuntu-Budgie to use the flavors.
4954
4955                                NOTE: Arcolinux, Dragonfly, Fedora, Alpine, Arch, Ubuntu,
4956                                CRUX, Debian, Gentoo, FreeBSD, Mac, NixOS, OpenBSD, android,
4957                                Antrix, CentOS, Cleanjaro, ElementaryOS, GUIX, Hyperbola,
4958                                Manjaro, MXLinux, NetBSD, Parabola, POP_OS, PureOS,
4959                                Slackware, SunOS, LinuxLite, OpenSUSE, Raspbian,
4960                                postmarketOS, and Void have a smaller logo variant.
4961
4962                                NOTE: Use '{distro name}_small' to use the small variants.
4963
4964    --ascii_bold on/off         Whether or not to bold the ascii logo.
4965    -L, --logo                  Hide the info text and only show the ascii logo.
4966
4967IMAGE:
4968    --loop                      Redraw the image constantly until Ctrl+C is used. This fixes issues
4969                                in some terminals emulators when using image mode.
4970    --size 00px | --size 00%    How to size the image.
4971                                Possible values: auto, 00px, 00%, none
4972    --crop_mode mode            Which crop mode to use
4973                                Takes the values: normal, fit, fill
4974    --crop_offset value         Change the crop offset for normal mode.
4975                                Possible values: northwest, north, northeast,
4976                                west, center, east, southwest, south, southeast
4977
4978    --xoffset px                How close the image will be to the left edge of the
4979                                window. This only works with w3m.
4980    --yoffset px                How close the image will be to the top edge of the
4981                                window. This only works with w3m.
4982    --bg_color color            Background color to display behind transparent image.
4983                                This only works with w3m.
4984    --gap num                   Gap between image and text.
4985
4986                                NOTE: --gap can take a negative value which will move the text
4987                                closer to the left side.
4988
4989    --clean                     Delete cached files and thumbnails.
4990
4991OTHER:
4992    --config /path/to/config    Specify a path to a custom config file
4993    --config none               Launch the script without a config file
4994    --no_config                 Don't create the user config file.
4995    --print_config              Print the default config file to stdout.
4996    --stdout                    Turn off all colors and disables any ASCII/image backend.
4997    --help                      Print this text and exit
4998    --version                   Show neofetch version
4999    -v                          Display error messages.
5000    -vv                         Display a verbose log for error reporting.
5001
5002DEVELOPER:
5003    --gen-man                   Generate a manpage for Neofetch in your PWD. (Requires GNU help2man)
5004
5005
5006Report bugs to https://github.com/dylanaraps/neofetch/issues
5007
5008"
5009exit 1
5010}
5011
5012get_args() {
5013    # Check the commandline flags early for '--config'.
5014    [[ "$*" != *--config* && "$*" != *--no_config* ]] && get_user_config
5015
5016    while [[ "$1" ]]; do
5017        case $1 in
5018            # Info
5019            "--title_fqdn") title_fqdn="$2" ;;
5020            "--package_managers") package_managers="$2" ;;
5021            "--os_arch") os_arch="$2" ;;
5022            "--cpu_cores") cpu_cores="$2" ;;
5023            "--cpu_speed") cpu_speed="$2" ;;
5024            "--speed_type") speed_type="$2" ;;
5025            "--speed_shorthand") speed_shorthand="$2" ;;
5026            "--distro_shorthand") distro_shorthand="$2" ;;
5027            "--kernel_shorthand") kernel_shorthand="$2" ;;
5028            "--uptime_shorthand") uptime_shorthand="$2" ;;
5029            "--cpu_brand") cpu_brand="$2" ;;
5030            "--gpu_brand") gpu_brand="$2" ;;
5031            "--gpu_type") gpu_type="$2" ;;
5032            "--refresh_rate") refresh_rate="$2" ;;
5033            "--de_version") de_version="$2" ;;
5034            "--gtk_shorthand") gtk_shorthand="$2" ;;
5035            "--gtk2") gtk2="$2" ;;
5036            "--gtk3") gtk3="$2" ;;
5037            "--shell_path") shell_path="$2" ;;
5038            "--shell_version") shell_version="$2" ;;
5039            "--ip_host") public_ip_host="$2" ;;
5040            "--ip_timeout") public_ip_timeout="$2" ;;
5041            "--song_format") song_format="$2" ;;
5042            "--song_shorthand") song_shorthand="$2" ;;
5043            "--music_player") music_player="$2" ;;
5044            "--memory_percent") memory_percent="$2" ;;
5045            "--memory_unit") memory_unit="$2" ;;
5046            "--cpu_temp")
5047                cpu_temp="$2"
5048                [[ "$cpu_temp" == "on" ]] && cpu_temp="C"
5049            ;;
5050
5051            "--disk_subtitle") disk_subtitle="$2" ;;
5052            "--disk_percent")  disk_percent="$2" ;;
5053            "--disk_show")
5054                unset disk_show
5055                for arg in "$@"; do
5056                    case $arg in
5057                        "--disk_show") ;;
5058                        "-"*) break ;;
5059                        *) disk_show+=("$arg") ;;
5060                    esac
5061                done
5062            ;;
5063
5064            "--disable")
5065                for func in "$@"; do
5066                    case $func in
5067                        "--disable") continue ;;
5068                        "-"*) break ;;
5069                        *)
5070                            ((bash_version >= 4)) && func="${func,,}"
5071                            unset -f "get_$func"
5072                        ;;
5073                    esac
5074                done
5075            ;;
5076
5077            # Text Colors
5078            "--colors")
5079                unset colors
5080                for arg in "$2" "$3" "$4" "$5" "$6" "$7"; do
5081                    case $arg in
5082                        "-"*) break ;;
5083                        *) colors+=("$arg") ;;
5084                    esac
5085                done
5086                colors+=(7 7 7 7 7 7)
5087            ;;
5088
5089            # Text Formatting
5090            "--underline") underline_enabled="$2" ;;
5091            "--underline_char") underline_char="$2" ;;
5092            "--bold") bold="$2" ;;
5093            "--separator") separator="$2" ;;
5094
5095            # Color Blocks
5096            "--color_blocks") color_blocks="$2" ;;
5097            "--block_range") block_range=("$2" "$3") ;;
5098            "--block_width") block_width="$2" ;;
5099            "--block_height") block_height="$2" ;;
5100            "--col_offset") col_offset="$2" ;;
5101
5102            # Bars
5103            "--bar_char")
5104                bar_char_elapsed="$2"
5105                bar_char_total="$3"
5106            ;;
5107
5108            "--bar_border") bar_border="$2" ;;
5109            "--bar_length") bar_length="$2" ;;
5110            "--bar_colors")
5111                bar_color_elapsed="$2"
5112                bar_color_total="$3"
5113            ;;
5114
5115            "--cpu_display") cpu_display="$2" ;;
5116            "--memory_display") memory_display="$2" ;;
5117            "--battery_display") battery_display="$2" ;;
5118            "--disk_display") disk_display="$2" ;;
5119
5120            # Image backend
5121            "--backend") image_backend="$2" ;;
5122            "--source") image_source="$2" ;;
5123            "--ascii" | "--caca" | "--chafa" | "--jp2a" | "--iterm2" | "--off" | "--pot" |\
5124            "--pixterm" | "--sixel" | "--termpix" | "--tycat" | "--w3m" | "--kitty")
5125                image_backend="${1/--}"
5126                case $2 in
5127                    "-"* | "") ;;
5128                    *) image_source="$2" ;;
5129                esac
5130            ;;
5131
5132            # Image options
5133            "--loop") image_loop="on" ;;
5134            "--image_size" | "--size") image_size="$2" ;;
5135            "--crop_mode") crop_mode="$2" ;;
5136            "--crop_offset") crop_offset="$2" ;;
5137            "--xoffset") xoffset="$2" ;;
5138            "--yoffset") yoffset="$2" ;;
5139            "--background_color" | "--bg_color") background_color="$2" ;;
5140            "--gap") gap="$2" ;;
5141            "--clean")
5142                [[ -d "$thumbnail_dir" ]] && rm -rf "$thumbnail_dir"
5143                rm -rf "/Library/Caches/neofetch/"
5144                rm -rf "/tmp/neofetch/"
5145                exit
5146            ;;
5147
5148            "--ascii_colors")
5149                unset ascii_colors
5150                for arg in "$2" "$3" "$4" "$5" "$6" "$7"; do
5151                    case $arg in
5152                        "-"*) break ;;
5153                        *) ascii_colors+=("$arg")
5154                    esac
5155                done
5156                ascii_colors+=(7 7 7 7 7 7)
5157            ;;
5158
5159            "--ascii_distro")
5160                image_backend="ascii"
5161                ascii_distro="$2"
5162            ;;
5163
5164            "--ascii_bold") ascii_bold="$2" ;;
5165            "--logo" | "-L")
5166                image_backend="ascii"
5167                print_info() { printf '\n'; }
5168            ;;
5169
5170            # Other
5171            "--config")
5172                case $2 in
5173                    "none" | "off" | "") ;;
5174                    *)
5175                        config_file="$(get_full_path "$2")"
5176                        get_user_config
5177                    ;;
5178                esac
5179            ;;
5180            "--no_config") no_config="on" ;;
5181            "--stdout") stdout="on" ;;
5182            "-v") verbose="on" ;;
5183            "--print_config") printf '%s\n' "$config"; exit ;;
5184            "-vv") set -x; verbose="on" ;;
5185            "--help") usage ;;
5186            "--version")
5187                printf '%s\n' "Neofetch $version"
5188                exit 1
5189            ;;
5190            "--gen-man")
5191                help2man -n "A fast, highly customizable system info script" \
5192                          -N ./neofetch -o neofetch.1
5193                exit 1
5194            ;;
5195
5196            "--json")
5197                json="on"
5198                unset -f get_title get_cols get_underline
5199
5200                printf '{\n'
5201                print_info 2>/dev/null
5202                printf '    %s\n' "\"Version\": \"${version}\""
5203                printf '}\n'
5204                exit
5205            ;;
5206
5207            "--travis")
5208                print_info() {
5209                    info title
5210                    info underline
5211
5212                    info "OS" distro
5213                    info "Host" model
5214                    info "Kernel" kernel
5215                    info "Uptime" uptime
5216                    info "Packages" packages
5217                    info "Shell" shell
5218                    info "Resolution" resolution
5219                    info "DE" de
5220                    info "WM" wm
5221                    info "WM Theme" wm_theme
5222                    info "Theme" theme
5223                    info "Icons" icons
5224                    info "Terminal" term
5225                    info "Terminal Font" term_font
5226                    info "CPU" cpu
5227                    info "GPU" gpu
5228                    info "GPU Driver" gpu_driver
5229                    info "Memory" memory
5230
5231                    info "CPU Usage" cpu_usage
5232                    info "Disk" disk
5233                    info "Battery" battery
5234                    info "Font" font
5235                    info "Song" song
5236                    info "Local IP" local_ip
5237                    info "Public IP" public_ip
5238                    info "Users" users
5239
5240                    info cols
5241
5242                    # Testing.
5243                    prin "prin"
5244                    prin "prin" "prin"
5245
5246                    # Testing no subtitles.
5247                    info uptime
5248                    info disk
5249                }
5250
5251                refresh_rate="on"
5252                shell_version="on"
5253                cpu_display="infobar"
5254                memory_display="infobar"
5255                disk_display="infobar"
5256                cpu_temp="C"
5257
5258                # Known implicit unused variables.
5259                mpc_args=()
5260                printf '%s\n' "$kernel $icons $font $battery $locale ${mpc_args[*]}"
5261            ;;
5262        esac
5263
5264        shift
5265    done
5266}
5267
5268get_simple() {
5269    while [[ "$1" ]]; do
5270        [[ "$(type -t "get_$1")" == "function" ]] && {
5271            get_distro
5272            stdout
5273            simple=1
5274            info "$1" "$1"
5275        }
5276        shift
5277    done
5278    ((simple)) && exit
5279}
5280
5281old_functions() {
5282    # Removed functions for backwards compatibility.
5283    get_line_break() { :; }
5284}
5285
5286get_distro_ascii() {
5287    # This function gets the distro ascii art and colors.
5288    #
5289    # $ascii_distro is the same as $distro.
5290    case $(trim "$ascii_distro") in
5291        "AIX"*)
5292            set_colors 2 7
5293            read -rd '' ascii_data <<'EOF'
5294${c1}           `:+ssssossossss+-`
5295        .oys///oyhddddhyo///sy+.
5296      /yo:+hNNNNNNNNNNNNNNNNh+:oy/
5297    :h/:yNNNNNNNNNNNNNNNNNNNNNNy-+h:
5298  `ys.yNNNNNNNNNNNNNNNNNNNNNNNNNNy.ys
5299 `h+-mNNNNNNNNNNNNNNNNNNNNNNNNNNNNm-oh
5300 h+-NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN.oy
5301/d`mNNNNNNN/::mNNNd::m+:/dNNNo::dNNNd`m:
5302h//NNNNNNN: . .NNNh  mNo  od. -dNNNNN:+y
5303N.sNNNNNN+ -N/ -NNh  mNNd.   sNNNNNNNo-m
5304N.sNNNNNs  +oo  /Nh  mNNs` ` /mNNNNNNo-m
5305h//NNNNh  ossss` +h  md- .hm/ `sNNNNN:+y
5306:d`mNNN+/yNNNNNd//y//h//oNNNNy//sNNNd`m-
5307 yo-NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNm.ss
5308 `h+-mNNNNNNNNNNNNNNNNNNNNNNNNNNNNm-oy
5309   sy.yNNNNNNNNNNNNNNNNNNNNNNNNNNs.yo
5310    :h+-yNNNNNNNNNNNNNNNNNNNNNNs-oh-
5311      :ys:/yNNNNNNNNNNNNNNNmy/:sy:
5312        .+ys///osyhhhhys+///sy+.
5313            -/osssossossso/-
5314EOF
5315        ;;
5316
5317        "Hash"*)
5318            set_colors 123
5319            read -rd '' ascii_data <<'EOF'
5320${c1}
5321
5322      +   ######   +
5323    ###   ######   ###
5324  #####   ######   #####
5325 ######   ######   ######
5326
5327####### '"###### '"########
5328#######   ######   ########
5329#######   ######   ########
5330
5331 ###### '"###### '"######
5332  #####   ######   #####
5333    ###   ######   ###
5334      ~   ######   ~
5335
5336EOF
5337        ;;
5338
5339        "alpine_small")
5340            set_colors 4 7
5341            read -rd '' ascii_data <<'EOF'
5342${c1}   /\\ /\\
5343  /${c2}/ ${c1}\\  \\
5344 /${c2}/   ${c1}\\  \\
5345/${c2}//    ${c1}\\  \\
5346${c2}//      ${c1}\\  \\
5347         \\
5348EOF
5349        ;;
5350
5351        "Alpine"*)
5352            set_colors 4 5 7 6
5353            read -rd '' ascii_data <<'EOF'
5354${c1}       .hddddddddddddddddddddddh.
5355      :dddddddddddddddddddddddddd:
5356     /dddddddddddddddddddddddddddd/
5357    +dddddddddddddddddddddddddddddd+
5358  `sdddddddddddddddddddddddddddddddds`
5359 `ydddddddddddd++hdddddddddddddddddddy`
5360.hddddddddddd+`  `+ddddh:-sdddddddddddh.
5361hdddddddddd+`      `+y:    .sddddddddddh
5362ddddddddh+`   `//`   `.`     -sddddddddd
5363ddddddh+`   `/hddh/`   `:s-    -sddddddd
5364ddddh+`   `/+/dddddh/`   `+s-    -sddddd
5365ddd+`   `/o` :dddddddh/`   `oy-    .yddd
5366hdddyo+ohddyosdddddddddho+oydddy++ohdddh
5367.hddddddddddddddddddddddddddddddddddddh.
5368 `yddddddddddddddddddddddddddddddddddy`
5369  `sdddddddddddddddddddddddddddddddds`
5370    +dddddddddddddddddddddddddddddd+
5371     /dddddddddddddddddddddddddddd/
5372      :dddddddddddddddddddddddddd:
5373       .hddddddddddddddddddddddh.
5374EOF
5375        ;;
5376
5377        "Alter"*)
5378            set_colors 6 6
5379            read -rd '' ascii_data <<'EOF'
5380${c1}                      %,
5381                    ^WWWw
5382                   'wwwwww
5383                  !wwwwwwww
5384                 #`wwwwwwwww
5385                @wwwwwwwwwwww
5386               wwwwwwwwwwwwwww
5387              wwwwwwwwwwwwwwwww
5388             wwwwwwwwwwwwwwwwwww
5389            wwwwwwwwwwwwwwwwwwww,
5390           w~1i.wwwwwwwwwwwwwwwww,
5391         3~:~1lli.wwwwwwwwwwwwwwww.
5392        :~~:~?ttttzwwwwwwwwwwwwwwww
5393       #<~:~~~~?llllltO-.wwwwwwwwwww
5394      #~:~~:~:~~?ltlltlttO-.wwwwwwwww
5395     @~:~~:~:~:~~(zttlltltlOda.wwwwwww
5396    @~:~~: ~:~~:~:(zltlltlO    a,wwwwww
5397   8~~:~~:~~~~:~~~~_1ltltu          ,www
5398  5~~:~~:~~:~~:~~:~~~_1ltq             N,,
5399 g~:~~:~~~:~~:~~:~:~~~~1q                N,
5400EOF
5401        ;;
5402
5403        "Amazon"*)
5404            set_colors 3 7
5405            read -rd '' ascii_data <<'EOF'
5406${c1}             `-/oydNNdyo:.`
5407      `.:+shmMMMMMMMMMMMMMMmhs+:.`
5408    -+hNNMMMMMMMMMMMMMMMMMMMMMMNNho-
5409.``      -/+shmNNMMMMMMNNmhs+/-      ``.
5410dNmhs+:.       `.:/oo/:.`       .:+shmNd
5411dMMMMMMMNdhs+:..        ..:+shdNMMMMMMMd
5412dMMMMMMMMMMMMMMNds    odNMMMMMMMMMMMMMMd
5413dMMMMMMMMMMMMMMMMh    yMMMMMMMMMMMMMMMMd
5414dMMMMMMMMMMMMMMMMh    yMMMMMMMMMMMMMMMMd
5415dMMMMMMMMMMMMMMMMh    yMMMMMMMMMMMMMMMMd
5416dMMMMMMMMMMMMMMMMh    yMMMMMMMMMMMMMMMMd
5417dMMMMMMMMMMMMMMMMh    yMMMMMMMMMMMMMMMMd
5418dMMMMMMMMMMMMMMMMh    yMMMMMMMMMMMMMMMMd
5419dMMMMMMMMMMMMMMMMh    yMMMMMMMMMMMMMMMMd
5420dMMMMMMMMMMMMMMMMh    yMMMMMMMMMMMMMMMMd
5421dMMMMMMMMMMMMMMMMh    yMMMMMMMMMMMMMMMMd
5422.:+ydNMMMMMMMMMMMh    yMMMMMMMMMMMNdy+:.
5423     `.:+shNMMMMMh    yMMMMMNhs+:``
5424            `-+shy    shs+:`
5425EOF
5426        ;;
5427
5428        "Anarchy"*)
5429            set_colors 7 4
5430            read -rd '' ascii_data <<'EOF'
5431                         ${c2}..${c1}
5432                        ${c2}..${c1}
5433                      ${c2}:..${c1}
5434                    ${c2}:+++.${c1}
5435              .:::++${c2}++++${c1}+::.
5436          .:+######${c2}++++${c1}######+:.
5437       .+#########${c2}+++++${c1}##########:.
5438     .+##########${c2}+++++++${c1}##${c2}+${c1}#########+.
5439    +###########${c2}+++++++++${c1}############:
5440   +##########${c2}++++++${c1}#${c2}++++${c1}#${c2}+${c1}###########+
5441  +###########${c2}+++++${c1}###${c2}++++${c1}#${c2}+${c1}###########+
5442 :##########${c2}+${c1}#${c2}++++${c1}####${c2}++++${c1}#${c2}+${c1}############:
5443 ###########${c2}+++++${c1}#####${c2}+++++${c1}#${c2}+${c1}###${c2}++${c1}######+
5444.##########${c2}++++++${c1}#####${c2}++++++++++++${c1}#######.
5445.##########${c2}+++++++++++++++++++${c1}###########.
5446 #####${c2}++++++++++++++${c1}###${c2}++++++++${c1}#########+
5447 :###${c2}++++++++++${c1}#########${c2}+++++++${c1}#########:
5448  +######${c2}+++++${c1}##########${c2}++++++++${c1}#######+
5449   +####${c2}+++++${c1}###########${c2}+++++++++${c1}#####+
5450    :##${c2}++++++${c1}############${c2}++++++++++${c1}##:
5451     .${c2}++++++${c1}#############${c2}++++++++++${c1}+.
5452      :${c2}++++${c1}###############${c2}+++++++${c1}::
5453     .${c2}++. .:+${c1}##############${c2}+++++++${c1}..
5454     ${c2}.:.${c1}      ..::++++++::..:${c2}++++${c1}+.
5455     ${c2}.${c1}                       ${c2}.:+++${c1}.
5456                                ${c2}.:${c1}:
5457                                   ${c2}..${c1}
5458                                    ${c2}..${c1}
5459EOF
5460        ;;
5461
5462        "android_small"*)
5463            set_colors 2 7
5464            read -rd '' ascii_data <<'EOF'
5465${c1}  ;,           ,;
5466   ';,.-----.,;'
5467  ,'           ',
5468 /    O     O    \\
5469|                 |
5470'-----------------'
5471EOF
5472        ;;
5473
5474        "Android"*)
5475            set_colors 2 7
5476            read -rd '' ascii_data <<'EOF'
5477${c1}         -o          o-
5478          +hydNNNNdyh+
5479        +mMMMMMMMMMMMMm+
5480      `dMM${c2}m:${c1}NMMMMMMN${c2}:m${c1}MMd`
5481      hMMMMMMMMMMMMMMMMMMh
5482  ..  yyyyyyyyyyyyyyyyyyyy  ..
5483.mMMm`MMMMMMMMMMMMMMMMMMMM`mMMm.
5484:MMMM-MMMMMMMMMMMMMMMMMMMM-MMMM:
5485:MMMM-MMMMMMMMMMMMMMMMMMMM-MMMM:
5486:MMMM-MMMMMMMMMMMMMMMMMMMM-MMMM:
5487:MMMM-MMMMMMMMMMMMMMMMMMMM-MMMM:
5488-MMMM-MMMMMMMMMMMMMMMMMMMM-MMMM-
5489 +yy+ MMMMMMMMMMMMMMMMMMMM +yy+
5490      mMMMMMMMMMMMMMMMMMMm
5491      `/++MMMMh++hMMMM++/`
5492          MMMMo  oMMMM
5493          MMMMo  oMMMM
5494          oNMm-  -mMNs
5495EOF
5496        ;;
5497
5498        "Antergos"*)
5499            set_colors 4 6
5500            read -rd '' ascii_data <<'EOF'
5501${c2}              `.-/::/-``
5502            .-/osssssssso/.
5503           :osyysssssssyyys+-
5504        `.+yyyysssssssssyyyyy+.
5505       `/syyyyyssssssssssyyyyys-`
5506      `/yhyyyyysss${c1}++${c2}ssosyyyyhhy/`
5507     .ohhhyyyys${c1}o++/+o${c2}so${c1}+${c2}syy${c1}+${c2}shhhho.
5508    .shhhhys${c1}oo++//+${c2}sss${c1}+++${c2}yyy${c1}+s${c2}hhhhs.
5509   -yhhhhs${c1}+++++++o${c2}ssso${c1}+++${c2}yyy${c1}s+o${c2}hhddy:
5510  -yddhhy${c1}o+++++o${c2}syyss${c1}++++${c2}yyy${c1}yooy${c2}hdddy-
5511 .yddddhs${c1}o++o${c2}syyyyys${c1}+++++${c2}yyhh${c1}sos${c2}hddddy`
5512`odddddhyosyhyyyyyy${c1}++++++${c2}yhhhyosddddddo
5513.dmdddddhhhhhhhyyyo${c1}+++++${c2}shhhhhohddddmmh.
5514ddmmdddddhhhhhhhso${c1}++++++${c2}yhhhhhhdddddmmdy
5515dmmmdddddddhhhyso${c1}++++++${c2}shhhhhddddddmmmmh
5516-dmmmdddddddhhys${c1}o++++o${c2}shhhhdddddddmmmmd-
5517.smmmmddddddddhhhhhhhhhdddddddddmmmms.
5518   `+ydmmmdddddddddddddddddddmmmmdy/.
5519      `.:+ooyyddddddddddddyyso+:.`
5520EOF
5521        ;;
5522
5523        "antiX"*)
5524            set_colors 1 7 3
5525            read -rd '' ascii_data <<'EOF'
5526${c1}
5527                    \
5528         , - ~ ^ ~ - \        /
5529     , '              \ ' ,  /
5530   ,                   \   '/
5531  ,                     \  / ,
5532 ,___,                   \/   ,
5533 /   |   _  _  _|_ o     /\   ,
5534|,   |  / |/ |  |  |    /  \  ,
5535 \,_/\_/  |  |_/|_/|_/_/    \,
5536   ,                  /     ,\
5537     ,               /  , '   \
5538      ' - , _ _ _ ,  '
5539EOF
5540        ;;
5541
5542        "AOSC OS/Retro"*)
5543            set_colors 4 7 1 3
5544            read -rd '' ascii_data <<'EOF'
5545${c2}          .........
5546     ...................
5547   .....................${c1}################${c2}
5548 ..............     ....${c1}################${c2}
5549..............       ...${c1}################${c2}
5550.............         ..${c1}****************${c2}
5551............     .     .${c1}****************${c2}
5552...........     ...     ${c1}................${c2}
5553..........     .....     ${c1}...............${c2}
5554.........     .......     ...
5555 .${c3}......                   ${c2}.
5556  ${c3}.....      .....${c2}....    ${c4}...........
5557  ${c3}....      ......${c2}.       ${c4}...........
5558  ${c3}...      .......        ${c4}...........
5559  ${c3}................        ${c4}***********
5560  ${c3}................        ${c4}###########
5561  ${c3}****************
5562  ${c3}################
5563EOF
5564        ;;
5565
5566        "AOSC OS"*)
5567            set_colors 4 7 1
5568            read -rd '' ascii_data <<'EOF'
5569${c2}             .:+syhhhhys+:.
5570         .ohNMMMMMMMMMMMMMMNho.
5571      `+mMMMMMMMMMMmdmNMMMMMMMMm+`
5572     +NMMMMMMMMMMMM/   `./smMMMMMN+
5573   .mMMMMMMMMMMMMMMo        -yMMMMMm.
5574  :NMMMMMMMMMMMMMMMs          .hMMMMN:
5575 .NMMMMhmMMMMMMMMMMm+/-         oMMMMN.
5576 dMMMMs  ./ymMMMMMMMMMMNy.       sMMMMd
5577-MMMMN`      oMMMMMMMMMMMN:      `NMMMM-
5578/MMMMh       NMMMMMMMMMMMMm       hMMMM/
5579/MMMMh       NMMMMMMMMMMMMm       hMMMM/
5580-MMMMN`      :MMMMMMMMMMMMy.     `NMMMM-
5581 dMMMMs       .yNMMMMMMMMMMMNy/. sMMMMd
5582 .NMMMMo         -/+sMMMMMMMMMMMmMMMMN.
5583  :NMMMMh.          .MMMMMMMMMMMMMMMN:
5584   .mMMMMMy-         NMMMMMMMMMMMMMm.
5585     +NMMMMMms/.`    mMMMMMMMMMMMN+
5586      `+mMMMMMMMMNmddMMMMMMMMMMm+`
5587         .ohNMMMMMMMMMMMMMMNho.
5588             .:+syhhhhys+:.
5589EOF
5590        ;;
5591
5592        "Apricity"*)
5593            set_colors 4 7 1
5594            read -rd '' ascii_data <<'EOF'
5595${c2}                                    ./o-
5596          ``...``              `:. -/:
5597     `-+ymNMMMMMNmho-`      :sdNNm/
5598   `+dMMMMMMMMMMMMMMMmo` sh:.:::-
5599  /mMMMMMMMMMMMMMMMMMMMm/`sNd/
5600 oMMMMMMMMMMMMMMMMMMMMMMMs -`
5601:MMMMMMMMMMMMMMMMMMMMMMMMM/
5602NMMMMMMMMMMMMMMMMMMMMMMMMMd
5603MMMMMMMmdmMMMMMMMMMMMMMMMMd
5604MMMMMMy` .mMMMMMMMMMMMmho:`
5605MMMMMMNo/sMMMMMMMNdy+-.`-/
5606MMMMMMMMMMMMNdy+:.`.:ohmm:
5607MMMMMMMmhs+-.`.:+ymNMMMy.
5608MMMMMM/`.-/ohmNMMMMMMy-
5609MMMMMMNmNNMMMMMMMMmo.
5610MMMMMMMMMMMMMMMms:`
5611MMMMMMMMMMNds/.
5612dhhyys+/-`
5613EOF
5614        ;;
5615
5616        "arcolinux_small"*)
5617            set_colors 7 4
5618            read -rd '' ascii_data <<'EOF'
5619${c2}          A
5620         ooo
5621        ooooo
5622       ooooooo
5623      ooooooooo
5624     ooooo ooooo
5625    ooooo   ooooo
5626   ooooo     ooooo
5627  ooooo  ${c1}<oooooooo>${c2}
5628 ooooo      ${c1}<oooooo>${c2}
5629ooooo          ${c1}<oooo>${c2}
5630EOF
5631        ;;
5632
5633        "ArcoLinux"*)
5634            set_colors 7 4
5635            read -rd '' ascii_data <<'EOF'
5636${c2}                    /-
5637                   ooo:
5638                  yoooo/
5639                 yooooooo
5640                yooooooooo
5641               yooooooooooo
5642             .yooooooooooooo
5643            .oooooooooooooooo
5644           .oooooooarcoooooooo
5645          .ooooooooo-oooooooooo
5646         .ooooooooo-  oooooooooo
5647        :ooooooooo.    :ooooooooo
5648       :ooooooooo.      :ooooooooo
5649      :oooarcooo         .oooarcooo
5650     :ooooooooy           .ooooooooo
5651    :ooooooooo   ${c1}/ooooooooooooooooooo${c2}
5652   :ooooooooo      ${c1}.-ooooooooooooooooo.${c2}
5653  ooooooooo-             ${c1}-ooooooooooooo.${c2}
5654 ooooooooo-                 ${c1}.-oooooooooo.${c2}
5655ooooooooo.                     ${c1}-ooooooooo${c2}
5656EOF
5657        ;;
5658
5659        "arch_small")
5660            set_colors 6 7 1
5661            read -rd '' ascii_data <<'EOF'
5662${c1}      /\\
5663     /  \\
5664    /\\   \\
5665${c2}   /      \\
5666  /   ,,   \\
5667 /   |  |  -\\
5668/_-''    ''-_\\
5669EOF
5670        ;;
5671
5672        "arch_old")
5673            set_colors 6 7 1
5674            read -rd '' ascii_data <<'EOF'
5675${c1}             __
5676         _=(SDGJT=_
5677       _GTDJHGGFCVS)
5678      ,GTDJGGDTDFBGX0
5679${c1}     JDJDIJHRORVFSBSVL${c2}-=+=,_
5680${c1}    IJFDUFHJNXIXCDXDSV,${c2}  "DEBL
5681${c1}   [LKDSDJTDU=OUSCSBFLD.${c2}   '?ZWX,
5682${c1}  ,LMDSDSWH'     `DCBOSI${c2}     DRDS],
5683${c1}  SDDFDFH'         !YEWD,${c2}   )HDROD
5684${c1} !KMDOCG            &GSU|${c2}\_GFHRGO\'
5685${c1} HKLSGP'${c2}           __${c1}\TKM0${c2}\GHRBV)'
5686${c1}JSNRVW'${c2}       __+MNAEC${c1}\IOI,${c2}\BN'
5687${c1}HELK['${c2}    __,=OFFXCBGHC${c1}\FD)
5688${c1}?KGHE ${c2}\_-#DASDFLSV='${c1}    'EF
5689'EHTI                    !H
5690 `0F'                    '!
5691EOF
5692        ;;
5693
5694        "ArchBox"*)
5695            set_colors 2 7 1
5696            read -rd '' ascii_data <<'EOF'
5697${c1}              ...:+oh/:::..
5698         ..-/oshhhhhh`   `::::-.
5699     .:/ohhhhhhhhhhhh`        `-::::.
5700 .+shhhhhhhhhhhhhhhhh`             `.::-.
5701 /`-:+shhhhhhhhhhhhhh`            .-/+shh
5702 /      .:/ohhhhhhhhh`       .:/ohhhhhhhh
5703 /           `-:+shhh`  ..:+shhhhhhhhhhhh
5704 /                 .:ohhhhhhhhhhhhhhhhhhh
5705 /                  `hhhhhhhhhhhhhhhhhhhh
5706 /                  `hhhhhhhhhhhhhhhhhhhh
5707 /                  `hhhhhhhhhhhhhhhhhhhh
5708 /                  `hhhhhhhhhhhhhhhhhhhh
5709 /      .+o+        `hhhhhhhhhhhhhhhhhhhh
5710 /     -hhhhh       `hhhhhhhhhhhhhhhhhhhh
5711 /     ohhhhho      `hhhhhhhhhhhhhhhhhhhh
5712 /:::+`hhhhoos`     `hhhhhhhhhhhhhhhhhs+`
5713    `--/:`   /:     `hhhhhhhhhhhho/-
5714             -/:.   `hhhhhhs+:-`
5715                ::::/ho/-`
5716EOF
5717        ;;
5718
5719        "ARCHlabs"*)
5720            set_colors 6 6 7 1
5721            read -rd '' ascii_data <<'EOF'
5722${c1}                     'c'
5723                    'kKk,
5724                   .dKKKx.
5725                  .oKXKXKd.
5726                 .l0XXXXKKo.
5727                 c0KXXXXKX0l.
5728                :0XKKOxxOKX0l.
5729               :OXKOc. .c0XX0l.
5730              :OK0o. ${c4}...${c1}'dKKX0l.
5731             :OX0c  ${c4};xOx'${c1}'dKXX0l.
5732            :0KKo.${c4}.o0XXKd'.${c1}lKXX0l.
5733           c0XKd.${c4}.oKXXXXKd..${c1}oKKX0l.
5734         .c0XKk;${c4}.l0K0OO0XKd..${c1}oKXXKo.
5735        .l0XXXk:${c4},dKx,.'l0XKo.${c1}.kXXXKo.
5736       .o0XXXX0d,${c4}:x;   .oKKx'${c1}.dXKXXKd.
5737      .oKXXXXKK0c.${c4};.    :00c'${c1}cOXXXXXKd.
5738     .dKXXXXXXXXk,${c4}.     cKx'${c1}'xKXXXXXXKx'
5739    'xKXXXXK0kdl:.     ${c4}.ok; ${c1}.cdk0KKXXXKx'
5740   'xKK0koc,..         ${c4}'c, ${c1}    ..,cok0KKk,
5741  ,xko:'.             ${c4}.. ${c1}           .':okx;
5742 .,'.                                   .',.
5743EOF
5744        ;;
5745
5746        "ArchStrike"*)
5747            set_colors 8 6
5748            read -rd '' ascii_data <<'EOF'
5749${c1}                   *   
5750                  **.
5751                 ****
5752                ******
5753                *******
5754              ** *******
5755             **** *******
5756            ${c1}****${c2}_____${c1}***${c2}/${c1}*
5757           ***${c2}/${c1}*******${c2}//${c1}***
5758          **${c2}/${c1}********${c2}///${c1}*${c2}/${c1}**
5759         **${c2}/${c1}*******${c2}////${c1}***${c2}/${c1}**
5760        **${c2}/${c1}****${c2}//////.,${c1}****${c2}/${c1}**
5761       ***${c2}/${c1}*****${c2}/////////${c1}**${c2}/${c1}***
5762      ****${c2}/${c1}****    ${c2}/////${c1}***${c2}/${c1}****
5763     ******${c2}/${c1}***  ${c2}////   ${c1}**${c2}/${c1}******
5764    ********${c2}/${c1}* ${c2}///      ${c1}*${c2}/${c1}********
5765  ,******     ${c2}// ______ /    ${c1}******,
5766EOF
5767        ;;
5768
5769        *"XFerience"*)
5770            set_colors 6 6 7 1
5771            read -rd '' ascii_data <<'EOF'
5772${c1}           ``--:::::::-.`
5773        .-/+++ooooooooo+++:-`
5774     `-/+oooooooooooooooooo++:.
5775    -/+oooooo/+ooooooooo+/ooo++:`
5776  `/+oo++oo.   .+oooooo+.-: +:-o+-
5777 `/+o/.  -o.    :oooooo+ ```:.+oo+-
5778`:+oo-    -/`   :oooooo+ .`-`+oooo/.
5779.+ooo+.    .`   `://///+-+..oooooo+:`
5780-+ooo:`                ``.-+oooooo+/`
5781-+oo/`                       :+oooo/.
5782.+oo:            ..-/. .      -+oo+/`
5783`/++-         -:::++::/.      -+oo+-
5784 ./o:          `:///+-     `./ooo+:`
5785  .++-         `` /-`   -:/+oooo+:`
5786   .:+/:``          `-:ooooooo++-
5787     ./+o+//:...../+oooooooo++:`
5788       `:/++ooooooooooooo++/-`
5789          `.-//++++++//:-.`
5790               ``````
5791EOF
5792        ;;
5793
5794        "ArchMerge"*)
5795            set_colors 6 6 7 1
5796            read -rd '' ascii_data <<'EOF'
5797${c1}                    y:
5798                  sMN-
5799                 +MMMm`
5800                /MMMMMd`
5801               :NMMMMMMy
5802              -NMMMMMMMMs
5803             .NMMMMMMMMMM+
5804            .mMMMMMMMMMMMM+
5805            oNMMMMMMMMMMMMM+
5806          `+:-+NMMMMMMMMMMMM+
5807          .sNMNhNMMMMMMMMMMMM/
5808        `hho/sNMMMMMMMMMMMMMMM/
5809       `.`omMMmMMMMMMMMMMMMMMMM+
5810      .mMNdshMMMMd+::oNMMMMMMMMMo
5811     .mMMMMMMMMM+     `yMMMMMMMMMs
5812    .NMMMMMMMMM/        yMMMMMMMMMy
5813   -NMMMMMMMMMh         `mNMMMMMMMMd`
5814  /NMMMNds+:.`             `-/oymMMMm.
5815 +Mmy/.                          `:smN:
5816/+.                                  -o.
5817EOF
5818        ;;
5819
5820        "Arch"*)
5821            set_colors 6 6 7 1
5822            read -rd '' ascii_data <<'EOF'
5823${c1}                   -`
5824                  .o+`
5825                 `ooo/
5826                `+oooo:
5827               `+oooooo:
5828               -+oooooo+:
5829             `/:-:++oooo+:
5830            `/++++/+++++++:
5831           `/++++++++++++++:
5832          `/+++o${c2}oooooooo${c1}oooo/`
5833${c2}         ${c1}./${c2}ooosssso++osssssso${c1}+`
5834${c2}        .oossssso-````/ossssss+`
5835       -osssssso.      :ssssssso.
5836      :osssssss/        osssso+++.
5837     /ossssssss/        +ssssooo/-
5838   `/ossssso+/:-        -:/+osssso+-
5839  `+sso+:-`                 `.-/+oso:
5840 `++:.                           `-/+/
5841 .`                                 `/
5842EOF
5843        ;;
5844
5845        "artix_small"*)
5846            set_colors 6 6 7 1
5847            read -rd '' ascii_data <<'EOF'
5848${c1}      /\\
5849     /  \\
5850    /`'.,\\
5851   /     ',
5852  /      ,`\\
5853 /   ,.'`.  \\
5854/.,'`     `'.\\
5855EOF
5856        ;;
5857
5858        "Artix"*)
5859            set_colors 6 6 7 1
5860            read -rd '' ascii_data <<'EOF'
5861${c1}                   '
5862                  'o'
5863                 'ooo'
5864                'ooxoo'
5865               'ooxxxoo'
5866              'oookkxxoo'
5867             'oiioxkkxxoo'
5868            ':;:iiiioxxxoo'
5869               `'.;::ioxxoo'
5870          '-.      `':;jiooo'
5871         'oooio-..     `'i:io'
5872        'ooooxxxxoio:,.   `'-;'
5873       'ooooxxxxxkkxoooIi:-.  `'
5874      'ooooxxxxxkkkkxoiiiiiji'
5875     'ooooxxxxxkxxoiiii:'`     .i'
5876    'ooooxxxxxoi:::'`       .;ioxo'
5877   'ooooxooi::'`         .:iiixkxxo'
5878  'ooooi:'`                `'';ioxxo'
5879 'i:'`                          '':io'
5880'`                                   `'
5881EOF
5882        ;;
5883
5884        "Arya"*)
5885            set_colors 2 1
5886            read -rd '' ascii_data <<'EOF'
5887${c1}                `oyyy/${c2}-yyyyyy+
5888${c1}               -syyyy/${c2}-yyyyyy+
5889${c1}              .syyyyy/${c2}-yyyyyy+
5890${c1}              :yyyyyy/${c2}-yyyyyy+
5891${c1}           `/ :yyyyyy/${c2}-yyyyyy+
5892${c1}          .+s :yyyyyy/${c2}-yyyyyy+
5893${c1}         .oys :yyyyyy/${c2}-yyyyyy+
5894${c1}        -oyys :yyyyyy/${c2}-yyyyyy+
5895${c1}       :syyys :yyyyyy/${c2}-yyyyyy+
5896${c1}      /syyyys :yyyyyy/${c2}-yyyyyy+
5897${c1}     +yyyyyys :yyyyyy/${c2}-yyyyyy+
5898${c1}   .oyyyyyyo. :yyyyyy/${c2}-yyyyyy+ ---------
5899${c1}  .syyyyyy+`  :yyyyyy/${c2}-yyyyy+-+syyyyyyyy
5900${c1} -syyyyyy/    :yyyyyy/${c2}-yyys:.syyyyyyyyyy
5901${c1}:syyyyyy/     :yyyyyy/${c2}-yyo.:syyyyyyyyyyy
5902EOF
5903        ;;
5904
5905        "Bedrock"*)
5906            set_colors 8 7
5907            read -rd '' ascii_data <<'EOF'
5908${c1}--------------------------------------
5909--------------------------------------
5910--------------------------------------
5911---${c2}\\\\\\\\\\\\\\\\\\\\\\\\${c1}-----------------------
5912----${c2}\\\\\\      \\\\\\${c1}----------------------
5913-----${c2}\\\\\\      \\\\\\${c1}---------------------
5914------${c2}\\\\\\      \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\${c1}------
5915-------${c2}\\\\\\                    \\\\\\${c1}-----
5916--------${c2}\\\\\\                    \\\\\\${c1}----
5917---------${c2}\\\\\\        ______      \\\\\\${c1}---
5918----------${c2}\\\\\\                   ///${c1}---
5919-----------${c2}\\\\\\                 ///${c1}----
5920------------${c2}\\\\\\               ///${c1}-----
5921-------------${c2}\\\\\\////////////////${c1}------
5922--------------------------------------
5923--------------------------------------
5924--------------------------------------
5925EOF
5926        ;;
5927
5928        "Bitrig"*)
5929            set_colors 2 7
5930            read -rd '' ascii_data <<'EOF'
5931${c1}   `hMMMMN+
5932   -MMo-dMd`
5933   oMN- oMN`
5934   yMd  /NM:
5935  .mMmyyhMMs
5936  :NMMMhsmMh
5937  +MNhNNoyMm-
5938  hMd.-hMNMN:
5939  mMmsssmMMMo
5940 .MMdyyhNMMMd
5941 oMN.`/dMddMN`
5942 yMm/hNm+./MM/
5943.dMMMmo.``.NMo
5944:NMMMNmmmmmMMh
5945/MN/-------oNN:
5946hMd.       .dMh
5947sm/         /ms
5948EOF
5949        ;;
5950
5951        "BlackArch"*)
5952            set_colors 1 1 0 1
5953            read -rd '' ascii_data <<'EOF'
5954${c3}                   00
5955                   11
5956                  ====${c1}
5957                  .${c3}//${c1}
5958                 `o${c3}//${c1}:
5959                `+o${c3}//${c1}o:
5960               `+oo${c3}//${c1}oo:
5961               -+oo${c3}//${c1}oo+:
5962             `/:-:+${c3}//${c1}ooo+:
5963            `/+++++${c3}//${c1}+++++:
5964           `/++++++${c3}//${c1}++++++:
5965          `/+++o${c2}ooo${c3}//${c2}ooo${c1}oooo/`
5966${c2}         ${c1}./${c2}ooosssso${c3}//${c2}osssssso${c1}+`
5967${c2}        .oossssso-`${c3}//${c1}`/ossssss+`
5968       -osssssso.  ${c3}//${c1}  :ssssssso.
5969      :osssssss/   ${c3}//${c1}   osssso+++.
5970     /ossssssss/   ${c3}//${c1}   +ssssooo/-
5971   `/ossssso+/:-   ${c3}//${c1}   -:/+osssso+-
5972  `+sso+:-`        ${c3}//${c1}       `.-/+oso:
5973 `++:.             ${c3}//${c1}            `-/+/
5974 .`                ${c3}/${c1}                `/
5975EOF
5976        ;;
5977
5978        "BLAG"*)
5979            set_colors 5 7
5980            read -rd '' ascii_data <<'EOF'
5981${c1}             d
5982            ,MK:
5983            xMMMX:
5984           .NMMMMMX;
5985           lMMMMMMMM0clodkO0KXWW:
5986           KMMMMMMMMMMMMMMMMMMX'
5987      .;d0NMMMMMMMMMMMMMMMMMMK.
5988 .;dONMMMMMMMMMMMMMMMMMMMMMMx
5989'dKMMMMMMMMMMMMMMMMMMMMMMMMl
5990   .:xKWMMMMMMMMMMMMMMMMMMM0.
5991       .:xNMMMMMMMMMMMMMMMMMK.
5992          lMMMMMMMMMMMMMMMMMMK.
5993          ,MMMMMMMMWkOXWMMMMMM0
5994          .NMMMMMNd.     `':ldko
5995           OMMMK:
5996           oWk,
5997           ;:
5998EOF
5999        ;;
6000
6001        "BlankOn"*)
6002            set_colors 1 7 3
6003            read -rd '' ascii_data <<'EOF'
6004${c2}        `./ohdNMMMMNmho+.` ${c1}       .+oo:`
6005${c2}      -smMMMMMMMMMMMMMMMMmy-`    ${c1}`yyyyy+
6006${c2}   `:dMMMMMMMMMMMMMMMMMMMMMMd/`  ${c1}`yyyyys
6007${c2}  .hMMMMMMMNmhso/++symNMMMMMMMh- ${c1}`yyyyys
6008${c2} -mMMMMMMms-`         -omMMMMMMN-${c1}.yyyyys
6009${c2}.mMMMMMMy.              .yMMMMMMm:${c1}yyyyys
6010${c2}sMMMMMMy                 `sMMMMMMh${c1}yyyyys
6011${c2}NMMMMMN:                  .NMMMMMN${c1}yyyyys
6012${c2}MMMMMMm.                   NMMMMMN${c1}yyyyys
6013${c2}hMMMMMM+                  /MMMMMMN${c1}yyyyys
6014${c2}:NMMMMMN:                :mMMMMMM+${c1}yyyyys
6015${c2} oMMMMMMNs-            .sNMMMMMMs.${c1}yyyyys
6016${c2}  +MMMMMMMNho:.`  `.:ohNMMMMMMNo ${c1}`yyyyys
6017${c2}   -hMMMMMMMMNNNmmNNNMMMMMMMMh-  ${c1}`yyyyys
6018${c2}     :yNMMMMMMMMMMMMMMMMMMNy:`   ${c1}`yyyyys
6019${c2}       .:sdNMMMMMMMMMMNds/.      ${c1}`yyyyyo
6020${c2}           `.:/++++/:.`           ${c1}:oys+.
6021EOF
6022        ;;
6023
6024        "BlueLight"*)
6025            set_colors 7 4
6026            read -rd '' ascii_data <<'EOF'
6027${c1}              oMMNMMMMMMMMMMMMMMMMMMMMMM
6028              oMMMMMMMMMMMMMMMMMMMMMMMMM
6029              oMMMMMMMMMMMMMMMMMMMMMMMMM
6030              oMMMMMMMMMMMMMMMMMMMMMMMMM
6031              -+++++++++++++++++++++++mM${c2}
6032             ```````````````````````..${c1}dM${c2}
6033           ```````````````````````....${c1}dM${c2}
6034         ```````````````````````......${c1}dM${c2}
6035       ```````````````````````........${c1}dM${c2}
6036     ```````````````````````..........${c1}dM${c2}
6037   ```````````````````````............${c1}dM${c2}
6038.::::::::::::::::::::::-..............${c1}dM${c2}
6039 `-+yyyyyyyyyyyyyyyyyyyo............${c1}+mMM${c2}
6040     -+yyyyyyyyyyyyyyyyo..........${c1}+mMMMM${c2}
6041        ./syyyyyyyyyyyyo........${c1}+mMMMMMM${c2}
6042           ./oyyyyyyyyyo......${c1}+mMMMMMMMM${c2}
6043              omdyyyyyyo....${c1}+mMMMMMMMMMM${c2}
6044              ${c1}oMMM${c2}mdhyyo..${c1}+mMMMMMMMMMMMM
6045              oNNNNNNm${c2}dso${c1}mMMMMMMMMMMMMMM
6046EOF
6047        ;;
6048
6049       "bonsai"*)
6050           set_colors 6 2 3
6051           read -rd '' ascii_data <<'EOF'
6052${c2}   ,####,
6053   ${c2}#######,  ${c2},#####,
6054   ${c2}#####',#  ${c2}'######
6055    ${c2}''###'${c3}';,,,'${c2}###'
6056   ${c3}       ,;  ''''
6057   ${c3}      ;;;   ${c2},#####,
6058   ${c3}     ;;;'  ,,;${c2};;###
6059   ${c3}     ';;;;''${c2}'####'
6060   ${c3}      ;;;
6061   ${c3}   ,.;;';'',,,
6062   ${c3}  '     '
6063${c1} #
6064 #                        O
6065 ##, ,##,',##, ,##  ,#,   ,
6066 # # #  # #''# #,,  # #   #
6067 '#' '##' #  #  ,,# '##;, #
6068EOF
6069       ;;
6070
6071       "BSD")
6072            set_colors 1 7 4 3 6
6073            read -rd '' ascii_data <<'EOF'
6074${c1}             ,        ,
6075            /(        )`
6076            \ \___   / |
6077            /- _  `-/  '
6078           (${c2}/\/ \ ${c1}\   /\
6079           ${c2}/ /   | `    ${c1}\
6080           ${c3}O O   ${c2}) ${c1}/    |
6081           ${c2}`-^--'${c1}`<     '
6082          (_.)  _  )   /
6083           `.___/`    /
6084             `-----' /
6085${c4}<----.     __ / __   \
6086${c4}<----|====${c1}O)))${c4}==${c1}) \) /${c4}====|
6087<----'    ${c1}`--' `.__,' \
6088             |        |
6089              \       /       /\
6090         ${c5}______${c1}( (_  / \______/
6091       ${c5},'  ,-----'   |
6092       `--{__________)
6093EOF
6094        ;;
6095
6096        "BunsenLabs"*)
6097            set_colors fg 7
6098            read -rd '' ascii_data <<'EOF'
6099${c1}        `++
6100      -yMMs
6101    `yMMMMN`
6102   -NMMMMMMm.
6103  :MMMMMMMMMN-
6104 .NMMMMMMMMMMM/
6105 yMMMMMMMMMMMMM/
6106`MMMMMMNMMMMMMMN.
6107-MMMMN+ /mMMMMMMy
6108-MMMm`   `dMMMMMM
6109`MMN.     .NMMMMM.
6110 hMy       yMMMMM`
6111 -Mo       +MMMMN
6112  /o       +MMMMs
6113           +MMMN`
6114           hMMM:
6115          `NMM/
6116          +MN:
6117          mh.
6118         -/
6119EOF
6120        ;;
6121
6122        "Calculate"*)
6123            set_colors 7 3
6124            read -rd '' ascii_data <<'EOF'
6125${c1}                              ......
6126                           ,,+++++++,.
6127                         .,,,....,,,${c2}+**+,,.${c1}
6128                       ............,${c2}++++,,,${c1}
6129                      ...............
6130                    ......,,,........
6131                  .....+*#####+,,,*+.
6132              .....,*###############,..,,,,,,..
6133           ......,*#################*..,,,,,..,,,..
6134         .,,....*####################+***+,,,,...,++,
6135       .,,..,..*#####################*,
6136     ,+,.+*..*#######################.
6137   ,+,,+*+..,########################*
6138.,++++++.  ..+##**###################+
6139.....      ..+##***#################*.
6140           .,.*#*****##############*.
6141           ..,,*********#####****+.
6142     ${c2}.,++*****+++${c1}*****************${c2}+++++,.${c1}
6143      ${c2},++++++**+++++${c1}***********${c2}+++++++++,${c1}
6144     ${c2}.,,,,++++,..  .,,,,,.....,+++,.,,${c1}
6145EOF
6146        ;;
6147    "Carbs"*)
6148        set_colors 4 5 4 4 4 4
6149        read -rd '' ascii_data <<'EOF'
6150${c2}             ..........
6151          ..,;:ccccccc:;'..
6152       ..,clllc:;;;;;:cllc,.
6153      .,cllc,...     ..';;'.
6154     .;lol;..           ..
6155    .,lol;.
6156    .coo:.
6157   .'lol,.
6158   .,lol,.
6159   .,lol,.
6160    'col;.
6161    .:ooc'.
6162    .'col:.
6163     .'cllc'..          .''.
6164      ..:lolc,'.......',cll,.
6165        ..;cllllccccclllc;'.
6166          ...',;;;;;;,,...
6167                .....
6168EOF
6169        ;;
6170
6171        "centos_small"*)
6172            set_colors 3 2 4 5 7
6173            read -rd '' ascii_data <<'EOF'
6174${c2} ____${c1}^${c4}____
6175${c2} |\\  ${c1}|${c4}  /|
6176${c2} | \\ ${c1}|${c4} / |
6177${c4}<---- ${c3}---->
6178${c3} | / ${c2}|${c1} \\ |
6179${c3} |/__${c2}|${c1}__\\|
6180${c2}     v
6181EOF
6182        ;;
6183
6184        "CentOS"*)
6185            set_colors 3 2 4 5 7
6186            read -rd '' ascii_data <<'EOF'
6187${c1}                 ..
6188               .PLTJ.
6189              <><><><>
6190     ${c2}KKSSV' 4KKK ${c1}LJ${c4} KKKL.'VSSKK
6191     ${c2}KKV' 4KKKKK ${c1}LJ${c4} KKKKAL 'VKK
6192     ${c2}V' ' 'VKKKK ${c1}LJ${c4} KKKKV' ' 'V
6193     ${c2}.4MA.' 'VKK ${c1}LJ${c4} KKV' '.4Mb.
6194${c4}   . ${c2}KKKKKA.' 'V ${c1}LJ${c4} V' '.4KKKKK ${c3}.
6195${c4} .4D ${c2}KKKKKKKA.'' ${c1}LJ${c4} ''.4KKKKKKK ${c3}FA.
6196${c4}<QDD ++++++++++++  ${c3}++++++++++++ GFD>
6197${c4} 'VD ${c3}KKKKKKKK'.. ${c2}LJ ${c1}..'KKKKKKKK ${c3}FV
6198${c4}   ' ${c3}VKKKKK'. .4 ${c2}LJ ${c1}K. .'KKKKKV ${c3}'
6199     ${c3} 'VK'. .4KK ${c2}LJ ${c1}KKA. .'KV'
6200     ${c3}A. . .4KKKK ${c2}LJ ${c1}KKKKA. . .4
6201     ${c3}KKA. 'KKKKK ${c2}LJ ${c1}KKKKK' .4KK
6202     ${c3}KKSSA. VKKK ${c2}LJ ${c1}KKKV .4SSKK
6203${c2}              <><><><>
6204               'MKKM'
6205                 ''
6206EOF
6207        ;;
6208
6209        "Chakra"*)
6210            set_colors 4 5 7 6
6211            read -rd '' ascii_data <<'EOF'
6212${c1}     _ _ _        "kkkkkkkk.
6213   ,kkkkkkkk.,    'kkkkkkkkk,
6214   ,kkkkkkkkkkkk., 'kkkkkkkkk.
6215  ,kkkkkkkkkkkkkkkk,'kkkkkkkk,
6216 ,kkkkkkkkkkkkkkkkkkk'kkkkkkk.
6217  "''"''',;::,,"''kkk''kkkkk;   __
6218      ,kkkkkkkkkk, "k''kkkkk' ,kkkk
6219    ,kkkkkkk' ., ' .: 'kkkk',kkkkkk
6220  ,kkkkkkkk'.k'   ,  ,kkkk;kkkkkkkkk
6221 ,kkkkkkkk';kk 'k  "'k',kkkkkkkkkkkk
6222.kkkkkkkkk.kkkk.'kkkkkkkkkkkkkkkkkk'
6223;kkkkkkkk''kkkkkk;'kkkkkkkkkkkkk''
6224'kkkkkkk; 'kkkkkkkk.,""''"''""
6225  ''kkkk;  'kkkkkkkkkk.,
6226     ';'    'kkkkkkkkkkkk.,
6227             ';kkkkkkkkkk'
6228               ';kkkkkk'
6229                  "''"
6230EOF
6231        ;;
6232
6233        "ChaletOS"*)
6234            set_colors 4 7 1
6235            read -rd '' ascii_data <<'EOF'
6236${c1}             `.//+osso+/:``
6237         `/sdNNmhyssssydmNNdo:`
6238       :hNmy+-`          .-+hNNs-
6239     /mMh/`       `+:`       `+dMd:
6240   .hMd-        -sNNMNo.  /yyy  /mMs`
6241  -NM+       `/dMd/--omNh::dMM   `yMd`
6242 .NN+      .sNNs:/dMNy:/hNmo/s     yMd`
6243 hMs    `/hNd+-smMMMMMMd+:omNy-    `dMo
6244:NM.  .omMy:/hNMMMMMMMMMMNy:/hMd+`  :Md`
6245/Md` `sm+.omMMMMMMMMMMMMMMMMd/-sm+  .MN:
6246/Md`      MMMMMMMMMMMMMMMMMMMN      .MN:
6247:NN.      MMMMMMm....--NMMMMMN      -Mm.
6248`dMo      MMMMMMd      mMMMMMN      hMs
6249 -MN:     MMMMMMd      mMMMMMN     oMm`
6250  :NM:    MMMMMMd      mMMMMMN    +Mm-
6251   -mMy.  mmmmmmh      dmmmmmh  -hMh.
6252     oNNs-                    :yMm/
6253      .+mMdo:`            `:smMd/`
6254         -ohNNmhsoo++osshmNNh+.
6255            `./+syyhhyys+:``
6256EOF
6257        ;;
6258
6259        "Chapeau"*)
6260            set_colors 2 7
6261            read -rd '' ascii_data <<'EOF'
6262${c1}               .-/-.
6263            ////////.
6264          ////////${c2}y+${c1}//.
6265        ////////${c2}mMN${c1}/////.
6266      ////////${c2}mMN+${c1}////////.
6267    ////////////////////////.
6268  /////////+${c2}shhddhyo${c1}+////////.
6269 ////////${c2}ymMNmdhhdmNNdo${c1}///////.
6270///////+${c2}mMms${c1}////////${c2}hNMh${c1}///////.
6271///////${c2}NMm+${c1}//////////${c2}sMMh${c1}///////
6272//////${c2}oMMNmmmmmmmmmmmmMMm${c1}///////
6273//////${c2}+MMmssssssssssssss+${c1}///////
6274`//////${c2}yMMy${c1}////////////////////
6275 `//////${c2}smMNhso++oydNm${c1}////////
6276  `///////${c2}ohmNMMMNNdy+${c1}///////
6277    `//////////${c2}++${c1}//////////
6278       `////////////////.
6279           -////////-
6280EOF
6281        ;;
6282
6283        "Chrom"*)
6284            set_colors 2 1 3 4 7
6285            read -rd '' ascii_data <<'EOF'
6286${c2}            .,:loool:,.
6287        .,coooooooooooooc,.
6288     .,lllllllllllllllllllll,.
6289    ;ccccccccccccccccccccccccc;
6290${c1}  '${c2}ccccccccccccccccccccccccccccc.
6291${c1} ,oo${c2}c::::::::okO${c5}000${c3}0OOkkkkkkkkkkk:
6292${c1}.ooool${c2};;;;:x${c5}K0${c4}kxxxxxk${c5}0X${c3}K0000000000.
6293${c1}:oooool${c2};,;O${c5}K${c4}ddddddddddd${c5}KX${c3}000000000d
6294${c1}lllllool${c2};l${c5}N${c4}dllllllllllld${c5}N${c3}K000000000
6295${c1}lllllllll${c2}o${c5}M${c4}dccccccccccco${c5}W${c3}K000000000
6296${c1};cllllllllX${c5}X${c4}c:::::::::c${c5}0X${c3}000000000d
6297${c1}.ccccllllllO${c5}Nk${c4}c;,,,;cx${c5}KK${c3}0000000000.
6298${c1} .cccccclllllxOO${c5}OOO${c1}Okx${c3}O0000000000;
6299${c1}  .:ccccccccllllllllo${c3}O0000000OOO,
6300${c1}    ,:ccccccccclllcd${c3}0000OOOOOOl.
6301${c1}      '::ccccccccc${c3}dOOOOOOOkx:.
6302${c1}        ..,::cccc${c3}xOOOkkko;.
6303${c1}            ..,:${c3}dOkxl:.
6304EOF
6305        ;;
6306
6307        "cleanjaro_small"*)
6308            set_colors 7 7
6309            read -rd '' ascii_data <<'EOF'
6310${c1}█████ ██████████
6311█████ ██████████
6312█████
6313█████
6314█████
6315████████████████
6316████████████████
6317EOF
6318        ;;
6319
6320        "Cleanjaro"*)
6321            set_colors 7 7
6322            read -rd '' ascii_data <<'EOF'
6323${c1}███████▌ ████████████████
6324███████▌ ████████████████
6325███████▌ ████████████████
6326███████▌
6327███████▌
6328███████▌
6329███████▌
6330███████▌
6331█████████████████████████
6332█████████████████████████
6333█████████████████████████
6334▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
6335EOF
6336        ;;
6337
6338        "ClearOS"*)
6339            set_colors 2
6340            read -rd '' ascii_data <<'EOF'
6341${c1}             `.--::::::--.`
6342         .-:////////////////:-.
6343      `-////////////////////////-`
6344     -////////////////////////////-
6345   `//////////////-..-//////////////`
6346  ./////////////:      ://///////////.
6347 `//////:..-////:      :////-..-//////`
6348 ://////`    -///:.``.:///-`    ://///:
6349`///////:.     -////////-`    `:///////`
6350.//:--////:.     -////-`    `:////--://.
6351./:    .////:.     --`    `:////-    :/.
6352`//-`    .////:.        `:////-    `-//`
6353 :///-`    .////:.    `:////-    `-///:
6354 `/////-`    -///:    :///-    `-/////`
6355  `//////-   `///:    :///`   .//////`
6356   `:////:   `///:    :///`   -////:`
6357     .://:   `///:    :///`   -//:.
6358       .::   `///:    :///`   -:.
6359             `///:    :///`
6360              `...    ...`
6361EOF
6362        ;;
6363
6364        "Clear Linux OS"* | "Clear_Linux"*)
6365            set_colors 4 3 7 6
6366            read -rd '' ascii_data <<'EOF'
6367${c1}          BBB
6368       BBBBBBBBB
6369     BBBBBBBBBBBBBBB
6370   BBBBBBBBBBBBBBBBBBBB
6371   BBBBBBBBBBB         BBB
6372  BBBBBBBB${c2}YYYYY
6373${c1}  BBBBBBBB${c2}YYYYYY
6374${c1}  BBBBBBBB${c2}YYYYYYY
6375${c1}  BBBBBBBBB${c2}YYYYY${c3}W
6376${c4} GG${c1}BBBBBBBY${c2}YYYY${c3}WWW
6377${c4} GGG${c1}BBBBBBB${c2}YY${c3}WWWWWWWW
6378${c4} GGGGGG${c1}BBBBBB${c3}WWWWWWWW
6379${c4} GGGGGGGG${c1}BBBB${c3}WWWWWWWW
6380${c4}GGGGGGGGGGG${c1}BBB${c3}WWWWWWW
6381${c4}GGGGGGGGGGGGG${c1}B${c3}WWWWWW
6382${c4}GGGGGGGG${c3}WWWWWWWWWWW
6383${c4}GG${c3}WWWWWWWWWWWWWWWW
6384 WWWWWWWWWWWWWWWW
6385      WWWWWWWWWW
6386          WWW
6387EOF
6388        ;;
6389
6390        "Clover"*)
6391            set_colors 2 6
6392            read -rd '' ascii_data <<'EOF'
6393${c1}               `omo``omo`
6394             `oNMMMNNMMMNo`
6395           `oNMMMMMMMMMMMMNo`
6396          oNMMMMMMMMMMMMMMMMNo
6397          `sNMMMMMMMMMMMMMMNs`
6398     `omo`  `sNMMMMMMMMMMNs`  `omo`
6399   `oNMMMNo`  `sNMMMMMMNs`  `oNMMMNo`
6400 `oNMMMMMMMNo`  `oNMMNs`  `oNMMMMMMMNo`
6401oNMMMMMMMMMMMNo`  `sy`  `oNMMMMMMMMMMMNo
6402`sNMMMMMMMMMMMMNo.${c2}oNNs${c1}.oNMMMMMMMMMMMMNs`
6403`oNMMMMMMMMMMMMNs.${c2}oNNs${c1}.oNMMMMMMMMMMMMNo`
6404oNMMMMMMMMMMMNs`  `sy`  `oNMMMMMMMMMMMNo
6405 `oNMMMMMMMNs`  `oNMMNo`  `oNMMMMMMMNs`
6406   `oNMMMNs`  `sNMMMMMMNs`  `oNMMMNs`
6407     `oNs`  `sNMMMMMMMMMMNs`  `oNs`
6408          `sNMMMMMMMMMMMMMMNs`
6409          +NMMMMMMMMMMMMMMMMNo
6410           `oNMMMMMMMMMMMMNo`
6411             `oNMMMNNMMMNs`
6412               `omo``oNs`
6413EOF
6414        ;;
6415
6416        "Condres"*)
6417            set_colors 2 3 6
6418            read -rd '' ascii_data <<'EOF'
6419${c1}syyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy+${c3}.+.
6420${c1}`oyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy+${c3}:++.
6421${c2}/o${c1}+oyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy/${c3}oo++.
6422${c2}/y+${c1}syyyyyyyyyyyyyyyyyyyyyyyyyyyyy${c3}+ooo++.
6423${c2}/hy+${c1}oyyyhhhhhhhhhhhhhhyyyyyyyyy${c3}+oo+++++.
6424${c2}/hhh+${c1}shhhhhdddddhhhhhhhyyyyyyy${c3}+oo++++++.
6425${c2}/hhdd+${c1}oddddddddddddhhhhhyyyys${c3}+oo+++++++.
6426${c2}/hhddd+${c1}odmmmdddddddhhhhyyyy${c3}+ooo++++++++.
6427${c2}/hhdddmo${c1}odmmmdddddhhhhhyyy${c3}+oooo++++++++.
6428${c2}/hdddmmms${c1}/dmdddddhhhhyyys${c3}+oooo+++++++++.
6429${c2}/hddddmmmy${c1}/hdddhhhhyyyyo${c3}+oooo++++++++++:
6430${c2}/hhdddmmmmy${c1}:yhhhhyyyyy+${c3}+oooo+++++++++++:
6431${c2}/hhddddddddy${c1}-syyyyyys+${c3}ooooo++++++++++++:
6432${c2}/hhhddddddddy${c1}-+yyyy+${c3}/ooooo+++++++++++++:
6433${c2}/hhhhhdddddhhy${c1}./yo:${c3}+oooooo+++++++++++++/
6434${c2}/hhhhhhhhhhhhhy${c1}:-.${c3}+sooooo+++++++++++///:
6435${c2}:sssssssssssso++${c1}${c3}`:/:--------.````````
6436EOF
6437        ;;
6438
6439        "Container Linux by CoreOS"* | "Container_Linux"*)
6440            set_colors 4 7 1
6441            read -rd '' ascii_data <<'EOF'
6442${c1}                .....
6443          .';:cccccccc:;'.
6444        ':ccccclc${c3}lllllllll${c1}cc:.
6445     .;cccccccc${c3}lllllllllllllll${c1}c,
6446    ;clllccccc${c3}llllllllllllllllll${c1}c,
6447  .cllclccccc${c3}lllll${c2}lll${c3}llllllllllll${c1}c:
6448  ccclclcccc${c3}cllll${c2}kWMMNKk${c3}llllllllll${c1}c:
6449 :ccclclcccc${c3}llll${c2}oWMMMMMMWO${c3}lllllllll${c1}c,
6450.ccllllllccc${c3}clll${c2}OMMMMMMMMM0${c3}lllllllll${c1}c
6451.lllllclcccc${c3}llll${c2}KMMMMMMMMMMo${c3}llllllll${c1}c.
6452.lllllllcccc${c3}clll${c2}KMMMMMMMMN0${c3}lllllllll${c1}c.
6453.cclllllcccc${c3}lllld${c2}xkkxxdo${c3}llllllllllc${c1}lc
6454 :cccllllllcccc${c3}lllccllllcclccc${c1}cccccc;
6455 .ccclllllllcccccccc${c3}lll${c1}ccccclccccccc
6456  .cllllllllllclcccclccclccllllcllc
6457    :cllllllllccclcllllllllllllcc;
6458     .cccccccccccccclcccccccccc:.
6459       .;cccclccccccllllllccc,.
6460          .';ccccclllccc:;..
6461                .....
6462EOF
6463        ;;
6464
6465        "crux_small"|KISS*)
6466            set_colors 4 5 7 6
6467            read -rd '' ascii_data <<'EOF'
6468${c1}    ___
6469   (${c3}.· ${c1}|
6470   (${c2}<> ${c1}|
6471  / ${c3}__  ${c1}\\
6472 ( ${c3}/  \\ ${c1}/|
6473${c2}_${c1}/\\ ${c3}__)${c1}/${c2}_${c1})
6474${c2}\/${c1}-____${c2}\/
6475EOF
6476        ;;
6477
6478        "CRUX"*)
6479            set_colors 4 5 7 6
6480            read -rd '' ascii_data <<'EOF'
6481${c1}         odddd
6482      oddxkkkxxdoo
6483     ddcoddxxxdoool
6484     xdclodod  olol
6485     xoc  xdd  olol
6486     xdc  ${c2}k00${c1}Okdlol
6487     xxd${c2}kOKKKOkd${c1}ldd
6488     xdco${c2}xOkdlo${c1}dldd
6489     ddc:cl${c2}lll${c1}oooodo
6490   odxxdd${c3}xkO000kx${c1}ooxdo
6491  oxdd${c3}x0NMMMMMMWW0od${c1}kkxo
6492 oooxd${c3}0WMMMMMMMMMW0o${c1}dxkx
6493docldkXW${c3}MMMMMMMWWN${c1}Odolco
6494xx${c2}dx${c1}kxxOKN${c3}WMMWN${c1}0xdoxo::c
6495${c2}xOkkO${c1}0oo${c3}odOW${c2}WW${c1}XkdodOxc:l
6496${c2}dkkkxkkk${c3}OKX${c2}NNNX0Oxx${c1}xc:cd
6497${c2} odxxdx${c3}xllod${c2}ddooxx${c1}dc:ldo
6498${c2}   lodd${c1}dolccc${c2}ccox${c1}xoloo
6499EOF
6500        ;;
6501
6502        *"Cucumber"*)
6503            set_colors 2 3
6504            read -rd '' ascii_data <<'EOF'
6505${c1}           `.-://++++++//:-.`
6506        `:/+//${c2}::--------${c1}:://+/:`
6507      -++/:${c2}----..........----${c1}:/++-
6508    .++:${c2}---...........-......---${c1}:++.
6509   /+:${c2}---....-::/:/--//:::-....---${c1}:+/
6510 `++:${c2}--.....:---::/--/::---:.....--${c1}:++`
6511 /+:${c2}--.....--.--::::-/::--.--.....--${c1}:+/
6512-o:${c2}--.......-:::://--/:::::-.......--${c1}:o-
6513/+:${c2}--...-:-::---:::..:::---:--:-...--${c1}:+/
6514o/:${c2}-...-:.:.-/:::......::/:.--.:-...-${c1}:/o
6515o/${c2}--...::-:/::/:-......-::::::-/-...-${c1}:/o
6516/+:${c2}--..-/:/:::--:::..:::--::////-..--${c1}:+/
6517-o:${c2}--...----::/:::/--/:::::-----...--${c1}:o-
6518 /+:${c2}--....://:::.:/--/:.::://:....--${c1}:+/
6519 `++:${c2}--...-:::.--.:..:.--.:/:-...--${c1}:++`
6520   /+:${c2}---....----:-..-:----....---${c1}:+/
6521    .++:${c2}---..................---${c1}:++.
6522      -/+/:${c2}----..........----${c1}:/+/-
6523        `:/+//${c2}::--------:::${c1}/+/:`
6524           `.-://++++++//:-.`
6525EOF
6526        ;;
6527
6528                "dahlia"*)
6529                    set_colors 1 7 3
6530                    read -rd '' ascii_data <<'EOF'
6531${c1}
6532                  .#.
6533                *%@@@%*
6534        .,,,,,(&@@@@@@@&/,,,,,.
6535       ,#@@@@@@@@@@@@@@@@@@@@@#.
6536       ,#@@@@@@@&#///#&@@@@@@@#.
6537     ,/%&@@@@@%/,    .,(%@@@@@&#/.
6538   *#&@@@@@@#,.         .*#@@@@@@&#,
6539 .&@@@@@@@@@(            .(@@@@@@@@@&&.
6540#@@@@@@@@@@(               )@@@@@@@@@@@#
6541 °@@@@@@@@@@(            .(@@@@@@@@@@@°
6542   *%@@@@@@@(.           ,#@@@@@@@%*
6543     ,(&@@@@@@%*.     ./%@@@@@@%(,
6544       ,#@@@@@@@&(***(&@@@@@@@#.
6545       ,#@@@@@@@@@@@@@@@@@@@@@#.
6546        ,*****#&@@@@@@@&(*****,
6547               ,/%@@@%/.
6548                  ,#,
6549EOF
6550                ;;
6551
6552        "debian_small")
6553            set_colors 1 7 3
6554            read -rd '' ascii_data <<'EOF'
6555${c1}  _____
6556 /  __ \\
6557|  /    |
6558|  \\___-
6559-_
6560  --_
6561EOF
6562        ;;
6563
6564        "Debian"*)
6565            set_colors 1 7 3
6566            read -rd '' ascii_data <<'EOF'
6567${c2}       _,met$$$$$gg.
6568    ,g$$$$$$$$$$$$$$$P.
6569  ,g$$P"     """Y$$.".
6570 ,$$P'              `$$$.
6571',$$P       ,ggs.     `$$b:
6572`d$$'     ,$P"'   ${c1}.${c2}    $$$
6573 $$P      d$'     ${c1},${c2}    $$P
6574 $$:      $$.   ${c1}-${c2}    ,d$$'
6575 $$;      Y$b._   _,d$P'
6576 Y$$.    ${c1}`.${c2}`"Y$$$$P"'
6577${c2} `$$b      ${c1}"-.__
6578${c2}  `Y$$
6579   `Y$$.
6580     `$$b.
6581       `Y$$b.
6582          `"Y$b._
6583              `"""
6584EOF
6585        ;;
6586
6587        "Deepin"*)
6588            set_colors 2 7
6589            read -rd '' ascii_data <<'EOF'
6590${c1}             ............
6591         .';;;;;.       .,;,.
6592      .,;;;;;;;.       ';;;;;;;.
6593    .;::::::::'     .,::;;,''''',.
6594   ,'.::::::::    .;;'.          ';
6595  ;'  'cccccc,   ,' :: '..        .:
6596 ,,    :ccccc.  ;: .c, '' :.       ,;
6597.l.     cllll' ., .lc  :; .l'       l.
6598.c       :lllc  ;cl:  .l' .ll.      :'
6599.l        'looc. .   ,o:  'oo'      c,
6600.o.         .:ool::coc'  .ooo'      o.
6601 ::            .....   .;dddo      ;c
6602  l:...            .';lddddo.     ,o
6603   lxxxxxdoolllodxxxxxxxxxc      :l
6604    ,dxxxxxxxxxxxxxxxxxxl.     'o,
6605      ,dkkkkkkkkkkkkko;.    .;o;
6606        .;okkkkkdl;.    .,cl:.
6607            .,:cccccccc:,.
6608EOF
6609        ;;
6610
6611        "DesaOS")
6612            set_colors 2 7
6613            read -rd '' ascii_data <<'EOF'
6614${c1}███████████████████████
6615███████████████████████
6616███████████████████████
6617███████████████████████
6618████████               ███████
6619████████               ███████
6620████████               ███████
6621████████               ███████
6622████████               ███████
6623████████               ███████
6624████████               ███████
6625██████████████████████████████
6626██████████████████████████████
6627████████████████████████
6628████████████████████████
6629████████████████████████
6630EOF
6631        ;;
6632
6633        "Devuan"*)
6634            set_colors 5 7
6635            read -rd '' ascii_data <<'EOF'
6636${c1}   ..,,;;;::;,..
6637           `':ddd;:,.
6638                 `'dPPd:,.
6639                     `:b$$b`.
6640                        'P$$$d`
6641                         .$$$$$`
6642                         ;$$$$$P
6643                      .:P$$$$$$`
6644                  .,:b$$$$$$$;'
6645             .,:dP$$$$$$$$b:'
6646      .,:;db$$$$$$$$$$Pd'`
6647 ,db$$$$$$$$$$$$$$b:'`
6648:$$$$$$$$$$$$b:'`
6649 `$$$$$bd:''`
6650   `'''`
6651EOF
6652        ;;
6653
6654        "DracOS"*)
6655            set_colors 1 7 3
6656            read -rd '' ascii_data <<'EOF'
6657${c1}       `-:/-
6658          -os:
6659            -os/`
6660              :sy+-`
6661               `/yyyy+.
6662                 `+yyyyo-
6663                   `/yyyys:
6664`:osssoooo++-        +yyyyyy/`
6665   ./yyyyyyo         yo`:syyyy+.
6666      -oyyy+         +-   :yyyyyo-
6667        `:sy:        `.    `/yyyyys:
6668           ./o/.`           .oyyso+oo:`
6669              :+oo+//::::///:-.`     `.`
6670EOF
6671        ;;
6672
6673        "DarkOs")
6674            set_colors 1 6 5 3 2
6675            read -rd '' ascii_data <<'EOF'
6676
6677${c3}⠀⠀⠀⠀  ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⠢⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
6678${c1}⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣶⠋⡆⢹⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
6679${c5}⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡆⢀⣤⢛⠛⣠⣿⠀⡏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
6680${c6}⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣶⣿⠟⣡⠊⣠⣾⣿⠃⣠⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
6681${c2}⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣴⣯⣿⠀⠊⣤⣿⣿⣿⠃⣴⣧⣄⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
6682${c1}⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣤⣶⣿⣿⡟⣠⣶⣿⣿⣿⢋⣤⠿⠛⠉⢁⣭⣽⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
6683${c4}  ⠀⠀⠀⠀⠀⠀ ⠀⣠⠖⡭⢉⣿⣯⣿⣯⣿⣿⣿⣟⣧⠛⢉⣤⣶⣾⣿⣿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
6684${c5}⠀⠀⠀⠀⠀⠀⠀⠀⣴⣫⠓⢱⣯⣿⢿⠋⠛⢛⠟⠯⠶⢟⣿⣯⣿⣿⣿⣿⣿⣿⣦⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
6685${c2}⠀⠀⠀⠀⠀⠀⢀⡮⢁⣴⣿⣿⣿⠖⣠⠐⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠉⠉⠛⠛⠛⢿⣶⣄⠀⠀⠀⠀⠀⠀⠀
6686${c3}⠀⠀⠀⠀⢀⣤⣷⣿⣿⠿⢛⣭⠒⠉⠀⠀⠀⣀⣀⣄⣤⣤⣴⣶⣶⣶⣿⣿⣿⣿⣿⠿⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀
6687${c1}⠀⢀⣶⠏⠟⠝⠉⢀⣤⣿⣿⣶⣾⣿⣿⣿⣿⣿⣿⣟⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
6688${c6}⢴⣯⣤⣶⣿⣿⣿⣿⣿⡿⣿⣯⠉⠉⠉⠉⠀⠀⠀⠈⣿⡀⣟⣿⣿⢿⣿⣿⣿⣿⣿⣦⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
6689${c5}⠀⠀⠀⠉⠛⣿⣧⠀⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⠃⣿⣿⣯⣿⣦⡀⠀⠉⠻⣿⣦⠀⠀⠀⠀⠀⠀⠀⠀⠀
6690${c3}⠀⠀⠀⠀⠀⠀⠉⢿⣮⣦⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⣿⠀⣯⠉⠉⠛⢿⣿⣷⣄⠀⠈⢻⣆⠀⠀⠀⠀⠀⠀⠀⠀
6691${c2}⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠢⠀⠀⠀⠀⠀⠀⠀⢀⢡⠃⣾⣿⣿⣦⠀⠀⠀⠙⢿⣿⣤⠀⠙⣄⠀⠀⠀⠀⠀⠀⠀
6692${c6}⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⢋⡟⢠⣿⣿⣿⠋⢿⣄⠀⠀⠀⠈⡄⠙⣶⣈⡄⠀⠀⠀⠀⠀⠀
6693${c1}⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠐⠚⢲⣿⠀⣾⣿⣿⠁⠀⠀⠉⢷⡀⠀⠀⣇⠀⠀⠈⠻⡀⠀⠀⠀⠀⠀
6694${c4}⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢢⣀⣿⡏⠀⣿⡿⠀⠀⠀⠀⠀⠀⠙⣦⠀⢧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
6695${c3}⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⠿⣧⣾⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⣮⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
6696${c5}⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠙⠛⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
6697
6698EOF
6699        ;;
6700
6701        "Itc"*)
6702            set_colors 1
6703            read -rd '' ascii_data <<'EOF'
6704${c1}....................-==============+...
6705${c1}....................-==============:...
6706${c1}...:===========-....-==============:...
6707${c1}...-===========:....-==============-...
6708${c1}....*==========+........-::********-...
6709${c1}....*===========+.:*====**==*+-.-......
6710${c1}....:============*+-..--:+**====*---...
6711${c1}......::--........................::...
6712${c1}..+-:+-.+::*:+::+:-++::++-.:-.*.:++:++.
6713${c1}..:-:-++++:-::--:+::-::.:++-++:++--:-:.    ⠀⠀⠀⠀⠀
6714⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
6715EOF
6716        ;;
6717
6718        "dragonfly_old"*)
6719            set_colors 1 7 3
6720            read -rd '' ascii_data <<'EOF'
6721     ${c1}                   .-.
6722                 ${c3} ()${c1}I${c3}()
6723            ${c1} "==.__:-:__.=="
6724            "==.__/~|~\__.=="
6725            "==._(  Y  )_.=="
6726 ${c2}.-'~~""~=--...,__${c1}\/|\/${c2}__,...--=~""~~'-.
6727(               ..=${c1}\\=${c1}/${c2}=..               )
6728 `'-.        ,.-"`;${c1}/=\\${c2};"-.,_        .-'`
6729     `~"-=-~` .-~` ${c1}|=|${c2} `~-. `~-=-"~`
6730          .-~`    /${c1}|=|${c2}\    `~-.
6731       .~`       / ${c1}|=|${c2} \       `~.
6732   .-~`        .'  ${c1}|=|${c2}  `.        `~-.
6733 (`     _,.-="`  ${c1}  |=|${c2}    `"=-.,_     `)
6734  `~"~"`        ${c1}   |=|${c2}           `"~"~`
6735                 ${c1}  /=\\
6736                   \\=/
6737                    ^
6738EOF
6739        ;;
6740
6741        "dragonfly_small"*)
6742            set_colors 1 7 3
6743            read -rd '' ascii_data <<'EOF'
6744${c2}   ,${c1}_${c2},
6745('-_${c1}|${c2}_-')
6746 >--${c1}|${c2}--<
6747(_-'${c1}|${c2}'-_)
6748    ${c1}|
6749    |
6750    |
6751EOF
6752        ;;
6753
6754        "DragonFly"*)
6755            set_colors 1 7 3
6756            read -rd '' ascii_data <<'EOF'
6757${c2},--,           ${c1}|           ${c2},--,
6758${c2}|   `-,       ${c1},^,       ${c2},-'   |
6759${c2} `,    `-,   ${c3}(/ \)   ${c2},-'    ,'
6760${c2}   `-,    `-,${c1}/   \${c2},-'    ,-'
6761${c2}      `------${c1}(   )${c2}------'
6762${c2}  ,----------${c1}(   )${c2}----------,
6763${c2} |        _,-${c1}(   )${c2}-,_        |
6764${c2}  `-,__,-'   ${c1}\   /${c2}   `-,__,-'
6765${c1}              | |
6766              | |
6767              | |
6768              | |
6769              | |
6770              | |
6771              `|'
6772EOF
6773        ;;
6774
6775        "Drauger"*)
6776            set_colors 1 7
6777            read -rd '' ascii_data <<'EOF'
6778${c1}                  -``-
6779                `:+``+:`
6780               `/++``++/.
6781              .++/.  ./++.
6782             :++/`    `/++:
6783           `/++:        :++/`
6784          ./+/-          -/+/.
6785         -++/.            ./++-
6786        :++:`              `:++:
6787      `/++-                  -++/`
6788     ./++.                    ./+/.
6789    -++/`                      `/++-
6790   :++:`                        `:++:
6791 `/++-                            -++/`
6792.:-.`..............................`.-:.
6793`.-/++++++++++++++++++++++++++++++++/-.`
6794EOF
6795        ;;
6796
6797        "elementary_small"*)
6798            set_colors 4 7 1
6799            read -rd '' ascii_data <<'EOF'
6800${c2}  _______
6801 / ____  \\
6802/  |  /  /\\
6803|__\\ /  / |
6804\\   /__/  /
6805 \\_______/
6806EOF
6807        ;;
6808
6809        "Elementary"*)
6810            set_colors 4 7 1
6811            read -rd '' ascii_data <<'EOF'
6812${c2}         eeeeeeeeeeeeeeeee
6813      eeeeeeeeeeeeeeeeeeeeeee
6814    eeeee  eeeeeeeeeeee   eeeee
6815  eeee   eeeee       eee     eeee
6816 eeee   eeee          eee     eeee
6817eee    eee            eee       eee
6818eee   eee            eee        eee
6819ee    eee           eeee       eeee
6820ee    eee         eeeee      eeeeee
6821ee    eee       eeeee      eeeee ee
6822eee   eeee   eeeeee      eeeee  eee
6823eee    eeeeeeeeee     eeeeee    eee
6824 eeeeeeeeeeeeeeeeeeeeeeee    eeeee
6825  eeeeeeee eeeeeeeeeeee      eeee
6826    eeeee                 eeeee
6827      eeeeeee         eeeeeee
6828         eeeeeeeeeeeeeeeee
6829EOF
6830        ;;
6831
6832        "EndeavourOS"*)
6833            set_colors 1 5 4
6834            read -rd '' ascii_data <<'EOF'
6835${c1}                     ./${c2}o${c3}.
6836${c1}                   ./${c2}sssso${c3}-
6837${c1}                 `:${c2}osssssss+${c3}-
6838${c1}               `:+${c2}sssssssssso${c3}/.
6839${c1}             `-/o${c2}ssssssssssssso${c3}/.
6840${c1}           `-/+${c2}sssssssssssssssso${c3}+:`
6841${c1}         `-:/+${c2}sssssssssssssssssso${c3}+/.
6842${c1}       `.://o${c2}sssssssssssssssssssso${c3}++-
6843${c1}      .://+${c2}ssssssssssssssssssssssso${c3}++:
6844${c1}    .:///o${c2}ssssssssssssssssssssssssso${c3}++:
6845${c1}  `:////${c2}ssssssssssssssssssssssssssso${c3}+++.
6846${c1}`-////+${c2}ssssssssssssssssssssssssssso${c3}++++-
6847${c1} `..-+${c2}oosssssssssssssssssssssssso${c3}+++++/`
6848   ./++++++++++++++++++++++++++++++/:.
6849  `:::::::::::::::::::::::::------``
6850EOF
6851        ;;
6852
6853        "Endless"*)
6854            set_colors 1 7
6855            read -rd '' ascii_data <<'EOF'
6856${c1}           `:+yhmNMMMMNmhy+:`
6857        -odMMNhso//////oshNMMdo-
6858      /dMMh+.              .+hMMd/
6859    /mMNo`                    `oNMm:
6860  `yMMo`                        `oMMy`
6861 `dMN-                            -NMd`
6862 hMN.                              .NMh
6863/MM/                  -os`          /MM/
6864dMm    `smNmmhs/- `:sNMd+   ``       mMd
6865MMy    oMd--:+yMMMMMNo.:ohmMMMNy`    yMM
6866MMy    -NNyyhmMNh+oNMMMMMy:.  dMo    yMM
6867dMm     `/++/-``/yNNh+/sdNMNddMm-    mMd
6868/MM/          `dNy:       `-::-     /MM/
6869 hMN.                              .NMh
6870 `dMN-                            -NMd`
6871  `yMMo`                        `oMMy`
6872    /mMNo`                    `oNMm/
6873      /dMMh+.              .+hMMd/
6874        -odMMNhso//////oshNMMdo-
6875           `:+yhmNMMMMNmhy+:`
6876EOF
6877        ;;
6878
6879        "EuroLinux"*)
6880            set_colors 4 7
6881            read -rd '' ascii_data <<'EOF'
6882${c1}                __
6883         -wwwWWWWWWWWWwww-
6884        -WWWWWWWWWWWWWWWWWWw-
6885          \WWWWWWWWWWWWWWWWWWW-
6886  _Ww      `WWWWWWWWWWWWWWWWWWWw
6887 -W${c2}E${c1}Www                -WWWWWWWWW-
6888_WW${c2}U${c1}WWWW-                _WWWWWWWW
6889_WW${c2}R${c1}WWWWWWWWWWWWWWWWWWWWWWWWWWWWWW-
6890wWW${c2}O${c1}WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
6891WWW${c2}L${c1}WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWw
6892WWW${c2}I${c1}WWWWWWWWWWWWWWWWWWWWWWWWWWWWww-
6893wWW${c2}N${c1}WWWWw
6894 WW${c2}U${c1}WWWWWWw
6895 wW${c2}X${c1}WWWWWWWWww
6896   wWWWWWWWWWWWWWWWw
6897    wWWWWWWWWWWWWWWWw
6898       WWWWWWWWWWWWWw
6899           wWWWWWWWw
6900EOF
6901        ;;
6902
6903        "Exherbo"*)
6904            set_colors 4 7 1
6905            read -rd '' ascii_data <<'EOF'
6906${c2} ,
6907OXo.
6908NXdX0:    .cok0KXNNXXK0ko:.
6909KX  '0XdKMMK;.xMMMk, .0MMMMMXx;  ...
6910'NO..xWkMMx   kMMM    cMMMMMX,NMWOxOXd.
6911  cNMk  NK    .oXM.   OMMMMO. 0MMNo  kW.
6912  lMc   o:       .,   .oKNk;   ;NMMWlxW'
6913 ;Mc    ..   .,,'    .0M${c1}g;${c2}WMN'dWMMMMMMO
6914 XX        ,WMMMMW.  cM${c1}cfli${c2}WMKlo.   .kMk
6915.Mo        .WM${c1}GD${c2}MW.   XM${c1}WO0${c2}MMk        oMl
6916,M:         ,XMMWx::,''oOK0x;          NM.
6917'Ml      ,kNKOxxxxxkkO0XXKOd:.         oMk
6918 NK    .0Nxc${c3}:::::::::::::::${c2}fkKNk,      .MW
6919 ,Mo  .NXc${c3}::${c2}qXWXb${c3}::::::::::${c2}oo${c3}::${c2}lNK.    .MW
6920  ;Wo oMd${c3}:::${c2}oNMNP${c3}::::::::${c2}oWMMMx${c3}:${c2}c0M;   lMO
6921   'NO;W0c${c3}:::::::::::::::${c2}dMMMMO${c3}::${c2}lMk  .WM'
6922     xWONXdc${c3}::::::::::::::${c2}oOOo${c3}::${c2}lXN. ,WMd
6923      'KWWNXXK0Okxxo,${c3}:::::::${c2},lkKNo  xMMO
6924        :XMNxl,';:lodxkOO000Oxc. .oWMMo
6925          'dXMMXkl;,.        .,o0MMNo'
6926             ':d0XWMMMMWNNNNMMMNOl'
6927                   ':okKXWNKkl'
6928EOF
6929        ;;
6930
6931        "fedora_small")
6932            set_colors 4 7 1
6933            read -rd '' ascii_data <<'EOF'
6934${c2}      _____
6935     /   __)${c1}\\${c2}
6936     |  /  ${c1}\\ \\${c2}
6937  ${c1}__${c2}_|  |_${c1}_/ /${c2}
6938 ${c1}/ ${c2}(_    _)${c1}_/${c2}
6939${c1}/ /${c2}  |  |
6940${c1}\\ \\${c2}__/  |
6941 ${c1}\\${c2}(_____/
6942EOF
6943        ;;
6944
6945        "Fedora"* | "RFRemix"*)
6946            set_colors 4 7 1
6947            read -rd '' ascii_data <<'EOF'
6948${c1}          /:-------------:\\
6949       :-------------------::
6950     :-----------${c2}/shhOHbmp${c1}---:\\
6951   /-----------${c2}omMMMNNNMMD  ${c1}---:
6952  :-----------${c2}sMMMMNMNMP${c1}.    ---:
6953 :-----------${c2}:MMMdP${c1}-------    ---\\
6954,------------${c2}:MMMd${c1}--------    ---:
6955:------------${c2}:MMMd${c1}-------    .---:
6956:----    ${c2}oNMMMMMMMMMNho${c1}     .----:
6957:--     .${c2}+shhhMMMmhhy++${c1}   .------/
6958:-    -------${c2}:MMMd${c1}--------------:
6959:-   --------${c2}/MMMd${c1}-------------;
6960:-    ------${c2}/hMMMy${c1}------------:
6961:--${c2} :dMNdhhdNMMNo${c1}------------;
6962:---${c2}:sdNMMMMNds:${c1}------------:
6963:------${c2}:://:${c1}-------------::
6964:---------------------://
6965EOF
6966        ;;
6967
6968        "Feren"*)
6969            set_colors 4 7 1
6970            read -rd '' ascii_data <<'EOF'
6971${c1} `----------`
6972 :+ooooooooo+.
6973-o+oooooooooo+-
6974..`/+++++++++++/...`````````````````
6975   .++++++++++++++++++++++++++/////-
6976    ++++++++++++++++++++++++++++++++//:`
6977    -++++++++++++++++++++++++++++++/-`
6978     ++++++++++++++++++++++++++++:.
6979     -++++++++++++++++++++++++/.
6980      +++++++++++++++++++++/-`
6981      -++++++++++++++++++//-`
6982        .:+++++++++++++//////-
6983           .:++++++++//////////-
6984             `-++++++---:::://///.
6985           `.:///+++.             `
6986          `.........
6987EOF
6988        ;;
6989
6990        "freebsd_small")
6991            set_colors 1 7 3
6992            read -rd '' ascii_data <<'EOF'
6993${c1}/\\,-'''''-,/\\
6994\\_)       (_/
6995|           |
6996|           |
6997 ;         ;
6998  '-_____-'
6999EOF
7000        ;;
7001
7002        FreeBSD*|HardenedBSD*)
7003            case $ascii_distro in
7004                *HardenedBSD*) set_colors 4 7 3 ;;
7005                *)             set_colors 1 7 3
7006            esac
7007
7008            read -rd '' ascii_data <<'EOF'
7009   ${c2}```                        ${c1}`
7010  ${c2}` `.....---...${c1}....--.```   -/
7011  ${c2}+o   .--`         ${c1}/y:`      +.
7012  ${c2} yo`:.            ${c1}:o      `+-
7013    ${c2}y/               ${c1}-/`   -o/
7014   ${c2}.-                  ${c1}::/sy+:.
7015   ${c2}/                     ${c1}`--  /
7016  ${c2}`:                          ${c1}:`
7017  ${c2}`:                          ${c1}:`
7018   ${c2}/                          ${c1}/
7019   ${c2}.-                        ${c1}-.
7020    ${c2}--                      ${c1}-.
7021     ${c2}`:`                  ${c1}`:`
7022       .--             `--.
7023          .---.....----.
7024EOF
7025        ;;
7026
7027        "FreeMiNT"*)
7028            set_colors 7
7029            read -rd '' ascii_data <<'EOF'
7030${c1}          ##
7031          ##         #########
7032                    ####      ##
7033            ####  ####        ##
7034####        ####  ##        ##
7035        ####    ####      ##  ##
7036        ####  ####  ##  ##  ##
7037            ####  ######
7038        ######  ##  ##  ####
7039      ####    ################
7040    ####        ##  ####
7041    ##            ####  ######
7042    ##      ##    ####  ####
7043    ##    ##  ##    ##  ##  ####
7044      ####  ##          ##  ##
7045EOF
7046        ;;
7047
7048        "Frugalware"*)
7049            set_colors 4 7 1
7050            read -rd '' ascii_data <<'EOF'
7051${c1}          `++/::-.`
7052         /o+++++++++/::-.`
7053        `o+++++++++++++++o++/::-.`
7054        /+++++++++++++++++++++++oo++/:-.``
7055       .o+ooooooooooooooooooosssssssso++oo++/:-`
7056       ++osoooooooooooosssssssssssssyyo+++++++o:
7057      -o+ssoooooooooooosssssssssssssyyo+++++++s`
7058      o++ssoooooo++++++++++++++sssyyyyo++++++o:
7059     :o++ssoooooo${c2}/-------------${c1}+syyyyyo+++++oo
7060    `o+++ssoooooo${c2}/-----${c1}+++++ooosyyyyyyo++++os:
7061    /o+++ssoooooo${c2}/-----${c1}ooooooosyyyyyyyo+oooss
7062   .o++++ssooooos${c2}/------------${c1}syyyyyyhsosssy-
7063   ++++++ssooooss${c2}/-----${c1}+++++ooyyhhhhhdssssso
7064  -s+++++syssssss${c2}/-----${c1}yyhhhhhhhhhhhddssssy.
7065  sooooooyhyyyyyh${c2}/-----${c1}hhhhhhhhhhhddddyssy+
7066 :yooooooyhyyyhhhyyyyyyhhhhhhhhhhdddddyssy`
7067 yoooooooyhyyhhhhhhhhhhhhhhhhhhhddddddysy/
7068-ysooooooydhhhhhhhhhhhddddddddddddddddssy
7069 .-:/+osssyyyysyyyyyyyyyyyyyyyyyyyyyyssy:
7070       ``.-/+oosysssssssssssssssssssssss
7071               ``.:/+osyysssssssssssssh.
7072                        `-:/+osyyssssyo
7073                                .-:+++`
7074EOF
7075        ;;
7076
7077        "Funtoo"*)
7078            set_colors 5 7
7079            read -rd '' ascii_data <<'EOF'
7080${c1}   .dKXXd                         .
7081  :XXl;:.                      .OXo
7082.'OXO''  .''''''''''''''''''''':XNd..'oco.lco,
7083xXXXXXX, cXXXNNNXXXXNNXXXXXXXXNNNNKOOK; d0O .k
7084  kXX  xXo  KNNN0  KNN.       'xXNo   :c; 'cc.
7085  kXX  xNo  KNNN0  KNN. :xxxx. 'NNo
7086  kXX  xNo  loooc  KNN. oNNNN. 'NNo
7087  kXX  xN0:.       KNN' oNNNX' ,XNk
7088  kXX  xNNXNNNNNNNNXNNNNNNNNXNNOxXNX0Xl
7089  ...  ......................... .;cc;.
7090EOF
7091        ;;
7092
7093        "GalliumOS"*)
7094            set_colors 4 7 1
7095            read -rd '' ascii_data <<'EOF'
7096${c1}sooooooooooooooooooooooooooooooooooooo+:
7097yyooooooooooooooooooooooooooooooooo+/:::
7098yyysoooooooooooooooooooooooooooo+/::::::
7099yyyyyoooooooooooooooooooooooo+/:::::::::
7100yyyyyysoooooooooooooooooo++/::::::::::::
7101yyyyyyysoooooooooooooo++/:::::::::::::::
7102yyyyyyyyysoooooo${c2}sydddys${c1}+/:::::::::::::::
7103yyyyyyyyyysooo${c2}smMMMMMMMNd${c1}+::::::::::::::
7104yyyyyyyyyyyyo${c2}sMMMMMMMMMMMN${c1}/:::::::::::::
7105yyyyyyyyyyyyy${c2}dMMMMMMMMMMMM${c1}o//:::::::::::
7106yyyyyyyyyyyyy${c2}hMMMMMMMMMMMm${c1}--//::::::::::
7107yyyyyyyyyyyyyy${c2}hmMMMMMMMNy${c1}:..-://::::::::
7108yyyyyyyyyyyyyyy${c2}yyhhyys+:${c1}......://:::::::
7109yyyyyyyyyyyyyyys+:--...........-///:::::
7110yyyyyyyyyyyys+:--................://::::
7111yyyyyyyyyo+:-.....................-//:::
7112yyyyyyo+:-..........................://:
7113yyyo+:-..............................-//
7114o/:-...................................:
7115EOF
7116        ;;
7117
7118        "Garuda"*)
7119            set_colors 7 7
7120            read -rd '' ascii_data <<'EOF'
7121${c1}                  __,,,,,,,_
7122            _╓╗╣╫╠╠╠╠╠╠╠╠╠╠╠╠╠╕╗╗┐_
7123         ╥╢╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╥,
7124       ╗╠╠╠╠╠╠╠╝╜╜╜╜╝╢╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠┐
7125      ╣╠╠╠╠╠╠╠╠╢╣╢╗╕ , `"╘╠╠╠╠╠╠╠╠╠╠╠╠╠╠╔╥_
7126    ╒╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╕╙╥╥╜   `"╜╠╬╠╠╠╠╠╠╠╠╠╠╠╥,
7127    ╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╗╥╥╥╥╗╗╬╠╠╠╠╠╠╠╝╙╠╠╣╠╠╠╠╢┐
7128   ╣╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╥╬╣╠╠╠╠╠╠╠╠╗
7129  ╒╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╗
7130  ╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠
7131  ╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╬     ```"╜╝╢╠╠╡
7132 ╒╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╣,         ╘╠╪
7133 ╞╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╢┐        ╜
7134 `╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╗
7135 ,╬╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠"╕
7136 ╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╗
7137 ╝^╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╝╣╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╡
7138  ╔╜`╞┘╢╛╜ ╡╢╠"╚╠╠╜╝┌╞╞"╢╠╠╠╠╠╠╠╠╠╠╣╩╢╪
7139     ╜╒"   `╜    `      ╜╙╕  └╣╠╠╠╠╕ ╞╙╖
7140                                ╠╠╠
71417142EOF
7143        ;;
7144
7145        "gentoo_small")
7146            set_colors 5 7
7147            read -rd '' ascii_data <<'EOF'
7148${c1} _-----_
7149(       \\
7150\    0   \\
7151${c2} \        )
7152 /      _/
7153(     _-
7154\____-
7155EOF
7156        ;;
7157
7158        "Gentoo"*)
7159            set_colors 5 7
7160            read -rd '' ascii_data <<'EOF'
7161${c1}         -/oyddmdhs+:.
7162     -o${c2}dNMMMMMMMMNNmhy+${c1}-`
7163   -y${c2}NMMMMMMMMMMMNNNmmdhy${c1}+-
7164 `o${c2}mMMMMMMMMMMMMNmdmmmmddhhy${c1}/`
7165 om${c2}MMMMMMMMMMMN${c1}hhyyyo${c2}hmdddhhhd${c1}o`
7166.y${c2}dMMMMMMMMMMd${c1}hs++so/s${c2}mdddhhhhdm${c1}+`
7167 oy${c2}hdmNMMMMMMMN${c1}dyooy${c2}dmddddhhhhyhN${c1}d.
7168  :o${c2}yhhdNNMMMMMMMNNNmmdddhhhhhyym${c1}Mh
7169    .:${c2}+sydNMMMMMNNNmmmdddhhhhhhmM${c1}my
7170       /m${c2}MMMMMMNNNmmmdddhhhhhmMNh${c1}s:
7171    `o${c2}NMMMMMMMNNNmmmddddhhdmMNhs${c1}+`
7172  `s${c2}NMMMMMMMMNNNmmmdddddmNMmhs${c1}/.
7173 /N${c2}MMMMMMMMNNNNmmmdddmNMNdso${c1}:`
7174+M${c2}MMMMMMNNNNNmmmmdmNMNdso${c1}/-
7175yM${c2}MNNNNNNNmmmmmNNMmhs+/${c1}-`
7176/h${c2}MMNNNNNNNNMNdhs++/${c1}-`
7177`/${c2}ohdmmddhys+++/:${c1}.`
7178  `-//////:--.
7179EOF
7180        ;;
7181
7182        "Pentoo"*)
7183            set_colors 5 7
7184            read -rd '' ascii_data <<'EOF'
7185${c2}           `:oydNNMMMMNNdyo:`
7186        :yNMMMMMMMMMMMMMMMMNy:
7187      :dMMMMMMMMMMMMMMMMMMMMMMd:
7188     oMMMMMMMho/-....-/ohMMMMMMMo
7189    oMMMMMMy.            .yMMMMMMo
7190   .MMMMMMo                oMMMMMM.
7191   +MMMMMm                  mMMMMM+
7192   oMMMMMh                  hMMMMMo
7193 //hMMMMMm//${c1}`${c2}          ${c1}`${c2}////mMMMMMh//
7194MMMMMMMMMMM${c1}/${c2}      ${c1}/o/`${c2}  ${c1}.${c2}smMMMMMMMMMMM
7195MMMMMMMMMMm      ${c1}`NMN:${c2}    ${c1}.${c2}yMMMMMMMMMM
7196MMMMMMMMMMMh${c1}:.${c2}              dMMMMMMMMM
7197MMMMMMMMMMMMMy${c1}.${c2}            ${c1}-${c2}NMMMMMMMMM
7198MMMMMMMMMMMd:${c1}`${c2}           ${c1}-${c2}yNMMMMMMMMMM
7199MMMMMMMMMMh${c1}`${c2}          ${c1}./${c2}hNMMMMMMMMMMMM
7200MMMMMMMMMM${c1}s${c2}        ${c1}.:${c2}ymMMMMMMMMMMMMMMM
7201MMMMMMMMMMN${c1}s:..-/${c2}ohNMMMMMMMMMMMMMMMMMM
7202MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
7203MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
7204 MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
7205
7206EOF
7207        ;;
7208
7209        "gNewSense"*)
7210            set_colors 4 5 7 6
7211            read -rd '' ascii_data <<'EOF'
7212${c1}                     ..,,,,..
7213               .oocchhhhhhhhhhccoo.
7214        .ochhlllllllc hhhhhh ollllllhhco.
7215    ochlllllllllll hhhllllllhhh lllllllllllhco
7216 .cllllllllllllll hlllllo  +hllh llllllllllllllc.
7217ollllllllllhco''  hlllllo  +hllh  ``ochllllllllllo
7218hllllllllc'       hllllllllllllh       `cllllllllh
7219ollllllh          +llllllllllll+          hllllllo
7220 `cllllh.           ohllllllho           .hllllc'
7221    ochllc.            ++++            .cllhco
7222       `+occooo+.                .+ooocco+'
7223              `+oo++++      ++++oo+'
7224EOF
7225        ;;
7226
7227        "GNOME"*)
7228            set_colors 4
7229            read -rd '' ascii_data <<'EOF'
7230${c1}                               ,@@@@@@@@,
7231                 @@@@@@      @@@@@@@@@@@@
7232        ,@@.    @@@@@@@    *@@@@@@@@@@@@
7233       @@@@@%   @@@@@@(    @@@@@@@@@@@&
7234       @@@@@@    @@@@*     @@@@@@@@@#
7235@@@@*   @@@@,              *@@@@@%
7236@@@@@.
7237 @@@@#         @@@@@@@@@@@@@@@@
7238         ,@@@@@@@@@@@@@@@@@@@@@@@,
7239      ,@@@@@@@@@@@@@@@@@@@@@@@@@@&
7240    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@
7241    @@@@@@@@@@@@@@@@@@@@@@@@@@@
7242   @@@@@@@@@@@@@@@@@@@@@@@@(
7243   @@@@@@@@@@@@@@@@@@@@%
7244    @@@@@@@@@@@@@@@@
7245     @@@@@@@@@@@@*        @@@@@@@@/
7246      &@@@@@@@@@@        @@@@@@@@@*
7247        @@@@@@@@@@@,    @@@@@@@@@*
7248          ,@@@@@@@@@@@@@@@@@@@@&
7249              &@@@@@@@@@@@@@@
7250                     ...
7251EOF
7252        ;;
7253
7254        "GNU")
7255            set_colors fg 7
7256            read -rd '' ascii_data <<'EOF'
7257${c1}    _-`````-,           ,- '- .
7258  .'   .- - |          | - -.  `.
7259 /.'  /                     `.   \
7260:/   :      _...   ..._      ``   :
7261::   :     /._ .`:'_.._\.    ||   :
7262::    `._ ./  ,`  :    \ . _.''   .
7263`:.      /   |  -.  \-. \\_      /
7264  \:._ _/  .'   .@)  \@) ` `\ ,.'
7265     _/,--'       .- .\,-.`--`.
7266       ,'/''     (( \ `  )
7267        /'/'  \    `-'  (
7268         '/''  `._,-----'
7269          ''/'    .,---'
7270           ''/'      ;:
7271             ''/''  ''/
7272               ''/''/''
7273                 '/'/'
7274                  `;
7275EOF
7276        ;;
7277
7278        "GoboLinux"*)
7279            set_colors 5 4 6 2
7280            read -rd '' ascii_data <<'EOF'
7281${c1}  _____       _
7282 / ____|     | |
7283| |  __  ___ | |__   ___
7284| | |_ |/ _ \| '_ \ / _ \
7285| |__| | (_) | |_) | (_) |
7286 \_____|\___/|_.__/ \___/
7287EOF
7288        ;;
7289
7290        "Grombyang"*)
7291            set_colors 4 2 1
7292            read -rd '' ascii_data <<'EOF'
7293${c1}            eeeeeeeeeeee
7294         eeeeeeeeeeeeeeeee
7295      eeeeeeeeeeeeeeeeeeeeeee
7296    eeeee       ${c2}.o+       ${c1}eeee
7297  eeee         ${c2}`ooo/         ${c1}eeee
7298 eeee         ${c2}`+oooo:         ${c1}eeee
7299eee          ${c2}`+oooooo:          ${c1}eee
7300eee          ${c2}-+oooooo+:         ${c1}eee
7301ee         ${c2}`/:oooooooo+:         ${c1}ee
7302ee        ${c2}`/+   +++    +:        ${c1}ee
7303ee              ${c2}+o+\             ${c1}ee
7304eee             ${c2}+o+\            ${c1}eee
7305eee        ${c2}//  \\ooo/  \\\        ${c1}eee
7306 eee      ${c2}//++++oooo++++\\\     ${c1}eee
7307  eeee    ${c2}::::++oooo+:::::   ${c1}eeee
7308    eeeee   ${c3}Grombyang OS ${c1}  eeee
7309      eeeeeeeeeeeeeeeeeeeeeee
7310         eeeeeeeeeeeeeeeee
7311EOF
7312        ;;
7313
7314        "guix_small"*)
7315            set_colors 3 7 6 1 8
7316            read -rd '' ascii_data <<'EOF'
7317${c1}|.__          __.|
7318|__ \\        / __|
7319   \\ \\      / /
7320    \\ \\    / /
7321     \\ \\  / /
7322      \\ \\/ /
7323       \\__/
7324EOF
7325        ;;
7326
7327        "Guix"*)
7328            set_colors 3 7 6 1 8
7329            read -rd '' ascii_data <<'EOF'
7330${c1} ..                             `.
7331 `--..```..`           `..```..--`
7332   .-:///-:::.       `-:::///:-.
7333      ````.:::`     `:::.````
7334           -//:`    -::-
7335            ://:   -::-
7336            `///- .:::`
7337             -+++-:::.
7338              :+/:::-
7339              `-....`
7340EOF
7341        ;;
7342
7343        "haiku_small"*)
7344            set_colors 2 8
7345            read -rd '' ascii_data <<'EOF'
7346${c1}       ,^,
7347      /   \\
7348*--_ ;     ; _--*
7349\\   '"     "'   /
7350 '.           .'
7351.-'"         "'-.
7352 '-.__.   .__.-'
7353       |_|
7354EOF
7355        ;;
7356
7357        "Haiku"*)
7358            set_colors 2 8
7359            read -rd '' ascii_data <<'EOF'
7360${c2}          :dc'
7361       'l:;'${c1},${c2}'ck.    .;dc:.
7362       co    ${c1}..${c2}k.  .;;   ':o.
7363       co    ${c1}..${c2}k. ol      ${c1}.${c2}0.
7364       co    ${c1}..${c2}k. oc     ${c1}..${c2}0.
7365       co    ${c1}..${c2}k. oc     ${c1}..${c2}0.
7366.Ol,.  co ${c1}...''${c2}Oc;kkodxOdddOoc,.
7367 ';lxxlxOdxkxk0kd${c1}oooll${c2}dl${c1}ccc:${c2}clxd;
7368     ..${c1}oOolllllccccccc:::::${c2}od;
7369       cx:ooc${c1}:::::::;${c2}cooolcX.
7370       cd${c1}.${c2}''cloxdoollc' ${c1}...${c2}0.
7371       cd${c1}......${c2}k;${c1}.${c2}xl${c1}....  .${c2}0.
7372       .::c${c1};..${c2}cx;${c1}.${c2}xo${c1}..... .${c2}0.
7373          '::c'${c1}...${c2}do${c1}..... .${c2}K,
7374                  cd,.${c1}....:${c2}O,${c1}
7375                    ':clod:'${c1}
7376                        ${c1}
7377EOF
7378        ;;
7379
7380        "Huayra"*)
7381            set_colors 4 7
7382            read -rd '' ascii_data <<'EOF'
7383${c2}                     `
7384            .       .       `
7385       ``    -      .      .
7386        `.`   -` `. -  `` .`
7387          ..`-`-` + -  / .`     ```
7388          .--.+--`+:- :/.` .-``.`
7389            -+/so::h:.d-`./:`.`
7390              :hNhyMomy:os-...-.  ````
7391               .dhsshNmNhoo+:-``.```
7392                ${c1}`ohy:-${c2}NMds+::-.``
7393            ````${c1}.hNN+`${c2}mMNho/:-....````
7394       `````     `../dmNhoo+/:..``
7395    ````            .dh++o/:....`
7396.+s/`                `/s-.-.:.`` ````
7397::`                    `::`..`
7398                          .` `..
7399                                ``
7400EOF
7401        ;;
7402
7403        "hyperbola_small"*)
7404            set_colors 8
7405            read -rd '' ascii_data <<'EOF'
7406${c1}    |`__.`/
7407    \____/
7408    .--.
7409   /    \\
7410  /  ___ \\
7411 / .`   `.\\
7412/.`      `.\\
7413EOF
7414        ;;
7415
7416        "Hyperbola"*)
7417            set_colors 8
7418            read -rd '' ascii_data <<'EOF'
7419${c1}                     WW
7420                     KX              W
7421                    WO0W          NX0O
7422                    NOO0NW  WNXK0OOKW
7423                    W0OOOOOOOOOOOOKN
7424                     N0OOOOOOO0KXW
7425                       WNXXXNW
7426                 NXK00000KN
7427             WNK0OOOOOOOOOO0W
7428           NK0OOOOOOOOOOOOOO0W
7429         X0OOOOOOO00KK00OOOOOK
7430       X0OOOO0KNWW      WX0OO0W
7431     X0OO0XNW              KOOW
7432   N00KNW                   KOW
7433 NKXN                       W0W
7434WW                           W
7435EOF
7436        ;;
7437
7438        "januslinux"*|"janus"*|"Ataraxia Linux"*|"Ataraxia"*)
7439            set_colors 4 5 6 2
7440            read -rd '' ascii_data <<'EOF'
7441${c1}               'l:
7442        loooooo
7443          loooo coooool
7444 looooooooooooooooooool
7445  looooooooooooooooo
7446         lool   cooo
7447        coooooooloooooooo
7448     clooooo  ;lood  cloooo
7449  :loooocooo cloo      loooo
7450 loooo  :ooooool       loooo
7451looo    cooooo        cooooo
7452looooooooooooo      ;loooooo ${c2}looooooc
7453${c1}looooooooo loo   cloooooool    ${c2}looooc
7454${c1} cooo       cooooooooooo       ${c2}looolooooool
7455${c1}            cooo:     ${c2}coooooooooooooooooool
7456                       loooooooooooolc:   loooc;
7457                             cooo:    loooooooooooc
7458                            ;oool         looooooo:
7459                           coool          olc,
7460                          looooc   ,,
7461                        coooooc    loc
7462                       :oooool,    coool:, looool:,
7463                       looool:      ooooooooooooooo:
7464                       cooolc        .ooooooooooool
7465EOF
7466        ;;
7467
7468        "Kali"*)
7469            set_colors 4 8
7470            read -rd '' ascii_data <<'EOF'
7471${c1}..............
7472            ..,;:ccc,.
7473          ......''';lxO.
7474.....''''..........,:ld;
7475           .';;;:::;,,.x,
7476      ..'''.            0Xxoc:,.  ...
7477  ....                ,ONkc;,;cokOdc',.
7478 .                   OMo           ':${c2}dd${c1}o.
7479                    dMc               :OO;
7480                    0M.                 .:o.
7481                    ;Wd
7482                     ;XO,
7483                       ,d0Odlc;,..
7484                           ..',;:cdOOd::,.
7485                                    .:d;.':;.
7486                                       'd,  .'
7487                                         ;l   ..
7488                                          .o
7489                                            c
7490                                            .'
7491                                             .
7492EOF
7493        ;;
7494
7495        "KaOS"*)
7496            set_colors 4 7 1
7497            read -rd '' ascii_data <<'EOF'
7498${c1}                     ..
7499  .....         ..OSSAAAAAAA..
7500 .KKKKSS.     .SSAAAAAAAAAAA.
7501.KKKKKSO.    .SAAAAAAAAAA...
7502KKKKKKS.   .OAAAAAAAA.
7503KKKKKKS.  .OAAAAAA.
7504KKKKKKS. .SSAA..
7505.KKKKKS..OAAAAAAAAAAAA........
7506 DKKKKO.=AA=========A===AASSSO..
7507  AKKKS.==========AASSSSAAAAAASS.
7508  .=KKO..========ASS.....SSSSASSSS.
7509    .KK.       .ASS..O.. =SSSSAOSS:
7510     .OK.      .ASSSSSSSO...=A.SSA.
7511       .K      ..SSSASSSS.. ..SSA.
7512                 .SSS.AAKAKSSKA.
7513                    .SSS....S..
7514EOF
7515        ;;
7516
7517        "KDE"*)
7518            set_colors 2 7
7519            read -rd '' ascii_data <<'EOF'
7520${c1}             `..---+/---..`
7521         `---.``   ``   `.---.`
7522      .--.`        ``        `-:-.
7523    `:/:     `.----//----.`     :/-
7524   .:.    `---`          `--.`    .:`
7525  .:`   `--`                .:-    `:.
7526 `/    `:.      `.-::-.`      -:`   `/`
7527 /.    /.     `:++++++++:`     .:    .:
7528`/    .:     `+++++++++++/      /`   `+`
7529/+`   --     .++++++++++++`     :.   .+:
7530`/    .:     `+++++++++++/      /`   `+`
7531 /`    /.     `:++++++++:`     .:    .:
7532 ./    `:.      `.:::-.`      -:`   `/`
7533  .:`   `--`                .:-    `:.
7534   .:.    `---`          `--.`    .:`
7535    `:/:     `.----//----.`     :/-
7536      .-:.`        ``        `-:-.
7537         `---.``   ``   `.---.`
7538             `..---+/---..`
7539EOF
7540        ;;
7541
7542        "Kibojoe"*)
7543            set_colors 2 7 4
7544            read -rd '' ascii_data <<'EOF'
7545            ${c3}           ./+oooooo+/.
7546           -/+ooooo+/:.`
7547          ${c1}`${c3}yyyo${c2}+++/++${c3}osss${c1}.
7548         ${c1}+NMN${c3}yssssssssssss${c1}.
7549       ${c1}.dMMMMN${c3}sssssssssssy${c1}Ns`
7550      +MMMMMMMm${c3}sssssssssssh${c1}MNo`
7551    `hMMMMMNNNMd${c3}sssssssssssd${c1}MMN/
7552   .${c3}syyyssssssy${c1}NNmmmmd${c3}sssss${c1}hMMMMd:
7553  -NMmh${c3}yssssssssyhhhhyssyh${c1}mMMMMMMMy`
7554 -NMMMMMNN${c3}mdhyyyyyyyhdm${c1}NMMMMMMMMMMMN+
7555`NMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMd.
7556ods+/:-----://+oyydmNMMMMMMMMMMMMMMMMMN-
7557`                     .-:+osyhhdmmNNNmdo
7558EOF
7559        ;;
7560
7561        "Kogaion"*)
7562            set_colors 4 7 1
7563            read -rd '' ascii_data <<'EOF'
7564${c1}            ;;      ,;
7565           ;;;     ,;;
7566         ,;;;;     ;;;;
7567      ,;;;;;;;;    ;;;;
7568     ;;;;;;;;;;;   ;;;;;
7569    ,;;;;;;;;;;;;  ';;;;;,
7570    ;;;;;;;;;;;;;;, ';;;;;;;
7571    ;;;;;;;;;;;;;;;;;, ';;;;;
7572;    ';;;;;;;;;;;;;;;;;;, ;;;
7573;;;,  ';;;;;;;;;;;;;;;;;;;,;;
7574;;;;;,  ';;;;;;;;;;;;;;;;;;,
7575;;;;;;;;,  ';;;;;;;;;;;;;;;;,
7576;;;;;;;;;;;;, ';;;;;;;;;;;;;;
7577';;;;;;;;;;;;; ';;;;;;;;;;;;;
7578 ';;;;;;;;;;;;;, ';;;;;;;;;;;
7579  ';;;;;;;;;;;;;  ;;;;;;;;;;
7580    ';;;;;;;;;;;; ;;;;;;;;
7581        ';;;;;;;; ;;;;;;
7582           ';;;;; ;;;;
7583             ';;; ;;
7584EOF
7585        ;;
7586
7587        "Korora"*)
7588            set_colors 4 7 1
7589            read -rd '' ascii_data <<'EOF'
7590${c2}                ____________
7591             _add55555555554${c1}:
7592           _w?'${c1}``````````'${c2})k${c1}:
7593          _Z'${c1}`${c2}            ]k${c1}:
7594          m(${c1}`${c2}             )k${c1}:
7595     _.ss${c1}`${c2}m[${c1}`${c2},            ]e${c1}:
7596   .uY"^`${c1}`${c2}Xc${c1}`${c2}?Ss.         d(${c1}`
7597  jF'${c1}`${c2}    `@.  ${c1}`${c2}Sc      .jr${c1}`
7598 jr${c1}`${c2}       `?n_ ${c1}`${c2}$;   _a2"${c1}`
7599.m${c1}:${c2}          `~M${c1}`${c2}1k${c1}`${c2}5?!`${c1}`
7600:#${c1}:${c2}             ${c1}`${c2})e${c1}```
7601:m${c1}:${c2}             ,#'${c1}`
7602:#${c1}:${c2}           .s2'${c1}`
7603:m,________.aa7^${c1}`
7604:#baaaaaaas!J'${c1}`
7605 ```````````
7606EOF
7607        ;;
7608
7609        "KSLinux"*)
7610            set_colors 4 7 1
7611            read -rd '' ascii_data <<'EOF'
7612${c1} K   K U   U RRRR   ooo
7613 K  K  U   U R   R o   o
7614 KKK   U   U RRRR  o   o
7615 K  K  U   U R  R  o   o
7616 K   K  UUU  R   R  ooo
7617
7618${c2}  SSS   AAA  W   W  AAA
7619 S     A   A W   W A   A
7620  SSS  AAAAA W W W AAAAA
7621     S A   A WW WW A   A
7622  SSS  A   A W   W A   A
7623EOF
7624        ;;
7625
7626        "Kubuntu"*)
7627            set_colors 4 7 1
7628            read -rd '' ascii_data <<'EOF'
7629${c1}           `.:/ossyyyysso/:.
7630        .:oyyyyyyyyyyyyyyyyyyo:`
7631      -oyyyyyyyo${c2}dMMy${c1}yyyyyyysyyyyo-
7632    -syyyyyyyyyy${c2}dMMy${c1}oyyyy${c2}dmMMy${c1}yyyys-
7633   oyyys${c2}dMy${c1}syyyy${c2}dMMMMMMMMMMMMMy${c1}yyyyyyo
7634 `oyyyy${c2}dMMMMy${c1}syysoooooo${c2}dMMMMy${c1}yyyyyyyyo`
7635 oyyyyyy${c2}dMMMMy${c1}yyyyyyyyyyys${c2}dMMy${c1}sssssyyyo
7636-yyyyyyyy${c2}dMy${c1}syyyyyyyyyyyyyys${c2}dMMMMMy${c1}syyy-
7637oyyyysoo${c2}dMy${c1}yyyyyyyyyyyyyyyyyy${c2}dMMMMy${c1}syyyo
7638yyys${c2}dMMMMMy${c1}yyyyyyyyyyyyyyyyyysosyyyyyyyy
7639yyys${c2}dMMMMMy${c1}yyyyyyyyyyyyyyyyyyyyyyyyyyyyy
7640oyyyyysos${c2}dy${c1}yyyyyyyyyyyyyyyyyy${c2}dMMMMy${c1}syyyo
7641-yyyyyyyy${c2}dMy${c1}syyyyyyyyyyyyyys${c2}dMMMMMy${c1}syyy-
7642 oyyyyyy${c2}dMMMy${c1}syyyyyyyyyyys${c2}dMMy${c1}oyyyoyyyo
7643 `oyyyy${c2}dMMMy${c1}syyyoooooo${c2}dMMMMy${c1}oyyyyyyyyo
7644   oyyysyyoyyyys${c2}dMMMMMMMMMMMy${c1}yyyyyyyo
7645    -syyyyyyyyy${c2}dMMMy${c1}syyy${c2}dMMMy${c1}syyyys-
7646      -oyyyyyyy${c2}dMMy${c1}yyyyyysosyyyyo-
7647        ./oyyyyyyyyyyyyyyyyyyo/.
7648           `.:/oosyyyysso/:.`
7649EOF
7650        ;;
7651
7652        "LEDE"*)
7653            set_colors 4 7 1
7654            read -rd '' ascii_data <<'EOF'
7655    ${c1} _________
7656    /        /\
7657   /  LE    /  \
7658  /    DE  /    \
7659 /________/  LE  \
7660 \        \   DE /
7661  \    LE  \    /
7662   \  DE    \  /
7663    \________\/
7664EOF
7665        ;;
7666
7667        "Linux")
7668            set_colors fg 8 3
7669            read -rd '' ascii_data <<'EOF'
7670${c2}        #####
7671${c2}       #######
7672${c2}       ##${c1}O${c2}#${c1}O${c2}##
7673${c2}       #${c3}#####${c2}#
7674${c2}     ##${c1}##${c3}###${c1}##${c2}##
7675${c2}    #${c1}##########${c2}##
7676${c2}   #${c1}############${c2}##
7677${c2}   #${c1}############${c2}###
7678${c3}  ##${c2}#${c1}###########${c2}##${c3}#
7679${c3}######${c2}#${c1}#######${c2}#${c3}######
7680${c3}#######${c2}#${c1}#####${c2}#${c3}#######
7681${c3}  #####${c2}#######${c3}#####
7682EOF
7683        ;;
7684
7685        "linuxlite_small"*)
7686            set_colors 3 7
7687            read -rd '' ascii_data <<'EOF'
7688${c1}   /\\
7689  /  \\
7690 / ${c2}/ ${c1}/
7691> ${c2}/ ${c1}/
7692\\ ${c2}\\ ${c1}\\
7693 \\_${c2}\\${c1}_\\
7694${c2}    \\
7695EOF
7696        ;;
7697
7698        "Linux Lite"* | "Linux_Lite"*)
7699            set_colors 3 7
7700            read -rd '' ascii_data <<'EOF'
7701${c1}          ,xXc
7702      .l0MMMMMO
7703   .kNMMMMMWMMMN,
7704   KMMMMMMKMMMMMMo
7705  'MMMMMMNKMMMMMM:
7706  kMMMMMMOMMMMMMO
7707 .MMMMMMX0MMMMMW.
7708 oMMMMMMxWMMMMM:
7709 WMMMMMNkMMMMMO
7710:MMMMMMOXMMMMW
7711.0MMMMMxMMMMM;
7712:;cKMMWxMMMMO
7713'MMWMMXOMMMMl
7714 kMMMMKOMMMMMX:
7715 .WMMMMKOWMMM0c
7716  lMMMMMWO0MNd:'
7717   oollXMKXoxl;.
7718     ':. .: .'
7719              ..
7720                .
7721EOF
7722        ;;
7723
7724        "LMDE"*)
7725            set_colors 2 7
7726            read -rd '' ascii_data <<'EOF'
7727         ${c2}`.-::---..
7728${c1}      .:++++ooooosssoo:.
7729    .+o++::.      `.:oos+.
7730${c1}   :oo:.`             -+oo${c2}:
7731${c1} ${c2}`${c1}+o/`    .${c2}::::::${c1}-.    .++-${c2}`
7732${c1}${c2}`${c1}/s/    .yyyyyyyyyyo:   +o-${c2}`
7733${c1}${c2}`${c1}so     .ss       ohyo` :s-${c2}:
7734${c1}${c2}`${c1}s/     .ss  h  m  myy/ /s`${c2}`
7735${c1}`s:     `oo  s  m  Myy+-o:`
7736`oo      :+sdoohyoydyso/.
7737 :o.      .:////////++:
7738${c1} `/++        ${c2}-:::::-
7739${c1}  ${c2}`${c1}++-
7740${c1}   ${c2}`${c1}/+-
7741${c1}     ${c2}.${c1}+/.
7742${c1}       ${c2}.${c1}:+-.
7743          `--.``
7744EOF
7745        ;;
7746
7747        "Lubuntu"*)
7748            set_colors 4 7 1
7749            read -rd '' ascii_data <<'EOF'
7750${c1}           `-mddhhhhhhhhhddmss`
7751        ./mdhhhhhhhhhhhhhhhhhhhhhh.
7752     :mdhhhhhhhhhhhhhhhhhhhhhhhhhhhm`
7753   :ymhhhhhhhhhhhhhhhyyyyyyhhhhhhhhhy:
7754  `odhyyyhhhhhhhhhy+-````./syhhhhhhhho`
7755 `hhy..:oyhhhhhhhy-`:osso/..:/++oosyyyh`
7756 dhhs   .-/syhhhhs`shhhhhhyyyyyyyyyyyyhs
7757:hhhy`  yso/:+syhy/yhhhhhshhhhhhhhhhhhhh:
7758hhhhho. +hhhys++oyyyhhhhh-yhhhhhhhhhhhhhs
7759hhhhhhs-`/syhhhhyssyyhhhh:-yhhhhhhhhhhhhh
7760hhhhhhs  `:/+ossyyhyyhhhhs -yhhhhhhhhhhhh
7761hhhhhhy/ `syyyssyyyyhhhhhh: :yhhhhhhhhhhs
7762:hhhhhhyo:-/osyhhhhhhhhhhho  ohhhhhhhhhh:
7763 sdhhhhhhhyyssyyhhhhhhhhhhh+  +hhhhhhhhs
7764 `shhhhhhhhhhhhhhhhhhhhhhy+` .yhhhhhhhh`
7765  +sdhhhhhhhhhhhhhhhhhyo/. `/yhhhhhhhd`
7766   `:shhhhhhhhhh+---..``.:+yyhhhhhhh:
7767     `:mdhhhhhh/.syssyyyyhhhhhhhd:`
7768        `+smdhhh+shhhhhhhhhhhhdm`
7769           `sNmdddhhhhhhhddm-`
7770EOF
7771        ;;
7772
7773        "Lunar"*)
7774            set_colors 4 7 3
7775            read -rd '' ascii_data <<'EOF'
7776${c1}`-.                                 `-.
7777  -ohys/-`                    `:+shy/`
7778     -omNNdyo/`          :+shmNNy/`
7779             ${c3}      -
7780                 /mMmo
7781                 hMMMN`
7782                 .NMMs
7783    ${c1}  -:+oooo+//: ${c3}/MN${c1}. -///oooo+/-`
7784     /:.`          ${c3}/${c1}           `.:/`
7785${c3}          __
7786         |  |   _ _ ___ ___ ___
7787         |  |__| | |   | .'|  _|
7788         |_____|___|_|_|__,|_|
7789EOF
7790        ;;
7791
7792        "mac"*"_small")
7793            set_colors 2 3 1 5 4
7794            read -rd '' ascii_data <<'EOF'
7795${c1}       .:'
7796    _ :'_
7797${c2} .'`_`-'_``.
7798:________.-'
7799${c3}:_______:
7800:_______:
7801${c4} :_______`-;
7802${c5}  `._.-._.'
7803EOF
7804        ;;
7805
7806        "mac"* | "Darwin")
7807            set_colors 2 3 1 1 5 4
7808            read -rd '' ascii_data <<'EOF'
7809${c1}                    'c.
7810                 ,xNMM.
7811               .OMMMMo
7812               OMMM0,
7813     .;loddo:' loolloddol;.
7814   cKMMMMMMMMMMNWMMMMMMMMMM0:
7815${c2} .KMMMMMMMMMMMMMMMMMMMMMMMWd.
7816 XMMMMMMMMMMMMMMMMMMMMMMMX.
7817${c3};MMMMMMMMMMMMMMMMMMMMMMMM:
7818:MMMMMMMMMMMMMMMMMMMMMMMM:
7819${c4}.MMMMMMMMMMMMMMMMMMMMMMMMX.
7820 kMMMMMMMMMMMMMMMMMMMMMMMMWd.
7821 ${c5}.XMMMMMMMMMMMMMMMMMMMMMMMMMMk
7822  .XMMMMMMMMMMMMMMMMMMMMMMMMK.
7823    ${c6}kMMMMMMMMMMMMMMMMMMMMMMd
7824     ;KMMMMMMMWXXWMMMMMMMk.
7825       .cooc,.    .,coo:.
7826EOF
7827        ;;
7828
7829        "mageia_small"*)
7830            set_colors 6 7
7831            read -rd '' ascii_data <<'EOF'
7832${c1}   *
7833    *
7834   **
7835${c2} /\\__/\\
7836/      \\
7837\\      /
7838 \\____/
7839EOF
7840        ;;
7841
7842        "Mageia"*)
7843            set_colors 6 7
7844            read -rd '' ascii_data <<'EOF'
7845${c1}        .°°.
7846         °°   .°°.
7847         .°°°. °°
7848         .   .
7849          °°° .°°°.
7850      .°°°.   '___'
7851${c2}     .${c1}'___'     ${c2}   .
7852   :dkxc;'.  ..,cxkd;
7853 .dkk. kkkkkkkkkk .kkd.
7854.dkk.  ';cloolc;.  .kkd
7855ckk.                .kk;
7856xO:                  cOd
7857xO:                  lOd
7858lOO.                .OO:
7859.k00.              .00x
7860 .k00;            ;00O.
7861  .lO0Kc;,,,,,,;c0KOc.
7862     ;d00KKKKKK00d;
7863        .,KKKK,.
7864EOF
7865        ;;
7866
7867        "MagpieOS"*)
7868            set_colors 2 1 3 5
7869            read -rd '' ascii_data <<'EOF'
7870${c1}        ;00000     :000Ol
7871     .x00kk00:    O0kk00k;
7872    l00:   :00.  o0k   :O0k.
7873  .k0k.     x${c2}d$dddd${c1}k'    .d00;
7874  k0k.      ${c2}.dddddl       ${c1}o00,
7875 o00.        ${c2}':cc:.        ${c1}d0O
7876.00l                       ,00.
7877l00.                       d0x
7878k0O                     .:k0o
7879O0k                 ;dO0000d.
7880k0O               .O0O${c2}xxxxk${c1}00:
7881o00.              k0O${c2}dddddd${c1}occ
7882'00l              x0O${c2}dddddo${c3};..${c1}
7883 x00.             .x00${c2}kxxd${c3}:..${c1}
7884 .O0x               .:oxxx${c4}Okl.${c1}
7885  .x0d                     ${c4},xx,${c1}
7886    .:o.          ${c4}.xd       ckd${c1}
7887       ..          ${c4}dxl     .xx;
7888                    :xxolldxd'
7889                      ;oxdl.
7890EOF
7891        ;;
7892
7893        "Mandriva"*)
7894            set_colors 4 3
7895            read -rd '' ascii_data <<'EOF'
7896${c2}                        ``
7897                       `-.
7898${c1}      `               ${c2}.---
7899${c1}    -/               ${c2}-::--`
7900${c1}  `++    ${c2}`----...```-:::::.
7901${c1} `os.      ${c2}.::::::::::::::-```     `  `
7902${c1} +s+         ${c2}.::::::::::::::::---...--`
7903${c1}-ss:          ${c2}`-::::::::::::::::-.``.``
7904${c1}/ss-           ${c2}.::::::::::::-.``   `
7905${c1}+ss:          ${c2}.::::::::::::-
7906${c1}/sso         ${c2}.::::::-::::::-
7907${c1}.sss/       ${c2}-:::-.`   .:::::
7908${c1} /sss+.    ${c2}..`${c1}  `--`    ${c2}.:::
7909${c1}  -ossso+/:://+/-`        ${c2}.:`
7910${c1}    -/+ooo+/-.              ${c2}`
7911EOF
7912        ;;
7913
7914        "manjaro_small"*)
7915            set_colors 2 7
7916            read -rd '' ascii_data <<'EOF'
7917${c1}||||||||| ||||
7918||||||||| ||||
7919||||      ||||
7920|||| |||| ||||
7921|||| |||| ||||
7922|||| |||| ||||
7923|||| |||| ||||
7924EOF
7925        ;;
7926
7927        "Manjaro"*)
7928            set_colors 2 7
7929            read -rd '' ascii_data <<'EOF'
7930${c1}██████████████████  ████████
7931██████████████████  ████████
7932██████████████████  ████████
7933██████████████████  ████████
7934████████            ████████
7935████████  ████████  ████████
7936████████  ████████  ████████
7937████████  ████████  ████████
7938████████  ████████  ████████
7939████████  ████████  ████████
7940████████  ████████  ████████
7941████████  ████████  ████████
7942████████  ████████  ████████
7943████████  ████████  ████████
7944EOF
7945        ;;
7946
7947        "Maui"*)
7948            set_colors 6 7
7949            read -rd '' ascii_data <<'EOF'
7950${c1}             `.-://////:--`
7951         .:/oooooooooooooooo+:.
7952      `:+ooooooooooooooooooooooo:`
7953    `:oooooooooooooooooooooooooooo/`
7954    ..```-oooooo/-`` `:oooooo+:.` `--
7955  :.      +oo+-`       /ooo/`       -/
7956 -o.     `o+-          +o/`         -o:
7957`oo`     ::`  :o/     `+.  .+o`     /oo.
7958/o+      .  -+oo-     `   /oo/     `ooo/
7959+o-        /ooo+`       .+ooo.     :ooo+
7960++       .+oooo:       -oooo+     `oooo+
7961:.      .oooooo`      :ooooo-     :oooo:
7962`      .oooooo:      :ooooo+     `ooo+-`
7963      .+oooooo`     -oooooo:     `o/-
7964      +oooooo:     .ooooooo.
7965     /ooooooo`     /ooooooo/       ..
7966    `:oooooooo/:::/ooooooooo+:--:/:`
7967      `:+oooooooooooooooooooooo+:`
7968         .:+oooooooooooooooo+:.
7969             `.-://////:-.`
7970EOF
7971        ;;
7972
7973        "Mer"*)
7974            set_colors 4 7 1
7975            read -rd '' ascii_data <<'EOF'
7976${c1}                         dMs
7977                         .-`
7978                       `y`-o+`
7979                        ``NMMy
7980                      .--`:++.
7981                    .hNNNNs
7982                    /MMMMMN
7983                    `ommmd/ +/
7984                      ````  +/
7985                     `:+sssso/-`
7986  .-::. `-::-`     `smNMNmdmNMNd/      .://-`
7987.ymNMNNdmNMMNm+`  -dMMh:.....+dMMs   `sNNMMNo
7988dMN+::NMMy::hMM+  mMMo `ohhy/ `dMM+  yMMy::-
7989MMm   yMM-  :MMs  NMN` `:::::--sMMh  dMM`
7990MMm   yMM-  -MMs  mMM+ `ymmdsymMMMs  dMM`
7991NNd   sNN-  -NNs  -mMNs-.--..:dMMh`  dNN
7992---   .--`  `--.   .smMMmdddmMNdo`   .--
7993                     ./ohddds+:`
7994                     +h- `.:-.
7995                     ./`.dMMMN+
7996                        +MMMMMd
7997                        `+dmmy-
7998                      ``` .+`
7999                     .dMNo-y.
8000                     `hmm/
8001                         .:`
8002                         dMs
8003EOF
8004        ;;
8005
8006        "Minix"*)
8007            set_colors 1 7 3
8008            read -rd '' ascii_data <<'EOF'
8009${c2}   -sdhyo+:-`                -/syymm:
8010   sdyooymmNNy.     ``    .smNmmdysNd
8011   odyoso+syNNmysoyhhdhsoomNmm+/osdm/
8012    :hhy+-/syNNmddhddddddmNMNo:sdNd:
8013     `smNNdNmmNmddddddddddmmmmmmmy`
8014   `ohhhhdddddmmNNdmddNmNNmdddddmdh-
8015   odNNNmdyo/:/-/hNddNy-`..-+ydNNNmd:
8016 `+mNho:`   smmd/ sNNh :dmms`   -+ymmo.
8017-od/       -m${c1}mm${c2}mo -NN+ +m${c1}mm${c2}m-       yms:
8018+sms -.`    :so:  .NN+  :os/     .-`mNh:
8019.-hyh+:////-     -sNNd:`    .--://ohNs-
8020 `:hNNNNNNNMMd/sNMmhsdMMh/ymmNNNmmNNy/
8021  -+sNNNNMMNNNsmNMo: :NNmymNNNNMMMms:
8022    //oydNMMMMydMMNysNMMmsMMMMMNyo/`
8023       ../-yNMMy--/::/-.sMMmos+.`
8024           -+oyhNsooo+omy/```
8025              `::ohdmds-`
8026EOF
8027        ;;
8028
8029        "linuxmint_small"*)
8030            set_colors 2 7
8031            read -rd '' ascii_data <<'EOF'
8032${c1} ___________
8033|_          \\
8034  | ${c2}| _____ ${c1}|
8035  | ${c2}| | | | ${c1}|
8036  | ${c2}| | | | ${c1}|
8037  | ${c2}\\__${c2}___/ ${c1}|
8038  \\_________/
8039EOF
8040        ;;
8041
8042        "Linux Mint Old"* | "LinuxMintOld"* | "mint_old"*)
8043            set_colors 2 7
8044            read -rd '' ascii_data <<'EOF'
8045${c1}MMMMMMMMMMMMMMMMMMMMMMMMMmds+.
8046MMm----::-://////////////oymNMd+`
8047MMd      ${c2}/++                ${c1}-sNMd:
8048MMNso/`  ${c2}dMM    `.::-. .-::.` ${c1}.hMN:
8049ddddMMh  ${c2}dMM   :hNMNMNhNMNMNh: ${c1}`NMm
8050    NMm  ${c2}dMM  .NMN/-+MMM+-/NMN` ${c1}dMM
8051    NMm  ${c2}dMM  -MMm  `MMM   dMM. ${c1}dMM
8052    NMm  ${c2}dMM  -MMm  `MMM   dMM. ${c1}dMM
8053    NMm  ${c2}dMM  .mmd  `mmm   yMM. ${c1}dMM
8054    NMm  ${c2}dMM`  ..`   ...   ydm. ${c1}dMM
8055    hMM- ${c2}+MMd/-------...-:sdds  ${c1}dMM
8056    -NMm- ${c2}:hNMNNNmdddddddddy/`  ${c1}dMM
8057     -dMNs-${c2}``-::::-------.``    ${c1}dMM
8058      `/dMNmy+/:-------------:/yMMM
8059         ./ydNMMMMMMMMMMMMMMMMMMMMM
8060            .MMMMMMMMMMMMMMMMMMM
8061EOF
8062        ;;
8063
8064        "Linux Mint"* | "LinuxMint"* | "mint"*)
8065            set_colors 2 7
8066            read -rd '' ascii_data <<'EOF'
8067${c2}             ...-:::::-...
8068${c2}          .-MMMMMMMMMMMMMMM-.
8069      .-MMMM${c1}`..-:::::::-..`${c2}MMMM-.
8070    .:MMMM${c1}.:MMMMMMMMMMMMMMM:.${c2}MMMM:.
8071   -MMM${c1}-M---MMMMMMMMMMMMMMMMMMM.${c2}MMM-
8072 `:MMM${c1}:MM`  :MMMM:....::-...-MMMM:${c2}MMM:`
8073 :MMM${c1}:MMM`  :MM:`  ``    ``  `:MMM:${c2}MMM:
8074.MMM${c1}.MMMM`  :MM.  -MM.  .MM-  `MMMM.${c2}MMM.
8075:MMM${c1}:MMMM`  :MM.  -MM-  .MM:  `MMMM-${c2}MMM:
8076:MMM${c1}:MMMM`  :MM.  -MM-  .MM:  `MMMM:${c2}MMM:
8077:MMM${c1}:MMMM`  :MM.  -MM-  .MM:  `MMMM-${c2}MMM:
8078.MMM${c1}.MMMM`  :MM:--:MM:--:MM:  `MMMM.${c2}MMM.
8079 :MMM${c1}:MMM-  `-MMMMMMMMMMMM-`  -MMM-${c2}MMM:
8080  :MMM${c1}:MMM:`                `:MMM:${c2}MMM:
8081   .MMM${c1}.MMMM:--------------:MMMM.${c2}MMM.
8082     '-MMMM${c1}.-MMMMMMMMMMMMMMM-.${c2}MMMM-'
8083       '.-MMMM${c1}``--:::::--``${c2}MMMM-.'
8084${c2}            '-MMMMMMMMMMMMM-'
8085${c2}               ``-:::::-``
8086EOF
8087        ;;
8088
8089
8090        "mx_small"*)
8091            set_colors 4 6 7
8092            read -rd '' ascii_data <<'EOF'
8093${c3}    \\\\  /
8094     \\\\/
8095      \\\\
8096   /\\/ \\\\
8097  /  \\  /\\
8098 /    \\/  \\
8099/__________\\
8100EOF
8101        ;;
8102
8103        "MX"*)
8104            set_colors 4 6 7
8105            read -rd '' ascii_data <<'EOF'
8106${c3}MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNMMMMMMMMM
8107MMMMMMMMMMNs..yMMMMMMMMMMMMMm: +NMMMMMMM
8108MMMMMMMMMN+    :mMMMMMMMMMNo` -dMMMMMMMM
8109MMMMMMMMMMMs.   `oNMMMMMMh- `sNMMMMMMMMM
8110MMMMMMMMMMMMN/    -hMMMN+  :dMMMMMMMMMMM
8111MMMMMMMMMMMMMMh-    +ms. .sMMMMMMMMMMMMM
8112MMMMMMMMMMMMMMMN+`   `  +NMMMMMMMMMMMMMM
8113MMMMMMMMMMMMMMNMMd:    .dMMMMMMMMMMMMMMM
8114MMMMMMMMMMMMm/-hMd-     `sNMMMMMMMMMMMMM
8115MMMMMMMMMMNo`   -` :h/    -dMMMMMMMMMMMM
8116MMMMMMMMMd:       /NMMh-   `+NMMMMMMMMMM
8117MMMMMMMNo`         :mMMN+`   `-hMMMMMMMM
8118MMMMMMh.            `oNMMd:    `/mMMMMMM
8119MMMMm/                -hMd-      `sNMMMM
8120MMNs`                   -          :dMMM
8121Mm:                                 `oMM
8122MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
8123EOF
8124        ;;
8125
8126        "Namib"*)
8127            set_colors 1
8128            read -rd '' ascii_data <<'EOF'
8129${c1}          .:+shysyhhhhysyhs+:.
8130       -/yyys              syyy/-
8131     -shy                      yhs-
8132   -yhs                          shy-
8133  +hy                              yh+
8134 +ds                                sd+
8135/ys                  so              sy/
8136sh                 smMMNdyo           hs
8137yo               ymMMMMNNMMNho        oy
8138N             ydMMMNNMMMMMMMMMmy       N
8139N         shmMMMMNNMMMMMMMMMMMMMNy     N
8140yo  ooshmNMMMNNNNMMMMMMMMMMMMMMMMMms  oy
8141sd yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy ds
8142/ys                                  sy/
8143 +ds                                sd+
8144  +hy                              yh+
8145   -yhs                          shy-
8146     -shy                      yhs-
8147       -/yyys              syyy/-
8148          .:+shysyhyhhysyhs+:.
8149EOF
8150        ;;
8151
8152        "Neptune"*)
8153            set_colors 7
8154            read -rd '' ascii_data <<'EOF'
8155${c1}            ./+sydddddddys/-.
8156        .+ymNNdyooo/:+oooymNNmy/`
8157     `/hNNh/.`             `-+dNNy:`
8158    /mMd/.          .++.:oy/   .+mMd-
8159  `sMN/             oMMmdy+.     `oNNo
8160 `hMd.           `/ymy/.           :NMo
8161 oMN-          `/dMd:               /MM-
8162`mMy          -dMN+`                 mMs
8163.MMo         -NMM/                   yMs
8164 dMh         mMMMo:`                `NMo
8165 /MM/        /ymMMMm-               sMN.
8166  +Mm:         .hMMd`              oMN/
8167   +mNs.      `yNd/`             -dMm-
8168    .yMNs:    `/.`            `/yNNo`
8169      .odNNy+-`           .:ohNNd/.
8170         -+ymNNmdyyyyyyydmNNmy+.
8171             `-//sssssss//.
8172EOF
8173        ;;
8174
8175        "netbsd_small"*)
8176            set_colors 5 7
8177            read -rd '' ascii_data <<'EOF'
8178${c2}\\\\${c1}\`-______,----__
8179${c2} \\\\        ${c1}__,---\`_
8180${c2}  \\\\       ${c1}\`.____
8181${c2}   \\\\${c1}-______,----\`-
8182${c2}    \\\\
8183     \\\\
8184      \\\\
8185EOF
8186        ;;
8187
8188        "NetBSD"*)
8189            set_colors 5 7
8190            read -rd '' ascii_data <<'EOF'
8191${c1}                     `-/oshdmNMNdhyo+:-`
8192${c2}y${c1}/s+:-``    `.-:+oydNMMMMNhs/-``
8193${c2}-m+${c1}NMMMMMMMMMMMMMMMMMMMNdhmNMMMmdhs+/-`
8194 ${c2}-m+${c1}NMMMMMMMMMMMMMMMMMMMMmy+:`
8195  ${c2}-N/${c1}dMMMMMMMMMMMMMMMds:`
8196   ${c2}-N/${c1}hMMMMMMMMMmho:`
8197    ${c2}-N/${c1}-:/++/:.`
8198${c2}     :M+
8199      :Mo
8200       :Ms
8201        :Ms
8202         :Ms
8203          :Ms
8204           :Ms
8205            :Ms
8206             :Ms
8207              :Ms
8208EOF
8209        ;;
8210
8211        "Netrunner"*)
8212            set_colors 4 7 1
8213            read -rd '' ascii_data <<'EOF'
8214${c1}           .:oydmMMMMMMmdyo:`
8215        -smMMMMMMMMMMMMMMMMMMds-
8216      +mMMMMMMMMMMMMMMMMMMMMMMMMd+
8217    /mMMMMMMMMMMMMMMMMMMMMMMMMMMMMm/
8218  `hMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMy`
8219 .mMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMd`
8220 dMMMMMMMMMMMMMMMMMMMMMMNdhmMMMMMMMMMMh
8221+MMMMMMMMMMMMMNmhyo+/-.   -MMMMMMMMMMMM/
8222mMMMMMMMMd+:.`           `mMMMMMMMMMMMMd
8223MMMMMMMMMMMdy/.          yMMMMMMMMMMMMMM
8224MMMMMMMMMMMMMMMNh+`     +MMMMMMMMMMMMMMM
8225mMMMMMMMMMMMMMMMMMs    -NMMMMMMMMMMMMMMd
8226+MMMMMMMMMMMMMMMMMN.  `mMMMMMMMMMMMMMMM/
8227 dMMMMMMMMMMMMMMMMMy  hMMMMMMMMMMMMMMMh
8228 `dMMMMMMMMMMMMMMMMM-+MMMMMMMMMMMMMMMd`
8229  `hMMMMMMMMMMMMMMMMmMMMMMMMMMMMMMMMy
8230    /mMMMMMMMMMMMMMMMMMMMMMMMMMMMMm:
8231      +dMMMMMMMMMMMMMMMMMMMMMMMMd/
8232        -odMMMMMMMMMMMMMMMMMMdo-
8233           `:+ydmNMMMMNmhy+-`
8234EOF
8235        ;;
8236
8237        "Nitrux"*)
8238            set_colors 4
8239            read -rd '' ascii_data <<'EOF'
8240${c1}`:/.
8241`/yo
8242`/yo
8243`/yo      .+:.
8244`/yo      .sys+:.`
8245`/yo       `-/sys+:.`
8246`/yo           ./sss+:.`
8247`/yo              .:oss+:-`
8248`/yo                 ./o///:-`
8249`/yo              `.-:///////:`
8250`/yo           `.://///++//-``
8251`/yo       `.-:////++++/-`
8252`/yo    `-://///++o+/-`
8253`/yo `-/+o+++ooo+/-`
8254`/s+:+oooossso/.`
8255`//+sssssso:.
8256`+syyyy+:`
8257:+s+-
8258EOF
8259        ;;
8260
8261        "nixos_small")
8262            set_colors 4 6
8263            read -rd '' ascii_data <<'EOF'
8264  ${c1}  \\\\  \\\\ //
8265 ==\\\\__\\\\/ //
8266   //   \\\\//
8267==//     //==
8268 //\\\\___//
8269// /\\\\  \\\\==
8270  // \\\\  \\\\
8271EOF
8272        ;;
8273
8274        "NixOS"*)
8275            set_colors 4 6
8276            read -rd '' ascii_data <<'EOF'
8277${c1}          ::::.    ${c2}':::::     ::::'
8278${c1}          ':::::    ${c2}':::::.  ::::'
8279${c1}            :::::     ${c2}'::::.:::::
8280${c1}      .......:::::..... ${c2}::::::::
8281${c1}     ::::::::::::::::::. ${c2}::::::    ${c1}::::.
8282    ::::::::::::::::::::: ${c2}:::::.  ${c1}.::::'
8283${c2}           .....           ::::' ${c1}:::::'
8284${c2}          :::::            '::' ${c1}:::::'
8285${c2} ........:::::               ' ${c1}:::::::::::.
8286${c2}:::::::::::::                 ${c1}:::::::::::::
8287${c2} ::::::::::: ${c1}..              ${c1}:::::
8288${c2}     .::::: ${c1}.:::            ${c1}:::::
8289${c2}    .:::::  ${c1}:::::          ${c1}'''''    ${c2}.....
8290    :::::   ${c1}':::::.  ${c2}......:::::::::::::'
8291     :::     ${c1}::::::. ${c2}':::::::::::::::::'
8292${c1}            .:::::::: ${c2}'::::::::::
8293${c1}           .::::''::::.     ${c2}'::::.
8294${c1}          .::::'   ::::.     ${c2}'::::.
8295${c1}         .::::      ::::      ${c2}'::::.
8296EOF
8297        ;;
8298
8299        "Nurunner"*)
8300            set_colors 4
8301            read -rd '' ascii_data <<'EOF'
8302${c1}                  ,xc
8303                ;00cxXl
8304              ;K0,   .xNo.
8305            :KO'       .lXx.
8306          cXk.    ;xl     cXk.
8307        cXk.    ;k:.,xo.    cXk.
8308     .lXx.    :x::0MNl,dd.    :KO,
8309   .xNx.    cx;:KMMMMMNo'dx.    ;KK;
8310 .dNl.    cd,cXMMMMMMMMMWd,ox'    'OK:
8311;WK.    'K,.KMMMMMMMMMMMMMWc.Kx     lMO
8312 'OK:    'dl'xWMMMMMMMMMM0::x:    'OK:
8313   .kNo    .xo'xWMMMMMM0;:O:    ;KK;
8314     .dXd.   .do,oNMMO;ck:    ;00,
8315        oNd.   .dx,;'cO;    ;K0,
8316          oNx.    okk;    ;K0,
8317            lXx.        :KO'
8318              cKk'    cXk.
8319                ;00:lXx.
8320                  ,kd.
8321EOF
8322        ;;
8323
8324        "NuTyX"*)
8325            set_colors 4 1
8326            read -rd '' ascii_data <<'EOF'
8327${c1}                                      .
8328                                    .
8329                                 ...
8330                               ...
8331            ....     .........--.
8332       ..-++-----....--++++++---.
8333    .-++++++-.   .-++++++++++++-----..
8334  .--...  .++..-+++--.....-++++++++++--..
8335 .     .-+-. .**-            ....  ..-+----..
8336     .+++.  .*+.         +            -++-----.
8337   .+++++-  ++.         .*+.     .....-+++-----.
8338  -+++-++. .+.          .-+***++***++--++++.  .
8339 -+-. --   -.          -*- ......        ..--.
8340.-. .+-    .          -+.
8341.  .+-                +.
8342   --                 --
8343  -+----.              .-
8344  -++-.+.                .
8345 .++. --
8346  +.  ----.
8347  .  .+. ..
8348      -  .
8349      .
8350EOF
8351        ;;
8352
8353        "OBRevenge"*)
8354            set_colors 1 7 3
8355            read -rd '' ascii_data <<'EOF'
8356${c1}   __   __
8357     _@@@@   @@@g_
8358   _@@@@@@   @@@@@@
8359  _@@@@@@M   W@@@@@@_
8360 j@@@@P        ^W@@@@
8361 @@@@L____  _____Q@@@@
8362Q@@@@@@@@@@j@@@@@@@@@@
8363@@@@@    T@j@    T@@@@@
8364@@@@@ ___Q@J@    _@@@@@
8365@@@@@fMMM@@j@jggg@@@@@@
8366@@@@@    j@j@^MW@P @@@@
8367Q@@@@@ggg@@f@   @@@@@@L
8368^@@@@WWMMP  ^    Q@@@@
8369 @@@@@_         _@@@@l
8370  W@@@@@g_____g@@@@@P
8371   @@@@@@@@@@@@@@@@l
8372    ^W@@@@@@@@@@@P
8373       ^TMMMMTll
8374EOF
8375        ;;
8376
8377        "openbsd_small")
8378            set_colors 3 7 6 1 8
8379            read -rd '' ascii_data <<'EOF'
8380${c1}      _____
8381    \\-     -/
8382 \\_/         \\
8383 |        ${c2}O O${c1} |
8384 |_  <   )  3 )
8385 / \\         /
8386    /-_____-\\
8387EOF
8388        ;;
8389
8390        "OpenBSD"*)
8391            set_colors 3 7 6 1 8
8392            read -rd '' ascii_data <<'EOF'
8393${c3}                                     _
8394                                    (_)
8395${c1}              |    .
8396${c1}          .   |L  /|   .         ${c3} _
8397${c1}      _ . |\ _| \--+._/| .       ${c3}(_)
8398${c1}     / ||\| Y J  )   / |/| ./
8399    J  |)'( |        ` F`.'/       ${c3} _
8400${c1}  -<|  F         __     .-<        ${c3}(_)
8401${c1}    | /       .-'${c3}. ${c1}`.  /${c3}-. ${c1}L___
8402    J \\      <    ${c3}\ ${c1} | | ${c5}O${c3}\\${c1}|.-' ${c3} _
8403${c1}  _J \\  .-    \\${c3}/ ${c5}O ${c3}| ${c1}| \\  |${c1}F    ${c3}(_)
8404${c1} '-F  -<_.     \\   .-'  `-' L__
8405__J  _   _.     >-'  ${c1})${c4}._.   ${c1}|-'
8406${c1} `-|.'   /_.          ${c4}\_|  ${c1} F
8407  /.-   .                _.<
8408 /'    /.'             .'  `\\
8409  /L  /'   |/      _.-'-\\
8410 /'J       ___.---'\|
8411   |\  .--' V  | `. `
8412   |/`. `-.     `._)
8413      / .-.\\
8414      \\ (  `\\
8415       `.\\
8416EOF
8417        ;;
8418
8419        "openEuler"*)
8420            set_colors 4 7 1
8421            read -rd '' ascii_data <<'EOF'
8422${c1}
8423                       (#####
8424                     (((########  #####
8425                    (((        ##########    __...__
8426             ((((((((           #######    /((((((###\
8427           (((((((((((   .......           \(((((####/
8428          ((((((    ((((#########            *******
8429    %((((((#          ((########
8430 /////(((((              ###
8431/////(((((((#   (((&
8432         (((((((((((((
8433          ((((((((((((
8434           (((((((((     ((((((###
8435                       /((((((######
8436                      //((((((######
8437                       /((((((#####
8438                        *********/
8439EOF
8440        ;;
8441
8442        "OpenIndiana"*)
8443            set_colors 4 7 1
8444            read -rd '' ascii_data <<'EOF'
8445${c2}                         .sy/
8446                         .yh+
8447
8448           ${c1}-+syyyo+-     ${c2} /+.
8449         ${c1}+ddo/---/sdh/   ${c2} ym-
8450       ${c1}`hm+        `sms${c2}   ym-```````.-.
8451       ${c1}sm+           sm/ ${c2} ym-         +s
8452       ${c1}hm.           /mo ${c2} ym-         /h
8453       ${c1}omo           ym: ${c2} ym-       `os`
8454        ${c1}smo`       .ym+ ${c2}  ym-     .os-
8455     ``  ${c1}:ymy+///oyms- ${c2}   ym-  .+s+.
8456   ..`     ${c1}`:+oo+/-`  ${c2}    -//oyo-
8457 -:`                   .:oys/.
8458+-               `./oyys/.
8459h+`      `.-:+oyyyo/-`
8460`/ossssysso+/-.`
8461EOF
8462        ;;
8463
8464        "openmamba"*)
8465            set_colors 7 2
8466            read -rd '' ascii_data <<'EOF'
8467${c1}                 `````
8468           .-/+ooooooooo+/:-`
8469        ./ooooooooooooooooooo+:.
8470      -+oooooooooooooooooooooooo+-
8471    .+ooooooooo+/:---::/+ooooooooo+.
8472   :oooooooo/-`          `-/oo${c2}s´${c1}oooo.${c2}s´${c1}
8473  :ooooooo/`                `${c2}sNds${c1}ooo${c2}sNds${c1}
8474 -ooooooo-                   ${c2}:dmy${c1}ooo${c2}:dmy${c1}
8475 +oooooo:                      :oooooo-
8476.ooooooo                        .://:`
8477:oooooo+                        ./+o+:`
8478-ooooooo`                      `oooooo+
8479`ooooooo:                      /oooooo+
8480 -ooooooo:                    :ooooooo.
8481  :ooooooo+.                .+ooooooo:
8482   :oooooooo+-`          `-+oooooooo:
8483    .+ooooooooo+/::::://oooooooooo+.
8484      -+oooooooooooooooooooooooo+-
8485        .:ooooooooooooooooooo+:.
8486           `-:/ooooooooo+/:.`
8487                 ``````
8488EOF
8489        ;;
8490
8491        "OpenMandriva"*)
8492            set_colors 4
8493            read -rd '' ascii_data <<'EOF'
8494${c1}                  ``````
8495            `-:/+++++++//:-.`
8496         .:+++oooo+/:.``   ``
8497      `:+ooooooo+:.  `-:/++++++/:.`
8498     -+oooooooo:` `-++o+/::::://+o+/-
8499   `/ooooooooo-  -+oo/.`        `-/oo+.
8500  `+ooooooooo.  :os/`              .+so:
8501  +sssssssss/  :ss/                 `+ss-
8502 :ssssssssss`  sss`                  .sso
8503 ossssssssss  `yyo                    sys
8504`sssssssssss` `yys                   `yys
8505`sssssssssss:  +yy/                  +yy:
8506 oyyyyyyyyyys. `oyy/`              `+yy+
8507 :yyyyyyyyyyyo. `+yhs:.         `./shy/
8508  oyyyyyyyyyyys:` .oyhys+:----/+syhy+. `
8509  `syyyyyyyyyyyyo-` .:osyhhhhhyys+:``.:`
8510   `oyyyyyyyyyyyyys+-`` `.----.```./oo.
8511     /yhhhhhhhhhhhhhhyso+//://+osyhy/`
8512      `/yhhhhhhhhhhhhhhhhhhhhhhhhy/`
8513        `:oyhhhhhhhhhhhhhhhhhhyo:`
8514            .:+syhhhhhhhhys+:-`
8515                 ``....``
8516EOF
8517        ;;
8518
8519        "OpenStage"*)
8520            set_colors 2
8521            read -rd '' ascii_data <<'EOF'
8522${c1}                 /(/
8523              .(((((((,
8524             /(((((((((/
8525           .(((((/,/(((((,
8526          *(((((*   ,(((((/
8527          (((((*      .*/((
8528         *((((/  (//(/*
8529         /((((*  ((((((((((,
8530      .  /((((*  (((((((((((((.
8531     ((. *((((/        ,((((((((
8532   ,(((/  (((((/     **   ,((((((*
8533  /(((((. .(((((/   //(((*  *(((((/
8534 .(((((,    ((/   .(((((/.   .(((((,
8535 /((((*        ,(((((((/      ,(((((
8536 /(((((((((((((((((((/.  /(((((((((/
8537 /(((((((((((((((((,   /(((((((((((/
8538     */(((((//*.      */((/(/(/*
8539EOF
8540        ;;
8541
8542        "OpenWrt"*)
8543            set_colors 4 7 1
8544            read -rd '' ascii_data <<'EOF'
8545${c1} _______
8546|       |.-----.-----.-----.
8547|   -   ||  _  |  -__|     |
8548|_______||   __|_____|__|__|
8549         |__|
8550 ________        __
8551|  |  |  |.----.|  |_
8552|  |  |  ||   _||   _|
8553|________||__|  |____|
8554EOF
8555        ;;
8556
8557        "Open Source Media Center"* | "osmc")
8558            set_colors 4 7 1
8559            read -rd '' ascii_data <<'EOF'
8560${c1}            -+shdmNNNNmdhs+-
8561        .+hMNho/:..``..:/ohNMh+.
8562      :hMdo.                .odMh:
8563    -dMy-                      -yMd-
8564   sMd-                          -dMs
8565  hMy       +.            .+       yMh
8566 yMy        dMs.        .sMd        yMy
8567:Mm         dMNMs`    `sMNMd        `mM:
8568yM+         dM//mNs``sNm//Md         +My
8569mM-         dM:  +NNNN+  :Md         -Mm
8570mM-         dM: `oNN+    :Md         -Mm
8571yM+         dM/+NNo`     :Md         +My
8572:Mm`        dMMNs`       :Md        `mM:
8573 yMy        dMs`         -ms        yMy
8574  hMy       +.                     yMh
8575   sMd-                          -dMs
8576    -dMy-                      -yMd-
8577      :hMdo.                .odMh:
8578        .+hMNho/:..``..:/ohNMh+.
8579            -+shdmNNNNmdhs+-
8580EOF
8581        ;;
8582
8583        "Oracle"*)
8584            set_colors 1 7 3
8585            read -rd '' ascii_data <<'EOF'
8586${c1}
8587      `-/+++++++++++++++++/-.`
8588   `/syyyyyyyyyyyyyyyyyyyyyyys/.
8589  :yyyyo/-...............-/oyyyy/
8590 /yyys-                     .oyyy+
8591.yyyy`                       `syyy-
8592:yyyo                         /yyy/
8593.yyyy`                       `syyy-
8594 /yyys.                     .oyyyo
8595  /yyyyo:-...............-:oyyyy/`
8596   `/syyyyyyyyyyyyyyyyyyyyyyys+.
8597     `.:/+ooooooooooooooo+/:.`
8598EOF
8599        ;;
8600
8601        "OS Elbrus"*)
8602            set_colors 4 7 3
8603            read -rd '' ascii_data <<'EOF'
8604${c1}   ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
8605   ██▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀██
8606   ██                       ██
8607   ██   ███████   ███████   ██
8608   ██   ██   ██   ██   ██   ██
8609   ██   ██   ██   ██   ██   ██
8610   ██   ██   ██   ██   ██   ██
8611   ██   ██   ██   ██   ██   ██
8612   ██   ██   ███████   ███████
8613   ██   ██                  ██
8614   ██   ██▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄██
8615   ██   ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀██
8616   ██                       ██
8617   ███████████████████████████
8618EOF
8619        ;;
8620
8621        "PacBSD"*)
8622            set_colors 1 7 3
8623            read -rd '' ascii_data <<'EOF'
8624${c1}      :+sMs.
8625  `:ddNMd-                         -o--`
8626 -sMMMMh:                          `+N+``
8627 yMMMMMs`     .....-/-...           `mNh/
8628 yMMMMMmh+-`:sdmmmmmmMmmmmddy+-``./ddNMMm
8629 yNMMNMMMMNdyyNNMMMMMMMMMMMMMMMhyshNmMMMm
8630 :yMMMMMMMMMNdooNMMMMMMMMMMMMMMMMNmy:mMMd
8631  +MMMMMMMMMmy:sNMMMMMMMMMMMMMMMMMMMmshs-
8632  :hNMMMMMMN+-+MMMMMMMMMMMMMMMMMMMMMMMs.
8633 .omysmNNhy/+yNMMMMMMMMMMNMMMMMMMMMNdNNy-
8634 /hMM:::::/hNMMMMMMMMMMMm/-yNMMMMMMN.mMNh`
8635.hMMMMdhdMMMMMMMMMMMMMMmo  `sMMMMMMN mMMm-
8636:dMMMMMMMMMMMMMMMMMMMMMdo+  oMMMMMMN`smMNo`
8637/dMMMMMMMMMMMMMMMMMMMMMNd/` :yMMMMMN:-hMMM.
8638:dMMMMMMMMMMMMMMMMMMMMMNh`  oMMMMMMNo/dMNN`
8639:hMMMMMMMMMMMMMMMMMMMMMMNs--sMMMMMMMNNmy++`
8640 sNMMMMMMMMMMMMMMMMMMMMMMMmmNMMMMMMNho::o.
8641 :yMMMMMMMMMMMMMNho+sydNNNNNNNmysso/` -//
8642  /dMMMMMMMMMMMMMs-  ````````..``
8643   .oMMMMMMMMMMMMNs`               ./y:`
8644     +dNMMNMMMMMMMmy`          ``./ys.
8645      `/hMMMMMMMMMMMNo-``    `.+yy+-`
8646        `-/hmNMNMMMMMMmmddddhhy/-`
8647            `-+oooyMMMdsoo+/:.
8648EOF
8649        ;;
8650
8651        "parabola_small"*)
8652            set_colors 5 7
8653            read -rd '' ascii_data <<'EOF'
8654${c1}  __ __ __  _
8655.`_//_//_/ / `.
8656          /  .`
8657         / .`
8658        /.`
8659       /`
8660EOF
8661        ;;
8662
8663        "Parabola"*)
8664            set_colors 5 7
8665            read -rd '' ascii_data <<'EOF'
8666${c1}                          `.-.    `.
8667                   `.`  `:++.   `-+o+.
8668             `` `:+/. `:+/.   `-+oooo+
8669        ``-::-.:+/. `:+/.   `-+oooooo+
8670    `.-:///-  ..`   .-.   `-+oooooooo-
8671 `..-..`                 `+ooooooooo:
8672``                        :oooooooo/
8673                          `ooooooo:
8674                          `oooooo:
8675                          -oooo+.
8676                          +ooo/`
8677                         -ooo-
8678                        `+o/.
8679                        /+-
8680                       //`
8681                      -.
8682EOF
8683        ;;
8684
8685        "Pardus"*)
8686            set_colors 3 7 6 1 8
8687            read -rd '' ascii_data <<'EOF'
8688${c1} .smNdy+-    `.:/osyyso+:.`    -+ydmNs.
8689/Md- -/ymMdmNNdhso/::/oshdNNmdMmy/. :dM/
8690mN.     oMdyy- -y          `-dMo     .Nm
8691.mN+`  sMy hN+ -:             yMs  `+Nm.
8692 `yMMddMs.dy `+`               sMddMMy`
8693   +MMMo  .`  .                 oMMM+
8694   `NM/    `````.`    `.`````    +MN`
8695   yM+   `.-:yhomy    ymohy:-.`   +My
8696   yM:          yo    oy          :My
8697   +Ms         .N`    `N.      +h sM+
8698   `MN      -   -::::::-   : :o:+`NM`
8699    yM/    sh   -dMMMMd-   ho  +y+My
8700    .dNhsohMh-//: /mm/ ://-yMyoshNd`
8701      `-ommNMm+:/. oo ./:+mMNmmo:`
8702     `/o+.-somNh- :yy: -hNmos-.+o/`
8703    ./` .s/`s+sMdd+``+ddMs+s`/s. `/.
8704        : -y.  -hNmddmNy.  .y- :
8705         -+       `..`       +-
8706EOF
8707        ;;
8708
8709        "Parrot"*)
8710            set_colors 6 7
8711            read -rd '' ascii_data <<'EOF'
8712${c1}  `:oho/-`
8713`mMMMMMMMMMMMNmmdhy-
8714 dMMMMMMMMMMMMMMMMMMs`
8715 +MMsohNMMMMMMMMMMMMMm/
8716 .My   .+dMMMMMMMMMMMMMh.
8717  +       :NMMMMMMMMMMMMNo
8718           `yMMMMMMMMMMMMMm:
8719             /NMMMMMMMMMMMMMy`
8720              .hMMMMMMMMMMMMMN+
8721                  ``-NMMMMMMMMMd-
8722                     /MMMMMMMMMMMs`
8723                      mMMMMMMMsyNMN/
8724                      +MMMMMMMo  :sNh.
8725                      `NMMMMMMm     -o/
8726                       oMMMMMMM.
8727                       `NMMMMMM+
8728                        +MMd/NMh
8729                         mMm -mN`
8730                         /MM  `h:
8731                          dM`   .
8732                          :M-
8733                           d:
8734                           -+
8735                            -
8736EOF
8737        ;;
8738
8739        "Parsix"*)
8740            set_colors 3 1 7 8
8741            read -rd '' ascii_data <<'EOF'
8742                 ${c2}-/+/:.
8743               ${c2}.syssssys.
8744       ${c1}.--.    ${c2}ssssssssso${c1}   ..--.
8745     :++++++:  ${c2}+ssssssss+${c1} ./++/+++:
8746    /+++++++++.${c2}.yssooooy`${c1}-+///////o-
8747    /++++++++++.${c2}+soooos:${c1}:+////////+-
8748     :+++++////o-${c2}oooooo-${c1}+/////////-
8749      `-/++//++-${c4}.-----.-${c1}:+/////:-
8750  ${c3}-://::--${c1}-:/:${c4}.--.````.--.${c1}:::-${c3}--::::::.
8751${c3}-/:::::::://:${c4}.:-`      `-:${c3}`:/:::::::--/-
8752${c3}/::::::::::/-${c4}--.        .-.${c3}-/://///::::/
8753${c3}-/:::::::::/:${c4}`:-.      .-:${c3}`:///////////-
8754 `${c3}-::::--${c1}.-://.${c4}---....---${c1}`:+/:-${c3}--::::-`
8755       ${c1}-/+///+o/-${c4}.----.${c1}.:oo+++o+.
8756     ${c1}-+/////+++o:${c2}syyyyy.${c1}o+++++++++:
8757    ${c1}.+////+++++-${c2}+sssssy+${c1}.++++++++++\
8758    ${c1}.+:/++++++.${c2}.yssssssy-${c1}`+++++++++:
8759     ${c1}:/+++++-  ${c2}+sssssssss  ${c1}-++++++-
8760       ${c1}`--`    ${c2}+sssssssso    ${c1}`--`
8761                ${c2}+sssssy+`
8762                 ${c2}`.::-`
8763EOF
8764        ;;
8765
8766        "PCBSD"* | "TrueOS"*)
8767            set_colors 1 7 3
8768            read -rd '' ascii_data <<'EOF'
8769${c1}                       ..
8770                        s.
8771                        +y
8772                        yN
8773                       -MN  `.
8774                      :NMs `m
8775                    .yMMm` `No
8776            `-/+++sdMMMNs+-`+Ms
8777        `:oo+-` .yMMMMy` `-+oNMh
8778      -oo-     +NMMMM/       oMMh-
8779    .s+` `    oMMMMM/     -  oMMMhy.
8780   +s`- ::   :MMMMMd     -o `mMMMy`s+
8781  y+  h .Ny+oNMMMMMN/    sh+NMMMMo  +y
8782 s+ .ds  -NMMMMMMMMMMNdhdNMMMMMMh`   +s
8783-h .NM`   `hMMMMMMMMMMMMMMNMMNy:      h-
8784y- hMN`     hMMmMMMMMMMMMNsdMNs.      -y
8785m` mMMy`    oMMNoNMMMMMMo`  sMMMo     `m
8786m` :NMMMdyydMMMMo+MdMMMs     sMMMd`   `m
8787h-  `+ymMMMMMMMM--M+hMMN/    +MMMMy   -h
8788:y     `.sMMMMM/ oMM+.yMMNddNMMMMMm   y:
8789 y:   `s  dMMN- .MMMM/ :MMMMMMMMMMh  :y
8790 `h:  `mdmMMM/  yMMMMs  sMMMMMMMMN- :h`
8791   so  -NMMMN   /mmd+  `dMMMMMMMm- os
8792    :y: `yMMM`       `+NMMMMMMNo`:y:
8793      /s+`.omy      /NMMMMMNh/.+s:
8794        .+oo:-.     /mdhs+::oo+.
8795            -/o+++++++++++/-
8796EOF
8797        ;;
8798
8799        "PCLinuxOS"*)
8800            set_colors 4 7 1
8801            read -rd '' ascii_data <<'EOF'
8802            ${c1}mhhhyyyyhhhdN
8803        dyssyhhhhhhhhhhhssyhN
8804     Nysyhhyo/:-.....-/oyhhhssd
8805   Nsshhy+.              `/shhysm
8806  dohhy/                    -shhsy
8807 dohhs`                       /hhys
8808N+hho   ${c2}+ssssss+-   .+syhys+   ${c1}/hhsy
8809ohhh`   ${c2}ymmo++hmm+`smmy/::+y`   ${c1}shh+
8810+hho    ${c2}ymm-  /mmy+mms          ${c1}:hhod
8811/hh+    ${c2}ymmhhdmmh.smm/          ${c1}.hhsh
8812+hhs    ${c2}ymm+::-`  /mmy`    `    ${c1}/hh+m
8813yyhh-   ${c2}ymm-       /dmdyosyd`  ${c1}`yhh+
8814 ohhy`  ${c2}://`         -/+++/-   ${c1}ohhom
8815 N+hhy-                      `shhoh
8816   sshho.                  `+hhyom
8817    dsyhhs/.            `:ohhhoy
8818      dysyhhhso///://+syhhhssh
8819         dhyssyhhhhhhyssyyhN
8820              mddhdhdmN
8821EOF
8822        ;;
8823
8824        "Peppermint"*)
8825            set_colors 1 15 3
8826            read -rd '' ascii_data <<'EOF'
8827${c1}               PPPPPPPPPPPPPP
8828${c1}           PPPP${c2}MMMMMMM${c1}PPPPPPPPPPP
8829${c1}         PPPP${c2}MMMMMMMMMM${c1}PPPPPPPP${c2}MM${c1}PP
8830${c1}       PPPPPPPP${c2}MMMMMMM${c1}PPPPPPPP${c2}MMMMM${c1}PP
8831${c1}     PPPPPPPPPPPP${c2}MMMMMM${c1}PPPPPPP${c2}MMMMMMM${c1}PP
8832${c1}    PPPPPPPPPPPP${c2}MMMMMMM${c1}PPPP${c2}M${c1}P${c2}MMMMMMMMM${c1}PP
8833${c1}   PP${c2}MMMM${c1}PPPPPPPPPP${c2}MMM${c1}PPPPP${c2}MMMMMMM${c1}P${c2}MM${c1}PPPP
8834${c1}   P${c2}MMMMMMMMMM${c1}PPPPPP${c2}MM${c1}PPPPP${c2}MMMMMM${c1}PPPPPPPP
8835${c1}  P${c2}MMMMMMMMMMMM${c1}PPPPP${c2}MM${c1}PP${c2}M${c1}P${c2}MM${c1}P${c2}MM${c1}PPPPPPPPPPP
8836${c1}  P${c2}MMMMMMMMMMMMMMMM${c1}PP${c2}M${c1}P${c2}MMM${c1}PPPPPPPPPPPPPPPP
8837${c1}  P${c2}MMM${c1}PPPPPPPPPPPPPPPPPPPPPPPPPPPPPP${c2}MMMMM${c1}P
8838${c1}  PPPPPPPPPPPPPPPP${c2}MMM${c1}P${c2}M${c1}P${c2}MMMMMMMMMMMMMMMM${c1}PP
8839${c1}  PPPPPPPPPPP${c2}MM${c1}P${c2}MM${c1}PPPP${c2}MM${c1}PPPPP${c2}MMMMMMMMMMM${c1}PP
8840${c1}   PPPPPPPP${c2}MMMMMM${c1}PPPPP${c2}MM${c1}PPPPPP${c2}MMMMMMMMM${c1}PP
8841${c1}   PPPP${c2}MM${c1}P${c2}MMMMMMM${c1}PPPPPP${c2}MM${c1}PPPPPPPPPP${c2}MMMM${c1}PP
8842${c1}    PP${c2}MMMMMMMMM${c1}P${c2}M${c1}PPPP${c2}MMMMMM${c1}PPPPPPPPPPPPP
8843${c1}     PP${c2}MMMMMMM${c1}PPPPPPP${c2}MMMMMM${c1}PPPPPPPPPPPP
8844${c1}       PP${c2}MMMM${c1}PPPPPPPPP${c2}MMMMMMM${c1}PPPPPPPP
8845${c1}         PP${c2}MM${c1}PPPPPPPP${c2}MMMMMMMMMM${c1}PPPP
8846${c1}           PPPPPPPPPP${c2}MMMMMMMM${c1}PPPP
8847${c1}               PPPPPPPPPPPPPP
8848EOF
8849        ;;
8850
8851        "popos_small"* | "pop_os_small"*)
8852            set_colors 6 7
8853            read -rd '' ascii_data <<'EOF'
8854${c1}______
8855\\   _ \\        __
8856 \\ \\ \\ \\      / /
8857  \\ \\_\\ \\    / /
8858   \\  ___\\  /_/
8859    \\ \\    _
8860   __\\_\\__(_)_
8861  (___________)`
8862EOF
8863        ;;
8864
8865        "Pop!_OS"* | "popos"* | "pop_os"*)
8866            set_colors 6 7
8867            read -rd '' ascii_data <<'EOF'
8868${c1}             /////////////
8869         /////////////////////
8870      ///////${c2}*767${c1}////////////////
8871    //////${c2}7676767676*${c1}//////////////
8872   /////${c2}76767${c1}//${c2}7676767${c1}//////////////
8873  /////${c2}767676${c1}///${c2}*76767${c1}///////////////
8874 ///////${c2}767676${c1}///${c2}76767${c1}.///${c2}7676*${c1}///////
8875/////////${c2}767676${c1}//${c2}76767${c1}///${c2}767676${c1}////////
8876//////////${c2}76767676767${c1}////${c2}76767${c1}/////////
8877///////////${c2}76767676${c1}//////${c2}7676${c1}//////////
8878////////////,${c2}7676${c1},///////${c2}767${c1}///////////
8879/////////////*${c2}7676${c1}///////${c2}76${c1}////////////
8880///////////////${c2}7676${c1}////////////////////
8881 ///////////////${c2}7676${c1}///${c2}767${c1}////////////
8882  //////////////////////${c2}'${c1}////////////
8883   //////${c2}.7676767676767676767,${c1}//////
8884    /////${c2}767676767676767676767${c1}/////
8885      ///////////////////////////
8886         /////////////////////
8887             /////////////
8888EOF
8889        ;;
8890
8891        "Porteus"*)
8892            set_colors 6 7
8893            read -rd '' ascii_data <<'EOF'
8894${c1}             `.-:::-.`
8895         -+ydmNNNNNNNmdy+-
8896      .+dNmdhs+//////+shdmdo.
8897    .smmy+-`             ./sdy:
8898  `omdo.    `.-/+osssso+/-` `+dy.
8899 `yms.   `:shmNmdhsoo++osyyo-``oh.
8900 hm/   .odNmds/.`    ``.....:::-+s
8901/m:  `+dNmy:`   `./oyhhhhyyooo++so
8902ys  `yNmy-    .+hmmho:-.`     ```
8903s:  yNm+`   .smNd+.
8904`` /Nm:    +dNd+`
8905   yN+   `smNy.
8906   dm    oNNy`
8907   hy   -mNm.
8908   +y   oNNo
8909   `y`  sNN:
8910    `:  +NN:
8911     `  .mNo
8912         /mm`
8913          /my`
8914           .sy`
8915             .+:
8916                `
8917EOF
8918        ;;
8919
8920        "postmarketos_small")
8921            set_colors 2 7
8922            read -rd '' ascii_data <<'EOF'
8923${c1}        /\\
8924       /  \\
8925      /    \\
8926      \\__   \\
8927    /\\__ \\  _\\
8928   /   /  \\/ __
8929  /   / ____/  \\
8930 /    \\ \\       \\
8931/_____/ /________\\
8932EOF
8933        ;;
8934
8935        "PostMarketOS"*)
8936            set_colors 2 7
8937            read -rd '' ascii_data <<'EOF'
8938${c1}                 /\\
8939                /  \\
8940               /    \\
8941              /      \\
8942             /        \\
8943            /          \\
8944            \\           \\
8945          /\\ \\____       \\
8946         /  \\____ \\       \\
8947        /       /  \\       \\
8948       /       /    \\    ___\\
8949      /       /      \\  / ____
8950     /       /        \\/ /    \\
8951    /       / __________/      \\
8952   /        \\ \\                 \\
8953  /          \\ \\                 \\
8954 /           / /                  \\
8955/___________/ /____________________\\
8956EOF
8957        ;;
8958
8959        "Proxmox"*)
8960            set_colors 7 202
8961            read -rd '' ascii_data <<'EOF'
8962${c1}         .://:`              `://:.
8963       `hMMMMMMd/          /dMMMMMMh`
8964        `sMMMMMMMd:      :mMMMMMMMs`
8965${c2}`-/+oo+/:${c1}`.yMMMMMMMh-  -hMMMMMMMy.`${c2}:/+oo+/-`
8966`:oooooooo/${c1}`-hMMMMMMMyyMMMMMMMh-`${c2}/oooooooo:`
8967  `/oooooooo:${c1}`:mMMMMMMMMMMMMm:`${c2}:oooooooo/`
8968    ./ooooooo+-${c1} +NMMMMMMMMN+ ${c2}-+ooooooo/.
8969      .+ooooooo+-${c1}`oNMMMMNo`${c2}-+ooooooo+.
8970        -+ooooooo/.${c1}`sMMs`${c2}./ooooooo+-
8971          :oooooooo/${c1}`..`${c2}/oooooooo:
8972          :oooooooo/`${c1}..${c2}`/oooooooo:
8973        -+ooooooo/.`${c1}sMMs${c2}`./ooooooo+-
8974      .+ooooooo+-`${c1}oNMMMMNo${c2}`-+ooooooo+.
8975    ./ooooooo+-${c1} +NMMMMMMMMN+ ${c2}-+ooooooo/.
8976  `/oooooooo:`${c1}:mMMMMMMMMMMMMm:${c2}`:oooooooo/`
8977`:oooooooo/`${c1}-hMMMMMMMyyMMMMMMMh-${c2}`/oooooooo:`
8978`-/+oo+/:`${c1}.yMMMMMMMh-  -hMMMMMMMy.${c2}`:/+oo+/-`
8979${c1}        `sMMMMMMMm:      :dMMMMMMMs`
8980       `hMMMMMMd/          /dMMMMMMh`
8981         `://:`              `://:`
8982EOF
8983        ;;
8984
8985        "Puppy"* | "Quirky Werewolf"* | "Precise Puppy"*)
8986            set_colors 4 7
8987            read -rd '' ascii_data <<'EOF'
8988${c1}           `-/osyyyysosyhhhhhyys+-
8989  -ohmNNmh+/hMMMMMMMMNNNNd+dMMMMNM+
8990 yMMMMNNmmddo/NMMMNNNNNNNNNo+NNNNNy
8991.NNNNNNmmmddds:MMNNNNNNNNNNNh:mNNN/
8992-NNNdyyyhdmmmd`dNNNNNmmmmNNmdd/os/
8993.Nm+shddyooo+/smNNNNmmmmNh.   :mmd.
8994 NNNNy:`   ./hmmmmmmmNNNN:     hNMh
8995 NMN-    -++- +NNNNNNNNNNm+..-sMMMM-
8996.MMo    oNNNNo hNNNNNNNNmhdNNNMMMMM+
8997.MMs    /NNNN/ dNmhs+:-`  yMMMMMMMM+
8998 mMM+     .. `sNN+.      hMMMMhhMMM-
8999 +MMMmo:...:sNMMMMMms:` hMMMMm.hMMy
9000  yMMMMMMMMMMMNdMMMMMM::/+o+//dMMd`
9001   sMMMMMMMMMMN+:oyyo:sMMMNNMMMNy`
9002    :mMMMMMMMMMMMmddNMMMMMMMMmh/
9003      /dMMMMMMMMMMMMMMMMMMNdy/`
9004        .+hNMMMMMMMMMNmdhs/.
9005            .:/+ooo+/:-.
9006EOF
9007        ;;
9008
9009        "pureos_small"*)
9010            set_colors 2 7 7
9011            read -rd '' ascii_data <<'EOF'
9012${c1} _____________
9013|  _________  |
9014| |         | |
9015| |         | |
9016| |_________| |
9017|_____________|
9018EOF
9019        ;;
9020
9021        "PureOS"*)
9022            set_colors 2 7 7
9023            read -rd '' ascii_data <<'EOF'
9024${c1}dmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmd
9025dNm//////////////////////////////////mNd
9026dNd                                  dNd
9027dNd                                  dNd
9028dNd                                  dNd
9029dNd                                  dNd
9030dNd                                  dNd
9031dNd                                  dNd
9032dNd                                  dNd
9033dNd                                  dNd
9034dNm//////////////////////////////////mNd
9035dmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmd
9036EOF
9037        ;;
9038
9039        "Qubes"*)
9040            set_colors 4 5 7 6
9041            read -rd '' ascii_data <<'EOF'
9042${c1}               `..--..`
9043            `.----------.`
9044        `..----------------..`
9045     `.------------------------.``
9046 `..-------------....-------------..`
9047.::----------..``    ``..----------:+:
9048:////:----..`            `..---:/ossso
9049:///////:`                  `/osssssso
9050:///////:                    /ssssssso
9051:///////:                    /ssssssso
9052:///////:                    /ssssssso
9053:///////:                    /ssssssso
9054:///////:                    /ssssssso
9055:////////-`                .:sssssssso
9056:///////////-.`        `-/osssssssssso
9057`//////////////:-```.:+ssssssssssssso-
9058  .-://////////////sssssssssssssso/-`
9059     `.:///////////sssssssssssssso:.
9060         .-:///////ssssssssssssssssss/`
9061            `.:////ssss+/+ssssssssssss.
9062                `--//-    `-/osssso/.
9063EOF
9064        ;;
9065
9066        "Radix"*)
9067            set_colors 1 2
9068            read -rd '' ascii_data <<'EOF'
9069${c2}                .:oyhdmNo
9070             `/yhyoosdms`
9071            -o+/ohmmho-
9072           ..`.:/:-`
9073     `.--:::-.``${c1}
9074  .+ydNMMMMMMNmhs:`
9075`omMMMMMMMMMMMMMMNh-
9076oNMMMNmddhhyyhhhddmy.
9077mMMMMNmmddhhysoo+/:-`
9078yMMMMMMMMMMMMMMMMNNh.
9079-dmmmmmNNMMMMMMMMMMs`
9080 -+oossyhmMMMMMMMMd-
9081 `sNMMMMMMMMMMMMMm:
9082  `yMMMMMMNmdhhhh:
9083   `sNMMMMMNmmho.
9084    `+mMMMMMMMy.
9085      .yNMMMm+`
9086       `:yd+.
9087EOF
9088        ;;
9089
9090        "Raspbian_small"*)
9091            set_colors 2 1
9092            read -rd '' ascii_data <<'EOF'
9093${c1}   .~~.   .~~.
9094  '. \\ ' ' / .'
9095${c2}   .~ .~~~..~.
9096  : .~.'~'.~. :
9097 ~ (   ) (   ) ~
9098( : '~'.~.'~' : )
9099 ~ .~ (   ) ~. ~
9100  (  : '~' :  )
9101   '~ .~~~. ~'
9102       '~'
9103EOF
9104        ;;
9105
9106        "Raspbian"*)
9107            set_colors 2 1
9108            read -rd '' ascii_data <<'EOF'
9109${c1}  `.::///+:/-.        --///+//-:``
9110 `+oooooooooooo:   `+oooooooooooo:
9111  /oooo++//ooooo:  ooooo+//+ooooo.
9112  `+ooooooo:-:oo-  +o+::/ooooooo:
9113   `:oooooooo+``    `.oooooooo+-
9114     `:++ooo/.        :+ooo+/.`
9115        ${c2}...`  `.----.` ``..
9116     .::::-``:::::::::.`-:::-`
9117    -:::-`   .:::::::-`  `-:::-
9118   `::.  `.--.`  `` `.---.``.::`
9119       .::::::::`  -::::::::` `
9120 .::` .:::::::::- `::::::::::``::.
9121-:::` ::::::::::.  ::::::::::.`:::-
9122::::  -::::::::.   `-::::::::  ::::
9123-::-   .-:::-.``....``.-::-.   -::-
9124 .. ``       .::::::::.     `..`..
9125   -:::-`   -::::::::::`  .:::::`
9126   :::::::` -::::::::::` :::::::.
9127   .:::::::  -::::::::. ::::::::
9128    `-:::::`   ..--.`   ::::::.
9129      `...`  `...--..`  `...`
9130            .::::::::::
9131             `.-::::-`
9132EOF
9133        ;;
9134
9135        "Reborn OS"* | "Reborn"*)
9136            set_colors 2 2 8
9137            read -rd '' ascii_data <<'EOF'
9138${c3}
9139        mMMMMMMMMM  MMMMMMMMMm
9140       NM                    MN
9141      MM  ${c1}dddddddd  dddddddd  ${c3}MN
9142     mM  ${c1}dd                dd  ${c3}MM
9143        ${c1}dd  hhhhhh   hhhhh  dd
9144   ${c3}mM      ${c1}hh            hh      ${c3}Mm
9145  NM  ${c1}hd       ${c3}mMMMMMMd       ${c1}dh  ${c3}MN
9146 NM  ${c1}dd  hh   ${c3}mMMMMMMMMm   ${c1}hh  dd  ${c3}MN
9147NM  ${c1}dd  hh   ${c3}mMMMMMMMMMMm   ${c1}hh  dd  ${c3}MN
9148 NM  ${c1}dd  hh   ${c3}mMMMMMMMMm   ${c1}hh  dd  ${c3}MN
9149  NM  ${c1}hd       ${c3}mMMMMMMm       ${c1}dh  ${c3}MN
9150   mM      ${c1}hh            hh      ${c3}Mm
9151        ${c1}dd  hhhhhh  hhhhhh  dd
9152     ${c3}MM  ${c1}dd                dd  ${c3}MM
9153      MM  ${c1}dddddddd  dddddddd  ${c3}MN
9154       NM                    MN
9155        mMMMMMMMMM  MMMMMMMMMm
9156EOF
9157        ;;
9158
9159        "Red Star"* | "Redstar"*)
9160            set_colors 1 7 3
9161            read -rd '' ascii_data <<'EOF'
9162${c1}                    ..
9163                  .oK0l
9164                 :0KKKKd.
9165               .xKO0KKKKd
9166              ,Od' .d0000l
9167             .c;.   .'''...           ..'.
9168.,:cloddxxxkkkkOOOOkkkkkkkkxxxxxxxxxkkkx:
9169;kOOOOOOOkxOkc'...',;;;;,,,'',;;:cllc:,.
9170 .okkkkd,.lko  .......',;:cllc:;,,'''''.
9171   .cdo. :xd' cd:.  ..';'',,,'',,;;;,'.
9172      . .ddl.;doooc'..;oc;'..';::;,'.
9173        coo;.oooolllllllcccc:'.  .
9174       .ool''lllllccccccc:::::;.
9175       ;lll. .':cccc:::::::;;;;'
9176       :lcc:'',..';::::;;;;;;;,,.
9177       :cccc::::;...';;;;;,,,,,,.
9178       ,::::::;;;,'.  ..',,,,'''.
9179        ........          ......
9180EOF
9181        ;;
9182
9183        "Redcore"*)
9184            set_colors 1
9185            read -rd '' ascii_data <<'EOF'
9186${c1}                 RRRRRRRRR
9187               RRRRRRRRRRRRR
9188        RRRRRRRRRR      RRRRR
9189   RRRRRRRRRRRRRRRRRRRRRRRRRRR
9190 RRRRRRR  RRR         RRR RRRRRRRR
9191RRRRR    RR                 RRRRRRRRR
9192RRRR    RR     RRRRRRRR      RR RRRRRR
9193RRRR   R    RRRRRRRRRRRRRR   RR   RRRRR
9194RRRR   R  RRRRRRRRRRRRRRRRRR  R   RRRRR
9195RRRR     RRRRRRRRRRRRRRRRRRR  R   RRRR
9196 RRR     RRRRRRRRRRRRRRRRRRRR R   RRRR
9197  RRR    RRRRRRRRRRRRRRRRRRRR    RRRR
9198    RR   RRRRRRRRRRRRRRRRRRR    RRR
9199     RR   RRRRRRRRRRRRRRRRR    RRR
9200       RR   RRRRRRRRRRRRRR   RR
9201         R       RRRR      RR
9202EOF
9203        ;;
9204
9205        "redhat_old" | "rhel_old"*)
9206            set_colors 1 7 3
9207            read -rd '' ascii_data <<'EOF'
9208${c1}             `.-..........`
9209            `////////::.`-/.
9210            -: ....-////////.
9211            //:-::///////////`
9212     `--::: `-://////////////:
9213     //////-    ``.-:///////// .`
9214     `://////:-.`    :///////::///:`
9215       .-/////////:---/////////////:
9216          .-://////////////////////.
9217${c2}         yMN+`.-${c1}::///////////////-`
9218${c2}      .-`:NMMNMs`  `..-------..`
9219       MN+/mMMMMMhoooyysshsss
9220MMM    MMMMMMMMMMMMMMyyddMMM+
9221 MMMM   MMMMMMMMMMMMMNdyNMMh`     hyhMMM
9222  MMMMMMMMMMMMMMMMyoNNNMMM+.   MMMMMMMM
9223   MMNMMMNNMMMMMNM+ mhsMNyyyyMNMMMMsMM
9224EOF
9225        ;;
9226
9227        "Redhat"* | "Red Hat"* | "rhel"*)
9228            set_colors 1
9229            read -rd '' ascii_data <<'EOF'
9230${c1}           .MMM..:MMMMMMM
9231          MMMMMMMMMMMMMMMMMM
9232          MMMMMMMMMMMMMMMMMMMM.
9233         MMMMMMMMMMMMMMMMMMMMMM
9234        ,MMMMMMMMMMMMMMMMMMMMMM:
9235        MMMMMMMMMMMMMMMMMMMMMMMM
9236  .MMMM'  MMMMMMMMMMMMMMMMMMMMMM
9237 MMMMMM    `MMMMMMMMMMMMMMMMMMMM.
9238MMMMMMMM      MMMMMMMMMMMMMMMMMM .
9239MMMMMMMMM.       `MMMMMMMMMMMMM' MM.
9240MMMMMMMMMMM.                     MMMM
9241`MMMMMMMMMMMMM.                 ,MMMMM.
9242 `MMMMMMMMMMMMMMMMM.          ,MMMMMMMM.
9243    MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
9244      MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM:
9245         MMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
9246            `MMMMMMMMMMMMMMMMMMMMMMMM:
9247                ``MMMMMMMMMMMMMMMMM'
9248EOF
9249        ;;
9250
9251        "Refracted Devuan"* | "Refracted_Devuan"*)
9252            set_colors 8 7
9253            read -rd '' ascii_data <<'EOF'
9254${c2}                             A
9255                            VW
9256                           VVW\\
9257                         .yWWW\\
9258 ,;,,u,;yy;;v;uyyyyyyy  ,WWWWW^
9259    *WWWWWWWWWWWWWWWW/  $VWWWWw      ,
9260        ^*%WWWWWWVWWX  $WWWW**    ,yy
9261        ,    "**WWW/' **'   ,yy/WWW*`
9262       &WWWWwy    `*`  <,ywWW%VWWW*
9263     yWWWWWWWWWW*    .,   "**WW%W
9264   ,&WWWWWM*"`  ,y/  &WWWww   ^*
9265  XWWX*^   ,yWWWW09 .WWWWWWWWwy,
9266 *`        &WWWWWM  WWWWWWWWWWWWWww,
9267           (WWWWW` /#####WWW***********
9268           ^WWWW
9269            VWW
9270            Wh.
9271            V/
9272EOF
9273        ;;
9274
9275        "Regata"*)
9276            set_colors 7 1 4 5 3 2
9277            read -rd '' ascii_data <<'EOF'
9278${c1}            ddhso+++++osydd
9279        dho/.`hh${c2}.:/+/:.${c1}hhh`:+yd
9280      do-hhhhhh${c2}/sssssss+`${c1}hhhhh./yd
9281    h/`hhhhhhh${c2}-sssssssss:${c1}hhhhhhhh-yd
9282  do`hhhhhhhhh${c2}`ossssssso.${c1}hhhhhhhhhh/d
9283 d/hhhhhhhhhhhh${c2}`/ossso/.${c1}hhhhhhhhhhhh.h
9284 /hhhhhhhhhhhh${c3}`-/osyso/-`${c1}hhhhhhhhhhhh.h
9285shh${c4}-/ooo+-${c1}hhh${c3}:syyso+osyys/`${c1}hhh${c5}`+oo`${c1}hhh/
9286h${c4}`ohhhhhhho`${c3}+yyo.${c1}hhhhh${c3}.+yyo`${c5}.sssssss.${c1}h`h
9287s${c4}:hhhhhhhhho${c3}yys`${c1}hhhhhhh${c3}.oyy/${c5}ossssssso-${c1}hs
9288s${c4}.yhhhhhhhy/${c3}yys`${c1}hhhhhhh${c3}.oyy/${c5}ossssssso-${c1}hs
9289hh${c4}./syyys+.${c1} ${c3}+yy+.${c1}hhhhh${c3}.+yyo`${c5}.ossssso/${c1}h`h
9290shhh${c4}``.`${c1}hhh${c3}`/syyso++oyys/`${c1}hhh${c5}`+++-`${c1}hh:h
9291d/hhhhhhhhhhhh${c3}`-/osyso+-`${c1}hhhhhhhhhhhh.h
9292 d/hhhhhhhhhhhh${c6}`/ossso/.${c1}hhhhhhhhhhhh.h
9293  do`hhhhhhhhh${c6}`ossssssso.${c1}hhhhhhhhhh:h
9294    h/`hhhhhhh${c6}-sssssssss:${c1}hhhhhhhh-yd
9295      h+.hhhhhh${c6}+sssssss+${c1}hhhhhh`/yd
9296        dho:.hhh${c6}.:+++/.${c1}hhh`-+yd
9297            ddhso+++++osyhd
9298EOF
9299        ;;
9300
9301        "Regolith"*)
9302            set_colors 1
9303            read -rd '' ascii_data <<'EOF'
9304${c1}
9305                 ``....```
9306            `.:/++++++/::-.`
9307          -/+++++++:.`
9308        -++++++++:`
9309      `/++++++++-
9310     `/++++++++.                    -/+/
9311     /++++++++/             ``   .:+++:.
9312    -+++++++++/          ./++++:+++/-`
9313    :+++++++++/         `+++++++/-`
9314    :++++++++++`      .-/+++++++`
9315   `:++++++++++/``.-/++++:-:::-`      `
9316 `:+++++++++++++++++/:.`            ./`
9317:++/-:+++++++++/:-..              -/+.
9318+++++++++/::-...:/+++/-..````..-/+++.
9319`......``.::/+++++++++++++++++++++/.
9320         -/+++++++++++++++++++++/.
9321           .:/+++++++++++++++/-`
9322              `.-:://////:-.
9323EOF
9324        ;;
9325
9326        "Rosa"*)
9327            set_colors 4 7 1
9328            read -rd '' ascii_data <<'EOF'
9329${c1}           ROSAROSAROSAROSAR
9330        ROSA               AROS
9331      ROS   SAROSAROSAROSAR   AROS
9332    RO   ROSAROSAROSAROSAROSAR   RO
9333  ARO  AROSAROSAROSARO      AROS  ROS
9334 ARO  ROSAROS         OSAR   ROSA  ROS
9335 RO  AROSA   ROSAROSAROSA    ROSAR  RO
9336RO  ROSAR  ROSAROSAROSAR  R  ROSARO  RO
9337RO  ROSA  AROSAROSAROSA  AR  ROSARO  AR
9338RO AROS  ROSAROSAROSA   ROS  AROSARO AR
9339RO AROS  ROSAROSARO   ROSARO  ROSARO AR
9340RO  ROS  AROSAROS   ROSAROSA AROSAR  AR
9341RO  ROSA  ROS     ROSAROSAR  ROSARO  RO
9342 RO  ROS     AROSAROSAROSA  ROSARO  AR
9343 ARO  ROSA   ROSAROSAROS   AROSAR  ARO
9344  ARO  OROSA      R      ROSAROS  ROS
9345    RO   AROSAROS   AROSAROSAR   RO
9346     AROS   AROSAROSAROSARO   AROS
9347        ROSA               SARO
9348           ROSAROSAROSAROSAR
9349EOF
9350        ;;
9351
9352        "sabotage"*)
9353            set_colors 4 7 1
9354            read -rd '' ascii_data <<'EOF'
9355${c2} .|'''.|      |     '||''|.    ..|''||
9356 ||..  '     |||     ||   ||  .|'    ||
9357  ''|||.    |  ||    ||'''|.  ||      ||
9358.     '||  .''''|.   ||    || '|.     ||
9359|'....|'  .|.  .||. .||...|'   ''|...|'
9360
9361|''||''|     |      ..|'''.|  '||''''|
9362   ||       |||    .|'     '   ||  .
9363   ||      |  ||   ||    ....  ||''|
9364   ||     .''''|.  '|.    ||   ||
9365  .||.   .|.  .||.  ''|...'|  .||.....|
9366EOF
9367        ;;
9368
9369        "Sabayon"*)
9370            set_colors 4 7 1
9371            read -rd '' ascii_data <<'EOF'
9372${c1}            ...........
9373         ..             ..
9374      ..                   ..
9375    ..           ${c2}o           ${c1}..
9376  ..            ${c2}:W'            ${c1}..
9377 ..             ${c2}.d.             ${c1}..
9378:.             ${c2}.KNO              ${c1}.:
9379:.             ${c2}cNNN.             ${c1}.:
9380:              ${c2}dXXX,              ${c1}:
9381:   ${c2}.          dXXX,       .cd,   ${c1}:
9382:   ${c2}'kc ..     dKKK.    ,ll;:'    ${c1}:
9383:     ${c2}.xkkxc;..dkkkc',cxkkl       ${c1}:
9384:.     ${c2}.,cdddddddddddddo:.       ${c1}.:
9385 ..         ${c2}:lllllll:           ${c1}..
9386   ..         ${c2}',,,,,          ${c1}..
9387     ..                     ..
9388        ..               ..
9389          ...............
9390EOF
9391        ;;
9392
9393        "Sailfish"*)
9394            set_colors 4 5 7 6
9395            read -rd '' ascii_data <<'EOF'
9396${c1}                 _a@b
9397              _#b (b
9398            _@@   @_         _,
9399          _#^@ _#*^^*gg,aa@^^
9400          #- @@^  _a@^^
9401          @_  *g#b
9402          ^@_   ^@_
9403            ^@_   @
9404             @(b (b
9405            #b(b#^
9406          _@_#@^
9407       _a@a*^
9408   ,a@*^
9409EOF
9410        ;;
9411
9412        "SalentOS"*)
9413            set_colors 2 1 3 7
9414            read -rd '' ascii_data <<'EOF'
9415${c1}                 ``..``
9416        .-:+oshdNMMMMMMNdhyo+:-.`
9417  -oydmMMMMMMMMMMMMMMMMMMMMMMMMMMNdhs/
9418${c4} +hdddm${c1}NMMMMMMMMMMMMMMMMMMMMMMMMN${c4}mdddh+`
9419${c2}`MMMMMN${c4}mdddddm${c1}MMMMMMMMMMMM${c4}mdddddm${c3}NMMMMM-
9420${c2} mMMMMMMMMMMMN${c4}ddddhyyhhddd${c3}NMMMMMMMMMMMM`
9421${c2} dMMMMMMMMMMMMMMMMM${c4}oo${c3}MMMMMMMMMMMMMMMMMN`
9422${c2} yMMMMMMMMMMMMMMMMM${c4}hh${c3}MMMMMMMMMMMMMMMMMd
9423${c2} +MMMMMMMMMMMMMMMMM${c4}hh${c3}MMMMMMMMMMMMMMMMMy
9424${c2} :MMMMMMMMMMMMMMMMM${c4}hh${c3}MMMMMMMMMMMMMMMMMo
9425${c2} .MMMMMMMMMMMMMMMMM${c4}hh${c3}MMMMMMMMMMMMMMMMM/
9426${c2} `NMMMMMMMMMMMMMMMM${c4}hh${c3}MMMMMMMMMMMMMMMMM-
9427${c2}  mMMMMMMMMMMMMMMMM${c4}hh${c3}MMMMMMMMMMMMMMMMN`
9428${c2}  hMMMMMMMMMMMMMMMM${c4}hh${c3}MMMMMMMMMMMMMMMMm
9429${c2}  /MMMMMMMMMMMMMMMM${c4}hh${c3}MMMMMMMMMMMMMMMMy
9430${c2}   .+hMMMMMMMMMMMMM${c4}hh${c3}MMMMMMMMMMMMMms:
9431${c2}      `:smMMMMMMMMM${c4}hh${c3}MMMMMMMMMNh+.
9432${c2}          .+hMMMMMM${c4}hh${c3}MMMMMMdo:
9433${c2}             `:smMM${c4}yy${c3}MMNy/`
9434                 ${c2}.- ${c4}`${c3}:.
9435EOF
9436        ;;
9437
9438        "Scientific"*)
9439            set_colors 4 7 1
9440            read -rd '' ascii_data <<'EOF'
9441${c1}                 =/;;/-
9442                +:    //
9443               /;      /;
9444              -X        H.
9445.//;;;:;;-,   X=        :+   .-;:=;:;#;.
9446M-       ,=;;;#:,      ,:#;;:=,       ,@
9447:#           :#.=/++++/=.$=           #=
9448 ,#;         #/:+/;,,/++:+/         ;+.
9449   ,+/.    ,;@+,        ,#H;,    ,/+,
9450      ;+;;/= @.  ${c3}.H${c2}#${c3}#X   ${c1}-X :///+;
9451      ;+=;;;.@,  ${c2}.X${c3}M${c2}@$.  ${c1}=X.//;=#/.
9452   ,;:      :@#=        =$H:     .+#-
9453 ,#=         #;-///==///-//         =#,
9454;+           :#-;;;:;;;;-X-           +:
9455@-      .-;;;;M-        =M/;;;-.      -X
9456 :;;::;;-.    #-        :+    ,-;;-;:==
9457              ,X        H.
9458               ;/      #=
9459                //    +;
9460                 '////'
9461EOF
9462        ;;
9463
9464        "Septor"*)
9465            set_colors 4 7 4
9466            read -rd '' ascii_data <<'EOF'
9467${c1}ssssssssssssssssssssssssssssssssssssssss
9468ssssssssssssssssssssssssssssssssssssssss
9469ssssssssssssssssssssssssssssssssssssssss
9470ssssssssssssssssssssssssssssssssssssssss
9471ssssssssss${c2};okOOOOOOOOOOOOOOko;${c1}ssssssssss
9472sssssssss${c2}oNWWWWWWWWWWWWWWWWWWNo${c1}sssssssss
9473ssssssss${c2}:WWWWWWWWWWWWWWWWWWWWWW:${c1}ssssssss
9474ssssssss${c2}lWWWWWk${c1}ssssssssss${c2}lddddd:${c1}ssssssss
9475ssssssss${c2}cWWWWWNKKKKKKKKKKKKOx:${c1}ssssssssss
9476${c3}yy${c1}sssssss${c2}OWWWWWWWWWWWWWWWWWWWWx${c1}sssssss${c3}yy
9477yyyyyyyyyy${c2}:kKNNNNNNNNNNNNWWWWWW:${c3}yyyyyyyy
9478yyyyyyyy${c2}sccccc;${c3}yyyyyyyyyy${c2}kWWWWW:${c3}yyyyyyyy
9479yyyyyyyy${c2}:WWWWWWNNNNNNNNNNWWWWWW;${c3}yyyyyyyy
9480yyyyyyyy${c2}.dWWWWWWWWWWWWWWWWWWWNd${c3}yyyyyyyyy
9481yyyyyyyyyy${c2}sdO0KKKKKKKKKKKK0Od;${c3}yyyyyyyyyy
9482yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
9483yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
9484yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
9485yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
9486yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
9487EOF
9488        ;;
9489
9490        "Serene"*)
9491            set_colors 6 6
9492            read -rd '' ascii_data <<'EOF'
9493${c1}              __---''''''---__
9494          .                      .
9495        :                          :
9496      -                       _______----_-
9497     s               __----'''     __----
9498 __h_            _-'           _-'     h
9499 '-._''--.._    ;           _-'         y
9500  :  ''-._  '-._/        _-'             :
9501  y       ':_       _--''                y
9502  m    .--'' '-._.;'                     m
9503  m   :        :                         m
9504  y    '.._     '-__                     y
9505  :        '--._    '''----___           :
9506   y            '--._         ''-- _    y
9507    h                '--._          :  h
9508     s                  __';         vs
9509      -         __..--''             -
9510        :_..--''                   :
9511          .                     _ .
9512            `''---______---''-``
9513EOF
9514        ;;
9515
9516        "SharkLinux"*)
9517            set_colors 4 7
9518            read -rd '' ascii_data <<'EOF'
9519${c1}                              `:shd/
9520                          `:yNMMMMs
9521                       `-smMMMMMMN.
9522                     .+dNMMMMMMMMs
9523                   .smNNMMMMMMMMm`
9524                 .sNNNNNNNMMMMMM/
9525               `omNNNNNNNMMMMMMm
9526              /dNNNNNNNNMMMMMMM+
9527            .yNNNNNNNNNMMMMMMMN`
9528           +mNNNNNNNNNMMMMMMMMh
9529         .hNNNNNNNNNNMMMMMMMMMs
9530        +mMNNNNNNNNMMMMMMMMMMMs
9531      .hNMMNNNNMMMMMMMMMMMMMMMd
9532    .oNNNNNNNNNNMMMMMMMMMMMMMMMo
9533 `:+syyssoo++++ooooossssssssssso:
9534EOF
9535        ;;
9536
9537        "Siduction"*)
9538            set_colors 4 4
9539            read -rd '' ascii_data <<'EOF'
9540${c1}                _aass,
9541               jQh: =$w
9542               QWmwawQW
9543               )$QQQQ@(   ..
9544         _a_a.   ~??^  syDY?Sa,
9545       _mW>-<$c       jWmi  imm.
9546       ]QQwayQE       4QQmgwmQQ`
9547        ?WWQWP'       -9QQQQQ@'._aas,
9548 _a%is.        .adYYs,. -"?!` aQB*~^3$c
9549_Qh;.nm       .QWc. {QL      ]QQp;..vmQ/
9550"QQmmQ@       -QQQggmQP      ]QQWmggmQQ(
9551 -???"         "$WQQQY`  __,  ?QQQQQQW!
9552        _yZ!?q,   -   .yWY!!Sw, "???^
9553       .QQa_=qQ       mQm>..vmm
9554        $QQWQQP       $QQQgmQQ@
9555         "???"   _aa, -9WWQQWY`
9556               _mB>~)$a  -~~
9557               mQms_vmQ.
9558               ]WQQQQQP
9559                -?T??"
9560EOF
9561        ;;
9562
9563        "slackware_small"*)
9564            set_colors 4 7 1
9565            read -rd '' ascii_data <<'EOF'
9566${c1}   ________
9567  /  ______|
9568  | |______
9569  \\______  \\
9570   ______| |
9571| |________/
9572|____________
9573EOF
9574        ;;
9575
9576        "Slackware"*)
9577            set_colors 4 7 1
9578            read -rd '' ascii_data <<'EOF'
9579${c1}                  :::::::
9580            :::::::::::::::::::
9581         :::::::::::::::::::::::::
9582       ::::::::${c2}cllcccccllllllll${c1}::::::
9583    :::::::::${c2}lc               dc${c1}:::::::
9584   ::::::::${c2}cl   clllccllll    oc${c1}:::::::::
9585  :::::::::${c2}o   lc${c1}::::::::${c2}co   oc${c1}::::::::::
9586 ::::::::::${c2}o    cccclc${c1}:::::${c2}clcc${c1}::::::::::::
9587 :::::::::::${c2}lc        cclccclc${c1}:::::::::::::
9588::::::::::::::${c2}lcclcc          lc${c1}::::::::::::
9589::::::::::${c2}cclcc${c1}:::::${c2}lccclc     oc${c1}:::::::::::
9590::::::::::${c2}o    l${c1}::::::::::${c2}l    lc${c1}:::::::::::
9591 :::::${c2}cll${c1}:${c2}o     clcllcccll     o${c1}:::::::::::
9592 :::::${c2}occ${c1}:${c2}o                  clc${c1}:::::::::::
9593  ::::${c2}ocl${c1}:${c2}ccslclccclclccclclc${c1}:::::::::::::
9594   :::${c2}oclcccccccccccccllllllllllllll${c1}:::::
9595    ::${c2}lcc1lcccccccccccccccccccccccco${c1}::::
9596      ::::::::::::::::::::::::::::::::
9597        ::::::::::::::::::::::::::::
9598           ::::::::::::::::::::::
9599                ::::::::::::
9600EOF
9601        ;;
9602
9603        "SliTaz"*)
9604            set_colors 3 3
9605            read -rd '' ascii_data <<'EOF'
9606${c1}        @    @(               @
9607      @@   @@                  @    @/
9608     @@   @@                   @@   @@
9609    @@  %@@                     @@   @@
9610   @@  %@@@       @@@@@.       @@@@  @@
9611  @@@    @@@@    @@@@@@@    &@@@    @@@
9612   @@@@@@@ %@@@@@@@@@@@@ &@@@% @@@@@@@/
9613       ,@@@@@@@@@@@@@@@@@@@@@@@@@
9614  .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@/
9615@@@@@@.  @@@@@@@@@@@@@@@@@@@@@  /@@@@@@
9616@@    @@@@@  @@@@@@@@@@@@,  @@@@@   @@@
9617@@ @@@@.    @@@@@@@@@@@@@%    #@@@@ @@.
9618@@ ,@@      @@@@@@@@@@@@@      @@@  @@
9619@   @@.     @@@@@@@@@@@@@     @@@  *@
9620@    @@     @@@@@@@@@@@@      @@   @
9621      @      @@@@@@@@@.     #@
9622       @      ,@@@@@       @
9623EOF
9624        ;;
9625
9626        "SmartOS"*)
9627            set_colors 6 7
9628            read -rd '' ascii_data <<'EOF'
9629${c1}yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
9630yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
9631yyyys             oyyyyyyyyyyyyyyyy
9632yyyys  yyyyyyyyy  oyyyyyyyyyyyyyyyy
9633yyyys  yyyyyyyyy  oyyyyyyyyyyyyyyyy
9634yyyys  yyyyyyyyy  oyyyyyyyyyyyyyyyy
9635yyyys  yyyyyyyyy  oyyyyyyyyyyyyyyyy
9636yyyys  yyyyyyyyyyyyyyyyyyyyyyyyyyyy
9637yyyyy                         syyyy
9638yyyyyyyyyyyyyyyyyyyyyyyyyyyy  syyyy
9639yyyyyyyyyyyyyyyy  syyyyyyyyy  syyyy
9640yyyyyyyyyyyyyyyy  oyyyyyyyyy  syyyy
9641yyyyyyyyyyyyyyyy  oyyyyyyyyy  syyyy
9642yyyyyyyyyyyyyyyy  syyyyyyyyy  syyyy
9643yyyyyyyyyyyyyyyy              yyyyy
9644yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
9645yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
9646EOF
9647        ;;
9648
9649        "Solus"*)
9650            set_colors 4 7 1
9651            read -rd '' ascii_data <<'EOF'
9652${c2}            -```````````
9653          `-+/------------.`
9654       .---:mNo---------------.
9655     .-----yMMMy:---------------.
9656   `------oMMMMMm/----------------`
9657  .------/MMMMMMMN+----------------.
9658 .------/NMMMMMMMMm-+/--------------.
9659`------/NMMMMMMMMMN-:mh/-------------`
9660.-----/NMMMMMMMMMMM:-+MMd//oso/:-----.
9661-----/NMMMMMMMMMMMM+--mMMMh::smMmyo:--
9662----+NMMMMMMMMMMMMMo--yMMMMNo-:yMMMMd/.
9663.--oMMMMMMMMMMMMMMMy--yMMMMMMh:-yMMMy-`
9664`-sMMMMMMMMMMMMMMMMh--dMMMMMMMd:/Ny+y.
9665`-/+osyhhdmmNNMMMMMm-/MMMMMMMmh+/ohm+
9666  .------------:://+-/++++++${c1}oshddys:
9667   -hhhhyyyyyyyyyyyhhhhddddhysssso-
9668    `:ossssssyysssssssssssssssso:`
9669      `:+ssssssssssssssssssss+-
9670         `-/+ssssssssssso+/-`
9671              `.-----..`
9672EOF
9673        ;;
9674
9675        "Source Mage"* | "Source_Mage"*)
9676            set_colors 4 7 1
9677            read -rd '' ascii_data <<'EOF'
9678${c2}       :ymNMNho.
9679.+sdmNMMMMMMMMMMy`
9680.-::/yMMMMMMMMMMMm-
9681      sMMMMMMMMMMMm/
9682     /NMMMMMMMMMMMMMm:
9683    .MMMMMMMMMMMMMMMMM:
9684    `MMMMMMMMMMMMMMMMMN.
9685     NMMMMMMMMMMMMMMMMMd
9686     mMMMMMMMMMMMMMMMMMMo
9687     hhMMMMMMMMMMMMMMMMMM.
9688     .`/MMMMMMMMMMMMMMMMMs
9689        :mMMMMMMMMMMMMMMMN`
9690         `sMMMMMMMMMMMMMMM+
9691           /NMMMMMMMMMMMMMN`
9692             oMMMMMMMMMMMMM+
9693          ./sd.-hMMMMMMMMmmN`
9694      ./+oyyyh- `MMMMMMMMMmNh
9695                 sMMMMMMMMMmmo
9696                 `NMMMMMMMMMd:
9697                  -dMMMMMMMMMo
9698                    -shmNMMms.
9699EOF
9700        ;;
9701
9702        "Sparky"*)
9703            set_colors 1 7
9704            read -rd '' ascii_data <<'EOF'
9705${c1}
9706           .            `-:-`
9707          .o`       .-///-`
9708         `oo`    .:/++:.
9709         os+`  -/+++:` ``.........```
9710        /ys+`./+++/-.-::::::----......``
9711       `syyo`++o+--::::-::/+++/-``
9712       -yyy+.+o+`:/:-:sdmmmmmmmmdy+-`
9713::-`   :yyy/-oo.-+/`ymho++++++oyhdmdy/`
9714`/yy+-`.syyo`+o..o--h..osyhhddhs+//osyy/`
9715  -ydhs+-oyy/.+o.-: ` `  :/::+ydhy+```-os-
9716   .sdddy::syo--/:.     `.:dy+-ohhho    ./:
9717     :yddds/:+oo+//:-`- /+ +hy+.shhy:     ``
9718      `:ydmmdysooooooo-.ss`/yss--oyyo
9719        `./ossyyyyo+:-/oo:.osso- .oys
9720       ``..-------::////.-oooo/   :so
9721    `...----::::::::--.`/oooo:    .o:
9722           ```````     ++o+:`     `:`
9723                     ./+/-`        `
9724                   `-:-.
9725                   ``
9726EOF
9727        ;;
9728
9729        "Star"*)
9730            set_colors 7
9731            read -rd '' ascii_data <<'EOF'
9732${c1}                   ./
9733                  `yy-
9734                 `y.`y`
9735    ``           s-  .y            `
9736    +h//:..`    +/    /o    ``..:/so
9737     /o``.-::/:/+      o/://::-.`+o`
9738      :s`     `.        .`     `s/
9739       .y.                    .s-
9740        `y-                  :s`
9741      .-//.                  /+:.
9742   .:/:.                       .:/:.
9743-+o:.                             .:+:.
9744-///++///:::`              .-::::///+so-
9745       ``..o/              d-....```
9746           s.     `/.      d
9747           h    .+o-+o-    h.
9748           h  -o/`   `/o:  s:
9749          -s/o:`       `:o/+/
9750          /s-             -yo
9751EOF
9752        ;;
9753
9754        "SteamOS"*)
9755            set_colors 5 7
9756            read -rd '' ascii_data <<'EOF'
9757${c1}              .,,,,.
9758        .,'onNMMMMMNNnn',.
9759     .'oNMANKMMMMMMMMMMMNNn'.
9760   .'ANMMMMMMMXKNNWWWPFFWNNMNn.
9761  ;NNMMMMMMMMMMNWW'' ,.., 'WMMM,
9762 ;NMMMMV+##+VNWWW' .+;'':+, 'WMW,
9763,VNNWP+${c2}######${c1}+WW,  ${c2}+:    ${c1}:+, +MMM,
9764'${c2}+#############,   +.    ,+' ${c1}+NMMM
9765${c2}  '*#########*'     '*,,*' ${c1}.+NMMMM.
9766${c2}     `'*###*'          ,.,;###${c1}+WNM,
9767${c2}         .,;;,      .;##########${c1}+W
9768${c2},',.         ';  ,+##############'
9769 '###+. :,. .,; ,###############'
9770  '####.. `'' .,###############'
9771    '#####+++################'
9772      '*##################*'
9773         ''*##########*''
9774              ''''''
9775EOF
9776        ;;
9777
9778        "sunos_small" | "solaris_small")
9779            set_colors 3 7
9780            read -rd '' ascii_data <<'EOF'
9781${c1}       .   .;   .
9782   .   :;  ::  ;:   .
9783   .;. ..      .. .;.
9784..  ..             ..  ..
9785 .;,                 ,;.
9786EOF
9787        ;;
9788
9789        "SunOS" | "Solaris")
9790            set_colors 3 7
9791            read -rd '' ascii_data <<'EOF'
9792${c1}                 `-     `
9793          `--    `+-    .:
9794           .+:  `++:  -/+-     .
9795    `.::`  -++/``:::`./+/  `.-/.
9796      `++/-`.`          ` /++:`
9797  ``   ./:`                .: `..`.-
9798``./+/:-                     -+++:-
9799    -/+`                      :.
9800EOF
9801        ;;
9802
9803        "openSUSE Leap"* | "openSUSE_Leap"*)
9804            set_colors 2 7
9805            read -rd '' ascii_data <<'EOF'
9806${c2}                 `-++:`
9807               ./oooooo/-
9808            `:oooooooooooo:.
9809          -+oooooooooooooooo+-`
9810       ./oooooooooooooooooooooo/-
9811      :oooooooooooooooooooooooooo:
9812    `  `-+oooooooooooooooooooo/-   `
9813 `:oo/-   .:ooooooooooooooo+:`  `-+oo/.
9814`/oooooo:.   -/oooooooooo/.   ./oooooo/.
9815  `:+ooooo+-`  `:+oooo+-   `:oooooo+:`
9816     .:oooooo/.   .::`   -+oooooo/.
9817        -/oooooo:.    ./oooooo+-
9818          `:+ooooo+-:+oooooo:`
9819             ./oooooooooo/.
9820                -/oooo+:`
9821                  `:/.
9822EOF
9823        ;;
9824
9825        "t2"*)
9826            set_colors 7 4
9827            read -rd '' ascii_data <<'EOF'
9828${c2}
9829TTTTTTTTTT
9830    tt   ${c1}222${c2}
9831    tt  ${c1}2   2${c2}
9832    tt     ${c1}2${c2}
9833    tt    ${c1}2${c2}
9834    tt  ${c1}22222${c2}
9835EOF
9836        ;;
9837
9838        "openSUSE Tumbleweed"* | "openSUSE_Tumbleweed"*)
9839            set_colors 2 7
9840            read -rd '' ascii_data <<'EOF'
9841${c2}                                     ......
9842     .,cdxxxoc,.               .:kKMMMNWMMMNk:.
9843    cKMMN0OOOKWMMXo. ;        ;0MWk:.      .:OMMk.
9844  ;WMK;.       .lKMMNM,     :NMK,             .OMW;
9845 cMW;            'WMMMN   ,XMK,                 oMM'
9846.MMc               ..;l. xMN:                    KM0
9847'MM.                   'NMO                      oMM
9848.MM,                 .kMMl                       xMN
9849 KM0               .kMM0. .dl:,..               .WMd
9850 .XM0.           ,OMMK,    OMMMK.              .XMK
9851   oWMO:.    .;xNMMk,       NNNMKl.          .xWMx
9852     :ONMMNXMMMKx;          .  ,xNMWKkxllox0NMWk,
9853         .....                    .:dOOXXKOxl,
9854EOF
9855        ;;
9856
9857        "opensuse_small" | "suse_small"*)
9858            set_colors 2 7
9859            read -rd '' ascii_data <<'EOF'
9860${c1}  _______
9861__|   __ \\
9862     / .\\ \\
9863     \\__/ |
9864   _______|
9865   \\_______
9866__________/
9867EOF
9868        ;;
9869
9870        "openSUSE"* | "open SUSE"* | "SUSE"*)
9871            set_colors 2 7
9872            read -rd '' ascii_data <<'EOF'
9873${c2}           .;ldkO0000Okdl;.
9874       .;d00xl:^''''''^:ok00d;.
9875     .d00l'                'o00d.
9876   .d0Kd'${c1}  Okxol:;,.          ${c2}:O0d.
9877  .OK${c1}KKK0kOKKKKKKKKKKOxo:,      ${c2}lKO.
9878 ,0K${c1}KKKKKKKKKKKKKKK0P^${c2},,,${c1}^dx:${c2}    ;00,
9879.OK${c1}KKKKKKKKKKKKKKKk'${c2}.oOPPb.${c1}'0k.${c2}   cKO.
9880:KK${c1}KKKKKKKKKKKKKKK: ${c2}kKx..dd ${c1}lKd${c2}   'OK:
9881dKK${c1}KKKKKKKKKOx0KKKd ${c2}^0KKKO' ${c1}kKKc${c2}   dKd
9882dKK${c1}KKKKKKKKKK;.;oOKx,..${c2}^${c1}..;kKKK0.${c2}  dKd
9883:KK${c1}KKKKKKKKKK0o;...^cdxxOK0O/^^'  ${c2}.0K:
9884 kKK${c1}KKKKKKKKKKKKK0x;,,......,;od  ${c2}lKk
9885 '0K${c1}KKKKKKKKKKKKKKKKKKKK00KKOo^  ${c2}c00'
9886  'kK${c1}KKOxddxkOO00000Okxoc;''   ${c2}.dKk'
9887    l0Ko.                    .c00l'
9888     'l0Kk:.              .;xK0l'
9889        'lkK0xl:;,,,,;:ldO0kl'
9890            '^:ldxkkkkxdl:^'
9891EOF
9892        ;;
9893
9894        "SwagArch"*)
9895            set_colors 4 7 1
9896            read -rd '' ascii_data <<'EOF'
9897${c2}        .;ldkOKXXNNNNXXK0Oxoc,.
9898   ,lkXMMNK0OkkxkkOKWMMMMMMMMMM;
9899 'K0xo  ..,;:c:.     `'lKMMMMM0
9900     .lONMMMMMM'         `lNMk'
9901${c2}    ;WMMMMMMMMMO.              ${c1}....::...
9902${c2}    OMMMMMMMMMMMMKl.       ${c1}.,;;;;;ccccccc,
9903${c2}    `0MMMMMMMMMMMMMM0:         ${c1}.. .ccccccc.
9904${c2}      'kWMMMMMMMMMMMMMNo.   ${c1}.,:'  .ccccccc.
9905${c2}        `c0MMMMMMMMMMMMMN,${c1},:c;    :cccccc:
9906${c2} ckl.      `lXMMMMMMMMMX${c1}occcc:.. ;ccccccc.
9907${c2}dMMMMXd,     `OMMMMMMWk${c1}ccc;:''` ,ccccccc:
9908${c2}XMMMMMMMWKkxxOWMMMMMNo${c1}ccc;     .cccccccc.
9909${c2} `':ldxO0KXXXXXK0Okdo${c1}cccc.     :cccccccc.
9910                    :ccc:'     `cccccccc:,
9911                                   ''
9912EOF
9913        ;;
9914
9915        "Tails"*)
9916            set_colors 5 7
9917            read -rd '' ascii_data <<'EOF'
9918${c1}      ``
9919  ./yhNh
9920syy/Nshh         `:o/
9921N:dsNshh  █   `ohNMMd
9922N-/+Nshh      `yMMMMd
9923N-yhMshh       yMMMMd
9924N-s:hshh  █    yMMMMd so//.
9925N-oyNsyh       yMMMMd d  Mms.
9926N:hohhhd:.     yMMMMd  syMMM+
9927Nsyh+-..+y+-   yMMMMd   :mMM+
9928+hy-      -ss/`yMMMM     `+d+
9929  :sy/.     ./yNMMMMm      ``
9930    .+ys- `:+hNMMMMMMy/`
9931      `hNmmMMMMMMMMMMMMdo.
9932       dMMMMMMMMMMMMMMMMMNh:
9933       +hMMMMMMMMMMMMMMMMMmy.
9934         -oNMMMMMMMMMMmy+.`
9935           `:yNMMMds/.`
9936              .//`
9937EOF
9938        ;;
9939
9940        "Trisquel"*)
9941            set_colors 4 6
9942            read -rd '' ascii_data <<'EOF'
9943${c1}                         ▄▄▄▄▄▄
9944                      ▄█████████▄
9945      ▄▄▄▄▄▄         ████▀   ▀████
9946   ▄██████████▄     ████▀   ▄▄ ▀███
9947 ▄███▀▀   ▀▀████     ███▄   ▄█   ███
9948▄███   ▄▄▄   ████▄    ▀██████   ▄███
9949███   █▀▀██▄  █████▄     ▀▀   ▄████
9950▀███      ███  ███████▄▄  ▄▄██████
9951${c1} ▀███▄   ▄███  █████████████${c2}████▀
9952${c1}  ▀█████████    ███████${c2}███▀▀▀
9953    ▀▀███▀▀     ██████▀▀
9954               ██████▀   ▄▄▄▄
9955              █████▀   ████████
9956              █████   ███▀  ▀███
9957               ████▄   ██▄▄▄  ███
9958                █████▄   ▀▀  ▄██
9959                  ██████▄▄▄████
9960                     ▀▀█████▀▀
9961EOF
9962        ;;
9963
9964        "Ubuntu Cinnamon"* | "Ubuntu-Cinnamon"*)
9965            set_colors 1
9966            read -rd '' ascii_data <<'EOF'
9967${c1}            .-:/++oooo++/:-.
9968        `:/oooooooooooooooooo/-`
9969      -/oooooooooooooooooooo+ooo/-
9970    .+oooooooooooooooooo+/-`.ooooo+.
9971   :oooooooooooo+//:://++:. .ooooooo:
9972  /oooooooooo+o:`.----.``./+/oooooooo/
9973 /ooooooooo+. +ooooooooo+:``/ooooooooo/
9974.ooooooooo: .+ooooooooooooo- -ooooooooo.
9975/oooooo/o+ .ooooooo:`+oo+ooo- :oooooooo/
9976ooo+:. .o: :ooooo:` .+/. ./o+:/ooooooooo
9977oooo/-`.o: :ooo/` `/+.     ./.:ooooooooo
9978/oooooo+o+``++. `:+-          /oooooooo/
9979.ooooooooo/``  -+:`          :ooooooooo.
9980 /ooooooooo+--+/`          .+ooooooooo/
9981  /ooooooooooo+.`      `.:++:oooooooo/
9982   :oooooooooooooo++++oo+-` .ooooooo:
9983    .+ooooooooooooooooooo+:..ooooo+.
9984      -/oooooooooooooooooooooooo/-
9985        `-/oooooooooooooooooo/:`
9986            .-:/++oooo++/:-.
9987EOF
9988        ;;
9989
9990        "Ubuntu Budgie"* | "Ubuntu-Budgie"*)
9991            set_colors 4 7 1
9992            read -rd '' ascii_data <<'EOF'
9993${c2}           ./oydmMMMMMMmdyo/.
9994        :smMMMMMMMMMMMhs+:++yhs:
9995     `omMMMMMMMMMMMN+`        `odo`
9996    /NMMMMMMMMMMMMN-            `sN/
9997  `hMMMMmhhmMMMMMMh               sMh`
9998 .mMmo-     /yMMMMm`              `MMm.
9999 mN/       yMMMMMMMd-              MMMm
10000oN-        oMMMMMMMMMms+//+o+:    :MMMMo
10001m/          +NMMMMMMMMMMMMMMMMm. :NMMMMm
10002M`           .NMMMMMMMMMMMMMMMNodMMMMMMM
10003M-            sMMMMMMMMMMMMMMMMMMMMMMMMM
10004mm`           mMMMMMMMMMNdhhdNMMMMMMMMMm
10005oMm/        .dMMMMMMMMh:      :dMMMMMMMo
10006 mMMNyo/:/sdMMMMMMMMM+          sMMMMMm
10007 .mMMMMMMMMMMMMMMMMMs           `NMMMm.
10008  `hMMMMMMMMMMM.oo+.            `MMMh`
10009    /NMMMMMMMMMo                sMN/
10010     `omMMMMMMMMy.            :dmo`
10011        :smMMMMMMMh+-`   `.:ohs:
10012           ./oydmMMMMMMdhyo/.
10013EOF
10014        ;;
10015
10016        "Ubuntu-GNOME"*)
10017            set_colors 4 5 7 6
10018            read -rd '' ascii_data <<'EOF'
10019${c3}          ./o.
10020        .oooooooo
10021      .oooo```soooo
10022    .oooo`     `soooo
10023   .ooo`   ${c4}.o.${c3}   `\/ooo.
10024   :ooo   ${c4}:oooo.${c3}   `\/ooo.
10025    sooo    ${c4}`ooooo${c3}    \/oooo
10026     \/ooo    ${c4}`soooo${c3}    `ooooo
10027      `soooo    ${c4}`\/ooo${c3}    `soooo
10028${c4}./oo    ${c3}`\/ooo    ${c4}`/oooo.${c3}   `/ooo
10029${c4}`\/ooo.   ${c3}`/oooo.   ${c4}`/oooo.${c3}   ``
10030${c4}  `\/ooo.    ${c3}/oooo     ${c4}/ooo`
10031${c4}     `ooooo    ${c3}``    ${c4}.oooo
10032${c4}       `soooo.     .oooo`
10033         `\/oooooooooo`
10034            ``\/oo``
10035EOF
10036        ;;
10037
10038        "Ubuntu MATE"* | "Ubuntu-MATE"*)
10039            set_colors 2 7
10040            read -rd '' ascii_data <<'EOF'
10041${c1}           `:+shmNNMMNNmhs+:`
10042        .odMMMMMMMMMMMMMMMMMMdo.
10043      /dMMMMMMMMMMMMMMMmMMMMMMMMd/
10044    :mMMMMMMMMMMMMNNNNM/`/yNMMMMMMm:
10045  `yMMMMMMMMMms:..-::oM:    -omMMMMMy`
10046 `dMMMMMMMMy-.odNMMMMMM:    -odMMMMMMd`
10047 hMMMMMMMm-.hMMy/....+M:`/yNm+mMMMMMMMh
10048/MMMMNmMN-:NMy`-yNMMMMMmNyyMN:`dMMMMMMM/
10049hMMMMm -odMMh`sMMMMMMMMMMs sMN..MMMMMMMh
10050NMMMMm    `/yNMMMMMMMMMMMM: MM+ mMMMMMMN
10051NMMMMm    `/yNMMMMMMMMMMMM: MM+ mMMMMMMN
10052hMMMMm -odMMh sMMMMMMMMMMs oMN..MMMMMMMh
10053/MMMMNNMN-:NMy`-yNMMMMMNNsyMN:`dMMMMMMM/
10054 hMMMMMMMm-.hMMy/....+M:.+hNd+mMMMMMMMh
10055 `dMMMMMMMMy-.odNMMMMMM:    :smMMMMMMd`
10056   yMMMMMMMMMms/..-::oM:    .+dMMMMMy
10057    :mMMMMMMMMMMMMNNNNM: :smMMMMMMm:
10058      /dMMMMMMMMMMMMMMMdNMMMMMMMd/
10059        .odMMMMMMMMMMMMMMMMMMdo.
10060           `:+shmNNMMNNmhs+:`
10061EOF
10062        ;;
10063
10064        "ubuntu_old")
10065            set_colors 1 7 3
10066            read -rd '' ascii_data <<'EOF'
10067${c1}                         ./+o+-
10068${c2}                 yyyyy- ${c1}-yyyyyy+
10069${c2}              ${c2}://+//////${c1}-yyyyyyo
10070${c3}          .++ ${c2}.:/++++++/-${c1}.+sss/`
10071${c3}        .:++o:  ${c2}/++++++++/:--:/-
10072${c3}       o:+o+:++.${c2}`..```.-/oo+++++/
10073${c3}      .:+o:+o/.${c2}          `+sssoo+/
10074${c2} .++/+:${c3}+oo+o:`${c2}             /sssooo.
10075${c2}/+++//+:${c3}`oo+o${c2}               /::--:.
10076${c2}+/+o+++${c3}`o++o${c1}               ++////.
10077${c2} .++.o+${c3}++oo+:`${c1}             /dddhhh.
10078${c3}      .+.o+oo:.${c1}          `oddhhhh+
10079${c3}       +.++o+o`${c1}`-````.:ohdhhhhh+
10080${c3}        `:o+++ ${c1}`ohhhhhhhhyo++os:
10081${c3}          .o:${c1}`.syhhhhhhh/${c3}.oo++o`
10082${c1}              /osyyyyyyo${c3}++ooo+++/
10083${c1}                  ````` ${c3}+oo+++o:
10084${c3}                         `oo++.
10085EOF
10086        ;;
10087
10088        "Ubuntu Studio"* | "Ubuntu-Studio")
10089            set_colors 6 7
10090            read -rd '' ascii_data <<'EOF'
10091${c1}              ..-::::::-.`
10092         `.:+++++++++++${c2}ooo${c1}++:.`
10093       ./+++++++++++++${c2}sMMMNdyo${c1}+/.
10094     .++++++++++++++++${c2}oyhmMMMMms${c1}++.
10095   `/+++++++++${c2}osyhddddhys${c1}+${c2}osdMMMh${c1}++/`
10096  `+++++++++${c2}ydMMMMNNNMMMMNds${c1}+${c2}oyyo${c1}++++`
10097  +++++++++${c2}dMMNhso${c1}++++${c2}oydNMMmo${c1}++++++++`
10098 :+${c2}odmy${c1}+++${c2}ooysoohmNMMNmyoohMMNs${c1}+++++++:
10099 ++${c2}dMMm${c1}+${c2}oNMd${c1}++${c2}yMMMmhhmMMNs+yMMNo${c1}+++++++
10100`++${c2}NMMy${c1}+${c2}hMMd${c1}+${c2}oMMMs${c1}++++${c2}sMMN${c1}++${c2}NMMs${c1}+++++++.
10101`++${c2}NMMy${c1}+${c2}hMMd${c1}+${c2}oMMMo${c1}++++${c2}sMMN${c1}++${c2}mMMs${c1}+++++++.
10102 ++${c2}dMMd${c1}+${c2}oNMm${c1}++${c2}yMMNdhhdMMMs${c1}+y${c2}MMNo${c1}+++++++
10103 :+${c2}odmy${c1}++${c2}oo${c1}+${c2}ss${c1}+${c2}ohNMMMMmho${c1}+${c2}yMMMs${c1}+++++++:
10104  +++++++++${c2}hMMmhs+ooo+oshNMMms${c1}++++++++
10105  `++++++++${c2}oymMMMMNmmNMMMMmy+oys${c1}+++++`
10106   `/+++++++++${c2}oyhdmmmmdhso+sdMMMs${c1}++/
10107     ./+++++++++++++++${c2}oyhdNMMMms${c1}++.
10108       ./+++++++++++++${c2}hMMMNdyo${c1}+/.
10109         `.:+++++++++++${c2}sso${c1}++:.
10110              ..-::::::-..
10111EOF
10112        ;;
10113
10114        "ubuntu_small")
10115            set_colors 1 7 3
10116            read -rd '' ascii_data <<'EOF'
10117${c1}         _
10118     ---(_)
10119 _/  ---  \\
10120(_) |   |
10121  \\  --- _/
10122     ---(_)
10123EOF
10124        ;;
10125
10126        "Ubuntu"* | "i3buntu"*)
10127            set_colors 1 7 3
10128            read -rd '' ascii_data <<'EOF'
10129${c1}            .-/+oossssoo+/-.
10130        `:+ssssssssssssssssss+:`
10131      -+ssssssssssssssssssyyssss+-
10132    .ossssssssssssssssss${c2}dMMMNy${c1}sssso.
10133   /sssssssssss${c2}hdmmNNmmyNMMMMh${c1}ssssss/
10134  +sssssssss${c2}hm${c1}yd${c2}MMMMMMMNddddy${c1}ssssssss+
10135 /ssssssss${c2}hNMMM${c1}yh${c2}hyyyyhmNMMMNh${c1}ssssssss/
10136.ssssssss${c2}dMMMNh${c1}ssssssssss${c2}hNMMMd${c1}ssssssss.
10137+ssss${c2}hhhyNMMNy${c1}ssssssssssss${c2}yNMMMy${c1}sssssss+
10138oss${c2}yNMMMNyMMh${c1}ssssssssssssss${c2}hmmmh${c1}ssssssso
10139oss${c2}yNMMMNyMMh${c1}sssssssssssssshmmmh${c1}ssssssso
10140+ssss${c2}hhhyNMMNy${c1}ssssssssssss${c2}yNMMMy${c1}sssssss+
10141.ssssssss${c2}dMMMNh${c1}ssssssssss${c2}hNMMMd${c1}ssssssss.
10142 /ssssssss${c2}hNMMM${c1}yh${c2}hyyyyhdNMMMNh${c1}ssssssss/
10143  +sssssssss${c2}dm${c1}yd${c2}MMMMMMMMddddy${c1}ssssssss+
10144   /sssssssssss${c2}hdmNNNNmyNMMMMh${c1}ssssss/
10145    .ossssssssssssssssss${c2}dMMMNy${c1}sssso.
10146      -+sssssssssssssssss${c2}yyy${c1}ssss+-
10147        `:+ssssssssssssssssss+:`
10148            .-/+oossssoo+/-.
10149EOF
10150        ;;
10151
10152        "Venom"*)
10153            set_colors 8 4
10154            read -rd '' ascii_data <<'EOF'
10155${c1}   :::::::          :::::::
10156   mMMMMMMm        dMMMMMMm
10157   /MMMMMMMo      +MMMMMMM/
10158    yMMMMMMN      mMMMMMMy
10159     NMMMMMMs    oMMMMMMm
10160     +MMMMMMN:   NMMMMMM+
10161      hMMMMMMy  sMMMMMMy
10162      :NMMMMMM::NMMMMMN:
10163       oMMMMMMyyMMMMMM+
10164        dMMMMMMMMMMMMh
10165        /MMMMMMMMMMMN:
10166         sMMMMMMMMMMo
10167          mMMMMMMMMd
10168          +MMMMMMMN:
10169            ::::::
10170EOF
10171        ;;
10172
10173        "void_small")
10174            set_colors 2 8
10175            read -rd '' ascii_data <<'EOF'
10176${c1}    _______
10177 _ \\______ -
10178| \\  ___  \\ |
10179| | /   \ | |
10180| | \___/ | |
10181| \\______ \\_|
10182 -_______\\
10183EOF
10184        ;;
10185
10186        "Void"*)
10187            set_colors 2 8
10188            read -rd '' ascii_data <<'EOF'
10189${c1}                __.;=====;.__
10190            _.=+==++=++=+=+===;.
10191             -=+++=+===+=+=+++++=_
10192        .     -=:``     `--==+=++==.
10193       _vi,    `            --+=++++:
10194      .uvnvi.       _._       -==+==+.
10195     .vvnvnI`    .;==|==;.     :|=||=|.
10196${c2}+QmQQm${c1}pvvnv; ${c2}_yYsyQQWUUQQQm #QmQ#${c1}:${c2}QQQWUV$QQm.
10197${c2} -QQWQW${c1}pvvo${c2}wZ?.wQQQE${c1}==<${c2}QWWQ/QWQW.QQWW${c1}(: ${c2}jQWQE
10198${c2}  -$QQQQmmU'  jQQQ@${c1}+=<${c2}QWQQ)mQQQ.mQQQC${c1}+;${c2}jWQQ@'
10199${c2}   -$WQ8Y${c1}nI:   ${c2}QWQQwgQQWV${c1}`${c2}mWQQ.jQWQQgyyWW@!
10200${c1}     -1vvnvv.     `~+++`        ++|+++
10201      +vnvnnv,                 `-|===
10202       +vnvnvns.           .      :=-
10203        -Invnvvnsi..___..=sv=.     `
10204          +Invnvnvnnnnnnnnvvnn;.
10205            ~|Invnvnvvnvvvnnv}+`
10206               -~|{*l}*|~
10207EOF
10208        ;;
10209
10210        "Obarun"*)
10211            set_colors 6 6 7 1
10212            read -rd '' ascii_data <<'EOF'
10213${c1}                    ,;::::;
10214                ;cooolc;,
10215             ,coool;
10216           ,loool,
10217          loooo;
10218        :ooool
10219       cooooc            ,:ccc;
10220      looooc           :oooooool
10221     cooooo          ;oooooooooo,
10222    :ooooo;         :ooooooooooo
10223    oooooo          oooooooooooc
10224   :oooooo         :ooooooooool
10225   loooooo         ;oooooooool
10226   looooooc        .coooooooc
10227   cooooooo:           ,;co;
10228   ,ooooooool;       ,:loc
10229    cooooooooooooloooooc
10230     ;ooooooooooooool;
10231       ;looooooolc;
10232EOF
10233        ;;
10234
10235        *"[Windows 10]"*|*"on Windows 10"*|"Windows 8"*|\
10236        "Windows 10"* |"windows10"|"windows8")
10237            set_colors 6 7
10238            read -rd '' ascii_data <<'EOF'
10239${c1}                                ..,
10240                    ....,,:;+ccllll
10241      ...,,+:;  cllllllllllllllllll
10242,cclllllllllll  lllllllllllllllllll
10243llllllllllllll  lllllllllllllllllll
10244llllllllllllll  lllllllllllllllllll
10245llllllllllllll  lllllllllllllllllll
10246llllllllllllll  lllllllllllllllllll
10247llllllllllllll  lllllllllllllllllll
10248
10249llllllllllllll  lllllllllllllllllll
10250llllllllllllll  lllllllllllllllllll
10251llllllllllllll  lllllllllllllllllll
10252llllllllllllll  lllllllllllllllllll
10253llllllllllllll  lllllllllllllllllll
10254`'ccllllllllll  lllllllllllllllllll
10255       `' \\*::  :ccllllllllllllllll
10256                       ````''*::cll
10257                                 ``
10258EOF
10259        ;;
10260
10261        "Windows"*)
10262            set_colors 1 2 4 3
10263            read -rd '' ascii_data <<'EOF'
10264${c1}        ,.=:!!t3Z3z.,
10265       :tt:::tt333EE3
10266${c1}       Et:::ztt33EEEL${c2} @Ee.,      ..,
10267${c1}      ;tt:::tt333EE7${c2} ;EEEEEEttttt33#
10268${c1}     :Et:::zt333EEQ.${c2} $EEEEEttttt33QL
10269${c1}     it::::tt333EEF${c2} @EEEEEEttttt33F
10270${c1}    ;3=*^```"*4EEV${c2} :EEEEEEttttt33@.
10271${c3}    ,.=::::!t=., ${c1}`${c2} @EEEEEEtttz33QF
10272${c3}   ;::::::::zt33)${c2}   "4EEEtttji3P*
10273${c3}  :t::::::::tt33.${c4}:Z3z..${c2}  ``${c4} ,..g.
10274${c3}  i::::::::zt33F${c4} AEEEtttt::::ztF
10275${c3} ;:::::::::t33V${c4} ;EEEttttt::::t3
10276${c3} E::::::::zt33L${c4} @EEEtttt::::z3F
10277${c3}{3=*^```"*4E3)${c4} ;EEEtttt:::::tZ`
10278${c3}             `${c4} :EEEEtttt::::z7
10279                 "VEzjt:;;z>*`
10280EOF
10281        ;;
10282
10283        "Xubuntu"*)
10284            set_colors 4 7 1
10285            read -rd '' ascii_data <<'EOF'
10286${c1}           `-/osyhddddhyso/-`
10287        .+yddddddddddddddddddy+.
10288      :yddddddddddddddddddddddddy:
10289    -yddddddddddddddddddddhdddddddy-
10290   odddddddddddyshdddddddh`dddd+ydddo
10291 `yddddddhshdd-   ydddddd+`ddh.:dddddy`
10292 sddddddy   /d.   :dddddd-:dy`-ddddddds
10293:ddddddds    /+   .dddddd`yy`:ddddddddd:
10294sdddddddd`    .    .-:/+ssdyodddddddddds
10295ddddddddy                  `:ohddddddddd
10296dddddddd.                      +dddddddd
10297sddddddy                        ydddddds
10298:dddddd+                      .oddddddd:
10299 sdddddo                   ./ydddddddds
10300 `yddddd.              `:ohddddddddddy`
10301   oddddh/`      `.:+shdddddddddddddo
10302    -ydddddhyssyhdddddddddddddddddy-
10303      :yddddddddddddddddddddddddy:
10304        .+yddddddddddddddddddy+.
10305           `-/osyhddddhyso/-`
10306EOF
10307        ;;
10308                "IRIX"*)
10309                    set_colors 4 7
10310                    read -rd '' ascii_data <<'EOF'
10311${c1}           ./ohmNd/  +dNmho/-
10312     `:+ydNMMMMMMMM.-MMMMMMMMMdyo:.
10313   `hMMMMMMNhs/sMMM-:MMM+/shNMMMMMMh`
10314   -NMMMMMmo-` /MMM-/MMM- `-omMMMMMN.
10315 `.`-+hNMMMMMNhyMMM-/MMMshmMMMMMmy+...`
10316+mMNds:-:sdNMMMMMMMyyMMMMMMMNdo:.:sdMMm+
10317dMMMMMMmy+.-/ymNMMMMMMMMNmy/-.+hmMMMMMMd
10318oMMMMmMMMMNds:.+MMMmmMMN/.-odNMMMMmMMMM+
10319.MMMM-/ymMMMMMmNMMy..hMMNmMMMMMmy/-MMMM.
10320 hMMM/ `/dMMMMMMMN////NMMMMMMMd/. /MMMh
10321 /MMMdhmMMMmyyMMMMMMMMMMMMhymMMMmhdMMM:
10322 `mMMMMNho//sdMMMMM//NMMMMms//ohNMMMMd
10323  `/so/:+ymMMMNMMMM` mMMMMMMMmh+::+o/`
10324     `yNMMNho-yMMMM` NMMMm.+hNMMNh`
10325     -MMMMd:  oMMMM. NMMMh  :hMMMM-
10326      -yNMMMmooMMMM- NMMMyomMMMNy-
10327        .omMMMMMMMM-`NMMMMMMMmo.
10328          `:hMMMMMM. NMMMMMh/`
10329             .odNm+  /dNms.
10330EOF
10331                ;;
10332        "Zorin"*)
10333            set_colors 4 6
10334            read -rd '' ascii_data <<'EOF'
10335${c1}        `osssssssssssssssssssso`
10336       .osssssssssssssssssssssso.
10337      .+oooooooooooooooooooooooo+.
10338
10339
10340  `::::::::::::::::::::::.         .:`
10341 `+ssssssssssssssssss+:.`     `.:+ssso`
10342.ossssssssssssssso/.       `-+ossssssso.
10343ssssssssssssso/-`      `-/osssssssssssss
10344.ossssssso/-`      .-/ossssssssssssssso.
10345 `+sss+:.      `.:+ssssssssssssssssss+`
10346  `:.         .::::::::::::::::::::::`
10347
10348
10349      .+oooooooooooooooooooooooo+.
10350       -osssssssssssssssssssssso-
10351        `osssssssssssssssssssso`
10352EOF
10353        ;;
10354
10355        *)
10356            case $kernel_name in
10357                *"BSD")
10358                    set_colors 1 7 4 3 6
10359                    read -rd '' ascii_data <<'EOF'
10360${c1}             ,        ,
10361            /(        )`
10362            \ \___   / |
10363            /- _  `-/  '
10364           (${c2}/\/ \ ${c1}\   /\
10365           ${c2}/ /   | `    ${c1}\
10366           ${c3}O O   ${c2}) ${c1}/    |
10367           ${c2}`-^--'${c1}`<     '
10368          (_.)  _  )   /
10369           `.___/`    /
10370             `-----' /
10371${c4}<----.     __ / __   \
10372${c4}<----|====${c1}O)))${c4}==${c1}) \) /${c4}====|
10373<----'    ${c1}`--' `.__,' \
10374             |        |
10375              \       /       /\
10376         ${c5}______${c1}( (_  / \______/
10377       ${c5},'  ,-----'   |
10378       `--{__________)
10379EOF
10380                ;;
10381
10382                "Darwin")
10383                    set_colors 2 3 1 1 5 4
10384                    read -rd '' ascii_data <<'EOF'
10385${c1}                    'c.
10386                 ,xNMM.
10387               .OMMMMo
10388               OMMM0,
10389     .;loddo:' loolloddol;.
10390   cKMMMMMMMMMMNWMMMMMMMMMM0:
10391${c2} .KMMMMMMMMMMMMMMMMMMMMMMMWd.
10392 XMMMMMMMMMMMMMMMMMMMMMMMX.
10393${c3};MMMMMMMMMMMMMMMMMMMMMMMM:
10394:MMMMMMMMMMMMMMMMMMMMMMMM:
10395${c4}.MMMMMMMMMMMMMMMMMMMMMMMMX.
10396 kMMMMMMMMMMMMMMMMMMMMMMMMWd.
10397 ${c5}.XMMMMMMMMMMMMMMMMMMMMMMMMMMk
10398  .XMMMMMMMMMMMMMMMMMMMMMMMMK.
10399    ${c6}kMMMMMMMMMMMMMMMMMMMMMMd
10400     ;KMMMMMMMWXXWMMMMMMMk.
10401       .cooc,.    .,coo:.
10402EOF
10403                ;;
10404
10405                "GNU"*)
10406                    set_colors fg 7
10407                    read -rd '' ascii_data <<'EOF'
10408${c1}    _-`````-,           ,- '- .
10409  .'   .- - |          | - -.  `.
10410 /.'  /                     `.   \
10411:/   :      _...   ..._      ``   :
10412::   :     /._ .`:'_.._\.    ||   :
10413::    `._ ./  ,`  :    \ . _.''   .
10414`:.      /   |  -.  \-. \\_      /
10415  \:._ _/  .'   .@)  \@) ` `\ ,.'
10416     _/,--'       .- .\,-.`--`.
10417       ,'/''     (( \ `  )
10418        /'/'  \    `-'  (
10419         '/''  `._,-----'
10420          ''/'    .,---'
10421           ''/'      ;:
10422             ''/''  ''/
10423               ''/''/''
10424                 '/'/'
10425                  `;
10426EOF
10427                ;;
10428
10429                "Linux")
10430                    set_colors fg 8 3
10431                    read -rd '' ascii_data <<'EOF'
10432${c2}        #####
10433${c2}       #######
10434${c2}       ##${c1}O${c2}#${c1}O${c2}##
10435${c2}       #${c3}#####${c2}#
10436${c2}     ##${c1}##${c3}###${c1}##${c2}##
10437${c2}    #${c1}##########${c2}##
10438${c2}   #${c1}############${c2}##
10439${c2}   #${c1}############${c2}###
10440${c3}  ##${c2}#${c1}###########${c2}##${c3}#
10441${c3}######${c2}#${c1}#######${c2}#${c3}######
10442${c3}#######${c2}#${c1}#####${c2}#${c3}#######
10443${c3}  #####${c2}#######${c3}#####
10444EOF
10445                ;;
10446        "Profelis SambaBOX"* | "SambaBOX"*)
10447            set_colors 3 6
10448            read -rd '' ascii_data <<'EOF'
10449${c1}
10450                    #
10451               *////#####
10452           /////////#########(
10453      .((((((/////    ,####(#(((((
10454  /#######(((*             (#(((((((((.
10455//((#(#(#,        ((##(        ,((((((//
10456//////        #(##########(       //////
10457//////    ((#(#(#(#(##########(/////////
10458/////(    (((((((#########(##((((((/////
10459/(((#(                             ((((/
10460####(#                             ((###
10461#########(((/////////(((((((((,    (#(#(
10462########(   /////////(((((((*      #####
10463####///,        *////(((         (((((((
10464.///////////                .//(((((((((
10465     ///////////,       *(/////((((*
10466         ,/(((((((((##########/.
10467             .((((((#######
10468                  ((##*
10469EOF
10470        ;;
10471
10472                "SunOS")
10473                    set_colors 3 7
10474                    read -rd '' ascii_data <<'EOF'
10475${c1}                 `-     `
10476          `--    `+-    .:
10477           .+:  `++:  -/+-     .
10478    `.::`  -++/``:::`./+/  `.-/.
10479      `++/-`.`          ` /++:`
10480  ``   ./:`                .: `..`.-
10481``./+/:-                     -+++:-
10482    -/+`                      :.
10483EOF
10484                ;;
10485
10486                "IRIX"*)
10487                    set_colors 4 7
10488                    read -rd '' ascii_data <<'EOF'
10489${c1}           ./ohmNd/  +dNmho/-
10490     `:+ydNMMMMMMMM.-MMMMMMMMMdyo:.
10491   `hMMMMMMNhs/sMMM-:MMM+/shNMMMMMMh`
10492   -NMMMMMmo-` /MMM-/MMM- `-omMMMMMN.
10493 `.`-+hNMMMMMNhyMMM-/MMMshmMMMMMmy+...`
10494+mMNds:-:sdNMMMMMMMyyMMMMMMMNdo:.:sdMMm+
10495dMMMMMMmy+.-/ymNMMMMMMMMNmy/-.+hmMMMMMMd
10496oMMMMmMMMMNds:.+MMMmmMMN/.-odNMMMMmMMMM+
10497.MMMM-/ymMMMMMmNMMy..hMMNmMMMMMmy/-MMMM.
10498 hMMM/ `/dMMMMMMMN////NMMMMMMMd/. /MMMh
10499 /MMMdhmMMMmyyMMMMMMMMMMMMhymMMMmhdMMM:
10500 `mMMMMNho//sdMMMMM//NMMMMms//ohNMMMMd
10501  `/so/:+ymMMMNMMMM` mMMMMMMMmh+::+o/`
10502     `yNMMNho-yMMMM` NMMMm.+hNMMNh`
10503     -MMMMd:  oMMMM. NMMMh  :hMMMM-
10504      -yNMMMmooMMMM- NMMMyomMMMNy-
10505        .omMMMMMMMM-`NMMMMMMMmo.
10506          `:hMMMMMM. NMMMMMh/`
10507             .odNm+  /dNms.
10508EOF
10509                ;;
10510
10511            esac
10512        ;;
10513    esac
10514
10515    # Overwrite distro colors if '$ascii_colors' doesn't
10516    # equal 'distro'.
10517    [[ ${ascii_colors[0]} != distro ]] && {
10518        color_text=off
10519        set_colors "${ascii_colors[@]}"
10520    }
10521}
10522
10523main() {
10524    cache_uname
10525    get_os
10526
10527    # Load default config.
10528    eval "$config"
10529
10530    get_args "$@"
10531    [[ $verbose != on ]] && exec 2>/dev/null
10532    get_simple "$@"
10533    get_distro
10534    get_bold
10535    get_distro_ascii
10536    [[ $stdout == on ]] && stdout
10537
10538    # Minix doesn't support these sequences.
10539    [[ $TERM != minix && $stdout != on ]] && {
10540        # If the script exits for any reason, unhide the cursor.
10541        trap 'printf "\e[?25h\e[?7h"' EXIT
10542
10543        # Hide the cursor and disable line wrap.
10544        printf '\e[?25l\e[?7l'
10545    }
10546
10547    image_backend
10548    get_cache_dir
10549    old_functions
10550    print_info
10551    dynamic_prompt
10552
10553    # w3m-img: Draw the image a second time to fix
10554    # rendering issues in specific terminal emulators.
10555    [[ $image_backend == *w3m* ]] && display_image
10556
10557    # Add neofetch info to verbose output.
10558    err "Neofetch command: $0 $*"
10559    err "Neofetch version: $version"
10560
10561    [[ $verbose == on ]] && printf %b "$err" >&2
10562
10563    # If `--loop` was used, constantly redraw the image.
10564    while [[ $image_loop == on && $image_backend == w3m ]]; do
10565        display_image
10566        sleep 1
10567    done
10568
10569    return 0
10570}
10571
10572main "$@"
10573