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

Add DietPi support #1706

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 45 additions & 12 deletions neofetch
Original file line number Diff line number Diff line change
Expand Up @@ -999,6 +999,14 @@ get_distro() {
*) distro="OS Elbrus $(< /etc/mcst_version)"
esac

elif [[ -f /boot/dietpi/.version ]]; then
. /boot/dietpi/.version
case $distro_shorthand in
on) distro="DietPi v$G_DIETPI_VERSION_CORE.$G_DIETPI_VERSION_SUB.$G_DIETPI_VERSION_RC" ;;
tiny) distro='DietPi' ;;
*) distro="DietPi v$G_DIETPI_VERSION_CORE.$G_DIETPI_VERSION_SUB.$G_DIETPI_VERSION_RC ($G_GITOWNER/$G_GITBRANCH)"
esac

Comment on lines +1002 to +1009
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The existing detection methods don't work?

Copy link
Author

@ravenclaw900 ravenclaw900 Jun 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DietPi is based on Debian/Raspbian/Armbian, and shows up as such. It's really just a bunch of scripts and optimizations on top of that, and not a full distribution.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's not a full distribution, it shouldn't be added to neofetch (line has to be drawn somewhere). Thanks for the PR.

elif type -p pveversion >/dev/null; then
case $distro_shorthand in
on|tiny) distro="Proxmox VE" ;;
Expand Down Expand Up @@ -5048,18 +5056,18 @@ ASCII:
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, 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, 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,
CRUX, Cucumber, dahlia, Debian, Deepin, DesaOS, Devuan, DietPi,
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,
janus, Kali, KaOS, KDE_neon, Kibojoe, Kogaion, Korora, KSLinux,
Kubuntu, LEDE, LaxerOS, LibreELEC, LFS, Linux_Lite, LMDE, Lubuntu,
Lunar, macos, Mageia, MagpieOS, Mandriva, Manjaro, 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, popos, Porteus, PostMarketOS,
Proxmox, Puppy, PureOS, Qubes, Quibian, Radix, Raspbian, Reborn_OS,
Redstar, Redcore, Redhat, Refracted_Devuan, Regata, Regolith, Rosa,
Expand Down Expand Up @@ -6843,6 +6851,31 @@ ${c1} ..,,;;;::;,..
EOF
;;

"DietPi"*)
set_colors 2 0
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}#${c2}%@%%%%@%@@@@.
+@@@@@@@@@${c1}%${c2}=*+${c1}%${c2}@%@@@@@@@@+
#@@@@@@@@@@@@@@@@@@@@@@#
-#@@@@@@@@@@@@@@@@@@#-
-*%@@@@@@@@@@%*-
.+%@@@@%+.
EOF
;;

"DracOS"*)
set_colors 1 7 3
read -rd '' ascii_data <<'EOF'
Expand Down
81 changes: 45 additions & 36 deletions neofetch.1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.16.
.TH NEOFETCH "1" "August 2020" "Neofetch 7.1.0" "User Commands"
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.48.2.
.TH NEOFETCH "1" "March 2021" "Neofetch 7.1.0" "User Commands"
.SH NAME
Neofetch \- A fast, highly customizable system info script
.SH SYNOPSIS
Expand Down Expand Up @@ -152,6 +152,9 @@ URL to query for public IP
\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
Expand Down Expand Up @@ -215,10 +218,6 @@ 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
Expand All @@ -234,8 +233,8 @@ Possible values: bar, infobar, barinfo, off
.TP
\fB\-\-backend\fR backend
Which image backend to use.
Possible values: 'ascii', 'caca', 'chafa', 'jp2a', 'iterm2',
\&'off', 'sixel', 'tycat', 'w3m', 'kitty', 'ueberzug'
Possible values: 'ascii', 'caca', 'catimg', 'chafa', 'jp2a',
\&'iterm2', 'off', 'sixel', 'tycat', 'w3m', 'kitty', 'viu'
.TP
\fB\-\-source\fR source
Which image or ascii file to use.
Expand All @@ -250,6 +249,9 @@ NEW: neofetch \fB\-\-ascii\fR "$(fortune | cowsay \fB\-W\fR 30)"
\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
Expand Down Expand Up @@ -281,7 +283,10 @@ Shortcut to use 'tycat' backend.
Shortcut to use 'w3m' backend.
.TP
\fB\-\-ueberzug\fR source
Shortcut to use 'ueberzug' backend.
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).
Expand All @@ -296,33 +301,34 @@ Colors to print the ascii art
\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,
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, 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, popos, Porteus, PostMarketOS,
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, DietPi,
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,
janus, Kali, KaOS, KDE_neon, Kibojoe, Kogaion, Korora, KSLinux,
Kubuntu, LEDE, LaxerOS, LibreELEC, LFS, Linux_Lite, LMDE, Lubuntu,
Lunar, macos, Mageia, MagpieOS, Mandriva, Manjaro, 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, 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, semc, Obarun,
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, semc, Obarun,
windows10, Windows7, Xubuntu, Zorin, and IRIX have ascii logos.
.IP
NOTE: Arch, Ubuntu, Redhat, and Dragonfly have 'old' logo variants.
Expand All @@ -331,8 +337,8 @@ NOTE: Use '{distro name}_old' to use the old logos.
.IP
NOTE: Ubuntu has flavor variants.
.TP
Change this to Lubuntu, Kubuntu, Xubuntu, Ubuntu-GNOME,
Ubuntu-Studio, Ubuntu-Mate or Ubuntu-Budgie to use the flavors.
NOTE: Change this to Lubuntu, Kubuntu, Xubuntu, Ubuntu\-GNOME,
Ubuntu\-Studio, Ubuntu\-Mate or Ubuntu\-Budgie to use the flavors.
.TP
NOTE: Arcolinux, Dragonfly, Fedora, Alpine, Arch, Ubuntu,
CRUX, Debian, Gentoo, FreeBSD, Mac, NixOS, OpenBSD, android,
Expand All @@ -358,6 +364,9 @@ 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
Expand All @@ -369,11 +378,11 @@ west, center, east, southwest, south, southeast
.TP
\fB\-\-xoffset\fR px
How close the image will be to the left edge of the
window. This only works with w3m and ueberzug.
window. This only works with w3m.
.TP
\fB\-\-yoffset\fR px
How close the image will be to the top edge of the
window. This only works with w3m and ueberzug.
window. This only works with w3m.
.TP
\fB\-\-bg_color\fR color
Background color to display behind transparent image.
Expand Down