diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index d1120c08..e51b6bbd 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -2,8 +2,6 @@ If you're suggesting a new feature then just a description will suffice. -- [ ] Does this issue still occur in the master branch? (**Required if issue**) - #### Neofetch version diff --git a/.travis.yml b/.travis.yml index 60c4a730..aac1b2fc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,12 @@ before_install: script: - time ./neofetch --travis -v - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then shellcheck -e SC2244 -e SC2243 neofetch; fi + # See this wiki page for why we're disabling these errors. + # https://github.com/dylanaraps/neofetch/wiki/Shellcheck-Exclusions + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then shellcheck neofetch -e SC1090,SC2009,SC2012,SC2016,SC2034,SC2128,SC2153,SC2154,SC2178,SC2010,SC1004,SC1091,SC1117; fi + # The if statement is here to invert the exit code from grep. + # grep normally errors if no match is found but we want the opposite. + # We invert it so grep fails if a match is found. # Check for lines longer than 100 chars. - - if grep '.\{102\}' neofetch; then (exit 1); else (exit 0); fi + # There are 3 lines that must be longer than 100 chars. + - if (("$(grep '.\{101\}' neofetch | wc -l)" > 3)); then (exit 1); else (exit 0); fi diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..bf1f16f8 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,2744 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +**Contributors** + +- [**@mstraube**](https://github.com/mstraube) +- [**@iandrewt**](https://github.com/iandrewt") + +**Operating System** + +- Added support for RedCore Linux. [**@mstraube**](https://github.com/mstraube) + +**General** + +- [output] Added `--json` to output the info in `json`. +- [cursor] Fixed prompt location issues after Neofetch is run. +- [macOS] Fixed neofetch launching XQuartz. +- [misc] Removed `uppercase()`. +- [misc] Removed all instances of `export`. + +**Ascii** + +- Fixed a bug causing Windows 7 ASCII art to not display. + +**Image** + +- Removed `catimg` support (*It didn’t allow us to specify height so we + couldn’t accurately place the cursor*). +- Fixed `tycat`, `sixel` and `kitty icat` image sizes. + +**Screenshot** + +- Removed screenshot functionality. +- Removed screenshot upload functionality. + +**Info** + +- [font] Fix iTerm2 checking for 2 extra profiles that don't exist. [**@iandrewt**](https://github.com/iandrewt") +- [gpu] Fixed ATI/AMD branding issue. +- [song] Fixed song detection on macOS. +- [song] Fixed song output on systems using `C` locale. + +## [4.0.2] - 2018-05-19 + +- [config] Fixed `/dev/stdin` error. +- [config] Added `--print_config` to display the default config file. +- [macOS] Fixed xquartz issue. + + +## [4.0.1] - 2018-05-18 + +### Note: This release is only required for those running `bash <3.3`. + +- [config] Fixed issue with default config in bash3. +- [packages] Simplified code. +- [term] Fixed macOS issue. +- [term] Fixed `tmux` issue. + + +## [4.0.0] - 2018-05-17 + +

logo

+ +This release bumps the version number up to `4.0.0` as it contains major +changes to how Neofetch is packaged and installed. + +The entirety of Neofetch is now contained within a single executable. +Everything has been in-lined. Installing Neofetch is now as easy as +downloading the script and running it. + +Those using distributions with an outdated Neofetch version in their repos +can now easily install the latest version themselves. + +Thanks to those who contributed this time around and thanks to those who +discussed proposed changes in the bug tracker and Discord. I appreciate +it. :+1: + + +## Discord + +Neofetch now has a Discord server. Come and join the discussion! + + + + +## Contributors + + +- [**@aidanharris**](https://github.com/aidanharris) +- [**@DanySpin97**](https://github.com/DanySpin97) +- [**@SolitudeSF**](https://github.com/SolitudeSF) +- [**@Kayant**](https://github.com/Kayant) +- [**@robertwolter**](https://github.com/robertwolter) +- [**@TsundereBug**](https://github.com/TsundereBug) +- [**@dawidd6**](https://github.com/dawidd6) +- [**@mstraube**](https://github.com/mstraube) +- [**@iandrewt**](https://github.com/iandrewt) +- [**@MindTooth**](https://github.com/MindTooth) + + +## Operating System + +- Added support for ArcoLinux. + + +## General + +- Neofetch is now a single executable. +- Simplified `--version` output. +- Fixed theme issues by setting `GIO_EXTRA_MODULES`. + + +## Images + +- Added `wal`/`pywal` support to get the current wallpaper. +- Added `kitty` image backend. [**@SolitudeSF**](https://github.com/SolitudeSF) +- Added `setroot` wallpaper support. [**@SolitudeSF**](https://github.com/SolitudeSF) + + +## Ascii + +- Updated Android ascii art to better work on non-unicode terminals. [**@TsundereBug**](https://github.com/TsundereBug) + + +## Info + +**Song** + +- Added support for VLC. [**@mstraube**](https://github.com/mstraube) +- Added support for Sayonara. [**@mstraube**](https://github.com/mstraube) +- Added album data to song output. [**@mstraube**](https://github.com/mstraube), [**@iandrewt**](https://github.com/iandrewt) +- Added `song_format` to change the display format of the data. + - Default: `%artist% - %album% - %title%`. + +**Title** + +- Fixed unexpected backslash being inserted on some systems. + +**CPU** + +- Added temperature support for Zen processors. [**@Kayant**](https://github.com/Kayant) + +**GPU** + +- Fixed duplicate Intel GPUs. + +**Terminal Font** + +- Added support for `st`. [**@aidanharris**](https://github.com/aidanharris) +- Added support for `qterminal`. [**@mstraube**](https://github.com/mstraube) +- Fixed `kitty` font bug. [**@MindTooth**](https://github.com/MindTooth) + +**Packages** + +- Fixed package count in Exherbo. [**@DanySpin97**](https://github.com/DanySpin97) + +**Desktop Environment** + +- Fixed Unity output in Ubuntu 18.04. [**@dawidd6**](https://github.com/dawidd6) + +**Window Manager** + +- Added support for detecting `dwm`. + + +## [3.4.0] - 2018-04-05 + +This release adds support for a large number of Linux distros as well as support for the latest macOS and iOS devices. This release also contains a large number of bug fixes and some minor features. + +I'm pretty sure that this release is the largest in terms of number of contributors. Thanks to everyone who contributed this release! + +## Contributors + +- [**@yslgirl**](https://github.com/yslgirl) +- [**@iandrewt**](https://github.com/iandrewt) +- [**@chrisweeksnz**](https://github.com/chrisweeksnz) +- [**@dawidd6**](https://github.com/dawidd6) +- [**@MitchWeaver**](https://github.com/MitchWeaver) +- [**@StarryTony**](https://github.com/StarryTony) +- [**@rage311**](https://github.com/rage311) +- [**@matoro**](https://github.com/matoro) +- [**@szfcbr**](https://github.com/szfcbr) +- [**@ArmstrongJ**](https://github.com/ArmstrongJ) +- [**@robertwolter**](https://github.com/robertwolter) +- [**@JadeMatrix**](https://github.com/JadeMatrix) +- [**@MindTooth**](https://github.com/MindTooth) +- [**@aidanharris**](https://github.com/aidanharris) +- [**@khoacao96**](https://github.com/khoacao96) + + +## OS + +- Added support for ArchMerge. +- Added support for MagpieOS. +- Added support for PostMarketOS. +- Added support for Hyperbola GNU/Linux-libre [**@mstraube**](https://github.com/mstraube) +- Added support for macOS High Sierra. [**@yslgirl**](https://github.com/yslgirl) +- Added support for Container Linux by CoreOS. [**@chrisweeksnz**](https://github.com/chrisweeksnz) +- Added support for 2017 iOS devices. [**@iandrewt**](https://github.com/iandrewt) +- Added support for LEDE. [**@dawidd6**](https://github.com/dawidd6) +- Added support for Pop!\_OS. [**@jliles**](https://github.com/jliles) +- Added support for Lunar Linux. +- Added support for 32-bit IRIX. [**@szfcbr**](https://github.com/szfcbr) +- Added support for FreeMINT. [**@ArmstrongJ**](https://github.com/ArmstrongJ) +- Added support for Anarchy Linux. [**@robertwolter**](https://github.com/robertwolter) +- Added support for Calculate Linux. [**@robertwolter**](https://github.com/robertwolter) +- Added support for NuTyX. [**@robertwolter**](https://github.com/robertwolter) +- Added support for openSUSE Tumbleweed. [**@robertwolter**](http://github.com/robertwolter) +- Fixed detection bug with Gentoo. +- Fixed detection bug with OpenWRT. [**@dawidd6**](https://github.com/dawidd6) +- Fixed detection bug with LEDE. [**@dawidd6**](https://github.com/dawidd6) +- Fixed detection bug with TrueOS. [**@dawidd6**](https://github.com/dawidd6) +- Fixed detection bug with Windows Subsystem for Linux and Crouton when an OS without lsb_release is installed. +- Fixed ChromeOS detection. + + +## General + +- Added more info to verbose mode for debugging. +- Fixed bug in prompt location calculation. +- Fixed prompt bug in OpenBSD. +- Fixed broken AppleScript blocks. [**@JadeMatrix**](https://github.com/JadeMatrix) +- Fixed function not working in bash 3. [**@JadeMatrix**](https://github.com/JadeMatrix) +- Swapped sequences from `\033` to `\e`. +- Fixed Pacman name conflict with the game. [**@MitchWeaver**](https://github.com/MitchWeaver) +- Removed the last `echo` in the script. +- Fixed typo. [**@khoacao96**](https://github.com/khoacao96) + + +## Ascii + +- Added color updates for Kubuntu logo. **Maulik Mistry** +- Added new DragonflyBSD logo. [**@MitchWeaver**](https://github.com/MitchWeaver) + + +## Images + +- [MacOS/iTerm2] Fixed thumbnail not appearing. [**@StarryTony**](https://github.com/StarryTony) +- Fixed bug with getting wallpaper from feh. +- Added `pixterm` backend. +- Don't force resolution in `catimg`. + +## Info + +**Desktop Environment** + +- Added GNOME version. +- Added support for TDE. + +**Window Manager** + +- Added support for most (*if not all*) current Wayland compositors/window manager's. +- Added support for some non-EWMH window managers. +- [macOS] Fixed `chunkwm` being detected as `Kwm`. [**@iandrewt**](https://github.com/iandrewt) + +**Window Manager Theme** + +- Fixed `sawfish` detection. +- [macOS] Now detects Light/Dark theme. [**@JadeMatrix**](https://github.com/JadeMatrix) + +**Install Date** + +- [macOS] Fixed Install Date. [**@iandrewt**](https://github.com/iandrewt) + +**Theme** + +- Fixed KDE font issue. [**@mstraube**](https://github.com/mstraube) + +**CPU** + +- [linux] Detect the correct temperature file to use. +- [windows] Removed `$temp` usage as it's an envar. +- [OpenBSD] Fixed CPU temperature that fails to appear in some systems. [**@rage311**](https://github.com/rage311) + +**GPU** + +- [linux] Added driver version to NVIDIA output. +- [linux] Added driver version to Intel output. +- [macOS] Added NVIDIA support. [**@iandrewt**](https://github.com/iandrewt) + +**Memory** + +- [OpenBSD] Fixed memory usage values. [**@rage311**](https://github.com/rage311) + +**Package Manager** + +- Added detection for Sabotage Linux's `butch` [**@MitchWeaver**](https://github.com/MitchWeaver) +- Changed `pacman` detection to fix issues in other distros. [**@MitchWeaver**](https://github.com/MitchWeaver) + +**Resolution** + +- [macOS] Fixed errors on non-retina screens. [**@iandrewt**](https://github.com/iandrewt) + +**Song** + +- Added option to manually specify the player to use. +- Added support for Elisa. [**@mstraube**](https://github.com/mstraube) +- macOS detection is now more reliable. [**@JadeMatrix**](https://github.com/JadeMatrix) + +**Model** + +- Remove more unneeded outputs. [**@konimex**](https://github.com/konimex) + +**Disk** + +- Update Haiku's detection. [**@dawidd6**](https://github.com/dawidd6) + +**Battery** + +- Fixed Windows detection. [**@matoro**](https://github.com/matoro) + +**Shell** + +- Added support for `tcsh`. [**@szfcbr**](https://github.com/szfcbr) + +**Terminal Font** + +- Added more paths for Alacritty. +- Added font support for Kitty. [**@MindTooth**](https://github.com/MindTooth) +- Fixed Kitty `font_size` regex. [**@aidanharris**](https://github.com/aidanharris) +- Added support for `XTerm.vt11.facename`. [**@aidanharris**](https://github.com/aidanharris) + + +## [3.3.0] - 2017-09-14 + +Thanks to everyone who contributed this release, I appreciate ya! + +## Contributors + +- **[@konimex](https://github.com/konimex)** +- **[@mstraube](https://github.com/mstraube)** +- **[@dominiklohmann](https://github.com/dominiklohmann)** +- **[@ybden](https://github.com/ybden)** +- **[@lexruee](https://github.com/lexruee)** +- **[@AMDmi3](https://github.com/AMDmi3)** +- **[@deadda7a](https://github.com/deadda7a)** +- **[@winneon](https://github.com/winneon)** +- **[@DamnWidget](https://github.com/DamnWidget)** + + +## General + +- Config file now has a `.conf` suffix. +- Neofetch now assumes target directories (config file and ASCII directory) at install time, this fixes problems with systems such as NixOS. +- `stdout` mode is now reimplemented. + - This mode prints the information in plain text. + - You can use it with `--stdout`. + - Example: https://gist.github.com/dylanaraps/151c205322cf3acae62661b76464a3f7 +- Fixed prompt location if color blocks are disabled. +- Make makefile more portable. **[@AMDmi3](https://github.com/AMDmi3)** + + +## Operating System + +- Added support for AryaLinux. **[@mstraube](https://github.com/mstraube)** +- Added support for Amazon Linux AMI. +- Added support for Artix Linux. **[@DamnWidget](https://github.com/DamnWidget)** +- Added support for Endless OS. +- Added support for Sabotage Linux. +- Added support for Siduction. **[@lexruee](https://github.com/lexruee)** +- Added support for Source Mage. +- Added support for Parsix GNU/Linux. **[@mstraube](https://github.com/mstraube)** +- Added support for Nurunner. **[@mstraube](https://github.com/mstraube)** +- Fixed Raspbian being detected as ChromeOS. + + +## Images + +- [w3m] Fixed w3m-img not found on NixOS. +- Added support for using all image types as input. + - Neofetch now supports `svg`, `tiff` etc. + + +## ASCII + +- Added small Debian. +- Added small FreeBSD. +- Added small macOS. +- Added small NixOS. + + +## Info + +**GPU Driver** + +- [Linux] Added a new info function (*off by default*) to display the GPU Driver currently in use. +- Add `info "GPU Driver" gpu_driver` to your config to use it. + +**CPU** + +- [Linux] Fixed inaccurate output on ARM SoC devices. +- [Linux] Fixed CPU speed not appearing on PowerPC systems. +- [NetBSD] Added support for CPU temperature. (NOTE: This only supports newer Intel processors) +- Fixed inaccurate speed output in systems with CPU speed less than 1 GHz. +- Deprecated `cpu_shorthand` in favor of `cpu_brand`. + +**GPU** + +- [Linux] Filter out duplicate entries. + +**Model** + +- Added support for QEMU/KVM. +- Renamed subtitle to `Host:`. + +**Uptime** + +- [AIX/IRIX] Fixed Neofetch crashing when calculating uptime. + +**Terminal** + +- [SSH] Fixed infinite loop if neofetch is run on non-interactive shells. + +**Terminal Font** + +- Added support for LXTerminal. **[@mstraube](https://github.com/mstraube)** +- Added support for GNUStep Terminal. **[@mstraube](https://github.com/mstraube)** +- Fixed Xfce4-terminal font output when system-wide font is used. **[@mstraube](https://github.com/mstraube)** +- Fixed MATE-Terminal issue. **[@mstraube](https://github.com/mstraube)** +- Fixed URxvt font detection failing if `.` is used. **[@winneon](https://github.com/winneon)** + +**Theme** + +- [Qt/KDE] Fixed inaccurate theme naming. **[@mstraube](https://github.com/mstraube)** +- [Qt/KDE] GTK theme is now shows as well. + +**Window Manager** + +- [macOS] Added support for `chunkwm`. **[@dominiklohmann](https://github.com/dominiklohmann)** +- Fix incorrect output when using WindowMaker. **[@mstraube](https://github.com/mstraube)** + +**Song** + +- Added support for Pogo. **[@mstraube](https://github.com/mstraube)** +- Fixed bug with players not being found. + +**Battery** + +- Added battery support for Thinkpads and other devices that use the `CMB` naming for batteries. **[@deadda7a](https://github.com/deadda7a)** + + +## Images + +- Fixed division by 0 error in XTerm. + +## Screenshot + +- Use `maim` over `scrot`. **[@ybden](https://github.com/ybden)** +- Fixed `scrot_cmd` arguments not being used. **[@winneon](https://github.com/winneon)** + + +## [3.2.0] - 2017-06-21 + +This release was long overdue and I apologise for the delay. I've been busy with study among other things. This update is smaller than usual but fixes some important bugs. + + +Thanks once again to everyone that contributed! + + +## Contributors + +- **[@MatthewCox](https://github.com/MatthewCox)** +- **[@dawidd6](https://github.com/dawidd6)** +- **[@erikdubois](https://github.com/erikdubois)** +- **[@konimex](https://github.com/konimex)** +- **[@mstraube](https://github.com/mstraube)** +- **[@Artoriuz](https://github.com/Artoriuz)** +- **[@WilsonRU](https://github.com/WilsonRU)** +- **[@Takeya-Yuki](https://github.com/Takeya-Yuki)** +- **[@iandrewt](https://github.com/iandrewt)** +- **[@LER0ever](https://github.com/LER0ever)** + + +## Operating System + +- Added support for IRIX. +- Added support for Arch XFerience. **[@mstraube](https://github.com/mstraube)** +- Added support for CloverOS. +- Added support for Maui. **[@mstraube](https://github.com/mstraube)** +- Added support for KS Linux. **[@Takeya-Yuki](https://github.com/Takeya-Yuki)** + + +## General + +- Minimum required BASH version is now 3.2. + - (Neofetch has always used 3.2+ features, I've just made it obvious now in the documentation.) +- Fixed config file not being created on first install. + + +## Images + +- [w3m] Added `--loop` flag which makes Neofetch draw the image once per second. + - This is a workaround to the images disappearing on resize and workspace switch. + - Use Ctrl+C to exit. +- [w3m] Fixed w3m-img not found on FreeBSD 12. **[@Artoriuz](https://github.com/Artoriuz)** + + +## Ascii + +- Added Ubuntu-MATE ascii art. +- Fixed ArchLabs ascii art. **[@erikdubois](https://github.com/erikdubois)** +- Updated GoboLinux ascii art. **[@WilsonRU](https://github.com/WilsonRU)** +- Fixed `--ascii_distro windows10` not working. + + +## Info + +**Distro** + +- [Solaris, AIX, Haiku] The machine architecture will now be shown properly instead of machine ID. + +**Terminal Emulator** + +- Added support for Neovim terminal emulator. **[@LER0ever](https://github.com/LER0ever)** +- Added font support for mate-terminal. **[@mstraube](https://github.com/mstraube)** +- [Termite] Fix font mismatch. **[@MatthewCox](https://github.com/MatthewCox)** +- Use `$SSH_TTY` for terminal detection if machine is connected via SSH. +- Break from loop if PPID can't be accessed/not found. + +**GPU** + +- [Linux] Fixed GPU sort. + +**Song** + +- Do not detect ibus\* or indicator\* as player. **[@dawidd6](https://github.com/dawidd6)** + +**Model** + +- Specify when running on a Hackintosh. **[@LER0ever](https://github.com/LER0ever)** + + +**Memory** + +- [FreeBSD]: Fix inaccurate free memory calculation. + + +## [3.1.0] - 2017-04-25 + +Hi, It's been quite a while since the last release. I've been extremely busy with university and I finally found some time to flag a new release. (I've been meaning to do this for a few weeks now) + +Though I haven't worked on Neofetch as much as I'd have liked, most of the changes this time round come from some familiar faces as well as some new contributors! Thanks to everyone for contributing, I appreciate it. + + +## Contributors + +- **[@konimex](https://github.com/konimex)** +- **[@mstraube](https://github.com/mstraube)** +- **[@jorgegonzalez](https://github.com/jorgegonzalez)** +- **[@ikeydoherty](https://github.com/ikeydoherty)** +- **[@eliezio](https://github.com/eliezio)** +- **[@nilesr](https://github.com/nilesr)** +- **[@dritter](https://github.com/dritter)** +- **[@HebaruSan](https://github.com/HebaruSan)** +- **[@LER0ever](https://github.com/LER0ever)** +- **[@obrevenge](https://github.com/obrevenge)** +- **[@ajjames31](https://github.com/ajjames31)** +- Eliezio Oliveira + + +## Operating System + +- Added Chrome OS Crouton support. **[@LER0ever](https://github.com/LER0ever)** +- Added support for SliTaz. **[@nilesr](https://github.com/nilesr)** +- Added support for Nitrux. **[@mstraube](https://github.com/mstraube)** +- Added support for DesaOS. +- Added support for MinGW. +- Added support for OBRevenge. **[@obrevenge](https://github.com/obrevenge)** +- Added support for ArchLabs. **[@obrevenge](https://github.com/obrevenge)** + + +## Screenshot + +The screenshot feature no longer requires any configuration before working. We no longer hardcode `${HOME}/Pictures/neofetch` as the screenshot location. Here's how the `-s` and `-su` flags now function: + +- `neofetch -s` will save a file in the current directory named: `neofetch-$(date +%F-%I-%M-%S-${RANDOM}).png` +- `neofetch -s test.png` will save a file in the current directory called `test.png` +- `neofetch -s ~/` will save a file in `~` called `neofetch-$(date +%F-%I-%M-%S-${RANDOM}).png` +- `neofetch -s ~/test.png` will save a file in `~` called `test.png`. + + +## ASCII + +- Arch ASCII art now uses lighter colors. +- Fixed Ubuntu-Studio ASCII setting. **[@@HebaruSan](https://github.com/HebaruSan)** +- Updated Parabola logo. **[@mstraube](https://github.com/mstraube)** +- Updated Raspbian ASCII art. + + +## Images + +- Added `libsixel` backend. +- Added `termpix` backend. +- Only use a zero width space in the `w3m` backend. +- Fixed bug causing terminal size to not be found. +- [iTerm2] Fixed images not appearing inside `tmux`. + + +## Info + +**Locale** + +- Added a new function to display system locale. (Disabled by default) + +**CPU** + +- Added option to show decimals in CPU speed. + +**Terminal Font** + +- Added \*experimental\* font detection for iTerm2. **[@dritter](https://github.com/dritter)** + +**Window Manager** + +- [MacOS] Added support for Kwm. **[@jorgegonzalez](https://github.com/jorgegonzalez)** +- [MacOS] Added support for Spectacle. **[@jorgegonzalez](https://github.com/jorgegonzalez)** +- [MacOS] Added support for Amethyst. **[@jorgegonzalez](https://github.com/jorgegonzalez)** + +**Battery** + +- Added battery support for Bay Trail devices. **[@mstraube](https://github.com/mstraube)** + +**Disk** + +- Added new option to only show dir name in subtitle. + +**Song** + +- Added support for Deepin Music. **[@mstraube](https://github.com/mstraube)** +- Added support for Tomahawk. **[@mstraube](https://github.com/mstraube)** +- Fixed Audacious song output when `dbus-send` fails. **[@mstraube](https://github.com/mstraube)** + +**Local IP** + +- [Linux] Fixed UID showing instead of Local IP on several versions/configs of iproute2. + +**Packages** + +- [eopkg] Use a faster detection method. **[@ikeydoherty](https://github.com/ikeydoherty)** + +**Resolution** + +- [macOS] Fixed `screenresolution` not appearing at all on newer versions. **[@eliezio](https://github.com/eliezio)** +- [Linux] Show decimals. + +**GPU** + +- [Linux] Hide duplicate GPU lines (Only display 1). + + +## [3.0.1] - 2017-01-30 + +This minor release fixes all of the bugs that were found in the 3.0 release. + +Thanks for all of the bug reports and contributions. :) + +## Contributors +- **[@SomaUlte](https://github.com/SomaUlte)** +- **[@jorgegonzalez](https://github.com/jorgegonzalez)** +- **[@dawidd6](https://github.com/dawidd6)** +- **[@mstraube](https://github.com/mstraube)** +- **[@YellowApple](https://github.com/YellowApple)** +- **[@siiptuo](https://github.com/siiptuo)** +- **[@Head-on-a-Stick](https://github.com/Head-on-a-Stick)** +- **[@konimex](https://github.com/konimex)** + +## Operating System +- Added support for ArchBox Linux. + +## General +- Fixed output if subtitles are disabled and `prin` is used in an info function. +- Fixed underlines not working when used with `prin`. +- Fixed HAIKU install path. **[@YellowApple](https://github.com/YellowApple)** + +## Config +- Fixed default config not found. +- Don't set locale in config file. + +## Info + +**Memory**
+- Changed memory label to `MiB` on OS that output memory in Mebibytes. + +**Shell**
+- Fixed a crash when the user has `bash 3` installed. + +**Packages**
+- Added support for Chromebrew. + +**GPU**
+- [Linux] Display detailed information about Intel GPUs. **[@SomaUlte](https://github.com/SomaUlte)** + +**Color Blocks**
+- Fixed issue with `color_blocks="off"` adding an extra newline to the output. + +**Song**
+- Don't print `$song` if it's empty and `song_shorthand` is on. **[@mstraube](https://github.com/mstraube)** +- Fixed `mpd` detection when `mpd` is on a different host. **[@dawidd6](https://github.com/dawidd6)** +- Use `get_song_dbus` for Audacious. **[@mstraube](https://github.com/mstraube)** + +**Terminal Font**
+- [Alacritty] Fixed font detection. **[@siiptuo](https://github.com/siiptuo)** + +## Images +- [iTerm2] Fixed issue with line-breaks printing spaces over the image. **[@jorgegonzalez](https://github.com/jorgegonzalez)** +- Fixed issue with images not working in Terminology. +- Fixed issue when `image_source` was set to `wall`. +- [w3m-img] Fixed issues with `w3m-img` and `tmux`. + +## Ascii +- [Windows 10] Fixed `ascii_distro` not working. +- Fixed a bug where the backend is `ascii` but the image_source is an image file. +- Fixed custom ascii files not working. +- Removed extra backslashes from OpenBSD ascii art. **[@Head-on-a-Stick](https://github.com/Head-on-a-Stick)** + +## Scrot +- Added message to let users know that a screenshot was taken. + + +## [3.0] - 2017-01-23 + +This is another large release containing over `550` commits from 7 contributors. Due to the size and large amount of changes made this release expect at least one minor release to fix any bugs that come up. + +The version number has been bumped to `3.0` due to the large amount of breaking changes introduced this update. I've added backwards compatibility for all of the new changes but there may still be some breakage. I highly recommend starting with a new config to avoid any issues that may arise. + +Neofetch now supports displaying images using `catimg`, `libcaca` and `jp2a`. See this wiki page for screenshots. https://github.com/dylanaraps/neofetch/wiki/Image-Backends + +Thanks to everyone who contributed this release, there were a lot of new faces this time around. :) + +## Contributors +- **[@konimex](https://github.com/konimex)** +- **[@iandrewt](https://github.com/iandrewt)** +- **[@jorgegonzalez](https://github.com/jorgegonzalez)** +- **[@z33ky](https://github.com/z33ky)** +- **[@mstraube](https://github.com/mstraube)** +- **[@gavinhungry](https://github.com/gavinhungry)** + +## IRC + +Neofetch now has an IRC channel at `#neofetch` on Freenode. If you have any questions, issues or ideas feel free to join the IRC channel and I'll be happy to assist you. I know that we've already got the Gitter chat but hopefully this makes things easier for those without a GitHub account. :) + +[![Freenode](https://img.shields.io/badge/%23neofetch-%20on%20Freenode-brightgreen.svg)](http://irc.lc/freenode/neofetch) + +## Collaborators + +I have given collaborator access to both **[@konimex](https://github.com/konimex)** and **[@iandrewt](https://github.com/iandrewt)**. In short this allows them to push directly to the master branch of the repo, manage the issue tracker and also merge pull requests. They've been a huge help the past year so this made sense to me. + +## OS +- Added support for AIX. +- Added support for AntiX. +- Added support for GNU/kFreeBSD. +- Added support for Gentoo FreeBSD. +- Added support for GrombyangOS. +- Added support for Joyent SmartOS. +- Added support for Mer. +- Added support for MINIX. +- Added support for MX. +- Added support for Open Source Media Center (OSMC). +- Added support for SalentOS. +- Added support for TrueOS. +- Added support for Windows (MSYS2). + +## General +- The default config file is now installed to `/etc/neofetch/config` and acts as a system-wide config file for Neofetch. Editing this file will make the changes available to all users on the system. Those packaging Neofetch **without** using the Makefile will need to make changes to support this. +- The Makefile was rewritten to remove GNU-isms. +- Removed executable permission from config files. BASH can source them even if they're un-executable. +- Travis now runs [shellcheck](https://github.com/koalaman/shellcheck) on every commit and pull request. + - We've had to exclude around 10 lint errors, see this wiki page for why we did this: + - https://github.com/dylanaraps/neofetch/wiki/Shellcheck-Exclusions +- Neofetch now supports relative path values when specifying the location to images, ascii files and config files. + - For example, `neofetch --w3m Pictures/Wallpapers/10.jpg` and `neofetch --w3m 10.jpg` now work. +- Optimize usage of `get_de()`, `get_wm()` and `get_term(). + - We were calling these multiple times, we now only run them once and check to see if they were run previously. +- Optimize info caching, only check for cache files in functions that use caching. +- The manpage is now generated using `help2man`. `help2man` parses the output of `--help` and `--version` to create a manpage. This ensures that our manpage stays 1:1 with the script documentation. We actually found a lot of outdated info in the old manpage thanks to this. + - A new flag was added called `--gen-man` which generates a neofetch manpage in your current directory. +- Delete most of `info()` and instead call `prin()`. + - This removes a lot of duplicate code between `info()` and `prin()`. +- Remove `printf` subshells and instead use `printf -v` to declare the variables. +- Fixed artifacts when using line-breaks in TTYs. +- All errors are now sent to `stderr`. +- Renamed `XFCE` --> `Xfce`. **[@gavinhungry](https://github.com/gavinhungry)** +- Cleanup `main()`. +- Renamed `old_flags()` --> `old_options()`. + +## Info + +**Shell**
+- [Fish] Fixed memory leak caused by Fish. +- Added support for `xonsh`. +- Fixed version output on `ksh`. +- Rewrote the function to remove duplicate code. + +**Uptime**
+- Moved duplicate code to a function. +- Changed `$uptime_shorthand` to `on` by default. + +**Desktop Environment**
+- Fixed issues where MATE wouldn't be detected properly. +- Added fallback to `$DESKTOP_SESSION`, `$MATE_DESKTOP_SESSION_ID` and `$GNOME_DESKTOP_SESSION_ID`. +- Hide Desktop Environment if it matches Window Manager. + +**CPU**
+- [Linux] Don't simplify `cpufreq` speed option names for no reason. +- [Linux] Fixed issues with CPU name detection for architectures other than x86/amd64/ARM. +- [NetBSD] Remove case statement in favor of 1 line test. +- Simplify check for low CPU speeds. +- Expanded `cpu_temp` to take the values `C` and `F`. This means you can now display the CPU temperature as Fahrenheit. + +**CPU Usage**
+- Added Haiku cores command. +- Updated Linux and macOS commands to the match the commands in the `get_cpu()` function. + +**GPU**
+- [Linux] Each GPU is now printed on a separate line. +- [Linux] Added `--gpu_type` / `$gpu_type` which lets you display `all`, `dedicated` or `integrated` GPUs. + +**Memory**
+- [Solaris] Fixed inaccurate used memory size. + +**Resolution**
+- [Windows] Declare variables locally to fix conflicts in other functions. + +**~~Birthday~~ Install Date**
+- Renamed `get_birthday()` -- > `get_install_date()` +- Removed all `date` command usage from `get_install_date()`. +- Added a new function called `convert_time()` which takes the time stamped `ls` output and converts it to a pretty format. The function only uses bash so its much faster than calling `date`. This makes things simple and keeps the output consistent across all Operating Systems. Example: `2016-12-06 16:58:58.000000000` --> `Tue 06 Dec 2016 4:58 PM` +- Added an option so users can choose between using 24-hour and 12-hour time format +- `get_install_date()` will detect which `ls` program is being used instead of hardcoding them per OS. + +**Disk**
+- Rewrote function from scratch. + - The function is `40` lines smaller than before and works on all [1] versions of `df` we tested on [2]. +- Added the option/flag `disk_show` which allows you to specify which disks, mount points or directories to show the disk info of. (One per line) +- Added the option/flag `disk_subtitle` which allows you to specify how we label each disk. (Mount point or Disk name) +- Removed all percentage calculation since `df` already provides us with the percentage. +- Warn the user if `df` isn't installed. +- Fixed broken output if `df` wasn't installed but the function was enabled. + +[1] The function doesn't work on Haiku since their `df` is wildly non-standard. (The output format and flags are 100% different from all of the other `df` versions floating around.) + +[2] Tested on `GNU`, `Busybox`, `BSD`, `Solaris` and `macOS` `df` versions. + +**Theme**
+- [KDE] Don't display GTK Themes if KDE is detected. +- [KDE] If `kde[0-9]-config` isn't found, try and look for `$HOME/.kde`. + +**Window Manager Theme**
+- Fixed WM Theme not detected on MATE. **[@mstraube](https://github.com/mstraube)** +- Fixed WM Theme detection on KDE. **[@mstraube](https://github.com/mstraube)** + +**Song**
+- Added support for xmms2. **[@z33ky](https://github.com/z33ky)** +- Added support for Exaile music player. **[@mstraube](https://github.com/mstraube)** +- Added support for JuK .**[@mstraube](https://github.com/mstraube)** +- Added support for Bluemindo. **[@mstraube](https://github.com/mstraube)** +- Added support for Guayadeque Player. **[@mstraube](https://github.com/mstraube)** +- Added support for Yarock. **[@mstraube](https://github.com/mstraube)** +- Added support for Qmmp. **[@mstraube](https://github.com/mstraube)** +- Added support for QuodLibet. **[@mstraube](https://github.com/mstraube)** +- Added support for Mopidy. **[@d3rrial](https://github.com/d3rrial)** +- [cmus] Simplify block and fix `artistsort` bug. +- Removed `state` detection. +- Removed duplicate `dbus-send` commands. **[@mstraube](https://github.com/mstraube)** +- Hide output if no song is playing. +- Enforce order `artist - title` in `get_song_dbus()`. **[@mstraube](https://github.com/mstraube)** + +**Terminal Font**
+- Added support for Alacritty. +- Added support for Konsole. **[@mstraube](https://github.com/mstraube)** +- Added support for Sakura Terminal. **[@mstraube](https://github.com/mstraube)** +- Added support for Pantheon Terminal. **[@mstraube](https://github.com/mstraube)** +- Added support for deepin-terminal. **[@mstraube](https://github.com/mstraube)** +- [Termite] Fixed incorrect font chosen. **[@mstraube](https://github.com/mstraube)** +- [Termite] Also look at default config. **[@mstraube](https://github.com/mstraube)** + +**Battery**
+- [MacOS] Fixed issue where battery always appears as charging. **[@jorgegonzalez](https://github.com/jorgegonzalez)** + +**Local IP**
+- [BSD and Solaris] Merged the detection to Linux. +- [Windows] Support multiple interfaces. + +**Color Blocks**
+- Use `start++` instead of adding it manually after case. **[@konimex](https://github.com/konimex)** +- Fixed bug where color blocks wouldn't respect width in TTYs. +- Cursor positioning now takes `$block_height` into account. +- Fixed all artifacts in virtual consoles. +- Merged `$start` and `$end` into an array called `block_range`. + - This makes the config option match the command-line flag `--block_range`. + +## Images +- [iTerm2] Fixed blank images. +- Fixed bug where image mode would attempt to run in a TTY. +- All of the image/ascii backend handling was rewritten. Backend and Image/File/Directory selection is universal now and should make usage easier. + - Added `catimg` backend. + - Added `caca` backend. + - Added `jp2a` backend. + - `--image` has been replaced with `--backend`. + - `--backend` takes `ascii`, `caca`, `catimg`, `jp2a`, `iterm2`, `off`, `tycat`, `w3m`. + - Shortcut flags were added for easy picking of backends. + - Each flag can take a file, image or directory as an argument. + - For example: `neofetch --w3m /path/to/img.jpg` `neofetch --ascii /path/to/file` + - `--w3m` + - `--iterm2` + - `--tycat` + - `--ascii` + - `--off` + - `--catimg` + - `--caca` + - `--jp2a` + - All image and ascii file selection has been replaced with the universal `--source`. + - The value of `--source` can be any of the following: + - `auto`, `ascii`, `wallpaper`, `/path/to/img`, `/path/to/ascii`, `/path/to/dir/`. +- Fixed bugs with image shuffle mode. + +## Wallpaper +- Decode URI filenames. + +## Ascii +- Simplified ascii file handling. + - Removed a call to `tr` for those using `bash 3`. + - Fixed distro detection issues. + - Removed the assumption that `first word in distro --> ascii file name` +- Added Ubuntu-Studio. **[@konimex](https://github.com/konimex)** +- Fixed bug causing macOS ascii art to be used on other Operating Systems. +- Display warning about 'ascii' being the new default mode. +- Removed `ascii_logo_size` in favor of `ascii_distro='{arch,crux,gentoo}_small'`. +- [PCBSD] Use TrueOS ascii art. +- Added Void Linux (small) and Alpine Linux (small). + +## Screenshot +- Use arrays for `$scrot_program` + +## Args +- Fixed bug where `neofetch --config` sourced the user config twice. +- Cleaned up config arg handling. + + +## [2.0.2] - 2016-12-07 + +This minor release fixes some issues related to new features added in 2.0. These issues weren't picked up in the time between 2.0 and 2.1 and another minor release is needed due to the Packages issue being rather important. + +These issues were fixed by reverting the GPU caching and Packages optimizations. These issues occurred because not enough testing was done before these were implemented in master. In the future I'll take more care with testing these larger changes before they hit the master branch and I apologize for there being yet another release in one week. + +I also want to apologize to those packaging Neofetch for this unexpected release. + +## Info + +**Packages**
+- Fixed issue where package output was off by one. + +**GPU**
+- Fixed bug with `--gpu_brand` not working. + +**Theme**
+- [Cinnamon] Fixed incorrect information. + + +## [2.0.1] - 2016-12-06 + +This release of Neofetch fixes some important bugs that were found after 2.0 was release. This includes: Detection issues on CentOS and Linux Mint systems, Incorrect Memory usage on BSD, Linux GPU detection issues and more. + +This release also includes a rewrite of the screenshot functions. You no longer have to set the program to use in your config. Neofetch now automatically finds and uses whatever screenshot tool is available on your machine. + +See the screenshot section below for more info. + +The `get_packages()` function was optimized. Neofetch's packages function works by detecting which package managers are installed on your system and then using a sum of those as the packages output. + +Previously the function would call `wc -l` for every package manager, instead we now call `wc -l` only once at the end of the function. + +Thanks for reporting these bugs and also suggesting these features. Don't be shy, report any bugs, annoyances or etc with Neofetch and I'll happily help you out. + +Thanks to **[@konimex](https://github.com/konimex)** for all of his contributions this release. :) + +## Contributors +- **[@konimex](https://github.com/konimex)** + +## General +- Use `$kernel_name` instead of `$distro` in some functions. **[@konimex](https://github.com/konimex)** + +## Info + +**Distro**
+- Added support for Apricity OS. +- Added support for GoboLinux. **[@konimex](https://github.com/konimex)** +- Added support for SwagArch. +- Added support for AOSC OS. +- Added support for Parrot Security. +- Fixed bug that caused Linux Mint systems to be identified as Ubuntu. +- Fixed bug that caused CentOS systems to not be detected. + +**Memory**
+- [BSD] Fixed high memory output. + +**GPU**
+- [Linux] Fixed bug where sound card was detected as GPU. + +**Packages**
+- Only call `wc -l` once at the end of the function instead of calling it once per package manager. + +**Desktop Environment**
+- Show Cinnamon version. + +## Image +- Changed default image mode to `ascii`. + - See: [Images in the terminal](https://github.com/dylanaraps/neofetch/wiki/Images-in-the-terminal#enabling-image-mode) + +## Wallpaper +- Rewrote wallpaper function. +- Prioritize DE wallpaper setters before falling back to `feh`/`nitrogen`. +- Added support for XFCE's wallpaper setter. +- Added support for Solaris and GNU Hurd. **[@konimex](https://github.com/konimex)** + +## Ascii + +![ubuntu](https://u.teknik.io/zILeY.png) +
Old Ubuntu Logo vs New Ubuntu Logo +- Updated Ubuntu logo to the latest version. + - You can use the old logo by launching neofetch with `--ascii_distro ubuntu_old` or by changing `$ascii_distro` to `ubuntu_old` in your config file. +- `--ascii_colors` no longer changes text colors. +- Added ascii art for Ubuntu-Budgie. + - You can use the ascii art by launching Neofetch with `--ascii_distro ubuntu-budgie` or by changing `$ascii_distro` to `ubuntu-budgie` in your config file. +- Fixed bug causing RFRemix to use the incorrect ascii art. + +## Screenshots + +Neofetch will now automatically find and use whatever screenshot tool is available on your system. The screenshot tool is no longer hardcoded and you don't have to edit your config file to specify what program to use. + +On Haiku and macOS, Neofetch will use the built-in tools to take screenshots. On systems with an X server Neofetch will look for and use the following programs: `scrot`, `maim`, `import (imagemagick)`, `imlib2_grab` and `gnome-screenshot`. + +The config option `scrot_cmd` and the commandline flag `--scrot_cmd` are still there for those who want to use custom flags, programs or scripts to take screenshots. +- Automatically use whatever screenshot tool is available. +- Added screenshot support to macOS +- Added screenshot support to Haiku + +## Screenshot Upload +- [teknik.io] Fixed images not uploading with the right filetype. +- Changed default image upload host to `teknik.io`. + - teknik doesn't compress images whereas imgur does. + - You can change this back to imgur by using `--image_host imgur` or by editing your config file. + + +## [2.0] - 2016-12-02 + +This is the biggest release of Neofetch in a long time. 97 files were changed with 2700~ additions to 2900~ deletions. Although the changelog isn't as interesting this time majority of the script has been rewritten, restructered and cleaned up. Every function and variable name follows a proper naming scheme and a large number of bugs were fixed. + +Since this version of Neofetch differs so much from the previous versions expect a 2.0.1 release a few days later to fix any bugs that are found after release. + +The ascii file handling was rewritten, ascii art is now stored/read as plain text! All `eval` usage was removed from Neofetch, vim fold markers/comments are no longer enforced and we now run on GNU Hurd, Haiku and more. + +When I was rewriting parts of the script I thought to myself; Neofetch is using the bash shebang and does depend on bash so why not take full advantage of the features bash has to offer? All tests were changed from `[` to `[[`, arithmetic tests now use `(())` and C style for loops are used where possible. + +All of the config file documentation was rewritten and multiple wiki pages were created to hopefully make using/configuring Neofetch easier than ever before. You can see the wiki here: [Neofetch Wiki](https://github.com/dylanaraps/neofetch/wiki) + +Some of the config options/arguments were renamed/changed and Neofetch will warn you on run if you're using deprecated options (`neofetch -v`). For this release Neofetch **will** include backwards compatibility with the old config file but I'd like to remove this stuff in ~~2.1~~ 3.0. I recommend using this release with a fresh config file so that you can make use of the new documentation. + +I say this every release; This changelog is incomplete, for a full list of changes take a look through the commit history. Neofetch now has an unspoken commit style so reading the commit history won't hurt as much as it used to. + +Thanks to all of the contributors this time around, you guys are a big help and I really appreciate your work towards making Neofetch better and better each release. :) + +## Contributors +- **[@konimex](https://github.com/konimex)** +- **[@TonCherAmi](https://github.com/TonCherAmi)** +- **[@JorgeGonzalez](https://github.com/JorgeGonzalez)** +- **[@iandrewt](https://github.com/iandrewt)** +- **[@iwamatsu](https://github.com/iwamatsu)** +- **[@Brottweiler](https://github.com/Brottweiler)** + +## Packages +- Neofetch is now in Debian's official repos. +- Neofetch is now in Ubuntu's official repos. + +## General +- All functions/variables now follow the same naming scheme. `example_func_name` +- Call `uname` once and cache the output instead of calling `uname` 4-5 times. +- Cleaned up and rewrote large chunks of the script. +- Convert math tests to correct syntax. +- Fixed `--disable` and capitalized arguments. +- Fixed issue where `bold=off` wouldn't work. +- Fixed issue where info wasn't detected properly but the subtitle was still displayed. +- Fixed issue where using `--disable func func` broke other args. +- Removed all traces of `eval` from Neofetch. +- Removed all vim fold markers and stopped enforcing folding for vim users. + - See [#431](https://github.com/dylanaraps/neofetch/pull/431) +- Rewrote all of config file documentation. +- Swap all tests from `[` to `[[`. + +## Operating System +- Added support for ChaletOS. +- Added support for DracOS. +- Added support for GNU Hurd. **[@konimex](https://github.com/konimex)** +- Added support for Haiku. **[@konimex](https://github.com/konimex)** +- Added support for Korora. **[@konimex](https://github.com/konimex)** +- Added support for Netrunner. **[@konimex](https://github.com/konimex)** +- Added support for Pardus. +- Added support for iPhone 7 and 7 Plus. + +## Ascii +- Ascii art is no longer read as a script and is now read as plain text. + - See this wiki page about the new ascii art format. + - https://github.com/dylanaraps/neofetch/wiki/Custom-Ascii-art-file-format +- Neofetch now displays your OS's ascii logo if your distro's logo isn't found. **[@konimex](https://github.com/konimex)** + - Example: [Linux] Tux is displayed if there's no distro ascii. +- `neofetch --ascii_distro x` now sets the mode to ascii for you. You no longer have to use a combination of `--ascii` and `--ascii_distro`. +- [Arch Linux] Changed default ascii colors. +- [Bunsenlabs] Changed default ascii colors. +- Fixed issue with Solarized and certain ascii art. +- Remove all duplicates from `get_distro_colors()`. +- Remove execution permission flag from ascii art files. **[@iwamatsu](https://github.com/iwamatsu)** +- Rename `colors()` to `get_distro_colors()`. +- Rename `setcolors()` to `set_colors()`. +- Update Netrunner ascii art. +- Added old arch ascii logo. **[@Brottweiler](https://github.com/Brottweiler)** + - Useable by using `--ascii_distro arch_old` or by editing the config. + +## Images +- Fixed images not appearing in st. +- Added `to_ascii()` and `to_off()`. + - These functions are used when falling back to different image modes. +- Renamed `check_old_flags()` to `old_flags()` to match `old_functions()`. +- Split `get_image()` into `get_term_size()`, `get_image_size()`, `get_image_program()` and `make_thumbnail()`. +- Use `$XDG_CACHE_HOME` as the thumbnail dir if available. + +## Wallpaper +- Added support for Cinnamon. + +## Bars +- Rename all `progress_` variables to `bar_` to match the function name. + +## Info + +**Distro**
+- [Linux] Source `/etc/*-release` files instead of having a dozen separate `awk` commands. + - We source `/etc/os-release` before falling back to `/etc/*-release`. +- Remove lsb_release detection. + - This change was made since lsb_release prints innacurate results on some distros. +- Added fallback when distro isn't found. **[@konimex](https://github.com/konimex)** + - Example: `Linux (Unknown)` + +**Packages**
+- [Solus] If `pisi` is unavailable, use `eopkg`. +- Added package detection for Lunar Linux. **[@konimex](https://github.com/konimex)** +- Added package detection for TinyCore. **[@konimex](https://github.com/konimex)** +- Remove `/usr/games` from `$PATH` to fix issues with pacman game. + +**GPU**
+- GPU is now cached till reboot. +- [Linux] Prefer dedicated GPU over integrated GPU. + +**Terminal**
+- Added support for HyperTerm. **[@JorgeGonzalez](https://github.com/JorgeGonzalez)** + +**Terminal Font**
+- Added support for HyperTerm. **[@JorgeGonzalez](https://github.com/JorgeGonzalez)** + +**CPU**
+- [BSD] Added cpu_temp support. **[@konimex](https://github.com/konimex)** + +**CPU Usage**
+- [iOS] Fixed CPU usage. + +**Shell**
+- [bash] Simplify bash version. + +**Song**
+- Added support for Clementine. **[@konimex](https://github.com/konimex)** +- Added support for GNOME Music. **[@konimex](https://github.com/konimex)** +- Added support for Lollypop. **[@konimex](https://github.com/konimex)** +- Added support for Pragha. **[@konimex](https://github.com/konimex)** + +**Public IP**
+- Cache the output of the command. **[@konimex](https://github.com/konimex)** +- [dig] Fixed connection timed out with public_ip. **[@iandrewt](https://github.com/iandrewt)** + +**Resolution**
+- [MacOS] If refresh rate is empty don't append Hz. + + +## [1.9.1] - 2016-11-04 + +This is a small release which fixes various issues found in 1.9. + +Note: Those packaging neofetch can ignore the new file: `config/travis` + +## Contributors +- **[@konimex](https://github.com/konimex)** +- **[@fornwall](https://github.com/fornwall)** +- **[@Head-on-a-Stick](https://github.com/Head-on-a-Stick)** + +## Packages +- Neofetch is now in Termux`s repos. + +## General +- [Cursor Position] Fix cursor position in URxvt when using terminal padding. +- [Termux] Fix default ascii location. **[@konimex](https://github.com/konimex)** +- [Termux] Fix default config location. **[@fornwall](https://github.com/fornwall)** +- If a function fails to detect info, let the user know in verbose mode. (`-v`) +- Removed `--test` in favor of a separate config file. Travis.ci now uses `neofetch --config travis` instead of a hacked together arg. + +## Operating System +- Added support for BlankOn Linux. + +## Images +- Fix division by 0 error. + +## Ascii +- [Tails] Update ascii art. +- [OpenBSD] Made ascii art thinner + +## Info + +**Prin**
+- Fix color breakage. +- Fix bold not working. + +**Terminal**
+- Fix whitespace error. + +**Terminal Font**
+- [Termite] Fix incorrect Termite font chosen. +- [Termite] Simplify `awk` command. +- [xfce4-terminal] Simplify `awk` command. + +**Theme**
+- [Budgie] Fix incorrect GTK Theme/Icons + +**Window Manager Theme**
+- [Budgie (Mutter)] Don't print WM Theme. + +**Memory**
+- [OpenBSD] Fixed used memory usage. **[@Head-on-a-Stick](https://github.com/Head-on-a-Stick)** + + +## [1.9] - 2016-11-01 + +This change log won't cover everything that's changed. Have a look through the commit +history for more info. + +There were a lot of major changes made to how things work in this release so I'm expecting +bugs/things not working for people. Expect a 1.9.X release. + +I'm also looking for neofetch screenshots for the Readme, see this issue: [#405](https://github.com/dylanaraps/neofetch/issues/405) + +Thanks to everyone below who contributed, it's nice to see some new faces too. :) + +## Contributors +- **[@konimex](https://github.com/konimex)** +- **[@iandrewt](https://github.com/iandrewt)** +- **[@coypoop](https://github.com/coypoop)** +- **[@ncmprhnsbl](https://github.com/ncmprhnsbl)** +- **[@koreacomputercenter](https://github.com/koreacomputercenter)** + +## General +- Added new function called `checkoldflags` which informs users about deprecated config options. +- Change all `OS X` references to `macOS`. **[@iandrewt](https://github.com/iandrewt)** +- Fix corrupted text when long lines are cut-off. +- Don't dynamically place prompt in `image=off` mode. +- Cursor Position: Fix issues when using URxvt+Padding + +## Operating System + +![android](https://u.teknik.io/4XdJy.png) +- Added support for Android. + - Dependencies: + - Required: `bash` and `busybox` + - Note: I recommend installing `termux` from the Play Store or F-Droid. Termux provides you with a fully + working Linux environment, doesn't require root acess and includes all dependencies. + - Note2: Neofetch will be packaged in `termux` thanks to **[@konimex](https://github.com/konimex)** + - PR [#351](https://github.com/termux/termux-packages/pull/531) +- Added support for Bitrig. **[@konimex](https://github.com/konimex)** +- Added support for Sparky Linux. +- Added support for Porteus. **[@ncmprhnsbl](https://github.com/ncmprhnsbl)** +- Added support for Red Star OS. **[@koreacomputercenter](https://github.com/koreacomputercenter)** + +## Packages +- Neofetch is now in Gentoo's official repos. + +## Images + +**Fixed rendering issues in URxvt when using an XFT font.** + +![scrot](https://i.sli.mg/6qp9Cg.png) + +This was first thought to be an issue between URxvt and W3m-img and I apologize for immediately closing bug reports and dismissing comments about this. + +I spent yesterday trying to fix this issue and found out that launching neofetch with `--bold off` +reduced the rendering problems. I did more digging and found out that removing all text formatting fixes the issue entirely. I later found out that adding a single unformatted character before the formatted text fixed the issue while keeping the formatting the same. + +I opened up this PR https://github.com/dylanaraps/neofetch/pull/358 which added options to enable a border between the image and the text to fix the issue. **[@konimex](https://github.com/konimex)** later commented informing me that we could just use a `zero-width space` to fix the issue and that we didn't need a new function/args/ugly border. doh + +The final fix was as simple as adding a zero-width space before the info, here's the commit. + +https://github.com/dylanaraps/neofetch/commit/3e9c3d648cb4c6f0d5fe5f0b96f9e29429af39d9 + +**Removed hard dependency on `\033[14t`** + +Neofetch no longer requires a terminal emulator that supports `\033[14t` this means that neofetch now works in Konsole. Instead of using the escape sequence users now have three options for getting the terminal size in pixels. +- `xdotool` +- `xwininfo` + `xprop` +- `xwininfo` + `xdpyinfo` + +Neofetch will detect whatever combination you have insalled and use these programs. + +Note: `\033[14t` is still supported, if images already work for you then you don't have to install anything else. +- [w3m-img] Draw the image twice to fix rendering issues in Konsole. +- [w3m-img] Fix cursor position when using `yoffset`. +- [w3m-img] Add `-bg` support with the new option `--bg_color`. + - `neofetch --bg_color blue` will make the background behind the image blue. + - Note: The background color is only visible behind transparent parts of the image. +- If the terminal width is found as `0`, fallback to ascii mode. + +## Ascii +- Bold ascii art by default. +- Fixed incorrect prompt location when using `ascii_logo_size small`. +- Fixed incorrect colors used on light terminals. +- Update Void Linux ascii art. **[@ncmprhnsbl](https://github.com/ncmprhnsbl)** +- Update Solus ascii art. + +## Info + +**Distro**
+- Expanded `distro_shorthand` to macOS, BSD and Solaris. **[@konimex](https://github.com/konimex)** +- Removed `osx_buildversion` and `osx_codename` in favour of `distro_shorthand`. **[@konimex](https://github.com/konimex)** + +**Desktop Environment**
+- [Windows] Added support for showing DE. + - Windows 8 and above: `Modern UI/Metro` + - Windows 7 and below: `Aero` + +**Window Manager**
+- [Windows] Added support for custom WMs/Shells. + - Neofetch now detects `blackbox`, `bugn`, `Windawesome`, `emerge` and `litestep`. + +**Window Manager Theme**
+- [Windows] Added support for Blackbox themes. + +**CPU**
+- Added `cpu_speed` which lets you hide/show the speed in the output. +- Expanded `cpu_cores` option by adding two new values, `logical` and `physical`. + - `logical`: Show all virtual cores (hyperthreaded). + - `physical`: Only show physical cores. +- [Linux] Added support for showing CPU temperature. + - Added new option called `cpu_temp`. + - Note: This is disabled by default and can be enabled by changing the value of `cpu_temp` in your config to `on`. +- [macOS] Print physical cores instead of hyper-threaded cores. **[@iandrewt](https://github.com/iandrewt)** +- [iOS] Rewrite CPU function. + +**GPU** +- [iOS] Rewrite GPU function. +- [Linux] Rewrite GPU function. + - Neofetch also caches the info until reboot. + +**Uptime**
+- Rewrote uptime function to use seconds since boot instead of the `uptime` command. + - Every OS/Distro now has the pretty `uptime -p` output! +- Remove `up` from output. + +**Resolution**
+- [macOS] Add @2x label for retina resolutions. **[@iandrewt](https://github.com/iandrewt)** + +**Memory**
+- [Linux] Correctly calculate used memory. + - The output should now match `conky`, `htop` and etc. + - Source: https://github.com/KittyKatt/screenFetch/issues/386#issuecomment-249312716 +- [NetBSD] Fix memory output for sizes over 4GB. **[@coypoop](https://github.com/coypoop)** + +**Shell**
+- Hide shell path by default. +- Show shell version by default. + +**Battery**
+- [Linux] Rewrote and simplified battery function. +- Removed `battery_shorthand` +- Removed `battery_num` + +**Theme Font**
+- [XFCE] Fixed incorrect font output. + +**Color Blocks**
+- Fixed `block_width` not working. +- Fixed `% s` appearing in color blocks when neofetch is run from `tty` +- Fixed `block_width` being off by one. A value of `2` made the blocks `3` wide instead of `2` wide. + +**Terminal and Terminal Font**
+- [Linux] Use `/proc/$PPID/comm` instead of parsing `ps`. +- Uppercase first letter of `termfont` output. +- Don't print broken output of busybox's `ps`. +- Remove path from output. + +**Song**
+- [macOS] Fix iTunes automatically opening. **[@iandrewt](https://github.com/iandrewt)** +- Added support for Audacious. **[@ncmprhnsbl](https://github.com/ncmprhnsbl)** +- Rewrote song function, it's now much faster/cleaner. + + +## [1.8.1] - 2016-10-04 + +This release fixes various bugs found in 1.8. + +**General**
+- Fixed issues with single args (`-s` `-su`) being treated as values for other args. + +## Info + +**GPU**
+- Added `gpu_brand` to enable/disable showing GPU brand in output. (AMD/NVIDIA/Intel) + +**DE**
+- Added Cinnamon version number to output. + +**WM Theme**
+- Fix GNOME showing wrong WM Theme. + +**Battery**
+- Fixed battery not appearing when set to `all`. + +**Terminal Font**
+- [Termite] Ignore lines starting with `;`. + +**Progress Bars**
+- Fixed progress bars displaying incorrectly in image mode. + +## Screenshot +- Added support for uploading screenshots to Imgur and Teknik. + - Adds two new identical flags `--upload` and `-su`. +- Changed default screenshot name so that it works on Windows. + +## Images + +**General**
+- Added a tiny delay before running w3m-img which suprisingly fixed all flickering issues in VTE based terminals. See [#349](https://github.com/dylanaraps/neofetch/pull/349) + +**Wallpaper**
+- Fix wallpapers with spaces in the filename from not showing up. + +## Ascii +- Added logo mode which only displays the ascii art. + - Adds two new identical flags `--logo` and `-L`. + + +## [1.8] - 2016-10-02 + +This version of neofetch is vastly different from the previous versions and this +changelog won't cover everything that's changed. Have a look through the commit +history for more info. + +There were a lot of major changes to how things work in this release so I'm expecting +bugs/things not working for people. Depending on what comes up we my release a few 1.8.X +versions. + +This changelog is a bit of a mess this time around and I apologize but it should at least +get the message across. + +Android support didn't make it into this release as it requires testing on more devices. +If you've got a device running android and would like to help test out the branch, check +out the open PR here: [#322](https://github.com/dylanaraps/neofetch/pull/322) + +This release also saw a lot more contributors which makes me really happy. Thanks to those +below for helping out. :) + +### Contributors +- **[@hashhar](https://github.com/hashhar)** +- **[@williamkray](https://github.com/williamkray)** +- **[@dar-irl](https://github.com/dar-irl)** +- **[@gabe565](https://github.com/gabe565)** +- **[@maddcoder](https://github.com/maddcoder)** +- **[@iandrewt](https://github.com/iandrewt)** +- **[@aranega](https://github.com/aranega)** +- **[@vendion](https://github.com/vendion)** +- **[@konimex](https://github.com/konimex)** +- **[@undrskr](https://github.com/undrskr)** + +### General +- Added `--version` to print the neofetch version. +- Fix issue when title and background were both color `7`. +- Fix issue with incorrect text color when `barinfo` is set. +- Fixed various Travis.ci bugs. +- Fix lint errors. +- Moved all whitespace trimming to a dedicated function. + - Neofetch will no longer have any whitespace issues in the output. + - See [trim()](https://github.com/dylanaraps/neofetch/commit/d3c87cdaacf1ea9fbf245146c910dc53b49dba08#diff-e863270127ca6116fd30e708cdc582fcR2789) +- Quote all variable/command substitutions. +- Removed `line_wrap` as having it set to `on` broke the output. +- Removed `stdout` mode since it's been broken for a while now and I don't see the + point in fixing it. +- Removed in-script config in favor of sourcing the default user config. +- Remove all instances of `! -z` since they're pointless. +- Remove all `bc` usage by simplifying math. +- Suppress `getconfig` and `getscriptdir` errors. +- Suppress `xprop` errors since it's now an optional dependency. +- The prompt is now dynamically set in image mode instead of being anchored to the
+ bottom of the window. See [#279](https://github.com/dylanaraps/neofetch/pull/279) and [#299](https://github.com/dylanaraps/neofetch/pull/299) for examples. +- The title at the top is now much more colorful. +- Moved commands near the bottom of the script to a new function called `main`. +- Use `read -s` instead of `stty -echo` and `stty +echo`. +- Use faster `$(())` syntax for index variables. +- `-v` now shows where the config files were sourced from. +- Cleanup +- Neofetch no longer clears the screen when run in ascii or image=off modes. + - You can use the old behavior by aliasing `clear && neofetch` to `neofetch`. + +### OS +- Added support for Windows 10 Linux subsystem. **[@konimex](https://github.com/konimex)** +- Added support for GuixSD. **[@konimex](https://github.com/konimex)** +- Added support for Devuan Linux. +- Added support for GalliumOS. +- Added support for Openwrt. +- Added support for PacBSD. **[@vendion](https://github.com/vendion)** +- Added support for Rosa. +- Added support for Solaris (Oracle / OpenIndiana). **[@konimex](https://github.com/konimex)** +- Added support for macOS Sierra. **[@iandrewt](https://github.com/iandrewt)** +- Fixed various iOS related issues. + +### Packages +- Added Cydia package for iOS. + - See https://github.com/dylanaraps/neofetch#ios-1 + +### Info + +**Terminal and Terminal Font**
+ +![img](https://ipfs.pics/ipfs/QmR39ScLi56Yt73pA3YWri9ayatN6mpwSTEmM8RVdeRsB1) +- Added `term` function to display current terminal emulator. [1] +- Added `termfont` function to display current terminal font. [2] + +[1] Both of these functions are enabled by default. +[2] See this wiki page for more info about the functions: [Link](https://github.com/dylanaraps/neofetch/wiki/Terminal-and-Terminal-Font-detection) + +**Model**
+- Added `model` a new function which displays your device's product vendor/name. + +![Mode](https://ipfs.pics/ipfs/Qmcy2o5xZCELxroNLHAhY96ZsrwBFR86NGDCu5e2UPVn4b) + +**Distro**
+- Added `distro_shorthand` **[@konimex](https://github.com/konimex)** + +**Title**
+- Added additional fallback which gets the current username from `$HOME`. + +**Color Blocks**
+- Added `--block_height` / `$block_height` to change the number of lines high each
+ block will be. + +![Big Blocks](https://ipfs.pics/ipfs/QmZpR8ukZNfGXkhXjTwAy3eWVRCeHdrurhgAdV5CSiTVvR) + +**Resolution**
+- [Windows] Fix resolution on Windows 10. **[@dar-irl](https://github.com/dar-irl)** +- [Mac OS X] Hide refresh rate if `0`. **[@iandrewt](https://github.com/iandrewt)** +- Fixed `xrandr` output on systems not using gawk. +- [Linux / BSD] Shortened refresh rate output. + +**Shell**
+- Show `fish` shell version. **[@maddcoder](https://github.com/maddcoder)** + +**Song**
+- Added support for Deadbeef. **[@konimex](https://github.com/konimex)** +- Added support for Amarok. **[@konimex](https://github.com/konimex)** +- Added support for Banshee. **[@konimex](https://github.com/konimex)** +- Added support for Rhythmbox. **[@konimex](https://github.com/konimex)** +- [Cmus] Prevent `tag artistsort` from showing up in song title. **[@williamkray](https://github.com/williamkray)** +- [Cmus] Fix order of music tags. **[@iandrewt](https://github.com/iandrewt)** +- [Cmus] The function now works on both OS X and Linux. +- [iTunes] Fix song not displaying. **[@iandrewt](https://github.com/iandrewt)** + +**CPU**
+- Simplify CPU Core command. + +**CPU Usage**
+- Fixed broken CPU usage output on BSD and Windows. +- Fixed misleading output on Linux / Mac OS X. +- Moved CPU Usage to its own dedicated function. + +### Image + +![terminology](https://ipfs.pics/ipfs/QmbVEUREBg4hMG22WrQ2bkt2sZZzyTEP5EEXmHRw7MHD6A) +- Added image support for terminology with `tycat`. **[@aranega](https://github.com/aranega)** [1] +- Fixed issues with lines getting drawn through images. See [#296](https://github.com/dylanaraps/neofetch/pull/296) +- Added `--crop_mode none` / `crop_mode=none` to disable cropping the images. +- Added `--size none` / `size=none` to disable resizing / cropping the images. +- Removed `image_position` +- `--image off` now behaves like the other image modes. + +[1] `tycat` is a terminology builtin that works similarly to w3m-img. Those using terminology
+now have working image support. + +##### Shuffle mode +- Fixed directory going out of bounds causing a fallback to ascii mode. **[@gabe565](https://github.com/gabe565)** +- Simplified shuffle function. +- Path no longer requires a `/` at the end. **[@aranega](https://github.com/aranega)** + +### Ascii +- Add `ascii_bold` which allows you to bold the ascii art. +- Added `--ascii_distro mac` as a shorter way of using the OS X ascii. +- Added missing `$ascii_distro` config option. +- Better `Ubuntu-GNOME` ascii art. **[@hashhar](https://github.com/hashhar)** +- Custom ascii files (`--ascii path/to/ascii_file`) now follow the same format as the + distro ascii files. See this wiki page that explains the syntax. [Link](https://github.com/dylanaraps/neofetch/wiki/Custom-Ascii-art-file-format) +- Fix a color issue with Debian's ascii logo. +- Fix an error with an unescaped char in Windows' ascii art. +- Use a pure bash solution to getting ascii size. +- Updated Solus ascii art to match new logo. **[@undrskr](https://github.com/undrskr)** + + +## [1.7] - 2016-05-14 + +Hello, sorry this release took so long. I've been extremely busy with uni and +haven't had as much time to work on neofetch. + +As always, check the `Following HEAD` wiki page for all breaking changes +this release. + +I'm also looking for some new Readme screenshots, see this github issue: **https://github.com/dylanaraps/neofetch/issues/245** + +### Contributers + +Thanks to the following people for contributing this release. +- **[@dawidd6](https://github.com/dawidd6)** +- **[@tudurom](https://github.com/tudurom)** +- **[@iandrewt](https://github.com/iandrewt)** + +### General +- Made it easier to get verbose logs. +- Added issue template for github. +- New repo for Crux. **[@tudurom](https://github.com/tudurom)** +- Added release badge to readme. **[@dawidd6](https://github.com/dawidd6)** +- Updated man page and usage with newest flags. +- Font is now enabled by default to match Screenfetch's default config. +- Fixed `bold` option not working. + +### OS / Distro Support +- Added support for Kogaion Linux. +- Added support for Apple iOS. **[@iandrewt](https://github.com/iandrewt)** + - Neofetch should now work on your iPhone, iPod and iPad. +- Added support for DragonflyBSD. +- Added support for PCBSD. + +![iOS screenshot](https://ipfs.pics/ipfs/QmYmPhwpFrxwySW2phdxH1TyQ6tCgCnxtYtbEEe3RY5TwZ) + +### Error Messages + +Neofetch now supports displaying error messages and saving a verbose log for +troubleshooting. + +![log](https://ipfs.pics/ipfs/QmeTWGKozY79zcxbrgXueyTRfQcTUe7ZmDqLv4ASgJB4G4) +- Added `-v` to print error messages to stdout. +- Added `-vv` to print a verbose log to stdout. [1] + +[1] Use `neofetch -vv 2> file` to save a verbose log for bug reporting. + +### Info +- Rewrote most BSD info functions, they're now much smaller and work on more + BSD distros. + +**prin** +- Format changes to fix issues with colons in string. This change also makes + `prin` use the same args as `info`. + +``` sh +# OLD Format +prin "Subtitle: Text goes here" + +# NEW Format +prin "Subtitle" "Text goes here" +``` + +**Title** +- Made title faster by using `$HOSTNAME` when available. + +**Underline** +- Fixed bug with `--underline on/off` not working. +- Underlining is no longer hardcoded to title length meaning you can now + underline any part of the output and the length will match. +- `$underline` was renamed to `$underline_enabled`. + +``` sh +# OLD Variable +underline="on" + +# NEW Variable +underline_enabled="on" +``` + +**Distro** +- Fix arch issues with ARM cpus. +- We now use `uname -m` to get the arch instead of hardcoding `x86`. +- Moved distro detection to a function called `getdistro`. +- Fixed issue with `ascii_distro` not working. + +**CPU** +- Fixed issues when cpu speed was < 1Ghz +- Cleanup of CPU function. +- Don't print `Dual-Core` or `Quad-Core` in CPU output. + +**GPU** +- [Linux] More GPU substitutions for AMD cards. +- Added BSD support using `glxinfo`. + +**Memory** +- [Linux / Windows] Use `memavail` if available for a more accurate output. + +**Packages** +- Package count now works when the user has multiple package managers installed. + For example, if the user has both `dpkg` and `pacman` installed the function will + add up the packages from both package managers to get a grand total. (`dpkg pkgs` + `pacman pkgs`) + +**Uptime** +- Fixed various issues with OS X and BSD. + +**Desktop Environment** +- [ Linux ] Fallback to using `xprop` if `$XDG_CURRENT_DESKTOP` is empty. +- Use `$de` instead of `$XDG_CURRENT_DESKTOP` for wallpaper and theme detection. +- Fixed xprop bug with DE detection when X wasn't running. +- Don't assume that user is using MATE if marco wm is detected. + +**Window Manager Theme** +- Fixed bug when `$de` was unset. + +**Color Blocks** +- Fixed bug when the blocks wrap a line causing a large white strip to appear. + +### Ascii +- Added KDE neon ascii art. +- Added small OpenBSD ascii art. + - Credit goes to ufetch. +- Reduced the size of NetBSD's ascii art. +- [Windows 8/8.1] Use modern windows ascii art. + +### Colors +- Fixed bug with `--colors` not working with all 256 terminal colors. +- `--colors 7` now uses the color white. [1] +- `--colors fg` now uses the foreground color. [1] + +[1] Neofetch tried to be smart before by assuming that the foreground color +would be white or black. This caused issues for those setting the foreground +color to red or etc. This change adds a new value for `--colors` and `colors=()` +called `fg` which will set the color to your foreground color. + +### Progress Bars +- The default progress bar look was changed to `[=====-----]` instead of `━━━━━━━━━━` + fix issues with older systems. +- You can now enable/disable a border around the progress bars with `progress_border`. + +``` sh +# $progress_border on +[=====-----] + +# $progress_border off +=====----- +``` +- You can now individually set the progress bar characters by using + `progress_char_elapsed` and `progress_char_total`. This means that you can + have a seperate character for the elapsed and total portions of the bar. + +``` sh +# Examples with $progress_border on + +# Elapsed: = +# Total: - +[=====-----] + +# Elapsed: . +# Total: " " +[..... ] + +# Elapsed: / +# Total: " " +[///// ] +``` + + +## [1.6] - 2016-04-01 + +# Neofetch 1.6 + +Another ~~week~~ another release of Neofetch. + +This release focused on cleanup, bug fixes and optimization. Neofetch +is now much much faster than last release and more bug free than ever +before! + +This release surprisingly didn't break much at all, see the latest entry in +the wiki page `Following HEAD`. + +https://github.com/dylanaraps/neofetch/wiki/Following-HEAD + +![scrot](https://ipfs.pics/ipfs/QmTD6cRmYfLdrvvyLfGdUfBDCzE5uYNsRpLUx7vLUFkYxM) + +### Contributors + +Thanks to the following people for contributing this release. +- **[@iandrewt](https://github.com/iandrewt)** +- **[@dawidd6](https://github.com/dawidd6)** +- **[@onodera-punpun](https://github.com/onodera-punpun)** +- **[@onespaceman](https://github.com/onespaceman)** +- **[@firstEncounter](https://github.com/firstEncounter)** +- **[@konimex](https://github.com/konimex)** + +### General +- Added Travis CI support. +- Added `--test` which is meant for testing and prints all functions. +- Cleanup of Distro, Uptime, Memory and CPU functions. +- We now use a more reliable white-space trimming substitution for CPU/GPU etc. +- Use `stty` instead of `read -s` to fix an issue with escape sequences
+ appearing in the output. +- Line wrap is now disabled by default. +- Implement base support for caching specific info. This will eventually
+ allow us to speed up the script by caching info that won't change for a
+ long period of time like the CPU/GPU. [1] +- Fixed a locale issue when `LC_ALL` is unset on the user's system. +- Change all usage of `$HOME/.config` to `$XDG_CONFIG_HOME` with a fallback to `$HOME/.config`. + +[1] You can clear the cache with `--clean`. + +### Colors + +![vs](https://ipfs.pics/ipfs/QmNVw4zm78tgBGdhDJ1FZ1aktpEtVapVtNWWMMKh5aitrZ) + +

Neofetch 1.5 vs Neofetch 1.6

+ +

Neofetch now works with bright color schemes and uses the foreground color instead of hard-coding white.

+ +
+- Fixed buggy colors in older versions of *BSD, OS X and Linux. +- The default text colors now work on bright color schemes. We no longer force
+ the color white, it's now based on your foreground color. +- Progress bars are now by default colored based on your distro's logo colors. +- Color blocks now work in older systems and in Travis CI. + +### Packages +- Neofetch is now is Void Linux's official repos. **[@konimex](https://github.com/konimex)** + +### Info +- Functions now no longer print `Unknown` when they fail, they now don't appear at all. + +**Window Manager Theme**
+- Added new `WM Theme` function to print window manager themes. + +**OS**
+- [ CRUX ] Also print the CRUX version. **[@onodera-punpun](https://github.com/onodera-punpun)** +- [ Fedora ] Fixed a weird detection bug. + +**CPU**
+- [ Windows ] Don't print CPU cores if detection fails. +- [ BSD ] Fixed extremely long output. +- Fixed broken CPU speed when source is `/proc/cpuinfo`. + +**GPU**
+- Don't show GPU output on unsupported OS. +- `Nvidia` is now displayed as `NVIDIA`. **[@firstEncounter](https://github.com/firstEncounter)** +- Intel GPUs now all appear as `Intel Integrated Graphics`. to avoid naming issues. +- [ OS X ] We now cache the GPU value. + +**Battery**
+- Show charging state in battery output. **[@dawidd6](https://github.com/dawidd6)** and **[@iandrewt](https://github.com/iandrewt)** +- [ Windows / OpenBSD ] Fix blank battery output when battery isn't found. + +**Resolution**
+- [ Windows ] Don't print resolution if detection fails. +- [ Linux / OSX / BSD ] Print refresh rate next to resolutions. +- [ Linux ] Multi monitor support using `xorg-xrandr`. +- [ Linux ] Refresh rate support using `xorg-xrandr`. +- [ OSX ] Added support for using `screenresolution` to print the output.
+ This is much faster than the default method. + +**Packages**
+- Listing homebrew packages is now super fast. **[@iandrewt](https://github.com/iandrewt)** + +**Public IP**
+- Made public IP function faster by using `dig` if available. **[@iandrewt](https://github.com/iandrewt)** +- Each source now has a timeout to avoid a hang. +- If the IP detection fails we try another method. + +**Theme**
+- Use `$GTK2_RC_FILES` if the envar is set. **[@onespaceman](https://github.com/onespaceman)** + +**Desktop Environment**
+- Added OS X detection. + +**Song**
+- [ MPD ] Fixed function when mpd is running on another PC and not your own. +- Song now displays `Not Playing` instead of `Unknown` when no music player is found. +- Added support for Google Play Music Desktop Player (adds optional dependency of [`gpmdp-bash`](https://github.com/iandrewt/gpmdp-bash)) **[@iandrewt](https://github.com/iandrewt)** + +**Disk**
+- Added new display option `perc` to display just the percentage with the progress bar. +- [ FreeBSD ] Fixed disk usage not working. + +**Memory**
+- [ OpenBSD ] Fixed completely broken memory output on OpenBSD. +- [ Linux ] Rewrote memory function so that it works on old kernel versions. + +**Uptime**
+- [ OSX / BSD ] Performance improvements. **[@iandrewt](https://github.com/iandrewt)** +- [ OpenBSD ] Fixed duplicate `up` in output. + +**Birthday**
+- Fix stray `+` sign in output. + +### Image +- Remove `shuffledir` in favor of '--image path/to/dir/' +- Use `printf` instead of `shuf` to pick a random image. +- [ OS X ] Fixed issues with wallpaper detection. +- [ OS X ] Wallpaper detection now works on a per desktop basis. +- Removed `image_backend` and instead use iterm2 mode only when iterm2 is detected. + +### Ascii +- Added ascii art for Qubes OS. +- Added ascii art for Travis CI. +- Revamped Alpine Linux's ascii art. +- Fixed missing ascii colors for Puppy Linux. +- [ OSX ] Fixed incorrect text colors. +- Sped up ascii function by dropping `wc` usage. + +### Scrot +- Fixed scrot function not using user defined options. + + +## [1.5] - 2016-03-17 + +# Neofetch 1.5 + +![Xubuntu](https://ipfs.pics/ipfs/QmWPvwW3nQoKVffHSZUu57MwCpQDZoMVTHQVwwCom2ChqM) + +### Contributers + +Thanks to the following people for helping me to improve neofetch. +- **[@iandrewt](https://github.com/iandrewt)** +- **[@konimex](https://github.com/konimex)** +- **[@CousinMachu](https://github.com/CousinMachu)** + +### General +- Remove all `echo` usage inside the script. +- More cleanup and misc bug fixes. + +### Packages +- Neofetch is now packaged for `Fedora` and `Fedora` based distros. **[@konimex](https://github.com/konimex)**. +- Added installation instructions for RHEL and CentOS. **[@konimex](https://github.com/konimex)**. +- Added stable package to the AUR. **[neofetch](https://aur.archlinux.org/packages/neofetch/)** + +### Progress Bars + +This has finally been merged to master, a big thanks to **[@iandrewt](https://github.com/iandrewt)** for helping +me finish up with this PR. + +![bars](https://ipfs.pics/ipfs/Qmbj8S7pi4CVw12XTawtRwRpLvkiZ9cxRxCUPMLQ1Nhhkb) +- Added progress bar support to CPU, Memory, Disk, Battery. +- Added `progress_char` which allows you to change the character used when drawing the bars. +- Added `progress_length` which allows you to set the max length in spaces of the bars. +- Added `progress_elapsed_color` which sets the elapsed color. +- Added `progress_total_color` which sets the total color. +- Added `--progress_colors` which takes two color values: `elapsed`, `total`. +- Added `cpu_display`, `memory_display`, `disk_display` and `battery_display` which allow you
+ to customize where or if the progress bar will appear. + - Takes these values: `info`, `bar`, `infobar`, `barinfo` + +### OS +- Added support for `SteamOS`. + +### Images +- Using `xoffset` now also moves the text over. +- Changed default gap size to `2`. +- Fixed an issue with Nitrogen and multi monitor wallpaper setups. **[@CousinMachu](https://github.com/CousinMachu)** + +### Ascii +- Kaos: Update ascii logo to the new logo. +- Added ascii logos for `Kubuntu`, `Lubuntu`, `Xubuntu` and `ubuntu-gnome`. + - You can enable them with `--ascii_distro kubuntu`, `--ascii_distro lubuntu` and etc. + +### Info + +**OS**
+- [ OSX ] Fix buildversion displaying regardless of on/off. **[@iandrewt](https://github.com/iandrewt)** +- [ OSX ] Added `osx_codename` (on by default) which prints the OSX codename. **[@iandrewt](https://github.com/iandrewt)** + +**Disk Usage**
+- Only display usage of local disks. +- Fixed disk usage progress bars when the used value was larger than the total. **[@iandrewt](https://github.com/iandrewt)** + +**Theme**
+- Added `/usr/share` as another theme directory to fix an issue with no theme being found. **[@iandrewt](https://github.com/iandrewt)** + +**CPU**
+- Added `cpu_shorthand` to shorten the output of CPU. **[@iandrewt](https://github.com/iandrewt)** + - Takes these values: `name`, `speed`, `tiny`, `on`, `off` +- Added the ability to print the CPU Usage by using `cpu_display="info"` or `--cpu_display off/on info`. +- Added `cpu_cores` to enable/disable showing the number of CPU cores in the output. **[@iandrewt](https://github.com/iandrewt)** + +**GPU**
+- Added new `tiny` option to `gpu_shorthand` to further shorten the GPU output. **[@iandrewt](https://github.com/iandrewt)** + +**Memory**
+- Fix hang on older systems. + +**Desktop Environment**
+- Fixed bug where `i3` would show up as both a DE and a WM. + +**Birthday**
+- Fixed the birthday function on OS X, it apparently wasn't working from the start. **[@iandrewt](https://github.com/iandrewt)** + +**Song**
+- [ OSX ] Added Spotify support to song. **[@iandrewt](https://github.com/iandrewt)** +- [ OSX ] Added Itunes support to song. **[@iandrewt](https://github.com/iandrewt)** +- Fix bug with `song_shorthand` and songs with more than one occurence of `-`. + +**Battery**
+- Fixed a naming error when multiple batteries are displayed. **[@iandrewt](https://github.com/iandrewt)** + +### Stdout Mode +- Fixed issues with functions that use `prin`. + + +## [1.4] - 2016-03-09 + +Lots of bugs were fixed and a lot of code was cleaned up, this changelog just lists +the major changes made to neofetch. For a full list, checkout the git commit history. + +Thanks to everyone for contributing, I appreciate it! +- Renamed `fetch` to `neofetch`. Thanks for voting. +- Neofetch now has a man page. (man neofetch) Thanks **[@konimex](https://github.com/konimex)** +- Added support for `Alpine Linux`. +- Fix issue with color blocks ending up on the same line as the prompt. + +### Packages +- Added Debian/Ubuntu package. Thanks **[@dawidd6](https://github.com/dawidd6)** +- Added Homebrew package for OS X. Thanks **[@iandrewt](https://github.com/iandrewt)** + +### Info +- Reimplement `color` function. + +**Battery**
+- Added support for NetBSD + +**Song**
+- [Linux] Added support for Spotify. + +**Birthday**
+- Added `--birthday_format` and `$birthday_format` to change the date format of the
+ birthday function. The flag uses the `date` cmd's format options so see `man date`
+ for a list. + +**Packages**
+- Fix 0 package count in Slackware. Thanks **[@h3xx](https://github.com/h3xx)** + +**GPU**
+- Added more GPU substitutions. + +Example: + +``` sh +neofetch --birthday_format "%D" +neofetch --birthday_format "%a %d %b %Y %l:%M %p" +neofetch --birthday_format "%c" +``` + +**Theme**
+- Fix incorrect theme detection on Cinnamon. + +### Ascii +- Added small ascii logo variants for Arch, Crux and Gentoo. [1] +- Added new flag/option `ascii_logo_size` that takes the values `normal` and `small`. +- Optimized all ascii art fixing all leading whitespace issues. + +[1] The small ascii art was taken from [ufetch](https://github.com/jschx/ufetch). + +Example of small ascii logo: + +![CRUX](https://ipfs.pics/ipfs/QmSpadVHtBPRBUJEiiztqkXqfhE2fuGS5t8bzsbxWUYaXA) + +### Stdout +- Don't create config file when using `--stdout`. +- Simplified stdout function. +- Reimplent `--stdout_separator` and `$stdout_separator` which allow you to change
+ the separator between the info. + +Example: + +``` sh +# Display memory, battery and disk in a single line separated by " | " +# This output can then be used in lemonbar etc. +neofetch --stdout memory battery disk --stdout_separator " | " +``` + + +## [1.3] - 2016-02-26 + +# Fetch 1.3 + +Hey guys, + +This update brought some breaking changes, see this wiki page for what you'll +need to update in your config file. + +https://github.com/dylanaraps/fetch/wiki/Following-HEAD + +We're in the middle of renaming 'fetch' to something else as there are +already other programs using the name and we don't appear in any searches. + +You can help out by voting in our poll here: + +http://strawpoll.me/6894425 +- Fetch now supports **bash 3.0+**. +- More cleanup +- The text is now by default colored according to your distro's logo. +- Removed `$*_color` variables/flags in favour of a general `$colors` + variable/flag. See my writeup here: **https://github.com/dylanaraps/fetch/pull/96** + +### Image +- You no longer need to set the font_width value, your font size + is now calculated by fetch automatically. +- Image sizing now takes terminal height into account. +- `--size` now also takes a percentage as a value, for example. + +``` sh +# Image takes up 70% of the terminal size. +fetch --size 70% + +# Size the image in pixels. +fetch --size 200px +``` + +### Packages +- Fetch now has a `crux` port. Thanks **[@ix](https://github.com/ix)**. + +### OS +- Added support for `BunsenLabs`. +- Added support for `SailfishOS`. (Untested) + +### Info +- Don't display Theme, Icons, Font or Window Manager if X isn't running. +- Added function to show currently logged in users. + +**Window Manager** +- Add support for Wayland window managers. (Hardcoded) + +**Song** +- Added `song_shorthand` which prints the Artist/Title on seperate lines. + +**Theme** +- Windows Visual Style is now a part of `getstyle`. +- Disabled theme output on OS X to fix a `gsetttings` related crash. +- Uppercase the first letter of the theme. + +**Resolution** +- Added Windows support. +- Enabled by default but only displays info if the dependency is found. + +**Battery** +- Added FreeBSD and OpenBSD support. Thanks **[@tudurom](https://github.com/tudurom)**. + +**GPU** +- Added more substitutions/ + +### Stdout + +Printing to stdout in a plaintext format for use in scripts is now +much faster and cleaner. +- Removed `--stdout_separator` (Separator is now 2 spaces) +- Removed `--stdout_subtitles` +- Removed `--stdout_title` + + +## [1.2] - 2016-02-17 + +# Fetch 1.2 + +This new release comes with a few config breaking changes, see this wiki page +for info on how you can workaround the issues. + +https://github.com/dylanaraps/fetch/wiki/Following-HEAD +- Fetch now has a **gitter** chatroom. [![Gitter](https://badges.gitter.im/dylanaraps/fetch.svg)](https://gitter.im/dylanaraps/fetch?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) +- Fixed text padding when the user didn't have the locale `en_US.UTF8` installed. +- Cleaned up parts of the script. + +### OS + +We now support almost all the Linux distros Screenfetch supports excluding +the distros that have been discontinued. + +Added support for these distros: +- `Puppy Linux` +- `Kali Linux` +- `openSUSE` +- `Raspbian` +- `Mageia` +- `PCLinuxOS` +- `Zorin OS` +- `Tails` +- `BLAG` +- `Void Linux` +- `Trisquel` +- `Solus` +- `Peppermint` +- `NixOS` +- `Chakra` +- `Mandriva` +- `gNewSense` +- `LMDE` +- `KaOS` +- `Sabayon` +- `Frugalware` +- `Chapeau` +- `Slackware` +- `Scientific Linux` +- `Exherbo` +- `Chrome OS` +- `Chromium OS` + +### Makefile +- Fixed makefile on OS X El Captain. +- `$PREFIX` is now also used when installing ascii art and the default config + +### Wallpaper +- Fetch now supports using `MATE` desktop's wallpapers. +- Fetch now fallsback to ascii mode if the found wallpaper is an xml file. This + fixes issues where the wallpaper set by gsettings is an xml file. + +### Info + +**Desktop Environment**: +- Added support for showing the user's DE. + +**Window Manager**: +- `xprop` is now a required dependency. See **[#79](https://github.com/dylanaraps/fetch/pull/79)**. +- Renamed 'windowmanager' to 'wm' + +**IP Address**: +- Added function to get your local IP +- Added function to get your public IP [1] +- Added `--ip_host` and `$public_ip_host` which allow you to change the website we + ping for the public IP. + +[1] Public IP requires an internet connection as we ping a website. + +**Packages**: +- Check for packages based on which package manager is installed instead of + using a hardcoded list of distros. + +**Theme**: +- Added support for getting DE theme. +- Added support for getting KDE theme. +- Renamed `getgtk` to `getstyle`. +- Dropped the `gtk` from these printinfo functions `gtktheme`, `gtkicons` + and `gtkfont`. Theme output will be blank until you make these changes: + +``` sh +# Old Naming +info "GTK Theme" gtktheme +info "Icons" gtkicons +info "Font" gtkfont + +# New Naming +info "Theme" theme +info "Icons" icons +info "Font" font +``` + +**GPU**: +- `gpu_shorthand` is now enabled by default. +- We now favor showing the dedicated GPU over the integrated one. + +**Song**: +- Added support for `MOC`. +- We now check to see if the player is running before printing anything. +- We now check playback state and show it if relevent. + +**Uptime**: +- [Linux] Fixed uptime when it's under 1 minute. + +### Ascii Art +- `--ascii_distro` now also enables ascii mode. +- Fix missing ascii art when fetch is installed in /usr/local +- Update Deepin's ascii art to their new logo + + +## [1.1] - 2016-02-06 + +# Fetch 1.1 changelog + +Over the past 10~ days over **190** more commits have been pushed to master and the +script has had some big changes. Thanks to everyone who has contributed, you've been +a big help. + +![screenfetch mode](http://i.imgur.com/nW3HiNP.png) +New screenfetch mode +- If `w3m` or `imagemagick` aren't installed we gracefully fallback to ascii mode. +- Automatically find the `w3m-img` path and fallback to ascii mode if not found. [1] +- Fix padding escape codes on BSD systems. +- Swap escape codes from `\e` to `\033` for consistency. +- We only move the cursor to the bottom of the terminal in w3m/iterm2 rendering modes. +- Cursor position is now dynamic in ascii mode based on the height of the ascii and info text. +- If images and ascii are off, don't clear the terminal +- The script now exits correctly instead of always exiting with status code `1` +- If the script exits for any reason, unhide the cursor. +- Removed duplicate blocks inside `getcpu` and `getmemory`. +- Removed `--colors` as it was apparently broken from day 1. +- Usage has been reformatted so that every flag has a value. + +[1] Setting `$w3m_img_path` will make the script look there first. + +### Image +- Added support for displaying ascii art inside of text files. +- Added "screenfetch mode" which will display your distro's ascii art next to the info. [1] +- Added `--ascii_distro` to choose which distro's ascii logo to display. +- Added `--ascii_colors` and `$ascii_colors` which allow you to change the colors of the ascii art + and distro logos. [2] +- Added `--size` and `$image_size` to set the image size in pixels. +- Rename `--shuffledir` and `$shuffledir` to `shuffle_dir`. +- Rename `--imgtempdir` and `$imgtempdir` to `thumbnail_dir` +- Removed `--split_size` and `$split_size` as they were weird and confusing to use. +- Default thumbnail directory is now `$HOME/.cache/thumbnails/fetch`. Thanks @tudurom +- If `--image` and `--ascii` are left empty we fallback to ascii distro mode. + +Example usage of ascii from file: + +``` sh +fetch --ascii "path/to/ascii" --ascii_color 2 + +``` + +[1] **[How do I enable screenfetch mode?](http://github.com/dylanaraps/fetch#how-do-i-enable-screenfetch-mode)** +[2] `ascii_colors` takes a range of colors which allows you to color every aspect of +distro and OS ascii art. For custom art the script will color the entirety of it using +the first value of `ascii_colors`. If `ascii_colors` is left empty, color will be disabled. + +### Config file +- Fetch now has a config file that you can share with people and keep between + script versions! [1] +- Added `--config` and `$config_file` to specify a custom config location. +- Added `--config off`, `--config none` and `$config` to enable / disable config files + at launch or in script. + +[1] https://github.com/dylanaraps/fetch#using-the-config-file + +### Makefile +- Fetch now has a make file due to the increasing number of files, + this allows the script to be easily installed and uninstalled on + systems it isn't packaged for yet! [1] + +[1] The script will still work just fine on its own, you'll just be missing +the distro ascii art and the automatic config creation. + +### Packages +- Fetch now has a Gentoo/Funtoo e-build courtesy of **@z1lt0id** + +### Stdout +- Added `stdout` mode which allows you to fetch info in a plain text format that works + with lemonbar and in your scripts. You can use it by launching fetch with `--stdout` to print all + functions enabled in your `printinfo` function. You can selectively print functions by passing + arguments to `--stdout` like so: + +``` sh +# Print the output of all info functions enabled in printinfo +fetch --stdout + +# Print the output of memory +fetch --stdout memory + +# Print the output of memory and disk +fetch --stdout disk + +# Print the output of all functions excluding x +fetch --stdout --disable kernel packages gtktheme + +``` +- Added `--stdout_separator` and `$stdout_separator` which takes a string and adds it + as a separator between the output. +- Added `--stdout_title` and `$stdout_title` which allow you to toggle the `title@hostname` + from appearing in the output. +- Added `--stdout_subtitles` which allow you to toggle the `Info:` titles from appearing in + the output. + +``` sh +# Hiding subtitles +fetch --stdout --stdout_subtitles off + +# Custom separator +fetch --stdout disk gpu --stdout_separator " | " + +``` + +**NOTE:** `stdout_subtitles` and `stdout_title` only work when `--stdout` is used on its own +without any args. + +### Info +- You can now display info without a subtitle. eg. `info memory` +- Added `--disable` which allows you to stop an info line from appearing at launch. +- Added `--underline` and `$underline` which allow you to toggle visibility of the + underline at launch and in your config. + +``` sh +# Stop cpu, gpu, disk and shell functions from being called +fetch --disable cpu gpu disk shell +``` + +**Kernel:** Added `--kernel_shorthand` and `$kernel_shorthand` to print less or more kernel info +**Window Manager:** Added support for `$XINITRC` +**GTK:** Fix incorrect GTK3 theme being displayed +**CPU:** `cpu_shorthand`: New substitutions +**GPU:** `[Linux]` Count the number of identical GPUs. eg. `Nvidia Geforce GTX 970 x 2` +**Memory:** `[Mac OS X]` Added wired memory to memory usage. + +**Distro:** +- Added support for showing OS architecture. eg `Arch Linux x86_64`, `Windows 7 Ultimate 64-bit` [1] +- Mac OS X: Added support for showing Max OS X build version. [2] +- Windows: Distro now displays Windows edition. eg. `Windows 7 Ultimate` + +[1] You can toggle this using `--os_arch` and `$os_arch`. +[2] You can toggle it using `--osx_buildversion` and `$osx_buildversion`. + +**Shell:** +- Added `--shell_version` and `$shell_version` to hide/show your shell's version. +- Added `--shell_path` and `$shell_path` to hide/show the path to your shell + +**Birthday:** +- Added `birthday` which prints the age of your OS install. +- Added `--birthday_shorthand` and `$birthday_shorthand` to shorten/lengthen + the output of birthday. +- Added `--birthday_time` and `$birthday_time` to show/hide the time in the output. + +**Battery:** +- Added `battery` which prints the battery usage percentage for each battery + in your system. +- Linux: Added `battery_num` which allows you to choose which battery to display, + it also takes the value `all` which will print all batteries line by line. +- Linux: Added `battery_shorthand` which when set to `on` prints each battery on the + same line like so: + +``` sh +# battery_shorthand="on" +Battery: 10%, 5%, 67% + +# battery_shorthand="off" +Battery0: 10% +Battery1: 5% +Battery2: 67% + +# If there's only a single battery in the system +# we ommit the numbered title. +Battery: 10% +``` +- **NOTE:** This currently doesn't support BSD systems as we have no one to help us test + - See **[Issue #46](https://github.com/dylanaraps/fetch/issues/46)** + + +## [1.0] - 2016-01-27 + +# Fetch 1.0 + +There have been over **260** commits to master since I last made a release +and the script is at a point now where I can say that it's feature complete +so I'm releasing 1.0. The script now supports many more OS/distros and has +had lots of bug fixes, changes and features added. + +I'm probably missing a bunch of stuff from this changelog so if i've +forgotten anything, let me know! + +I'm also slowly adding pages to the wiki so check it out! + +# Here's what's new: +- Added full support for **Windows**, **BSD** and **Mac OS X**. +- Fetch is now MIT licensed +- Dropped the `.sh` from the filename and title. +- Dropped support for `mksh` so we can support some `bash` only features. +- Cleanup of everything +- Added `--prompt_height` and `$prompt_height` to fix the script going
+ offscreen due to multi-line shell prompts. This option should be set to
+ your prompt height in lines. +- The script now supports bash **4.0**. It turns out that we only
+ supported bash **4.3** +- Restore cursor and clear screen on ctrl+c. +- Swap `tput` cmds for `ansi escape sequences` where possible. +- Added folds to make the script easier to navigate in *vim. +- Added `-F` to grep where possible for a speedup where possible. +- Fix whitespace issues with different distros. +- Remove uneeded `$` symbols. +- Remove double negative tests. +- Added note about needing `procps` or `procps-ng` for uptime support. +- Fix syntax errors in script and readme. +- All vars now use `on/off` instead of `1/0`. +- Quote things that should be quoted. + +**Linux:** +- Fix issues with `Elementary OS` and `CentOS`. + +**Mac OS X:** +- Added support for other package managers. +- Fix issue with multiple resolutions in `getresolution` + +**Windows:** +- Added `getvisualstyle` function to get the current Windows theme. +- Added `choclatey` support to package count. + +**BSD:** +- Fix tput commands not working on BSD + +## Info: + +As of commit 9daacdd the info array at the top of the script has changed +to a regular function. The benefits of this are pretty cool, you can now +use any bash syntax to customize what gets displayed. You could have an +if statment and only print window manager and gtk themes if X is running +or only show current song if there's one playing. + +You can see some examples and read more about it here: + +https://github.com/dylanaraps/fetch/wiki/Customizing-Info + +
+ +**All:** +- All functions return `Unknown` or `None` instead of printing nothing.
+ +**Title:** +- You can now color the `@` symbol in the title using `--at_color`,
+ `$at_color` and `--colors x x x x x x`. + +**OS:** +- We now check `lsb_release` before looking inside of files, this fixes
+ detection for some *buntu based distros. +- We now exit if the OS type wasn't detected. + +**Window Manager:** +- `wmctrl` is now used by default if found. + +**Uptime:** +- Added `--uptime_shorthand` and `$uptime_shorthand` to make the output
+ of `uptime` smaller and prettier. +- Added new `--uptime_shorthand` and `$uptime_shorthand` value
+ called `tiny`. This makes the output even tinier. eg. `1d 10h 32m` + +**GTK:** +- Added functions to get GTK Theme, Icons and Font +- Added `--gtk{2,3}` and `$gtk{2,3}` to enable/disable gtk2 or gtk3 from
+ being displayed. +- Added `--gtk_shorthand` and `$gtk_shorthand` to make the output of
+ `gtk*` smaller and prettier. + +**Packages:** +- Remove package version and color from `Pacman` output +- All distros are now wildcarded so that version numbers from
+ `lsb_release` are ignored. + +**CPU:** +- Added more cpu speed types to `--speed_type` and `$speed_type`. +- Use `cpufreq` when available instead of hardcoding it for specific distros. + +**GPU:** + +See **[issue #21](https://github.com/dylanaraps/fetch/issues/21)** +- Added function to get the current Graphics Card. +- Added support for VirtualBox GPU. +- Added `--gpu_shorthand` and `$gpu_shorthand` to make the output of `gpu`
+ smaller and prettier. + +**Disk:** + +See **[issue #27](https://github.com/dylanaraps/fetch/issues/27)** +- Added function to get current/total disk usage. + +**Song:** +- Added `cmus` support. + +## Images: +- Added support for **iTerm2's** image rendering. +- Added `--image_backend` and `$image_backend` to change which program
+ is used to render the images. +- The image is now displayed **before** the text, this fixes image
+ rendering issues with **vte** based terminal emulators. +- Added `$w3m_img_path` to set the location of `w3mimgdisplay`. +- Unified all image options, the new var `$image` takes these
+ values: `wall`, `shuffle`, `path/to/img.png`, `off`. +- Added `shuffle` to image modes. The script can now pick a random
+ image from a specified folder to display. You can pick the shuffle
+ directory with `--shuffle_dir` and `$shuffle_dir` +- Fixed images getting cut off at the top. +- Added image size to filename which allowed us to remove a _really_
+ slow check. + +**Wallpaper:** +- Added `nitrogen` and `gsettings` support. +- Added wallpaper support to `Mac OS X` and `Windows`. +- Fix hang when wallpaper isn't found. +- We now check to see that `feh` set the wallpaper. +- Fixed wallpapers with spaces in the filename. +- `wall` is now the default image source. + +## Screenshot: + +The script can now take a screenshot on script finish. You can use +the flags `--scrot` or `-s` to take a screenshot. + +`--scrot` and `-s` can also take a path/filename so you can choose +where and what to name the file at launch. + +If left empty `--scrot` and `-s` will use `$scrot_dir` and +`$scrot_name` when saving the screenshot. + +By default the script uses `scrot` as the screenshot program. +You can use the launch flag `--scrot_cmd` or the option `$srot_cmd` +to set the program to use to take the screenshot. + +## Wiki: + +Added `Customizing Info` page which has info/examples about +the new printinfo function. + +https://github.com/dylanaraps/fetch/wiki/Customizing-Info + +Added `Customization` which lists all options and their values. + +https://github.com/dylanaraps/fetch/wiki/Customization + + +## [0.2.1] - 2016-01-04 + +Here's what's new: +- Mac OS X support (It's done now) +- Resolution Detection (Off by default) +- Song info is now off by default. +- You can now display the image on the right with: + - `--image_position left/right` +- Fixed bug with multiple colons +- Fixed underlines not being drawn the full width. +- Functions now fallback to "Unknown" instead of printing nothing. +- `getos` now gets os type and `getdistro` gets the distro. + - This makes it even easier to add other os types. + +Here's what I'm working on: +- Finishing OpenBSD support +- Cygwin support + +Enjoy + + +## [0.2] - 2016-01-03 + +I finished my rewrite! + +## Here's what's new: +- The script is now way faster. +- You can now pick what gets displayed and where using an array + at the top of the script. This also allows you to: + - underline anything + - print custom info + - print a custom title + - add linebreaks +- Mac OS X support and a base that allows us to add other OS later. +- You can now specify split size. +- Fixed issue with 2 line prompts +- Fixed image not displaying in vte based terminals +- Move all config options to the top of the script +- Moved almost everything to a function. +- Removed wmctrl dependency +- Made variable names more consistent +- Added shell substitution for cpu output. This means + that the cpu output won't include: (tm) (r) "Processor" "CPU" +- Optimized all get\* functions +- Use variable substitution where possible as it's faster than sed/awk +- Moved crop and smart_crop to crop_mode +- Removed --size and --padding in favor of --split_size + +## Here's what I'm currently working on: +- Window support (I'm almost done) +- Option to swap the image and text around +- Imagemagick optimizations +- Cleanup of info array handling +- More info outputs. Now that it's easy to customize what's printed and + everything is a function we can add optional support for pretty much anything. + - Resolution + - GTK themes + - Terminal Font + - GPU + - IP + - etc + +## Issues: +- Uptime doesn't work in OS X yet. +- If the customizable info includes a third colon then it breaks. + +I'd love to hear your thoughts. + + +## 0.1 - 2015-12-31 + +Changelog: +- Added flag to disable bold text `--nobold` +- Added flag to disable text wrapping `--nowrap` +- Moved to using only printf instead of a mix of echo/printf +- The script now aligns the cursor to the bottom of the + terminal instead of using a hardcoded amount of newlines +- Image size and padding is now dynamic, the only difference on the user + side is that instead of setting a long line of spaces as + padding, you set your font width. This means that you set the + var once and the script will just work at any window size. +- You can disable dynamic images and go back to the old + behaviour with by using the `--size` or the in config var. + $img_auto +- Manual padding now takes a count, so `--padding 10` will pad + the text 10 spaces. +- tput is now a dependency because we need (tput cols/lines/cup) + for the dynamic images and it allows us to support more terminals. +- Color block width can now be changed with the flag `--blockwidth`. + It takes a count like `--padding` so `--blockwidth 10` will make + the color blocks 10 spaces wide. + +Let me know if you're having issues. + + +[Unreleased]: https://github.com/dylanaraps/neofetch/compare/4.0.2...HEAD +[4.0.2]: https://github.com/dylanaraps/neofetch/compare/4.0.1...4.0.2 +[4.0.1]: https://github.com/dylanaraps/neofetch/compare/4.0.0...4.0.1 +[4.0.0]: https://github.com/dylanaraps/neofetch/compare/3.4.0...4.0.0 +[3.4.0]: https://github.com/dylanaraps/neofetch/compare/3.3.0...3.4.0 +[3.3.0]: https://github.com/dylanaraps/neofetch/compare/3.2.0...3.3.0 +[3.2.0]: https://github.com/dylanaraps/neofetch/compare/3.1.0...3.2.0 +[3.1.0]: https://github.com/dylanaraps/neofetch/compare/3.0.1...3.1.0 +[3.0.1]: https://github.com/dylanaraps/neofetch/compare/3.0...3.0.1 +[3.0]: https://github.com/dylanaraps/neofetch/compare/2.0.2...3.0 +[2.0.2]: https://github.com/dylanaraps/neofetch/compare/2.0.1...2.0.2 +[2.0.1]: https://github.com/dylanaraps/neofetch/compare/2.0...2.0.1 +[2.0]: https://github.com/dylanaraps/neofetch/compare/1.9.1...2.0 +[1.9.1]: https://github.com/dylanaraps/neofetch/compare/1.9...1.9.1 +[1.9]: https://github.com/dylanaraps/neofetch/compare/1.8.1...1.9 +[1.8.1]: https://github.com/dylanaraps/neofetch/compare/1.8...1.8.1 +[1.8]: https://github.com/dylanaraps/neofetch/compare/1.7...1.8 +[1.7]: https://github.com/dylanaraps/neofetch/compare/1.6...1.7 +[1.6]: https://github.com/dylanaraps/neofetch/compare/1.5...1.6 +[1.5]: https://github.com/dylanaraps/neofetch/compare/1.4...1.5 +[1.4]: https://github.com/dylanaraps/neofetch/compare/1.3...1.4 +[1.3]: https://github.com/dylanaraps/neofetch/compare/1.2...1.3 +[1.2]: https://github.com/dylanaraps/neofetch/compare/1.1...1.2 +[1.1]: https://github.com/dylanaraps/neofetch/compare/1.0...1.1 +[1.0]: https://github.com/dylanaraps/neofetch/compare/0.2.1...1.0 +[0.2.1]: https://github.com/dylanaraps/neofetch/compare/0.2...0.2.1 +[0.2]: https://github.com/dylanaraps/neofetch/compare/0.1...0.2 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f9c0191e..5d3aaf56 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -23,15 +23,20 @@ and variable names. - Keep lines below `100` characters long. - Use `[[ ]]` for tests. -- Quote **EVERYTHING**. +- Double Quote **EVERYTHING**. +- Don’t use single quotes, except for special cases. ### ShellCheck For your contribution to be accepted, your changes need to pass ShellCheck. +Run ShellCheck with the following command: + ```sh -shellcheck neofetch +# Why do we exclude numerous tests? +# See: https://github.com/dylanaraps/neofetch/wiki/Shellcheck-Exclusions +shellcheck neofetch -e SC1090,SC2009,SC2012,SC2016,SC2034,SC2128,SC2153,SC2154,SC2178,SC2010,SC1004,SC1091,SC1117 ``` **Note**: If you have trouble installing ShellCheck. You can open a pull @@ -53,8 +58,6 @@ request on the repo and our Travis.ci hook will run ShellCheck for you. - Use `bash`'s built-in syntax (`file="$(< /path/to/file.txt)")`). - Don’t use `grep "pattern" | awk '{ printf }'`. - Use `awk '/pattern/ { printf }'` -- Don’t use `wc`. - - Use `${#var}` or `${#arr[@]}`. ### If Statements diff --git a/LICENSE.md b/LICENSE.md index eeb066f7..835c1789 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2015-2021 Dylan Araps +Copyright (c) 2016-2018 Dylan Araps Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Makefile b/Makefile index 2b41f34f..4adbd5f6 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ -PREFIX = /usr -MANDIR = $(PREFIX)/share/man +PREFIX ?= /usr +MANDIR ?= $(PREFIX)/share/man all: @echo Run \'make install\' to install Neofetch. diff --git a/README.md b/README.md index 6bfa7403..c96d1d27 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,11 @@

A command-line system information tool written in bash 3.2+

+ + -Packaging status +

neofetch @@ -23,3 +25,35 @@ Neofetch supports almost 150 different operating systems. From Linux to Windows, ### More: \[[Dependencies](https://github.com/dylanaraps/neofetch/wiki/Dependencies)\] \[[Installation](https://github.com/dylanaraps/neofetch/wiki/Installation)\] \[[Wiki](https://github.com/dylanaraps/neofetch/wiki)\] + +## Articles + +- https://lamiradadelreplicante.com/2016/05/15/la-informacion-de-tu-sistema-en-la-terminal-con-neofetch/ +- https://linuxconfig.org/how-to-display-system-information-with-neofetch +- https://www.2daygeek.com/neofetch-display-linux-systems-information-ascii-distribution-logo-terminal/ +- https://www.cyberciti.biz/howto/neofetch-awesome-system-info-bash-script-for-linux-unix-macos/ +- https://www.lffl.org/2016/11/neofetch-le-informazioni-sistema-sul-terminale-stile.html +- https://www.maketecheasier.com/display-system-information-neofetch-linux/ +- https://www.omgubuntu.co.uk/2016/11/neofetch-terminal-system-info-app +- https://www.omgubuntu.co.uk/2016/12/cli-system-tool-neofetch-2-0-released +- https://www.omgubuntu.co.uk/2017/01/neofetch-3-0-released +- https://www.ostechnix.com/neofetch-display-linux-systems-information/ +- https://www.techrepublic.com/article/how-to-get-all-the-information-you-need-about-your-linux-machine-with-a-single-command/ +- https://www.tecmint.com/neofetch-shows-linux-system-information-with-logo/ +- https://www.youtube.com/watch?v=bgepGW858fc +- https://www.linuxuprising.com/2018/05/display-system-information-on-linux.html + + +## Thanks + +- [Contributors](https://github.com/dylanaraps/neofetch/contributors) +- [Packagers](https://github.com/dylanaraps/neofetch/issues/115) +- [Screenfetch](https://github.com/KittyKatt/screenFetch) +- [ufetch](https://github.com/jschx/ufetch) + + +## Donate + +Donations will allow me to spend more time working on `neofetch`. + +If you like `neofetch` and want to give back in some way you can donate here: **https://patreon.com/dyla** diff --git a/neofetch b/neofetch index 3960a0e0..7cd96d1c 100755 --- a/neofetch +++ b/neofetch @@ -1,14 +1,12 @@ #!/usr/bin/env bash # vim: noai:ts=4:sw=4:expandtab -# shellcheck source=/dev/null -# shellcheck disable=2009 # # Neofetch: A command-line system information tool written in bash 3.2+. # https://github.com/dylanaraps/neofetch # # The MIT License (MIT) # -# Copyright (c) 2015-2021 Dylan Araps +# Copyright (c) 2016-2018 Dylan Araps # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -28,17 +26,13 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -version=7.1.0 +version="4.0.3" -# Fallback to a value of '5' for shells which support bash -# but do not set the 'BASH_' shell variables (osh). -bash_version=${BASH_VERSINFO[0]:-5} -shopt -s eval_unsafe_arith &>/dev/null - -sys_locale=${LANG:-C} -XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-${HOME}/.config} -PATH=$PATH:/usr/xpg4/bin:/usr/sbin:/sbin:/usr/etc:/usr/libexec -reset='\e[0m' +bash_version="${BASH_VERSION/.*}" +sys_locale="${LANG:-C}" +XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-${HOME}/.config}" +PATH="/usr/xpg4/bin:/usr/sbin:/sbin:/usr/etc:/usr/libexec:${PATH}" +reset="\e[0m" shopt -s nocasematch # Speed up script by not using unicode. @@ -46,7 +40,7 @@ LC_ALL=C LANG=C # Fix issues with gsettings. -export GIO_EXTRA_MODULES=/usr/lib/x86_64-linux-gnu/gio/modules/ +GIO_EXTRA_MODULES="/usr/lib/x86_64-linux-gnu/gio/modules/" # Neofetch default config. read -rd '' config <<'EOF' @@ -75,29 +69,22 @@ print_info() { info "Memory" memory # info "GPU Driver" gpu_driver # Linux/macOS only + # info "CPU Usage" cpu_usage # info "Disk" disk # info "Battery" battery # info "Font" font # info "Song" song - # [[ "$player" ]] && prin "Music Player" "$player" # info "Local IP" local_ip # info "Public IP" public_ip # info "Users" users + # info "Install Date" install_date # info "Locale" locale # This only works on glibc systems. + info line_break info cols + info line_break } -# Title - - -# Hide/Show Fully qualified domain name. -# -# Default: 'off' -# Values: 'on', 'off' -# Flag: --title_fqdn -title_fqdn="off" - # Kernel @@ -121,7 +108,7 @@ kernel_shorthand="on" # Shorten the output of the distro function # # Default: 'off' -# Values: 'on', 'tiny', 'off' +# Values: 'on', 'off', 'tiny' # Flag: --distro_shorthand # Supports: Everything except Windows and Haiku distro_shorthand="off" @@ -145,59 +132,16 @@ os_arch="on" # Shorten the output of the uptime function # # Default: 'on' -# Values: 'on', 'tiny', 'off' +# Values: 'on', 'off', 'tiny' # Flag: --uptime_shorthand # # Example: # on: '2 days, 10 hours, 3 mins' -# tiny: '2d 10h 3m' # off: '2 days, 10 hours, 3 minutes' +# tiny: '2d 10h 3m' uptime_shorthand="on" -# Memory - - -# Show memory percentage in output. -# -# Default: 'off' -# Values: 'on', 'off' -# Flag: --memory_percent -# -# Example: -# on: '1801MiB / 7881MiB (22%)' -# off: '1801MiB / 7881MiB' -memory_percent="off" - -# Change memory output unit. -# -# Default: 'mib' -# Values: 'kib', 'mib', 'gib' -# Flag: --memory_unit -# -# Example: -# kib '1020928KiB / 7117824KiB' -# mib '1042MiB / 6951MiB' -# gib: ' 0.98GiB / 6.79GiB' -memory_unit="mib" - - -# Packages - - -# Show/Hide Package Manager names. -# -# Default: 'tiny' -# Values: 'on', 'tiny' 'off' -# Flag: --package_managers -# -# Example: -# on: '998 (pacman), 8 (flatpak), 4 (snap)' -# tiny: '908 (pacman, flatpak, snap)' -# off: '908' -package_managers="on" - - # Shell @@ -240,7 +184,7 @@ speed_type="bios_limit" # # Default: 'off' # Values: 'on', 'off'. -# Flag: --speed_shorthand +# Flag: --speed_shorthand. # NOTE: This flag is not supported in systems with CPU speed less than 1 GHz # # Example: @@ -400,30 +344,6 @@ gtk3="on" # Flag: --ip_host public_ip_host="http://ident.me" -# Public IP timeout. -# -# Default: '2' -# Values: 'int' -# Flag: --ip_timeout -public_ip_timeout=2 - -# Local IP interface -# -# Default: 'auto' (interface of default route) -# Values: 'auto', 'en0', 'en1' -# Flag: --ip_interface -local_ip_interface=('auto') - - -# Desktop Environment - - -# Show Desktop Environment version -# -# Default: 'on' -# Values: 'on', 'off' -# Flag: --de_version -de_version="on" # Disk @@ -451,7 +371,7 @@ disk_show=('/') # What to append to the Disk subtitle. # # Default: 'mount' -# Values: 'mount', 'name', 'dir', 'none' +# Values: 'mount', 'name', 'dir' # Flag: --disk_subtitle # # Example: @@ -465,24 +385,8 @@ disk_show=('/') # dir: 'Disk (/): 74G / 118G (66%)' # 'Disk (Local Disk): 74G / 118G (66%)' # 'Disk (Videos): 74G / 118G (66%)' -# -# none: 'Disk: 74G / 118G (66%)' -# 'Disk: 74G / 118G (66%)' -# 'Disk: 74G / 118G (66%)' disk_subtitle="mount" -# Disk percent. -# Show/Hide disk percent. -# -# Default: 'on' -# Values: 'on', 'off' -# Flag: --disk_percent -# -# Example: -# on: 'Disk (/): 74G / 118G (66%)' -# off: 'Disk (/): 74G / 118G' -disk_percent="on" - # Song @@ -503,40 +407,28 @@ disk_percent="on" # cmus # deadbeef # deepin-music -# dragon # elisa # exaile # gnome-music -# gmusicbrowser -# gogglesmm +# Google Play # guayadeque -# io.elementary.music # iTunes -# Music # juk # lollypop -# MellowPlayer # mocp # mopidy # mpd -# muine -# netease-cloud-music -# olivia -# playerctl # pogo # pragha # qmmp # quodlibet # rhythmbox # sayonara -# smplayer # spotify -# strawberry -# tauonmb +# Spotify # tomahawk # vlc # xmms2d -# xnoise # yarock music_player="auto" @@ -564,11 +456,31 @@ song_format="%artist% - %album% - %title%" # off: 'Song: The Fratellis - Costello Music - Chelsea Dagger' song_shorthand="off" -# 'mpc' arguments (specify a host, password etc). + +# Install Date + + +# Whether to show the time in the output # -# Default: '' -# Example: mpc_args=(-h HOST -P PASSWORD) -mpc_args=() +# Default: 'on' +# Values: 'on', 'off' +# Flag: --install_time +# +# Example: +# on: 'Thu 14 Apr 2016 11:50 PM' +# off: 'Thu 14 Apr 2016' +install_time="on" + +# Set time format in the output +# +# Default: '24h' +# Values: '12h', '24h' +# Flag: --install_time_format +# +# Example: +# 12h: 'Thu 14 Apr 2016 11:50 PM' +# 24h: 'Thu 14 Apr 2016 23:50' +install_time_format="12h" # Text Colors @@ -614,25 +526,13 @@ underline_enabled="on" underline_char="-" -# Info Separator -# Replace the default separator with the specified string. -# -# Default: ':' -# Flag: --separator -# -# Example: -# separator="->": 'Shell-> bash' -# separator=" =": 'WM = dwm' -separator=":" - - # Color Blocks # Color block range # The range of colors to print. # -# Default: '0', '15' +# Default: '0', '7' # Values: 'num' # Flag: --block_range # @@ -643,7 +543,7 @@ separator=":" # # Display colors 0-15 in the blocks. (16 colors) # neofetch --block_range 0 15 -block_range=(0 15) +block_range=(0 7) # Toggle color blocks # @@ -666,19 +566,6 @@ block_width=3 # Flag: --block_height block_height=1 -# Color Alignment -# -# Default: 'auto' -# Values: 'auto', 'num' -# Flag: --col_offset -# -# Number specifies how far from the left side of the terminal (in spaces) to -# begin printing the columns, in case you want to e.g. center them under your -# text. -# Example: -# col_offset="auto" - Default behavior of neofetch -# col_offset=7 - Leave 7 spaces then print the colors -col_offset="auto" # Progress Bars @@ -729,7 +616,8 @@ bar_color_total="distro" # # Default: 'off' # Values: 'bar', 'infobar', 'barinfo', 'off' -# Flags: --memory_display +# Flags: --cpu_display +# --memory_display # --battery_display # --disk_display # @@ -738,6 +626,7 @@ bar_color_total="distro" # infobar: 'info [---=======]' # barinfo: '[---=======] info' # off: 'info' +cpu_display="off" memory_display="off" battery_display="off" disk_display="off" @@ -749,10 +638,7 @@ disk_display="off" # Image backend. # # Default: 'ascii' -# Values: 'ascii', 'caca', 'catimg', 'chafa', 'jp2a', 'iterm2', 'off', -# 'pot', 'termpix', 'pixterm', 'tycat', 'w3m', 'kitty', 'ueberzug', -# 'viu' - +# Values: 'ascii', 'caca', 'jp2a', 'iterm2', 'off', 'termpix', 'pixterm', 'tycat', 'w3m' # Flag: --backend image_backend="ascii" @@ -762,7 +648,6 @@ image_backend="ascii" # # Default: 'auto' # Values: 'auto', 'ascii', 'wallpaper', '/path/to/img', '/path/to/ascii', '/path/to/dir/' -# 'command output (neofetch --ascii "$(fortune | cowsay -W 30)")' # Flag: --source # # NOTE: 'auto' will pick the best image source for whatever image backend is used. @@ -780,46 +665,13 @@ image_source="auto" # Default: 'auto' # Values: 'auto', 'distro_name' # Flag: --ascii_distro -# NOTE: AIX, Hash, Alpine, AlterLinux, Amazon, Anarchy, Android, instantOS, -# Antergos, antiX, "AOSC OS", "AOSC OS/Retro", Apricity, ArchCraft, -# ArcoLinux, ArchBox, ARCHlabs, ArchStrike, XFerience, ArchMerge, Arch, -# Artix, Arya, Bedrock, Bitrig, BlackArch, BLAG, BlankOn, BlueLight, -# Bodhi, bonsai, BSD, BunsenLabs, Calculate, Carbs, CentOS, Chakra, ChaletOS, -# Chapeau, Chrom*, Cleanjaro, ClearOS, Clear_Linux, Clover, Condres, -# Container_Linux, Crystal Linux, CRUX, Cucumber, dahlia, Debian, Deepin, -# DesaOS, Devuan, DracOS, DarkOs, Itc, DragonFly, Drauger, Elementary, -# EndeavourOS, Endless, EuroLinux, Exherbo, Fedora, Feren, FreeBSD, -# FreeMiNT, Frugalware, Funtoo, GalliumOS, Garuda, Gentoo, Pentoo, -# gNewSense, GNOME, GNU, GoboLinux, Grombyang, Guix, Haiku, Huayra, HydroOS -# Hyperbola, iglunix, janus, Kali, KaOS, KDE_neon, Kibojoe, Kogaion, Korora, -# KSLinux, Kubuntu, LEDE, LaxerOS, LibreELEC, LFS, Linux_Lite, LMDE, -# Lubuntu, Lunar, macos, Mageia, MagpieOS, Mandriva, Manjaro, TeArch, Maui, -# Mer, Minix, LinuxMint, Live_Raizo, MX_Linux, Namib, Neptune, NetBSD, -# Netrunner, Nitrux, NixOS, Nurunner, NuTyX, OBRevenge, OpenBSD, -# openEuler, OpenIndiana, openmamba, OpenMandriva, OpenStage, OpenWrt, -# osmc, Oracle, OS Elbrus, PacBSD, Parabola, Pardus, Parrot, Parsix, -# TrueOS, PCLinuxOS, Pengwin, Peppermint, Pisi, popos, Porteus, PostMarketOS, -# Proxmox, PuffOS, Puppy, PureOS, Qubes, Qubyt, Quibian, Radix, Raspbian, -# Reborn_OS, Redstar, Redcore, Redhat, Refracted_Devuan, Regata, Regolith, -# Rocky, Rosa, sabotage, Sabayon, Sailfish, SalentOS, Scientific, Septor, -# SereneLinux, SharkLinux, Siduction, SkiffOS, Slackware, SliTaz, SmartOS, -# Solus, Source_Mage, Sparky, Star, SteamOS, SunOS, openSUSE_Leap, t2, -# openSUSE_Tumbleweed, openSUSE, SwagArch, Tails, Trisquel, -# Ubuntu-Cinnamon, Ubuntu-Budgie, Ubuntu-GNOME, Ubuntu-MATE, -# Ubuntu-Studio, Ubuntu, Univention, Venom, Void, VNux, LangitKetujuh, semc, -# Obarun, Parch, windows10, Windows7, Xubuntu, Zorin, and IRIX have ascii logos. -# NOTE: Arch, Ubuntu, Redhat, Fedora and Dragonfly have 'old' logo variants. -# Use '{distro name}_old' to use the old logos. +# +# NOTE: Arch and Ubuntu have 'old' logo variants. +# Change this to 'arch_old' or 'ubuntu_old' to use the old logos. # NOTE: Ubuntu has flavor variants. -# Change this to Lubuntu, Kubuntu, Xubuntu, Ubuntu-GNOME, -# Ubuntu-Studio, Ubuntu-Mate or Ubuntu-Budgie to use the flavors. -# NOTE: Arcolinux, Dragonfly, Fedora, Alpine, Arch, Ubuntu, -# CRUX, Debian, Gentoo, FreeBSD, Mac, NixOS, OpenBSD, android, -# Artix, CentOS, Cleanjaro, ElementaryOS, GUIX, Hyperbola, -# Manjaro, MXLinux, NetBSD, Parabola, POP_OS, PureOS, -# Slackware, SunOS, LinuxLite, OpenSUSE, Raspbian, -# postmarketOS, and Void have a smaller logo variant. -# Use '{distro name}_small' to use the small variants. +# Change this to 'Lubuntu', 'Xubuntu', 'Ubuntu-GNOME' or 'Ubuntu-Budgie' to use the flavors. +# NOTE: Arch, Crux and Gentoo have a smaller logo variant. +# Change this to 'arch_small', 'crux_small' or 'gentoo_small' to use the small logos. ascii_distro="auto" # Ascii Colors @@ -888,14 +740,6 @@ crop_offset="center" # --size image_size="auto" -# Catimg block size. -# Control the resolution of catimg. -# -# Default: '2' -# Values: '1', '2' -# Flags: --catimg_size -catimg_size="2" - # Gap between image and text # # Default: '3' @@ -937,120 +781,77 @@ EOF get_os() { # $kernel_name is set in a function called cache_uname and is # just the output of "uname -s". - case $kernel_name in - Darwin) os=$darwin_name ;; - SunOS) os=Solaris ;; - Haiku) os=Haiku ;; - MINIX) os=MINIX ;; - AIX) os=AIX ;; - IRIX*) os=IRIX ;; - FreeMiNT) os=FreeMiNT ;; + case "$OSTYPE" in + "aix"*) os="AIX" ;; + "darwin"*) os="$(sw_vers -productName)" ;; + "haiku"*) os="Haiku" ;; + "irix"*) os="IRIX" ;; + "minix"*) os="MINIX" ;; + "mint"*) os="FreeMiNT" ;; + "solaris"*) os="Solaris" ;; - Linux|GNU*) - os=Linux + "linux"* | "gnu"*) + os="Linux" ;; - *BSD|DragonFly|Bitrig) - os=BSD + *"bsd"* | "dragonfly"* | "bitrig"*) + os="BSD" ;; - CYGWIN*|MSYS*|MINGW*) - os=Windows + "cygwin"* | "msys"* | "mingw"* | "win32"*) + os="Windows" ;; *) - printf '%s\n' "Unknown OS detected: '$kernel_name', aborting..." >&2 - printf '%s\n' "Open an issue on GitHub to add support for your OS." >&2 + printf "%s\n" "Unknown OS detected: '$OSTYPE', aborting..." >&2 + printf "%s\n" "Open an issue on GitHub to add support for your OS." >&2 exit 1 ;; esac } get_distro() { - [[ $distro ]] && return + [[ "$distro" ]] && return - case $os in - Linux|BSD|MINIX) - if [[ -f /bedrock/etc/bedrock-release && -z $BEDROCK_RESTRICT ]]; then - case $distro_shorthand in - on|tiny) distro="Bedrock Linux" ;; - *) distro=$(< /bedrock/etc/bedrock-release) - esac - - elif [[ -f /etc/redstar-release ]]; then - case $distro_shorthand in - on|tiny) distro="Red Star OS" ;; + case "$os" in + "Linux" | "BSD" | "MINIX") + if [[ -f "/etc/redstar-release" ]]; then + case "$distro_shorthand" in + "on" | "tiny") distro="Red Star OS" ;; *) distro="Red Star OS $(awk -F'[^0-9*]' '$0=$2' /etc/redstar-release)" esac - elif [[ -f /etc/armbian-release ]]; then - . /etc/armbian-release - distro="Armbian $DISTRIBUTION_CODENAME (${VERSION:-})" - - elif [[ -f /etc/siduction-version ]]; then - case $distro_shorthand in - on|tiny) distro=Siduction ;; + elif [[ -f "/etc/siduction-version" ]]; then + case "$distro_shorthand" in + "on" | "tiny") distro="Siduction" ;; *) distro="Siduction ($(lsb_release -sic))" esac - elif [[ -f /etc/mcst_version ]]; then - case $distro_shorthand in - on|tiny) distro="OS Elbrus" ;; - *) distro="OS Elbrus $(< /etc/mcst_version)" - esac - - elif type -p pveversion >/dev/null; then - case $distro_shorthand in - on|tiny) distro="Proxmox VE" ;; - *) - distro=$(pveversion) - distro=${distro#pve-manager/} - distro="Proxmox VE ${distro%/*}" - esac - elif type -p lsb_release >/dev/null; then - case $distro_shorthand in - on) lsb_flags=-si ;; - tiny) lsb_flags=-si ;; - *) lsb_flags=-sd ;; + case "$distro_shorthand" in + "on") lsb_flags="-sir" ;; + "tiny") lsb_flags="-si" ;; + *) lsb_flags="-sd" ;; esac - distro=$(lsb_release "$lsb_flags") + distro="$(lsb_release "$lsb_flags")" - elif [[ -f /etc/os-release || \ - -f /usr/lib/os-release || \ - -f /etc/openwrt_release || \ - -f /etc/lsb-release ]]; then - - # Source the os-release file - for file in /etc/lsb-release /usr/lib/os-release \ - /etc/os-release /etc/openwrt_release; do - source "$file" && break - done - - # Format the distro name. - case $distro_shorthand in - on) distro="${NAME:-${DISTRIB_ID}} ${VERSION_ID:-${DISTRIB_RELEASE}}" ;; - tiny) distro="${NAME:-${DISTRIB_ID:-${TAILS_PRODUCT_NAME}}}" ;; - off) distro="${PRETTY_NAME:-${DISTRIB_DESCRIPTION}} ${UBUNTU_CODENAME}" ;; - esac - - elif [[ -f /etc/GoboLinuxVersion ]]; then - case $distro_shorthand in - on|tiny) distro=GoboLinux ;; + elif [[ -f "/etc/GoboLinuxVersion" ]]; then + case "$distro_shorthand" in + "on" | "tiny") distro="GoboLinux" ;; *) distro="GoboLinux $(< /etc/GoboLinuxVersion)" esac - elif [[ -f /etc/SDE-VERSION ]]; then - distro="$(< /etc/SDE-VERSION)" - case $distro_shorthand in - on|tiny) distro="${distro% *}" ;; + elif type -p guix >/dev/null; then + case "$distro_shorthand" in + "on" | "tiny") distro="GuixSD" ;; + *) distro="GuixSD $(guix system -V | awk 'NR==1{printf $5}')" esac elif type -p crux >/dev/null; then - distro=$(crux) - case $distro_shorthand in - on) distro=${distro//version} ;; - tiny) distro=${distro//version*} + distro="$(crux)" + case "$distro_shorthand" in + "on") distro="${distro//version}" ;; + "tiny") distro="${distro//version*}" ;; esac elif type -p tazpkg >/dev/null; then @@ -1058,834 +859,632 @@ get_distro() { elif type -p kpt >/dev/null && \ type -p kpm >/dev/null; then - distro=KSLinux + distro="KSLinux" - elif [[ -d /system/app/ && -d /system/priv-app ]]; then + elif [[ -d "/system/app/" && -d "/system/priv-app" ]]; then distro="Android $(getprop ro.build.version.release)" # Chrome OS doesn't conform to the /etc/*-release standard. # While the file is a series of variables they can't be sourced # by the shell since the values aren't quoted. - elif [[ -f /etc/lsb-release && $(< /etc/lsb-release) == *CHROMEOS* ]]; then - distro='Chrome OS' + elif [[ -f "/etc/lsb-release" && "$(< /etc/lsb-release)" == *CHROMEOS* ]]; then + distro="$(awk -F '=' '/NAME|VERSION/ {printf $2 " "}' /etc/lsb-release)" - elif type -p guix >/dev/null; then - case $distro_shorthand in - on|tiny) distro="Guix System" ;; - *) distro="Guix System $(guix -V | awk 'NR==1{printf $4}')" + elif [[ -f "/etc/os-release" || \ + -f "/usr/lib/os-release" || \ + -f "/etc/openwrt_release" ]]; then + files=("/etc/os-release" "/usr/lib/os-release" "/etc/openwrt_release") + + # Source the os-release file + for file in "${files[@]}"; do + source "$file" && break + done + + # Format the distro name. + case "$distro_shorthand" in + "on") distro="${NAME:-${DISTRIB_ID}} ${VERSION_ID:-${DISTRIB_RELEASE}}" ;; + "tiny") distro="${NAME:-${DISTRIB_ID:-${TAILS_PRODUCT_NAME}}}" ;; + "off") distro="${PRETTY_NAME:-${DISTRIB_DESCRIPTION}} ${UBUNTU_CODENAME}" ;; esac - # Display whether using '-current' or '-release' on OpenBSD. - elif [[ $kernel_name = OpenBSD ]] ; then - read -ra kernel_info <<< "$(sysctl -n kern.version)" - distro=${kernel_info[*]:0:2} + # Workarounds for distros that go against the os-release standard. + [[ -z "${distro// }" ]] && distro="$(awk '/BLAG/ {print $1; exit}')" "${files[@]}" + [[ -z "${distro// }" ]] && distro="$(awk -F'=' '{print $2; exit}')" "${files[@]}" else for release_file in /etc/*-release; do - distro+=$(< "$release_file") + distro+="$(< "$release_file")" done - if [[ -z $distro ]]; then - case $distro_shorthand in - on|tiny) distro=$kernel_name ;; + if [[ -z "$distro" ]]; then + case "$distro_shorthand" in + "on" | "tiny") distro="$kernel_name" ;; *) distro="$kernel_name $kernel_version" ;; esac + distro="${distro/DragonFly/DragonFlyBSD}" - distro=${distro/DragonFly/DragonFlyBSD} + # Workarounds for FreeBSD based distros. + [[ -f "/etc/pcbsd-lang" ]] && distro="PCBSD" + [[ -f "/etc/trueos-lang" ]] && distro="TrueOS" - # Workarounds for some BSD based distros. - [[ -f /etc/pcbsd-lang ]] && distro=PCBSD - [[ -f /etc/trueos-lang ]] && distro=TrueOS - [[ -f /etc/pacbsd-release ]] && distro=PacBSD - [[ -f /etc/hbsd-update.conf ]] && distro=HardenedBSD + # /etc/pacbsd-release is an empty file + [[ -f "/etc/pacbsd-release" ]] && distro="PacBSD" fi fi - if [[ $(< /proc/version) == *Microsoft* || $kernel_version == *Microsoft* ]]; then - windows_version=$(wmic.exe os get Version) - windows_version=$(trim "${windows_version/Version}") - - case $distro_shorthand in - on) distro+=" [Windows $windows_version]" ;; - tiny) distro="Windows ${windows_version::2}" ;; - *) distro+=" on Windows $windows_version" ;; + if [[ "$(< /proc/version)" == *"Microsoft"* || + "$kernel_version" == *"Microsoft"* ]]; then + case "$distro_shorthand" in + "on") distro+=" [Windows 10]" ;; + "tiny") distro="Windows 10" ;; + *) distro+=" on Windows 10" ;; esac - elif [[ $(< /proc/version) == *chrome-bot* || -f /dev/cros_ec ]]; then - [[ $distro != *Chrome* ]] && - case $distro_shorthand in - on) distro+=" [Chrome OS]" ;; - tiny) distro="Chrome OS" ;; - *) distro+=" on Chrome OS" ;; - esac - distro=${distro## on } - fi - - distro=$(trim_quotes "$distro") - distro=${distro/NAME=} - - # Get Ubuntu flavor. - if [[ $distro == "Ubuntu"* ]]; then - case $XDG_CONFIG_DIRS in - *"studio"*) distro=${distro/Ubuntu/Ubuntu Studio} ;; - *"plasma"*) distro=${distro/Ubuntu/Kubuntu} ;; - *"mate"*) distro=${distro/Ubuntu/Ubuntu MATE} ;; - *"xubuntu"*) distro=${distro/Ubuntu/Xubuntu} ;; - *"Lubuntu"*) distro=${distro/Ubuntu/Lubuntu} ;; - *"budgie"*) distro=${distro/Ubuntu/Ubuntu Budgie} ;; - *"cinnamon"*) distro=${distro/Ubuntu/Ubuntu Cinnamon} ;; + elif [[ "$(< /proc/version)" == *"chrome-bot"* || -f "/dev/cros_ec" ]]; then + case "$distro_shorthand" in + "on") distro+=" [Chrome OS]" ;; + "tiny") distro="Chrome OS" ;; + *) distro+=" on Chrome OS" ;; esac fi + + distro="$(trim_quotes "$distro")" + distro="${distro/'NAME='}" ;; - "Mac OS X"|"macOS") - case $osx_version in - 10.4*) codename="Mac OS X Tiger" ;; - 10.5*) codename="Mac OS X Leopard" ;; - 10.6*) codename="Mac OS X Snow Leopard" ;; - 10.7*) codename="Mac OS X Lion" ;; - 10.8*) codename="OS X Mountain Lion" ;; - 10.9*) codename="OS X Mavericks" ;; - 10.10*) codename="OS X Yosemite" ;; - 10.11*) codename="OS X El Capitan" ;; - 10.12*) codename="macOS Sierra" ;; - 10.13*) codename="macOS High Sierra" ;; - 10.14*) codename="macOS Mojave" ;; - 10.15*) codename="macOS Catalina" ;; - 10.16*) codename="macOS Big Sur" ;; - 11.*) codename="macOS Big Sur" ;; - 12.*) codename="macOS Monterey" ;; - *) codename=macOS ;; - esac + "Mac OS X") + osx_version="$(sw_vers -productVersion)" + osx_build="$(sw_vers -buildVersion)" + case "$osx_version" in + "10.4"*) codename="Mac OS X Tiger" ;; + "10.5"*) codename="Mac OS X Leopard" ;; + "10.6"*) codename="Mac OS X Snow Leopard" ;; + "10.7"*) codename="Mac OS X Lion" ;; + "10.8"*) codename="OS X Mountain Lion" ;; + "10.9"*) codename="OS X Mavericks" ;; + "10.10"*) codename="OS X Yosemite" ;; + "10.11"*) codename="OS X El Capitan" ;; + "10.12"*) codename="macOS Sierra" ;; + "10.13"*) codename="macOS High Sierra" ;; + *) codename="macOS" ;; + esac distro="$codename $osx_version $osx_build" - case $distro_shorthand in - on) distro=${distro/ ${osx_build}} ;; - - tiny) - case $osx_version in - 10.[4-7]*) distro=${distro/${codename}/Mac OS X} ;; - 10.[8-9]*|10.1[0-1]*) distro=${distro/${codename}/OS X} ;; - 10.1[2-6]*|11.0*) distro=${distro/${codename}/macOS} ;; + case "$distro_shorthand" in + "on") distro="${distro/ ${osx_build}}" ;; + "tiny") + case "$osx_version" in + "10."[4-7]*) distro="${distro/${codename}/Mac OS X}" ;; + "10."[8-9]* | "10.1"[0-1]*) distro="${distro/${codename}/OS X}" ;; + "10.1"[2-3]*) distro="${distro/${codename}/macOS}" ;; esac - distro=${distro/ ${osx_build}} + distro="${distro/ ${osx_build}}" ;; esac ;; "iPhone OS") - distro="iOS $osx_version" + distro="iOS $(sw_vers -productVersion)" - # "uname -m" doesn't print architecture on iOS. - os_arch=off + # "uname -m" doesn't print architecture on iOS so we force it off. + os_arch="off" ;; - Windows) - distro=$(wmic os get Caption) - distro=${distro/Caption} - distro=${distro/Microsoft } + "Windows") + distro="$(wmic os get Caption)" + distro="${distro/Caption}" + distro="${distro/Microsoft }" ;; - Solaris) - case $distro_shorthand in - on|tiny) distro=$(awk 'NR==1 {print $1,$3}' /etc/release) ;; - *) distro=$(awk 'NR==1 {print $1,$2,$3}' /etc/release) ;; + "Solaris") + case "$distro_shorthand" in + "on" | "tiny") distro="$(awk 'NR==1{print $1 " " $3;}' /etc/release)" ;; + *) distro="$(awk 'NR==1{print $1 " " $2 " " $3;}' /etc/release)" ;; esac - distro=${distro/\(*} + distro="${distro/\(*}" ;; - Haiku) - distro=Haiku + "Haiku") + distro="$(uname -sv | awk '{print $1 " " $2}')" ;; - AIX) + "AIX") distro="AIX $(oslevel)" ;; - IRIX) + "IRIX") distro="IRIX ${kernel_version}" ;; - FreeMiNT) - distro=FreeMiNT + "FreeMiNT") + distro="FreeMiNT" ;; esac - distro=${distro//Enterprise Server} + distro="${distro//Enterprise Server}" - [[ $distro ]] || distro="$os (Unknown)" + [[ -z "$distro" ]] && distro="$os (Unknown)" - # Get OS architecture. - case $os in - Solaris|AIX|Haiku|IRIX|FreeMiNT) - machine_arch=$(uname -p) - ;; + [[ "$os_arch" == "on" ]] && \ + distro+=" $HOSTTYPE" - *) machine_arch=$kernel_machine ;; - esac - - [[ $os_arch == on ]] && \ - distro+=" $machine_arch" - - [[ ${ascii_distro:-auto} == auto ]] && \ - ascii_distro=$(trim "$distro") + [[ "${ascii_distro:-auto}" == "auto" ]] && \ + ascii_distro="$(trim "$distro")" } get_model() { - case $os in - Linux) - if [[ -d /system/app/ && -d /system/priv-app ]]; then + case "$os" in + "Linux") + if [[ -d "/system/app/" && -d "/system/priv-app" ]]; then model="$(getprop ro.product.brand) $(getprop ro.product.model)" - elif [[ -f /sys/devices/virtual/dmi/id/board_vendor || - -f /sys/devices/virtual/dmi/id/board_name ]]; then - model=$(< /sys/devices/virtual/dmi/id/board_vendor) - model+=" $(< /sys/devices/virtual/dmi/id/board_name)" - elif [[ -f /sys/devices/virtual/dmi/id/product_name || -f /sys/devices/virtual/dmi/id/product_version ]]; then - model=$(< /sys/devices/virtual/dmi/id/product_name) + model="$(< /sys/devices/virtual/dmi/id/product_name)" model+=" $(< /sys/devices/virtual/dmi/id/product_version)" elif [[ -f /sys/firmware/devicetree/base/model ]]; then - model=$(< /sys/firmware/devicetree/base/model) + model="$(< /sys/firmware/devicetree/base/model)" elif [[ -f /tmp/sysinfo/model ]]; then - model=$(< /tmp/sysinfo/model) + model="$(< /tmp/sysinfo/model)" fi ;; - "Mac OS X"|"macOS") - if [[ $(kextstat | grep -F -e "FakeSMC" -e "VirtualSMC") != "" ]]; then + "Mac OS X") + if [[ "$(kextstat | grep "FakeSMC")" != "" ]]; then model="Hackintosh (SMBIOS: $(sysctl -n hw.model))" else - model=$(sysctl -n hw.model) + model="$(sysctl -n hw.model)" fi ;; "iPhone OS") - case $kernel_machine in - iPad1,1): "iPad" ;; - iPad2,[1-4]): "iPad 2" ;; - iPad3,[1-3]): "iPad 3" ;; - iPad3,[4-6]): "iPad 4" ;; - iPad6,1[12]): "iPad 5" ;; - iPad7,[5-6]): "iPad 6" ;; - iPad7,1[12]): "iPad 7" ;; - iPad11,[67]): "iPad 8" ;; - iPad4,[1-3]): "iPad Air" ;; - iPad5,[3-4]): "iPad Air 2" ;; - iPad11,[3-4]): "iPad Air 3" ;; - iPad13,[1-2]): "iPad Air 4";; - iPad6,[7-8]): "iPad Pro (12.9 Inch)" ;; - iPad6,[3-4]): "iPad Pro (9.7 Inch)" ;; - iPad7,[1-2]): "iPad Pro 2 (12.9 Inch)" ;; - iPad7,[3-4]): "iPad Pro (10.5 Inch)" ;; - iPad8,[1-4]): "iPad Pro (11 Inch)" ;; - iPad8,[5-8]): "iPad Pro 3 (12.9 Inch)" ;; - iPad8,9 | iPad8,10): "iPad Pro 4 (11 Inch)" ;; - iPad8,1[1-2]): "iPad Pro 4 (12.9 Inch)" ;; - iPad2,[5-7]): "iPad mini" ;; - iPad4,[4-6]): "iPad mini 2" ;; - iPad4,[7-9]): "iPad mini 3" ;; - iPad5,[1-2]): "iPad mini 4" ;; - iPad11,[1-2]): "iPad mini 5" ;; + case "$kernel_machine" in + "iPad1,1") model="iPad" ;; + "iPad2,"[1-4]) model="iPad 2" ;; + "iPad3,"[1-3]) model="iPad 3" ;; + "iPad3,"[4-6]) model="iPad 4" ;; + "iPad6,11" | "iPad 6,12") model="iPad 5" ;; + "iPad4,"[1-3]) model="iPad Air" ;; + "iPad5,"[3-4]) model="iPad Air 2" ;; + "iPad6,"[7-8]) model="iPad Pro (12.9 Inch)" ;; + "iPad6,"[3-4]) model="iPad Pro (9.7 Inch)" ;; + "iPad7,"[1-2]) model="iPad Pro 2 (12.9 Inch)" ;; + "iPad7,"[3-4]) model="iPad Pro (10.5 Inch)" ;; + "iPad2,"[5-7]) model="iPad mini" ;; + "iPad4,"[4-6]) model="iPad mini 2" ;; + "iPad4,"[7-9]) model="iPad mini 3" ;; + "iPad5,"[1-2]) model="iPad mini 4" ;; - iPhone1,1): "iPhone" ;; - iPhone1,2): "iPhone 3G" ;; - iPhone2,1): "iPhone 3GS" ;; - iPhone3,[1-3]): "iPhone 4" ;; - iPhone4,1): "iPhone 4S" ;; - iPhone5,[1-2]): "iPhone 5" ;; - iPhone5,[3-4]): "iPhone 5c" ;; - iPhone6,[1-2]): "iPhone 5s" ;; - iPhone7,2): "iPhone 6" ;; - iPhone7,1): "iPhone 6 Plus" ;; - iPhone8,1): "iPhone 6s" ;; - iPhone8,2): "iPhone 6s Plus" ;; - iPhone8,4): "iPhone SE" ;; - iPhone9,[13]): "iPhone 7" ;; - iPhone9,[24]): "iPhone 7 Plus" ;; - iPhone10,[14]): "iPhone 8" ;; - iPhone10,[25]): "iPhone 8 Plus" ;; - iPhone10,[36]): "iPhone X" ;; - iPhone11,2): "iPhone XS" ;; - iPhone11,[46]): "iPhone XS Max" ;; - iPhone11,8): "iPhone XR" ;; - iPhone12,1): "iPhone 11" ;; - iPhone12,3): "iPhone 11 Pro" ;; - iPhone12,5): "iPhone 11 Pro Max" ;; - iPhone12,8): "iPhone SE 2020" ;; - iPhone13,1): "iPhone 12 Mini" ;; - iPhone13,2): "iPhone 12" ;; - iPhone13,3): "iPhone 12 Pro" ;; - iPhone13,4): "iPhone 12 Pro Max" ;; + "iPhone1,1") model="iPhone" ;; + "iPhone1,2") model="iPhone 3G" ;; + "iPhone2,1") model="iPhone 3GS" ;; + "iPhone3,"[1-3]) model="iPhone 4" ;; + "iPhone4,1") model="iPhone 4S" ;; + "iPhone5,"[1-2]) model="iPhone 5" ;; + "iPhone5,"[3-4]) model="iPhone 5c" ;; + "iPhone6,"[1-2]) model="iPhone 5s" ;; + "iPhone7,2") model="iPhone 6" ;; + "iPhone7,1") model="iPhone 6 Plus" ;; + "iPhone8,1") model="iPhone 6s" ;; + "iPhone8,2") model="iPhone 6s Plus" ;; + "iPhone8,4") model="iPhone SE" ;; + "iPhone9,1" | "iPhone9,3") model="iPhone 7" ;; + "iPhone9,2" | "iPhone9,4") model="iPhone 7 Plus" ;; + "iPhone10,1" | "iPhone10,4") model="iPhone 8" ;; + "iPhone10,2" | "iPhone10,5") model="iPhone 8 Plus" ;; + "iPhone10,3" | "iPhone10,6") model="iPhone X" ;; - iPod1,1): "iPod touch" ;; - ipod2,1): "iPod touch 2G" ;; - ipod3,1): "iPod touch 3G" ;; - ipod4,1): "iPod touch 4G" ;; - ipod5,1): "iPod touch 5G" ;; - ipod7,1): "iPod touch 6G" ;; - iPod9,1): "iPod touch 7G" ;; + "iPod1,1") model="iPod touch" ;; + "ipod2,1") model="iPod touch 2G" ;; + "ipod3,1") model="iPod touch 3G" ;; + "ipod4,1") model="iPod touch 4G" ;; + "ipod5,1") model="iPod touch 5G" ;; + "ipod7,1") model="iPod touch 6G" ;; esac - - model=$_ ;; - BSD|MINIX) - model=$(sysctl -n hw.vendor hw.product) + "BSD" | "MINIX") + model="$(sysctl -n hw.vendor hw.product)" ;; - Windows) - model=$(wmic computersystem get manufacturer,model) - model=${model/Manufacturer} - model=${model/Model} + "Windows") + model="$(wmic computersystem get manufacturer,model)" + model="${model/Manufacturer}" + model="${model/Model}" ;; - Solaris) - model=$(prtconf -b | awk -F':' '/banner-name/ {printf $2}') + "Solaris") + model="$(prtconf -b | awk -F':' '/banner-name/ {printf $2}')" ;; - AIX) - model=$(/usr/bin/uname -M) + "AIX") + model="$(/usr/bin/uname -M)" ;; - FreeMiNT) - model=$(sysctl -n hw.model) - model=${model/ (_MCH *)} + "FreeMiNT") + model="$(sysctl -n hw.model)" ;; esac # Remove dummy OEM info. - model=${model//To be filled by O.E.M.} - model=${model//To Be Filled*} - model=${model//OEM*} - model=${model//Not Applicable} - model=${model//System Product Name} - model=${model//System Version} - model=${model//Undefined} - model=${model//Default string} - model=${model//Not Specified} - model=${model//Type1ProductConfigId} - model=${model//INVALID} - model=${model//All Series} - model=${model//�} + model="${model//To be filled by O.E.M.}" + model="${model//To Be Filled*}" + model="${model//OEM*}" + model="${model//Not Applicable}" + model="${model//System Product Name}" + model="${model//System Version}" + model="${model//Undefined}" + model="${model//Default string}" + model="${model//Not Specified}" + model="${model//Type1ProductConfigId}" + model="${model//INVALID}" + model="${model//�}" - case $model in + case "$model" in "Standard PC"*) model="KVM/QEMU (${model})" ;; - OpenBSD*) model="vmm ($model)" ;; esac } get_title() { - user=${USER:-$(id -un || printf %s "${HOME/*\/}")} - - case $title_fqdn in - on) hostname=$(hostname -f) ;; - *) hostname=${HOSTNAME:-$(hostname)} ;; - esac - - title=${title_color}${bold}${user}${at_color}@${title_color}${bold}${hostname} - length=$((${#user} + ${#hostname} + 1)) + user="${USER:-$(whoami || printf "%s" "${HOME/*\/}")}" + hostname="${HOSTNAME:-$(hostname)}" + title="${title_color}${bold}${user}${at_color}@${title_color}${bold}${hostname}" + length="$((${#user} + ${#hostname} + 1))" } get_kernel() { # Since these OS are integrated systems, it's better to skip this function altogether - [[ $os =~ (AIX|IRIX) ]] && return + [[ "$os" =~ (AIX|IRIX) ]] && return - # Haiku uses 'uname -v' and not - 'uname -r'. - [[ $os == Haiku ]] && { - kernel=$(uname -v) - return - } - - # In Windows 'uname' may return the info of GNUenv thus use wmic for OS kernel. - [[ $os == Windows ]] && { - kernel=$(wmic os get Version) - kernel=${kernel/Version} - return - } - - case $kernel_shorthand in - on) kernel=$kernel_version ;; - off) kernel="$kernel_name $kernel_version" ;; + case "$kernel_shorthand" in + "on") kernel="$kernel_version" ;; + "off") kernel="$kernel_name $kernel_version" ;; esac # Hide kernel info if it's identical to the distro info. - [[ $os =~ (BSD|MINIX) && $distro == *"$kernel_name"* ]] && - case $distro_shorthand in - on|tiny) kernel=$kernel_version ;; - *) unset kernel ;; + if [[ "$os" =~ (BSD|MINIX) && "$distro" == *"$kernel_name"* ]]; then + case "$distro_shorthand" in + "on" | "tiny") kernel="$kernel_version" ;; + *) unset kernel ;; esac + fi } get_uptime() { - # Get uptime in seconds. - case $os in - Linux|Windows|MINIX) - if [[ -r /proc/uptime ]]; then - s=$(< /proc/uptime) - s=${s/.*} - else - boot=$(date -d"$(uptime -s)" +%s) - now=$(date +%s) - s=$((now - boot)) - fi + # Since Haiku's uptime cannot be fetched in seconds, a case outside + # the usual case is needed. + case "$os" in + "Haiku") + uptime="$(uptime -u)" + uptime="${uptime/up }" ;; - "Mac OS X"|"macOS"|"iPhone OS"|BSD|FreeMiNT) - boot=$(sysctl -n kern.boottime) - boot=${boot/\{ sec = } - boot=${boot/,*} + *) + # Get uptime in seconds. + case "$os" in + "Linux" | "Windows" | "MINIX") + seconds="$(< /proc/uptime)" + seconds="${seconds/.*}" + ;; - # Get current date in seconds. - now=$(date +%s) - s=$((now - boot)) - ;; + "Mac OS X" | "iPhone OS" | "BSD" | "FreeMiNT") + boot="$(sysctl -n kern.boottime)" + boot="${boot/'{ sec = '}" + boot="${boot/,*}" - Solaris) - s=$(kstat -p unix:0:system_misc:snaptime | awk '{print $2}') - s=${s/.*} - ;; + # Get current date in seconds. + now="$(date +%s)" + seconds="$((now - boot))" + ;; - AIX|IRIX) - t=$(LC_ALL=POSIX ps -o etime= -p 1) + "Solaris") + seconds="$(kstat -p unix:0:system_misc:snaptime | awk '{print $2}')" + seconds="${seconds/.*}" + ;; - [[ $t == *-* ]] && { d=${t%%-*}; t=${t#*-}; } - [[ $t == *:*:* ]] && { h=${t%%:*}; t=${t#*:}; } + "AIX" | "IRIX") + t="$(LC_ALL=POSIX ps -o etime= -p 1)" + d="0" h="0" + case "$t" in *"-"*) d="${t%%-*}"; t="${t#*-}";; esac + case "$t" in *":"*":"*) h="${t%%:*}"; t="${t#*:}";; esac + h="${h#0}" t="${t#0}" + seconds="$((d*86400 + h*3600 + ${t%%:*}*60 + ${t#*:}))" + ;; + esac - h=${h#0} - t=${t#0} + days="$((seconds / 60 / 60 / 24)) days" + hours="$((seconds / 60 / 60 % 24)) hours" + mins="$((seconds / 60 % 60)) minutes" - s=$((${d:-0}*86400 + ${h:-0}*3600 + ${t%%:*}*60 + ${t#*:})) - ;; + # Format the days, hours and minutes. + strip_date() { + case "$1" in + "0 "*) unset "${1/* }" ;; + "1 "*) printf "%s" "${1/s}" ;; + *) printf "%s" "$1" ;; + esac + } - Haiku) - s=$(($(system_time) / 1000000)) + days="$(strip_date "$days")" + hours="$(strip_date "$hours")" + mins="$(strip_date "$mins")" + + uptime="${days:+$days, }${hours:+$hours, }${mins}" + uptime="${uptime%', '}" + uptime="${uptime:-${seconds} seconds}" ;; esac - d="$((s / 60 / 60 / 24)) days" - h="$((s / 60 / 60 % 24)) hours" - m="$((s / 60 % 60)) minutes" - - # Remove plural if < 2. - ((${d/ *} == 1)) && d=${d/s} - ((${h/ *} == 1)) && h=${h/s} - ((${m/ *} == 1)) && m=${m/s} - - # Hide empty fields. - ((${d/ *} == 0)) && unset d - ((${h/ *} == 0)) && unset h - ((${m/ *} == 0)) && unset m - - uptime=${d:+$d, }${h:+$h, }$m - uptime=${uptime%', '} - uptime=${uptime:-$s seconds} - # Make the output of uptime smaller. - case $uptime_shorthand in - on) - uptime=${uptime/ minutes/ mins} - uptime=${uptime/ minute/ min} - uptime=${uptime/ seconds/ secs} + case "$uptime_shorthand" in + "on") + uptime="${uptime/minutes/mins}" + uptime="${uptime/minute/min}" + uptime="${uptime/seconds/secs}" ;; - tiny) - uptime=${uptime/ days/d} - uptime=${uptime/ day/d} - uptime=${uptime/ hours/h} - uptime=${uptime/ hour/h} - uptime=${uptime/ minutes/m} - uptime=${uptime/ minute/m} - uptime=${uptime/ seconds/s} - uptime=${uptime//,} + "tiny") + uptime="${uptime/ days/d}" + uptime="${uptime/ day/d}" + uptime="${uptime/ hours/h}" + uptime="${uptime/ hour/h}" + uptime="${uptime/ minutes/m}" + uptime="${uptime/ minute/m}" + uptime="${uptime/ seconds/s}" + uptime="${uptime//,}" ;; esac } get_packages() { - # to adjust the number of pkgs per pkg manager - pkgs_h=0 + case "$os" in + "Linux" | "BSD" | "iPhone OS" | "Solaris") + type -p pacman-key >/dev/null && \ + packages="$(pacman -Qq --color never | wc -l)" - # has: Check if package manager installed. - # dir: Count files or dirs in a glob. - # pac: If packages > 0, log package manager name. - # tot: Count lines in command output. - has() { type -p "$1" >/dev/null && manager=$1; } - # globbing is intentional here - # shellcheck disable=SC2206 - dir() { pkgs=($@); ((packages+=${#pkgs[@]})); pac "$((${#pkgs[@]}-pkgs_h))"; } - pac() { (($1 > 0)) && { managers+=("$1 (${manager})"); manager_string+="${manager}, "; }; } - tot() { - IFS=$'\n' read -d "" -ra pkgs <<< "$("$@")"; - ((packages+=${#pkgs[@]})); - pac "$((${#pkgs[@]}-pkgs_h))"; - } + type -p dpkg >/dev/null && \ + ((packages+=$(dpkg --get-selections | grep -cv deinstall$))) - # Redefine tot() and dir() for Bedrock Linux. - [[ -f /bedrock/etc/bedrock-release && $PATH == */bedrock/cross/* ]] && { - br_strata=$(brl list) - tot() { - IFS=$'\n' read -d "" -ra pkgs <<< "$(for s in ${br_strata}; do strat -r "$s" "$@"; done)" - ((packages+="${#pkgs[@]}")) - pac "$((${#pkgs[@]}-pkgs_h))"; - } - dir() { - local pkgs=() - # globbing is intentional here - # shellcheck disable=SC2206 - for s in ${br_strata}; do pkgs+=(/bedrock/strata/$s/$@); done - ((packages+=${#pkgs[@]})) - pac "$((${#pkgs[@]}-pkgs_h))" - } - } + type -p pkgtool >/dev/null && \ + ((packages+=$(ls -1 /var/log/packages | wc -l))) - case $os in - Linux|BSD|"iPhone OS"|Solaris) - # Package Manager Programs. - has kiss && tot kiss l - has cpt-list && tot cpt-list - has pacman-key && tot pacman -Qq --color never - has dpkg && tot dpkg-query -f '.\n' -W - has xbps-query && tot xbps-query -l - has apk && tot apk info - has opkg && tot opkg list-installed - has pacman-g2 && tot pacman-g2 -Q - has lvu && tot lvu installed - has tce-status && tot tce-status -i - has pkg_info && tot pkg_info - has pkgin && tot pkgin list - has tazpkg && pkgs_h=6 tot tazpkg list && ((packages-=6)) - has sorcery && tot gaze installed - has alps && tot alps showinstalled - has butch && tot butch list - has swupd && tot swupd bundle-list --quiet - has pisi && tot pisi li - has pacstall && tot pacstall -L + type -p rpm >/dev/null && \ + ((packages+=$(rpm -qa | wc -l))) - # Using the dnf package cache is much faster than rpm. - if has dnf && type -p sqlite3 >/dev/null && [[ -f /var/cache/dnf/packages.db ]]; then - pac "$(sqlite3 /var/cache/dnf/packages.db "SELECT count(pkg) FROM installed")" - else - has rpm && tot rpm -qa + type -p xbps-query >/dev/null && \ + ((packages+=$(xbps-query -l | wc -l))) + + [[ "$os" != "Linux" ]] && type -p pkginfo >/dev/null && \ + ((packages+=$(pkginfo -i | wc -l))) + + type -p emerge >/dev/null && \ + ((packages+=$(ls -d /var/db/pkg/*/* | wc -l))) + + type -p nix-env >/dev/null && \ + ((packages+=$(ls -d -1 /nix/store/*/ | wc -l))) + + type -p guix >/dev/null && \ + ((packages+=$(ls -d -1 /gnu/store/*/ | wc -l))) + + type -p apk >/dev/null && \ + ((packages+=$(apk info | wc -l))) + + type -p opkg >/dev/null && \ + ((packages+=$(opkg list-installed | wc -l))) + + type -p pacman-g2 >/dev/null && \ + ((packages+=$(pacman-g2 -Q | wc -l))) + + type -p lvu >/dev/null && \ + ((packages+=$(lvu installed | wc -l))) + + type -p tce-status >/dev/null && \ + ((packages+=$(tce-status -i | wc -l))) + + type -p Compile >/dev/null && \ + ((packages+=$(ls -d -1 /Programs/*/ | wc -l))) + + type -p eopkg >/dev/null && \ + ((packages+=$(ls -1 /var/lib/eopkg/package | wc -l))) + + type -p pkg_info >/dev/null && \ + ((packages+=$(pkg_info | wc -l))) + + type -p crew >/dev/null && \ + ((packages+=$(ls -l /usr/local/etc/crew/meta/*.filelist | wc -l))) + + type -p tazpkg >/dev/null && \ + ((packages+=$(tazpkg list | wc -l) - 6)) + + type -p sorcery >/dev/null && \ + ((packages+=$(gaze installed | wc -l))) + + type -p alps >/dev/null && \ + ((packages+=$(alps showinstalled | wc -l))) + + type -p kpt >/dev/null && \ + type -p kpm >/dev/null && \ + ((packages+=$(kpm --get-selections | grep -cv deinstall$))) + + if type -p cave >/dev/null; then + package_dir=(/var/db/paludis/repositories/{cross-installed/*,installed}/data/*) + ((packages+=$(ls -d -1 "${package_dir[@]}" | wc -l))) fi - # 'mine' conflicts with minesweeper games. - [[ -f /etc/SDE-VERSION ]] && - has mine && tot mine -q + type -p butch >/dev/null && \ + ((packages+=$(butch list | wc -l))) - # Counting files/dirs. - # Variables need to be unquoted here. Only Bedrock Linux is affected. - # $br_prefix is fixed and won't change based on user input so this is safe either way. - # shellcheck disable=SC2086 - { - shopt -s nullglob - has brew && dir "$(brew --cellar)/* $(brew --caskroom)/*" - has emerge && dir "/var/db/pkg/*/*" - has Compile && dir "/Programs/*/" - has eopkg && dir "/var/lib/eopkg/package/*" - has crew && dir "${CREW_PREFIX:-/usr/local}/etc/crew/meta/*.filelist" - has pkgtool && dir "/var/log/packages/*" - has scratch && dir "/var/lib/scratchpkg/index/*/.pkginfo" - has kagami && dir "/var/lib/kagami/pkgs/*" - has cave && dir "/var/db/paludis/repositories/cross-installed/*/data/*/ \ - /var/db/paludis/repositories/installed/data/*/" - shopt -u nullglob - } + if type -p pkg >/dev/null; then + case "$kernel_name" in + "FreeBSD") ((packages+=$(pkg info | wc -l))) ;; + *) + ((packages+=$(ls -1 /var/db/pkg | wc -l))) + ((packages == 0)) && ((packages+=$(pkg list | wc -l))) + esac + fi + ;; - # Other (Needs complex command) - has kpm-pkg && ((packages+=$(kpm --get-selections | grep -cv deinstall$))) + "Mac OS X" | "MINIX") + [[ -d "/usr/local/bin" ]] && \ + packages="$(($(ls -l /usr/local/bin/ | grep -cv "\(../Cellar/\|brew\)") - 1))" - has guix && { - manager=guix-system && tot guix package -p "/run/current-system/profile" -I - manager=guix-user && tot guix package -I - } + type -p port >/dev/null && \ + ((packages+=$(port installed | wc -l) - 1)) - has nix-store && { - nix-user-pkgs() { - nix-store -qR ~/.nix-profile - nix-store -qR /etc/profiles/per-user/"$USER" - } - manager=nix-system && tot nix-store -qR /run/current-system/sw - manager=nix-user && tot nix-user-pkgs - manager=nix-default && tot nix-store -qR /nix/var/nix/profiles/default - } + type -p brew >/dev/null && \ + ((packages+=$(find /usr/local/Cellar -maxdepth 1 | wc -l) - 1)) - # pkginfo is also the name of a python package manager which is painfully slow. - # TODO: Fix this somehow. - has pkginfo && tot pkginfo -i + type -p pkgin >/dev/null && \ + ((packages+=$(pkgin list | wc -l))) + ;; - case $os-$kernel_name in - BSD-FreeBSD|BSD-DragonFly) - has pkg && tot pkg info - ;; - - BSD-*) - has pkg && dir /var/db/pkg/* - - ((packages == 0)) && - has pkg && tot pkg list - ;; + "Windows") + case "$kernel_name" in + "CYGWIN"*) packages="$(cygcheck -cd | wc -l)" ;; + "MSYS"*) packages="$(pacman -Qq --color never | wc -l)" esac - # List these last as they accompany regular package managers. - has flatpak && tot flatpak list - has spm && tot spm list -i - has puyo && dir ~/.puyo/installed - - # Snap hangs if the command is run without the daemon running. - # Only run snap if the daemon is also running. - has snap && ps -e | grep -qFm 1 snapd >/dev/null && \ - pkgs_h=1 tot snap list && ((packages-=1)) - - # This is the only standard location for appimages. - # See: https://github.com/AppImage/AppImageKit/wiki - manager=appimage && has appimaged && dir ~/.local/bin/*.appimage - ;; - - "Mac OS X"|"macOS"|MINIX) - has port && pkgs_h=1 tot port installed && ((packages-=1)) - has brew && dir "$(brew --cellar)/* $(brew --caskroom)/*" - has pkgin && tot pkgin list - has dpkg && tot dpkg-query -f '.\n' -W - - has nix-store && { - nix-user-pkgs() { - nix-store -qR ~/.nix-profile - nix-store -qR /etc/profiles/per-user/"$USER" - } - manager=nix-system && tot nix-store -qR /run/current-system/sw - manager=nix-user && tot nix-user-pkgs - } - ;; - - AIX|FreeMiNT) - has lslpp && ((packages+=$(lslpp -J -l -q | grep -cv '^#'))) - has rpm && tot rpm -qa - ;; - - Windows) - case $kernel_name in - CYGWIN*) has cygcheck && tot cygcheck -cd ;; - MSYS*) has pacman && tot pacman -Qq --color never ;; - esac - - # Scoop environment throws errors if `tot scoop list` is used - has scoop && pkgs_h=1 dir ~/scoop/apps/* && ((packages-=1)) - # Count chocolatey packages. - [[ -d /cygdrive/c/ProgramData/chocolatey/lib ]] && \ - dir /cygdrive/c/ProgramData/chocolatey/lib/* + [[ -d "/cygdrive/c/ProgramData/chocolatey/lib" ]] && \ + ((packages+=$(ls -1 /cygdrive/c/ProgramData/chocolatey/lib | wc -l))) ;; - Haiku) - has pkgman && dir /boot/system/package-links/* - packages=${packages/pkgman/depot} + "Haiku") + packages="$(ls -1 /boot/system/package-links | wc -l)" ;; - IRIX) - manager=swpkg - pkgs_h=3 tot versions -b && ((packages-=3)) + "AIX") + packages="$(lslpp -J -l -q | grep -cv '^#')" + ((packages+=$(rpm -qa | wc -l))) + ;; + + "IRIX") + packages="$(($(versions -b | wc -l)-3))" + ;; + + "FreeMiNT") + type -p rpm >/dev/null && \ + packages="$(rpm -qa | wc -l)" ;; esac - if ((packages == 0)); then - unset packages - - elif [[ $package_managers == on ]]; then - printf -v packages '%s, ' "${managers[@]}" - packages=${packages%,*} - - elif [[ $package_managers == tiny ]]; then - packages+=" (${manager_string%,*})" - fi - - packages=${packages/pacman-key/pacman} + ((packages == 0)) && unset packages } get_shell() { - case $shell_path in - on) shell="$SHELL " ;; - off) shell="${SHELL##*/} " ;; + case "$shell_path" in + "on") shell="$SHELL " ;; + "off") shell="${SHELL##*/} " ;; esac - [[ $shell_version != on ]] && return + if [[ "$shell_version" == "on" ]]; then + case "${shell_name:=${SHELL##*/}}" in + "bash") shell+="${BASH_VERSION/-*}" ;; + "sh" | "ash" | "dash") ;; - case ${shell_name:=${SHELL##*/}} in - bash) - [[ $BASH_VERSION ]] || - BASH_VERSION=$("$SHELL" -c "printf %s \"\$BASH_VERSION\"") + "mksh" | "ksh") + shell+="$("$SHELL" -c 'printf "%s" "$KSH_VERSION"')" + shell="${shell/ * KSH}" + shell="${shell/version}" + ;; - shell+=${BASH_VERSION/-*} - ;; + "tcsh") + shell+="$("$SHELL" -c 'printf "%s" "$tcsh"')" + ;; - sh|ash|dash|es) ;; + *) + shell+="$("$SHELL" --version 2>&1)" + shell="${shell/ "${shell_name}"}" + ;; + esac - *ksh) - shell+=$("$SHELL" -c "printf %s \"\$KSH_VERSION\"") - shell=${shell/ * KSH} - shell=${shell/version} - ;; - - osh) - if [[ $OIL_VERSION ]]; then - shell+=$OIL_VERSION - else - shell+=$("$SHELL" -c "printf %s \"\$OIL_VERSION\"") - fi - ;; - - tcsh) - shell+=$("$SHELL" -c "printf %s \$tcsh") - ;; - - yash) - shell+=$("$SHELL" --version 2>&1) - shell=${shell/ $shell_name} - shell=${shell/ Yet another shell} - shell=${shell/Copyright*} - ;; - - nu) - shell+=$("$SHELL" -c "version | get version") - shell=${shell/ $shell_name} - ;; - - - *) - shell+=$("$SHELL" --version 2>&1) - shell=${shell/ $shell_name} - ;; - esac - - # Remove unwanted info. - shell=${shell/, version} - shell=${shell/xonsh\//xonsh } - shell=${shell/options*} - shell=${shell/\(*\)} + # Remove unwanted info. + shell="${shell/, version}" + shell="${shell/xonsh\//xonsh }" + shell="${shell/options*}" + shell="${shell/\(*\)}" + fi } get_de() { # If function was run, stop here. ((de_run == 1)) && return - case $os in - "Mac OS X"|"macOS") de=Aqua ;; - - Windows) - case $distro in - *"Windows 10"*) - de=Fluent - ;; - - *"Windows 8"*) - de=Metro - ;; - - *) - de=Aero - ;; + case "$os" in + "Mac OS X") de="Aqua" ;; + "Windows") + case "$distro" in + "Windows 8"* | "Windows 10"*) de="Modern UI/Metro" ;; + *) de="Aero" ;; esac ;; - FreeMiNT) - freemint_wm=(/proc/*) + "FreeMiNT") + get_wm - case ${freemint_wm[*]} in - *thing*) de=Thing ;; - *jinnee*) de=Jinnee ;; - *tera*) de=Teradesk ;; - *neod*) de=NeoDesk ;; - *zdesk*) de=zDesk ;; - *mdesk*) de=mDesk ;; - esac + for files in /proc/*; do + case "$files" in + *thing*) de="Thing" ;; + *jinnee*) de="Jinnee" ;; + *tera*) de="Teradesk" ;; + *neod*) de="NeoDesk" ;; + *zdesk*) de="zDesk" ;; + *mdesk*) de="mDesk" ;; + esac + done ;; *) ((wm_run != 1)) && get_wm - # Temporary support for Regolith Linux - if [[ $DESKTOP_SESSION == *regolith ]]; then - de=Regolith + if [[ "$XDG_CURRENT_DESKTOP" ]]; then + de="${XDG_CURRENT_DESKTOP/'X-'}" + de="${de/Budgie:GNOME/Budgie}" + de="${de/:Unity7:ubuntu}" - elif [[ $XDG_CURRENT_DESKTOP ]]; then - de=${XDG_CURRENT_DESKTOP/X\-} - de=${de/Budgie:GNOME/Budgie} - de=${de/:Unity7:ubuntu} + elif [[ "$DESKTOP_SESSION" ]]; then + de="${DESKTOP_SESSION##*/}" - elif [[ $DESKTOP_SESSION ]]; then - de=${DESKTOP_SESSION##*/} + elif [[ "$GNOME_DESKTOP_SESSION_ID" ]]; then + de="GNOME" - elif [[ $GNOME_DESKTOP_SESSION_ID ]]; then - de=GNOME + elif [[ "$MATE_DESKTOP_SESSION_ID" ]]; then + de="MATE" - elif [[ $MATE_DESKTOP_SESSION_ID ]]; then - de=MATE - - elif [[ $TDE_FULL_SESSION ]]; then - de=Trinity + elif [[ "$TDE_FULL_SESSION" ]]; then + de="Trinity" fi # When a window manager is started from a display manager # the desktop variables are sometimes also set to the # window manager name. This checks to see if WM == DE - # and discards the DE value. - [[ $de == "$wm" ]] && { unset -v de; return; } + # and dicards the DE value. + [[ "$wm" && "$de" =~ ^$wm$ ]] && { unset -v de; return; } ;; esac # Fallback to using xprop. - [[ $DISPLAY && -z $de ]] && type -p xprop &>/dev/null && \ - de=$(xprop -root | awk '/KDE_SESSION_VERSION|^_MUFFIN|xfce4|xfce5/') + [[ "$DISPLAY" && -z "$de" ]] && \ + de="$(xprop -root | awk '/KDE_SESSION_VERSION|^_MUFFIN|xfce4|xfce5/')" # Format strings. - case $de in - KDE_SESSION_VERSION*) de=KDE${de/* = } ;; - *xfce4*) de=Xfce4 ;; - *xfce5*) de=Xfce5 ;; - *xfce*) de=Xfce ;; - *mate*) de=MATE ;; - *GNOME*) de=GNOME ;; - *MUFFIN*) de=Cinnamon ;; + case "$de" in + "KDE_SESSION_VERSION"*) de="KDE${de/* = }" ;; + *"MUFFIN"* | "Cinnamon") de="$(cinnamon --version)"; de="${de:-Cinnamon}" ;; + *"xfce4"*) de="Xfce4" ;; + *"xfce5"*) de="Xfce5" ;; + *"xfce"*) de="Xfce" ;; + *"mate"*) de="MATE" ;; + *"GNOME"*) + de="$(gnome-shell --version)" + de="${de/Shell }" + ;; esac - ((${KDE_SESSION_VERSION:-0} >= 4)) && de=${de/KDE/Plasma} - - if [[ $de_version == on && $de ]]; then - case $de in - Plasma*) de_ver=$(plasmashell --version) ;; - MATE*) de_ver=$(mate-session --version) ;; - Xfce*) de_ver=$(xfce4-session --version) ;; - GNOME*) de_ver=$(gnome-shell --version) ;; - Cinnamon*) de_ver=$(cinnamon --version) ;; - Deepin*) de_ver=$(awk -F'=' '/MajorVersion/ {print $2}' /etc/os-version) ;; - Budgie*) de_ver=$(budgie-desktop --version) ;; - LXQt*) de_ver=$(lxqt-session --version) ;; - Lumina*) de_ver=$(lumina-desktop --version 2>&1) ;; - Trinity*) de_ver=$(tde-config --version) ;; - Unity*) de_ver=$(unity --version) ;; - esac - - de_ver=${de_ver/*TDE:} - de_ver=${de_ver/tde-config*} - de_ver=${de_ver/liblxqt*} - de_ver=${de_ver/Copyright*} - de_ver=${de_ver/)*} - de_ver=${de_ver/* } - de_ver=${de_ver//\"} - - de+=" $de_ver" - fi - - # TODO: - # - New config option + flag: --de_display_server on/off ? - # - Add display of X11, Arcan and anything else relevant. - [[ $de && $WAYLAND_DISPLAY ]] && - de+=" (Wayland)" - + # Log that the function was run. de_run=1 } @@ -1893,131 +1492,95 @@ get_wm() { # If function was run, stop here. ((wm_run == 1)) && return - case $kernel_name in - *OpenBSD*) ps_flags=(x -c) ;; - *) ps_flags=(-e) ;; - esac + if [[ "$WAYLAND_DISPLAY" ]]; then + wm="$(ps -e | grep -m 1 -o -F \ + -e "arcan" \ + -e "asc" \ + -e "clayland" \ + -e "dwc" \ + -e "fireplace" \ + -e "greenfield" \ + -e "grefsen" \ + -e "lipstick" \ + -e "maynard" \ + -e "mazecompositor" \ + -e "motorcar" \ + -e "orbital" \ + -e "orbment" \ + -e "perceptia" \ + -e "rustland" \ + -e "sway" \ + -e "ulubis" \ + -e "velox" \ + -e "wavy" \ + -e "way-cooler" \ + -e "wayfire" \ + -e "wayhouse" \ + -e "westeros" \ + -e "westford" \ + -e "weston")" - if [[ -O "${XDG_RUNTIME_DIR}/${WAYLAND_DISPLAY:-wayland-0}" ]]; then - if tmp_pid="$(lsof -t "${XDG_RUNTIME_DIR}/${WAYLAND_DISPLAY:-wayland-0}" 2>&1)" || - tmp_pid="$(fuser "${XDG_RUNTIME_DIR}/${WAYLAND_DISPLAY:-wayland-0}" 2>&1)"; then - wm="$(ps -p "${tmp_pid}" -ho comm=)" - else - # lsof may not exist, or may need root on some systems. Similarly fuser. - # On those systems we search for a list of known window managers, this can mistakenly - # match processes for another user or session and will miss unlisted window managers. - wm=$(ps "${ps_flags[@]}" | grep -m 1 -o -F \ - -e arcan \ - -e asc \ - -e clayland \ - -e dwc \ - -e fireplace \ - -e gnome-shell \ - -e greenfield \ - -e grefsen \ - -e hikari \ - -e kwin \ - -e lipstick \ - -e maynard \ - -e mazecompositor \ - -e motorcar \ - -e orbital \ - -e orbment \ - -e perceptia \ - -e river \ - -e rustland \ - -e sway \ - -e ulubis \ - -e velox \ - -e wavy \ - -e way-cooler \ - -e wayfire \ - -e wayhouse \ - -e westeros \ - -e westford \ - -e weston) - fi + elif [[ "$DISPLAY" && "$os" != "Mac OS X" && "$os" != "FreeMiNT" ]]; then + id="$(xprop -root -notype _NET_SUPPORTING_WM_CHECK)" + id="${id##* }" + wm="$(xprop -id "$id" -notype -len 100 -f _NET_WM_NAME 8t)" + wm="${wm/*WM_NAME = }" + wm="${wm/\"}" + wm="${wm/\"*}" - elif [[ $DISPLAY && $os != "Mac OS X" && $os != "macOS" && $os != FreeMiNT ]]; then - # non-EWMH WMs. - wm=$(ps "${ps_flags[@]}" | grep -m 1 -o \ - -e "[s]owm" \ - -e "[c]atwm" \ - -e "[f]vwm" \ - -e "[d]wm" \ - -e "[2]bwm" \ - -e "[m]onsterwm" \ - -e "[t]inywm" \ - -e "[x]11fs" \ - -e "[x]monad") + # Window Maker does not set _NET_WM_NAME + [[ "$wm" =~ "WINDOWMAKER" ]] && wm="wmaker" - [[ -z $wm ]] && type -p xprop &>/dev/null && { - id=$(xprop -root -notype _NET_SUPPORTING_WM_CHECK) - id=${id##* } - wm=$(xprop -id "$id" -notype -len 100 -f _NET_WM_NAME 8t) - wm=${wm/*WM_NAME = } - wm=${wm/\"} - wm=${wm/\"*} - } + # Fallback for non-EWMH WMs. + [[ -z "$wm" ]] && \ + wm="$(ps -e | grep -m 1 -o -F \ + -e "catwm" \ + -e "dwm" \ + -e "2bwm" \ + -e "monsterwm" \ + -e "tinywm")" else - case $os in - "Mac OS X"|"macOS") - ps_line=$(ps -e | grep -o \ - -e "[S]pectacle" \ - -e "[A]methyst" \ - -e "[k]wm" \ - -e "[c]hun[k]wm" \ - -e "[y]abai" \ - -e "[R]ectangle") + case "$os" in + "Mac OS X") + ps_line="$(ps -e | grep -o '[S]pectacle\|[A]methyst\|[k]wm\|[c]hun[k]wm')" - case $ps_line in - *chunkwm*) wm=chunkwm ;; - *kwm*) wm=Kwm ;; - *yabai*) wm=yabai ;; - *Amethyst*) wm=Amethyst ;; - *Spectacle*) wm=Spectacle ;; - *Rectangle*) wm=Rectangle ;; - *) wm="Quartz Compositor" ;; + case "$ps_line" in + *"chunkwm"*) wm="chunkwm" ;; + *"kwm"*) wm="Kwm" ;; + *"Amethyst"*) wm="Amethyst" ;; + *"Spectacle"*) wm="Spectacle" ;; + *) wm="Quartz Compositor" ;; esac ;; - Windows) - wm=$( - tasklist | + "Windows") + wm="$(tasklist | grep -m 1 -o -F \ + -e "bugn" \ + -e "Windawesome" \ + -e "blackbox" \ + -e "emerge" \ + -e "litestep")" - grep -Fom 1 \ - -e bugn \ - -e Windawesome \ - -e blackbox \ - -e emerge \ - -e litestep - ) - - [[ $wm == blackbox ]] && - wm="bbLean (Blackbox)" - - wm=${wm:+$wm, }DWM.exe + [[ "$wm" == "blackbox" ]] && wm="bbLean (Blackbox)" + wm="${wm:+$wm, }Explorer" ;; - FreeMiNT) - freemint_wm=(/proc/*) - - case ${freemint_wm[*]} in - *xaaes* | *xaloader*) wm=XaAES ;; - *myaes*) wm=MyAES ;; - *naes*) wm=N.AES ;; - geneva) wm=Geneva ;; - *) wm="Atari AES" ;; - esac + "FreeMiNT") + wm="Atari AES" + for files in /proc/*; do + case "$files" in + *xaaes*) wm="XaAES" ;; + *myaes*) wm="MyAES" ;; + *naes*) wm="N.AES" ;; + geneva) wm="Geneva" ;; + esac + done ;; esac fi - # Rename window managers to their proper values. - [[ $wm == *WINDOWMAKER* ]] && wm=wmaker - [[ $wm == *GNOME*Shell* ]] && wm=Mutter - + # Log that the function was run. wm_run=1 } @@ -2025,174 +1588,161 @@ get_wm_theme() { ((wm_run != 1)) && get_wm ((de_run != 1)) && get_de - case $wm in - E16) - wm_theme=$(awk -F "= " '/theme.name/ {print $2}' "${HOME}/.e16/e_config--0.0.cfg") + case "$wm" in + "E16") + wm_theme="$(awk -F "= " '/theme.name/ {print $2}' "${HOME}/.e16/e_config--0.0.cfg")" ;; - Sawfish) - wm_theme=$(awk -F '\\(quote|\\)' '/default-frame-style/ {print $(NF-4)}' \ - "$HOME/.sawfish/custom") + "Sawfish") + wm_theme="$(awk -F '\\(quote|\\)' '/default-frame-style/ {print $(NF-4)}' \ + "${HOME}/.sawfish/custom")" ;; - Cinnamon|Muffin|"Mutter (Muffin)") - detheme=$(gsettings get org.cinnamon.theme name) - wm_theme=$(gsettings get org.cinnamon.desktop.wm.preferences theme) - wm_theme="$detheme ($wm_theme)" + "Cinnamon" | "Muffin" | "Mutter (Muffin)") + detheme="$(gsettings get org.cinnamon.theme name)" + wm_theme="$(gsettings get org.cinnamon.desktop.wm.preferences theme)" + wm_theme="$detheme (${wm_theme})" ;; - Compiz|Mutter|Gala) + "Compiz" | "Mutter" | "GNOME Shell" | "Gala") if type -p gsettings >/dev/null; then - wm_theme=$(gsettings get org.gnome.shell.extensions.user-theme name) + wm_theme="$(gsettings get org.gnome.shell.extensions.user-theme name)" - [[ ${wm_theme//\'} ]] || \ - wm_theme=$(gsettings get org.gnome.desktop.wm.preferences theme) + [[ -z "${wm_theme//\'}" ]] && \ + wm_theme="$(gsettings get org.gnome.desktop.wm.preferences theme)" elif type -p gconftool-2 >/dev/null; then - wm_theme=$(gconftool-2 -g /apps/metacity/general/theme) + wm_theme="$(gconftool-2 -g /apps/metacity/general/theme)" fi ;; - Metacity*) - if [[ $de == Deepin ]]; then - wm_theme=$(gsettings get com.deepin.wrap.gnome.desktop.wm.preferences theme) + "Metacity"*) + if [[ "$de" == "Deepin" ]]; then + wm_theme="$(gsettings get com.deepin.wrap.gnome.desktop.wm.preferences theme)" - elif [[ $de == MATE ]]; then - wm_theme=$(gsettings get org.mate.Marco.general theme) + elif [[ "$de" == "MATE" ]]; then + wm_theme="$(gsettings get org.mate.Marco.general theme)" else - wm_theme=$(gconftool-2 -g /apps/metacity/general/theme) + wm_theme="$(gconftool-2 -g /apps/metacity/general/theme)" fi ;; - E17|Enlightenment) + "E17" | "Enlightenment") if type -p eet >/dev/null; then - wm_theme=$(eet -d "$HOME/.e/e/config/standard/e.cfg" config |\ - awk '/value \"file\" string.*.edj/ {print $4}') - wm_theme=${wm_theme##*/} - wm_theme=${wm_theme%.*} + wm_theme="$(eet -d "${HOME}/.e/e/config/standard/e.cfg" config |\ + awk '/value \"file\" string.*.edj/ {print $4}')" + wm_theme="${wm_theme##*/}" + wm_theme="${wm_theme%.*}" fi ;; - Fluxbox) - [[ -f $HOME/.fluxbox/init ]] && - wm_theme=$(awk -F "/" '/styleFile/ {print $NF}' "$HOME/.fluxbox/init") + "Fluxbox") + [[ -f "${HOME}/.fluxbox/init" ]] && \ + wm_theme="$(awk -F "/" '/styleFile/ {print $NF}' "${HOME}/.fluxbox/init")" ;; - IceWM*) - [[ -f $HOME/.icewm/theme ]] && - wm_theme=$(awk -F "[\",/]" '!/#/ {print $2}' "$HOME/.icewm/theme") + "IceWM"*) + [[ -f "${HOME}/.icewm/theme" ]] && \ + wm_theme="$(awk -F "[\",/]" '!/#/ {print $2}' "${HOME}/.icewm/theme")" ;; - Openbox) - case $de in - LXDE*) ob_file=lxde-rc ;; - LXQt*) ob_file=lxqt-rc ;; - *) ob_file=rc ;; - esac + "Openbox") + if [[ "$de" == "LXDE" && -f "${HOME}/.config/openbox/lxde-rc.xml" ]]; then + ob_file="lxde-rc" - ob_file=$XDG_CONFIG_HOME/openbox/$ob_file.xml + elif [[ -f "${HOME}/.config/openbox/rc.xml" ]]; then + ob_file="rc" + fi - [[ -f $ob_file ]] && - wm_theme=$(awk '// {while (getline n) {if (match(n, //)) - {l=n; exit}}} END {split(l, a, "[<>]"); print a[3]}' "$ob_file") + wm_theme="$(awk -F "[<,>]" '//dev/null && song="$(mpc -f '%artist% \n%album% \n%title%' current)" || return ;; + *) mpc >/dev/null 2>&1 && song="$(mpc -f '%artist% \n %album% \n %title%' current)" ;; esac - IFS=$'\n' read -d "" -r artist album title <<< "${song//'\n'/$'\n'}" + [[ "$song" != *[a-z]* ]] && { unset -v song; return; } - # Make sure empty tags are truly empty. - artist="$(trim "$artist")" - album="$(trim "$album")" - title="$(trim "$title")" - - # Set default values if no tags were found. - : "${artist:=Unknown Artist}" "${album:=Unknown Album}" "${title:=Unknown Song}" + IFS=$'\n' read -d "" -r artist album title <<< "$song" # Display Artist, Album and Title on separate lines. if [[ "$song_shorthand" == "on" ]]; then - prin "Artist" "$artist" - prin "Album" "$album" - prin "Song" "$title" + [[ "$(trim "$artist")" ]] && prin "Artist" "$artist" + [[ "$(trim "$album")" ]] && prin "Album" "$album" + [[ "$(trim "$song")" ]] && prin "Song" "$title" else - song="${song_format/\%artist\%/$artist}" - song="${song/\%album\%/$album}" - song="${song/\%title\%/$title}" + song="${song_format/\%artist\%/${artist}}" + song="${song/\%album\%/${album}}" + song="${song/\%title\%/${title}}" fi } get_resolution() { - case $os in - "Mac OS X"|"macOS") + case "$os" in + "Mac OS X") if type -p screenresolution >/dev/null; then resolution="$(screenresolution get 2>&1 | awk '/Display/ {printf $6 "Hz, "}')" resolution="${resolution//x??@/ @ }" @@ -3051,90 +2498,61 @@ get_resolution() { ;; "Windows") - IFS=$'\n' read -d "" -ra sw \ - <<< "$(wmic path Win32_VideoController get CurrentHorizontalResolution)" + local width="" + width="$(wmic path Win32_VideoController get CurrentHorizontalResolution)" + width="${width//CurrentHorizontalResolution/}" - IFS=$'\n' read -d "" -ra sh \ - <<< "$(wmic path Win32_VideoController get CurrentVerticalResolution)" + local height="" + height="$(wmic path Win32_VideoController get CurrentVerticalResolution)" + height="${height//CurrentVerticalResolution/}" - sw=("${sw[@]//CurrentHorizontalResolution}") - sh=("${sh[@]//CurrentVerticalResolution}") - - for ((mn = 0; mn < ${#sw[@]}; mn++)) { - [[ ${sw[mn]//[[:space:]]} && ${sh[mn]//[[:space:]]} ]] && - resolution+="${sw[mn]//[[:space:]]}x${sh[mn]//[[:space:]]}, " - } - - resolution=${resolution%,} + [[ "$(trim "$width")" ]] && resolution="${width//[[:space:]]}x${height//[[:space:]]}" ;; "Haiku") - resolution="$(screenmode | awk -F ' |, ' 'END{printf $2 "x" $3 " @ " $6 $7}')" + resolution="$(screenmode | awk -F ' |, ' '{printf $2 "x" $3 " @ " $6 $7}')" [[ "$refresh_rate" == "off" ]] && resolution="${resolution/ @*}" ;; - "FreeMiNT") - # Need to block X11 queries - ;; - *) - if type -p xrandr >/dev/null && [[ $DISPLAY && -z $WAYLAND_DISPLAY ]]; then - case $refresh_rate in + if type -p xrandr >/dev/null; then + case "$refresh_rate" in "on") resolution="$(xrandr --nograb --current |\ - awk 'match($0,/[0-9]*\.[0-9]*\*/) { - printf $1 " @ " substr($0,RSTART,RLENGTH) "Hz, "}')" + awk 'match($0,/[0-9]*\.[0-9]*\*/) {printf $1 " @ "\ + substr($0,RSTART,RLENGTH) "Hz, "}')" ;; "off") resolution="$(xrandr --nograb --current |\ awk -F 'connected |\\+|\\(' \ - '/ connected.*[0-9]+x[0-9]+\+/ && $2 {printf $2 ", "}')" - - resolution="${resolution/primary, }" + '/ connected/ && $2 {printf $2 ", "}')" resolution="${resolution/primary }" ;; esac resolution="${resolution//\*}" - elif type -p xwininfo >/dev/null && [[ $DISPLAY && -z $WAYLAND_DISPLAY ]]; then - read -r w h \ - <<< "$(xwininfo -root | awk -F':' '/Width|Height/ {printf $2}')" - resolution="${w}x${h}" - - elif type -p xdpyinfo >/dev/null && [[ $DISPLAY && -z $WAYLAND_DISPLAY ]]; then + elif type -p xdpyinfo >/dev/null; then resolution="$(xdpyinfo | awk '/dimensions:/ {printf $2}')" - - elif [[ -d /sys/class/drm ]]; then - for dev in /sys/class/drm/*/modes; do - read -r single_resolution _ < "$dev" - - [[ $single_resolution ]] && resolution="${single_resolution}, ${resolution}" - done fi ;; esac - resolution="${resolution%%,}" - resolution="${resolution%%, }" - [[ -z "${resolution/x}" ]] && resolution= + resolution="${resolution%,*}" } get_style() { # Fix weird output when the function is run multiple times. unset gtk2_theme gtk3_theme theme path - if [[ "$DISPLAY" && $os != "Mac OS X" && $os != "macOS" ]]; then + if [[ "$DISPLAY" && "$os" != "Mac OS X" ]]; then # Get DE if user has disabled the function. ((de_run != 1)) && get_de - # Remove version from '$de'. - [[ $de_version == on ]] && de=${de/ *} - # Check for DE Theme. - case $de in - "KDE"* | "Plasma"*) + case "$de" in + "KDE"*) kde_config_dir if [[ -f "${kde_config_dir}/kdeglobals" ]]; then @@ -3147,7 +2565,7 @@ get_style() { kde_font_size="${kde_font_size/,*}" kde_theme="${kde_theme/,*} ${kde_theme/*,} ${kde_font_size}" fi - kde_theme="$kde_theme [$de], " + kde_theme="$kde_theme [KDE], " else err "Theme: KDE config files not found, skipping." fi @@ -3183,11 +2601,8 @@ get_style() { # Check for general GTK2 Theme. if [[ -z "$gtk2_theme" ]]; then - if [[ -n "$GTK2_RC_FILES" ]]; then - IFS=: read -ra rc_files <<< "$GTK2_RC_FILES" - gtk2_theme="$(grep "^[^#]*${name}" "${rc_files[@]}")" - elif [[ -f "${HOME}/.gtkrc-2.0" ]]; then - gtk2_theme="$(grep "^[^#]*${name}" "${HOME}/.gtkrc-2.0")" + if [[ -f "${GTK2_RC_FILES:-${HOME}/.gtkrc-2.0}" ]]; then + gtk2_theme="$(grep "^[^#]*${name}" "${GTK2_RC_FILES:-${HOME}/.gtkrc-2.0}")" elif [[ -f "/etc/gtk-2.0/gtkrc" ]]; then gtk2_theme="$(grep "^[^#]*${name}" /etc/gtk-2.0/gtkrc)" @@ -3197,7 +2612,7 @@ get_style() { fi - gtk2_theme="${gtk2_theme/*${name}*=}" + gtk2_theme="${gtk2_theme/${name}*=}" fi # Check for general GTK3 Theme. @@ -3208,11 +2623,11 @@ get_style() { elif type -p gsettings >/dev/null; then gtk3_theme="$(gsettings get org.gnome.desktop.interface "$gsettings")" - elif [[ -f "/etc/gtk-3.0/settings.ini" ]]; then - gtk3_theme="$(grep "^[^#]*$name" /etc/gtk-3.0/settings.ini)" - elif [[ -f "/usr/share/gtk-3.0/settings.ini" ]]; then gtk3_theme="$(grep "^[^#]*$name" /usr/share/gtk-3.0/settings.ini)" + + elif [[ -f "/etc/gtk-3.0/settings.ini" ]]; then + gtk3_theme="$(grep "^[^#]*$name" /etc/gtk-3.0/settings.ini)" fi gtk3_theme="${gtk3_theme/${name}*=}" @@ -3253,7 +2668,6 @@ get_style() { theme="${theme// '[GTK'[0-9]']'}" theme="${theme/ '[GTK2/3]'}" theme="${theme/ '[KDE]'}" - theme="${theme/ '[Plasma]'}" fi fi } @@ -3296,54 +2710,39 @@ get_term() { # Workaround for macOS systems that # don't support the block below. - case $TERM_PROGRAM in - "iTerm.app") term="iTerm2" ;; + case "$TERM_PROGRAM" in + "iTerm.app") term="iTerm2" ;; "Terminal.app") term="Apple Terminal" ;; - "Hyper") term="HyperTerm" ;; - *) term="${TERM_PROGRAM/\.app}" ;; + "Hyper") term="HyperTerm" ;; + *) term="${TERM_PROGRAM/\.app}" ;; esac # Most likely TosWin2 on FreeMiNT - quick check - [[ "$TERM" == "tw52" || "$TERM" == "tw100" ]] && term="TosWin2" - [[ "$SSH_CONNECTION" ]] && term="$SSH_TTY" - [[ "$WT_SESSION" ]] && term="Windows Terminal" + [[ "$TERM" == "tw52" || "$TERM" == "tw100" ]] && \ + term="TosWin2" # Check $PPID for terminal emulator. while [[ -z "$term" ]]; do - parent="$(get_ppid "$parent")" - [[ -z "$parent" ]] && break - name="$(get_process_name "$parent")" - - case ${name// } in - "${SHELL/*\/}"|*"sh"|"screen"|"su"*|"newgrp") ;; - - "login"*|*"Login"*|"init"|"(init)") - term="$(tty)" - ;; - - "ruby"|"1"|"tmux"*|"systemd"|"sshd"*|"python"*|\ - "USER"*"PID"*|"kdeinit"*|"launchd"*|"bwrap") - break - ;; - - "gnome-terminal-") term="gnome-terminal" ;; - "urxvtd") term="urxvt" ;; - *"nvim") term="Neovim Terminal" ;; - *"NeoVimServer"*) term="VimR Terminal" ;; - - *) - # Fix issues with long process names on Linux. - [[ $os == Linux ]] && term=$(realpath "/proc/$parent/exe") - - term="${name##*/}" - - # Fix wrapper names in Nix. - [[ $term == .*-wrapped ]] && { - term="${term#.}" - term="${term%-wrapped}" - } - ;; - esac + if [[ "$SSH_CONNECTION" ]]; then + term="$SSH_TTY"; break + else + parent="$(get_ppid "$parent")" + [[ -z "$parent" ]] && break + name="$(get_process_name "$parent")" + case "${name// }" in + "${SHELL/*\/}" | *"sh" | "screen" | "su"*) ;; + "login"* | *"Login"* | "init" | "(init)") term="$(tty)" ;; + "ruby" | "1" | "systemd" | "sshd"* | "python"* |\ + "USER"*"PID"* | "kdeinit"* | "launchd"*) + break + ;; + "gnome-terminal-") term="gnome-terminal" ;; + *"nvim") term="Neovim Terminal" ;; + *"NeoVimServer"*) term="VimR Terminal" ;; + *"tmux"*) term="tmux" ;; + *) term="${name##*/}" ;; + esac + fi done # Log that the function was run. @@ -3353,20 +2752,23 @@ get_term() { get_term_font() { ((term_run != 1)) && get_term - case $term in + case "$term" in "alacritty"*) - shopt -s nullglob - confs=({$XDG_CONFIG_HOME,$HOME}/{alacritty,}/{.,}alacritty.ym?) - shopt -u nullglob + if [[ -f "${XDG_CONFIG_HOME}/alacritty.yml" ]]; then + alacritty_file="${XDG_CONFIG_HOME}/alacritty.yml" - [[ -f "${confs[0]}" ]] || return + elif [[ -f "${XDG_CONFIG_HOME}/alacritty/alacritty.yml" ]]; then + alacritty_file="${XDG_CONFIG_HOME}/alacritty/alacritty.yml" - term_font="$(awk '/normal:/ {while (!/family:/ || /#/) - {if (!getline) {exit}} print; exit}' "${confs[0]}")" + elif [[ -f "${HOME}/.alacritty.yml" ]]; then + alacritty_file="${HOME}/.alacritty.yml" + fi + + term_font="$(awk -F ':|#' '/normal:/ {getline; print}' \ + "$alacritty_file")" term_font="${term_font/*family:}" term_font="${term_font/$'\n'*}" term_font="${term_font/\#*}" - term_font="${term_font//\"}" ;; "Apple_Terminal") @@ -3382,7 +2784,7 @@ END # dow" though, but that does not match to a guid in the plist. # So, be warned, collisions may occur! # See: https://groups.google.com/forum/#!topic/iterm2-discuss/0tO3xZ4Zlwg - local current_profile_name profiles_count profile_name diff_font + local current_profile_name profiles_count profile_name diff_font none_ascii current_profile_name="$(osascript </dev/null || + type -p df >/dev/null 2>&1 ||\ { err "Disk requires 'df' to function. Install 'df' to get disk info."; return; } - df_version=$(df --version 2>&1) - - case $df_version in - *IMitv*) df_flags=(-P -g) ;; # AIX - *befhikm*) df_flags=(-P -k) ;; # IRIX - *hiklnP*) df_flags=(-h) ;; # OpenBSD - - *Tracker*) # Haiku + # Get "df" version. + df_version="$(df --version 2>&1)" + case "$df_version" in + *"Tracker"*) # Haiku err "Your version of df cannot be used due to the non-standard flags" return ;; - + *"IMitv"*) df_flags=(-P -g) ;; # AIX + *"befhikm"*) df_flags=(-P -k) ;; # IRIX *) df_flags=(-P -h) ;; esac @@ -3696,71 +3062,52 @@ get_disk() { unset "disks[0]" # Stop here if 'df' fails to print disk info. - [[ ${disks[*]} ]] || { + if [[ -z "${disks[*]}" ]]; then err "Disk: df failed to print the disks, make sure the disk_show array is set properly." return - } + fi for disk in "${disks[@]}"; do # Create a second array and make each element split at whitespace this time. IFS=" " read -ra disk_info <<< "$disk" - disk_perc=${disk_info[${#disk_info[@]} - 2]/\%} + disk_perc="${disk_info[4]/'%'}" - case $disk_percent in - off) disk_perc= + case "$df_version" in + *"befhikm"*) + disk="$((disk_info[2]/1024/1024))G / $((disk_info[1]/1024/1024))G (${disk_perc}%)" + ;; + *) disk="${disk_info[2]/i} / ${disk_info[1]/i} (${disk_perc}%)" ;; esac - case $df_version in - *befhikm*) - disk=$((disk_info[${#disk_info[@]} - 4] / 1024 / 1024))G - disk+=" / " - disk+=$((disk_info[${#disk_info[@]} - 5] / 1024/ 1024))G - disk+=${disk_perc:+ ($disk_perc%)} - ;; - - *) - disk=${disk_info[${#disk_info[@]} - 4]/i} - disk+=" / " - disk+=${disk_info[${#disk_info[@]} - 5]/i} - disk+=${disk_perc:+ ($disk_perc%)} + # Subtitle. + case "$disk_subtitle" in + "name") disk_sub="${disk_info[0]}" ;; + "dir") + disk_sub="${disk_info[5]/*\/}" + [[ -z "$disk_sub" ]] && disk_sub="${disk_info[5]}" ;; + *) disk_sub="${disk_info[5]}" ;; esac - case $disk_subtitle in - name) - disk_sub=${disk_info[*]::${#disk_info[@]} - 5} - ;; - - dir) - disk_sub=${disk_info[${#disk_info[@]} - 1]/*\/} - disk_sub=${disk_sub:-${disk_info[${#disk_info[@]} - 1]}} - ;; - - none) ;; - - *) - disk_sub=${disk_info[${#disk_info[@]} - 1]} - ;; - esac - - case $disk_display in - bar) disk="$(bar "$disk_perc" "100")" ;; - infobar) disk+=" $(bar "$disk_perc" "100")" ;; - barinfo) disk="$(bar "$disk_perc" "100")${info_color} $disk" ;; - perc) disk="${disk_perc}% $(bar "$disk_perc" "100")" ;; + # Bar. + case "$disk_display" in + "bar") disk="$(bar "$disk_perc" "100")" ;; + "infobar") disk+=" $(bar "$disk_perc" "100")" ;; + "barinfo") disk="$(bar "$disk_perc" "100")${info_color} $disk" ;; + "perc") disk="${disk_perc}% $(bar "$disk_perc" "100")" ;; esac # Append '(disk mount point)' to the subtitle. - if [[ "$subtitle" ]]; then - prin "$subtitle${disk_sub:+ ($disk_sub)}" "$disk" + if [[ -z "$subtitle" ]]; then + prin "${disk_sub}" "$disk" else - prin "$disk_sub" "$disk" + prin "${subtitle} (${disk_sub})" "$disk" fi done } get_battery() { - case $os in + case "$os" in "Linux") # We use 'prin' here so that we can do multi battery support # with a single battery per line. @@ -3771,8 +3118,8 @@ get_battery() { if [[ "$capacity" ]]; then battery="${capacity}% [${status}]" - case $battery_display in - "bar") battery="$(bar "$capacity" 100)" ;; + case "$battery_display" in + "bar") battery="$(bar "$capacity" 100)" ;; "infobar") battery+=" $(bar "$capacity" 100)" ;; "barinfo") battery="$(bar "$capacity" 100)${info_color} ${battery}" ;; esac @@ -3785,7 +3132,7 @@ get_battery() { ;; "BSD") - case $kernel_name in + case "$kernel_name" in "FreeBSD"* | "DragonFly"*) battery="$(acpiconf -i 0 | awk -F ':\t' '/Remaining capacity/ {print $2}')" battery_state="$(acpiconf -i 0 | awk -F ':\t\t\t' '/State/ {print $2}')" @@ -3797,26 +3144,19 @@ get_battery() { ;; "OpenBSD"* | "Bitrig"*) - battery0full="$(sysctl -n hw.sensors.acpibat0.watthour0\ - hw.sensors.acpibat0.amphour0)" - battery0full="${battery0full%% *}" + battery0full="$(sysctl -n hw.sensors.acpibat0.watthour0)" + battery0full="${battery0full/ Wh*}" - battery0now="$(sysctl -n hw.sensors.acpibat0.watthour3\ - hw.sensors.acpibat0.amphour3)" - battery0now="${battery0now%% *}" + battery0now="$(sysctl -n hw.sensors.acpibat0.watthour3)" + battery0now="${battery0now/ Wh*}" - state="$(sysctl -n hw.sensors.acpibat0.raw0)" - state="${state##? (battery }" - state="${state%)*}" - - [[ "${state}" == "charging" ]] && battery_state="charging" [[ "$battery0full" ]] && \ battery="$((100 * ${battery0now/\.} / ${battery0full/\.}))%" ;; esac ;; - "Mac OS X"|"macOS") + "Mac OS X") battery="$(pmset -g batt | grep -o '[0-9]*%')" state="$(pmset -g batt | awk '/;/ {print $4}')" [[ "$state" == "charging;" ]] && battery_state="charging" @@ -3825,10 +3165,7 @@ get_battery() { "Windows") battery="$(wmic Path Win32_Battery get EstimatedChargeRemaining)" battery="${battery/EstimatedChargeRemaining}" - battery="$(trim "$battery")%" - state="$(wmic /NameSpace:'\\root\WMI' Path BatteryStatus get Charging)" - state="${state/Charging}" - [[ "$state" == *TRUE* ]] && battery_state="charging" + batttery="$(trim "$battery")%" ;; "Haiku") @@ -3840,55 +3177,28 @@ get_battery() { [[ "$battery_state" ]] && battery+=" Charging" - case $battery_display in - "bar") battery="$(bar "${battery/\%*}" 100)" ;; - "infobar") battery="${battery} $(bar "${battery/\%*}" 100)" ;; - "barinfo") battery="$(bar "${battery/\%*}" 100)${info_color} ${battery}" ;; + case "$battery_display" in + "bar") battery="$(bar "${battery/'%'*}" 100)" ;; + "infobar") battery="${battery} $(bar "${battery/'%'*}" 100)" ;; + "barinfo") battery="$(bar "${battery/'%'*}" 100)${info_color} ${battery}" ;; esac } get_local_ip() { - case $os in + case "$os" in "Linux" | "BSD" | "Solaris" | "AIX" | "IRIX") - if [[ "${local_ip_interface[0]}" == "auto" ]]; then - local_ip="$(ip route get 1 | awk -F'src' '{print $2; exit}')" - local_ip="${local_ip/uid*}" - [[ "$local_ip" ]] || local_ip="$(ifconfig -a | awk '/broadcast/ {print $2; exit}')" - else - for interface in "${local_ip_interface[@]}"; do - local_ip="$(ip addr show "$interface" 2> /dev/null | - awk '/inet / {print $2; exit}')" - local_ip="${local_ip/\/*}" - [[ "$local_ip" ]] || - local_ip="$(ifconfig "$interface" 2> /dev/null | - awk '/broadcast/ {print $2; exit}')" - if [[ -n "$local_ip" ]]; then - prin "$interface" "$local_ip" - else - err "Local IP: Could not detect local ip for $interface" - fi - done - fi + local_ip="$(ip route get 1 | awk -F'src' '{print $2; exit}')" + local_ip="${local_ip/uid*}" + [[ -z "$local_ip" ]] && local_ip="$(ifconfig -a | awk '/broadcast/ {print $2; exit}')" ;; "MINIX") local_ip="$(ifconfig | awk '{printf $3; exit}')" ;; - "Mac OS X" | "macOS" | "iPhone OS") - if [[ "${local_ip_interface[0]}" == "auto" ]]; then - interface="$(route get 1 | awk -F': ' '/interface/ {printf $2; exit}')" - local_ip="$(ipconfig getifaddr "$interface")" - else - for interface in "${local_ip_interface[@]}"; do - local_ip="$(ipconfig getifaddr "$interface")" - if [[ -n "$local_ip" ]]; then - prin "$interface" "$local_ip" - else - err "Local IP: Could not detect local ip for $interface" - fi - done - fi + "Mac OS X" | "iPhone OS") + local_ip="$(ipconfig getifaddr en0)" + [[ -z "$local_ip" ]] && local_ip="$(ipconfig getifaddr en1)" ;; "Windows") @@ -3898,28 +3208,23 @@ get_local_ip() { "Haiku") local_ip="$(ifconfig | awk -F ': ' '/Bcast/ {print $2}')" - local_ip="${local_ip/, Bcast}" + local_ip="${local_ip/', Bcast'}" ;; esac } get_public_ip() { - if [[ ! -n "$public_ip_host" ]] && type -p dig >/dev/null; then + if type -p dig >/dev/null; then public_ip="$(dig +time=1 +tries=1 +short myip.opendns.com @resolver1.opendns.com)" [[ "$public_ip" =~ ^\; ]] && unset public_ip fi - if [[ ! -n "$public_ip_host" ]] && [[ -z "$public_ip" ]] && type -p drill >/dev/null; then - public_ip="$(drill myip.opendns.com @resolver1.opendns.com | \ - awk '/^myip\./ && $3 == "IN" {print $5}')" - fi - if [[ -z "$public_ip" ]] && type -p curl >/dev/null; then - public_ip="$(curl -L --max-time "$public_ip_timeout" -w '\n' "$public_ip_host")" + public_ip="$(curl --max-time 10 -w '\n' "$public_ip_host")" fi if [[ -z "$public_ip" ]] && type -p wget >/dev/null; then - public_ip="$(wget -T "$public_ip_timeout" -qO- "$public_ip_host")" + public_ip="$(wget -T 10 -qO- "$public_ip_host")" fi } @@ -3928,15 +3233,75 @@ get_users() { users="${users%\,*}" } +get_install_date() { + case "$os" in + "Linux" | "iPhone OS") install_file="/lost+found" ;; + "Mac OS X") install_file="/var/log/install.log" ;; + "Solaris") install_file="/var/sadm/system/logs/install_log" ;; + "Windows") + case "$kernel_name" in + "CYGWIN"*) install_file="/cygdrive/c/Windows/explorer.exe" ;; + "MSYS"* | "MINGW"*) install_file="/c/Windows/explorer.exe" ;; + esac + ;; + "Haiku") install_file="/boot" ;; + "BSD" | "MINIX" | "IRIX") + case "$kernel_name" in + "FreeBSD") install_file="/etc/hostid" ;; + "NetBSD" | "DragonFly"*) install_file="/etc/defaults/rc.conf" ;; + *) install_file="/" ;; + esac + ;; + "AIX") install_file="/var/adm/ras/bosinstlog" ;; + esac + + ls_prog="$(ls --version 2>&1)" + case "$ls_prog" in + *"BusyBox"*) + install_date="$(ls -tdce "$install_file" | awk '{printf $10 " " $7 " " $8 " " $9}')" + ;; + + *"crtime"*) # xpg4 (Solaris) + install_date="$(ls -tdcE "$install_file" | awk '{printf $6 " " $7}')" + ;; + + *"ACFHLRSZ"*) # Toybox + install_date="$(ls -dl "$install_file" | awk '{printf $6 " " $7}')" + ;; + + *"GNU coreutils"*) + install_date="$(ls -tcd --full-time "$install_file" | awk '{printf $6 " " $7}')" + ;; + + *"ACFHLNRS"* | *"RadC1xmnlog"*) # AIX ls / IRIX ls + err "Install Date doesn't work because your 'ls' doesn't support full date/time." + return + ;; + + *"HLOPRSTUWabc"*) # macOS ls + install_date="$(ls -dlctUT "$install_file" | awk '{printf $9 " " $6 " "$7 " " $8}')" + ;; + + *) + install_date="$(ls -dlctT "$install_file" | awk '{printf $9 " " $6 " " $7 " " $8}')" + ;; + esac + + install_date="${install_date//-/ }" + install_date="${install_date%:*}" + IFS=" " read -ra install_date <<< "$install_date" + install_date="$(convert_time "${install_date[@]}")" +} + get_locale() { locale="$sys_locale" } get_gpu_driver() { - case $os in + case "$os" in "Linux") gpu_driver="$(lspci -nnk | awk -F ': ' \ - '/Display|3D|VGA/{nr[NR+2]}; NR in nr {printf $2 ", "; exit}')" + '/Display|3D|VGA/{nr[NR+2]}; NR in nr {printf $2 ", "}')" gpu_driver="${gpu_driver%, }" if [[ "$gpu_driver" == *"nvidia"* ]]; then @@ -3945,8 +3310,7 @@ get_gpu_driver() { gpu_driver="NVIDIA ${gpu_driver/ *}" fi ;; - - "Mac OS X"|"macOS") + "Mac OS X") if [[ "$(kextstat | grep "GeForceWeb")" != "" ]]; then gpu_driver="NVIDIA Web Driver" else @@ -3957,24 +3321,20 @@ get_gpu_driver() { } get_cols() { - local blocks blocks2 cols - if [[ "$color_blocks" == "on" ]]; then # Convert the width to space chars. printf -v block_width "%${block_width}s" - # Generate the string. - for ((block_range[0]; block_range[0]<=block_range[1]; block_range[0]++)); do - case ${block_range[0]} in - [0-7]) - printf -v blocks '%b\e[3%bm\e[4%bm%b' \ - "$blocks" "${block_range[0]}" "${block_range[0]}" "$block_width" - ;; + # Set variables. + start="${block_range[0]}" + end="${block_range[1]}" - *) - printf -v blocks2 '%b\e[38;5;%bm\e[48;5;%bm%b' \ - "$blocks2" "${block_range[0]}" "${block_range[0]}" "$block_width" - ;; + # Generate the string. + for ((start; start<=end; start++)); do + case "$start" in + [0-6]) blocks+="${reset}\e[3${start}m\e[4${start}m${block_width}" ;; + 7) blocks+="${reset}\e[3${start}m\e[4${start}m${block_width}" ;; + *) blocks2+="\e[38;5;${start}m\e[48;5;${start}m${block_width}" ;; esac done @@ -3982,25 +3342,26 @@ get_cols() { printf -v block_spaces "%${block_height}s" # Convert the spaces into rows of blocks. - [[ "$blocks" ]] && cols+="${block_spaces// /${blocks}nl}" - [[ "$blocks2" ]] && cols+="${block_spaces// /${blocks2}nl}" + [[ "$blocks" ]] && cols+="${block_spaces// /${blocks}${reset}nl}" + [[ "$blocks2" ]] && cols+="${block_spaces// /${blocks2}${reset}nl}" # Add newlines to the string. - cols=${cols%%nl} - cols=${cols//nl/ -[${text_padding}C${zws}} + cols="${cols%%'nl'}" + cols="${cols//nl/\\n\\e[${text_padding}C${zws}}" # Add block height to info height. - ((info_height+=block_range[1]>7?block_height+2:block_height+1)) + ((info_height+=block_height-1)) - case $col_offset in - "auto") printf '\n\e[%bC%b\n' "$text_padding" "${zws}${cols}" ;; - *) printf '\n\e[%bC%b\n' "$col_offset" "${zws}${cols}" ;; - esac + printf "%b" "\e[${text_padding}C${zws}${cols}" fi unset -v blocks blocks2 cols + # TosWin2 on FreeMiNT is terrible at this, + # so we'll reset colors arbitrarily. + [[ "$term" == "TosWin2" ]] && \ + printf "%b" "\e[30;47m" + # Tell info() that we printed manually. prin=1 } @@ -4008,96 +3369,96 @@ get_cols() { # IMAGES image_backend() { - [[ "$image_backend" != "off" ]] && ! type -p convert &>/dev/null && \ - { image_backend="ascii"; err "Image: Imagemagick not found, falling back to ascii mode."; } + if [[ ! "$image_backend" =~ ^(off|ascii)$ ]]; then + if ! type -p convert >/dev/null 2>&1; then + image_backend="ascii" + err "Image: Imagemagick not found, falling back to ascii mode." + fi + fi - case ${image_backend:-off} in - "ascii") print_ascii ;; + case "${image_backend:-off}" in + "ascii") get_ascii ;; "off") image_backend="off" ;; - "caca" | "catimg" | "chafa" | "jp2a" | "iterm2" | "termpix" |\ - "tycat" | "w3m" | "sixel" | "pixterm" | "kitty" | "pot", | "ueberzug" |\ - "viu") + "caca" | "jp2a" | "iterm2" | "termpix" |\ + "tycat" | "w3m" | "sixel" | "pixterm" | "kitty") get_image_source - [[ ! -f "$image" ]] && { + if [[ ! -f "$image" ]]; then to_ascii "Image: '$image_source' doesn't exist, falling back to ascii mode." return - } - [[ "$image_backend" == "ueberzug" ]] && wait=true; + fi - get_window_size + get_term_size - ((term_width < 1)) && { + if [[ "$term_width" ]] && ((term_width >= 1)); then + printf "\e[2J\e[H" + else to_ascii "Image: Failed to find terminal window size." err "Image: Check the 'Images in the terminal' wiki page for more info," return - } + fi - printf '\e[2J\e[H' get_image_size make_thumbnail - display_image || to_off "Image: $image_backend failed to display the image." + + [[ "$image_backend" == *"w3m"* ]] && zws="\xE2\x80\x8B\x20" + + display_image ;; *) err "Image: Unknown image backend specified '$image_backend'." - err "Image: Valid backends are: 'ascii', 'caca', 'catimg', 'chafa', 'jp2a', 'iterm2', - 'kitty', 'off', 'sixel', 'pot', 'pixterm', 'termpix', - 'tycat', 'w3m', 'viu')" + err "Image: Valid backends are: 'ascii', 'caca', 'jp2a', 'iterm2', 'kitty', + 'off', 'sixel', 'pixterm', 'termpix', 'tycat', 'w3m')" err "Image: Falling back to ascii mode." - print_ascii + get_ascii ;; esac # Set cursor position next image/ascii. - [[ "$image_backend" != "off" ]] && printf '\e[%sA\e[9999999D' "${lines:-0}" + [[ "$image_backend" != "off" ]] && printf "%b" "\e[${lines:-0}A\e[9999999D" } -print_ascii() { - if [[ -f "$image_source" && ! "$image_source" =~ (png|jpg|jpeg|jpe|svg|gif) ]]; then - ascii_data="$(< "$image_source")" - elif [[ "$image_source" == "ascii" || $image_source == auto ]]; then - : +get_ascii() { + if [[ ! -f "$image_source" ]]; then + err "Ascii: Ascii file not found, using distro ascii." else - ascii_data="$image_source" + ascii_data="$(< "$image_source")" fi # Set locale to get correct padding. LC_ALL="$sys_locale" - # Calculate size of ascii file in line length / line count. + # Turn file into variable. while IFS=$'\n' read -r line; do - line=${line//\\\\/\\} - line=${line//█/ } - ((++lines,${#line}>ascii_len)) && ascii_len="${#line}" - done <<< "${ascii_data//\$\{??\}}" + print+="$line \n" - # Fallback if file not found. - ((lines==1)) && { - lines= - ascii_len= - image_source=auto - get_distro_ascii - print_ascii - return - } + # Calculate size of ascii file in line length / line count. + line="${line//[??;?;??m}" + line="${line//[??;?;???m}" + line="${line//}" + line="${line//\$\{??\}}" + line="${line//\\\\/\\}" + ((${#line} > ascii_length)) && ascii_length="${#line}" + ((++lines)) + done <<< "$ascii_data" # Colors. - ascii_data="${ascii_data//\$\{c1\}/$c1}" - ascii_data="${ascii_data//\$\{c2\}/$c2}" - ascii_data="${ascii_data//\$\{c3\}/$c3}" - ascii_data="${ascii_data//\$\{c4\}/$c4}" - ascii_data="${ascii_data//\$\{c5\}/$c5}" - ascii_data="${ascii_data//\$\{c6\}/$c6}" + print="${print//'${c1}'/$c1}" + print="${print//'${c2}'/$c2}" + print="${print//'${c3}'/$c3}" + print="${print//'${c4}'/$c4}" + print="${print//'${c5}'/$c5}" + print="${print//'${c6}'/$c6}" - ((text_padding=ascii_len+gap)) - printf '%b\n' "$ascii_data${reset}" + ((text_padding=ascii_length+gap)) + printf "%b" "$print" LC_ALL=C } get_image_source() { - case $image_source in + case "$image_source" in "auto" | "wall" | "wallpaper") get_wallpaper ;; @@ -4122,8 +3483,8 @@ get_image_source() { } get_wallpaper() { - case $os in - "Mac OS X"|"macOS") + case "$os" in + "Mac OS X") image="$(osascript </dev/null && [[ -f "${HOME}/.cache/wal/wal" ]] && \ - { image="$(< "${HOME}/.cache/wal/wal")"; return; } - - case $de in - "MATE"*) - image="$(gsettings get org.mate.background picture-filename)" - ;; + if type -p wal >/dev/null && [[ -f "${HOME}/.cache/wal/wal" ]]; then + image="$(< "${HOME}/.cache/wal/wal")" + return + fi + case "$de" in + "MATE"*) image="$(gsettings get org.mate.background picture-filename)" ;; "Xfce"*) image="$(xfconf-query -c xfce4-desktop -p \ "/backdrop/screen0/monitor0/workspace0/last-image")" @@ -4167,21 +3530,6 @@ END image="$(decode_url "$image")" ;; - "GNOME"*) - image="$(gsettings get org.gnome.desktop.background picture-uri)" - image="$(decode_url "$image")" - ;; - - "Plasma"*) - image=$XDG_CONFIG_HOME/plasma-org.kde.plasma.desktop-appletsrc - image=$(awk -F '=' '$1 == "Image" { print $2 }' "$image") - ;; - - "LXQt"*) - image="$XDG_CONFIG_HOME/pcmanfm-qt/lxqt/settings.conf" - image="$(awk -F '=' '$1 == "Wallpaper" {print $2}' "$image")" - ;; - *) if type -p feh >/dev/null && [[ -f "${HOME}/.fehbg" ]]; then image="$(awk -F\' '/feh/ {printf $(NF-1)}' "${HOME}/.fehbg")" @@ -4203,7 +3551,7 @@ END esac # Strip un-needed info from the path. - image="${image/file:\/\/}" + image="${image/'file://'}" image="$(trim_quotes "$image")" ;; esac @@ -4224,11 +3572,11 @@ get_w3m_img_path() { err "Image: w3m-img wasn't found on your system" } -get_window_size() { +get_term_size() { # This functions gets the current window size in # pixels. # - # We first try to use the escape sequence "\033[14t" + # We first try to use the escape sequence "\044[14t" # to get the terminal window size in pixels. If this # fails we then fallback to using "xdotool" or other # programs. @@ -4236,28 +3584,22 @@ get_window_size() { # Tmux has a special way of reading escape sequences # so we have to use a slightly different sequence to # get the terminal size. - if [[ "$image_backend" == "tycat" ]]; then - printf '%b' '\e}qs\000' + if [[ -n "$TMUX" ]]; then + printf "%b" "\ePtmux;\e\e[14t\e\e[c\e\\" + read_flags=(-d c) - elif [[ -z $VTE_VERSION ]]; then - case ${TMUX:-null} in - "null") printf '%b' '\e[14t' ;; - *) printf '%b' '\ePtmux;\e\e[14t\e\\ ' ;; - esac + elif [[ "$image_backend" == "tycat" ]]; then + printf "%b" "\e}qs\000" + + else + printf "%b" "\e[14t\e[c" + read_flags=(-d c) fi # The escape codes above print the desired output as # user input so we have to use read to store the out # -put as a variable. - # The 1 second timeout is required for older bash - # - # False positive. - # shellcheck disable=2141 - case $bash_version in - 4|5) IFS=';t' read -d t -t 0.05 -sra term_size ;; - *) IFS=';t' read -d t -t 1 -sra term_size ;; - esac - unset IFS + IFS=";" read -s -t 1 "${read_flags[@]}" -r -a term_size # Split the string into height/width. if [[ "$image_backend" == "tycat" ]]; then @@ -4266,39 +3608,36 @@ get_window_size() { else term_height="${term_size[1]}" - term_width="${term_size[2]}" + term_width="${term_size[2]/t*}" fi - # Get terminal width/height. - if (( "${term_width:-0}" < 50 )) && [[ "$DISPLAY" && $os != "Mac OS X" && $os != "macOS" ]]; then - if type -p xdotool &>/dev/null; then - IFS=$'\n' read -d "" -ra win \ - <<< "$(xdotool getactivewindow getwindowgeometry --shell %1)" - term_width="${win[3]/WIDTH=}" - term_height="${win[4]/HEIGHT=}" + [[ "$image_backend" == "kitty" ]] && \ + IFS=x read -r term_width term_height < <(kitty icat --print-window-size) - elif type -p xwininfo &>/dev/null; then + # Get terminal width/height if \e[14t is unsupported. + if (( "${term_width:-0}" < 50 )) && [[ "$DISPLAY" && "$os" != "Mac OS X" ]]; then + if type -p xdotool >/dev/null 2>&1; then + current_window="$(xdotool getactivewindow)" + source <(xdotool getwindowgeometry --shell "$current_window") + term_height="$HEIGHT" + term_width="$WIDTH" + + elif type -p xwininfo >/dev/null 2>&1; then # Get the focused window's ID. - if type -p xdo &>/dev/null; then - current_window="$(xdo id)" - - elif type -p xprop &>/dev/null; then + if type -p xdpyinfo >/dev/null 2>&1; then + current_window="$(xdpyinfo | grep -E -o "focus:.*0x[0-9a-f]+")" + current_window="${current_window/*window }" + elif type -p xprop >/dev/null 2>&1; then current_window="$(xprop -root _NET_ACTIVE_WINDOW)" current_window="${current_window##* }" - - elif type -p xdpyinfo &>/dev/null; then - current_window="$(xdpyinfo | grep -F "focus:")" - current_window="${current_window/*window }" - current_window="${current_window/,*}" fi # If the ID was found get the window size. if [[ "$current_window" ]]; then - term_size=("$(xwininfo -id "$current_window")") - term_width="${term_size[0]#*Width: }" - term_width="${term_width/$'\n'*}" - term_height="${term_size[0]/*Height: }" - term_height="${term_height/$'\n'*}" + term_size="$(xwininfo -id "$current_window" |\ + awk -F ': ' '/Width|Height/ {printf $2 " "}')" + term_width="${term_size/ *}" + term_height="${term_size/${term_width}}" fi fi fi @@ -4306,21 +3645,16 @@ get_window_size() { term_width="${term_width:-0}" } - -get_term_size() { - # Get the terminal size in cells. +get_image_size() { + # This functions determines the size to make + # the thumbnail image. read -r lines columns <<< "$(stty size)" # Calculate font size. font_width="$((term_width / columns))" font_height="$((term_height / lines))" -} -get_image_size() { - # This functions determines the size to make the thumbnail image. - get_term_size - - case $image_size in + case "$image_size" in "auto") image_size="$((columns * font_width / 2))" term_height="$((term_height - term_height / 4))" @@ -4340,48 +3674,48 @@ get_image_size() { "none") # Get image size so that we can do a better crop. read -r width height <<< "$(identify -format "%w %h" "$image")" - - while ((width >= (term_width / 2) || height >= term_height)); do - ((width=width/2,height=height/2)) - done - crop_mode="none" + + while (( "$width" >= ("$term_width" / 2) || + "$height" >= "$term_height" )); do + width="$((width / 2))" + height="$((height / 2))" + done ;; - *) image_size="${image_size/px}" ;; + *) image_size="${image_size/px}" ;; esac - # Check for terminal padding. - [[ "$image_backend" == "w3m" ]] && term_padding - width="${width:-$image_size}" height="${height:-$image_size}" - text_padding="$(((width + padding + xoffset) / font_width + gap))" + + text_padding="$((width / font_width + gap + xoffset/font_width))" } make_thumbnail() { # Name the thumbnail using variables so we can # use it later. - image_name="${crop_mode}-${crop_offset}-${width}-${height}-${image//\/}" + image_name="$crop_mode-$crop_offset-$width-$height-${image##*/}" # Handle file extensions. - case ${image##*.} in + case "${image##*.}" in "eps"|"pdf"|"svg"|"gif"|"png") image_name+=".png" ;; *) image_name+=".jpg" ;; esac # Create the thumbnail dir if it doesn't exist. - mkdir -p "${thumbnail_dir:=${XDG_CACHE_HOME:-${HOME}/.cache}/thumbnails/neofetch}" + mkdir -p "$thumbnail_dir" - if [[ ! -f "${thumbnail_dir}/${image_name}" ]]; then + # Check to see if the thumbnail exists before we do any cropping. + if [[ ! -f "$thumbnail_dir/$image_name" ]]; then # Get image size so that we can do a better crop. - [[ -z "$size" ]] && { + if [[ -z "$size" ]]; then read -r og_width og_height <<< "$(identify -format "%w %h" "$image")" ((og_height > og_width)) && size="$og_width" || size="$og_height" - } + fi - case $crop_mode in + case "$crop_mode" in "fit") c="$(convert "$image" \ -colorspace srgb \ @@ -4393,9 +3727,9 @@ make_thumbnail() { -trim +repage \ -gravity south \ -background "$c" \ - -extent "${size}x${size}" \ - -scale "${width}x${height}" \ - "${thumbnail_dir}/${image_name}" + -extent "$size"x"$size" \ + -scale "$width"x"$height" \ + "$thumbnail_dir/$image_name" ;; "fill") @@ -4403,154 +3737,119 @@ make_thumbnail() { -background none \ "$image" \ -trim +repage \ - -scale "${width}x${height}^" \ - -extent "${width}x${height}" \ - "${thumbnail_dir}/${image_name}" - ;; - - "none") - cp "$image" "${thumbnail_dir}/${image_name}" + -scale "$width"x"$height"^ \ + -extent "$width"x"$height" \ + "$thumbnail_dir/$image_name" ;; + "none") cp "$image" "$thumbnail_dir/$image_name" ;; *) convert \ -background none \ "$image" \ - -strip \ -gravity "$crop_offset" \ - -crop "${size}x${size}+0+0" \ - -scale "${width}x${height}" \ - "${thumbnail_dir}/${image_name}" + -crop "$size"x"$size"+0+0 \ + -quality 95 \ + -scale "$width"x"$height" \ + "$thumbnail_dir/$image_name" ;; esac fi # The final image. - image="${thumbnail_dir}/${image_name}" + image="$thumbnail_dir/$image_name" } display_image() { - case $image_backend in + case "$image_backend" in "caca") - img2txt \ - -W "$((width / font_width))" \ - -H "$((height / font_height))" \ - --gamma=0.6 \ - "$image" - ;; - - - "ueberzug") - if [ "$wait" = true ];then - wait=false; - else - ueberzug layer --parser bash 0< <( - declare -Ap ADD=(\ - [action]="add"\ - [identifier]="neofetch"\ - [x]=$xoffset [y]=$yoffset\ - [path]=$image\ - ) - read -rs - ) - fi - ;; - - "catimg") - catimg -w "$((width*catimg_size / font_width))" -r "$catimg_size" "$image" - ;; - - "chafa") - chafa --stretch --size="$((width / font_width))x$((height / font_height))" "$image" + img2txt -W "$((width / font_width)))" \ + -H "$((height / font_height))" \ + --gamma=0.6 "$image" ||\ + to_off "Image: libcaca failed to display the image." ;; "jp2a") - jp2a \ - --colors \ - --width="$((width / font_width))" \ - --height="$((height / font_height))" \ - "$image" + jp2a --width="$((width / font_width))" \ + --height="$((height / font_height))" \ + --colors "$image" ||\ + to_off "Image: jp2a failed to display the image." ;; "kitty") - kitty +kitten icat \ - --align left \ - --place "$((width/font_width))x$((height/font_height))@${xoffset}x${yoffset}" \ - "$image" - ;; - - "pot") - pot \ - "$image" \ - --size="$((width / font_width))x$((height / font_height))" + kitty icat \ + --align left \ + --place "$((width / font_width))x$((height / font_height))\ + @${xoffset}x${yoffset}" \ + "$image" ||\ + to_off "Image: kitty failed to display the image." ;; "pixterm") - pixterm \ - -tc "$((width / font_width))" \ - -tr "$((height / font_height))" \ - "$image" + pixterm -tc "$((width / font_width))" \ + -tr "$((height / font_height))" \ + "$image" ||\ + to_off "Image: pixterm failed to display the image." ;; "sixel") - img2sixel \ - -w "$width" \ - -h "$height" \ - "$image" + img2sixel -w "$width" \ + -h "$height" \ + "$image" ||\ + to_off "Image: libsixel failed to display the image." ;; "termpix") - termpix \ - --width "$((width / font_width))" \ - --height "$((height / font_height))" \ - "$image" + termpix --width "$((width / font_width))" \ + --height "$((height / font_height))" \ + "$image" ||\ + to_off "Image: termpix failed to display the image." ;; "iterm2") - printf -v iterm_cmd '\e]1337;File=width=%spx;height=%spx;inline=1:%s' \ - "$width" "$height" "$(base64 < "$image")" + image="$(base64 < "$image")" + iterm_cmd="\e]1337;File=width=${width}px;height=${height}px;inline=1:${image}" # Tmux requires an additional escape sequence for this to work. - [[ -n "$TMUX" ]] && printf -v iterm_cmd '\ePtmux;\e%b\e'\\ "$iterm_cmd" + [[ -n "$TMUX" ]] && iterm_cmd="\ePtmux;\e${iterm_cmd}\e\\" - printf '%b\a\n' "$iterm_cmd" + printf "%b\a\n" "$iterm_cmd" ;; "tycat") - tycat \ - -g "${width}x${height}" \ - "$image" - ;; - - "viu") - viu \ - -t -w "$((width / font_width))" -h "$((height / font_height))" \ - "$image" + tycat -g "${width}x${height}" "$image" ||\ + to_off "Image: tycat failed to display the image." ;; "w3m") get_w3m_img_path - zws='\xE2\x80\x8B\x20' # Add a tiny delay to fix issues with images not # appearing in specific terminal emulators. - ((bash_version>3)) && sleep 0.05 - printf '%b\n%s;\n%s\n' "0;1;$xoffset;$yoffset;$width;$height;;;;;$image" 3 4 |\ - "${w3m_img_path:-false}" -bg "$background_color" &>/dev/null + sleep 0.05 + printf "%b\n" "0;1;$xoffset;$yoffset;$width;$height;;;;;$image\n4;\n3;" |\ + "${w3m_img_path:-false}" -bg "$background_color" >/dev/null 2>&1 ||\ + to_off "Image: w3m-img failed to display the image." ;; esac } to_ascii() { + # Log the error. err "$1" + + # This function makes neofetch fallback to ascii mode. image_backend="ascii" - print_ascii + + # Print the ascii art. + get_ascii # Set cursor position next image/ascii. - printf '\e[%sA\e[9999999D' "${lines:-0}" + printf "%b" "\e[${lines:-0}A\e[9999999D" } to_off() { + # This function makes neofetch fallback to off mode. err "$1" image_backend="off" text_padding= @@ -4573,11 +3872,7 @@ info() { [[ "$prin" ]] && return # Update the variable. - if [[ "$2" ]]; then - output="$(trim "${!2}")" - else - output="$(trim "${!1}")" - fi + output="$(trim "${!2:-${!1}}")" if [[ "$2" && "${output// }" ]]; then prin "$1" "$output" @@ -4595,24 +3890,27 @@ info() { prin() { # If $2 doesn't exist we format $1 as info. if [[ "$(trim "$1")" && "$2" ]]; then - [[ "$json" ]] && { printf ' %s\n' "\"${1}\": \"${2}\","; return; } + [[ "$json" ]] && { printf " %s\n" "\"${1}\": \"${2}\","; return; } string="${1}${2:+: $2}" else string="${2:-$1}" local subtitle_color="$info_color" fi - string="$(trim "${string//$'\e[0m'}")" - length="$(strip_sequences "$string")" - length="${#length}" + + # Log length if it doesn't exist. + if [[ -z "$length" ]]; then + length="$(strip_sequences "$string")" + length="${#length}" + fi # Format the output. - string="${string/:/${reset}${colon_color}${separator:=:}${info_color}}" + string="${string/:/${reset}${colon_color}:${info_color}}" string="${subtitle_color}${bold}${string}" # Print the info. - printf '%b\n' "${text_padding:+\e[${text_padding}C}${zws}${string//\\n}${reset} " + printf "%b\n" "${text_padding:+\e[${text_padding}C}${zws}${string}${reset} " # Calculate info height. ((++info_height)) @@ -4622,25 +3920,36 @@ prin() { } get_underline() { - [[ "$underline_enabled" == "on" ]] && { + if [[ "$underline_enabled" == "on" ]]; then printf -v underline "%${length}s" - printf '%b%b\n' "${text_padding:+\e[${text_padding}C}${zws}${underline_color}" \ + printf "%b%b\n" "${text_padding:+\e[${text_padding}C}${zws}${underline_color}" \ "${underline// /$underline_char}${reset} " - } + unset -v length + fi ((++info_height)) - length= + prin=1 +} + +get_line_break() { + # Print it directly. + printf "%b\n" "${zws}" + + # Calculate info height. + ((++info_height)) + + # Tell info() that we printed manually. prin=1 } get_bold() { - case $ascii_bold in - "on") ascii_bold='\e[1m' ;; + case "$ascii_bold" in + "on") ascii_bold="\e[1m" ;; "off") ascii_bold="" ;; esac - case $bold in - "on") bold='\e[1m' ;; + case "$bold" in + "on") bold="\e[1m" ;; "off") bold="" ;; esac } @@ -4649,7 +3958,7 @@ trim() { set -f # shellcheck disable=2048,2086 set -- $* - printf '%s\n' "${*//[[:space:]]/}" + printf "%s\\n" "${*//[[:space:]]/ }" set +f } @@ -4661,13 +3970,11 @@ trim_quotes() { strip_sequences() { strip="${1//$'\e['3[0-9]m}" - strip="${strip//$'\e['[0-9]m}" - strip="${strip//\\e\[[0-9]m}" strip="${strip//$'\e['38\;5\;[0-9]m}" strip="${strip//$'\e['38\;5\;[0-9][0-9]m}" strip="${strip//$'\e['38\;5\;[0-9][0-9][0-9]m}" - printf '%s\n' "$strip" + printf "%s\n" "$strip" } # COLORS @@ -4715,18 +4022,18 @@ set_text_colors() { bar_color_elapsed="$(color "$bar_color_elapsed")" fi - case ${bar_color_total}${1} in - distro[736]) bar_color_total=$(color "$1") ;; - distro[0-9]) bar_color_total=$(color "$2") ;; - *) bar_color_total=$(color "$bar_color_total") ;; + case "$bar_color_total $1" in + "distro "[736]) bar_color_total="$(color "$1")" ;; + "distro "[0-9]) bar_color_total="$(color "$2")" ;; + *) bar_color_total="$(color "$bar_color_total")" ;; esac } color() { - case $1 in - [0-6]) printf '%b\e[3%sm' "$reset" "$1" ;; - 7 | "fg") printf '\e[37m%b' "$reset" ;; - *) printf '\e[38;5;%bm' "$1" ;; + case "$1" in + [0-6]) printf "%b" "${reset}\e[3${1}m" ;; + 7 | "fg") printf "%b" "\e[37m${reset}" ;; + *) printf "%b" "\e[38;5;${1}m" ;; esac } @@ -4734,14 +4041,22 @@ color() { stdout() { image_backend="off" - unset subtitle_color colon_color info_color underline_color bold title_color at_color \ - text_padding zws reset color_blocks bar_color_elapsed bar_color_total \ - c1 c2 c3 c4 c5 c6 c7 c8 + unset subtitle_color + unset colon_color + unset info_color + unset underline_color + unset bold + unset title_color + unset at_color + unset text_padding + unset zws + unset reset + unset color_blocks + unset get_line_break } err() { - err+="$(color 1)[!]${reset} $1 -" + err+="$(color 1)[!]\e[0m $1\n" } get_full_path() { @@ -4749,13 +4064,13 @@ get_full_path() { # For example "Pictures/Wallpapers" --> "/home/dylan/Pictures/Wallpapers" # If the file exists in the current directory, stop here. - [[ -f "${PWD}/${1}" ]] && { printf '%s\n' "${PWD}/${1}"; return; } + [[ -f "${PWD}/${1/*\/}" ]] && { printf "%s\n" "${PWD}/${1/*\/}"; return; } - ! cd "${1%/*}" && { + if ! cd "${1%/*}"; then err "Error: Directory '${1%/*}' doesn't exist or is inaccessible" err " Check that the directory exists or try another directory." exit 1 - } + fi local full_dir="${1##*/}" @@ -4769,31 +4084,35 @@ get_full_path() { # Final directory. full_dir="$(pwd -P)/${1/*\/}" - [[ -e "$full_dir" ]] && printf '%s\n' "$full_dir" + [[ -e "$full_dir" ]] && printf "%s\n" "$full_dir" } get_user_config() { - # --config /path/to/config.conf + # Check $config_file. if [[ -f "$config_file" ]]; then source "$config_file" err "Config: Sourced user config. (${config_file})" return + fi + mkdir -p "${XDG_CONFIG_HOME}/neofetch/" + + # Check ${XDG_CONFIG_HOME}/neofetch and create the + # dir/files if they don't exist. + if [[ -f "${XDG_CONFIG_HOME}/neofetch/config" ]]; then + config_file="${XDG_CONFIG_HOME}/neofetch/config" elif [[ -f "${XDG_CONFIG_HOME}/neofetch/config.conf" ]]; then - source "${XDG_CONFIG_HOME}/neofetch/config.conf" - err "Config: Sourced user config. (${XDG_CONFIG_HOME}/neofetch/config.conf)" + config_file="${XDG_CONFIG_HOME}/neofetch/config.conf" - elif [[ -f "${XDG_CONFIG_HOME}/neofetch/config" ]]; then - source "${XDG_CONFIG_HOME}/neofetch/config" - err "Config: Sourced user config. (${XDG_CONFIG_HOME}/neofetch/config)" - - elif [[ -z "$no_config" ]]; then + else config_file="${XDG_CONFIG_HOME}/neofetch/config.conf" # The config file doesn't exist, create it. - mkdir -p "${XDG_CONFIG_HOME}/neofetch/" - printf '%s\n' "$config" > "$config_file" + printf "%s\n" "$config" > "$config_file" fi + + source "$config_file" + err "Config: Sourced user config. (${config_file})" } bar() { @@ -4823,9 +4142,9 @@ cache() { } get_cache_dir() { - case $os in - "Mac OS X"|"macOS") cache_dir="/Library/Caches" ;; - *) cache_dir="/tmp" ;; + case "$os" in + "Mac OS X") cache_dir="/Library/Caches" ;; + *) cache_dir="/tmp" ;; esac } @@ -4835,13 +4154,13 @@ kde_config_dir() { if [[ "$kde_config_dir" ]]; then return - elif type -p kf5-config &>/dev/null; then + elif type -p kf5-config >/dev/null 2>&1; then kde_config_dir="$(kf5-config --path config)" - elif type -p kde4-config &>/dev/null; then + elif type -p kde4-config >/dev/null 2>&1; then kde_config_dir="$(kde4-config --path config)" - elif type -p kde-config &>/dev/null; then + elif type -p kde-config >/dev/null 2>&1; then kde_config_dir="$(kde-config --path config)" elif [[ -d "${HOME}/.kde4" ]]; then @@ -4854,33 +4173,16 @@ kde_config_dir() { kde_config_dir="${kde_config_dir/$'/:'*}" } -term_padding() { - # Get terminal padding to properly align cursor. - [[ -z "$term" ]] && get_term - - case $term in - urxvt*|rxvt-unicode) - [[ $xrdb ]] || xrdb=$(xrdb -query) - - [[ $xrdb != *internalBorder:* ]] && - return - - padding=${xrdb/*internalBorder:} - padding=${padding/$'\n'*} - - [[ $padding =~ ^[0-9]+$ ]] || - padding= - ;; - esac -} - dynamic_prompt() { - [[ "$image_backend" == "off" ]] && { printf '\n'; return; } - [[ "$image_backend" != "ascii" ]] && ((lines=(height + yoffset) / font_height + 1)) - [[ "$image_backend" == "w3m" ]] && ((lines=lines + padding / font_height + 1)) + [[ "$image_backend" == "off" ]] && { printf "\n"; return; } + [[ "$image_backend" != "ascii" ]] && lines="$(((height + yoffset) / font_height + 1))" # If the ascii art is taller than the info. - ((lines=lines>info_height?lines-info_height+1:1)) + if ((lines > info_height)); then + lines="$((lines - info_height + 1))" + else + lines=1 + fi printf -v nlines "%${lines}s" printf "%b" "${nlines// /\\n}" @@ -4894,30 +4196,79 @@ cache_uname() { kernel_name="${uname[0]}" kernel_version="${uname[1]}" kernel_machine="${uname[2]}" +} - if [[ "$kernel_name" == "Darwin" ]]; then - # macOS can report incorrect versions unless this is 0. - # https://github.com/dylanaraps/neofetch/issues/1607 - export SYSTEM_VERSION_COMPAT=0 +convert_time() { + # Convert ls timestamp to 'Tue 06 Dec 2016 4:58 PM' format. + year="$1" + day="${3#0}" - IFS=$'\n' read -d "" -ra sw_vers <<< "$(awk -F'<|>' '/key|string/ {print $3}' \ - "/System/Library/CoreServices/SystemVersion.plist")" - for ((i=0;i<${#sw_vers[@]};i+=2)) { - case ${sw_vers[i]} in - ProductName) darwin_name=${sw_vers[i+1]} ;; - ProductVersion) osx_version=${sw_vers[i+1]} ;; - ProductBuildVersion) osx_build=${sw_vers[i+1]} ;; + # Split time into hours/minutes. + hour="${4/:*}" + min="${4/${hour}}" + + # Get month. (Month code is used for day of week) + # Due to different versions of 'ls', the month can be 1, 01 or Jan. + case "$2" in + 1 | 01 | "Jan") month="Jan"; month_code=0 ;; + 2 | 02 | "Feb") month="Feb"; month_code=3 ;; + 3 | 03 | "Mar") month="Mar"; month_code=3 ;; + 4 | 04 | "Apr") month="Apr"; month_code=6 ;; + 5 | 05 | "May") month="May"; month_code=1 ;; + 6 | 06 | "Jun") month="Jun"; month_code=4 ;; + 7 | 07 | "Jul") month="Jul"; month_code=6 ;; + 8 | 08 | "Aug") month="Aug"; month_code=2 ;; + 9 | 09 | "Sep") month="Sep"; month_code=5 ;; + 10 | "Oct") month="Oct"; month_code=0 ;; + 11 | "Nov") month="Nov"; month_code=3 ;; + 12 | "Dec") month="Dec"; month_code=5 ;; + esac + + # Get leap year. + # Source: http://stackoverflow.com/questions/725098/leap-year-calculation + [[ "$((year % 4))" == 0 && "$((year % 100))" != 0 || "$((year % 400))" == 0 ]] && \ + [[ "$month" =~ (Jan|Feb) ]] && \ + leap_code=1 + + # Calculate day of week. + # Source: http://blog.artofmemory.com/how-to-calculate-the-day-of-the-week-4203.html + year_code="$((${year/??} + (${year/??} / 4) % 7))" + week_day="$(((year_code + month_code + 6 + day - leap_code) % 7))" + + case "$week_day" in + 0) week_day="Sun" ;; + 1) week_day="Mon" ;; + 2) week_day="Tue" ;; + 3) week_day="Wed" ;; + 4) week_day="Thu" ;; + 5) week_day="Fri" ;; + 6) week_day="Sat" ;; + esac + + # Convert 24 hour time to 12 hour time + AM/PM. + case "$install_time_format" in + "12h") + case "$hour" in + [0-9] | 0[0-9] | 1[0-1]) time="${hour/00/12}${min} AM" ;; + *) time="$((hour - 12))${min} PM" ;; esac - } - fi + ;; + *) time="$4" ;; + esac + + # Toggle showing the time. + [[ "$install_time" == "off" ]] && unset time + + # Print the install date. + printf "%s" "$week_day $day $month $year $time" } get_ppid() { # Get parent process ID of PID. - case $os in + case "$os" in "Windows") ppid="$(ps -p "${1:-$PPID}" | awk '{printf $2}')" - ppid="${ppid/PPID}" + ppid="${ppid/'PPID'}" ;; "Linux") @@ -4935,10 +4286,10 @@ get_ppid() { get_process_name() { # Get PID name. - case $os in + case "$os" in "Windows") name="$(ps -p "${1:-$PPID}" | awk '{printf $8}')" - name="${name/COMMAND}" + name="${name/'COMMAND'}" name="${name/*\/}" ;; @@ -4962,7 +4313,7 @@ decode_url() { # FINISH UP usage() { printf "%s" "\ -Usage: neofetch func_name --option \"value\" --option \"value\" +Usage: neofetch --option \"value\" --option \"value\" Neofetch is a CLI system information tool written in BASH. Neofetch displays information about your system next to an image, your OS logo, @@ -4973,23 +4324,6 @@ NOTE: Every launch flag has a config option. Options: INFO: - func_name Specify a function name (second part of info() from config) to - quickly display only that function's information. - - Example: neofetch uptime --uptime_shorthand tiny - - Example: neofetch uptime disk wm memory - - This can be used in bars and scripts like so: - - memory=\"\$(neofetch memory)\"; memory=\"\${memory##*: }\" - - For multiple outputs at once (each line of info in an array): - - IFS=\$'\\n' read -d \"\" -ra info < <(neofetch memory uptime wm) - - info=(\"\${info[@]##*: }\") - --disable infoname Allows you to disable an info line from appearing in the output. 'infoname' is the function name from the 'print_info()' function inside the config file. @@ -4997,8 +4331,6 @@ INFO: NOTE: You can supply multiple args. eg. 'neofetch --disable cpu gpu' - --title_fqdn on/off Hide/Show Fully Qualified Domain Name in title. - --package_managers on/off Hide/Show Package Manager names . (on, tiny, off) --os_arch on/off Hide/Show OS architecture. --speed_type type Change the type of cpu speed to display. Possible values: current, min, max, bios, @@ -5025,7 +4357,7 @@ INFO: NOTE: For FreeBSD and NetBSD-based systems, you need to enable coretemp kernel module. This only supports newer Intel processors. - --distro_shorthand on/off Shorten the output of distro (on, tiny, off) + --distro_shorthand on/off Shorten the output of distro (tiny, on, off) NOTE: This option won't work in Windows (Cygwin) @@ -5033,7 +4365,7 @@ INFO: NOTE: This option won't work in BSDs (except PacBSD and PC-BSD) - --uptime_shorthand on/off Shorten the output of uptime (on, tiny, off) + --uptime_shorthand on/off Shorten the output of uptime (tiny, on, off) --refresh_rate on/off Whether to display the refresh rate of each monitor Unsupported on Windows --gpu_brand on/off Enable/Disable GPU brand in output. (AMD/NVIDIA/Intel) @@ -5041,7 +4373,6 @@ INFO: NOTE: This only supports Linux. - --de_version on/off Show/Hide Desktop Environment version --gtk_shorthand on/off Shorten output of gtk theme/icons --gtk2 on/off Enable/Disable gtk2 theme/font/icons output --gtk3 on/off Enable/Disable gtk3 theme/font/icons output @@ -5053,7 +4384,7 @@ INFO: NOTE: Multiple values can be given. (--disk_show '/' '/dev/sdc1') --disk_subtitle type What information to append to the Disk subtitle. - Takes: name, mount, dir, none + Takes: name, mount, dir 'name' shows the disk's name (sda1, sda2, etc) @@ -5061,19 +4392,14 @@ INFO: 'dir' shows the basename of the disks's path. (/, Local Disk, etc) - 'none' shows only 'Disk' or the configured title. - - --disk_percent on/off Hide/Show disk percent. - --ip_host url URL to query for public IP - --ip_timeout int Public IP timeout (in seconds). - --ip_interface value Interface(s) to use for local IP --song_format format Print the song data in a specific format (see config file). --song_shorthand on/off Print the Artist/Album/Title on separate lines. - --memory_percent on/off Display memory percentage. - --memory_unit kib/mib/gib Memory output unit. --music_player player-name Manually specify a player to use. Available values are listed in the config file + --install_time on/off Enable/Disable showing the time in Install Date output. + --install_time_format 12h/24h + Set time format in Install Date to be 12 hour or 24 hour. TEXT FORMATTING: --colors x x x x x x Changes the text colors in this order: @@ -5081,11 +4407,9 @@ TEXT FORMATTING: --underline on/off Enable/Disable the underline. --underline_char char Character to use when underlining title --bold on/off Enable/Disable bold text - --separator string Changes the default ':' separator to the specified string. COLOR BLOCKS: --color_blocks on/off Enable/Disable the color blocks - --col_offset auto/num Left-padding of color blocks --block_width num Width of color blocks in spaces --block_height num Height of color blocks in lines --block_range num num Range of colors to print as blocks @@ -5097,6 +4421,8 @@ BARS: --bar_length num Length in spaces to make the bars. --bar_colors num num Colors to make the bar. Set in this order: elapsed, total + --cpu_display mode Bar mode. + Possible values: bar, infobar, barinfo, off --memory_display mode Bar mode. Possible values: bar, infobar, barinfo, off --battery_display mode Bar mode. @@ -5106,30 +4432,21 @@ BARS: IMAGE BACKEND: --backend backend Which image backend to use. - Possible values: 'ascii', 'caca', 'catimg', 'chafa', 'jp2a', - 'iterm2', 'off', 'sixel', 'tycat', 'w3m', 'kitty', 'viu' + Possible values: 'ascii', 'caca', 'jp2a', 'iterm2', 'off', + 'sixel', 'tycat', 'w3m' --source source Which image or ascii file to use. Possible values: 'auto', 'ascii', 'wallpaper', '/path/to/img', - '/path/to/ascii', '/path/to/dir/', 'command output' [ascii] - + '/path/to/ascii', '/path/to/dir/' --ascii source Shortcut to use 'ascii' backend. - - NEW: neofetch --ascii \"\$(fortune | cowsay -W 30)\" - --caca source Shortcut to use 'caca' backend. - --catimg source Shortcut to use 'catimg' backend. - --chafa source Shortcut to use 'chafa' backend. --iterm2 source Shortcut to use 'iterm2' backend. --jp2a source Shortcut to use 'jp2a' backend. --kitty source Shortcut to use 'kitty' backend. - --pot source Shortcut to use 'pot' backend. --pixterm source Shortcut to use 'pixterm' backend. --sixel source Shortcut to use 'sixel' backend. --termpix source Shortcut to use 'termpix' backend. --tycat source Shortcut to use 'tycat' backend. --w3m source Shortcut to use 'w3m' backend. - --ueberzug source Shortcut to use 'ueberzug' backend - --viu source Shortcut to use 'viu' backend --off Shortcut to use 'off' backend (Disable ascii art). NOTE: 'source; can be any of the following: 'auto', 'ascii', 'wallpaper', '/path/to/img', @@ -5139,63 +4456,30 @@ ASCII: --ascii_colors x x x x x x Colors to print the ascii art --ascii_distro distro Which Distro's ascii art to print - NOTE: AIX, Hash, Alpine, AlterLinux, Amazon, Anarchy, Android, - instantOS, Antergos, antiX, \"AOSC OS\", \"AOSC OS/Retro\", - Apricity, ArchCraft, ArcoLinux, ArchBox, ARCHlabs, ArchStrike, - XFerience, ArchMerge, Arch, Artix, Arya, Bedrock, Bitrig, - BlackArch, BLAG, BlankOn, BlueLight, Bodhi, bonsai, BSD, BunsenLabs, - Calculate, Carbs, CentOS, Chakra, ChaletOS, Chapeau, Chrom, - Cleanjaro, ClearOS, Clear_Linux, Clover, Condres, Container_Linux, - Crystal Linux, CRUX, Cucumber, dahlia, Debian, Deepin, DesaOS, Devuan, - DracOS, DarkOs, Itc, DragonFly, Drauger, Elementary, EndeavourOS, Endless, - EuroLinux, Exherbo, Fedora, Feren, FreeBSD, FreeMiNT, Frugalware, - Funtoo, GalliumOS, Garuda, Gentoo, Pentoo, gNewSense, GNOME, GNU, - GoboLinux, Grombyang, Guix, Haiku, Huayra, Hyperbola, iglunix, janus, Kali, - KaOS, KDE_neon, Kibojoe, Kogaion, Korora, KSLinux, Kubuntu, LEDE, - LaxerOS, LibreELEC, LFS, Linux_Lite, LMDE, Lubuntu, Lunar, macos, - Mageia, MagpieOS, Mandriva, Manjaro, TeArch, Maui, Mer, Minix, LinuxMint, - Live_Raizo, MX_Linux, Namib, Neptune, NetBSD, Netrunner, Nitrux, - NixOS, Nurunner, NuTyX, OBRevenge, OpenBSD, openEuler, OpenIndiana, - openmamba, OpenMandriva, OpenStage, OpenWrt, osmc, Oracle, - OS Elbrus, PacBSD, Parabola, Pardus, Parrot, Parch, TrueOS, - PCLinuxOS, Pengwin, Peppermint, Pisi, popos, Porteus, PostMarketOS, - Proxmox, PuffOS, Puppy, PureOS, Qubes, Qubyt, Quibian, Radix, Raspbian, Reborn_OS, - Redstar, Redcore, Redhat, Refracted_Devuan, Regata, Regolith, Rosa, - sabotage, Sabayon, Sailfish, SalentOS, Scientific, Septor, - SereneLinux, SharkLinux, Siduction, Slackware, SliTaz, SmartOS, - Solus, Source_Mage, Sparky, Star, SteamOS, SunOS, openSUSE_Leap, - t2, openSUSE_Tumbleweed, openSUSE, SwagArch, Tails, Trisquel, - Ubuntu-Cinnamon, Ubuntu-Budgie, Ubuntu-GNOME, Ubuntu-MATE, - Ubuntu-Studio, Ubuntu, Univention, Venom, Void, VNux, LangitKetujuh, semc, - Obarun, windows10, Windows7, Xubuntu, Zorin, and IRIX have ascii logos. + NOTE: Arch and Ubuntu have 'old' logo variants. - NOTE: Arch, Ubuntu, Redhat, Fedora and Dragonfly have 'old' logo variants. - - NOTE: Use '{distro name}_old' to use the old logos. + NOTE: Use 'arch_old' or 'ubuntu_old' to use the old logos. NOTE: Ubuntu has flavor variants. - NOTE: Change this to Lubuntu, Kubuntu, Xubuntu, Ubuntu-GNOME, - Ubuntu-Studio, Ubuntu-Mate or Ubuntu-Budgie to use the flavors. + NOTE: Change this to 'Lubuntu', 'Xubuntu', 'Ubuntu-GNOME', + 'Ubuntu-Studio' or 'Ubuntu-Budgie' to use the flavors. - NOTE: Arcolinux, Dragonfly, Fedora, Alpine, Arch, Ubuntu, - CRUX, Debian, Gentoo, FreeBSD, Mac, NixOS, OpenBSD, android, - Artix, CentOS, Cleanjaro, ElementaryOS, GUIX, Hyperbola, - Manjaro, MXLinux, NetBSD, Parabola, POP_OS, PureOS, - Slackware, SunOS, LinuxLite, OpenSUSE, Raspbian, - postmarketOS, and Void have a smaller logo variant. + NOTE: Alpine, Arch, CRUX, Debian, Gentoo, FreeBSD, Mac, NixOS, + OpenBSD, and Void have a smaller logo variant. NOTE: Use '{distro name}_small' to use the small variants. --ascii_bold on/off Whether or not to bold the ascii logo. -L, --logo Hide the info text and only show the ascii logo. + Possible values: bar, infobar, barinfo, off + IMAGE: --loop Redraw the image constantly until Ctrl+C is used. This fixes issues in some terminals emulators when using image mode. --size 00px | --size 00% How to size the image. Possible values: auto, 00px, 00%, none - --catimg_size 1/2 Change the resolution of catimg. --crop_mode mode Which crop mode to use Takes the values: normal, fit, fill --crop_offset value Change the crop offset for normal mode. @@ -5218,7 +4502,6 @@ IMAGE: OTHER: --config /path/to/config Specify a path to a custom config file --config none Launch the script without a config file - --no_config Don't create the user config file. --print_config Print the default config file to stdout. --stdout Turn off all colors and disables any ASCII/image backend. --help Print this text and exit @@ -5238,13 +4521,11 @@ exit 1 get_args() { # Check the commandline flags early for '--config'. - [[ "$*" != *--config* && "$*" != *--no_config* ]] && get_user_config + [[ "$*" != *--config* ]] && get_user_config while [[ "$1" ]]; do - case $1 in + case "$1" in # Info - "--title_fqdn") title_fqdn="$2" ;; - "--package_managers") package_managers="$2" ;; "--os_arch") os_arch="$2" ;; "--cpu_cores") cpu_cores="$2" ;; "--cpu_speed") cpu_speed="$2" ;; @@ -5257,41 +4538,27 @@ get_args() { "--gpu_brand") gpu_brand="$2" ;; "--gpu_type") gpu_type="$2" ;; "--refresh_rate") refresh_rate="$2" ;; - "--de_version") de_version="$2" ;; "--gtk_shorthand") gtk_shorthand="$2" ;; "--gtk2") gtk2="$2" ;; "--gtk3") gtk3="$2" ;; "--shell_path") shell_path="$2" ;; "--shell_version") shell_version="$2" ;; "--ip_host") public_ip_host="$2" ;; - "--ip_timeout") public_ip_timeout="$2" ;; - "--ip_interface") - unset local_ip_interface - for arg in "$@"; do - case "$arg" in - "--ip_interface") ;; - "-"*) break ;; - *) local_ip_interface+=("$arg") ;; - esac - done - ;; - "--song_format") song_format="$2" ;; "--song_shorthand") song_shorthand="$2" ;; "--music_player") music_player="$2" ;; - "--memory_percent") memory_percent="$2" ;; - "--memory_unit") memory_unit="$2" ;; + "--install_time") install_time="$2" ;; + "--install_time_format") install_time_format="$2" ;; "--cpu_temp") cpu_temp="$2" [[ "$cpu_temp" == "on" ]] && cpu_temp="C" ;; "--disk_subtitle") disk_subtitle="$2" ;; - "--disk_percent") disk_percent="$2" ;; "--disk_show") unset disk_show for arg in "$@"; do - case $arg in + case "$arg" in "--disk_show") ;; "-"*) break ;; *) disk_show+=("$arg") ;; @@ -5301,7 +4568,7 @@ get_args() { "--disable") for func in "$@"; do - case $func in + case "$func" in "--disable") continue ;; "-"*) break ;; *) @@ -5316,7 +4583,7 @@ get_args() { "--colors") unset colors for arg in "$2" "$3" "$4" "$5" "$6" "$7"; do - case $arg in + case "$arg" in "-"*) break ;; *) colors+=("$arg") ;; esac @@ -5328,14 +4595,12 @@ get_args() { "--underline") underline_enabled="$2" ;; "--underline_char") underline_char="$2" ;; "--bold") bold="$2" ;; - "--separator") separator="$2" ;; # Color Blocks "--color_blocks") color_blocks="$2" ;; "--block_range") block_range=("$2" "$3") ;; "--block_width") block_width="$2" ;; "--block_height") block_height="$2" ;; - "--col_offset") col_offset="$2" ;; # Bars "--bar_char") @@ -5350,6 +4615,7 @@ get_args() { bar_color_total="$3" ;; + "--cpu_display") cpu_display="$2" ;; "--memory_display") memory_display="$2" ;; "--battery_display") battery_display="$2" ;; "--disk_display") disk_display="$2" ;; @@ -5357,11 +4623,10 @@ get_args() { # Image backend "--backend") image_backend="$2" ;; "--source") image_source="$2" ;; - "--ascii" | "--caca" | "--catimg" | "--chafa" | "--jp2a" | "--iterm2" | "--off" |\ - "--pot" | "--pixterm" | "--sixel" | "--termpix" | "--tycat" | "--w3m" | "--kitty" |\ - "--ueberzug" | "--viu") + "--ascii" | "--caca" | "--jp2a" | "--iterm2" | "--off" | "--pixterm" |\ + "--sixel" | "--termpix" | "--tycat" | "--w3m" | "--kitty") image_backend="${1/--}" - case $2 in + case "$2" in "-"* | "") ;; *) image_source="$2" ;; esac @@ -5370,7 +4635,6 @@ get_args() { # Image options "--loop") image_loop="on" ;; "--image_size" | "--size") image_size="$2" ;; - "--catimg_size") catimg_size="$2" ;; "--crop_mode") crop_mode="$2" ;; "--crop_offset") crop_offset="$2" ;; "--xoffset") xoffset="$2" ;; @@ -5387,7 +4651,7 @@ get_args() { "--ascii_colors") unset ascii_colors for arg in "$2" "$3" "$4" "$5" "$6" "$7"; do - case $arg in + case "$arg" in "-"*) break ;; *) ascii_colors+=("$arg") esac @@ -5398,17 +4662,18 @@ get_args() { "--ascii_distro") image_backend="ascii" ascii_distro="$2" + case "$2" in "-"* | "") ascii_distro="$distro" ;; esac ;; "--ascii_bold") ascii_bold="$2" ;; "--logo" | "-L") image_backend="ascii" - print_info() { printf '\n'; } + print_info() { info line_break; } ;; # Other "--config") - case $2 in + case "$2" in "none" | "off" | "") ;; *) config_file="$(get_full_path "$2")" @@ -5416,14 +4681,13 @@ get_args() { ;; esac ;; - "--no_config") no_config="on" ;; "--stdout") stdout="on" ;; "-v") verbose="on" ;; - "--print_config") printf '%s\n' "$config"; exit ;; + "--print_config") printf "%s\\n" "$config"; exit ;; "-vv") set -x; verbose="on" ;; "--help") usage ;; "--version") - printf '%s\n' "Neofetch $version" + printf "%s\\n" "Neofetch $version" exit 1 ;; "--gen-man") @@ -5434,12 +4698,12 @@ get_args() { "--json") json="on" - unset -f get_title get_cols get_underline + unset -f get_title get_cols get_line_break get_underline - printf '{\n' + printf "{\n" print_info 2>/dev/null - printf ' %s\n' "\"Version\": \"${version}\"" - printf '}\n' + printf " %s\n" "\"Version\": \"${version}\"" + printf "}\n" exit ;; @@ -5467,6 +4731,7 @@ get_args() { info "GPU Driver" gpu_driver info "Memory" memory + info "CPU Usage" cpu_usage info "Disk" disk info "Battery" battery info "Font" font @@ -5474,8 +4739,11 @@ get_args() { info "Local IP" local_ip info "Public IP" public_ip info "Users" users + info "Install Date" install_date + info line_break info cols + info line_break # Testing. prin "prin" @@ -5488,13 +4756,10 @@ get_args() { refresh_rate="on" shell_version="on" + cpu_display="infobar" memory_display="infobar" disk_display="infobar" cpu_temp="C" - - # Known implicit unused variables. - mpc_args=() - printf '%s\n' "$kernel $icons $font $battery $locale ${mpc_args[*]}" ;; esac @@ -5502,30 +4767,11 @@ get_args() { done } -get_simple() { - while [[ "$1" ]]; do - [[ "$(type -t "get_$1")" == "function" ]] && { - get_distro - stdout - simple=1 - info "$1" "$1" - } - shift - done - ((simple)) && exit -} - -old_functions() { - # Removed functions for backwards compatibility. - get_line_break() { :; } - get_cpu_usage() { :; } -} - get_distro_ascii() { # This function gets the distro ascii art and colors. # # $ascii_distro is the same as $distro. - case $(trim "$ascii_distro") in + case "$( trim "$ascii_distro")" in "AIX"*) set_colors 2 7 read -rd '' ascii_data <<'EOF' @@ -5552,64 +4798,6 @@ h//NNNNh ossss` +h md- .hm/ `sNNNNN:+y EOF ;; - "Aperio GNU/Linux"*) - set_colors 255 - read -rd '' ascii_data <<'EOF' -${c2} - _.._ _ ._.. _ -(_][_)(/,[ |(_) - | GNU/Linux -EOF - ;; - - "Hash"*) - set_colors 123 - read -rd '' ascii_data <<'EOF' -${c1} - - + ###### + - ### ###### ### - ##### ###### ##### - ###### ###### ###### - -####### '"###### '"######## -####### ###### ######## -####### ###### ######## - - ###### '"###### '"###### - ##### ###### ##### - ### ###### ### - ~ ###### ~ - -EOF - ;; - - "AlmaLinux"*) - set_colors 1 3 4 2 6 - read -rd '' ascii_data <<'EOF' -${c1} 'c:. -${c1} lkkkx, .. ${c2}.. ,cc, -${c1} okkkk:ckkx' ${c2}.lxkkx.okkkkd -${c1} .:llcokkx' ${c2}:kkkxkko:xkkd, -${c1} .xkkkkdood: ${c2};kx, .lkxlll; -${c1} xkkx. ${c2}xk' xkkkkk: -${c1} 'xkx. ${c2}xd .....,. -${c3} .. ${c1}:xkl' ${c2}:c ..''.. -${c3} .dkx' ${c1}.:ldl:'. ${c2}' ${c4}':lollldkkxo; -${c3} .''lkkko' ${c4}ckkkx. -${c3}'xkkkd:kkd. .. ${c5};' ${c4}:kkxo. -${c3},xkkkd;kk' ,d; ${c5}ld. ${c4}':dkd::cc, -${c3} .,,.;xkko'.';lxo. ${c5}dx, ${c4}:kkk'xkkkkc -${c3} 'dkkkkkxo:. ${c5};kx ${c4}.kkk:;xkkd. -${c3} ..... ${c5}.;dk:. ${c5}lkk. ${c4}:;, - ${c5}:kkkkkkkdoxkkx - ,c,,;;;:xkkd. - ;kkkkl... - ;kkkkl - ,od; -EOF - ;; - "alpine_small") set_colors 4 7 read -rd '' ascii_data <<'EOF' @@ -5648,32 +4836,6 @@ hdddyo+ohddyosdddddddddho+oydddy++ohdddh EOF ;; - "Alter"*) - set_colors 6 6 - read -rd '' ascii_data <<'EOF' -${c1} %, - ^WWWw - 'wwwwww - !wwwwwwww - #`wwwwwwwww - @wwwwwwwwwwww - wwwwwwwwwwwwwww - wwwwwwwwwwwwwwwww - wwwwwwwwwwwwwwwwwww - wwwwwwwwwwwwwwwwwwww, - w~1i.wwwwwwwwwwwwwwwww, - 3~:~1lli.wwwwwwwwwwwwwwww. - :~~:~?ttttzwwwwwwwwwwwwwwww - #<~:~~~~?llllltO-.wwwwwwwwwww - #~:~~:~:~~?ltlltlttO-.wwwwwwwww - @~:~~:~:~:~~(zttlltltlOda.wwwwwww - @~:~~: ~:~~:~:(zltlltlO a,wwwwww - 8~~:~~:~~~~:~~~~_1ltltu ,www - 5~~:~~:~~:~~:~~:~~~_1ltq N,, - g~:~~:~~~:~~:~~:~:~~~~1q N, -EOF - ;; - "Amazon"*) set_colors 3 7 read -rd '' ascii_data <<'EOF' @@ -5698,6 +4860,7 @@ dMMMMMMMMMMMMMMMMh yMMMMMMMMMMMMMMMMd `-+shy shs+:` EOF ;; + "Anarchy"*) set_colors 7 4 read -rd '' ascii_data <<'EOF' @@ -5732,18 +4895,6 @@ EOF EOF ;; - "android_small"*) - set_colors 2 7 - read -rd '' ascii_data <<'EOF' -${c1} ;, ,; - ';,.-----.,;' - ,' ', - / O O \\ -| | -'-----------------' -EOF - ;; - "Android"*) set_colors 2 7 read -rd '' ascii_data <<'EOF' @@ -5768,34 +4919,6 @@ ${c1} -o o- EOF ;; - "instantOS"*) - set_colors 4 6 - read -rd '' ascii_data <<'EOF' - -${c1} - 'cx0XWWMMWNKOd:'. - .;kNMMMMMMMMMMMMMWNKd' - 'kNMMMMMMWNNNWMMMMMMMMXo. -,0MMMMMW0o;'..,:dKWMMMMMWx. -OMMMMMXl. .xNMMMMMNo -WMMMMNl .kWWMMMMO' -MMMMMX; oNWMMMMK, -NMMMMWo .OWMMMMMK, -kWMMMMNd. ,kWMMMMMMK, -'kWMMMMWXxl:;;:okNMMMMMMMMK, - .oXMMMMMMMWWWMMMMMMMMMMMMK, - 'oKWMMMMMMMMMMMMMMMMMMMK, - .;lxOKXXXXXXXXXXXXXXXO;...... - ................,d0000000kd:. - .kMMMMMMMMMW0; - .kMMMMMMMMMMMX - .xMMMMMMMMMMMW - cXMMMMMMMMMM0 - :0WMMMMMMNx, - .o0NMWNOc. -EOF - ;; - "Antergos"*) set_colors 4 6 read -rd '' ascii_data <<'EOF' @@ -5840,31 +4963,7 @@ ${c1} EOF ;; - "AOSC OS/Retro"*) - set_colors 4 7 1 3 - read -rd '' ascii_data <<'EOF' -${c2} ......... - ................... - .....................${c1}################${c2} - .............. ....${c1}################${c2} -.............. ...${c1}################${c2} -............. ..${c1}****************${c2} -............ . .${c1}****************${c2} -........... ... ${c1}................${c2} -.......... ..... ${c1}...............${c2} -......... ....... ... - .${c3}...... ${c2}. - ${c3}..... .....${c2}.... ${c4}........... - ${c3}.... ......${c2}. ${c4}........... - ${c3}... ....... ${c4}........... - ${c3}................ ${c4}*********** - ${c3}................ ${c4}########### - ${c3}**************** - ${c3}################ -EOF - ;; - - "AOSC OS"*) + "AOSC"*) set_colors 4 7 1 read -rd '' ascii_data <<'EOF' ${c2} .:+syhhhhys+:. @@ -5914,47 +5013,6 @@ dhhyys+/-` EOF ;; - "Archcraft"*) - set_colors 6 6 7 1 - read -rd '' ascii_data <<'EOF' -${c1} -m: - :NMM+ .+ - +MMMMMo -NMy - sMMMMMMMy -MMMMh` - yMMMMMMMMMd` oMMMMd` - `dMMMMMMMMMMMm. /MMMMm- - .mMMMMMm-dMMMMMN- :NMMMN: - -NMMMMMd` yMMMMMN: .mMMMM/ - :NMMMMMy sMMMMMM+ `dMMMMo - +MMMMMMs +MMMMMMs `hMMMMy - oMMMMMMMds- :NMMMMMy sMMMMh` - yMMMMMNoydMMmo` -NMMMMMd` +MMMMd. - `dMMMMMN- `:yNNs` .mMMMMMm. /MMMMm- - .mMMMMMm. :hN/ `dMMMMMN- -NMMMN: - -NMMMMMd` -hh` `yMMMMMN: .mMMMM/ - :NMMMMMy `s` :h. oMMMMMM+ `----- - +MMMMMMo .dMm. `o. +MMMMMMo -sMMMMMM+ .mMMMN: :` :NMMMMMy -EOF - ;; - - "arcolinux_small"*) - set_colors 7 4 - read -rd '' ascii_data <<'EOF' -${c2} A - ooo - ooooo - ooooooo - ooooooooo - ooooo ooooo - ooooo ooooo - ooooo ooooo - ooooo ${c1}${c2} - ooooo ${c1}${c2} -ooooo ${c1}${c2} -EOF - ;; - "ArcoLinux"*) set_colors 7 4 read -rd '' ascii_data <<'EOF' @@ -5984,13 +5042,13 @@ EOF "arch_small") set_colors 6 7 1 read -rd '' ascii_data <<'EOF' -${c1} /\\ - / \\ - /\\ \\ -${c2} / \\ - / ,, \\ - / | | -\\ -/_-'' ''-_\\ +${c1} /\ + /^^\ + /\ \ + /${c2} __ \ + / ( ) \ + / __| |__\\\ +/// \\\\\ EOF ;; @@ -6068,29 +5126,6 @@ ${c1} 'c' EOF ;; - "ArchStrike"*) - set_colors 8 6 - read -rd '' ascii_data <<'EOF' -${c1}                   *    -                  **. -                 **** -                ****** -                ******* -              ** ******* -             **** ******* -            ${c1}****${c2}_____${c1}***${c2}/${c1}* -           ***${c2}/${c1}*******${c2}//${c1}*** -          **${c2}/${c1}********${c2}///${c1}*${c2}/${c1}** -         **${c2}/${c1}*******${c2}////${c1}***${c2}/${c1}** -        **${c2}/${c1}****${c2}//////.,${c1}****${c2}/${c1}** -       ***${c2}/${c1}*****${c2}/////////${c1}**${c2}/${c1}*** -      ****${c2}/${c1}****    ${c2}/////${c1}***${c2}/${c1}**** -     ******${c2}/${c1}*** ${c2}////   ${c1}**${c2}/${c1}****** -    ********${c2}/${c1}* ${c2}///      ${c1}*${c2}/${c1}******** -  ,******     ${c2}// ______ /    ${c1}******, -EOF - ;; - *"XFerience"*) set_colors 6 6 7 1 read -rd '' ascii_data <<'EOF' @@ -6167,42 +5202,28 @@ ${c2} .oossssso-````/ossssss+` EOF ;; - "artix_small"*) - set_colors 6 6 7 1 - read -rd '' ascii_data <<'EOF' -${c1} /\\ - / \\ - /`'.,\\ - / ', - / ,`\\ - / ,.'`. \\ -/.,'` `'.\\ -EOF - ;; - "Artix"*) - set_colors 6 6 7 1 + set_colors 6 4 2 7 read -rd '' ascii_data <<'EOF' -${c1} ' - 'o' - 'ooo' - 'ooxoo' - 'ooxxxoo' - 'oookkxxoo' - 'oiioxkkxxoo' - ':;:iiiioxxxoo' - `'.;::ioxxoo' - '-. `':;jiooo' - 'oooio-.. `'i:io' - 'ooooxxxxoio:,. `'-;' - 'ooooxxxxxkkxoooIi:-. `' - 'ooooxxxxxkkkkxoiiiiiji' - 'ooooxxxxxkxxoiiii:'` .i' - 'ooooxxxxxoi:::'` .;ioxo' - 'ooooxooi::'` .:iiixkxxo' - 'ooooi:'` `'';ioxxo' - 'i:'` '':io' -'` `' +${c1} d${c2}c. +${c1} x${c2}dc. +${c1} '.${c4}.${c1} d${c2}dlc. +${c1} c${c2}0d:${c1}o${c2}xllc; +${c1} :${c2}0ddlolc,lc, +${c1} :${c1}ko${c4}.${c1}:${c2}0ddollc..dlc. +${c1} ;${c1}K${c2}kxoOddollc' cllc. +${c1} ,${c1}K${c2}kkkxdddllc, ${c4}.${c2}lll: +${c1} ,${c1}X${c2}kkkddddlll;${c3}...';${c1}d${c2}llll${c3}dxk: +${c1} ,${c1}X${c2}kkkddddllll${c3}oxxxddo${c2}lll${c3}oooo, +${c3} xxk${c1}0${c2}kkkdddd${c1}o${c2}lll${c1}o${c3}ooooooolooooc;${c1}. +${c3} ddd${c2}kkk${c1}d${c2}ddd${c1}ol${c2}lc:${c3}:;,'.${c3}... .${c2}lll; +${c1} .${c3}xd${c1}x${c2}kk${c1}xd${c2}dl${c1}'cl:${c4}. ${c2}.llc, +${c1} .${c1}0${c2}kkkxddl${c4}. ${c2};'${c4}. ${c2};llc. +${c1} .${c1}K${c2}Okdcddl${c4}. ${c2}cllc${c4}. +${c1} 0${c2}Okd''dc. .cll; +${c1} k${c2}Okd' .llc, +${c1} d${c2}Od, 'lc. +${c1} :,${c4}. ${c2}... EOF ;; @@ -6227,52 +5248,6 @@ ${c1}:syyyyyy/ :yyyyyy/${c2}-yyo.:syyyyyyyyyyy EOF ;; - "AsteroidOS"*) - set_colors 160 208 202 214 - read -rd '' ascii_data <<'EOF' -${c1} *** -${c1} ***** -${c1} ********** -${c1} *************** -${c1} *///****////****////. -${c2} (/////// /////// ///////( -${c2} /(((((//* //, //((((((. -${c2} ((((((((((( ((( (((((((( -${c2} *((((((((((((((((((((((( (((((((( -${c3} (((((#(((((((#((((( ((#((((( -${c3} (#(#(#####(#(#, ####(#(# -${c3} ######### ######## -${c3} /######## ######## -${c4} #######%####### -${c4} (#%%%%%%%# -${c4} %%%%% -${c4} %%% -EOF - ;; - - "Bedrock"*) - set_colors 8 7 - read -rd '' ascii_data <<'EOF' -${c1}-------------------------------------- --------------------------------------- --------------------------------------- ----${c2}\\\\\\\\\\\\\\\\\\\\\\\\${c1}----------------------- -----${c2}\\\\\\ \\\\\\${c1}---------------------- ------${c2}\\\\\\ \\\\\\${c1}--------------------- -------${c2}\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\${c1}------ --------${c2}\\\\\\ \\\\\\${c1}----- ---------${c2}\\\\\\ \\\\\\${c1}---- ----------${c2}\\\\\\ ______ \\\\\\${c1}--- -----------${c2}\\\\\\ ///${c1}--- ------------${c2}\\\\\\ ///${c1}---- -------------${c2}\\\\\\ ///${c1}----- --------------${c2}\\\\\\////////////////${c1}------ --------------------------------------- --------------------------------------- --------------------------------------- -EOF - ;; - "Bitrig"*) set_colors 2 7 read -rd '' ascii_data <<'EOF' @@ -6296,33 +5271,6 @@ sm/ /ms EOF ;; - "BlackArch"*) - set_colors 1 1 0 1 - read -rd '' ascii_data <<'EOF' -${c3} 00 - 11 - ====${c1} - .${c3}//${c1} - `o${c3}//${c1}: - `+o${c3}//${c1}o: - `+oo${c3}//${c1}oo: - -+oo${c3}//${c1}oo+: - `/:-:+${c3}//${c1}ooo+: - `/+++++${c3}//${c1}+++++: - `/++++++${c3}//${c1}++++++: - `/+++o${c2}ooo${c3}//${c2}ooo${c1}oooo/` -${c2} ${c1}./${c2}ooosssso${c3}//${c2}osssssso${c1}+` -${c2} .oossssso-`${c3}//${c1}`/ossssss+` - -osssssso. ${c3}//${c1} :ssssssso. - :osssssss/ ${c3}//${c1} osssso+++. - /ossssssss/ ${c3}//${c1} +ssssooo/- - `/ossssso+/:- ${c3}//${c1} -:/+osssso+- - `+sso+:-` ${c3}//${c1} `.-/+oso: - `++:. ${c3}//${c1} `-/+/ - .` ${c3}/${c1} `/ -EOF - ;; - "BLAG"*) set_colors 5 7 read -rd '' ascii_data <<'EOF' @@ -6369,77 +5317,6 @@ ${c2} `.:/++++/:.` ${c1}:oys+. EOF ;; - "BlueLight"*) - set_colors 7 4 - read -rd '' ascii_data <<'EOF' -${c1} oMMNMMMMMMMMMMMMMMMMMMMMMM - oMMMMMMMMMMMMMMMMMMMMMMMMM - oMMMMMMMMMMMMMMMMMMMMMMMMM - oMMMMMMMMMMMMMMMMMMMMMMMMM - -+++++++++++++++++++++++mM${c2} - ```````````````````````..${c1}dM${c2} - ```````````````````````....${c1}dM${c2} - ```````````````````````......${c1}dM${c2} - ```````````````````````........${c1}dM${c2} - ```````````````````````..........${c1}dM${c2} - ```````````````````````............${c1}dM${c2} -.::::::::::::::::::::::-..............${c1}dM${c2} - `-+yyyyyyyyyyyyyyyyyyyo............${c1}+mMM${c2} - -+yyyyyyyyyyyyyyyyo..........${c1}+mMMMM${c2} - ./syyyyyyyyyyyyo........${c1}+mMMMMMM${c2} - ./oyyyyyyyyyo......${c1}+mMMMMMMMM${c2} - omdyyyyyyo....${c1}+mMMMMMMMMMM${c2} - ${c1}oMMM${c2}mdhyyo..${c1}+mMMMMMMMMMMMM - oNNNNNNm${c2}dso${c1}mMMMMMMMMMMMMMM -EOF - ;; - - "Bodhi"*) - set_colors 7 11 2 - read -rd '' ascii_data <<'EOF' -${c1}| ${c2},,mmKKKKKKKKWm,, - ${c1}' ${c2},aKKP${c1}LL**********|L*${c2}TKp, - ${c1}t ${c2}aKP${c1}L**``` ```**L${c2}*Kp - IX${c1}EL${c3}L,wwww, ${c1}``*||${c2}Kp - ,#P${c1}L|${c3}KKKpPP@IPPTKmw, ${c1}`*||${c2}K - ,K${c1}LL*${c3}{KKKKKKPPb$KPhpKKPKp ${c1}`||${c2}K - #${c1}PL ${c3}!KKKKKKPhKPPP$KKEhKKKKp ${c1}`||${c2}K -!H${c1}L* ${c3}1KKKKKKKphKbPKKKKKK$KKp ${c1}`|I${c2}W -$${c1}bL ${c3}KKKKKKKKBQKhKbKKKKKKKK ${c1}|I${c2}N -$${c1}bL ${c3}!KKKKKKKKKKNKKKKKKKPP` ${c1}|I${c2}b -TH${c1}L* ${c3}TKKKKKK##KKKN@KKKK^ ${c1}|I${c2}M - K@${c1}L ${c3}*KKKKKKKKKKKEKE5 ${c1}||${c2}K - `NL${c1}L ${c3}`KKKKKKKKKK"```|L ${c1}||${c2}#P - `K@${c1}LL ${c3}`"**"` ${c1}'. :||${c2}#P - Yp${c1}LL ${c1}' |L${c2}$M` - `Tp${c1}pLL, ,|||${c2}p'L - "Kpp${c1}LL++,., ,,|||$${c2}#K* ${c1}'. - ${c2}`"MKWpppppppp#KM"` ${c1}`h, -EOF - ;; - - "bonsai"*) - set_colors 6 2 3 - read -rd '' ascii_data <<'EOF' -${c2} ,####, - ${c2}#######, ${c2},#####, - ${c2}#####',# ${c2}'###### - ${c2}''###'${c3}';,,,'${c2}###' - ${c3} ,; '''' - ${c3} ;;; ${c2},#####, - ${c3} ;;;' ,,;${c2};;### - ${c3} ';;;;''${c2}'####' - ${c3} ;;; - ${c3} ,.;;';'',,, - ${c3} ' ' -${c1} # - # O - ##, ,##,',##, ,## ,#, , - # # # # #''# #,, # # # - '#' '##' # # ,,# '##;, # -EOF - ;; - "BSD") set_colors 1 7 4 3 6 read -rd '' ascii_data <<'EOF' @@ -6514,96 +5391,6 @@ ${c1} ...... ${c2}.,++*****+++${c1}*****************${c2}+++++,.${c1} ${c2},++++++**+++++${c1}***********${c2}+++++++++,${c1} ${c2}.,,,,++++,.. .,,,,,.....,+++,.,,${c1} -EOF - ;; - "Carbs"*) - set_colors 4 5 4 4 4 4 - read -rd '' ascii_data <<'EOF' -${c2} .......... - ..,;:ccccccc:;'.. - ..,clllc:;;;;;:cllc,. - .,cllc,... ..';;'. - .;lol;.. .. - .,lol;. - .coo:. - .'lol,. - .,lol,. - .,lol,. - 'col;. - .:ooc'. - .'col:. - .'cllc'.. .''. - ..:lolc,'.......',cll,. - ..;cllllccccclllc;'. - ...',;;;;;;,,... - ..... -EOF - ;; - - "CBL-Mariner"*) - set_colors 6 - read -rd '' ascii_data <<'EOF' -${c1} . - :- . - :==. .=: - :===: -==: - :-===: .====: - :-====- -=====: - -====== :=======: - -======. .=========: - -======: -==========. - -======- -===========. - :======- :===========. - :=======. .-==========. - :=======: -==========. - :=======- :==========. - :=======- .-========- -:--------. :========- - ..:::--=========- - ..::---================-=- -EOF - ;; - - "CelOS"*) - set_colors 4 6 0 5 - read -rd '' ascii_data <<'EOF' - -${c4} .,cmmmmmmmmmmmc,. - .,cmMMMMMMMMMMMMMMMMMMMMmc. - .cMMMMMMMMMMMMMMMMMMMMMMMMMMMmc. - .cMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMc. - ,:MMM ${c3}####################################${c4} - cMMMMMMmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmc. - .MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM. - .MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMc - "******************************MMMMMMMMMMMMMc: -${c3}#################################### ${c4}MMMMMMMMMMMMMc - "MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM: - "MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM" - 'MMMMMMMMM*******************************: - \"MMMMMM ${c3}##################################### - ${c4}`:MMMMMMmmmmmmmmmmmmmmmmmmmmmmmmmmmmm; - `"MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM" - `":MMMMMMMMMMMMMMMMMMMMMMMMM;' - `":MMMMMMMMMMMMMMMMMMM:" - "************" - - - - -EOF - ;; - - "centos_small"*) - set_colors 3 2 4 5 7 - read -rd '' ascii_data <<'EOF' -${c2} ____${c1}^${c4}____ -${c2} |\\ ${c1}|${c4} /| -${c2} | \\ ${c1}|${c4} / | -${c4}<---- ${c3}----> -${c3} | / ${c2}|${c1} \\ | -${c3} |/__${c2}|${c1}__\\| -${c2} v EOF ;; @@ -6730,89 +5517,6 @@ ${c1} ..,:${c3}dOkxl:. EOF ;; - "cleanjaro_small"*) - set_colors 7 7 - read -rd '' ascii_data <<'EOF' -${c1}█████ ██████████ -█████ ██████████ -█████ -█████ -█████ -████████████████ -████████████████ -EOF - ;; - - "Cleanjaro"*) - set_colors 7 7 - read -rd '' ascii_data <<'EOF' -${c1}███████▌ ████████████████ -███████▌ ████████████████ -███████▌ ████████████████ -███████▌ -███████▌ -███████▌ -███████▌ -███████▌ -█████████████████████████ -█████████████████████████ -█████████████████████████ -▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ -EOF - ;; - - "ClearOS"*) - set_colors 2 - read -rd '' ascii_data <<'EOF' -${c1} `.--::::::--.` - .-:////////////////:-. - `-////////////////////////-` - -////////////////////////////- - `//////////////-..-//////////////` - ./////////////: ://///////////. - `//////:..-////: :////-..-//////` - ://////` -///:.``.:///-` ://///: -`///////:. -////////-` `:///////` -.//:--////:. -////-` `:////--://. -./: .////:. --` `:////- :/. -`//-` .////:. `:////- `-//` - :///-` .////:. `:////- `-///: - `/////-` -///: :///- `-/////` - `//////- `///: :///` .//////` - `:////: `///: :///` -////:` - .://: `///: :///` -//:. - .:: `///: :///` -:. - `///: :///` - `... ...` -EOF - ;; - - "Clear Linux OS"* | "Clear_Linux"*) - set_colors 4 3 7 6 - read -rd '' ascii_data <<'EOF' -${c1} BBB - BBBBBBBBB - BBBBBBBBBBBBBBB - BBBBBBBBBBBBBBBBBBBB - BBBBBBBBBBB BBB - BBBBBBBB${c2}YYYYY -${c1} BBBBBBBB${c2}YYYYYY -${c1} BBBBBBBB${c2}YYYYYYY -${c1} BBBBBBBBB${c2}YYYYY${c3}W -${c4} GG${c1}BBBBBBBY${c2}YYYY${c3}WWW -${c4} GGG${c1}BBBBBBB${c2}YY${c3}WWWWWWWW -${c4} GGGGGG${c1}BBBBBB${c3}WWWWWWWW -${c4} GGGGGGGG${c1}BBBB${c3}WWWWWWWW -${c4}GGGGGGGGGGG${c1}BBB${c3}WWWWWWW -${c4}GGGGGGGGGGGGG${c1}B${c3}WWWWWW -${c4}GGGGGGGG${c3}WWWWWWWWWWW -${c4}GG${c3}WWWWWWWWWWWWWWWW - WWWWWWWWWWWWWWWW - WWWWWWWWWW - WWW -EOF - ;; - "Clover"*) set_colors 2 6 read -rd '' ascii_data <<'EOF' @@ -6839,30 +5543,7 @@ oNMMMMMMMMMMMNs` `sy` `oNMMMMMMMMMMMNo EOF ;; - "Condres"*) - set_colors 2 3 6 - read -rd '' ascii_data <<'EOF' -${c1}syyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy+${c3}.+. -${c1}`oyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy+${c3}:++. -${c2}/o${c1}+oyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy/${c3}oo++. -${c2}/y+${c1}syyyyyyyyyyyyyyyyyyyyyyyyyyyyy${c3}+ooo++. -${c2}/hy+${c1}oyyyhhhhhhhhhhhhhhyyyyyyyyy${c3}+oo+++++. -${c2}/hhh+${c1}shhhhhdddddhhhhhhhyyyyyyy${c3}+oo++++++. -${c2}/hhdd+${c1}oddddddddddddhhhhhyyyys${c3}+oo+++++++. -${c2}/hhddd+${c1}odmmmdddddddhhhhyyyy${c3}+ooo++++++++. -${c2}/hhdddmo${c1}odmmmdddddhhhhhyyy${c3}+oooo++++++++. -${c2}/hdddmmms${c1}/dmdddddhhhhyyys${c3}+oooo+++++++++. -${c2}/hddddmmmy${c1}/hdddhhhhyyyyo${c3}+oooo++++++++++: -${c2}/hhdddmmmmy${c1}:yhhhhyyyyy+${c3}+oooo+++++++++++: -${c2}/hhddddddddy${c1}-syyyyyys+${c3}ooooo++++++++++++: -${c2}/hhhddddddddy${c1}-+yyyy+${c3}/ooooo+++++++++++++: -${c2}/hhhhhdddddhhy${c1}./yo:${c3}+oooooo+++++++++++++/ -${c2}/hhhhhhhhhhhhhy${c1}:-.${c3}+sooooo+++++++++++///: -${c2}:sssssssssssso++${c1}${c3}`:/:--------.```````` -EOF - ;; - - "Container Linux by CoreOS"* | "Container_Linux"*) + "Container Linux by CoreOS"*) set_colors 4 7 1 read -rd '' ascii_data <<'EOF' ${c1} ..... @@ -6888,7 +5569,7 @@ ${c1} ..... EOF ;; - "crux_small"|KISS*) + "crux_small") set_colors 4 5 7 6 read -rd '' ascii_data <<'EOF' ${c1} ___ @@ -6925,107 +5606,10 @@ ${c2} lodd${c1}dolccc${c2}ccox${c1}xoloo EOF ;; - *"Crystal Linux"*) - set_colors 13 5 - read -rd '' ascii_data <<'EOF' -${c1} mysssym -${c1} mysssym -${c1} mysssym -${c1} mysssym -${c1} mysssyd -${c1} mysssyd N -${c1} mysssyd mysym -${c1} mysssyd dysssym -${c1} mysssyd dysssym -${c1} mysssyd dysssym -${c1} mysssyd dysssym -${c1} mysssyd dysssym -${c1} mysssyd dysssym -${c1} mysym dysssym -${c1} N dysssym -${c1} dysssym -${c1} dysssym -${c1} dysssym -${c1} dysssym -${c1} dysssym -EOF - ;; - - *"Cucumber"*) - set_colors 2 3 - read -rd '' ascii_data <<'EOF' -${c1} `.-://++++++//:-.` - `:/+//${c2}::--------${c1}:://+/:` - -++/:${c2}----..........----${c1}:/++- - .++:${c2}---...........-......---${c1}:++. - /+:${c2}---....-::/:/--//:::-....---${c1}:+/ - `++:${c2}--.....:---::/--/::---:.....--${c1}:++` - /+:${c2}--.....--.--::::-/::--.--.....--${c1}:+/ --o:${c2}--.......-:::://--/:::::-.......--${c1}:o- -/+:${c2}--...-:-::---:::..:::---:--:-...--${c1}:+/ -o/:${c2}-...-:.:.-/:::......::/:.--.:-...-${c1}:/o -o/${c2}--...::-:/::/:-......-::::::-/-...-${c1}:/o -/+:${c2}--..-/:/:::--:::..:::--::////-..--${c1}:+/ --o:${c2}--...----::/:::/--/:::::-----...--${c1}:o- - /+:${c2}--....://:::.:/--/:.::://:....--${c1}:+/ - `++:${c2}--...-:::.--.:..:.--.:/:-...--${c1}:++` - /+:${c2}---....----:-..-:----....---${c1}:+/ - .++:${c2}---..................---${c1}:++. - -/+/:${c2}----..........----${c1}:/+/- - `:/+//${c2}::--------:::${c1}/+/:` - `.-://++++++//:-.` -EOF - ;; - - "CyberOS"*) - set_colors 50 32 57 - read -rd '' ascii_data <<'EOF' -${c3} !M$EEEEEEEEEEEP - .MMMMM000000Nr. - ${c3}&MMMMMM${c2}MMMMMMMMMMMMM9 - ${c3}~MMM${c1}MMMM${c2}MMMMMMMMMMMMC - ${c1}" ${c3}M${c1}MMMMMMM${c2}MMMMMMMMMMs - ${c1}iM${c2}MMM&&${c1}MMMMMMMM${c2}MMMMMMMM\\ - ${c1}BMMM${c2}MMMMM${c1}MMMMMMM${c2}MMMMMM${c3}" - ${c1}9MMMMM${c2}MMMMMMM${c1}MMMM${c2}MMMM${c3}MMMf- - ${c2}sMMMMMMMM${c1}MM${c2}M${c3}MMMMMMMMM3_ - ${c2}+ffffffff${c1}P${c3}MMMMMMMMMMMM0 - ${c2}CMMMMMMMMMMM - }MMMMMMMMM - ~MMMMMMM - "RMMMM - .PMB -EOF - ;; - - "dahlia"*) - set_colors 1 7 3 - read -rd '' ascii_data <<'EOF' -${c1} - .#. - *%@@@%* - .,,,,,(&@@@@@@@&/,,,,,. - ,#@@@@@@@@@@@@@@@@@@@@@#. - ,#@@@@@@@&#///#&@@@@@@@#. - ,/%&@@@@@%/, .,(%@@@@@&#/. - *#&@@@@@@#,. .*#@@@@@@&#, - .&@@@@@@@@@( .(@@@@@@@@@&&. -#@@@@@@@@@@( )@@@@@@@@@@@# - °@@@@@@@@@@( .(@@@@@@@@@@@° - *%@@@@@@@(. ,#@@@@@@@%* - ,(&@@@@@@%*. ./%@@@@@@%(, - ,#@@@@@@@&(***(&@@@@@@@#. - ,#@@@@@@@@@@@@@@@@@@@@@#. - ,*****#&@@@@@@@&(*****, - ,/%@@@%/. - ,#, -EOF - ;; - "debian_small") set_colors 1 7 3 read -rd '' ascii_data <<'EOF' -${c1} _____ + ${c1}_____ / __ \\ | / | | \\___- @@ -7039,7 +5623,7 @@ EOF read -rd '' ascii_data <<'EOF' ${c2} _,met$$$$$gg. ,g$$$$$$$$$$$$$$$P. - ,g$$P" """Y$$.". + ,g$$P" """Y$$.". ,$$P' `$$$. ',$$P ,ggs. `$$b: `d$$' ,$P"' ${c1}.${c2} $$$ @@ -7143,55 +5727,11 @@ ${c1} `-:/- EOF ;; - "DarkOs") - set_colors 1 6 5 3 2 - read -rd '' ascii_data <<'EOF' - -${c3}⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⠢⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ -${c1}⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣶⠋⡆⢹⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ -${c5}⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡆⢀⣤⢛⠛⣠⣿⠀⡏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ -${c6}⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣶⣿⠟⣡⠊⣠⣾⣿⠃⣠⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ -${c2}⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣴⣯⣿⠀⠊⣤⣿⣿⣿⠃⣴⣧⣄⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ -${c1}⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣤⣶⣿⣿⡟⣠⣶⣿⣿⣿⢋⣤⠿⠛⠉⢁⣭⣽⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ -${c4} ⠀⠀⠀⠀⠀⠀ ⠀⣠⠖⡭⢉⣿⣯⣿⣯⣿⣿⣿⣟⣧⠛⢉⣤⣶⣾⣿⣿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ -${c5}⠀⠀⠀⠀⠀⠀⠀⠀⣴⣫⠓⢱⣯⣿⢿⠋⠛⢛⠟⠯⠶⢟⣿⣯⣿⣿⣿⣿⣿⣿⣦⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ -${c2}⠀⠀⠀⠀⠀⠀⢀⡮⢁⣴⣿⣿⣿⠖⣠⠐⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠉⠉⠛⠛⠛⢿⣶⣄⠀⠀⠀⠀⠀⠀⠀ -${c3}⠀⠀⠀⠀⢀⣤⣷⣿⣿⠿⢛⣭⠒⠉⠀⠀⠀⣀⣀⣄⣤⣤⣴⣶⣶⣶⣿⣿⣿⣿⣿⠿⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀ -${c1}⠀⢀⣶⠏⠟⠝⠉⢀⣤⣿⣿⣶⣾⣿⣿⣿⣿⣿⣿⣟⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ -${c6}⢴⣯⣤⣶⣿⣿⣿⣿⣿⡿⣿⣯⠉⠉⠉⠉⠀⠀⠀⠈⣿⡀⣟⣿⣿⢿⣿⣿⣿⣿⣿⣦⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ -${c5}⠀⠀⠀⠉⠛⣿⣧⠀⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⠃⣿⣿⣯⣿⣦⡀⠀⠉⠻⣿⣦⠀⠀⠀⠀⠀⠀⠀⠀⠀ -${c3}⠀⠀⠀⠀⠀⠀⠉⢿⣮⣦⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⣿⠀⣯⠉⠉⠛⢿⣿⣷⣄⠀⠈⢻⣆⠀⠀⠀⠀⠀⠀⠀⠀ -${c2}⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠢⠀⠀⠀⠀⠀⠀⠀⢀⢡⠃⣾⣿⣿⣦⠀⠀⠀⠙⢿⣿⣤⠀⠙⣄⠀⠀⠀⠀⠀⠀⠀ -${c6}⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⢋⡟⢠⣿⣿⣿⠋⢿⣄⠀⠀⠀⠈⡄⠙⣶⣈⡄⠀⠀⠀⠀⠀⠀ -${c1}⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠐⠚⢲⣿⠀⣾⣿⣿⠁⠀⠀⠉⢷⡀⠀⠀⣇⠀⠀⠈⠻⡀⠀⠀⠀⠀⠀ -${c4}⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢢⣀⣿⡏⠀⣿⡿⠀⠀⠀⠀⠀⠀⠙⣦⠀⢧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ -${c3}⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⠿⣧⣾⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⣮⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ -${c5}⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠙⠛⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - -EOF - ;; - - "Itc"*) - set_colors 1 - read -rd '' ascii_data <<'EOF' -${c1}....................-==============+... -${c1}....................-==============:... -${c1}...:===========-....-==============:... -${c1}...-===========:....-==============-... -${c1}....*==========+........-::********-... -${c1}....*===========+.:*====**==*+-.-...... -${c1}....:============*+-..--:+**====*---... -${c1}......::--........................::... -${c1}..+-:+-.+::*:+::+:-++::++-.:-.*.:++:++. -${c1}..:-:-++++:-::--:+::-::.:++-++:++--:-:. ⠀⠀⠀⠀⠀ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ -EOF - ;; - "dragonfly_old"*) set_colors 1 7 3 read -rd '' ascii_data <<'EOF' - ${c1} .-. + ${c1} | + .-. ${c3} ()${c1}I${c3}() ${c1} "==.__:-:__.==" "==.__/~|~\__.==" @@ -7214,13 +5754,10 @@ EOF "dragonfly_small"*) set_colors 1 7 3 read -rd '' ascii_data <<'EOF' -${c2} ,${c1}_${c2}, -('-_${c1}|${c2}_-') - >--${c1}|${c2}--< -(_-'${c1}|${c2}'-_) - ${c1}| - | - | +${c2}(\${c3}"${c2}/) +${c2}(/${c1}|${c2}\) +${c1} | + | EOF ;; @@ -7245,40 +5782,6 @@ ${c1} | | EOF ;; - "Drauger"*) - set_colors 1 7 - read -rd '' ascii_data <<'EOF' -${c1} -``- - `:+``+:` - `/++``++/. - .++/. ./++. - :++/` `/++: - `/++: :++/` - ./+/- -/+/. - -++/. ./++- - :++:` `:++: - `/++- -++/` - ./++. ./+/. - -++/` `/++- - :++:` `:++: - `/++- -++/` -.:-.`..............................`.-:. -`.-/++++++++++++++++++++++++++++++++/-.` -EOF - ;; - - "elementary_small"*) - set_colors 4 7 1 - read -rd '' ascii_data <<'EOF' -${c2} _______ - / ____ \\ -/ | / /\\ -|__\\ / / | -\\ /__/ / - \\_______/ -EOF - ;; - "Elementary"*) set_colors 4 7 1 read -rd '' ascii_data <<'EOF' @@ -7302,27 +5805,6 @@ eee eeeeeeeeee eeeeee eee EOF ;; - "EndeavourOS"*) - set_colors 1 5 4 - read -rd '' ascii_data <<'EOF' -${c1} ./${c2}o${c3}. -${c1} ./${c2}sssso${c3}- -${c1} `:${c2}osssssss+${c3}- -${c1} `:+${c2}sssssssssso${c3}/. -${c1} `-/o${c2}ssssssssssssso${c3}/. -${c1} `-/+${c2}sssssssssssssssso${c3}+:` -${c1} `-:/+${c2}sssssssssssssssssso${c3}+/. -${c1} `.://o${c2}sssssssssssssssssssso${c3}++- -${c1} .://+${c2}ssssssssssssssssssssssso${c3}++: -${c1} .:///o${c2}ssssssssssssssssssssssssso${c3}++: -${c1} `:////${c2}ssssssssssssssssssssssssssso${c3}+++. -${c1}`-////+${c2}ssssssssssssssssssssssssssso${c3}++++- -${c1} `..-+${c2}oosssssssssssssssssssssssso${c3}+++++/` - ./++++++++++++++++++++++++++++++/:. - `:::::::::::::::::::::::::------`` -EOF - ;; - "Endless"*) set_colors 1 7 read -rd '' ascii_data <<'EOF' @@ -7349,30 +5831,6 @@ dMm `/++/-``/yNNh+/sdNMNddMm- mMd EOF ;; - "EuroLinux"*) - set_colors 4 7 - read -rd '' ascii_data <<'EOF' -${c1} __ - -wwwWWWWWWWWWwww- - -WWWWWWWWWWWWWWWWWWw- - \WWWWWWWWWWWWWWWWWWW- - _Ww `WWWWWWWWWWWWWWWWWWWw - -W${c2}E${c1}Www -WWWWWWWWW- -_WW${c2}U${c1}WWWW- _WWWWWWWW -_WW${c2}R${c1}WWWWWWWWWWWWWWWWWWWWWWWWWWWWWW- -wWW${c2}O${c1}WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW -WWW${c2}L${c1}WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWw -WWW${c2}I${c1}WWWWWWWWWWWWWWWWWWWWWWWWWWWWww- -wWW${c2}N${c1}WWWWw - WW${c2}U${c1}WWWWWWw - wW${c2}X${c1}WWWWWWWWww - wWWWWWWWWWWWWWWWw - wWWWWWWWWWWWWWWWw - WWWWWWWWWWWWWw - wWWWWWWWw -EOF - ;; - "Exherbo"*) set_colors 4 7 1 read -rd '' ascii_data <<'EOF' @@ -7401,22 +5859,7 @@ KX '0XdKMMK;.xMMMk, .0MMMMMXx; ... EOF ;; - "fedora_small") - set_colors 12 - read -rd '' ascii_data <<'EOF' -${c1} ,'''''. - | ,. | - | | '_' - ,....| |.. -.' ,_;| ..' -| | | | -| ',_,' | - '. ,' - ''''' -EOF - ;; - - "Fedora_old"* | "RFRemix"*) + "Fedora"* | "RFRemix"*) set_colors 4 7 1 read -rd '' ascii_data <<'EOF' ${c1} /:-------------:\\ @@ -7439,71 +5882,21 @@ ${c1} /:-------------:\\ EOF ;; - "Fedora"*) - set_colors 12 7 - read -rd '' ascii_data <<'EOF' -${c1} .',;::::;,'. - .';:cccccccccccc:;,. - .;cccccccccccccccccccccc;. - .:cccccccccccccccccccccccccc:. - .;ccccccccccccc;${c2}.:dddl:.${c1};ccccccc;. - .:ccccccccccccc;${c2}OWMKOOXMWd${c1};ccccccc:. -.:ccccccccccccc;${c2}KMMc${c1};cc;${c2}xMMc${c1};ccccccc:. -,cccccccccccccc;${c2}MMM.${c1};cc;${c2};WW:${c1};cccccccc, -:cccccccccccccc;${c2}MMM.${c1};cccccccccccccccc: -:ccccccc;${c2}oxOOOo${c1};${c2}MMM0OOk.${c1};cccccccccccc: -cccccc;${c2}0MMKxdd:${c1};${c2}MMMkddc.${c1};cccccccccccc; -ccccc;${c2}XM0'${c1};cccc;${c2}MMM.${c1};cccccccccccccccc' -ccccc;${c2}MMo${c1};ccccc;${c2}MMW.${c1};ccccccccccccccc; -ccccc;${c2}0MNc.${c1}ccc${c2}.xMMd${c1};ccccccccccccccc; -cccccc;${c2}dNMWXXXWM0:${c1};cccccccccccccc:, -cccccccc;${c2}.:odl:.${c1};cccccccccccccc:,. -:cccccccccccccccccccccccccccc:'. -.:cccccccccccccccccccccc:;,.. - '::cccccccccccccc::;,. -EOF - ;; - - "Feren"*) - set_colors 4 7 1 - read -rd '' ascii_data <<'EOF' -${c1} `----------` - :+ooooooooo+. --o+oooooooooo+- -..`/+++++++++++/...````````````````` - .++++++++++++++++++++++++++/////- - ++++++++++++++++++++++++++++++++//:` - -++++++++++++++++++++++++++++++/-` - ++++++++++++++++++++++++++++:. - -++++++++++++++++++++++++/. - +++++++++++++++++++++/-` - -++++++++++++++++++//-` - .:+++++++++++++//////- - .:++++++++//////////- - `-++++++---:::://///. - `.:///+++. ` - `......... -EOF - ;; - "freebsd_small") set_colors 1 7 3 read -rd '' ascii_data <<'EOF' -${c1}/\\,-'''''-,/\\ -\\_) (_/ +${c1} /\\ _____ /\\ + \\_) (_/ + / \ | | | | - ; ; - '-_____-' + \ / + --_____-- EOF ;; - FreeBSD*|HardenedBSD*) - case $ascii_distro in - *HardenedBSD*) set_colors 4 7 3 ;; - *) set_colors 1 7 3 - esac - + "FreeBSD"*) + set_colors 1 7 3 read -rd '' ascii_data <<'EOF' ${c2}``` ${c1}` ${c2}` `.....---...${c1}....--.``` -/ @@ -7524,7 +5917,8 @@ EOF ;; "FreeMiNT"*) - set_colors 7 + # Don't explicitly set colors since + # TosWin2 doesn't reset well. read -rd '' ascii_data <<'EOF' ${c1} ## ## ######### @@ -7576,16 +5970,17 @@ EOF "Funtoo"*) set_colors 5 7 read -rd '' ascii_data <<'EOF' -${c1} .dKXXd . - :XXl;:. .OXo -.'OXO'' .''''''''''''''''''''':XNd..'oco.lco, -xXXXXXX, cXXXNNNXXXXNNXXXXXXXXNNNNKOOK; d0O .k - kXX xXo KNNN0 KNN. 'xXNo :c; 'cc. - kXX xNo KNNN0 KNN. :xxxx. 'NNo - kXX xNo loooc KNN. oNNNN. 'NNo - kXX xN0:. KNN' oNNNX' ,XNk - kXX xNNXNNNNNNNNXNNNNNNNNXNNOxXNX0Xl - ... ......................... .;cc;. +${c2} _______ ____ + /MMMMMMM/ /MMMM| _____ _____ + __/M${c1}.MMM.${c2}M/_____________|M${c1}.M${c2}MM|/MMMMM\/MMMMM\\ +|MMMM${c1}MM'${c2}MMMMMMMMMMMMMMMMMMM${c1}MM${c2}MMMM${c1}.MMMM..MMMM.${c2}MM\\ +|MM${c1}MMMMMMM${c2}/m${c1}MMMMMMMMMMMMMMMMMMMMMM${c2}MMMM${c1}MM${c2}MMMM${c1}MM${c2}MM| +|MMMM${c1}MM${c2}MMM${c1}MM${c2}MM${c1}MM${c2}MM${c1}MM${c2}MMMMM${c1}\MMM${c2}MMM${c1}MM${c2}MMMM${c1}MM${c2}MMMM${c1}MM${c2}MM| + |MM${c1}MM${c2}MMM${c1}MM${c2}MM${c1}MM${c2}MM${c1}MM${c2}MM${c1}MM${c2}MM${c1}MMM${c2}MMMM${c1}'MMMM''MMMM'${c2}MM/ + |MM${c1}MM${c2}MMM${c1}MM${c2}MM${c1}MM${c2}MM${c1}MM${c2}MM${c1}MM${c2}MM${c1}MMM${c2}MMM\MMMMM/\MMMMM/ + |MM${c1}MM${c2}MMM${c1}MM${c2}MMMMMM${c1}MM${c2}MM${c1}MM${c2}MM${c1}MMMMM'${c2}M| + |MM${c1}MM${c2}MMM${c1}MMMMMMMMMMMMMMMMM MM'${c2}M/ + |MMMMMMMMMMMMMMMMMMMMMMMMMMMM/ EOF ;; @@ -7614,33 +6009,6 @@ o/:-...................................: EOF ;; - "Garuda"*) - set_colors 7 7 3 7 2 4 - read -rd '' ascii_data <<'EOF' - -${c3} - .%;888:8898898: - x;XxXB%89b8:b8%b88: - .8Xxd 8X:. - .8Xx; 8x:. - .tt8x ${c6}.d${c3} x88; - .@8x8; ${c6}.db:${c3} xx@; - ${c4},tSXX° .bbbbbbbbbbbbbbbbbbbB8x@; - .SXxx bBBBBBBBBBBBBBBBBBBBbSBX8; - ,888S pd! - 8X88/ q - GBB. - ${c5}x%88 d888@8@X@X@X88X@@XX@@X@8@X. - dxXd dB8b8b8B8B08bB88b998888b88x. - dxx8o .@@;. - dx88 .t@x. - d:SS@8ba89aa67a853Sxxad. - .d988999889889899dd. - -EOF - - ;; - "gentoo_small") set_colors 5 7 read -rd '' ascii_data <<'EOF' @@ -7678,51 +6046,6 @@ yM${c2}MNNNNNNNmmmmmNNMmhs+/${c1}-` EOF ;; - "Pentoo"*) - set_colors 5 7 - read -rd '' ascii_data <<'EOF' -${c2} `:oydNNMMMMNNdyo:` - :yNMMMMMMMMMMMMMMMMNy: - :dMMMMMMMMMMMMMMMMMMMMMMd: - oMMMMMMMho/-....-/ohMMMMMMMo - oMMMMMMy. .yMMMMMMo - .MMMMMMo oMMMMMM. - +MMMMMm mMMMMM+ - oMMMMMh hMMMMMo - //hMMMMMm//${c1}`${c2} ${c1}`${c2}////mMMMMMh// -MMMMMMMMMMM${c1}/${c2} ${c1}/o/`${c2} ${c1}.${c2}smMMMMMMMMMMM -MMMMMMMMMMm ${c1}`NMN:${c2} ${c1}.${c2}yMMMMMMMMMM -MMMMMMMMMMMh${c1}:.${c2} dMMMMMMMMM -MMMMMMMMMMMMMy${c1}.${c2} ${c1}-${c2}NMMMMMMMMM -MMMMMMMMMMMd:${c1}`${c2} ${c1}-${c2}yNMMMMMMMMMM -MMMMMMMMMMh${c1}`${c2} ${c1}./${c2}hNMMMMMMMMMMMM -MMMMMMMMMM${c1}s${c2} ${c1}.:${c2}ymMMMMMMMMMMMMMMM -MMMMMMMMMMN${c1}s:..-/${c2}ohNMMMMMMMMMMMMMMMMMM -MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM - MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM - -EOF - ;; - - "glaucus"*) - set_colors 5 - read -rd '' ascii_data <<'EOF' -${c1} ,, ,d88P - ,d8P ,ad8888* - ,888P d88888* ,,ad8888P* - d d888P a88888P* ,ad8888888* - .d8 d8888: d888888* ,d888888P* - .888; 88888b d8888888b8888888P - d8888J888888a88888888888888P* ,d - 88888888888888888888888888P ,,d8* - 888888888888888888888888888888888* - *8888888888888888888888888888888* - Y888888888P* `*``*888888888888* - *^888^* *Y888P** -EOF - ;; - "gNewSense"*) set_colors 4 5 7 6 read -rd '' ascii_data <<'EOF' @@ -7741,33 +6064,6 @@ ollllllh +llllllllllll+ hllllllo EOF ;; - "GNOME"*) - set_colors 4 - read -rd '' ascii_data <<'EOF' -${c1} ,@@@@@@@@, - @@@@@@ @@@@@@@@@@@@ - ,@@. @@@@@@@ *@@@@@@@@@@@@ - @@@@@% @@@@@@( @@@@@@@@@@@& - @@@@@@ @@@@* @@@@@@@@@# -@@@@* @@@@, *@@@@@% -@@@@@. - @@@@# @@@@@@@@@@@@@@@@ - ,@@@@@@@@@@@@@@@@@@@@@@@, - ,@@@@@@@@@@@@@@@@@@@@@@@@@@& - .@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - @@@@@@@@@@@@@@@@@@@@@@@@@@@ - @@@@@@@@@@@@@@@@@@@@@@@@( - @@@@@@@@@@@@@@@@@@@@% - @@@@@@@@@@@@@@@@ - @@@@@@@@@@@@* @@@@@@@@/ - &@@@@@@@@@@ @@@@@@@@@* - @@@@@@@@@@@, @@@@@@@@@* - ,@@@@@@@@@@@@@@@@@@@@& - &@@@@@@@@@@@@@@ - ... -EOF - ;; - "GNU") set_colors fg 7 read -rd '' ascii_data <<'EOF' @@ -7795,8 +6091,8 @@ EOF "GoboLinux"*) set_colors 5 4 6 2 read -rd '' ascii_data <<'EOF' -${c1} _____ _ - / ____| | | +${c1}_____ _ +/ ____| | | | | __ ___ | |__ ___ | | |_ |/ _ \| '_ \ / _ \ | |__| | (_) | |_) | (_) | @@ -7828,20 +6124,7 @@ eee ${c2}// \\ooo/ \\\ ${c1}eee EOF ;; - "guix_small"*) - set_colors 3 7 6 1 8 - read -rd '' ascii_data <<'EOF' -${c1}|.__ __.| -|__ \\ / __| - \\ \\ / / - \\ \\ / / - \\ \\ / / - \\ \\/ / - \\__/ -EOF - ;; - - "Guix"*) + "GuixSD"*) set_colors 3 7 6 1 8 read -rd '' ascii_data <<'EOF' ${c1} .. `. @@ -7857,88 +6140,26 @@ ${c1} .. `. EOF ;; - "haiku_small"*) + "Haiku"*) set_colors 2 8 read -rd '' ascii_data <<'EOF' -${c1} ,^, - / \\ -*--_ ; ; _--* -\\ '" "' / - '. .' -.-'" "'-. - '-.__. .__.-' - |_| -EOF - ;; - - "Haiku"*) - set_colors 1 3 7 2 - read -rd '' ascii_data <<'EOF' -${c3} - - MMMM MMMM - MMMM MMMM - MMMM MMMM - MMMM MMMM - MMMM${c4} .ciO| /YMMMMM*" -${c3} MMMM${c4} .cOMMMMM|/MMMMM/` - , ,iMM|/MMMMMMMMMMMMMMM* - `*.__,-cMMMMMMMMMMMMMMMMM/`${c3}.MMM - MM${c4}MMMMMMM/`:MMM/ ${c3}MMMM - MMMM MMMM - MMMM MMMM - """" """" -EOF - ;; - - "Huayra"*) - set_colors 4 7 - read -rd '' ascii_data <<'EOF' -${c2} ` - . . ` - `` - . . - `.` -` `. - `` .` - ..`-`-` + - / .` ``` - .--.+--`+:- :/.` .-``.` - -+/so::h:.d-`./:`.` - :hNhyMomy:os-...-. ```` - .dhsshNmNhoo+:-``.``` - ${c1}`ohy:-${c2}NMds+::-.`` - ````${c1}.hNN+`${c2}mMNho/:-....```` - ````` `../dmNhoo+/:..`` - ```` .dh++o/:....` -.+s/` `/s-.-.:.`` ```` -::` `::`..` - .` `.. - `` -EOF - ;; - - "HydroOS"*) - set_colors 1 2 3 4 5 - read -rd '' ascii_data <<'EOF' -${c1} - _ _ _ ____ _____ - | | | | | | / __ \ / ____| - | |__| |_ _ __| |_ __ ___ | | | | (___ - | __ | | | |/ _` | '__/ _ \| | | |\___ \ - | | | | |_| | (_| | | | (_) | |__| |____) | - |_| |_|\__, |\__,_|_| \___/ \____/|_____/ - __/ | - |___/ -EOF - ;; - - "hyperbola_small"*) - set_colors 8 - read -rd '' ascii_data <<'EOF' -${c1} |`__.`/ - \____/ - .--. - / \\ - / ___ \\ - / .` `.\\ -/.` `.\\ +${c2} :dc' + 'l:;'${c1},${c2}'ck. .;dc:. + co ${c1}..${c2}k. .;; ':o. + co ${c1}..${c2}k. ol ${c1}.${c2}0. + co ${c1}..${c2}k. oc ${c1}..${c2}0. + co ${c1}..${c2}k. oc ${c1}..${c2}0. +.Ol,. co ${c1}...''${c2}Oc;kkodxOdddOoc,. + ';lxxlxOdxkxk0kd${c1}oooll${c2}dl${c1}ccc:${c2}clxd; + ..${c1}oOolllllccccccc:::::${c2}od; + cx:ooc${c1}:::::::;${c2}cooolcX. + cd${c1}.${c2}''cloxdoollc' ${c1}...${c2}0. + cd${c1}......${c2}k;${c1}.${c2}xl${c1}.... .${c2}0. + .::c${c1};..${c2}cx;${c1}.${c2}xo${c1}..... .${c2}0. + '::c'${c1}...${c2}do${c1}..... .${c2}K, + cd,.${c1}....:${c2}O,${c1} + ':clod:'${c1} + ${c1} EOF ;; @@ -7964,78 +6185,6 @@ WW W EOF ;; - "iglunix"*|"iglu"*) - set_colors 8 - read -rd '' ascii_data <<'EOF' -${c1} | - | | - | -| ________ -| /\ | \ - / \ | \ | - / \ \ | -/ \________\ -\ / / - \ / / - \ / / - \/________/ -EOF - ;; - - "januslinux"*|"janus"*|"Ataraxia Linux"*|"Ataraxia"*) - set_colors 4 5 6 2 - read -rd '' ascii_data <<'EOF' -${c1} 'l: - loooooo - loooo coooool - looooooooooooooooooool - looooooooooooooooo - lool cooo - coooooooloooooooo - clooooo ;lood cloooo - :loooocooo cloo loooo - loooo :ooooool loooo -looo cooooo cooooo -looooooooooooo ;loooooo ${c2}looooooc -${c1}looooooooo loo cloooooool ${c2}looooc -${c1} cooo cooooooooooo ${c2}looolooooool -${c1} cooo: ${c2}coooooooooooooooooool - loooooooooooolc: loooc; - cooo: loooooooooooc - ;oool looooooo: - coool olc, - looooc ,, - coooooc loc - :oooool, coool:, looool:, - looool: ooooooooooooooo: - cooolc .ooooooooooool -EOF - ;; - - "Kaisen"*) - set_colors 1 7 3 - read -rd '' ascii_data <<'EOF' -${c1} ` - `:+oyyho. - `+:`sdddddd/ - `+` :ho oyo++ohds-` - .ho :dd. .: `sddddddhhyso+/- - ody.ddd-:yd- +hysssyhddddddddho` - yddddddhddd` ` `--` -+hddddddh. - hddy-+dddddy+ohh/..+sddddy/:::+ys - :ddd/sdddddddddd- oddddddd ` - `yddddddddddddddd/ /ddddddd/ -:. :ydddddddddddddddddo..sddddddy/` -odhdddddddo- `ddddh+-``....-+hdddddds. --ddddddhd: /dddo -ydddddddhdddddddd- - /hdy:o - `:sddds .`./hdddddddddddddo - `/- `+hddyosy+ :dddddddy-.-od/ - :sydds -hddddddd` / - .+shd- `:ohddddddddd` - `:+ooooooooooooo: -EOF - ;; - "Kali"*) set_colors 4 8 read -rd '' ascii_data <<'EOF' @@ -8110,25 +6259,6 @@ ${c1} `..---+/---..` EOF ;; - "Kibojoe"*) - set_colors 2 7 4 - read -rd '' ascii_data <<'EOF' - ${c3} ./+oooooo+/. - -/+ooooo+/:.` - ${c1}`${c3}yyyo${c2}+++/++${c3}osss${c1}. - ${c1}+NMN${c3}yssssssssssss${c1}. - ${c1}.dMMMMN${c3}sssssssssssy${c1}Ns` - +MMMMMMMm${c3}sssssssssssh${c1}MNo` - `hMMMMMNNNMd${c3}sssssssssssd${c1}MMN/ - .${c3}syyyssssssy${c1}NNmmmmd${c3}sssss${c1}hMMMMd: - -NMmh${c3}yssssssssyhhhhyssyh${c1}mMMMMMMMy` - -NMMMMMNN${c3}mdhyyyyyyyhdm${c1}NMMMMMMMMMMMN+ -`NMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMd. -ods+/:-----://+oyydmNMMMMMMMMMMMMMMMMMN- -` .-:+osyhhdmmNNNmdo -EOF - ;; - "Kogaion"*) set_colors 4 7 1 read -rd '' ascii_data <<'EOF' @@ -8235,60 +6365,6 @@ EOF EOF ;; - "LaxerOS"*) - set_colors 7 4 - read -rd '' ascii_data <<'EOF' -${c2} - /. - `://:- - `//////: - .////////:` - -//////////:` - -/////////////` - :///////////////. - `://////.```-//////- - `://///:` .//////- - `//////: `//////: - .//////- `://///:` - -//////- `://///:` - -//////. ://////` - ://////` -//////. - `/////:` ./////: - .-::-` .:::-` - -.:://////////////////////////////////::. -//////////////////////////////////////// -.:////////////////////////////////////:. - -EOF - ;; - - "LibreELEC"*) - set_colors 2 3 7 14 13 - read -rd '' ascii_data <<'EOF' -${c1} :+ooo/. ${c2}./ooo+: -${c1} :+ooooooo/. ${c2}./ooooooo+: -${c1} :+ooooooooooo:${c2}:ooooooooooo+: -${c1} :+ooooooooooo+- ${c2}-+ooooooooooo+: -${c1} :+ooooooooooo+- ${c3}-- ${c2}-+ooooooooooo+: -${c1}.+ooooooooooo+- ${c3}:+oo+: ${c2}-+ooooooooooo+- -${c1}-+ooooooooo+- ${c3}:+oooooo+: ${c2}-+oooooooooo- -${c1} :+ooooo+- ${c3}:+oooooooooo+: ${c2}-+oooooo: -${c1} :+o+- ${c3}:+oooooooooooooo+: ${c2}-+oo: -${c4} ./ ${c3}:oooooooooooooooooo: ${c5}/. -${c4} ./oo+: ${c3}-+oooooooooooooo+- ${c5}:+oo/. -${c4} ./oooooo+: ${c3}-+oooooooooo+- ${c5}:+oooooo/. -${c4}-oooooooooo+: ${c3}-+oooooo+- ${c5}:+oooooooooo- -${c4}.+ooooooooooo+: ${c3}-+oo+- ${c5}:+ooooooooooo+. -${c4} -+ooooooooooo+: ${c3}.. ${c5}:+ooooooooooo+- -${c4} -+ooooooooooo+: ${c5}:+ooooooooooo+- -${c4} -+oooooooooo+:${c5}:+oooooooooo+- -${c4} -+oooooo+: ${c5}:+oooooo+- -${c4} -+oo+: ${c5}:+oo+- -${c4} .. ${c5}.. -EOF - ;; - "Linux") set_colors fg 8 3 read -rd '' ascii_data <<'EOF' @@ -8307,45 +6383,6 @@ ${c3} #####${c2}#######${c3}##### EOF ;; - "linuxlite_small"*) - set_colors 3 7 - read -rd '' ascii_data <<'EOF' -${c1} /\\ - / \\ - / ${c2}/ ${c1}/ -> ${c2}/ ${c1}/ -\\ ${c2}\\ ${c1}\\ - \\_${c2}\\${c1}_\\ -${c2} \\ -EOF - ;; - - "Linux Lite"* | "Linux_Lite"*) - set_colors 3 7 - read -rd '' ascii_data <<'EOF' -${c1} ,xXc - .l0MMMMMO - .kNMMMMMWMMMN, - KMMMMMMKMMMMMMo - 'MMMMMMNKMMMMMM: - kMMMMMMOMMMMMMO - .MMMMMMX0MMMMMW. - oMMMMMMxWMMMMM: - WMMMMMNkMMMMMO -:MMMMMMOXMMMMW -.0MMMMMxMMMMM; -:;cKMMWxMMMMO -'MMWMMXOMMMMl - kMMMMKOMMMMMX: - .WMMMMKOWMMM0c - lMMMMMWO0MNd:' - oollXMKXoxl;. - ':. .: .' - .. - . -EOF - ;; - "LMDE"*) set_colors 2 7 read -rd '' ascii_data <<'EOF' @@ -8372,26 +6409,26 @@ EOF "Lubuntu"*) set_colors 4 7 1 read -rd '' ascii_data <<'EOF' -${c1} `.:/ossyyyysso/:. - `.:yyyyyyyyyyyyyyyyyy:.` - .:yyyyyyyyyyyyyyyyyyyyyyyy:. - .:yyyyyyyyyyyyyyyyyyyyyyyyyyyy:. - -yyyyyyyyyyyyyy${c2}+hNMMMNh+${c1}yyyyyyyyy- - :yy${c2}mNy+${c1}yyyyyyyy${c2}+Nmso++smMdhyysoo+${c1}yy: - -yy${c2}+MMMmmy${c1}yyyyyy${c2}hh${c1}yyyyyyyyyyyyyyyyyyy- -.yyyy${c2}NMN${c1}yy${c2}shhs${c1}yyy${c2}+o${c1}yyyyyyyyyyyyyyyyyyyy. -:yyyy${c2}oNM+${c1}yyyy${c2}+sso${c1}yyyyyyy${c2}ss${c1}yyyyyyyyyyyyy: -:yyyyy${c2}+dNs${c1}yyyyyyy${c2}++${c1}yyyyy${c2}oN+${c1}yyyyyyyyyyyy: -:yyyyy${c2}oMMmhysso${c1}yyyyyyyyyy${c2}mN+${c1}yyyyyyyyyyy: -:yyyyyy${c2}hMm${c1}yyyyy${c2}+++${c1}yyyyyyy${c2}+MN${c1}yyyyyyyyyyy: -.yyyyyyy${c2}ohmy+${c1}yyyyyyyyyyyyy${c2}NMh${c1}yyyyyyyyyy. - -yyyyyyyyyy${c2}++${c1}yyyyyyyyyyyy${c2}MMh${c1}yyyyyyyyy- - :yyyyyyyyyyyyyyyyyyyyy${c2}+mMN+${c1}yyyyyyyy: - -yyyyyyyyyyyyyyyyy${c2}+sdMMd+${c1}yyyyyyyy- - .:yyyyyyyyy${c2}hmdmmNMNdy+${c1}yyyyyyyy:. - .:yyyyyyy${c2}my${c1}yyyyyyyyyyyyyyy:. - `.:yyyy${c2}s${c1}yyyyyyyyyyyyy:.` - `.:/oosyyyysso/:.` +${c1} `-/+oyyhhhhyyo+/-` + ./shhhhhhhhhhhhhhhhhhs/. + `:shhhhhhhhhhhhhhhhhhhhhhhhs:` + :yhhhhhhhhhhhhhhhs++yhhhhhhhhhy: + `ohhhhhhhhhhhhhs+:. .yhhhhhhhhhhhho` + `shhhhhhhhhhy+:` /yhhhhhhhhhhhhhs` + shhhhhhhhy+. .ohhhhhhhhhhhhhs +:hhhhhhy/. /hhhhhhhhhhhhh: +shhhy/. :hhhhhhhhhhhhs +hy+. ` `+yhs/` +hhhhhhhhhhhh +-.:/oshy- ` :yhhhhhy/ shhhhhhhhhhh +shhhhhy-`/s. .shhhhhhhhho` .hhhhhhhhhhs +:hhhho`:ys` /yhhhhhhhhhhhs` +hhhhhhhhh: + shh/.sh+ `ohhhhhhhhhhhhhhs` .hhhhhhhhs + `o-+hh: :yhhhhhhhhhhhhhhhho ohhhhhhs` + +hy-`ohhhhhhhhhhhhhhhhhhh+ -hhhhho` + :.-yhhhhhhhhhhhhhhhhhhhhh: yhhy: + :shhhhhhhhhhhhhhhhhhhhhy`+s:` + .+shhhhhhhhhhhhhhhhhhs:` + `-/+oyyhhhhyys+/-` EOF ;; @@ -8428,14 +6465,14 @@ ${c5} `._.-._.' EOF ;; - "mac"* | "Darwin") + "mac" | "Darwin") set_colors 2 3 1 1 5 4 read -rd '' ascii_data <<'EOF' -${c1} c.' +${c1} 'c. ,xNMM. .OMMMMo - lMM" - .;loddo:. .olloddol;. + OMMM0, + .;loddo:' loolloddol;. cKMMMMMMMMMMNWMMMMMMMMMM0: ${c2} .KMMMMMMMMMMMMMMMMMMMMMMMWd. XMMMMMMMMMMMMMMMMMMMMMMMX. @@ -8443,24 +6480,11 @@ ${c3};MMMMMMMMMMMMMMMMMMMMMMMM: :MMMMMMMMMMMMMMMMMMMMMMMM: ${c4}.MMMMMMMMMMMMMMMMMMMMMMMMX. kMMMMMMMMMMMMMMMMMMMMMMMMWd. - ${c5}'XMMMMMMMMMMMMMMMMMMMMMMMMMMk - 'XMMMMMMMMMMMMMMMMMMMMMMMMK. + ${c5}.XMMMMMMMMMMMMMMMMMMMMMMMMMMk + .XMMMMMMMMMMMMMMMMMMMMMMMMK. ${c6}kMMMMMMMMMMMMMMMMMMMMMMd ;KMMMMMMMWXXWMMMMMMMk. - "cooc*" "*coo'" -EOF - ;; - - "mageia_small"*) - set_colors 6 7 - read -rd '' ascii_data <<'EOF' -${c1} * - * - ** -${c2} /\\__/\\ -/ \\ -\\ / - \\____/ + .cooc,. .,coo:. EOF ;; @@ -8515,40 +6539,6 @@ o00. k0O${c2}dddddd${c1}occ EOF ;; - "Mandriva"* | "Mandrake"*) - set_colors 4 3 - read -rd '' ascii_data <<'EOF' -${c2} `` - `-. -${c1} ` ${c2}.--- -${c1} -/ ${c2}-::--` -${c1} `++ ${c2}`----...```-:::::. -${c1} `os. ${c2}.::::::::::::::-``` ` ` -${c1} +s+ ${c2}.::::::::::::::::---...--` -${c1}-ss: ${c2}`-::::::::::::::::-.``.`` -${c1}/ss- ${c2}.::::::::::::-.`` ` -${c1}+ss: ${c2}.::::::::::::- -${c1}/sso ${c2}.::::::-::::::- -${c1}.sss/ ${c2}-:::-.` .::::: -${c1} /sss+. ${c2}..`${c1} `--` ${c2}.::: -${c1} -ossso+/:://+/-` ${c2}.:` -${c1} -/+ooo+/-. ${c2}` -EOF - ;; - - "manjaro_small"*) - set_colors 2 7 - read -rd '' ascii_data <<'EOF' -${c1}||||||||| |||| -||||||||| |||| -|||| |||| -|||| |||| |||| -|||| |||| |||| -|||| |||| |||| -|||| |||| |||| -EOF - ;; - "Manjaro"*) set_colors 2 7 read -rd '' ascii_data <<'EOF' @@ -8569,33 +6559,6 @@ ${c1}██████████████████ ██████ EOF ;; - "TeArch"*) - set_colors 39 7 1 - read -rd '' ascii_data <<'EOF' -${c1} @@@@@@@@@@@@@@ - @@@@@@@@@ @@@@@@ - @@@@@ @@@@@ - @@ @@ - @% @@ - @ @ - @@@@@@@@@@@@@@@@@@@@@@@@ @@ - .@@@@@@@@@@@@/@@@@@@@@@@@@ - @@@@@@@@@@@@///@@@@@@@@@@@@ - @@@@@@@@@@@@@((((@@@@@@@@@@@@ - @@@@@@@@@@@#(((((((#@@@@@@@@@@@ - @@@@@@@@@@@#//////////@@@@@@@@@@& - @@@@@@@@@@////@@@@@////@@@@@@@@@@ - @@@@@@@@//////@@@@@/////@@@@@@@@@ - @@@@@@@//@@@@@@@@@@@@@@@//@@@@@@@ - @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -@@ .@@@@@@@@@@@@@@@@@@@@@@@@@ @ - @@@@@@ @@@. @@@@@@@ - @@@@@@@&@@@@@@@# #@@@@@@@@@@@@@@@@ - @@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - @@@@@@@@@@@@@@@@@@@@@ -EOF - ;; - "Maui"*) set_colors 6 7 read -rd '' ascii_data <<'EOF' @@ -8678,20 +6641,7 @@ ${c2} -sdhyo+:-` -/syymm: EOF ;; - "linuxmint_small"*) - set_colors 2 7 - read -rd '' ascii_data <<'EOF' -${c1} ___________ -|_ \\ - | ${c2}| _____ ${c1}| - | ${c2}| | | | ${c1}| - | ${c2}| | | | ${c1}| - | ${c2}\\__${c2}___/ ${c1}| - \\_________/ -EOF - ;; - - "Linux Mint Old"* | "LinuxMintOld"* | "mint_old"*) + "Linux Mint"* | "LinuxMint"*) set_colors 2 7 read -rd '' ascii_data <<'EOF' ${c1}MMMMMMMMMMMMMMMMMMMMMMMMMmds+. @@ -8713,70 +6663,6 @@ ddddMMh ${c2}dMM :hNMNMNhNMNMNh: ${c1}`NMm EOF ;; - "Linux Mint"* | "LinuxMint"* | "mint"*) - set_colors 2 7 - read -rd '' ascii_data <<'EOF' -${c2} ...-:::::-... -${c2} .-MMMMMMMMMMMMMMM-. - .-MMMM${c1}`..-:::::::-..`${c2}MMMM-. - .:MMMM${c1}.:MMMMMMMMMMMMMMM:.${c2}MMMM:. - -MMM${c1}-M---MMMMMMMMMMMMMMMMMMM.${c2}MMM- - `:MMM${c1}:MM` :MMMM:....::-...-MMMM:${c2}MMM:` - :MMM${c1}:MMM` :MM:` `` `` `:MMM:${c2}MMM: -.MMM${c1}.MMMM` :MM. -MM. .MM- `MMMM.${c2}MMM. -:MMM${c1}:MMMM` :MM. -MM- .MM: `MMMM-${c2}MMM: -:MMM${c1}:MMMM` :MM. -MM- .MM: `MMMM:${c2}MMM: -:MMM${c1}:MMMM` :MM. -MM- .MM: `MMMM-${c2}MMM: -.MMM${c1}.MMMM` :MM:--:MM:--:MM: `MMMM.${c2}MMM. - :MMM${c1}:MMM- `-MMMMMMMMMMMM-` -MMM-${c2}MMM: - :MMM${c1}:MMM:` `:MMM:${c2}MMM: - .MMM${c1}.MMMM:--------------:MMMM.${c2}MMM. - '-MMMM${c1}.-MMMMMMMMMMMMMMM-.${c2}MMMM-' - '.-MMMM${c1}``--:::::--``${c2}MMMM-.' -${c2} '-MMMMMMMMMMMMM-' -${c2} ``-:::::-`` -EOF - ;; - - "Live Raizo"* | "Live_Raizo"*) - set_colors 3 - read -rd '' ascii_data <<'EOF' -${c1} `......` - -+shmNMMMMMMNmhs/. - :smMMMMMmmhyyhmmMMMMMmo- - -hMMMMd+:. `----` .:odMMMMh- - `hMMMN+. .odNMMMMMMNdo. .yMMMMs` - hMMMd. -dMMMMmdhhdNMMMNh` .mMMMh -oMMMm` :MMMNs.:sddy:-sMMMN- `NMMM+ -mMMMs dMMMo sMMMMMMd yMMMd sMMMm -----` .---` oNMMMMMh `---. .---- - .sMMy: - /MM/ - +dMMms. - hMMMMMMN - `dMMMMMMm: - .+ss+sMNysMMoomMd+ss+. - +MMMMMMN` +MM/ hMMMMMNs - sMMMMMMm-hNMMMd-hMMMMMMd - :yddh+`hMMMMMMN :yddy/` - .hMMMMd: - `..` -EOF - ;; - - "mx_small"*) - set_colors 4 6 7 - read -rd '' ascii_data <<'EOF' -${c3} \\\\ / - \\\\/ - \\\\ - /\\/ \\\\ - / \\ /\\ - / \\/ \\ -/__________\\ -EOF - ;; - "MX"*) set_colors 4 6 7 read -rd '' ascii_data <<'EOF' @@ -8800,68 +6686,6 @@ MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM EOF ;; - "Namib"*) - set_colors 1 - read -rd '' ascii_data <<'EOF' -${c1} .:+shysyhhhhysyhs+:. - -/yyys syyy/- - -shy yhs- - -yhs shy- - +hy yh+ - +ds sd+ -/ys so sy/ -sh smMMNdyo hs -yo ymMMMMNNMMNho oy -N ydMMMNNMMMMMMMMMmy N -N shmMMMMNNMMMMMMMMMMMMMNy N -yo ooshmNMMMNNNNMMMMMMMMMMMMMMMMMms oy -sd yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy ds -/ys sy/ - +ds sd+ - +hy yh+ - -yhs shy- - -shy yhs- - -/yyys syyy/- - .:+shysyhyhhysyhs+:. -EOF - ;; - - "Neptune"*) - set_colors 7 - read -rd '' ascii_data <<'EOF' -${c1} ./+sydddddddys/-. - .+ymNNdyooo/:+oooymNNmy/` - `/hNNh/.` `-+dNNy:` - /mMd/. .++.:oy/ .+mMd- - `sMN/ oMMmdy+. `oNNo - `hMd. `/ymy/. :NMo - oMN- `/dMd: /MM- -`mMy -dMN+` mMs -.MMo -NMM/ yMs - dMh mMMMo:` `NMo - /MM/ /ymMMMm- sMN. - +Mm: .hMMd` oMN/ - +mNs. `yNd/` -dMm- - .yMNs: `/.` `/yNNo` - .odNNy+-` .:ohNNd/. - -+ymNNmdyyyyyyydmNNmy+. - `-//sssssss//. -EOF - ;; - - "netbsd_small"*) - set_colors 5 7 - read -rd '' ascii_data <<'EOF' -${c2}\\\\${c1}\`-______,----__ -${c2} \\\\ ${c1}__,---\`_ -${c2} \\\\ ${c1}\`.____ -${c2} \\\\${c1}-______,----\`- -${c2} \\\\ - \\\\ - \\\\ -EOF - ;; - "NetBSD"*) set_colors 5 7 read -rd '' ascii_data <<'EOF' @@ -8938,7 +6762,7 @@ EOF "nixos_small") set_colors 4 6 read -rd '' ascii_data <<'EOF' - ${c1} \\\\ \\\\ // + ${c1}\\\\ \\\\ // ==\\\\__\\\\/ // // \\\\// ==// //== @@ -8948,7 +6772,7 @@ EOF EOF ;; - "nixos_old"*) + "NixOS"*) set_colors 4 6 read -rd '' ascii_data <<'EOF' ${c1} ::::. ${c2}'::::: ::::' @@ -8973,32 +6797,6 @@ ${c1} .:::: :::: ${c2}'::::. EOF ;; - "NixOS"*) - set_colors 4 6 - read -rd '' ascii_data <<'EOF' -${c1} ▗▄▄▄ ${c2}▗▄▄▄▄ ▄▄▄▖ -${c1} ▜███▙ ${c2}▜███▙ ▟███▛ -${c1} ▜███▙ ${c2}▜███▙▟███▛ -${c1} ▜███▙ ${c2}▜██████▛ -${c1} ▟█████████████████▙ ${c2}▜████▛ ${c1}▟▙ -${c1} ▟███████████████████▙ ${c2}▜███▙ ${c1}▟██▙ -${c2} ▄▄▄▄▖ ▜███▙ ${c1}▟███▛ -${c2} ▟███▛ ▜██▛ ${c1}▟███▛ -${c2} ▟███▛ ▜▛ ${c1}▟███▛ -${c2}▟███████████▛ ${c1}▟██████████▙ -${c2}▜██████████▛ ${c1}▟███████████▛ -${c2} ▟███▛ ${c1}▟▙ ▟███▛ -${c2} ▟███▛ ${c1}▟██▙ ▟███▛ -${c2} ▟███▛ ${c1}▜███▙ ▝▀▀▀▀ -${c2} ▜██▛ ${c1}▜███▙ ${c2}▜██████████████████▛ -${c2} ▜▛ ${c1}▟████▙ ${c2}▜████████████████▛ -${c1} ▟██████▙ ${c2}▜███▙ -${c1} ▟███▛▜███▙ ${c2}▜███▙ -${c1} ▟███▛ ▜███▙ ${c2}▜███▙ -${c1} ▝▀▀▀ ▀▀▀▀▘ ${c2}▀▀▀▘ -EOF - ;; - "Nurunner"*) set_colors 4 read -rd '' ascii_data <<'EOF' @@ -9093,7 +6891,7 @@ EOF "OpenBSD"*) set_colors 3 7 6 1 8 read -rd '' ascii_data <<'EOF' -${c3} _ + ${c3} _ (_) ${c1} | . ${c1} . |L /| . ${c3} _ @@ -9115,36 +6913,7 @@ ${c1} `-|.' /_. ${c4}\_| ${c1} F |/`. `-. `._) / .-.\\ \\ ( `\\ - `.\\ -EOF - ;; - - "openEuler"*) - set_colors 4 7 1 - read -rd '' ascii_data <<'EOF' -${c1} `.cc.` - ``.cccccccc..` - `.cccccccccccccccc.` - ``.cccccccccccccccccccccc.`` - `..cccccccccccccccccccccccccccc..` -`.ccccccccccccccc${c2}/++/${c1}ccccccccccccccccc.` -.ccccccccccccccc${c2}mNMMNdo+oso+${c1}ccccccccccc. -.cccccccccc${c2}/++odms+//+mMMMMm/:+syso/${c1}cccc -.ccccccccc${c2}yNNMMMs:::/::+o+/:${c1}c${c2}dMMMMMm${c1}cccc -.ccccccc${c2}:+NmdyyhNNmNNNd:${c1}ccccc${c1}${c2}:oyyyo:${c1}cccc -.ccc${c2}:ohdmMs:${c1}cccc${c2}+mNMNmy${c1}ccccccccccccccccc -.cc${c2}/NMMMMMo////:${c1}c${c2}:///:${c1}cccccccccccccccccc -.cc${c2}:syysyNMNNNMNy${c1}ccccccccccccccccccccccc -.cccccccc${c2}+MMMMMNy${c1}c${c2}:/+++/${c1}cccccccccccccccc -.ccccccccc${c2}ohhhs/${c1}c${c2}omMMMMNh${c1}ccccccccccccccc -.ccccccccccccccc${c2}:MMMMMMMM/${c1}cccccccccccccc -.cccccccccccccccc${c2}sNNNNNd+${c1}cccccccccccccc. -`..cccccccccccccccc${c2}/+/:${c1}cccccccccccccc..` - ``.cccccccccccccccccccccccccccc.`` - `.cccccccccccccccccccccc.` - ``.cccccccccccccc.`` - `.cccccccc.` - `....` + `.\ EOF ;; @@ -9170,81 +6939,24 @@ h+` `.-:+oyyyo/-` EOF ;; - "openmamba"*) - set_colors 7 2 - read -rd '' ascii_data <<'EOF' -${c1} ````` - .-/+ooooooooo+/:-` - ./ooooooooooooooooooo+:. - -+oooooooooooooooooooooooo+- - .+ooooooooo+/:---::/+ooooooooo+. - :oooooooo/-` `-/oo${c2}s´${c1}oooo.${c2}s´${c1} - :ooooooo/` `${c2}sNds${c1}ooo${c2}sNds${c1} - -ooooooo- ${c2}:dmy${c1}ooo${c2}:dmy${c1} - +oooooo: :oooooo- -.ooooooo .://:` -:oooooo+ ./+o+:` --ooooooo` `oooooo+ -`ooooooo: /oooooo+ - -ooooooo: :ooooooo. - :ooooooo+. .+ooooooo: - :oooooooo+-` `-+oooooooo: - .+ooooooooo+/::::://oooooooooo+. - -+oooooooooooooooooooooooo+- - .:ooooooooooooooooooo+:. - `-:/ooooooooo+/:.` - `````` -EOF - ;; - "OpenMandriva"*) - set_colors 4 + set_colors 4 3 read -rd '' ascii_data <<'EOF' -${c1} `````` - `-:/+++++++//:-.` - .:+++oooo+/:.`` `` - `:+ooooooo+:. `-:/++++++/:.` - -+oooooooo:` `-++o+/::::://+o+/- - `/ooooooooo- -+oo/.` `-/oo+. - `+ooooooooo. :os/` .+so: - +sssssssss/ :ss/ `+ss- - :ssssssssss` sss` .sso - ossssssssss `yyo sys -`sssssssssss` `yys `yys -`sssssssssss: +yy/ +yy: - oyyyyyyyyyys. `oyy/` `+yy+ - :yyyyyyyyyyyo. `+yhs:. `./shy/ - oyyyyyyyyyyys:` .oyhys+:----/+syhy+. ` - `syyyyyyyyyyyyo-` .:osyhhhhhyys+:``.:` - `oyyyyyyyyyyyyys+-`` `.----.```./oo. - /yhhhhhhhhhhhhhhyso+//://+osyhy/` - `/yhhhhhhhhhhhhhhhhhhhhhhhhy/` - `:oyhhhhhhhhhhhhhhhhhhyo:` - .:+syhhhhhhhhys+:-` - ``....`` -EOF - ;; - - "OpenStage"*) - set_colors 2 - read -rd '' ascii_data <<'EOF' -${c1} /(/ - .(((((((, - /(((((((((/ - .(((((/,/(((((, - *(((((* ,(((((/ - (((((* .*/(( - *((((/ (//(/* - /((((* ((((((((((, - . /((((* (((((((((((((. - ((. *((((/ ,(((((((( - ,(((/ (((((/ ** ,((((((* - /(((((. .(((((/ //(((* *(((((/ - .(((((, ((/ .(((((/. .(((((, - /((((* ,(((((((/ ,((((( - /(((((((((((((((((((/. /(((((((((/ - /(((((((((((((((((, /(((((((((((/ - */(((((//*. */((/(/(/* +${c2} `` + `-. +${c1} ` ${c2}.--- +${c1} -/ ${c2}-::--` +${c1} `++ ${c2}`----...```-:::::. +${c1} `os. ${c2}.::::::::::::::-``` ` ` +${c1} +s+ ${c2}.::::::::::::::::---...--` +${c1}-ss: ${c2}`-::::::::::::::::-.``.`` +${c1}/ss- ${c2}.::::::::::::-.`` ` +${c1}+ss: ${c2}.::::::::::::- +${c1}/sso ${c2}.::::::-::::::- +${c1}.sss/ ${c2}-:::-.` .::::: +${c1} /sss+. ${c2}..`${c1} `--` ${c2}.::: +${c1} -ossso+/:://+/-` ${c2}.:` +${c1} -/+ooo+/-. ${c2}` EOF ;; @@ -9307,26 +7019,6 @@ ${c1} EOF ;; - "OS Elbrus"*) - set_colors 4 7 3 - read -rd '' ascii_data <<'EOF' -${c1} ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ - ██▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀██ - ██ ██ - ██ ███████ ███████ ██ - ██ ██ ██ ██ ██ ██ - ██ ██ ██ ██ ██ ██ - ██ ██ ██ ██ ██ ██ - ██ ██ ██ ██ ██ ██ - ██ ██ ███████ ███████ - ██ ██ ██ - ██ ██▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄██ - ██ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀██ - ██ ██ - ███████████████████████████ -EOF - ;; - "PacBSD"*) set_colors 1 7 3 read -rd '' ascii_data <<'EOF' @@ -9357,18 +7049,6 @@ ${c1} :+sMs. EOF ;; - "parabola_small"*) - set_colors 5 7 - read -rd '' ascii_data <<'EOF' -${c1} __ __ __ _ -.`_//_//_/ / `. - / .` - / .` - /.` - /` -EOF - ;; - "Parabola"*) set_colors 5 7 read -rd '' ascii_data <<'EOF' @@ -9508,7 +7188,7 @@ EOF "PCLinuxOS"*) set_colors 4 7 1 read -rd '' ascii_data <<'EOF' -${c1} mhhhyyyyhhhdN + ${c1}mhhhyyyyhhhdN dyssyhhhhhhhhhhhssyhN Nysyhhyo/:-.....-/oyhhhssd Nsshhy+. `/shhysm @@ -9530,121 +7210,32 @@ yyhh- ${c2}ymm- /dmdyosyd` ${c1}`yhh+ EOF ;; - "Pengwin"*) - set_colors 5 5 13 - read -rd '' ascii_data <<'EOF' -${c3} ...` -${c3} `-///:-` -${c3} .+${c2}ssys${c3}/ -${c3} +${c2}yyyyy${c3}o ${c2} -${c2} -yyyyyy: -${c2} `.:/+ooo+/:` -yyyyyy+ -${c2} `:oyyyyyys+:-.`syyyyyy: -${c2} .syyyyyyo-` .oyyyyyyo -${c2} `syyyyyy `-+yyyyyyy/` -${c2} /yyyyyy+ -/osyyyyyyo/. -${c2} +yyyyyy- `.-:::-.` -${c2} .yyyyyy- -${c3} :${c2}yyyyy${c3}o -${c3} .+${c2}ooo${c3}+ -${c3} `.::/:. -EOF - ;; - "Peppermint"*) - set_colors 1 15 3 + set_colors 1 7 3 read -rd '' ascii_data <<'EOF' -${c1} PPPPPPPPPPPPPP -${c1} PPPP${c2}MMMMMMM${c1}PPPPPPPPPPP -${c1} PPPP${c2}MMMMMMMMMM${c1}PPPPPPPP${c2}MM${c1}PP -${c1} PPPPPPPP${c2}MMMMMMM${c1}PPPPPPPP${c2}MMMMM${c1}PP -${c1} PPPPPPPPPPPP${c2}MMMMMM${c1}PPPPPPP${c2}MMMMMMM${c1}PP -${c1} PPPPPPPPPPPP${c2}MMMMMMM${c1}PPPP${c2}M${c1}P${c2}MMMMMMMMM${c1}PP -${c1} PP${c2}MMMM${c1}PPPPPPPPPP${c2}MMM${c1}PPPPP${c2}MMMMMMM${c1}P${c2}MM${c1}PPPP -${c1} P${c2}MMMMMMMMMM${c1}PPPPPP${c2}MM${c1}PPPPP${c2}MMMMMM${c1}PPPPPPPP -${c1} P${c2}MMMMMMMMMMMM${c1}PPPPP${c2}MM${c1}PP${c2}M${c1}P${c2}MM${c1}P${c2}MM${c1}PPPPPPPPPPP -${c1} P${c2}MMMMMMMMMMMMMMMM${c1}PP${c2}M${c1}P${c2}MMM${c1}PPPPPPPPPPPPPPPP -${c1} P${c2}MMM${c1}PPPPPPPPPPPPPPPPPPPPPPPPPPPPPP${c2}MMMMM${c1}P -${c1} PPPPPPPPPPPPPPPP${c2}MMM${c1}P${c2}M${c1}P${c2}MMMMMMMMMMMMMMMM${c1}PP -${c1} PPPPPPPPPPP${c2}MM${c1}P${c2}MM${c1}PPPP${c2}MM${c1}PPPPP${c2}MMMMMMMMMMM${c1}PP -${c1} PPPPPPPP${c2}MMMMMM${c1}PPPPP${c2}MM${c1}PPPPPP${c2}MMMMMMMMM${c1}PP -${c1} PPPP${c2}MM${c1}P${c2}MMMMMMM${c1}PPPPPP${c2}MM${c1}PPPPPPPPPP${c2}MMMM${c1}PP -${c1} PP${c2}MMMMMMMMM${c1}P${c2}M${c1}PPPP${c2}MMMMMM${c1}PPPPPPPPPPPPP -${c1} PP${c2}MMMMMMM${c1}PPPPPPP${c2}MMMMMM${c1}PPPPPPPPPPPP -${c1} PP${c2}MMMM${c1}PPPPPPPPP${c2}MMMMMMM${c1}PPPPPPPP -${c1} PP${c2}MM${c1}PPPPPPPP${c2}MMMMMMMMMM${c1}PPPP -${c1} PPPPPPPPPP${c2}MMMMMMMM${c1}PPPP -${c1} PPPPPPPPPPPPPP +${c1} 8ZZZZZZ${c2}MMMMM +${c1} .ZZZZZZZZZ${c2}MMMMMMM. +${c2} MM${c1}ZZZZZZZZZ${c2}MMMMMMM${c1}ZZZZ +${c2} MMMMM${c1}ZZZZZZZZ${c2}MMMMM${c1}ZZZZZZZM +${c2} MMMMMMM${c1}ZZZZZZZ${c2}MMMM${c1}ZZZZZZZZZ. +${c2} MMMMMMMMM${c1}ZZZZZZ${c2}MMM${c1}ZZZZZZZZZZZI +${c2}MMMMMMMMMMM${c1}ZZZZZZ${c2}MM${c1}ZZZZZZZZZZ${c2}MMM +${c1}.ZZZ${c2}MMMMMMMMMM${c1}IZZ${c2}MM${c1}ZZZZZ${c2}MMMMMMMMM +${c1}ZZZZZZZ${c2}MMMMMMMM${c1}ZZ${c2}M${c1}ZZZZ${c2}MMMMMMMMMMM +${c1}ZZZZZZZZZZZZZZZZ${c2}M${c1}Z${c2}MMMMMMMMMMMMMMM +${c1}.ZZZZZZZZZZZZZ${c2}MMM${c1}Z${c2}M${c1}ZZZZZZZZZZ${c2}MMMM +${c1}.ZZZZZZZZZZZ${c2}MMM${c1}7ZZ${c2}MM${c1}ZZZZZZZZZZ7${c2}M +${c1} ZZZZZZZZZ${c2}MMMM${c1}ZZZZ${c2}MMMM${c1}ZZZZZZZ77 +${c2} MMMMMMMMMMMM${c1}ZZZZZ${c2}MMMM${c1}ZZZZZ77 +${c2} MMMMMMMMMM${c1}7ZZZZZZ${c2}MMMMM${c1}ZZ77 +${c2} .MMMMMMM${c1}ZZZZZZZZ${c2}MMMMM${c1}Z7Z +${c2} MMMMM${c1}ZZZZZZZZZ${c2}MMMMMMM +${c1} NZZZZZZZZZZZ${c2}MMMMM +${c1} ZZZZZZZZZ${c2}MM) EOF ;; - "Pisi"*) - set_colors 12 7 6 1 8 - read -rd '' ascii_data <<'EOF' -${c1} \Fv/!- `:?lzC -${c1} Q!::=zFx! ${c2}`;v6WBCicl;` ${c1},vCC\!::#. -${c1} ,%:::,'` ${c2}+#%@@FQ@@. ,cF%i${c1}``-',::a? -${c1} +m:,'```${c2}}3,/@@Q\@@ "af-${c1} `-'"7f - =o'.` ${c2}/m' :Q@:Qg ,kl${c1} `.|o - :k` '${c2}$+ 'Narm >d,${c1} ii - #`${c2}!p. `C , 'd+${c1} %' -${c2} !0m `6Kv - =a m+ - !A !\L|: :|L\! $: - .8` Q''%Q#' '#Q%''Q `0- - :6 E|.6QQu uQQ6.|E p: - i{ \jts9? ?9stj\ u\ - |a` -''. `e> - ,m+ ${c1}'^ !`${c2}s@@@@a${c1}'"`+`${c2} >e' - !3|${c1}`|=>>r- ${c2}'U%:${c1} '>>>=:`\3! - 'xopE| ${c2}`'${c1} `ledoz- - `;=>>+`${c2}`^llci/|==|/iclc;`${c1}'>>>>: - `^`+~ ${c2}````${c1} !!-^ -EOF - ;; - - "PNM Linux"* | "WHPNM Linux"*) - set_colors 33 9 15 202 - read -rd '' ascii_data <<'EOF' - -${c1} - ``.---..` `--` - ``.---........-:.${c2}-::`${c1} - ${c2}./::-${c1}........${c2}--::.````${c1} - ${c2}.:://:::${c1}----${c2}::::-..${c1} - ..${c2}--:::::--::::++-${c1}.` - ${c2}`-:-`${c1} .-ohy+::${c2}-:::${c1}/sdmdd:.${c2} `-:- - .-:::${c1}...${c3}sNNmds$y${c1}o/+${c3}sy+NN$m${c1}d+.`${c2}-:::-. - `.-:-${c1}./${c3}dN${c1}()${c3}yyooosd${c1}()${c3}$m${c1}dy${c2}-.::-.`${c1} - ${c2}`.${c1}-...-${c3}+hNdyyyyyydmy${c1}:......${c2}`${c1} - ``..--.....-${c3}yNNm${c4}hssssh${c3}mmdo${c1}.........``` -`-:://:.....${c3}hNNNNN${c4}mddm${c3}NNNmds${c1}.....//::--` - ```.:-...${c3}oNNNNNNNNNNNNNNmd/${c1}...:-.``` - .....${c3}hNNNNNNNNNNNNNNmds${c1}....` - --...${c3}hNNNNNNNNNNNNNNmdo${c1}..... - .:...${c3}/NNNNNNNNNNNNNNdd${c1}:....` - `-...${c3}+mNNNNNNNNNNNmh${c1}:...-. - ${c4}.:+o+/:-${c1}:+oo+///++o+/:-${c4}:/+ooo/:. - ${c4}+oo/:o- +oooooso.` - ${c4}.` ` `/ .-//- -EOF - ;; - - "popos_small"* | "pop_os_small"*) - set_colors 6 7 - read -rd '' ascii_data <<'EOF' -${c1}______ -\\ _ \\ __ - \\ \\ \\ \\ / / - \\ \\_\\ \\ / / - \\ ___\\ /_/ - \\ \\ _ - __\\_\\__(_)_ - (___________)` -EOF - ;; - - "Pop!_OS"* | "popos"* | "pop_os"*) + "Pop!_OS"*) set_colors 6 7 read -rd '' ascii_data <<'EOF' ${c1} ///////////// @@ -9699,87 +7290,26 @@ s: yNm+` .smNd+. EOF ;; - "postmarketos_small") - set_colors 2 7 - read -rd '' ascii_data <<'EOF' -${c1} /\\ - / \\ - / \\ - \\__ \\ - /\\__ \\ _\\ - / / \\/ __ - / / ____/ \\ - / \\ \\ \\ -/_____/ /________\\ -EOF - ;; - "PostMarketOS"*) set_colors 2 7 read -rd '' ascii_data <<'EOF' -${c1} /\\ - / \\ - / \\ - / \\ - / \\ - / \\ - \\ \\ - /\\ \\____ \\ - / \\____ \\ \\ - / / \\ \\ - / / \\ ___\\ - / / \\ / ____ - / / \\/ / \\ - / / __________/ \\ - / \\ \\ \\ - / \\ \\ \\ - / / / \\ -/___________/ /____________________\\ -EOF - ;; - - "PuffOS"*) - set_colors 3 - read -rd '' ascii_data <<'EOF' -${c1} - _,..._,m, - ,/' '""; - / ". - ,'mmmMMMMmm. \ - _/-"^^^^^"""%#%mm, ; - ,m,_,' "###) ;, -(###% \#/ ;##mm. - ^#/ __ ___ ; (######) - ; //.\\ //.\\ ; \####/ - _; (#\"// \\"/#) ; ,/ -@##\ \##/ = `"=" ,;mm/ -`\##>.____,...,____,<####@ -EOF - ;; - - "Proxmox"*) - set_colors 7 202 - read -rd '' ascii_data <<'EOF' -${c1} .://:` `://:. - `hMMMMMMd/ /dMMMMMMh` - `sMMMMMMMd: :mMMMMMMMs` -${c2}`-/+oo+/:${c1}`.yMMMMMMMh- -hMMMMMMMy.`${c2}:/+oo+/-` -`:oooooooo/${c1}`-hMMMMMMMyyMMMMMMMh-`${c2}/oooooooo:` - `/oooooooo:${c1}`:mMMMMMMMMMMMMm:`${c2}:oooooooo/` - ./ooooooo+-${c1} +NMMMMMMMMN+ ${c2}-+ooooooo/. - .+ooooooo+-${c1}`oNMMMMNo`${c2}-+ooooooo+. - -+ooooooo/.${c1}`sMMs`${c2}./ooooooo+- - :oooooooo/${c1}`..`${c2}/oooooooo: - :oooooooo/`${c1}..${c2}`/oooooooo: - -+ooooooo/.`${c1}sMMs${c2}`./ooooooo+- - .+ooooooo+-`${c1}oNMMMMNo${c2}`-+ooooooo+. - ./ooooooo+-${c1} +NMMMMMMMMN+ ${c2}-+ooooooo/. - `/oooooooo:`${c1}:mMMMMMMMMMMMMm:${c2}`:oooooooo/` -`:oooooooo/`${c1}-hMMMMMMMyyMMMMMMMh-${c2}`/oooooooo:` -`-/+oo+/:`${c1}.yMMMMMMMh- -hMMMMMMMy.${c2}`:/+oo+/-` -${c1} `sMMMMMMMm: :dMMMMMMMs` - `hMMMMMMd/ /dMMMMMMh` - `://:` `://:` +${c1} ss + `hMMh` + .dMMMMd. + -NMMMMMMN- + /MMMMMMMMMN/ + hMMMMMMMMMMMo + y+`mMMmdNMMMMMMy + `dMM-.-:- .mMMMMMMh` + .mMMMMMMd` `dMMMMMMm. + :NMMMMMMy yMMMMMMN: + /MMMMMMMo oMMMmdmN/ + oMMMMMMM/ /MN.-/:-. + `yMMMMMMN- -:.NMMMMy` + `dMMMMMMM- -/////////////dMMMMMMd` + -mMMMMMMMMN+`sMMMMMMMMMMMMMMMMMMMMm- + :NMMMMMMMMMMM/ yMMMMMMMMMMMMMMMMMMMMN: ++MMMMMMMMMMMh.:mMMMMMMMMMMMMMMMMMMMMMMM+ EOF ;; @@ -9807,36 +7337,6 @@ ${c1} `-/osyyyysosyhhhhhyys+- EOF ;; - "pureos_small"*) - set_colors 2 7 7 - read -rd '' ascii_data <<'EOF' -${c1} _____________ -| _________ | -| | | | -| | | | -| |_________| | -|_____________| -EOF - ;; - - "PureOS"*) - set_colors 2 7 7 - read -rd '' ascii_data <<'EOF' -${c1}dmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmd -dNm//////////////////////////////////mNd -dNd dNd -dNd dNd -dNd dNd -dNd dNd -dNd dNd -dNd dNd -dNd dNd -dNd dNd -dNm//////////////////////////////////mNd -dmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmd -EOF - ;; - "Qubes"*) set_colors 4 5 7 6 read -rd '' ascii_data <<'EOF' @@ -9864,90 +7364,6 @@ ${c1} `..--..` EOF ;; - "Qubyt"*) - set_colors 4 5 0 4 - read -rd '' ascii_data <<'EOF' -${c1} ########################${c2}(${c3}ooo -${c1} ########################${c2}(${c3}ooo -${c1}###${c2}(${c3}ooo ${c1}###${c2}(${c3}ooo -${c1}###${c2}(${c3}ooo ${c1}###${c2}(${c3}ooo -${c1}###${c2}(${c3}ooo ${c1}###${c2}(${c3}ooo -${c1}###${c2}(${c3}ooo ${c1}###${c2}(${c3}ooo -${c1}###${c2}(${c3}ooo ${c1}###${c2}(${c3}ooo -${c1}###${c2}(${c3}ooo ${c1}###${c2}(${c3}ooo -${c1}###${c2}(${c3}ooo ${c1}##${c3}o ${c2}((((${c3}ooo -${c1}###${c2}(${c3}ooo o${c2}((${c1}### ${c3}oooooo -${c1}###${c2}(${c3}ooo oo${c2}((${c1}###${c3}o -${c1}###${c2}(${c3}ooo ooo${c2}((${c1}### -${c1}################${c2}(${c3}oo oo${c2}((((${c3}o -${c2}(((((((((((((((((${c3}ooo ooooo - oooooooooooooooooo o -EOF - ;; - - "Quibian"*) - set_colors 3 7 - read -rd '' ascii_data <<'EOF' -${c1} `.--::::::::--.` - `.-:::-..`` ``..-::-.` - .::::-` .${c2}+${c1}:`` `.-::.` - .::::.` -::::::-` `.::. - `-:::-` -:::::::::--..`` .::` - `::::- .${c2}oy${c1}:::::::---.```.: `::` - -:::: `.-:::::::::::-.``` `:: -.::::.`-:::::::::::::. `:. --::::.::::::::::::::: -: -::::::::::::::::::::` `: -:::::::::::::::::::- `: -::::::::::::::::::: -- -.:::::::::::::::::` `:` -`::::::::::::::::: -` - .:::::::::::::::- -` - `::::::::::::::- `.` - .::::::::::::- `` - `.--:::::-. -EOF - ;; - - "Radix"*) - set_colors 1 2 - read -rd '' ascii_data <<'EOF' -${c2} .:oyhdmNo - `/yhyoosdms` - -o+/ohmmho- - ..`.:/:-` - `.--:::-.``${c1} - .+ydNMMMMMMNmhs:` -`omMMMMMMMMMMMMMMNh- -oNMMMNmddhhyyhhhddmy. -mMMMMNmmddhhysoo+/:-` -yMMMMMMMMMMMMMMMMNNh. --dmmmmmNNMMMMMMMMMMs` - -+oossyhmMMMMMMMMd- - `sNMMMMMMMMMMMMMm: - `yMMMMMMNmdhhhh: - `sNMMMMMNmmho. - `+mMMMMMMMy. - .yNMMMm+` - `:yd+. -EOF - ;; - - "Raspbian_small"*) - set_colors 2 1 - read -rd '' ascii_data <<'EOF' -${c1} .. ,. - :oo: .:oo: - 'o\\o o/o: -${c2} :: . :: . :: -:: ::: ::: :: -:' '',.'' ': - ::: :::: ::: - ':, '' ,:' - ' ~::~ ' -EOF - ;; - "Raspbian"*) set_colors 2 1 read -rd '' ascii_data <<'EOF' @@ -9977,30 +7393,6 @@ ${c1} `.::///+:/-. --///+//-:`` EOF ;; - "Reborn OS"* | "Reborn"*) - set_colors 2 2 8 - read -rd '' ascii_data <<'EOF' -${c3} - mMMMMMMMMM MMMMMMMMMm - NM MN - MM ${c1}dddddddd dddddddd ${c3}MN - mM ${c1}dd dd ${c3}MM - ${c1}dd hhhhhh hhhhh dd - ${c3}mM ${c1}hh hh ${c3}Mm - NM ${c1}hd ${c3}mMMMMMMd ${c1}dh ${c3}MN - NM ${c1}dd hh ${c3}mMMMMMMMMm ${c1}hh dd ${c3}MN -NM ${c1}dd hh ${c3}mMMMMMMMMMMm ${c1}hh dd ${c3}MN - NM ${c1}dd hh ${c3}mMMMMMMMMm ${c1}hh dd ${c3}MN - NM ${c1}hd ${c3}mMMMMMMm ${c1}dh ${c3}MN - mM ${c1}hh hh ${c3}Mm - ${c1}dd hhhhhh hhhhhh dd - ${c3}MM ${c1}dd dd ${c3}MM - MM ${c1}dddddddd dddddddd ${c3}MN - NM MN - mMMMMMMMMM MMMMMMMMMm -EOF - ;; - "Red Star"* | "Redstar"*) set_colors 1 7 3 read -rd '' ascii_data <<'EOF' @@ -10047,7 +7439,7 @@ RRRR RRRRRRRRRRRRRRRRRRR R RRRR EOF ;; - "redhat_old" | "rhel_old"*) + "Redhat"* | "Red Hat"* | "rhel"*) set_colors 1 7 3 read -rd '' ascii_data <<'EOF' ${c1} `.-..........` @@ -10069,31 +7461,7 @@ MMM MMMMMMMMMMMMMMyyddMMM+ EOF ;; - "Redhat"* | "Red Hat"* | "rhel"*) - set_colors 1 - read -rd '' ascii_data <<'EOF' -${c1} .MMM..:MMMMMMM - MMMMMMMMMMMMMMMMMM - MMMMMMMMMMMMMMMMMMMM. - MMMMMMMMMMMMMMMMMMMMMM - ,MMMMMMMMMMMMMMMMMMMMMM: - MMMMMMMMMMMMMMMMMMMMMMMM - .MMMM' MMMMMMMMMMMMMMMMMMMMMM - MMMMMM `MMMMMMMMMMMMMMMMMMMM. -MMMMMMMM MMMMMMMMMMMMMMMMMM . -MMMMMMMMM. `MMMMMMMMMMMMM' MM. -MMMMMMMMMMM. MMMM -`MMMMMMMMMMMMM. ,MMMMM. - `MMMMMMMMMMMMMMMMM. ,MMMMMMMM. - MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM - MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM: - MMMMMMMMMMMMMMMMMMMMMMMMMMMMMM - `MMMMMMMMMMMMMMMMMMMMMMMM: - ``MMMMMMMMMMMMMMMMM' -EOF - ;; - - "Refracted Devuan"* | "Refracted_Devuan"*) + "Refracted Devuan"*) set_colors 8 7 read -rd '' ascii_data <<'EOF' ${c2} A @@ -10117,100 +7485,6 @@ ${c2} A EOF ;; - "Regata"*) - set_colors 7 1 4 5 3 2 - read -rd '' ascii_data <<'EOF' -${c1} ddhso+++++osydd - dho/.`hh${c2}.:/+/:.${c1}hhh`:+yd - do-hhhhhh${c2}/sssssss+`${c1}hhhhh./yd - h/`hhhhhhh${c2}-sssssssss:${c1}hhhhhhhh-yd - do`hhhhhhhhh${c2}`ossssssso.${c1}hhhhhhhhhh/d - d/hhhhhhhhhhhh${c2}`/ossso/.${c1}hhhhhhhhhhhh.h - /hhhhhhhhhhhh${c3}`-/osyso/-`${c1}hhhhhhhhhhhh.h -shh${c4}-/ooo+-${c1}hhh${c3}:syyso+osyys/`${c1}hhh${c5}`+oo`${c1}hhh/ -h${c4}`ohhhhhhho`${c3}+yyo.${c1}hhhhh${c3}.+yyo`${c5}.sssssss.${c1}h`h -s${c4}:hhhhhhhhho${c3}yys`${c1}hhhhhhh${c3}.oyy/${c5}ossssssso-${c1}hs -s${c4}.yhhhhhhhy/${c3}yys`${c1}hhhhhhh${c3}.oyy/${c5}ossssssso-${c1}hs -hh${c4}./syyys+.${c1} ${c3}+yy+.${c1}hhhhh${c3}.+yyo`${c5}.ossssso/${c1}h`h -shhh${c4}``.`${c1}hhh${c3}`/syyso++oyys/`${c1}hhh${c5}`+++-`${c1}hh:h -d/hhhhhhhhhhhh${c3}`-/osyso+-`${c1}hhhhhhhhhhhh.h - d/hhhhhhhhhhhh${c6}`/ossso/.${c1}hhhhhhhhhhhh.h - do`hhhhhhhhh${c6}`ossssssso.${c1}hhhhhhhhhh:h - h/`hhhhhhh${c6}-sssssssss:${c1}hhhhhhhh-yd - h+.hhhhhh${c6}+sssssss+${c1}hhhhhh`/yd - dho:.hhh${c6}.:+++/.${c1}hhh`-+yd - ddhso+++++osyhd -EOF - ;; - - "Regolith"*) - set_colors 1 - read -rd '' ascii_data <<'EOF' -${c1} - ``....``` - `.:/++++++/::-.` - -/+++++++:.` - -++++++++:` - `/++++++++- - `/++++++++. -/+/ - /++++++++/ `` .:+++:. - -+++++++++/ ./++++:+++/-` - :+++++++++/ `+++++++/-` - :++++++++++` .-/+++++++` - `:++++++++++/``.-/++++:-:::-` ` - `:+++++++++++++++++/:.` ./` -:++/-:+++++++++/:-.. -/+. -+++++++++/::-...:/+++/-..````..-/+++. -`......``.::/+++++++++++++++++++++/. - -/+++++++++++++++++++++/. - .:/+++++++++++++++/-` - `.-:://////:-. -EOF - ;; - - "rocky_small"*) - set_colors 2 - read -rd '' ascii_data <<'EOF' -${c1} `-/+++++++++/-.` - `-+++++++++++++++++-` -.+++++++++++++++++++++. --+++++++++++++++++++++++. -+++++++++++++++/-/+++++++ -+++++++++++++/. ./+++++ -+++++++++++:. ./+++ -+++++++++:` `:/:` .:/ --++++++:` .:+++++:` - .+++-` ./+++++++++:` - `-` ./+++++++++++- - -+++++++++:-.` -EOF - ;; - - "rocky"*) - set_colors 35 - read -rd '' ascii_data <<'EOF' -${c1} __wgliliiligw_, - _williiiiiiliilililw, - _%iiiiiilililiiiiiiiiiii_ - .Qliiiililiiiiiiililililiilm. - _iiiiiliiiiiililiiiiiiiiiiliil, - .lililiiilililiiiilililililiiiii, -_liiiiiiliiiiiiiliiiiiF{iiiiiilili, -jliililiiilililiiili@` ~ililiiiiiL -iiiliiiiliiiiiiili>` ~liililii -liliiiliiilililii` -9liiiil -iiiiiliiliiiiii~ "4lili -4ililiiiiilil~| -w, )4lf --liiiiililiF' _liig, )' - )iiiliii@` _QIililig, - )iiii>` .Qliliiiililw - )<>~ .mliiiiiliiiiiil, - _gllilililiililii~ - giliiiiiiiiiiiiT` - -^~$ililili@~~' -EOF - ;; - "Rosa"*) set_colors 4 7 1 read -rd '' ascii_data <<'EOF' @@ -10278,22 +7552,27 @@ ${c1} ........... EOF ;; - "Sailfish"*) + "SailfishOS"*) set_colors 4 5 7 6 read -rd '' ascii_data <<'EOF' -${c1} _a@b - _#b (b - _@@ @_ _, - _#^@ _#*^^*gg,aa@^^ - #- @@^ _a@^^ - @_ *g#b - ^@_ ^@_ - ^@_ @ - @(b (b - #b(b#^ - _@_#@^ - _a@a*^ - ,a@*^ +${c1} .+eWWW + .+ee+++eee e. + .ee++eeeeeeee +e. + .e++ee++eeeeeee+eee+e+ + ee.e+.ee+eee++eeeeee+ + W.+e.e+.e++ee+eee + W.+e.W.ee.W++ee' + +e.W W.e+.W.W+ + W.e.+e.W W W. + e e e +e.W.W + .W W W. + W.+e.W. + W++e.ee+. + ++ +ee++eeeee++. + ' '+++e 'ee. + ee + ee + e EOF ;; @@ -10349,79 +7628,6 @@ M- ,=;;;#:, ,:#;;:=, ,@ EOF ;; - "Septor"*) - set_colors 4 7 4 - read -rd '' ascii_data <<'EOF' -${c1}ssssssssssssssssssssssssssssssssssssssss -ssssssssssssssssssssssssssssssssssssssss -ssssssssssssssssssssssssssssssssssssssss -ssssssssssssssssssssssssssssssssssssssss -ssssssssss${c2};okOOOOOOOOOOOOOOko;${c1}ssssssssss -sssssssss${c2}oNWWWWWWWWWWWWWWWWWWNo${c1}sssssssss -ssssssss${c2}:WWWWWWWWWWWWWWWWWWWWWW:${c1}ssssssss -ssssssss${c2}lWWWWWk${c1}ssssssssss${c2}lddddd:${c1}ssssssss -ssssssss${c2}cWWWWWNKKKKKKKKKKKKOx:${c1}ssssssssss -${c3}yy${c1}sssssss${c2}OWWWWWWWWWWWWWWWWWWWWx${c1}sssssss${c3}yy -yyyyyyyyyy${c2}:kKNNNNNNNNNNNNWWWWWW:${c3}yyyyyyyy -yyyyyyyy${c2}sccccc;${c3}yyyyyyyyyy${c2}kWWWWW:${c3}yyyyyyyy -yyyyyyyy${c2}:WWWWWWNNNNNNNNNNWWWWWW;${c3}yyyyyyyy -yyyyyyyy${c2}.dWWWWWWWWWWWWWWWWWWWNd${c3}yyyyyyyyy -yyyyyyyyyy${c2}sdO0KKKKKKKKKKKK0Od;${c3}yyyyyyyyyy -yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy -yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy -yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy -yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy -yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy -EOF - ;; - - "Serene"*) - set_colors 6 6 - read -rd '' ascii_data <<'EOF' -${c1} __---''''''---__ - . . - : : - - _______----_- - s __----''' __---- - __h_ _-' _-' h - '-._''--.._ ; _-' y - : ''-._ '-._/ _-' : - y ':_ _--'' y - m .--'' '-._.;' m - m : : m - y '.._ '-__ y - : '--._ '''----___ : - y '--._ ''-- _ y - h '--._ : h - s __'; vs - - __..--'' - - :_..--'' : - . _ . - `''---______---''-`` -EOF - ;; - - "SharkLinux"*) - set_colors 4 7 - read -rd '' ascii_data <<'EOF' -${c1} `:shd/ - `:yNMMMMs - `-smMMMMMMN. - .+dNMMMMMMMMs - .smNNMMMMMMMMm` - .sNNNNNNNMMMMMM/ - `omNNNNNNNMMMMMMm - /dNNNNNNNNMMMMMMM+ - .yNNNNNNNNNMMMMMMMN` - +mNNNNNNNNNMMMMMMMMh - .hNNNNNNNNNNMMMMMMMMMs - +mMNNNNNNNNMMMMMMMMMMMs - .hNMMNNNNMMMMMMMMMMMMMMMd - .oNNNNNNNNNNMMMMMMMMMMMMMMMo - `:+syyssoo++++ooooossssssssssso: -EOF - ;; - "Siduction"*) set_colors 4 4 read -rd '' ascii_data <<'EOF' @@ -10448,19 +7654,6 @@ _Qh;.nm .QWc. {QL ]QQp;..vmQ/ EOF ;; - "slackware_small"*) - set_colors 4 7 1 - read -rd '' ascii_data <<'EOF' -${c1} ________ - / ______| - | |______ - \\______ \\ - ______| | -| |________/ -|____________ -EOF - ;; - "Slackware"*) set_colors 4 7 1 read -rd '' ascii_data <<'EOF' @@ -10534,22 +7727,6 @@ yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy EOF ;; - "SkiffOS"*) - set_colors 4 7 - read -rd '' ascii_data <<'EOF' -${c2} - ,@@@@@@@@@@@w,_ - ${c2}====~~~,,.${c2}A@@@@@@@@@@@@@@@@@W,_ - ${c1}`||||||||||||||L{${c2}"@$@@@@@@@@B" - ${c1}`|||||||||||||||||||||L{${c2}"$D - ${c2}@@@@@@@@@@@@@@@@@@@@@${c1}_||||}==, - ${c2}*@@@@@@@@@@@@@@@@@@@@@@@@@p${c1}||||==, - ${c1}`'||LLL{{""${c2}@$B@@@@@@@@@@@@@@@p${c1}|| - ${c1}`~=|||||||||||L"${c2}$@@@@@@@@@@@ - ${c1}````'"""""""${c2}'"""""""" -EOF - ;; - "Solus"*) set_colors 4 7 1 read -rd '' ascii_data <<'EOF' @@ -10576,7 +7753,7 @@ ${c2} -``````````` EOF ;; - "Source Mage"* | "Source_Mage"*) + "Source Mage"*) set_colors 4 7 1 read -rd '' ascii_data <<'EOF' ${c2} :ymNMNho. @@ -10630,31 +7807,6 @@ ${c1} EOF ;; - "Star"*) - set_colors 7 - read -rd '' ascii_data <<'EOF' -${c1} ./ - `yy- - `y.`y` - `` s- .y ` - +h//:..` +/ /o ``..:/so - /o``.-::/:/+ o/://::-.`+o` - :s` `. .` `s/ - .y. .s- - `y- :s` - .-//. /+:. - .:/:. .:/:. --+o:. .:+:. --///++///:::` .-::::///+so- - ``..o/ d-....``` - s. `/. d - h .+o-+o- h. - h -o/` `/o: s: - -s/o:` `:o/+/ - /s- -yo -EOF - ;; - "SteamOS"*) set_colors 5 7 read -rd '' ascii_data <<'EOF' @@ -10679,17 +7831,6 @@ ${c2},',. '; ,+##############' EOF ;; - "sunos_small" | "solaris_small") - set_colors 3 7 - read -rd '' ascii_data <<'EOF' -${c1} . .; . - . :; :: ;: . - .;. .. .. .;. -.. .. .. .. - .;, ,;. -EOF - ;; - "SunOS" | "Solaris") set_colors 3 7 read -rd '' ascii_data <<'EOF' @@ -10704,42 +7845,7 @@ ${c1} `- ` EOF ;; - "openSUSE Leap"* | "openSUSE_Leap"*) - set_colors 2 7 - read -rd '' ascii_data <<'EOF' -${c2} `-++:` - ./oooooo/- - `:oooooooooooo:. - -+oooooooooooooooo+-` - ./oooooooooooooooooooooo/- - :oooooooooooooooooooooooooo: - ` `-+oooooooooooooooooooo/- ` - `:oo/- .:ooooooooooooooo+:` `-+oo/. -`/oooooo:. -/oooooooooo/. ./oooooo/. - `:+ooooo+-` `:+oooo+- `:oooooo+:` - .:oooooo/. .::` -+oooooo/. - -/oooooo:. ./oooooo+- - `:+ooooo+-:+oooooo:` - ./oooooooooo/. - -/oooo+:` - `:/. -EOF - ;; - - "t2"*) - set_colors 7 4 - read -rd '' ascii_data <<'EOF' -${c2} -TTTTTTTTTT - tt ${c1}222${c2} - tt ${c1}2 2${c2} - tt ${c1}2${c2} - tt ${c1}2${c2} - tt ${c1}22222${c2} -EOF - ;; - - "openSUSE Tumbleweed"* | "openSUSE_Tumbleweed"*) + "openSUSE Tumbleweed"*) set_colors 2 7 read -rd '' ascii_data <<'EOF' ${c2} ...... @@ -10758,19 +7864,6 @@ ${c2} ...... EOF ;; - "opensuse_small" | "suse_small"*) - set_colors 2 7 - read -rd '' ascii_data <<'EOF' -${c1} _______ -__| __ \\ - / .\\ \\ - \\__/ | - _______| - \\_______ -__________/ -EOF - ;; - "openSUSE"* | "open SUSE"* | "SUSE"*) set_colors 2 7 read -rd '' ascii_data <<'EOF' @@ -10792,40 +7885,6 @@ dKK${c1}KKKKKKKKKK;.;oOKx,..${c2}^${c1}..;kKKK0.${c2} dKd 'l0Kk:. .;xK0l' 'lkK0xl:;,,,,;:ldO0kl' '^:ldxkkkkxdl:^' -EOF - ;; - "parch"* | "Parch"* | "PARCH"*) - set_colors 4 7 1 - read -rd '' ascii_data <<'EOF' - - -‌ ${c1} ,:lodddd. - .:clooood. - ;clllooooc - ;cclllllloo - .cccccllllll - . ,cccclllll - ':::;; ccccclll; - .:::cccccccccccll; - ;::::ccccllllllcll: - .;::::cccclllloool::; - ;;;::::cccclllolc::::;. - ;;;::::cccclllccc:::::;. - ;;;::::cccclccccc::::::;. - ;;;;::::::llcccccc:::::' - ;;;;:; ,clllccccccc:: - .;; .cllllllcccccc::;::::' - .'''''''''',:lddoooolll - '.....'''',cdddooooollll - ........':oddddoooolllllc - ....';ldddddooooolllllc: - ,cdddddddooooollllccc - :ddddddoooolllllccc - ;ddooooolllllcc. - :ooollllc. - c' - - EOF ;; @@ -10899,33 +7958,7 @@ ${c1} ▀█████████ ███████${c2}███▀ EOF ;; - "Ubuntu Cinnamon"* | "Ubuntu-Cinnamon"*) - set_colors 1 7 - read -rd '' ascii_data <<'EOF' -${c1} .-/+oooooooo+/-. - `:+oooooooooooooooooo+:` - -+oooooooooooooooooooooooo+- - .ooooooooooooooooooo${c2}:ohNd${c1}oooooo. - /oooooooooooo${c2}:/+oo++:/ohNd${c1}ooooooo/ - +oooooooooo${c2}:osNdhyyhdNNh+:+${c1}oooooooo+ - /ooooooooo${c2}/dN/${c1}ooooooooo${c2}/sNNo${c1}ooooooooo/ -.ooooooooo${c2}oMd:${c1}oooooooooooo${c2}:yMy${c1}ooooooooo. -+ooooo${c2}:+o/Md${c1}oooooo${c2}:sm/${c1}oo/ooo${c2}yMo${c1}oooooooo+ -ooo${c2}:sdMdosMo${c1}ooooo${c2}oNMd${c1}//${c2}dMd+${c1}o${c2}:so${c1}ooooooooo -oooo${c2}+ymdosMo${c1}ooo${c2}+mMm${c1}+/${c2}hMMMMMh+hs${c1}ooooooooo -+oooooo${c2}:${c1}:${c2}/Nm:${c1}/${c2}hMNo${c1}:y${c2}MMMMMMMMMM+${c1}oooooooo+ -.ooooooooo${c2}/NNMNy${c1}:o${c2}NMMMMMMMMMMo${c1}ooooooooo. -/oooooooooo${c2}:yh:${c1}+m${c2}MMMMMMMMMMd/${c1}ooooooooo/ - +oooooooooo${c2}+${c1}/h${c2}mMMMMMMNds//o${c1}oooooooo+ - /oooooooooooo${c2}+:////:o/ymMd${c1}ooooooo/ - .oooooooooooooooooooo${c2}/sdh${c1}oooooo. - -+oooooooooooooooooooooooo+- - `:+oooooooooooooooooo+:` - .-/+oooooooo+/-. -EOF - ;; - - "Ubuntu Budgie"* | "Ubuntu-Budgie"*) + "Ubuntu-Budgie"*) set_colors 4 7 1 read -rd '' ascii_data <<'EOF' ${c2} ./oydmMMMMMMmdyo/. @@ -10973,30 +8006,29 @@ ${c4} `soooo. .oooo` EOF ;; - "Ubuntu MATE"* | "Ubuntu-MATE"*) + "Ubuntu-MATE"*) set_colors 2 7 read -rd '' ascii_data <<'EOF' -${c1} .:/+oossssoo+/:.` - `:+ssssssssssssssssss+:` - -+sssssssssssssss${c2}y${c1}ssssssss+- - .osssssssssssss${c2}yy${c1}ss${c2}mMmh${c1}ssssssso. - /sssssssss${c2}ydmNNNmmd${c1}s${c2}mMMMMNdy${c1}sssss/ - `+ssssssss${c2}hNNdy${c1}sssssss${c2}mMMMMNdy${c1}ssssss+` - +sssssss${c2}yNNh${c1}ss${c2}hmNNNNm${c1}s${c2}mMmh${c1}s${c2}ydy${c1}sssssss+ --sssss${c2}y${c1}ss${c2}Nm${c1}ss${c2}hNNh${c1}ssssss${c2}y${c1}s${c2}hh${c1}ss${c2}mMy${c1}sssssss- -+ssss${c2}yMNdy${c1}ss${c2}hMd${c1}ssssssssss${c2}hMd${c1}ss${c2}NN${c1}sssssss+ -sssss${c2}yMMMMMmh${c1}sssssssssssss${c2}NM${c1}ss${c2}dMy${c1}sssssss -sssss${c2}yMMMMMmhy${c1}ssssssssssss${c2}NM${c1}ss${c2}dMy${c1}sssssss -+ssss${c2}yMNdy${c1}ss${c2}hMd${c1}ssssssssss${c2}hMd${c1}ss${c2}NN${c1}sssssss+ --sssss${c2}y${c1}ss${c2}Nm${c1}ss${c2}hNNh${c1}ssssssss${c2}dh${c1}ss${c2}mMy${c1}sssssss- - +sssssss${c2}yNNh${c1}ss${c2}hmNNNNm${c1}s${c2}mNmh${c1}s${c2}ymy${c1}sssssss+ - +ssssssss${c2}hNNdy${c1}sssssss${c2}mMMMMmhy${c1}ssssss+ - /sssssssss${c2}ydmNNNNmd${c1}s${c2}mMMMMNdh${c1}sssss/ - .osssssssssssss${c2}yy${c1}ss${c2}mMmdy${c1}sssssso. - -+sssssssssssssss${c2}y${c1}ssssssss+- - `:+ssssssssssssssssss+:` - .:/+oossssoo+/:. - +${c1} `:+shmNNMMNNmhs+:` + .odMMMMMMMMMMMMMMMMMMdo. + /dMMMMMMMMMMMMMMMmMMMMMMMMd/ + :mMMMMMMMMMMMMNNNNM/`/yNMMMMMMm: + `yMMMMMMMMMms:..-::oM: -omMMMMMy` + `dMMMMMMMMy-.odNMMMMMM: -odMMMMMMd` + hMMMMMMMm-.hMMy/....+M:`/yNm+mMMMMMMMh +/MMMMNmMN-:NMy`-yNMMMMMmNyyMN:`dMMMMMMM/ +hMMMMm -odMMh`sMMMMMMMMMMs sMN..MMMMMMMh +NMMMMm `/yNMMMMMMMMMMMM: MM+ mMMMMMMN +NMMMMm `/yNMMMMMMMMMMMM: MM+ mMMMMMMN +hMMMMm -odMMh sMMMMMMMMMMs oMN..MMMMMMMh +/MMMMNNMN-:NMy`-yNMMMMMNNsyMN:`dMMMMMMM/ + hMMMMMMMm-.hMMy/....+M:.+hNd+mMMMMMMMh + `dMMMMMMMMy-.odNMMMMMM: :smMMMMMMd` + yMMMMMMMMMms/..-::oM: .+dMMMMMy + :mMMMMMMMMMMMMNNNNM: :smMMMMMMm: + /dMMMMMMMMMMMMMMMdNMMMMMMMd/ + .odMMMMMMMMMMMMMMMMMMdo. + `:+shmNNMMNNmhs+:` EOF ;; @@ -11024,7 +8056,7 @@ ${c3} `oo++. EOF ;; - "Ubuntu Studio"* | "Ubuntu-Studio") + "Ubuntu-Studio") set_colors 6 7 read -rd '' ascii_data <<'EOF' ${c1} ..-::::::-.` @@ -11050,88 +8082,29 @@ ${c1} ..-::::::-.` EOF ;; - "ubuntu_small") + "Ubuntu"*) set_colors 1 7 3 read -rd '' ascii_data <<'EOF' -${c1} _ - ---(_) - _/ --- \\ -(_) | | - \\ --- _/ - ---(_) -EOF - ;; - - "Ubuntu"* | "i3buntu"*) - set_colors 1 7 3 - read -rd '' ascii_data <<'EOF' -${c1} .-/+oossssoo+\-. - ´:+ssssssssssssssssss+:` +${c1} .-/+oossssoo+/-. + `:+ssssssssssssssssss+:` -+ssssssssssssssssssyyssss+- .ossssssssssssssssss${c2}dMMMNy${c1}sssso. - /sssssssssss${c2}hdmmNNmmyNMMMMh${c1}ssssss\ + /sssssssssss${c2}hdmmNNmmyNMMMMh${c1}ssssss/ +sssssssss${c2}hm${c1}yd${c2}MMMMMMMNddddy${c1}ssssssss+ - /ssssssss${c2}hNMMM${c1}yh${c2}hyyyyhmNMMMNh${c1}ssssssss\ + /ssssssss${c2}hNMMM${c1}yh${c2}hyyyyhmNMMMNh${c1}ssssssss/ .ssssssss${c2}dMMMNh${c1}ssssssssss${c2}hNMMMd${c1}ssssssss. +ssss${c2}hhhyNMMNy${c1}ssssssssssss${c2}yNMMMy${c1}sssssss+ oss${c2}yNMMMNyMMh${c1}ssssssssssssss${c2}hmmmh${c1}ssssssso oss${c2}yNMMMNyMMh${c1}sssssssssssssshmmmh${c1}ssssssso +ssss${c2}hhhyNMMNy${c1}ssssssssssss${c2}yNMMMy${c1}sssssss+ .ssssssss${c2}dMMMNh${c1}ssssssssss${c2}hNMMMd${c1}ssssssss. - \ssssssss${c2}hNMMM${c1}yh${c2}hyyyyhdNMMMNh${c1}ssssssss/ + /ssssssss${c2}hNMMM${c1}yh${c2}hyyyyhdNMMMNh${c1}ssssssss/ +sssssssss${c2}dm${c1}yd${c2}MMMMMMMMddddy${c1}ssssssss+ - \sssssssssss${c2}hdmNNNNmyNMMMMh${c1}ssssss/ + /sssssssssss${c2}hdmNNNNmyNMMMMh${c1}ssssss/ .ossssssssssssssssss${c2}dMMMNy${c1}sssso. -+sssssssssssssssss${c2}yyy${c1}ssss+- `:+ssssssssssssssssss+:` - .-\+oossssoo+/-. -EOF - ;; - - "Univention"*) - set_colors 1 7 - read -rd '' ascii_data <<'EOF' -${c1} ./osssssssssssssssssssssso+- - `ohhhhhhhhhhhhhhhhhhhhhhhhhhhhy: - shhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh- - `-//${c2}sssss${c1}/hhhhhhhhhhhhhh+${c2}s${c1}.hhhhhhhhh+ - .ohhhy${c2}sssss${c1}.hhhhhhhhhhhhhh.${c2}sss${c1}+hhhhhhh+ -.yhhhhy${c2}sssss${c1}.hhhhhhhhhhhhhh.${c2}ssss${c1}:hhhhhh+ -+hhhhhy${c2}sssss${c1}.hhhhhhhhhhhhhh.${c2}sssss${c1}yhhhhh+ -+hhhhhy${c2}sssss${c1}.hhhhhhhhhhhhhh.${c2}sssss${c1}yhhhhh+ -+hhhhhy${c2}sssss${c1}.hhhhhhhhhhhhhh.${c2}sssss${c1}yhhhhh+ -+hhhhhy${c2}sssss${c1}.hhhhhhhhhhhhhh.${c2}sssss${c1}yhhhhh+ -+hhhhhy${c2}sssss${c1}.hhhhhhhhhhhhhh.${c2}sssss${c1}yhhhhh+ -+hhhhhy${c2}sssss${c1}.hhhhhhhhhhhhhh.${c2}sssss${c1}yhhhhh+ -+hhhhhy${c2}sssss${c1}.hhhhhhhhhhhhhh.${c2}sssss${c1}yhhhhh+ -+hhhhhy${c2}ssssss${c1}+yhhhhhhhhhhy/${c2}ssssss${c1}yhhhhh+ -+hhhhhh:${c2}sssssss${c1}:hhhhhhh+${c2}.ssssssss${c1}yhhhhy. -+hhhhhhh+`${c2}ssssssssssssssss${c1}hh${c2}sssss${c1}yhhho` -+hhhhhhhhhs+${c2}ssssssssssss${c1}+hh+${c2}sssss${c1}/:-` --hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhho - :yhhhhhhhhhhhhhhhhhhhhhhhhhhhh+` - -+ossssssssssssssssssssss+:` -EOF - ;; - - "Venom"*) - set_colors 8 4 - read -rd '' ascii_data <<'EOF' -${c1} ::::::: ::::::: - mMMMMMMm dMMMMMMm - /MMMMMMMo +MMMMMMM/ - yMMMMMMN mMMMMMMy - NMMMMMMs oMMMMMMm - +MMMMMMN: NMMMMMM+ - hMMMMMMy sMMMMMMy - :NMMMMMM::NMMMMMN: - oMMMMMMyyMMMMMM+ - dMMMMMMMMMMMMh - /MMMMMMMMMMMN: - sMMMMMMMMMMo - mMMMMMMMMd - +MMMMMMMN: - :::::: + .-/+oossssoo+/-. EOF ;; @@ -11139,12 +8112,12 @@ EOF set_colors 2 8 read -rd '' ascii_data <<'EOF' ${c1} _______ - _ \\______ - -| \\ ___ \\ | + _ \______ - +| \ ___ \ | | | / \ | | | | \___/ | | -| \\______ \\_| - -_______\\ +| \______ \_| + -_______\ EOF ;; @@ -11158,7 +8131,7 @@ ${c1} __.;=====;.__ _vi, ` --+=++++: .uvnvi. _._ -==+==+. .vvnvnI` .;==|==;. :|=||=|. -${c2}+QmQQm${c1}pvvnv; ${c2}_yYsyQQWUUQQQm #QmQ#${c1}:${c2}QQQWUV$QQm. +${c2}+QmQQm${c1}pvvnv; ${c2}_yYsyQQWUUQQQm #QmQ#${c1}:${c2}QQQWUV$QQmL ${c2} -QQWQW${c1}pvvo${c2}wZ?.wQQQE${c1}==<${c2}QWWQ/QWQW.QQWW${c1}(: ${c2}jQWQE ${c2} -$QQQQmmU' jQQQ@${c1}+=<${c2}QWQQ)mQQQ.mQQQC${c1}+;${c2}jWQQ@' ${c2} -$WQ8Y${c1}nI: ${c2}QWQQwgQQWV${c1}`${c2}mWQQ.jQWQQgyyWW@! @@ -11169,119 +8142,6 @@ ${c1} -1vvnvv. `~+++` ++|+++ +Invnvnvnnnnnnnnvvnn;. ~|Invnvnvvnvvvnnv}+` -~|{*l}*|~ -EOF - - ;; - - "VNux"*) - set_colors 11 8 15 1 7 - read -rd '' ascii_data <<'EOF' -${c1} ` - ^[XOx~. - ^_nwdbbkp0ti' - -${c2} _j>!vC1,, - ${c4},${c2} ,CY${c3}O${c2}t${c3}O${c2}1(l;" -`${c4}~-{r(1I${c2} ^${c1}/zmwJuc:${c2}I^ -'${c4}?)|${c1}U${c4}/}-${c2} ^${c3}f${c1}OCLLOw${c3}_${c2},; - ,${c4}i,``. ${c2}",${c3}k%ooW@$d"${c2}I,' - ' ;^${c3}u$$$$$$$$^<${c2}:^ - ` .>>${c3}($$${c5}$@@@@$$${c3}$nl${c2}[:: - `!}?${c3}B$${c5}%&WMMW&%$${c3}$1}-${c2}}": - ^?j${c3}Z$${c5}WMMWWWWMMW$${c3}ofc${c2};;` - <~x&${c3}$${c5}&MWWWWWWWWp${c3}-${c5}l>[< -${c1} 'ljmwn${c2}~tk8${c5}MWWWWM8O${c2}X${c1}r${c2}+]nC${c1}[ -!JZqwwdX${c2}:^C8${c5}#MMMM@${c2}X${c1}Odpdpq0< - ^x00J(" - ^" -EOF - - ;; - - "LangitKetujuh"*) - set_colors 7 4 - read -rd '' ascii_data <<'EOF' -${c1} - L7L7L7L7L7L7L7L7L7L7L7L7L7L7L7L7L7L7L7L7L7L - 'L7L7L7L7L7L7L7L7L7L7L7L7L7L7L7L7L7L7L7L - L7L. 'L7L7L7L7L7L7L7L7L7L7L7L7L7L7L7L7L7L - L7L7L7L L7L7L7L - L7L7L7L L7L7L7L - L7L7L7L L7L7L7L7L7L7L7L7L7L7L7L - L7L7L7L 'L7L7L7L7L7L7L7L7L7L - L7L7L7L 'L7L7L7L7L7L7L7L - L7L7L7L L7L7L7L - L7L7L7L L7L7L7L - L7L7L7L7L7L7L7L7L7L7L7L7L7L7L7L7L7L. 'L7L - L7L7L7L7L7L7L7L7L7L7L7L7L7L7L7L7L7L7L7L. - L7L7L7L7L7L7L7L7L7L7L7L7L7L7L7L7L7L7L7L7L7L -${c2} -EOF - ;; - - "semc"*) - set_colors 2 8 1 - read -rd '' ascii_data <<'EOF' -${c1} /\ - ______/ \ - / |()| ${c2}E M C -${c1} | (-- | | - \ \ | | -.----) | |__| -|_______/ / ${c3}"${c1} \ - ${c3}" - " -EOF - - ;; - - "Obarun"*) - set_colors 6 6 7 1 - read -rd '' ascii_data <<'EOF' -${c1} ,;::::; - ;cooolc;, - ,coool; - ,loool, - loooo; - :ooool - cooooc ,:ccc; - looooc :oooooool - cooooo ;oooooooooo, - :ooooo; :ooooooooooo - oooooo oooooooooooc - :oooooo :ooooooooool - loooooo ;oooooooool - looooooc .coooooooc - cooooooo: ,;co; - ,ooooooool; ,:loc - cooooooooooooloooooc - ;ooooooooooooool; - ;looooooolc; -EOF - ;; - - *"[Windows 11]"*|*"on Windows 11"*|\ - "Windows 11"* |"windows11") - set_colors 6 7 - read -rd '' ascii_data <<'EOF' -${c1} -################ ################ -################ ################ -################ ################ -################ ################ -################ ################ -################ ################ -################ ################ - -################ ################ -################ ################ -################ ################ -################ ################ -################ ################ -################ ################ -################ ################ EOF ;; @@ -11336,52 +8196,29 @@ EOF "Xubuntu"*) set_colors 4 7 1 read -rd '' ascii_data <<'EOF' -${c1} `.:/ossyyyysso/:. - `.yyyyyyyyyyyyyyyyyyyy.` - `yyyyyyyyyyyyyyyyyyyyyyyyyy` - `yyyyyyyyyyyyyyyyyyyy${c2}::${c1}yyyyyyyy` - .yyyyyyyyyyy${c2}/+:${c1}yyyyyyy${c2}ds${c1}yyy${c2}+y${c1}yyyy. - yyyyyyy${c2}:o/${c1}yy${c2}dMMM+${c1}yyyyy${c2}/M+${c1}y${c2}:hM+${c1}yyyyyy - yyyyyyy${c2}+MMMy${c1}y${c2}mMMMh${c1}yyyyy${c2}yM::mM+${c1}yyyyyyyy -`yyyyyyy${c2}+MMMMysMMMd${c1}yyyyy${c2}dh:mN+${c1}yyyyyyyyy` -yyyyyyyy${c2}:NMMMMmMMMMmmdhyy+/y:${c1}yyyyyyyyyyy -yyyyyyyy${c2}+MMMMMMMMMMMMMMMMMMNho:${c1}yyyyyyyyy -yyyyyyyy${c2}mMMMMMMMMMMMMMMMMMMMMMMy${c1}yyyyyyyy -yyyyyyy${c2}+MMMMMMMMMMMMMMMMMMMMMMMM/${c1}yyyyyyy -`yyyyyy${c2}sMMMMMMMMMMMMMMMMMMMMMMmo${c1}yyyyyyy` - yyyyyy${c2}oMMMMMMMMMMMMMMMMMMMmy+${c1}yyyyyyyyy - yyyyy${c2}:mMMMMMMMMMMMMMMNho/${c1}yyyyyyyyyyy - .yyyy${c2}:yNMMMMMMMNdyo:${c1}yyyyyyyyyyyyy. - `yyyyyy${c2}:/++/::${c1}yyyyyyyyyyyyyyyyy` - `yyyyyyyyyyyyyyyyyyyyyyyyyy` - `.yyyyyyyyyyyyyyyyyyyy.` - `.:/oosyyyysso/:.` +${c1} `-/osyhddddhyso/-` + .+yddddddddddddddddddy+. + :yddddddddddddddddddddddddy: + -yddddddddddddddddddddhdddddddy- + odddddddddddyshdddddddh`dddd+ydddo + `yddddddhshdd- ydddddd+`ddh.:dddddy` + sddddddy /d. :dddddd-:dy`-ddddddds +:ddddddds /+ .dddddd`yy`:ddddddddd: +sdddddddd` . .-:/+ssdyodddddddddds +ddddddddy `:ohddddddddd +dddddddd. +dddddddd +sddddddy ydddddds +:dddddd+ .oddddddd: + sdddddo ./ydddddddds + `yddddd. `:ohddddddddddy` + oddddh/` `.:+shdddddddddddddo + -ydddddhyssyhdddddddddddddddddy- + :yddddddddddddddddddddddddy: + .+yddddddddddddddddddy+. + `-/osyhddddhyso/-` EOF ;; - "IRIX"*) - set_colors 4 7 - read -rd '' ascii_data <<'EOF' -${c1} ./ohmNd/ +dNmho/- - `:+ydNMMMMMMMM.-MMMMMMMMMdyo:. - `hMMMMMMNhs/sMMM-:MMM+/shNMMMMMMh` - -NMMMMMmo-` /MMM-/MMM- `-omMMMMMN. - `.`-+hNMMMMMNhyMMM-/MMMshmMMMMMmy+...` -+mMNds:-:sdNMMMMMMMyyMMMMMMMNdo:.:sdMMm+ -dMMMMMMmy+.-/ymNMMMMMMMMNmy/-.+hmMMMMMMd -oMMMMmMMMMNds:.+MMMmmMMN/.-odNMMMMmMMMM+ -.MMMM-/ymMMMMMmNMMy..hMMNmMMMMMmy/-MMMM. - hMMM/ `/dMMMMMMMN////NMMMMMMMd/. /MMMh - /MMMdhmMMMmyyMMMMMMMMMMMMhymMMMmhdMMM: - `mMMMMNho//sdMMMMM//NMMMMms//ohNMMMMd - `/so/:+ymMMMNMMMM` mMMMMMMMmh+::+o/` - `yNMMNho-yMMMM` NMMMm.+hNMMNh` - -MMMMd: oMMMM. NMMMh :hMMMM- - -yNMMMmooMMMM- NMMMyomMMMNy- - .omMMMMMMMM-`NMMMMMMMmo. - `:hMMMMMM. NMMMMMh/` - .odNm+ /dNms. -EOF - ;; + "Zorin"*) set_colors 4 6 read -rd '' ascii_data <<'EOF' @@ -11406,7 +8243,7 @@ EOF ;; *) - case $kernel_name in + case "$kernel_name" in *"BSD") set_colors 1 7 4 3 6 read -rd '' ascii_data <<'EOF' @@ -11435,11 +8272,11 @@ EOF "Darwin") set_colors 2 3 1 1 5 4 read -rd '' ascii_data <<'EOF' -${c1} c.' +${c1} 'c. ,xNMM. .OMMMMo - lMMM" - .;loddo:. .olloddol;. + OMMM0, + .;loddo:' loolloddol;. cKMMMMMMMMMMNWMMMMMMMMMM0: ${c2} .KMMMMMMMMMMMMMMMMMMMMMMMWd. XMMMMMMMMMMMMMMMMMMMMMMMX. @@ -11447,11 +8284,11 @@ ${c3};MMMMMMMMMMMMMMMMMMMMMMMM: :MMMMMMMMMMMMMMMMMMMMMMMM: ${c4}.MMMMMMMMMMMMMMMMMMMMMMMMX. kMMMMMMMMMMMMMMMMMMMMMMMMWd. - ${c5}'XMMMMMMMMMMMMMMMMMMMMMMMMMMk - 'XMMMMMMMMMMMMMMMMMMMMMMMMK. + ${c5}.XMMMMMMMMMMMMMMMMMMMMMMMMMMk + .XMMMMMMMMMMMMMMMMMMMMMMMMK. ${c6}kMMMMMMMMMMMMMMMMMMMMMMd ;KMMMMMMMWXXWMMMMMMMk. - "cooc*" "*coo'" + .cooc,. .,coo:. EOF ;; @@ -11496,31 +8333,6 @@ ${c3}#######${c2}#${c1}#####${c2}#${c3}####### ${c3} #####${c2}#######${c3}##### EOF ;; - "Profelis SambaBOX"* | "SambaBOX"*) - set_colors 3 6 - read -rd '' ascii_data <<'EOF' -${c1} - # - *////##### - /////////#########( - .((((((///// ,####(#((((( - /#######(((* (#(((((((((. -//((#(#(#, ((##( ,((((((// -////// #(##########( ////// -////// ((#(#(#(#(##########(///////// -/////( (((((((#########(##((((((///// -/(((#( ((((/ -####(# ((### -#########(((/////////(((((((((, (#(#( -########( /////////(((((((* ##### -####///, *////((( ((((((( -./////////// .//((((((((( - ///////////, *(/////((((* - ,/(((((((((##########/. - .((((((####### - ((##* -EOF - ;; "SunOS") set_colors 3 7 @@ -11560,17 +8372,16 @@ oMMMMmMMMMNds:.+MMMmmMMN/.-odNMMMMmMMMM+ .odNm+ /dNms. EOF ;; - esac ;; esac # Overwrite distro colors if '$ascii_colors' doesn't # equal 'distro'. - [[ ${ascii_colors[0]} != distro ]] && { - color_text=off + if [[ "${ascii_colors[0]}" != "distro" ]]; then + color_text="off" set_colors "${ascii_colors[@]}" - } + fi } main() { @@ -11581,44 +8392,39 @@ main() { eval "$config" get_args "$@" - [[ $verbose != on ]] && exec 2>/dev/null - get_simple "$@" + [[ "$verbose" != "on" ]] && exec 2>/dev/null get_distro get_bold get_distro_ascii - [[ $stdout == on ]] && stdout + [[ "$stdout" == "on" ]] && stdout # Minix doesn't support these sequences. - [[ $TERM != minix && $stdout != on ]] && { + if [[ "$TERM" != "minix" && "$stdout" != "on" ]]; then # If the script exits for any reason, unhide the cursor. trap 'printf "\e[?25h\e[?7h"' EXIT # Hide the cursor and disable line wrap. - printf '\e[?25l\e[?7l' - } + printf "\e[?25l\e[?7l" + fi image_backend get_cache_dir - old_functions print_info dynamic_prompt # w3m-img: Draw the image a second time to fix # rendering issues in specific terminal emulators. - [[ $image_backend == *w3m* ]] && display_image - [[ $image_backend == *ueberzug* ]] && display_image + [[ "$image_backend" == *w3m* ]] && display_image # Add neofetch info to verbose output. err "Neofetch command: $0 $*" err "Neofetch version: $version" - [[ $verbose == on ]] && printf '%b\033[m' "$err" >&2 + # Show error messages. + [[ "$verbose" == "on" ]] && printf "%b" "$err" >&2 # If `--loop` was used, constantly redraw the image. - while [[ $image_loop == on && $image_backend == w3m ]]; do - display_image - sleep 1 - done + while [[ "$image_loop" == "on" && "$image_backend" == "w3m" ]]; do display_image; sleep 1; done return 0 } diff --git a/neofetch.1 b/neofetch.1 index 72cd4e93..4bfa57ab 100644 --- a/neofetch.1 +++ b/neofetch.1 @@ -1,10 +1,10 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.48.3. -.TH NEOFETCH "1" "April 2021" "Neofetch 7.1.0" "User Commands" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. +.TH NEOFETCH "1" "May 2018" "Neofetch 4.0.3" "User Commands" .SH NAME Neofetch \- A fast, highly customizable system info script .SH SYNOPSIS .B neofetch -\fI\,func_name --option "value" --option "value"\/\fR +\fI\,--option "value" --option "value"\/\fR .SH DESCRIPTION Neofetch is a CLI system information tool written in BASH. Neofetch displays information about your system next to an image, your OS logo, @@ -14,24 +14,6 @@ NOTE: Every launch flag has a config option. .SH OPTIONS .SS "INFO:" .TP -func_name -Specify a function name (second part of info() from config) to -quickly display only that function's information. -.IP -Example: neofetch uptime \fB\-\-uptime_shorthand\fR tiny -.IP -Example: neofetch uptime disk wm memory -.IP -This can be used in bars and scripts like so: -.IP -memory="$(neofetch memory)"; memory="${memory##*: }" -.IP -For multiple outputs at once (each line of info in an array): -.IP -IFS=$'\en' read \fB\-d\fR "" \fB\-ra\fR info < <(neofetch memory uptime wm) -.IP -info=("${info[@]##*: }") -.TP \fB\-\-disable\fR infoname Allows you to disable an info line from appearing in the output. 'infoname' is the function name from the @@ -40,12 +22,6 @@ For example: 'info "Memory" memory' would be '\-\-disable memory' .IP NOTE: You can supply multiple args. eg. 'neofetch \fB\-\-disable\fR cpu gpu' .TP -\fB\-\-title_fqdn\fR on/off -Hide/Show Fully Qualified Domain Name in title. -.TP -\fB\-\-package_managers\fR on/off -Hide/Show Package Manager names . (on, tiny, off) -.TP \fB\-\-os_arch\fR on/off Hide/Show OS architecture. .TP @@ -83,7 +59,7 @@ NOTE: For FreeBSD and NetBSD\-based systems, you need to enable coretemp kernel module. This only supports newer Intel processors. .TP \fB\-\-distro_shorthand\fR on/off -Shorten the output of distro (on, tiny, off) +Shorten the output of distro (tiny, on, off) .IP NOTE: This option won't work in Windows (Cygwin) .TP @@ -93,7 +69,7 @@ Shorten the output of kernel NOTE: This option won't work in BSDs (except PacBSD and PC\-BSD) .TP \fB\-\-uptime_shorthand\fR on/off -Shorten the output of uptime (on, tiny, off) +Shorten the output of uptime (tiny, on, off) .TP \fB\-\-refresh_rate\fR on/off Whether to display the refresh rate of each monitor @@ -107,9 +83,6 @@ Which GPU to display. (all, dedicated, integrated) .IP NOTE: This only supports Linux. .TP -\fB\-\-de_version\fR on/off -Show/Hide Desktop Environment version -.TP \fB\-\-gtk_shorthand\fR on/off Shorten output of gtk theme/icons .TP @@ -133,43 +106,32 @@ NOTE: Multiple values can be given. (\fB\-\-disk_show\fR '/' '/dev/sdc1') .TP \fB\-\-disk_subtitle\fR type What information to append to the Disk subtitle. -Takes: name, mount, dir, none +Takes: name, mount, dir .IP \&'name' shows the disk's name (sda1, sda2, etc) .IP \&'mount' shows the disk's mount point (/, \fI\,/mnt/Local\/\fP Disk, etc) .IP \&'dir' shows the basename of the disks's path. (/, Local Disk, etc) -.IP -\&'none' shows only 'Disk' or the configured title. -.TP -\fB\-\-disk_percent\fR on/off -Hide/Show disk percent. .TP \fB\-\-ip_host\fR url URL to query for public IP .TP -\fB\-\-ip_timeout\fR int -Public IP timeout (in seconds). -.TP -\fB\-\-ip_interface\fR value -Interface(s) to use for local IP -.TP \fB\-\-song_format\fR format Print the song data in a specific format (see config file). .TP \fB\-\-song_shorthand\fR on/off Print the Artist/Album/Title on separate lines. .TP -\fB\-\-memory_percent\fR on/off -Display memory percentage. -.TP -\fB\-\-memory_unit\fR kib/mib/gib -Memory output unit. -.TP \fB\-\-music_player\fR player\-name Manually specify a player to use. Available values are listed in the config file +.TP +\fB\-\-install_time\fR on/off +Enable/Disable showing the time in Install Date output. +.TP +\fB\-\-install_time_format\fR 12h/24h +Set time format in Install Date to be 12 hour or 24 hour. .SS "TEXT FORMATTING:" .TP \fB\-\-colors\fR x x x x x x @@ -184,17 +146,11 @@ Character to use when underlining title .TP \fB\-\-bold\fR on/off Enable/Disable bold text -.TP -\fB\-\-separator\fR string -Changes the default ':' separator to the specified string. .SS "COLOR BLOCKS:" .TP \fB\-\-color_blocks\fR on/off Enable/Disable the color blocks .TP -\fB\-\-col_offset\fR auto/num -Left\-padding of color blocks -.TP \fB\-\-block_width\fR num Width of color blocks in spaces .TP @@ -218,6 +174,10 @@ Length in spaces to make the bars. Colors to make the bar. Set in this order: elapsed, total .TP +\fB\-\-cpu_display\fR mode +Bar mode. +Possible values: bar, infobar, barinfo, off +.TP \fB\-\-memory_display\fR mode Bar mode. Possible values: bar, infobar, barinfo, off @@ -233,28 +193,20 @@ Possible values: bar, infobar, barinfo, off .TP \fB\-\-backend\fR backend Which image backend to use. -Possible values: 'ascii', 'caca', 'catimg', 'chafa', 'jp2a', -\&'iterm2', 'off', 'sixel', 'tycat', 'w3m', 'kitty', 'viu' +Possible values: 'ascii', 'caca', 'jp2a', 'iterm2', 'off', +\&'sixel', 'tycat', 'w3m' .TP \fB\-\-source\fR source Which image or ascii file to use. Possible values: 'auto', 'ascii', 'wallpaper', '/path/to/img', -\&'/path/to/ascii', '/path/to/dir/', 'command output' [ascii] +\&'/path/to/ascii', '/path/to/dir/' .TP \fB\-\-ascii\fR source Shortcut to use 'ascii' backend. -.IP -NEW: neofetch \fB\-\-ascii\fR "$(fortune | cowsay \fB\-W\fR 30)" .TP \fB\-\-caca\fR source Shortcut to use 'caca' backend. .TP -\fB\-\-catimg\fR source -Shortcut to use 'catimg' backend. -.TP -\fB\-\-chafa\fR source -Shortcut to use 'chafa' backend. -.TP \fB\-\-iterm2\fR source Shortcut to use 'iterm2' backend. .TP @@ -264,9 +216,6 @@ Shortcut to use 'jp2a' backend. \fB\-\-kitty\fR source Shortcut to use 'kitty' backend. .TP -\fB\-\-pot\fR source -Shortcut to use 'pot' backend. -.TP \fB\-\-pixterm\fR source Shortcut to use 'pixterm' backend. .TP @@ -282,12 +231,6 @@ Shortcut to use 'tycat' backend. \fB\-\-w3m\fR source Shortcut to use 'w3m' backend. .TP -\fB\-\-ueberzug\fR source -Shortcut to use 'ueberzug' backend -.TP -\fB\-\-viu\fR source -Shortcut to use 'viu' backend -.TP \fB\-\-off\fR Shortcut to use 'off' backend (Disable ascii art). .IP @@ -300,51 +243,18 @@ Colors to print the ascii art .TP \fB\-\-ascii_distro\fR distro Which Distro's ascii art to print -.TP -NOTE: AIX, Hash, Alpine, AlterLinux, Amazon, Anarchy, Android, instantOS, -Antergos, antiX, "AOSC OS", "AOSC OS/Retro", Apricity, ArchCraft, -ArcoLinux, ArchBox, ARCHlabs, ArchStrike, XFerience, ArchMerge, Arch, -Artix, Arya, Bedrock, Bitrig, BlackArch, BLAG, BlankOn, BlueLight, -bonsai, BSD, BunsenLabs, Calculate, Carbs, CentOS, Chakra, ChaletOS, -Chapeau, Chrom*, Cleanjaro, ClearOS, Clear_Linux, Clover, Condres, -Container_Linux, CRUX, Cucumber, dahlia, Debian, Deepin, DesaOS, -Devuan, DracOS, DarkOs, Itc, DragonFly, Drauger, Elementary, -EndeavourOS, Endless, EuroLinux, Exherbo, Fedora, Feren, FreeBSD, -FreeMiNT, Frugalware, Funtoo, GalliumOS, Garuda, Gentoo, Pentoo, -gNewSense, GNOME, GNU, GoboLinux, Grombyang, Guix, Haiku, Huayra, HydroOS, -Hyperbola, janus, Kali, KaOS, KDE_neon, Kibojoe, Kogaion, Korora, -KSLinux, Kubuntu, LEDE, LaxerOS, LibreELEC, LFS, Linux_Lite, LMDE, -Lubuntu, Lunar, macos, Mageia, MagpieOS, Mandriva, Manjaro, TeArch, Maui, -Mer, Minix, LinuxMint, Live_Raizo, MX_Linux, Namib, Neptune, NetBSD, -Netrunner, Nitrux, NixOS, Nurunner, NuTyX, OBRevenge, OpenBSD, -openEuler, OpenIndiana, openmamba, OpenMandriva, OpenStage, OpenWrt, -osmc, Oracle, OS Elbrus, PacBSD, Parabola, Pardus, Parrot, Parch, Parsix, -TrueOS,Parch,PCLinuxOS, Pengwin, Peppermint, Pisi, popos, Porteus, PostMarketOS, -Proxmox, Puppy, PureOS, Qubes, Quibian, Radix, Raspbian, Reborn_OS, -Redstar, Redcore, Redhat, Refracted_Devuan, Regata, Regolith, Rosa, -sabotage, Sabayon, Sailfish, SalentOS, Scientific, Septor, -SereneLinux, SharkLinux, Siduction, Slackware, SliTaz, SmartOS, -Solus, Source_Mage, Sparky, Star, SteamOS, SunOS, openSUSE_Leap, -t2, openSUSE_Tumbleweed, openSUSE, SwagArch, Tails, Trisquel, -Ubuntu\-Cinnamon, Ubuntu\-Budgie, Ubuntu\-GNOME, Ubuntu\-MATE, -Ubuntu\-Studio, Ubuntu, Univention, Venom, Void, VNux, semc, Obarun, -windows10, Windows7, Xubuntu, Zorin, and IRIX have ascii logos. .IP -NOTE: Arch, Ubuntu, Redhat, Fedora and Dragonfly have 'old' logo variants. +NOTE: Arch and Ubuntu have 'old' logo variants. .IP -NOTE: Use '{distro name}_old' to use the old logos. +NOTE: Use 'arch_old' or 'ubuntu_old' to use the old logos. .IP NOTE: Ubuntu has flavor variants. .TP -NOTE: Change this to Lubuntu, Kubuntu, Xubuntu, Ubuntu\-GNOME, -Ubuntu\-Studio, Ubuntu\-Mate or Ubuntu\-Budgie to use the flavors. +NOTE: Change this to 'Lubuntu', 'Xubuntu', 'Ubuntu\-GNOME', +\&'Ubuntu\-Studio' or 'Ubuntu\-Budgie' to use the flavors. .TP -NOTE: Arcolinux, Dragonfly, Fedora, Alpine, Arch, Ubuntu, -CRUX, Debian, Gentoo, FreeBSD, Mac, NixOS, OpenBSD, android, -Artix, CentOS, Cleanjaro, ElementaryOS, GUIX, Hyperbola, -Manjaro, MXLinux, NetBSD, Parabola, POP_OS, PureOS, -Slackware, SunOS, LinuxLite, OpenSUSE, Raspbian, -postmarketOS, and Void have a smaller logo variant. +NOTE: Alpine, Arch, CRUX, Debian, Gentoo, FreeBSD, Mac, NixOS, +OpenBSD, and Void have a smaller logo variant. .IP NOTE: Use '{distro name}_small' to use the small variants. .TP @@ -353,6 +263,8 @@ Whether or not to bold the ascii logo. .TP \fB\-L\fR, \fB\-\-logo\fR Hide the info text and only show the ascii logo. +.IP +Possible values: bar, infobar, barinfo, off .SS "IMAGE:" .TP \fB\-\-loop\fR @@ -363,9 +275,6 @@ in some terminals emulators when using image mode. How to size the image. Possible values: auto, 00px, 00%, none .TP -\fB\-\-catimg_size\fR 1/2 -Change the resolution of catimg. -.TP \fB\-\-crop_mode\fR mode Which crop mode to use Takes the values: normal, fit, fill @@ -403,9 +312,6 @@ Specify a path to a custom config file \fB\-\-config\fR none Launch the script without a config file .TP -\fB\-\-no_config\fR -Don't create the user config file. -.TP \fB\-\-print_config\fR Print the default config file to stdout. .TP