Compare commits

...

50 Commits

Author SHA1 Message Date
Dylan Araps
cb81e21ee2 song: Fix itunes issue. 2018-05-25 04:57:18 +10:00
Dylan Araps
e8ab52de7d Merge pull request #1003 from dylanaraps/song_fix
song: Fix matching
2018-05-24 08:43:32 +00:00
Dylan Araps
b4fc29e6f6 Merge pull request #962 from dylanaraps/ati
gpu: Fix ATI/AMD branding issue.
2018-05-24 07:58:45 +00:00
Dylan Araps
c64b5c3d8c general: clean up 2018-05-24 16:55:10 +10:00
Dylan Araps
0f0d9aa84f Merge branch 'master' of github.com:dylanaraps/neofetch 2018-05-24 16:51:34 +10:00
Dylan Araps
6991b71ccb general: Added json output option. 2018-05-24 16:51:23 +10:00
Andrew Titmuss
de0d342852 Revert "Revert "term_font: fix iTerm2 checking 2 more profiles than exists""
This reverts commit f49919e957.
2018-05-24 15:46:38 +10:00
Dylan Araps
33d6dd760f song: Fix matching 2018-05-24 15:36:04 +10:00
Dylan Araps
130b7028ef song: Fix matching 2018-05-24 15:33:13 +10:00
Andrew Titmuss
f49919e957 Revert "term_font: fix iTerm2 checking 2 more profiles than exists"
This reverts commit 15c2939779.
2018-05-24 14:27:39 +10:00
Andrew Titmuss
5143b20ce1 font: fix line length for iTerm2 profile count 2018-05-24 13:55:09 +10:00
Andrew Titmuss
d6d6e6ea63 docs: update [skip ci] 2018-05-24 13:50:05 +10:00
Andrew Titmuss
15c2939779 term_font: fix iTerm2 checking 2 more profiles than exists 2018-05-24 13:46:35 +10:00
Andrew Titmuss
5756eb97f2 song: fix iTunes detection 2018-05-24 12:46:47 +10:00
Dylan Araps
14981205c6 docs: update 2018-05-24 08:52:55 +10:00
Dylan Araps
dfc8b10ee4 general: Fix cursor location errors. 2018-05-24 08:07:37 +10:00
Dylan Araps
38762182e8 docs: update 2018-05-22 19:44:14 +10:00
Dylan Araps
3ee0980aac Merge branch 'master' of github.com:dylanaraps/neofetch 2018-05-22 14:38:50 +10:00
Dylan Araps
3f021fbbb6 misc: cleanup 2018-05-22 14:14:17 +10:00
Dylan Araps
8e99bc6e5f Merge pull request #1002 from mstraube/redcore
OS: Add support for Redcore Linux
2018-05-21 14:03:28 +00:00
Michael Straube
dc9334b7f1 OS: Add support for Redcore Linux 2018-05-21 11:03:36 +02:00
Dylan Araps
070651e4f4 general: Remove screenshot functionality. 2018-05-21 12:46:05 +10:00
Dylan Araps
6aba54154c misc: Remove uppercase() 2018-05-21 10:26:46 +10:00
Dylan Araps
c5188a891f config: Remove support for deprecated options. 2018-05-21 10:23:01 +10:00
Dylan Araps
6bf7f9452e misc: Remove all instances of export. They're pointless. 2018-05-21 10:14:35 +10:00
Dylan Araps
4895ed33b1 misc: cleanup 2018-05-21 10:08:43 +10:00
Dylan Araps
8ad455a1ce docs: update 2018-05-21 09:35:07 +10:00
Dylan Araps
aed206b5d7 docs: update 2018-05-21 08:32:28 +10:00
Dylan Araps
a27382d21d image: Make the resolution of catimg configurable. 2018-05-21 08:29:50 +10:00
Dylan Araps
0fe972073f image: Cleanup of get_term_size 2018-05-21 08:24:32 +10:00
Dylan Araps
fc229704c8 general: term_size, macos fix. 2018-05-20 15:36:54 +10:00
Dylan Araps
c4bf54db3d ascii: Fix ascii art on windows. 2018-05-20 14:22:26 +10:00
Dylan Araps
7b1b3755a9 general: Fix issues with default config. 2018-05-20 13:59:14 +10:00
Dylan Araps
cb68508be2 general: Fix issues with default config. 2018-05-20 13:56:24 +10:00
Dylan Araps
7a4492c6c3 ascii: Fix ascii art on windows. 2018-05-20 13:50:10 +10:00
Dylan Araps
1f678f8020 version: bump 2018-05-20 08:03:12 +10:00
Dylan Araps
e4c1732c01 docs: update 2018-05-20 07:59:01 +10:00
Dylan Araps
c9bda1dd09 docs: update 2018-05-20 07:56:46 +10:00
Dylan Araps
c814f14726 general: Fix issues with default config. 2018-05-19 20:38:45 +10:00
Dylan Araps
992d0b38ae general: Added --print_config to display the default config file. 2018-05-19 08:28:10 +10:00
Dylan Araps
c782af6a06 Merge branch 'master' of github.com:dylanaraps/neofetch 2018-05-19 08:06:22 +10:00
Dylan Araps
80299bd064 macOS: Fix xquartz issue. 2018-05-19 08:06:05 +10:00
Dylan Araps
c69e5ef041 docs: update 2018-05-18 16:26:22 +10:00
Dylan Araps
19d35b995d docs: update 2018-05-18 16:25:46 +10:00
Dylan Araps
0e43d765fa docs: update 2018-05-18 16:14:04 +10:00
Dylan Araps
8b4c858042 Merge pull request #993 from dylanaraps/pkg_clean
packages: cleanup
2018-05-18 06:10:38 +00:00
Dylan Araps
98252472ce general: Fix default config in bash3. 2018-05-18 16:11:00 +10:00
Dylan Araps
6e41d5e0a9 packages: cleanup 2018-05-18 15:49:14 +10:00
Dylan Araps
0d89e1a400 gpu: Fix ATI/AMD branding issue. 2018-04-25 11:42:11 +10:00
Dylan Araps
da94f65b8c gpu: Fix ATI/AMD branding issue. 2018-04-25 11:39:03 +10:00
4 changed files with 234 additions and 479 deletions

View File

@@ -7,9 +7,31 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [Unreleased]
- [ascii] Fixed a bug causing Windows 7 ASCII art to not display.
- [image] Added new option to configure the resolution of `catimg`.
- [font] Fix iTerm2 checking for 2 extra profiles that don't exist. [**@iandrewt**](https://github.com/iandrewt")
## [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
<h1><img src="https://i.imgur.com/JFxwJtU.png" alt="logo" height="100px"></h1>
This release bumps the version number up to `4.0.0` as it contains major
changes to how Neofetch is packaged and installed.
@@ -27,7 +49,7 @@ it. :+1:
## Discord
Neofetch now has a Discord server. Come and join the discussion!
Neofetch now has a Discord server. Come and join the discussion!
<a
href="https://discord.gg/BtnTPFF"><img
@@ -113,12 +135,12 @@ src="https://img.shields.io/discord/440354555197128704.svg"></a>
- 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!
I'm pretty sure that this release is the largest in terms of number of contributors. Thanks to everyone who contributed this release!
## Contributors
@@ -271,7 +293,7 @@ I'm pretty sure that this release is the largest in terms of number of contribut
- 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!
@@ -399,13 +421,13 @@ Thanks to everyone who contributed this release, I appreciate ya!
- 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.
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!
Thanks once again to everyone that contributed!
## Contributors
@@ -485,7 +507,7 @@ Thanks once again to everyone that contributed!
- [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)
@@ -598,7 +620,7 @@ The screenshot feature no longer requires any configuration before working. We n
- [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.
@@ -667,12 +689,12 @@ Thanks for all of the bug reports and contributions. :)
## 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.
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.
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
@@ -887,7 +909,7 @@ I have given collaborator access to both **[@konimex](https://github.com/konimex
- 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.
@@ -907,7 +929,7 @@ I also want to apologize to those packaging Neofetch for this unexpected release
**Theme**<br \>
- [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.
@@ -991,7 +1013,7 @@ The config option `scrot_cmd` and the commandline flag `--scrot_cmd` are still t
- 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.
@@ -1127,12 +1149,12 @@ Thanks to all of the contributors this time around, you guys are a big help and
**Resolution**<br \>
- [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`
Note: Those packaging neofetch can ignore the new file: `config/travis`
## Contributors
- **[@konimex](https://github.com/konimex)**
@@ -1182,7 +1204,7 @@ Note: Those packaging neofetch can ignore the new file: `config/travis`
**Memory**<br \>
- [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
@@ -1215,7 +1237,7 @@ Thanks to everyone below who contributed, it's nice to see some new faces too. :
- 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
- 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)
@@ -1344,7 +1366,7 @@ Note: `\033[14t` is still supported, if images already work for you then you don
- 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.
@@ -1389,7 +1411,7 @@ This release fixes various bugs found in 1.8.
- 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
@@ -1552,7 +1574,7 @@ now have working image support.
- 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
@@ -1719,7 +1741,7 @@ called `fg` which will set the color to your foreground color.
[///// ]
```
## [1.6] - 2016-04-01
# Neofetch 1.6
@@ -1866,7 +1888,7 @@ Thanks to the following people for contributing this release.
### Scrot
- Fixed scrot function not using user defined options.
## [1.5] - 2016-03-17
# Neofetch 1.5
@@ -1960,7 +1982,7 @@ me finish up with this PR.
### 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
@@ -2032,14 +2054,14 @@ Example:
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
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
@@ -2110,7 +2132,7 @@ much faster and cleaner.
- Removed `--stdout_subtitles`
- Removed `--stdout_title`
## [1.2] - 2016-02-17
# Fetch 1.2
@@ -2125,7 +2147,7 @@ https://github.com/dylanaraps/fetch/wiki/Following-HEAD
### OS
We now support almost all the Linux distros Screenfetch supports excluding
We now support almost all the Linux distros Screenfetch supports excluding
the distros that have been discontinued.
Added support for these distros:
@@ -2223,7 +2245,7 @@ info "Font" font
- 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
@@ -2276,7 +2298,7 @@ the first value of `ascii_colors`. If `ascii_colors` is left empty, color will b
### Config file
- Fetch now has a config file that you can share with people and keep between
script versions! [1]
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.
@@ -2393,7 +2415,7 @@ 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
@@ -2553,7 +2575,7 @@ to set the program to use to take the screenshot.
## Wiki:
Added `Customizing Info` page which has info/examples about
Added `Customizing Info` page which has info/examples about
the new printinfo function.
https://github.com/dylanaraps/fetch/wiki/Customizing-Info
@@ -2562,7 +2584,7 @@ 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:
@@ -2574,19 +2596,19 @@ Here's what's new:
- 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.
- `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
- Finishing OpenBSD support
- Cygwin support
Enjoy
## [0.2] - 2016-01-03
I finished my rewrite!
I finished my rewrite!
## Here's what's new:
- The script is now way faster.
@@ -2641,8 +2663,8 @@ Changelog:
- 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
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.
@@ -2658,7 +2680,9 @@ Changelog:
Let me know if you're having issues.
[Unreleased]: https://github.com/dylanaraps/neofetch/compare/4.0.0...HEAD
[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

View File

@@ -1,4 +1,5 @@
<h1 align="center"><img src="https://i.imgur.com/JFxwJtU.png" alt="logo" height="50px"></h1>
<h3 align="center"><img src="https://i.imgur.com/ZQI2EYz.png" alt="logo" height="100px"></h3>
<p align="center">A command-line system information tool written in bash 3.2+</p>
<p align="center">
<a href="https://discord.gg/BtnTPFF"><img src="https://img.shields.io/discord/440354555197128704.svg"></a>
@@ -8,9 +9,7 @@
<a href="https://www.patreon.com/dyla"><img src="https://img.shields.io/badge/donate-patreon-yellow.svg"></a>
</p>
<a href="https://repology.org/metapackage/neofetch">
<img src="https://repology.org/badge/vertical-allrepos/neofetch.svg" alt="Packaging status" align="right" width="150px" height="700px">
</a>
<img src="https://i.imgur.com/GFmC5Ad.png" alt="neofetch" align="right" height="240px">
Neofetch is a command-line system information tool written in `bash 3.2+`. Neofetch displays information about your operating system, software and hardware in an aesthetic and visually pleasing way.
@@ -18,14 +17,14 @@ The overall purpose of Neofetch is to be used in screen-shots of your system. Ne
The information by default is displayed alongside your operating system's logo. You can further configure Neofetch to instead use an image, a custom ASCII file, your wallpaper or nothing at all.
<img src="https://i.imgur.com/lUrkQBN.png" alt="neofetch" align="right" height="240px">
You can further configure Neofetch to display exactly what you want it to. Through the use of command-line flags and the configuration file you can change existing information outputs or add your own custom ones.
Neofetch supports almost 150 different operating systems. From Linux to Windows, all the way to more obscure operating systems like Minix, AIX and Haiku. If your favourite operating system is unsupported: Open up an issue and support will be added.<br>
Neofetch supports almost 150 different operating systems. From Linux to Windows, all the way to more obscure operating systems like Minix, AIX and Haiku. If your favourite operating system is unsupported: Open up an issue and support will be added.
<img src="https://i.imgur.com/lUrkQBN.png" alt="neofetch" align="right" width="349px">
<img src="https://i.imgur.com/GFmC5Ad.png" alt="neofetch" width="349px">
### For more information: \[[Dependencies](https://github.com/dylanaraps/neofetch/wiki/Dependencies)\] \[[Installation](https://github.com/dylanaraps/neofetch/wiki/Installation)\] \[[Wiki](https://github.com/dylanaraps/neofetch/wiki)\]
### 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
@@ -42,6 +41,7 @@ Neofetch supports almost 150 different operating systems. From Linux to Windows,
- 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

566
neofetch
View File

@@ -26,27 +26,21 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# Neofetch version.
version="4.0.1"
version="4.0.3"
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}"
# Speed up script by not using unicode.
export LC_ALL=C
export LANG=C
# Add more paths to $PATH.
export PATH="/usr/xpg4/bin:/usr/sbin:/sbin:/usr/etc:/usr/libexec:${PATH}"
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/"
# Set no case match.
shopt -s nocasematch
# Reset colors and bold.
reset="\e[0m"
# Neofetch default config.
@@ -747,6 +741,14 @@ 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'
@@ -773,51 +775,6 @@ xoffset=0
background_color=
# Scrot Options
# Whether or not to always take a screenshot
# You can manually take a screenshot with "--scrot" or "-s"
#
# Default: 'off'
# Values: 'on', 'off'
# Flags: --scrot
# -s
scrot="off"
# Screenshot Program
# Neofetch will automatically use whatever screenshot tool
# is installed on your system.
#
# If 'neofetch -v' says that it couldn't find a screenshot
# tool or you're using a custom tool then you can change
# the option below to a custom command.
#
# Default: 'auto'
# Values: 'auto' 'cmd -flags'
# Flag: --scrot_cmd
scrot_cmd="auto"
# Screenshot Filename
# What to name the screenshots
#
# Default: 'neofetch-$(date +%F-%I-%M-%S-${RANDOM}).png'
# Values: 'string'
# Flag: --scrot_name
scrot_name="neofetch-$(date +%F-%I-%M-%S-${RANDOM}).png"
# Image upload host
# Where to upload the image.
#
# Default: 'teknik'
# Values: 'imgur', 'teknik'
# Flag: --image_host
#
# NOTE: If you'd like another image host to be added to Neofetch.
# Open an issue on github.
image_host="teknik"
# Misc Options
# Stdout mode
@@ -826,12 +783,6 @@ image_host="teknik"
# Default: 'off'
# Values: 'on', 'off'
stdout="off"
# Config version.
#
# NOTE: Don't change this value, neofetch reads this to determine
# how to handle backwards compatibility.
config_version="4.0.1"
EOF
# DETECT INFORMATION
@@ -1303,83 +1254,83 @@ get_packages() {
packages="$(pacman -Qq --color never | wc -l)"
type -p dpkg >/dev/null && \
packages="$((packages+=$(dpkg --get-selections | grep -cv deinstall$)))"
((packages+=$(dpkg --get-selections | grep -cv deinstall$)))
type -p pkgtool >/dev/null && \
packages="$((packages+=$(ls -1 /var/log/packages | wc -l)))"
((packages+=$(ls -1 /var/log/packages | wc -l)))
type -p rpm >/dev/null && \
packages="$((packages+=$(rpm -qa | wc -l)))"
((packages+=$(rpm -qa | wc -l)))
type -p xbps-query >/dev/null && \
packages="$((packages+=$(xbps-query -l | wc -l)))"
((packages+=$(xbps-query -l | wc -l)))
type -p pkginfo >/dev/null && \
packages="$((packages+=$(pkginfo -i | wc -l)))"
((packages+=$(pkginfo -i | wc -l)))
type -p emerge >/dev/null && \
packages="$((packages+=$(ls -d /var/db/pkg/*/* | wc -l)))"
((packages+=$(ls -d /var/db/pkg/*/* | wc -l)))
type -p nix-env >/dev/null && \
packages="$((packages+=$(ls -d -1 /nix/store/*/ | wc -l)))"
((packages+=$(ls -d -1 /nix/store/*/ | wc -l)))
type -p guix >/dev/null && \
packages="$((packages+=$(ls -d -1 /gnu/store/*/ | wc -l)))"
((packages+=$(ls -d -1 /gnu/store/*/ | wc -l)))
type -p apk >/dev/null && \
packages="$((packages+=$(apk info | wc -l)))"
((packages+=$(apk info | wc -l)))
type -p opkg >/dev/null && \
packages="$((packages+=$(opkg list-installed | wc -l)))"
((packages+=$(opkg list-installed | wc -l)))
type -p pacman-g2 >/dev/null && \
packages="$((packages+=$(pacman-g2 -Q | wc -l)))"
((packages+=$(pacman-g2 -Q | wc -l)))
type -p lvu >/dev/null && \
packages="$((packages+=$(lvu installed | wc -l)))"
((packages+=$(lvu installed | wc -l)))
type -p tce-status >/dev/null && \
packages="$((packages+=$(tce-status -i | wc -l)))"
((packages+=$(tce-status -i | wc -l)))
type -p Compile >/dev/null && \
packages="$((packages+=$(ls -d -1 /Programs/*/ | wc -l)))"
((packages+=$(ls -d -1 /Programs/*/ | wc -l)))
type -p eopkg >/dev/null && \
packages="$((packages+=$(ls -1 /var/lib/eopkg/package | wc -l)))"
((packages+=$(ls -1 /var/lib/eopkg/package | wc -l)))
type -p pkg_info >/dev/null && \
packages="$((packages+=$(pkg_info | wc -l)))"
((packages+=$(pkg_info | wc -l)))
type -p crew >/dev/null && \
packages="$((packages+=$(ls -l /usr/local/etc/crew/meta/*.filelist | wc -l)))"
((packages+=$(ls -l /usr/local/etc/crew/meta/*.filelist | wc -l)))
type -p tazpkg >/dev/null && \
packages="$((packages+=$(tazpkg list | wc -l) - 6))"
((packages+=$(tazpkg list | wc -l) - 6))
type -p sorcery >/dev/null && \
packages="$((packages+=$(gaze installed | wc -l)))"
((packages+=$(gaze installed | wc -l)))
type -p alps >/dev/null && \
packages="$((packages+=$(alps showinstalled | wc -l)))"
((packages+=$(alps showinstalled | wc -l)))
type -p kpt >/dev/null && \
type -p kpm >/dev/null && \
packages="$((packages+=$(kpm --get-selections | grep -cv deinstall$)))"
((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="$((packages+=$(ls -d -1 "${package_dir[@]}" | wc -l)))"
((packages+=$(ls -d -1 "${package_dir[@]}" | wc -l)))
fi
type -p butch >/dev/null && \
packages="$((packages+=$(butch list | wc -l)))"
((packages+=$(butch list | wc -l)))
if type -p pkg >/dev/null; then
case "$kernel_name" in
"FreeBSD") packages="$((packages+=$(pkg info | wc -l)))" ;;
"FreeBSD") ((packages+=$(pkg info | wc -l))) ;;
*)
packages="$((packages+=$(ls -1 /var/db/pkg | wc -l)))"
((packages == 0)) && packages="$((packages+=$(pkg list | wc -l)))"
((packages+=$(ls -1 /var/db/pkg | wc -l)))
((packages == 0)) && ((packages+=$(pkg list | wc -l)))
esac
fi
;;
@@ -1389,13 +1340,13 @@ get_packages() {
packages="$(($(ls -l /usr/local/bin/ | grep -cv "\(../Cellar/\|brew\)") - 1))"
type -p port >/dev/null && \
packages="$((packages + $(port installed | wc -l) - 1))"
((packages+=$(port installed | wc -l) - 1))
type -p brew >/dev/null && \
packages="$((packages + $(find /usr/local/Cellar -maxdepth 1 | wc -l) - 1))"
((packages+=$(find /usr/local/Cellar -maxdepth 1 | wc -l) - 1))
type -p pkgin >/dev/null && \
packages="$((packages + $(pkgin list | wc -l)))"
((packages+=$(pkgin list | wc -l)))
;;
"Windows")
@@ -1406,7 +1357,7 @@ get_packages() {
# Count chocolatey packages.
[[ -d "/cygdrive/c/ProgramData/chocolatey/lib" ]] && \
packages="$((packages+=$(ls -1 /cygdrive/c/ProgramData/chocolatey/lib | wc -l)))"
((packages+=$(ls -1 /cygdrive/c/ProgramData/chocolatey/lib | wc -l)))
;;
"Haiku")
@@ -1415,7 +1366,7 @@ get_packages() {
"AIX")
packages="$(lslpp -J -l -q | grep -cv '^#')"
packages="$((packages+=$(rpm -qa | wc -l)))"
((packages+=$(rpm -qa | wc -l)))
;;
"IRIX")
@@ -1424,7 +1375,7 @@ get_packages() {
"FreeMiNT")
type -p rpm >/dev/null && \
packages="$((packages+=$(rpm -qa | wc -l)))"
packages="$(rpm -qa | wc -l)"
;;
esac
@@ -1786,7 +1737,6 @@ get_wm_theme() {
esac
wm_theme="$(trim_quotes "$wm_theme")"
wm_theme="$(uppercase "$wm_theme")"
}
get_cpu() {
@@ -2118,6 +2068,10 @@ get_gpu() {
case "$gpu" in
*"advanced"*)
brand="${gpu/*AMD*ATI*/AMD ATI}"
brand="${brand:-${gpu/*AMD*/AMD}}"
brand="${brand:-${gpu/*ATI*/ATi}}"
gpu="${gpu/'[AMD/ATI]' }"
gpu="${gpu/'[AMD]' }"
gpu="${gpu/OEM }"
@@ -2125,7 +2079,7 @@ get_gpu() {
gpu="${gpu/ \/ *}"
gpu="${gpu/*\[}"
gpu="${gpu/\]*}"
gpu="AMD $gpu"
gpu="$brand $gpu"
;;
*"nvidia"*)
@@ -2250,8 +2204,8 @@ get_memory() {
# Source: https://github.com/KittyKatt/screenFetch/issues/386#issuecomment-249312716
while IFS=":" read -r a b; do
case "$a" in
"MemTotal") mem_used="$((mem_used+=${b/kB}))"; mem_total="${b/kB}" ;;
"Shmem") mem_used="$((mem_used+=${b/kB}))" ;;
"MemTotal") ((mem_used+=${b/kB})); mem_total="${b/kB}" ;;
"Shmem") ((mem_used+=${b/kB})) ;;
"MemFree" | "Buffers" | "Cached" | "SReclaimable")
mem_used="$((mem_used-=${b/kB}))"
;;
@@ -2363,38 +2317,42 @@ get_memory() {
}
get_song() {
player="$(ps -e | grep -m 1 -o \
-e "Google Play" \
-e "Spotify" \
-e "amarok" \
-e "audacious" \
-e "banshee" \
-e "bluemindo" \
-e "clementine" \
-e "cmus" \
-e "deadbeef" \
-e "deepin-music" \
-e "elisa" \
-e "exaile" \
-e "gnome-music" \
-e "guayadeque" \
-e "iTunes$" \
-e "juk" \
-e "lollypop" \
-e "mocp" \
-e "mopidy" \
-e "mpd" \
-e "pogo" \
-e "pragha" \
-e "qmmp" \
-e "quodlibet" \
-e "rhythmbox" \
-e "spotify" \
-e "tomahawk" \
-e "xmms2d" \
-e "yarock" \
-e "sayonara" \
-e "vlc")"
player="$(ps -e)"
player="${player/iTunesHelper}"
player="$(grep -m 1 -F \
-e "Google Play" \
-e "Spotify" \
-e "amarok" \
-e "audacious" \
-e "banshee" \
-e "bluemindo" \
-e "clementine" \
-e "cmus" \
-e "deadbeef" \
-e "deepin-music" \
-e "elisa" \
-e "exaile" \
-e "gnome-music" \
-e "guayadeque" \
-e "iTunes" \
-e "juk" \
-e "lollypop" \
-e "mocp" \
-e "mopidy" \
-e "mpd" \
-e "pogo" \
-e "pragha" \
-e "qmmp" \
-e "quodlibet" \
-e "rhythmbox" \
-e "spotify" \
-e "tomahawk" \
-e "xmms2d" \
-e "yarock" \
-e "sayonara" \
-e "vlc" -- <<< "$player")"
player="${player/* }"
player="${player##*/}"
[[ "$music_player" && "$music_player" != "auto" ]] && \
player="$music_player"
@@ -2618,7 +2576,7 @@ get_style() {
kde_font_size="${kde_font_size/,*}"
kde_theme="${kde_theme/,*} ${kde_theme/*,} ${kde_font_size}"
fi
kde_theme="$(uppercase "$kde_theme") [KDE], "
kde_theme="$kde_theme [KDE], "
else
err "Theme: KDE config files not found, skipping."
fi
@@ -2694,10 +2652,6 @@ get_style() {
gtk2_theme="$(trim_quotes "$gtk2_theme")"
gtk3_theme="$(trim_quotes "$gtk3_theme")"
# Uppercase the first letter of each GTK theme.
gtk2_theme="$(uppercase "$gtk2_theme")"
gtk3_theme="$(uppercase "$gtk3_theme")"
# Toggle visibility of GTK themes.
[[ "$gtk2" == "off" ]] && unset gtk2_theme
[[ "$gtk3" == "off" ]] && unset gtk3_theme
@@ -2854,9 +2808,10 @@ END
font_file="${HOME}/Library/Preferences/com.googlecode.iterm2.plist"
# Count Guids in "New Bookmarks"; they should be unique
profiles_count="$(PlistBuddy -c "Print :New\ Bookmarks:" "$font_file" | grep -c "Guid")"
profiles_count="$(PlistBuddy -c "Print :New\ Bookmarks:" "$font_file" | \
grep -w -c "Guid")"
for ((i=0; i<=profiles_count; i++)); do
for ((i=0; i<profiles_count; i++)); do
profile_name="$(PlistBuddy -c "Print :New\ Bookmarks:${i}:Name:" "$font_file")"
if [[ "$profile_name" == "$current_profile_name" ]]; then
@@ -3406,9 +3361,9 @@ get_cols() {
cols="${cols//nl/\\n\\e[${text_padding}C${zws}}"
# Add block height to info height.
info_height="$((info_height+=block_height+2))"
((info_height+=block_height-1))
printf "%b\n" "\e[${text_padding}C${zws}${cols}"
printf "%b" "\e[${text_padding}C${zws}${cols}"
fi
unset -v blocks blocks2 cols
@@ -3416,7 +3371,7 @@ get_cols() {
# TosWin2 on FreeMiNT is terrible at this,
# so we'll reset colors arbitrarily.
[[ "$term" == "TosWin2" ]] && \
printf "%b\n" "\e[30;47m"
printf "%b" "\e[30;47m"
# Tell info() that we printed manually.
prin=1
@@ -3493,7 +3448,7 @@ get_ascii() {
fi
# Set locale to get correct padding.
export LC_ALL="$sys_locale"
LC_ALL="$sys_locale"
# Turn file into variable.
while IFS=$'\n' read -r line; do
@@ -3522,7 +3477,7 @@ get_ascii() {
text_padding="$((ascii_length + gap))"
printf "%b" "$print"
export LC_ALL=C
LC_ALL=C
}
get_image_source() {
@@ -3693,7 +3648,7 @@ get_term_size() {
fi
# Get terminal width/height if \e[14t is unsupported.
if [[ -z "$term_width" ]] || (( "$term_width" < 50 )); then
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")
@@ -3716,13 +3671,11 @@ get_term_size() {
awk -F ': ' '/Width|Height/ {printf $2 " "}')"
term_width="${term_size/ *}"
term_height="${term_size/${term_width}}"
else
term_width=0
fi
else
term_width=0
fi
fi
term_width="${term_width:-0}"
}
get_image_size() {
@@ -3850,7 +3803,7 @@ display_image() {
;;
"catimg")
catimg -w "$((width * 2 / font_width))" "$image" ||\
catimg -w "$((width * 2 / font_width))" -r "$catimg_size" "$image" ||\
to_off "Image: catimg failed to display the image."
;;
@@ -3930,116 +3883,6 @@ to_off() {
text_padding=
}
# SCREENSHOT
take_scrot() {
scrot_program "${scrot_dir}${scrot_name}"
err "Scrot: Saved screenshot as: ${scrot_dir}${scrot_name}"
[[ "$scrot_upload" == "on" ]] && scrot_upload
}
scrot_upload() {
if ! type -p curl >/dev/null 2>&1; then
printf "%s\n" "[!] Install curl to upload images"
return
fi
image_file="${scrot_dir}${scrot_name}"
# 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")
image_url="$(curl -sf -F file="@${image_file};type=image/png" \
"https://api.teknik.io/v1/Upload")"
image_url="$(awk -F 'url:|,' '{printf $2}' <<< "${image_url//\"}")"
;;
"imgur")
image_url="$(curl -sH "Authorization: Client-ID 0e8b44d15e9fc95" \
-F image="@${image_file}" "https://api.imgur.com/3/upload")"
image_url="$(awk -F 'id:|,' '{printf $2}' <<< "${image_url//\"}")"
[[ "$image_url" ]] && image_url="https://i.imgur.com/${image_url}.png"
;;
esac
printf "%s\n" "${image_url:-'[!] Image failed to upload'}"
}
scrot_args() {
scrot="on"
if [[ "$2" =~ \.(png|jpg|jpe|jpeg|gif)$ ]]; then
scrot_name="${2##*/}"
scrot_dir="${2/$scrot_name}"
elif [[ -d "$2" ]]; then
scrot_dir="$2"
else
scrot_dir="${PWD:+${PWD}/}"
fi
}
scrot_program() {
# Detect screenshot program.
#
# We first check to see if an X server is running before
# falling back to OS specific screenshot tools.
if [[ -n "$DISPLAY" ]]; then
if [[ "$scrot_cmd" != "auto" ]] && type -p "${scrot_cmd%% *}" >/dev/null; then
IFS=" " read -ra scrot_program <<< "$scrot_cmd"
elif type -p maim >/dev/null; then
scrot_program=(maim)
elif type -p scrot >/dev/null; then
scrot_program=(scrot)
elif type -p import >/dev/null && [[ "$os" != "Mac OS X" ]]; then
scrot_program=(import -window root)
elif type -p imlib2_grab >/dev/null; then
scrot_program=(imlib2_grab)
elif type -p gnome-screenshot >/dev/null; then
scrot_program=(gnome-screenshot -f)
else
err "Scrot: No screen capture tool found."
return
fi
else
case "$os" in
"Mac OS X") scrot_program=(screencapture -S) ;;
"Haiku") scrot_program=(screenshot -s) ;;
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"
err "Scrot: Screen captured using ${scrot_program[0]}"
}
# TEXT FORMATTING
@@ -4075,6 +3918,8 @@ info() {
prin() {
# If $2 doesn't exist we format $1 as info.
if [[ "$(trim "$1")" && "$2" ]]; then
[[ "$json" ]] && { printf " %s\n" "\"${1}\": \"${2}\","; return; }
string="${1}${2:+: $2}"
else
string="${2:-$1}"
@@ -4109,6 +3954,8 @@ get_underline() {
"${underline// /$underline_char}${reset} "
unset -v length
fi
((++info_height))
prin=1
}
@@ -4118,7 +3965,6 @@ get_line_break() {
# Calculate info height.
((++info_height))
line_breaks+="\n"
# Tell info() that we printed manually.
prin=1
@@ -4159,14 +4005,6 @@ strip_sequences() {
printf "%s\n" "$strip"
}
uppercase() {
if ((bash_version >= 4)); then
printf "%s" "${1^}"
else
printf "%s" "$1"
fi
}
# COLORS
set_colors() {
@@ -4282,7 +4120,6 @@ get_user_config() {
if [[ -f "$config_file" ]]; then
source "$config_file"
err "Config: Sourced user config. (${config_file})"
old_options
return
fi
mkdir -p "${XDG_CONFIG_HOME}/neofetch/"
@@ -4304,7 +4141,6 @@ get_user_config() {
source "$config_file"
err "Config: Sourced user config. (${config_file})"
old_options
}
bar() {
@@ -4365,49 +4201,19 @@ kde_config_dir() {
kde_config_dir="${kde_config_dir/$'/:'*}"
}
get_term_padding() {
# Terminal info.
#
# Parse terminal config files to get
# info about padding. Due to how w3m-img
# works padding around the terminal throws
# off the cursor placement calculation in
# specific terminals.
#
# Note: This issue only seems to affect
# URxvt.
((term_run != 1)) && get_term
case "$term" in
"URxvt"*)
border="$(xrdb -query | awk -F ':' '/^(URxvt|\*).internalBorder/ {printf $2; exit}')"
;;
esac
}
dynamic_prompt() {
case "$image_backend" in
"ascii") printf "\n" ;;
"off") return ;;
*)
get_term_padding
lines="$(((border + height + yoffset) / font_height))"
image_prompt="on"
;;
esac
[[ "$image_backend" == "off" ]] && { printf "\n"; return; }
[[ "$image_backend" != "ascii" ]] && ((lines+=1000))
# If the info is higher than the ascii/image place the prompt
# based on the info height instead of the ascii/image height.
if ((lines < info_height)); then
[[ "$image_prompt" ]] && printf "\n"
return
else
[[ "$image_prompt" ]] && printf "%b\n" "$line_breaks"
# If the ascii art is taller than the info.
if ((lines > info_height)); then
lines="$((lines - info_height + 1))"
else
lines=1
fi
# Set the prompt location.
if ((lines > 1)); then
if ((lines >= 1)); then
case "$kernel_name" in
"OpenBSD") tput cud "$lines" ;;
*) printf "%b" "\e[${lines}B" ;;
@@ -4415,87 +4221,6 @@ dynamic_prompt() {
fi
}
old_functions() {
# Deprecated functions.
# Neofetch 2.0 changed the names of a few variables.
# This function adds backwards compatibility for the
# old variable names.
if type printinfo >/dev/null 2>&1; then
print_info() { printinfo ; }
get_wmtheme() { get_wm_theme; wmtheme="$wm_theme"; }
get_termfont() { get_term_font; termfont="$term_font"; }
get_localip() { get_local_ip; localip="$local_ip"; }
get_publicip() { get_public_ip; publicip="$public_ip"; }
get_linebreak() { get_line_break; linebreak="$line_break"; }
fi
get_birthday() { get_install_date; birthday="$install_date"; }
}
old_options() {
[[ -n "$osx_buildversion" ]] && \
err "Config: \$osx_buildversion is deprecated, use \$distro_shorthand instead."
[[ -n "$osx_codename" ]] && \
err "Config: \$osx_codename is deprecated, use \$distro_shorthand instead."
[[ "$cpu_cores" == "on" ]] && \
err "Config: cpu_cores='on' is deprecated, use cpu_cores='logical|physical|off' instead."
[[ -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,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."
[[ "$speed_type" == "min" ]] && \
err "Config: speed_type='min' is deprecated, use speed_type='scaling_min_freq' instead."
[[ "$speed_type" == "max" ]] && \
err "Config: speed_type='max' is deprecated, use speed_type='scaling_max_freq' instead."
[[ "$speed_type" == "bios" ]] && \
err "Config: speed_type='bios' is deprecated, use speed_type='bios_limit' instead."
# Ascii_logo_size was removed in 3.0.
[[ "$ascii_logo_size" ]] && \
err "Config: ascii_logo_size is deprecated, use ascii_distro='{distro}_small' instead."
# $start and $end were replaced with ${block_range[@]} in 3.0.
[[ "$start" && "$end" ]] && \
{ err "Config: \$start and \$end are deprecated, use block_range=(0 7) instead."; \
block_range=("$start" "$end"); }
# 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"; }
# Scrot dir was removed in 3.1.0.
[[ -n "$scrot_dir" ]] && scrot_dir=
# cpu_shorthand was deprecated in 3.3.0
[[ -n "$cpu_shorthand" ]] && \
{ err "Config: \$cpu_shorthand is deprecated, use \$cpu_brand, \$cpu_cores, and
\$cpu_speed instead."; }
}
cache_uname() {
# Cache the output of uname so we don't
# have to spawn it multiple times.
@@ -4786,6 +4511,7 @@ IMAGE:
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.
@@ -4805,16 +4531,10 @@ IMAGE:
--clean Delete cached files and thumbnails.
SCREENSHOT:
-s, --scrot /path/to/img Take a screenshot, if path is left empty the screen-
shot function will use \$scrot_dir and \$scrot_name.
-su, --upload /path/to/img Same as --scrot but uploads the scrot to a website.
--image_host imgur/teknik Website to upload scrots to.
--scrot_cmd cmd Screenshot program to launch
OTHER:
--config /path/to/config Specify a path to a custom config file
--config none Launch the script without a 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
--version Show neofetch version
@@ -4947,6 +4667,7 @@ 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" ;;
@@ -4983,18 +4704,6 @@ get_args() {
print_info() { info line_break; }
;;
# Screenshot
"--scrot" | "-s")
scrot_args "$@"
;;
"--upload" | "-su")
scrot_upload="on"
scrot_args "$@"
;;
"--image_host") image_host="$2" ;;
"--scrot_cmd") scrot_cmd="$2" ;;
# Other
"--config")
case "$2" in
@@ -5007,6 +4716,7 @@ get_args() {
;;
"--stdout") stdout="on" ;;
"-v") verbose="on" ;;
"--print_config") printf "%s\\n" "$config"; exit ;;
"-vv") set -x; verbose="on" ;;
"--help") usage ;;
"--version")
@@ -5019,6 +4729,17 @@ get_args() {
exit 1
;;
"--json")
json="on"
unset -f get_title get_cols get_line_break get_underline
printf "{\n"
print_info 2>/dev/null
printf " %s\n" "\"Version\": \"${version}\""
printf "}\n"
exit
;;
"--travis")
print_info() {
info title
@@ -5083,7 +4804,7 @@ get_distro_ascii() {
# This function gets the distro ascii art and colors.
#
# $ascii_distro is the same as $distro.
case "$ascii_distro" in
case "$( trim "$ascii_distro")" in
"AIX"*)
set_colors 2 7
read -rd '' ascii_data <<'EOF'
@@ -7729,6 +7450,28 @@ ${c1} ..
EOF
;;
"Redcore"*)
set_colors 1
read -rd '' ascii_data <<'EOF'
${c1} RRRRRRRRR
RRRRRRRRRRRRR
RRRRRRRRRR RRRRR
RRRRRRRRRRRRRRRRRRRRRRRRRRR
RRRRRRR RRR RRR RRRRRRRR
RRRRR RR RRRRRRRRR
RRRR RR RRRRRRRR RR RRRRRR
RRRR R RRRRRRRRRRRRRR RR RRRRR
RRRR R RRRRRRRRRRRRRRRRRR R RRRRR
RRRR RRRRRRRRRRRRRRRRRRR R RRRR
RRR RRRRRRRRRRRRRRRRRRRR R RRRR
RRR RRRRRRRRRRRRRRRRRRRR RRRR
RR RRRRRRRRRRRRRRRRRRR RRR
RR RRRRRRRRRRRRRRRRR RRR
RR RRRRRRRRRRRRRR RR
R RRRR RR
EOF
;;
"Redhat"* | "Red Hat"* | "rhel"*)
set_colors 1 7 3
read -rd '' ascii_data <<'EOF'
@@ -8679,7 +8422,7 @@ main() {
get_os
# Load default config.
source /dev/stdin < <(printf "%s\n" "$config")
eval "$config"
get_args "$@"
[[ "$verbose" != "on" ]] && exec 2>/dev/null
@@ -8698,7 +8441,6 @@ main() {
fi
image_backend
old_functions
get_cache_dir
print_info
dynamic_prompt
@@ -8707,19 +8449,15 @@ main() {
# rendering issues in specific terminal emulators.
[[ "$image_backend" == *w3m* ]] && display_image
# Take a screenshot.
[[ "$scrot" == "on" ]] && take_scrot
# Add neofetch info to verbose output.
err "Neofetch command: $0 $*"
err "Neofetch version: $version"
err "Neofetch config: $config_version"
# 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 1s; done
while [[ "$image_loop" == "on" && "$image_backend" == "w3m" ]]; do display_image; sleep 1; done
return 0
}

View File

@@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6.
.TH NEOFETCH "1" "May 2018" "Neofetch 4.0.1" "User Commands"
.TH NEOFETCH "1" "May 2018" "Neofetch 4.0.3" "User Commands"
.SH NAME
Neofetch \- A fast, highly customizable system info script
.SH SYNOPSIS
@@ -276,6 +276,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
@@ -305,19 +308,6 @@ closer to the left side.
.TP
\fB\-\-clean\fR
Delete cached files and thumbnails.
.SS "SCREENSHOT:"
.TP
\fB\-s\fR, \fB\-\-scrot\fR \fI\,/path/to/img\/\fP
Take a screenshot, if path is left empty the screenshot function will use $scrot_dir and $scrot_name.
.TP
\fB\-su\fR, \fB\-\-upload\fR \fI\,/path/to/img\/\fP
Same as \fB\-\-scrot\fR but uploads the scrot to a website.
.TP
\fB\-\-image_host\fR imgur/teknik
Website to upload scrots to.
.TP
\fB\-\-scrot_cmd\fR cmd
Screenshot program to launch
.SS "OTHER:"
.TP
\fB\-\-config\fR \fI\,/path/to/config\/\fP
@@ -326,6 +316,9 @@ Specify a path to a custom config file
\fB\-\-config\fR none
Launch the script without a config file
.TP
\fB\-\-print_config\fR
Print the default config file to stdout.
.TP
\fB\-\-stdout\fR
Turn off all colors and disables any ASCII/image backend.
.TP