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 all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 34 additions & 1 deletion 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 @@ -5134,7 +5142,7 @@ ASCII:
BlackArch, BLAG, BlankOn, BlueLight, bonsai, BSD, BunsenLabs,
Calculate, Carbs, CentOS, Chakra, ChaletOS, Chapeau, Chrom,
Cleanjaro, ClearOS, Clear_Linux, Clover, Condres, Container_Linux,
CrystalUX, CRUX, Cucumber, dahlia, Debian, Deepin, DesaOS, Devuan,
CrystalUX, CRUX, Cucumber, dahlia, Debian, Deepin, DesaOS, Devuan, Diet
DracOS, DarkOs, Itc, DragonFly, Drauger, Elementary, EndeavourOS, Endless,
EuroLinux, Exherbo, Fedora, Feren, FreeBSD, FreeMiNT, Frugalware,
Funtoo, GalliumOS, Garuda, Gentoo, Pentoo, gNewSense, GNOME, GNU,
Expand Down Expand Up @@ -7071,6 +7079,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
44 changes: 26 additions & 18 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 @@ -303,7 +308,7 @@ 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,
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, HydroOS,
Expand All @@ -319,10 +324,10 @@ 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, Fedora and Dragonfly have 'old' logo variants.
Expand All @@ -331,8 +336,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 +363,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 +377,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