Compare commits

..

92 Commits
3.0 ... 3.0.1

Author SHA1 Message Date
Dylan Araps
15a0738b1b Docs: Changelog 2017-01-30 19:53:09 +11:00
Dylan Araps
04d194b9f9 Docs: Changelog 2017-01-30 19:52:06 +11:00
Dylan Araps
f1c2b95598 Docs: Changelog 2017-01-30 19:49:28 +11:00
Dylan Araps
8fce18fcae General: Increment version number 2017-01-30 19:44:12 +11:00
Dylan Araps
4d546c4bc0 Docs: Changelog 2017-01-30 11:06:13 +11:00
Dylan Araps
54c6119041 Packages: Count chromebrew packages 2017-01-30 11:03:39 +11:00
Dylan Araps
e2ac16028d Update CHANGELOG.md 2017-01-30 10:56:16 +11:00
Dylan Araps
1abec60337 Update CHANGELOG.md 2017-01-30 10:56:02 +11:00
Dylan Araps
2f86d5a7c5 Merge pull request #651 from Head-on-a-Stick/master
ascii/distro/openbsd: removed extraneous backslashes to correct align…
2017-01-30 10:54:53 +11:00
Matthew T Hoare
169887a931 ascii/distro/openbsd: removed extraneous backslashes to correct alignment. 2017-01-29 20:35:11 +00:00
Dylan Araps
59cc08e51c Docs: Changelog 2017-01-29 18:43:45 +11:00
Dylan Araps
4ee3f48cb2 Merge branch 'master' of github.com:dylanaraps/neofetch 2017-01-29 18:43:02 +11:00
Dylan Araps
4fdf4366ad Scrot: Add message letting users now that a screenshot was taken 2017-01-29 18:42:47 +11:00
Muhammad Herdiansyah
97a437b7ed Config: Applied @fornwall's patch 2017-01-28 13:54:40 +07:00
Dylan Araps
bc13d6d5d7 Docs: Changelog 2017-01-28 15:43:02 +11:00
Dylan Araps
2dce22bc66 Update CHANGELOG.md 2017-01-28 11:40:42 +11:00
Dylan Araps
198d1e77c0 Merge pull request #648 from dylanaraps/strip
Prin: Fix underline not working
2017-01-28 11:38:17 +11:00
Dylan Araps
4e3a9a1ac8 Merge pull request #649 from siiptuo/fix-alacritty-font
Fix Alacritty font detection
2017-01-28 11:37:52 +11:00
Tuomas Siipola
608ea47704 Ignore comments in Alacritty font detection 2017-01-28 00:13:02 +02:00
Dylan Araps
3d0ea7c6a2 Travis: Remove testing 2017-01-28 08:18:09 +11:00
Dylan Araps
728357f4ad Underline: Fix travis 2017-01-28 07:30:13 +11:00
Dylan Araps
599ab60909 Travis: Echo length of underline 2017-01-28 07:26:43 +11:00
Dylan Araps
745665b9d1 Travis: Test underlines 2017-01-28 07:19:51 +11:00
Dylan Araps
ebba162aff General: Be less greedy 2017-01-28 03:05:19 +11:00
Dylan Araps
9573eee324 Prin: Fix underline not working 2017-01-28 03:01:11 +11:00
Dylan Araps
3d12661998 Update CHANGELOG.md 2017-01-27 15:51:11 +11:00
Dylan Araps
4af31a0fea Merge pull request #646 from dylanaraps/mem-label
Memory: Change label to MiB from MB
2017-01-27 15:50:06 +11:00
Dylan Araps
c4869f5e50 Disk: Fix stray bracket 2017-01-27 14:51:18 +11:00
Dylan Araps
568f52c3b9 Memory: Show MB on OS that output the memory as Megabytes 2017-01-27 14:35:04 +11:00
Dylan Araps
fae12fadf2 Memory: Change label to MiB from MB 2017-01-27 14:29:19 +11:00
Dylan Araps
461bbb7b7e Docs: Changelog 2017-01-26 22:47:40 +11:00
Dylan Araps
c0e3a13f9d General: More regex fixes 2017-01-26 22:46:39 +11:00
Dylan Araps
9bbd64a790 Merge branch 'master' of github.com:dylanaraps/neofetch 2017-01-26 22:37:06 +11:00
Dylan Araps
430f5af564 Ascii: Fix ascii file not working 2017-01-26 22:36:08 +11:00
Dylan Araps
01c383bceb Merge pull request #639 from YellowApple/patch-1
Fix paths for "proper" Haiku installation
2017-01-26 22:17:40 +11:00
Dylan Araps
b22b748af9 Config: Bump config version 2017-01-26 20:56:24 +11:00
Dylan Araps
ca0fc103f1 Docs: Changelog 2017-01-26 20:10:33 +11:00
Dylan Araps
0d9f95bf5e Merge pull request #642 from mstraube/song
Fix song_shorthand, use dbus for audacious
2017-01-26 20:09:58 +11:00
Michael Straube
c7892a70c7 Song: Don't print empty song with song_shorthand 2017-01-26 09:05:24 +01:00
Dylan Araps
502f4834fb Distro: Use kernel_version in Windows detection 2017-01-26 19:03:56 +11:00
Michael Straube
e66b63d0f3 Song: Use get_song_dbus for audacious 2017-01-26 09:03:35 +01:00
Dylan Araps
cfdaac34f2 Disk: Show disk name when subtitle is disabled 2017-01-26 19:00:48 +11:00
Dylan Araps
01b3df7cd2 Error: Add quotes to image 2017-01-26 18:41:03 +11:00
Dylan Araps
a9a3d9e5e7 Docs: Changelog 2017-01-26 18:38:58 +11:00
Dylan Araps
58a57bb153 Images: Fix cd error 2017-01-26 18:37:13 +11:00
Dylan Araps
ac7fe31904 Merge branch 'master' of github.com:dylanaraps/neofetch 2017-01-26 18:23:37 +11:00
Dylan Araps
afb5234e9e Docs: Changelog 2017-01-26 18:21:25 +11:00
Dylan Araps
98b2a4231d Merge pull request #641 from dylanaraps/sub_fix
Output: Fix output when user disables subtitles.
2017-01-26 18:20:57 +11:00
Michael Straube
7f5554ac6c Song: Fix typo 2017-01-26 08:19:44 +01:00
Dylan Araps
8ebd3ed981 Travis: Don't print subtitle 2017-01-26 18:06:54 +11:00
Dylan Araps
1ea6b88b5b Travis: Test subtitles and prin 2017-01-26 18:05:46 +11:00
Dylan Araps
e85133af65 General: Fix output if subtitles are disabled and prin is used 2017-01-26 17:53:14 +11:00
Dylan Araps
a6c5c64bea General: Fix output if subtitles are disabled and prin is used 2017-01-26 17:51:36 +11:00
Dylan Araps
1c24b007c0 Github: Require config file for new issues 2017-01-26 16:52:51 +11:00
Dylan Araps
8884b19e82 Song: Fix album name being used as artist name 2017-01-26 16:37:52 +11:00
Ryan S. Northrup
87cfcfc72a Fix paths for "proper" Haiku installation
Recommendation: consider working out some way for there to be a standard `$PREFIX` variable for this, and some other way to populate this correctly based on the `$PREFIX` passed to `make install`.
2017-01-25 15:15:22 -08:00
Dylan Araps
0bca00a116 Docs: Changelog 2017-01-25 12:18:38 +11:00
Dylan Araps
f3b803ae38 Image: Fix images in Terminology and Tmux 2017-01-25 12:17:29 +11:00
Dylan Araps
237eeeb833 Docs: Changelog 2017-01-25 11:57:23 +11:00
Dylan Araps
bc0118a759 Ascii: Fix bug where source is an image 2017-01-25 11:56:33 +11:00
Dylan Araps
83c5751395 Docs: Changelog 2017-01-25 10:37:15 +11:00
Dylan Araps
4064f4340b OS: Added support for ArchBox. Closes #634 2017-01-25 10:36:17 +11:00
Dylan Araps
45a9ac3e84 Merge branch 'master' of github.com:dylanaraps/neofetch 2017-01-25 00:49:34 +11:00
Dylan Araps
bade83d5d5 Shell: Fix shell version on bash 3 2017-01-25 00:49:14 +11:00
Dylan Araps
6e527038d8 Update CHANGELOG.md 2017-01-24 23:56:01 +11:00
Dylan Araps
32c4b00bfd Ascii: [Windows 10] Fix ascii_distro not working 2017-01-24 23:41:48 +11:00
Dylan Araps
8b87e9978e Docs: Changelog 2017-01-24 14:25:17 +11:00
Dylan Araps
8325a87add Config: Remove locale setting from user config 2017-01-24 14:24:39 +11:00
Dylan Araps
589c54a2ad Docs: Changelog 2017-01-24 12:21:05 +11:00
Dylan Araps
0fed289d58 Config: Fix config error on macOS 2017-01-24 12:18:44 +11:00
Dylan Araps
6460c1082c Docs: CHANGELOG 2017-01-24 12:01:39 +11:00
Dylan Araps
539c1462bf Merge pull request #632 from dawidd6/master
MPD server on another host
2017-01-24 12:00:09 +11:00
Dylan Araps
a3c41033d2 Config: Remove '--config travis' in favor of '--config path/to/travis' 2017-01-24 11:48:09 +11:00
dawidd6
ee41671dec rewrite mpc discovery 2017-01-24 00:31:53 +01:00
Dylan Araps
d68780385f Old Options: Fix progress bar options 2017-01-24 10:23:07 +11:00
Dylan Araps
0a70754ef1 Old Options: Fix birthday_time not working 2017-01-24 10:11:35 +11:00
Dylan Araps
13cfef01da Merge branch 'master' of github.com:dylanaraps/neofetch 2017-01-24 10:04:23 +11:00
Dylan Araps
6ecaa950e0 Ascii: Add a second color pooint to the Arch Linux logo 2017-01-24 10:03:56 +11:00
dawidd6
38cb68b2dd fix, when mpd server is on another host 2017-01-23 22:21:43 +01:00
Dylan Araps
6bb7126a57 Docs: Changelog.md 2017-01-24 01:45:13 +11:00
Dylan Araps
f14700f40e Merge pull request #629 from jorgegonzalez/master
Image: Fixed issue where linebreaks printed stray spaces over the image
2017-01-24 01:43:44 +11:00
Jorge Gonzalez
40d764ca6a Image: Fixed issue where linebreaks caused stray spaces to print over images 2017-01-23 09:33:05 -05:00
Dylan Araps
c521c180bd Docs: Changelog 2017-01-24 01:17:06 +11:00
Dylan Araps
546c13c100 Merge branch 'master' of github.com:dylanaraps/neofetch 2017-01-23 23:59:38 +11:00
Dylan Araps
e4ffa945f9 Cols: Fixed color_blocks=off causing an extra newline to be printed 2017-01-23 23:59:21 +11:00
Dylan Araps
ef6b55e3f6 Update CHANGELOG.md 2017-01-23 20:43:54 +11:00
Dylan Araps
dd62ec697f Merge pull request #627 from SomaUlte/patch-1
GPU: [Linux] More detailed Intel GPU info. Closes #626
2017-01-23 20:41:50 +11:00
SomaUlte
c8cce9acb5 check for "Intel" in glxinfo grep 2017-01-23 04:37:03 -05:00
SomaUlte
0dff121390 apply dylanaraps' changes 2017-01-23 04:34:13 -05:00
SomaUlte
08276bde5e Update neofetch 2017-01-23 04:01:50 -05:00
Dylan Araps
611c88b29c General: Bump version to 0.1 2017-01-23 14:41:10 +11:00
Dylan Araps
a02eb6f91d Changelog: Empty changelog 2017-01-23 14:40:29 +11:00
10 changed files with 215 additions and 275 deletions

View File

@@ -7,6 +7,8 @@ If you're suggesting a new feature then just a description will suffice.
## Screenshot
## Config file
## Verbose log
1. Run `neofetch -vv 2> neofetchlog`

View File

@@ -17,7 +17,7 @@ before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install screenresolution; fi
script:
- time ./neofetch --ascii --config travis -v
- time ./neofetch --ascii --config config/travis -v
# 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; fi

View File

@@ -1,252 +1,88 @@
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.
This minor release fixes all of the bugs that were found in the 3.0 release.
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. :)
Thanks for all of the bug reports and contributions. :)
## Contributors
- **[@konimex](https://github.com/konimex)**
- **[@iandrewt](https://github.com/iandrewt)**
- **[@SomaUlte](https://github.com/SomaUlte)**
- **[@jorgegonzalez](https://github.com/jorgegonzalez)**
- **[@z33ky](https://github.com/z33ky)**
- **[@dawidd6](https://github.com/dawidd6)**
- **[@mstraube](https://github.com/mstraube)**
- **[@gavinhungry](https://github.com/gavinhungry)**
- **[@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)**
## IRC
## Operating System
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).
- Added support for ArchBox Linux.
## 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()`.
- 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**<br \>
- Changed memory label to `MiB` on OS that output memory in Mebibytes.
**Shell**<br \>
- [Fish] Fixed memory leak caused by Fish.
- Added support for `xonsh`.
- Fixed version output on `ksh`.
- Rewrote the function to remove duplicate code.
- Fixed a crash when the user has `bash 3` installed.
**Uptime**<br \>
**Packages**<br \>
- Moved duplicate code to a function.
- Changed `$uptime_shorthand` to `on` by default.
**Desktop Environment**<br \>
- 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**<br \>
- [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**<br \>
- Added Haiku cores command.
- Updated Linux and macOS commands to the match the commands in the `get_cpu()` function.
- Added support for Chromebrew.
**GPU**<br \>
- [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**<br \>
- [Solaris] Fixed inaccurate used memory size.
**Resolution**<br \>
- [Windows] Declare variables locally to fix conflicts in other functions.
**~~Birthday~~ Install Date**<br \>
- 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**<br \>
- 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**<br \>
- [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**<br \>
- Fixed WM Theme not detected on MATE. **[@mstraube](https://github.com/mstraube)**
- Fixed WM Theme detection on KDE. **[@mstraube](https://github.com/mstraube)**
**Song**<br \>
- 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**<br \>
- 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**<br \>
- [MacOS] Fixed issue where battery always appears as charging. **[@jorgegonzalez](https://github.com/jorgegonzalez)**
**Local IP**<br \>
- [BSD and Solaris] Merged the detection to Linux.
- [Windows] Support multiple interfaces.
- [Linux] Display detailed information about Intel GPUs. **[@SomaUlte](https://github.com/SomaUlte)**
**Color Blocks**<br \>
- 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`.
- Fixed issue with `color_blocks="off"` adding an extra newline to the output.
**Song**<br \>
- 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**<br \>
- [Alacritty] Fixed font detection. **[@siiptuo](https://github.com/siiptuo)**
## 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.
- [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
- 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).
- [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)**
## Screenshot
## Scrot
- Use arrays for `$scrot_program`
- Added message to let users know that a screenshot was taken.
## Args
- Fixed bug where `neofetch --config` sourced the user config twice.
- Cleaned up config arg handling.

View File

@@ -7,9 +7,9 @@ ${c1} -`
`/:-:++oooo+:
`/++++/+++++++:
`/++++++++++++++:
`/+++ooooooooooooo/`
./ooosssso++osssssso+`
.oossssso-````/ossssss+`
`/+++o${c2}oooooooo${c1}oooo/`
${c2} ${c1}./${c2}ooosssso++osssssso${c1}+`
${c2} .oossssso-````/ossssss+`
-osssssso. :ssssssso.
:osssssss/ osssso+++.
/ossssssss/ +ssssooo/-

19
ascii/distro/archbox Normal file
View File

@@ -0,0 +1,19 @@
${c1} ...:+oh/:::..
..-/oshhhhhh` `::::-.
.:/ohhhhhhhhhhhh` `-::::.
.+shhhhhhhhhhhhhhhhh` `.::-.
/`-:+shhhhhhhhhhhhhh` .-/+shh
/ .:/ohhhhhhhhh` .:/ohhhhhhhh
/ `-:+shhh` ..:+shhhhhhhhhhhh
/ .:ohhhhhhhhhhhhhhhhhhh
/ `hhhhhhhhhhhhhhhhhhhh
/ `hhhhhhhhhhhhhhhhhhhh
/ `hhhhhhhhhhhhhhhhhhhh
/ `hhhhhhhhhhhhhhhhhhhh
/ .+o+ `hhhhhhhhhhhhhhhhhhhh
/ -hhhhh `hhhhhhhhhhhhhhhhhhhh
/ ohhhhho `hhhhhhhhhhhhhhhhhhhh
/:::+`hhhhoos` `hhhhhhhhhhhhhhhhhs+`
`--/:` /: `hhhhhhhhhhhho/-
-/:. `hhhhhhs+:-`
::::/ho/-`

View File

@@ -7,8 +7,8 @@ ${c1} / ||\| Y J ) / |/| ./
J |)'( | ` F`.'/ ${c3} _
${c1} -<| F __ .-< ${c3}(_)
${c1} | / .-'${c3}. ${c1}`. /${c3}-. ${c1}L___
J \\ < ${c3}\ ${c1} | | ${c5}O${c3}\\\\${c1}|.-' ${c3} _
${c1} _J \\ .- \\\\${c3}/ ${c5}O ${c3}| ${c1}| \\ |${c1}F ${c3}(_)
J \\ < ${c3}\ ${c1} | | ${c5}O${c3}\\${c1}|.-' ${c3} _
${c1} _J \\ .- \\${c3}/ ${c5}O ${c3}| ${c1}| \\ |${c1}F ${c3}(_)
${c1} '-F -<_. \\ .-' `-' L__
__J _ _. >-' ${c1})${c4}._. ${c1}|-'
${c1} `-|.' /_. ${c4}\_| ${c1} F

View File

@@ -3,9 +3,6 @@
# Neofetch config file
# https://github.com/dylanaraps/neofetch
# Speed up script by not using unicode
export LC_ALL=C
export LANG=C
# See this wiki page for more info:
# https://github.com/dylanaraps/neofetch/wiki/Customizing-Info
@@ -710,4 +707,4 @@ image_host="teknik"
#
# NOTE: Don't change this value, neofetch reads this to determine
# how to handle backwards compatibility.
config_version="2.1.0"
config_version="3.0.1"

View File

@@ -38,6 +38,14 @@ print_info() {
info line_break
info cols
info line_break
# Testing.
prin "prin"
prin "prin" "prin"
# Testing no subtitles.
info uptime
info disk
}
refresh_rate="on"

182
neofetch
View File

@@ -8,6 +8,9 @@
# Created by Dylan Araps
# https://github.com/dylanaraps/
# Neofetch version.
version="3.0.1"
bash_version="${BASH_VERSION/.*}"
sys_locale="${LANG:-C}"
XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-${HOME}/.config}"
@@ -53,13 +56,12 @@ get_distro() {
case "$os" in
"Linux" | "BSD" | "MINIX")
if [[ "$(< /proc/version)" == *"Microsoft"* || "$(< /proc/sys/kernel/osrelease)" == *"Microsoft"* ]]; then
if [[ "$(< /proc/version)" == *"Microsoft"* || "$kernel_version" == *"Microsoft"* ]]; then
case "$distro_shorthand" in
"on") distro="$(lsb_release -sir) [Windows 10]" ;;
"tiny") distro="Windows 10" ;;
*) distro="$(lsb_release -sd) on Windows 10" ;;
esac
ascii_distro="Windows 10"
elif [[ -f "/etc/GoboLinuxVersion" ]]; then
case "$distro_shorthand" in
@@ -471,6 +473,9 @@ get_packages() {
type -p pkg_info >/dev/null && \
packages="$((packages+=$(pkg_info | wc -l)))"
type -p crew >/dev/null && \
packages="$((packages+=$(ls -l /usr/local/etc/crew/meta/*.filelist | wc -l)))"
if type -p pkg >/dev/null; then
case "$kernel_name" in
"FreeBSD") packages="$((packages+=$(pkg info | wc -l)))" ;;
@@ -526,7 +531,7 @@ get_shell() {
esac
if [[ "$shell_version" == "on" ]]; then
case "${SHELL##*/}" in
case "${shell_name:=${SHELL##*/}}" in
"bash") shell+="${BASH_VERSION/-*}" ;;
"sh" | "ash" | "dash") ;;
@@ -538,7 +543,7 @@ get_shell() {
*)
shell+="$("$SHELL" --version 2>&1)"
shell="${shell/ ${SHELL##*/}}"
shell="${shell/ "${shell_name}"}"
;;
esac
@@ -584,7 +589,7 @@ get_de() {
# the desktop variables are sometimes also set to the
# window manager name. This checks to see if WM == DE
# and dicards the DE value.
[[ "$wm" && "$de" =~ $wm ]] && { unset -v de; return; }
[[ "$wm" && "$de" =~ ^$wm$ ]] && { unset -v de; return; }
;;
esac
@@ -1075,7 +1080,12 @@ get_gpu() {
;;
*"intel"*)
gpu="Intel Integrated Graphics"
gpu="$(glxinfo | grep "Device:.*Intel")"
gpu="${gpu/*Intel/Intel}"
gpu="${gpu/'(R)'}"
gpu="${gpu/ \(*}"
[[ -z "$(trim "$gpu")" ]] && gpu="Intel Integrated Graphics"
;;
*"virtualbox"*)
@@ -1089,7 +1099,7 @@ get_gpu() {
gpu="${gpu/Intel }"
fi
prin "${subtitle}${gpu_num}" "$gpu"
prin "${subtitle:+${subtitle}${gpu_name}}" "$gpu"
((++gpu_num))
done
@@ -1244,9 +1254,10 @@ get_memory() {
mem_total="${mem_stat[11]/.*}"
mem_free="${mem_stat[16]/.*}"
mem_used="$((mem_total - mem_free))"
mem_label="MB"
;;
esac
memory="${mem_used}MB / ${mem_total}MB"
memory="${mem_used}${mem_label:-MiB} / ${mem_total}${mem_label:-MiB}"
# Bars.
case "$memory_display" in
@@ -1277,9 +1288,9 @@ get_song() {
"google play"*) song="$(gpmdp-remote current)" ;;
"rhythmbox"*) song="$(rhythmbox-client --print-playing)" ;;
"deadbeef"*) song="$(deadbeef --nowplaying-tf '%artist% - %title%')" ;;
"audacious"*) song="$(audtool current-song)" ;;
"xmms2d"*) song="$(xmms2 current -f '${artist} - ${title}')" ;;
"qmmp"*) song="$(qmmp --nowplaying '%p - %t')" ;;
"audacious"*) get_song_dbus "audacious" ;;
"gnome-music"*) get_song_dbus "GnomeMusic" ;;
"lollypop"*) get_song_dbus "Lollypop" ;;
"clementine"*) get_song_dbus "clementine" ;;
@@ -1327,14 +1338,18 @@ get_song() {
song="$(dbus-send --print-reply --dest=net.sacredchao.QuodLibet /net/sacredchao/QuodLibet net.sacredchao.QuodLibet.CurrentSong |\
awk -F'"' '/artist/ {getline; a=$2} /title/ {getline; t=$2} END{print a " - " t}')"
;;
*)
mpc >/dev/null 2>&1 && song="$(mpc current)"
;;
esac
[[ "$(trim "$song")" = "-" ]] && unset -v song
[[ "$(trim "$song")" == "-" ]] && unset -v song
# Display Artist and Title on separate lines.
if [[ "$song_shorthand" == "on" ]]; then
if [[ "$song_shorthand" == "on" && "$song" ]]; then
artist="${song/ -*}"
song="${song/$artist - }"
song="${song/*-}"
if [[ "$song" != "$artist" ]]; then
prin "Artist" "$artist"
@@ -1610,6 +1625,7 @@ get_term_font() {
term_font="$(awk -F ':|#' '/normal:/ {getline; print}' "${XDG_CONFIG_HOME}/alacritty/alacritty.yml")"
term_font="${term_font/*family:}"
term_font="${term_font/$'\n'*}"
term_font="${term_font/\#*}"
;;
"Apple_Terminal")
@@ -1740,7 +1756,11 @@ get_disk() {
esac
# Append '(disk mount point)' to the subtitle.
prin "${subtitle} (${disk_sub})" "$disk"
if [[ -z "$subtitle" ]]; then
prin "${disk_sub}" "$disk"
else
prin "${subtitle} (${disk_sub})" "$disk"
fi
done
}
@@ -1766,7 +1786,7 @@ get_battery() {
"barinfo") battery="$(bar "$capacity" 100) ${battery}" ;;
esac
prin "${subtitle}${bat: -1}" "$battery"
prin "${subtitle:+${subtitle}${bat: -1}}" "$battery"
done
return
;;
@@ -1940,9 +1960,11 @@ get_cols() {
cols="${cols//nl/\\n\\033[${text_padding}C${zws}}"
printf "%b\n" "\033[${text_padding}C${zws}${cols}"
info_height="$((info_height+=block_height+2))"
else
printf "\n"
fi
info_height="$((info_height+=block_height+2))"
unset -v blocks blocks2 cols
# Tell info() that we printed manually.
@@ -1952,7 +1974,7 @@ get_cols() {
# IMAGES
image_backend() {
if [[ ! "$image_backend" =~ (off|ascii) ]]; then
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."
@@ -1977,7 +1999,6 @@ image_backend() {
clear
zws=" "
else
unset image_program
to_ascii "Image: Failed to find terminal window size."
err "Image: Check the 'Images in the terminal' wiki page for more info,"
return
@@ -2001,11 +2022,18 @@ image_backend() {
}
get_ascii() {
if [[ ! -f "$image_source" || "$image_source" =~ (auto|ascii) ]]; then
if [[ ! -f "$image_source" ||
"$image_source" =~ ^(auto|ascii)$ ||
"$image_source" =~ \.(png|jpg|jpe|jpeg|gif)$ ]]; then
# Fallback to distro ascii mode if custom ascii isn't found.
[[ ! "$image_source" =~ (auto|ascii) ]] && \
[[ ! "$image_source" =~ ^(auto|ascii)$ ]] && \
err "Ascii: Ascii file not found, using distro ascii."
# Fallback to distro ascii mode if source is an image.
[[ "$image_source" =~ \.(png|jpg|jpe|jpeg|gif)$ ]] && \
err "Image: Source is image file but ascii backend was selected. Using distro ascii."
if [[ -d "/usr/share/neofetch/ascii/distro" ]]; then
ascii_dir="/usr/share/neofetch/ascii/distro"
@@ -2015,6 +2043,9 @@ get_ascii() {
elif [[ -d "/data/data/com.termux/files/usr/share/neofetch/ascii/distro" ]]; then
ascii_dir="/data/data/com.termux/files/usr/share/neofetch/ascii/distro"
elif [[ -d "/boot/home/config/non-packaged/share/neofetch/ascii/distro" ]]; then
ascii_dir="/boot/home/config/non-packaged/share/neofetch/ascii/distro"
else
[[ -z "$script_dir" ]] && script_dir="$(get_full_path "$0")"
ascii_dir="${script_dir%/*}/ascii/distro"
@@ -2059,7 +2090,7 @@ get_ascii() {
get_image_source() {
case "$image_source" in
"auto" | "wallpaper")
"auto" | "wall" | "wallpaper")
get_wallpaper 2>/dev/null
;;
@@ -2079,7 +2110,7 @@ get_image_source() {
;;
esac
err "Image: Using image $image"
err "Image: Using image '$image'"
}
get_wallpaper() {
@@ -2178,7 +2209,7 @@ get_term_size() {
printf "%b" "\033Ptmux;\033\033[14t\033\033[c\033\\"
read_flags=(-d c)
elif [[ "$image_program" == "tycat" ]]; then
elif [[ "$image_backend" == "tycat" ]]; then
printf "%b" "\033}qs\000"
else
@@ -2192,7 +2223,7 @@ get_term_size() {
IFS=";" read -s -t 1 "${read_flags[@]}" -r -a term_size
# Split the string into height/width.
if [[ "$image_program" == "tycat" ]]; then
if [[ "$image_backend" == "tycat" ]]; then
term_width="$((term_size[2] * term_size[0]))"
term_height="$((term_size[3] * term_size[1]))"
@@ -2202,7 +2233,7 @@ get_term_size() {
fi
# Get terminal width/height if \033[14t is unsupported.
if [[ -z "$term_width" && "$image_program" == "w3m" ]]; then
if [[ -z "$term_width" && "$image_backend" == "w3m" ]]; then
if type -p xdotool >/dev/null 2>&1; then
current_window="$(xdotool getactivewindow)"
source <(xdotool getwindowgeometry --shell "$current_window")
@@ -2369,6 +2400,7 @@ display_image() {
"iterm2")
printf "%b\a\n" "\033]1337;File=width=${width}px;height=${height}px;inline=1:$(base64 < "$image")"
zws=
;;
"tycat")
@@ -2428,7 +2460,16 @@ scrot_upload() {
fi
image_file="${scrot_dir}${scrot_name}"
printf "%s\n" "Uploading image..."
# Print a message letting the user know we're uploading
# the screenshot.
printf "%s\r" "Uploading scrot"
sleep .2
printf "%s\r" "Uploading scrot."
sleep .2
printf "%s\r" "Uploading scrot.."
sleep .2
printf "%s\r" "Uploading scrot..."
case "$image_host" in
"teknik")
@@ -2492,6 +2533,16 @@ scrot_program() {
esac
fi
# Print a message letting the user know we're taking
# a screenshot.
printf "%s\r" "Taking scrot"
sleep .2
printf "%s\r" "Taking scrot."
sleep .2
printf "%s\r" "Taking scrot.."
sleep .2
printf "%s\r" "Taking scrot..."
# Take the scrot.
"${scrot_program[@]}" "$1"
@@ -2502,7 +2553,7 @@ scrot_program() {
info() {
# Save subtitle value.
subtitle="$1"
[[ "$2" ]] && subtitle="$1"
# Make sure that $prin is unset.
unset -v prin
@@ -2517,25 +2568,35 @@ info() {
output="$(trim "${!2:-${!1}}")"
if [[ "$2" && "${output// }" ]]; then
length="$((${#1} + ${#output} + 2))"
prin "$1" "$output"
elif [[ "${output// }" ]]; then
[[ -z "$length" ]] && length="${#output}"
prin "$output"
else
err "Info: Couldn't detect ${1}."
fi
unset -v subtitle
}
prin() {
# If $2 doesn't exist we format $1 as info.
[[ -z "$2" ]] && local subtitle_color="$info_color"
if [[ "$(trim "$1")" && "$2" ]]; then
string="${1}${2:+: $2}"
else
string="${2:-$1}"
local subtitle_color="$info_color"
fi
string="$(trim "${string//$'\033[0m'}")"
# Log length if it doesn't exist.
if [[ -z "$length" ]]; then
length="$(strip_sequences "$string")"
length="${#length}"
fi
# Format the output.
string="${1//$'\033[0m'}${2:+: $2}"
string="$(trim "$string")"
string="${string/:/${reset}${colon_color}:${info_color}}"
string="${subtitle_color}${bold}${string}"
@@ -2552,9 +2613,10 @@ prin() {
get_underline() {
if [[ "$underline_enabled" == "on" ]]; then
printf -v underline "%${length}s"
underline="${underline_color}${underline// /$underline_char}"
printf "%b\n" "${text_padding:+\033[${text_padding}C}${zws}${underline_color}${underline// /$underline_char}${reset} "
unset -v length
fi
prin=1
}
get_line_break() {
@@ -2603,6 +2665,15 @@ trim_quotes() {
printf "%s" "$trim_output"
}
strip_sequences() {
strip="${1//$'\033['3[0-9]m}"
strip="${strip//$'\033['38\;5\;[0-9]m}"
strip="${strip//$'\033['38\;5\;[0-9][0-9]m}"
strip="${strip//$'\033['38\;5\;[0-9][0-9][0-9]m}"
printf "%s\n" "$strip"
}
uppercase() {
((bash_version >= 4)) && printf "%s" "${1^}"
}
@@ -2666,8 +2737,13 @@ get_distro_colors() {
ascii_file="arch_old"
;;
"ArchBox"*)
set_colors 2 7 1
ascii_file="archbox"
;;
"Arch"*)
set_colors 4 7 1
set_colors 4 4 7 1
ascii_file="arch"
;;
@@ -3131,7 +3207,7 @@ get_distro_colors() {
ascii_file="void"
;;
"Windows 8"* | "Windows 10"*)
*"[Windows 10]"* | *"on Windows 10"* | "Windows 8"* | "Windows 10"*)
set_colors 6 7
ascii_file="windows10"
;;
@@ -3285,13 +3361,18 @@ get_default_config() {
if [[ -f "/etc/neofetch/config" ]]; then
default_config="/etc/neofetch/config"
elif [[ -f "/data/data/com.termux/files/etc/neofetch/config" ]]; then
default_config="/data/data/com.termux/files/etc/neofetch/config"
elif [[ -f "/usr/local/etc/neofetch/config" ]]; then
default_config="/usr/local/etc/neofetch/config"
elif [[ -f "/data/data/com.termux/files/usr/etc/neofetch/config" ]]; then
default_config="/data/data/com.termux/files/usr/etc/neofetch/config"
elif [[ -f "/boot/home/config/non-packaged/etc/neofetch/config" ]]; then
default_config="/boot/home/config/non-packaged/etc/neofetch/config"
else
[[ -z "$script_dir" ]] && script_dir="$(get_full_path "$0")"
default_config="${script_dir%/*}/config/config"
travis_config="${script_dir%/*}/config/travis"
fi
if source "$default_config"; then
@@ -3308,12 +3389,6 @@ get_user_config() {
err "Config: Sourced user config. (${config_file})"
old_options
return
elif [[ "$config_file" == "travis" ]]; then
source "$travis_config"
err "Config: Sourced user config. (${travis_config})"
old_options
return
fi
mkdir -p "${XDG_CONFIG_HOME}/neofetch/"
@@ -3322,11 +3397,11 @@ get_user_config() {
if [[ -f "${XDG_CONFIG_HOME}/neofetch/config" ]]; then
config_file="${XDG_CONFIG_HOME}/neofetch/config"
elif [[ -f "/usr/share/neofetch/config" ]]; then
elif [[ -f "/etc/neofetch/config" ]]; then
cp "/usr/share/neofetch/config" "${XDG_CONFIG_HOME}/neofetch"
config_file="${XDG_CONFIG_HOME}/neofetch/config"
elif [[ -f "/usr/local/share/neofetch/config" ]]; then
elif [[ -f "/usr/local/etc/neofetch/config" ]]; then
cp "/usr/local/share/neofetch/config" "${XDG_CONFIG_HOME}/neofetch"
config_file="${XDG_CONFIG_HOME}/neofetch/config"
@@ -3476,11 +3551,11 @@ old_options() {
[[ -n "$image" ]] && { err "Config: \$image is deprecated, use \$image_source instead."; image_source="$image"; }
# All progress_ variables were changed to bar_.
[[ -n "$progress_char" ]] && err "Config: \$progress_char is deprecated, use \$bar_char_elapsed and \$bar_char_total instead."
[[ -n "$progress_border" ]] && err "Config: \$progress_border is deprecated, use \$bar_border instead."
[[ -n "$progress_length" ]] && err "Config: \$progress_length is deprecated, use \$bar_length instead."
[[ -n "$progress_color_elapsed" ]] && err "Config: \$progress_color_elapsed is deprecated, use \$bar_color_elapsed instead."
[[ -n "$progress_color_total" ]] && err "Config: \$progress_color_total is deprecated, use \$bar_color_total instead."
[[ -n "$progress_char" ]] && err "Config: \$progress_char is deprecated, use \$bar_char_elapsed and \$bar_char_total instead."
[[ -n "$progress_border" ]] && { err "Config: \$progress_border is deprecated, use \$bar_border instead."; bar_border="$progress_border"; }
[[ -n "$progress_length" ]] && { err "Config: \$progress_length is deprecated, use \$bar_length instead."; bar_length="$progress_length"; }
[[ -n "$progress_color_elapsed" ]] && { err "Config: \$progress_color_elapsed is deprecated, use \$bar_color_elapsed instead."; bar_color_elapsed="$progress_color_elapsed"; }
[[ -n "$progress_color_total" ]] && { err "Config: \$progress_color_total is deprecated, use \$bar_color_total instead."; bar_color_total="$progress_color_total"; }
# All cpufreq values were changed in 3.0.
[[ "$speed_type" == "current" ]] && err "Config: speed_type='current' is deprecated, use speed_type='scaling_cur_freq' instead."
@@ -3496,6 +3571,9 @@ old_options() {
# Fahrenheit support was added to CPU so the options were changed.
[[ "$cpu_temp" == "on" ]] && { err "Config: cpu_temp='on' is deprecated, use cpu_temp='C' or 'F' instead."; cpu_temp="C"; }
# Birthday was renamed to Install Date in 3.0
[[ -n "$birthday_time" ]] && { err "Config: \$birthday_time is deprecated, use \3install_time instead."; install_time="$birthday_time"; }
}
cache_uname() {
@@ -3811,7 +3889,7 @@ exit 1
}
version() { printf "%s" "\
Neofetch 3.0
Neofetch $version
Copyright (c) 2016-2017 Dylan Araps
@@ -4045,7 +4123,7 @@ main() {
# w3m-img: Draw the image a second time to fix
# rendering issues in specific terminal emulators.
[[ "$image_program" == *w3m* ]] && display_image 2>/dev/null
[[ "$image_backend" == *w3m* ]] && display_image 2>/dev/null
# Take a screenshot.
[[ "$scrot" == "on" ]] && take_scrot

View File

@@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3.
.TH NEOFETCH "1" "January 2017" "Neofetch 3.0" "User Commands"
.TH NEOFETCH "1" "January 2017" "Neofetch 3.0.1" "User Commands"
.SH NAME
Neofetch \- A fast, highly customizable system info script
.SH SYNOPSIS