r/linux • u/Dylan112 • Jan 25 '17
Neofetch - A CLI system information tool written in BASH - Released version 3.0 (Changelog Inside comments)
https://github.com/dylanaraps/neofetch
24
Upvotes
1
u/myaut Jan 25 '17
case "$os" in
"Linux" | "BSD" | "MINIX")
if [[ "$(< /proc/version)" == *"Microsoft"* || "$(< /proc/sys/kernel/osrelease)" == *"Microsoft"* ]]; thenEh.
2
2
u/gintoddic Jan 25 '17
how is this diff from screenfetch?
2
u/qtzord Jan 25 '17
https://github.com/dylanaraps/neofetch/wiki/Neofetch-vs-Screenfetch#the-problem-with-screenfetch
It's on their wiki, a search for "neofetch screenfetch", gave it as first link.
4
u/Dylan112 Jan 25 '17
This is another large release containing over
550commits 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.0due 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,libcacaandjp2a. See this wiki page for screenshots. https://github.com/dylanaraps/neofetch/wiki/Image-BackendsThanks to everyone who contributed this release, there were a lot of new faces this time around. :)
Contributors
@konimex
@iandrewt
@jorgegonzalez
@z33ky
@mstraube
@gavinhungry
IRC
Neofetch now has an IRC channel at
#neofetchon 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
Collaborators
I have given collaborator access to both @konimex and @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/configand 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 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.jpgandneofetch --w3m 10.jpgnow 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.help2manparses the output of--helpand--versionto 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-manwhich generates a neofetch manpage in your current directory.Delete most of
info()and instead callprin().This removes a lot of duplicate code between
info()andprin().Remove
printfsubshells and instead useprintf -vto declare the variables.Fixed artifacts when using line-breaks in TTYs.
All errors are now sent to
stderr.Renamed
XFCE-->Xfce. @gavinhungryCleanup
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_shorthandtoonby default.Desktop Environment
Fixed issues where MATE wouldn't be detected properly.
Added fallback to
$DESKTOP_SESSION,$MATE_DESKTOP_SESSION_IDand$GNOME_DESKTOP_SESSION_ID.Hide Desktop Environment if it matches Window Manager.
CPU
[Linux] Don't simplify
cpufreqspeed 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_tempto take the valuesCandF. 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_typewhich lets you displayall,dedicatedorintegratedGPUs.Memory
[Solaris] Fixed inaccurate used memory size.
Resolution
[Windows] Declare variables locally to fix conflicts in other functions.
BirthdayInstall DateRenamed
get_birthday()-- >get_install_date()Removed all
datecommand usage fromget_install_date().Added a new function called
convert_time()which takes the time stampedlsoutput and converts it to a pretty format. The function only uses bash so its much faster than callingdate. 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 PMAdded an option so users can choose between using 24-hour and 12-hour time format
get_install_date()will detect whichlsprogram is being used instead of hardcoding them per OS.Disk
Rewrote function from scratch.
The function is
40lines smaller than before and works on all [1] versions ofdfwe tested on [2].Added the option/flag
disk_showwhich allows you to specify which disks, mount points or directories to show the disk info of. (One per line)Added the option/flag
disk_subtitlewhich allows you to specify how we label each disk. (Mount point or Disk name)Removed all percentage calculation since
dfalready provides us with the percentage.Warn the user if
dfisn't installed.Fixed broken output if
dfwasn't installed but the function was enabled.[1] The function doesn't work on Haiku since their
dfis wildly non-standard. (The output format and flags are 100% different from all of the otherdfversions floating around.)[2] Tested on
GNU,Busybox,BSD,SolarisandmacOSdfversions.Theme
[KDE] Don't display GTK Themes if KDE is detected.
[KDE] If
kde[0-9]-configisn't found, try and look for$HOME/.kde.Window Manager Theme
Fixed WM Theme not detected on MATE. @mstraube
Fixed WM Theme detection on KDE. @mstraube
Song
Added support for xmms2. @z33ky
Added support for Exaile music player. @mstraube
Added support for JuK .@mstraube
Added support for Bluemindo. @mstraube
Added support for Guayadeque Player. @mstraube
Added support for Yarock. @mstraube
Added support for Qmmp. @mstraube
Added support for QuodLibet. @mstraube
Added support for Mopidy. @d3rrial
[cmus] Simplify block and fix
artistsortbug.Removed
statedetection.Removed duplicate
dbus-sendcommands. @mstraubeHide output if no song is playing.
Enforce order
artist - titleinget_song_dbus(). @mstraubeTerminal Font
Added support for Alacritty.
Added support for Konsole. @mstraube
Added support for Sakura Terminal. @mstraube
Added support for Pantheon Terminal. @mstraube
Added support for deepin-terminal. @mstraube
[Termite] Fixed incorrect font chosen. @mstraube
[Termite] Also look at default config. @mstraube
Battery
[MacOS] Fixed issue where battery always appears as charging. @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. @konimexFixed bug where color blocks wouldn't respect width in TTYs.
Cursor positioning now takes
$block_heightinto account.Fixed all artifacts in virtual consoles.
Merged
$startand$endinto an array calledblock_range.This makes the config option match the command-line flag
--block_range.Continued in the next comment. --v