mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-10-04 09:08:38 +00:00
Compare commits
4 Commits
wm_theme-m
...
tests
Author | SHA1 | Date | |
---|---|---|---|
|
92bf7da15a | ||
|
5fb3ab6ee3 | ||
|
3b57104997 | ||
|
fbc029b1b1 |
18
.travis.yml
18
.travis.yml
@@ -9,15 +9,15 @@ before_install:
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install screenresolution; fi
|
||||
|
||||
install:
|
||||
# Install a custom version of shellcheck instead of Travis CI's default
|
||||
- scversion="latest" # or "v0.4.7", or "latest"
|
||||
- wget "https://storage.googleapis.com/shellcheck/shellcheck-${scversion}.linux.x86_64.tar.xz"
|
||||
- tar --xz -xvf "shellcheck-${scversion}.linux.x86_64.tar.xz"
|
||||
- shellcheck() { "shellcheck-${scversion}/shellcheck" "$@"; }
|
||||
|
||||
script:
|
||||
- time ./neofetch --travis -v
|
||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then shellcheck -e SC2244 -e SC2243 neofetch; fi
|
||||
# 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,SC1004,SC1091,SC1117; fi
|
||||
# The if statement is here to invert the exit code from grep.
|
||||
# grep normally errors if no match is found but we want the opposite.
|
||||
# We invert it so grep fails if a match is found.
|
||||
# Check for lines longer than 100 chars.
|
||||
- if grep '.\{102\}' neofetch; then (exit 1); else (exit 0); fi
|
||||
# There are 3 lines that must be longer than 100 chars.
|
||||
- if (("$(grep '.\{101\}' neofetch | wc -l)" > 3)); then (exit 1); else (exit 0); fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cd tests && ./test.sh; fi
|
||||
|
343
CHANGELOG.md
343
CHANGELOG.md
@@ -5,263 +5,11 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
||||
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [6.0.1] - N/A
|
||||
|
||||
- **ascii**: Fixed bug causing files to not work.
|
||||
- **ascii**: Fixed bug causing files named `ascii` to not load.
|
||||
- **term_font** [kitty]: Fixed bug with empty config.
|
||||
- **get_cols**: Variables are now local. [**@asantam**](https://github.com/asantam)
|
||||
- **man_page**: More consistent arg documentation. [**@xPMo**](https://github.com/xPMo)
|
||||
|
||||
|
||||
## [6.0.0] - 2019-01-08
|
||||
|
||||
<img src="https://i.imgur.com/ZQI2EYz.png" alt="logo" height="100px">
|
||||
|
||||
This release fixes a wide range of bugs and adds some neat new features.
|
||||
Scroll down to "highlights" to see the bigger changes from this release.
|
||||
A big thank you to @konimex, @iandrewt and the contributors below who
|
||||
kept development going during my absence.
|
||||
|
||||
Expect a minor bug fix release sometime this week as I'm sure new bugs
|
||||
will come up. I've done extensive testing but things always slip through.
|
||||
|
||||
**Contributors**
|
||||
|
||||
[**@konimex**](https://github.com/konimex), [**@iandrewt**](https://github.com/iandrewt), [**@arisinfenix**](https://github.com/arisinfenix), [**@xPMo**](https://github.com/xPMo), [**@nero**](https://github.com/nero), [**@alyssais**](https://github.com/alyssais),
|
||||
[**@plgruener**](https://github.com/plgruener), [**@StarryTony**](https://github.com/StarryTony), [**@julianaito**](https://github.com/julianaito), [**@HolyStephano**](https://github.com/HolyStephano),
|
||||
[**@nikitenich**](https://github.com/nikitenich), [**@Appadeia**](https://github.com/Appadeia), [**@marlonn**](https://github.com/marlonn), [**@Snuggle**](https://github.com/dylanaraps/neofetch/commits?author=Snuggle), [**@Phuurl**](https://github.com/Phuurl), [**@erikdubois**](https://github.com/erikdubois)
|
||||
|
||||
|
||||
**Breaking Changes**
|
||||
|
||||
- **Config**: Removed `get_line_break()`.
|
||||
- Alternative: `prin '\n'`
|
||||
- Rationale: fix a bug that's been lingering for a couple of years now.
|
||||
|
||||
**OS**
|
||||
|
||||
- Added support for Bedrock Linux. [**@paradigm**](https://github.com/paradigm)
|
||||
- Added support for Namib GNU/Linux. [**@arisinfenix**](https://github.com/arisinfenix)
|
||||
- Added support for Reborn OS. [**@iandrewt**](https://github.com/iandrewt)
|
||||
- Added support for OpenMandriva Lx. [**@konimex**](https://github.com/konimex)
|
||||
- Added support for Star. [**@arisinfenix**](https://github.com/arisinfenix)
|
||||
- Added support for BlueLight OS.
|
||||
- Added support for Huayra Linux.
|
||||
- Added support for Pentoo.
|
||||
|
||||
**Highlights**
|
||||
|
||||
[ASCII] Added support for command output. You can now use whatever
|
||||
terminal commands you like as the ASCII art.
|
||||
|
||||
```sh
|
||||
# Use fortune and cowsay as ascii art.
|
||||
neofetch --ascii "$(fortune|cowsay -W 30)"
|
||||
|
||||
# use figlet as ascii art.
|
||||
neofetch --ascii "$(figlet -w 30 hello world)"
|
||||
```
|
||||
|
||||
<img src="https://i.imgur.com/ozoXAvz.jpg" alt="scrot" height="400px">
|
||||
|
||||
Added a new "simple" mode. You can now use neofetch for scripting
|
||||
by getting it to output individual info functions in plain text.
|
||||
|
||||
```sh
|
||||
# Example:
|
||||
neofetch uptime --uptime_shorthand tiny
|
||||
> uptime: 32m
|
||||
|
||||
# Example:
|
||||
neofetch uptime disk wm memory
|
||||
> uptime: 33 mins
|
||||
> disk (/): 212G / 235G (96%)
|
||||
> wm: Openbox
|
||||
> memory: 1215MiB / 7881MiB
|
||||
|
||||
# This can be used in bars and scripts like so:
|
||||
memory="$(neofetch memory)"; memory="${memory##*: }"
|
||||
|
||||
# For multiple outputs at once (each line of info in an array):
|
||||
# Much faster than running neofetch multiple times.
|
||||
IFS=$'\n' read -d "" -ra info < <(neofetch memory uptime wm)
|
||||
info=("${info[@]##*: }")
|
||||
```
|
||||
|
||||
Added new image backend [chafa](https://hpjansson.org/chafa/) (`--chafa`)
|
||||
which displays images in the terminal using unicode characters.
|
||||
|
||||
```sh
|
||||
neofetch --chafa ~/Pictures/meow.jpg
|
||||
```
|
||||
|
||||
<img src="https://i.imgur.com/fCOoWlA.jpg" alt="scrot" height="400px">
|
||||
|
||||
|
||||
**Info**
|
||||
|
||||
- **Color Blocks**: Fixed issue where disabling blocks caused an extra newline to appear.
|
||||
- **Color Blocks**: Color blocks now have their padding built in. No more need for `get_line_break()`.
|
||||
- **Song**: Added snippet to display music player.
|
||||
- `[[ $player ]] && prin "Music Player" "$player"`
|
||||
- NOTE: Must have `info "Song" song` enabled.
|
||||
- **Song**: Added support for Netease Cloud.
|
||||
- **Song**: Fixed issues in various players. [**@arisinfenix**](https://github.com/arisinfenix) [**@xPMo**](https://github.com/xPMo)
|
||||
- **Song**: Fixed issues with non-English tags.
|
||||
- **Song**: Fixed issues with broken newlines.
|
||||
- **Song**: Fixed issues with Deadbeef.
|
||||
- **Song**: Fixed issues with `qmmp`.
|
||||
- **Song**: Removed `gpmdp-remote` support (unmaintained/no longer works).
|
||||
- **Shell**: Fixed output for mksh [**@nero**](https://github.com/nero)
|
||||
- **Packages**: Added support for `scoop`. [**@Phuurl**](https://github.com/Phuurl)
|
||||
- **Packages**: Added support for `puyo`. [**@Appadeia**](https://github.com/Appadeia)
|
||||
- **Packages**: Added support for `spm`. [**@Appadeia**](https://github.com/author=Appadeia)
|
||||
- **Packages** [macOS]: Added detection of Nix [**@alyssais**](https://github.com/alyssais)
|
||||
- **Packages**: Fixed packages from pkginfo (pkgutils) not appearing in CRUX/Janus Linux.
|
||||
- **Terminal Font**: Added support for Yakuake [**@plgruener**](https://github.com/plgruener)
|
||||
- **Terminal Font** [Kitty]: Use `kitty --debug-config` to get font information.
|
||||
- **Memory** [Solaris]: Updated memory detection to use pages. [**@konimex**](https://github.com/konimex)
|
||||
- **Memory**: Added option to show memory percentage (`--memory_percent`).
|
||||
- **Model** [OpenBSD]: Added vmm (OpenBSD hypervisor) support [**@julianaito**](https://github.com/julianaito)
|
||||
- **Model** [macOS]: Added VirtualSMC as a new FakeSMC alternative for Hackintosh. [**@nikitenich**](https://github.com/nikitenich)
|
||||
- **WM**: Added detection for FVWM. [**@julianaito**](https://github.com/julianaito)
|
||||
- **WM** [OpenBSD]: Added a new `ps_flags` to correctly detect non-EWMH WMs. [**@julianaito**](https://github.com/julianaito)
|
||||
- **Disk** [OpenBSD]: Added a separate disk array creation using `awk` since one cannot directly use `/dev/...` unless being root or in the `operator` group. [**@julianaito**](https://github.com/julianaito)
|
||||
- **Battery** [OpenBSD]: Improve charge `%` and add status. **Charlène**
|
||||
- **GPU** [AMD]: Remove unnecessary check.
|
||||
- **Public IP**: Added configurable timeout to requests.
|
||||
- **Resolution**: If resolution is not found, don't print anything.
|
||||
|
||||
**ASCII**
|
||||
|
||||
- Fixed issues with various ASCII arts (namely the `_small` ones).
|
||||
- Added support for command output.
|
||||
- `neofetch --ascii "$(fortune|cowsay -W 30)"`
|
||||
- `neofetch --ascii "$(figlet -w 30 hello world)"`
|
||||
- Added small ArcoLinux logo. [**@erikdubois**](https://github.com/erikdubois)
|
||||
- Added new Lubuntu logo. [**@marlonn**](https://github.com/marlonn)
|
||||
- Fixed a bug where ASCII logo changes the terminal foreground color. [**@plgruener**](https://github.com/plgruener)
|
||||
- Fixed a bug when files named `auto` or `ascii` exist.
|
||||
- Do not parse file as ASCII if the source is an image file.
|
||||
|
||||
**Image**
|
||||
|
||||
- Added new image backend [chafa](https://hpjansson.org/chafa/) (`--chafa`).
|
||||
- **w3m**: Fixed issues with URxvt and internal borders.
|
||||
- **w3m**: Fixed issues with URxvt and cursor position.
|
||||
- **w3m**: Fixed issue with `bash 3`.
|
||||
- **macOS**: Unset IFS to get window size. [**@StarryTony**](https://github.com/StarryTony)
|
||||
- **Kitty**: Use `kitty +kitten icat` instead of the deprecated `kitty icat`. [**@HolyStephano**](https://github.com/HolyStephano)
|
||||
- **Kitty**: Update docs. [**@Snuggle**](https://github.com/dylanaraps/neofetch/commits?author=Snuggle)
|
||||
- Thumbnails are high quality again.
|
||||
- Cached thumbnails are now stored with PATH to prevent collision issues.
|
||||
|
||||
## [5.0.0] - 2018-06-18
|
||||
|
||||
<img src="https://i.imgur.com/ZQI2EYz.png" alt="logo" height="100px">
|
||||
|
||||
A lot of the script has been rewritten and all lint errors have been resolved. There's probably a few bugs so the version number has been bumped to `5.0`. Expect a minor release in the coming days to fix any bugs that come up. Thanks to everyone who contributed to this release.
|
||||
|
||||
**Contributors**
|
||||
|
||||
- [**@arisinfenix**](https://github.com/arisinfenix)
|
||||
- [**@iandrewt**](https://github.com/iandrewt)
|
||||
- [**@konimex**](https://github.com/konimex)
|
||||
- [**@MindTooth**](https://github.com/MindTooth)
|
||||
|
||||
**Operating System**
|
||||
|
||||
- Added support for Condres OS. [**@arisinfenix**](https://github.com/arisinfenix)
|
||||
- Added support for RedCore Linux. [**@arisinfenix**](https://github.com/arisinfenix)
|
||||
- Added support for Regata OS. [**@arisinfenix**](https://github.com/arisinfenix)
|
||||
- Added support for ClearOS. [**@arisinfenix**](https://github.com/arisinfenix)
|
||||
- Added support for PureOS.
|
||||
- Added support for Kibojoe Linux.
|
||||
- Added support for SharkLinux.
|
||||
- Added support for Linux Lite.
|
||||
- Added support for macOS 10.14 Mojave. [**@iandrewt**](https://github.com/iandrewt)
|
||||
|
||||
**General**
|
||||
|
||||
- **output**: Added `--json` to output the info in `json`.
|
||||
- **cursor**: Fixed prompt location issues after Neofetch is run.
|
||||
- **macOS**: Fixed neofetch launching XQuartz.
|
||||
- **misc**: Removed `uppercase()`.
|
||||
- **misc**: Removed all instances of `export`.
|
||||
- **misc**: Removed all deprecated options and functions.
|
||||
- **info**: Removed `get_install_date()`.
|
||||
|
||||
**Ascii**
|
||||
|
||||
- Fixed a bug causing Windows 7 ASCII art to not display.
|
||||
- Simplified ASCII art handling.
|
||||
- Updated Funtoo ASCII art.
|
||||
|
||||
**Image**
|
||||
|
||||
- Improved performance of image handling.
|
||||
- Removed `catimg` support (*It didn’t allow us to specify height so we
|
||||
couldn’t accurately place the cursor*).
|
||||
- Fixed `tycat`, `sixel` and `kitty icat` image sizes.
|
||||
- Simplified `w3m-img` code.
|
||||
|
||||
**Screenshot**
|
||||
|
||||
See: https://github.com/dylanaraps/neofetch/issues/1001
|
||||
|
||||
- Removed screenshot functionality.
|
||||
- Removed screenshot upload functionality.
|
||||
|
||||
**Info**
|
||||
|
||||
- **cpu**: Remove extra call to `uname`.
|
||||
- **cpu**: Simplify core calculation.
|
||||
- **disk**: Clean up.
|
||||
- **font**: Fix iTerm2 checking for 2 extra profiles that don't exist. [**@iandrewt**](https://github.com/iandrewt")
|
||||
- **gpu**: Fixed ATI/AMD branding issue.
|
||||
- **gpu**: Removed `glxinfo` usage (*too slow*).
|
||||
- **packages**: Added support for `flatpak`. [**@konimex**](https://github.com/konimex)
|
||||
- **packages**: Added support for `snap`. [**@konimex**](https://github.com/konimex)
|
||||
- **packages**: Added used package managers to output (`Packages: 900
|
||||
(pacman, snap)`).
|
||||
- **packages**: Fixed issues with `pacman` 5.1.
|
||||
- **packages**: Fixed issues with `dpkg`.
|
||||
- **packages**: Removed `find` usage.
|
||||
- **packages**: Removed `ls` usage.
|
||||
- **packages**: Removed `wc -l` usage.
|
||||
- **song**: Added support for `gmusicbrowser`. [**@arisinfenix**](https://github.com/arisinfenix)
|
||||
- **song**: Added support for `SMPlayer`. [**@arisinfenix**](https://github.com/arisinfenix)
|
||||
- **song**: Added support for `Dragon Player`. [**@arisinfenix**](https://github.com/arisinfenix)
|
||||
- **song**: Fixed song detection on macOS.
|
||||
- **song**: Fixed song output on systems using `C` locale.
|
||||
- **song**: Added `mpc_args` to send additional arguments to `mpc`.
|
||||
- **term\_font**: Clean up of config file handling.
|
||||
- **resolution**: Added support for `xwininfo`.
|
||||
|
||||
## [4.0.2] - 2018-05-19
|
||||
|
||||
### This fixes default config issues on Android, AIX, HP-UX and possibly others.
|
||||
|
||||
- [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.
|
||||
|
||||
@@ -279,7 +27,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
|
||||
@@ -365,12 +113,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
|
||||
|
||||
@@ -523,7 +271,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!
|
||||
@@ -651,13 +399,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
|
||||
@@ -737,7 +485,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)
|
||||
@@ -850,7 +598,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.
|
||||
@@ -919,12 +667,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
|
||||
|
||||
@@ -1139,7 +887,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.
|
||||
@@ -1159,7 +907,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.
|
||||
@@ -1243,7 +991,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.
|
||||
@@ -1379,12 +1127,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)**
|
||||
@@ -1434,7 +1182,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
|
||||
@@ -1467,7 +1215,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)
|
||||
@@ -1596,7 +1344,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.
|
||||
@@ -1641,7 +1389,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
|
||||
@@ -1804,7 +1552,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
|
||||
@@ -1971,7 +1719,7 @@ called `fg` which will set the color to your foreground color.
|
||||
[///// ]
|
||||
```
|
||||
|
||||
|
||||
|
||||
## [1.6] - 2016-04-01
|
||||
|
||||
# Neofetch 1.6
|
||||
@@ -2118,7 +1866,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
|
||||
@@ -2212,7 +1960,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
|
||||
@@ -2284,14 +2032,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
|
||||
@@ -2362,7 +2110,7 @@ much faster and cleaner.
|
||||
- Removed `--stdout_subtitles`
|
||||
- Removed `--stdout_title`
|
||||
|
||||
|
||||
|
||||
## [1.2] - 2016-02-17
|
||||
|
||||
# Fetch 1.2
|
||||
@@ -2377,7 +2125,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:
|
||||
@@ -2475,7 +2223,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
|
||||
@@ -2528,7 +2276,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.
|
||||
@@ -2645,7 +2393,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
|
||||
@@ -2805,7 +2553,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
|
||||
@@ -2814,7 +2562,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:
|
||||
@@ -2826,19 +2574,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.
|
||||
@@ -2893,8 +2641,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.
|
||||
@@ -2910,10 +2658,7 @@ Changelog:
|
||||
Let me know if you're having issues.
|
||||
|
||||
|
||||
[Unreleased]: https://github.com/dylanaraps/neofetch/compare/5.0.0...HEAD
|
||||
[5.0.0]: https://github.com/dylanaraps/neofetch/compare/4.0.2...5.0.0
|
||||
[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
|
||||
[Unreleased]: https://github.com/dylanaraps/neofetch/compare/4.0.0...HEAD
|
||||
[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
|
||||
|
@@ -23,15 +23,20 @@
|
||||
and variable names.
|
||||
- Keep lines below `100` characters long.
|
||||
- Use `[[ ]]` for tests.
|
||||
- Quote **EVERYTHING**.
|
||||
- Double Quote **EVERYTHING**.
|
||||
- Don’t use single quotes, except for special cases.
|
||||
|
||||
### ShellCheck
|
||||
|
||||
For your contribution to be accepted, your changes need to pass
|
||||
ShellCheck.
|
||||
|
||||
Run ShellCheck with the following command:
|
||||
|
||||
```sh
|
||||
shellcheck neofetch
|
||||
# Why do we exclude numerous tests?
|
||||
# See: https://github.com/dylanaraps/neofetch/wiki/Shellcheck-Exclusions
|
||||
shellcheck neofetch -e SC1090,SC2009,SC2012,SC2016,SC2034,SC2128,SC2153,SC2154,SC2178,SC2010,SC1004,SC1091,SC1117
|
||||
```
|
||||
|
||||
**Note**: If you have trouble installing ShellCheck. You can open a pull
|
||||
@@ -53,8 +58,6 @@ request on the repo and our Travis.ci hook will run ShellCheck for you.
|
||||
- Use `bash`'s built-in syntax (`file="$(< /path/to/file.txt)")`).
|
||||
- Don’t use `grep "pattern" | awk '{ printf }'`.
|
||||
- Use `awk '/pattern/ { printf }'`
|
||||
- Don’t use `wc`.
|
||||
- Use `${#var}` or `${#arr[@]}`.
|
||||
|
||||
|
||||
### If Statements
|
||||
|
48
README.md
48
README.md
@@ -1,15 +1,16 @@
|
||||
<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>
|
||||
<h1 align="center"><img src="https://i.imgur.com/JFxwJtU.png" alt="logo" height="50px"></h1>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://discord.gg/BtnTPFF"><img src="https://img.shields.io/discord/440354555197128704.svg"></a>
|
||||
<a href="https://travis-ci.org/dylanaraps/neofetch"><img src="https://travis-ci.org/dylanaraps/neofetch.svg?branch=master"></a>
|
||||
<a href="./LICENSE.md"><img src="https://img.shields.io/badge/license-MIT-blue.svg"></a>
|
||||
<a href="https://github.com/dylanaraps/neofetch/releases"><img src="https://img.shields.io/github/release/dylanaraps/neofetch.svg"></a>
|
||||
<a href="https://repology.org/metapackage/neofetch"><img src="https://repology.org/badge/tiny-repos/neofetch.svg" alt="Packaging status"></a>
|
||||
<a href="https://www.patreon.com/dyla"><img src="https://img.shields.io/badge/donate-patreon-yellow.svg"></a>
|
||||
</p>
|
||||
|
||||
<img src="https://i.imgur.com/GFmC5Ad.png" alt="neofetch" align="right" height="240px">
|
||||
<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>
|
||||
|
||||
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.
|
||||
|
||||
@@ -17,11 +18,42 @@ 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.
|
||||
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>
|
||||
|
||||
<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)\]
|
||||
|
||||
## Articles
|
||||
|
||||
- https://lamiradadelreplicante.com/2016/05/15/la-informacion-de-tu-sistema-en-la-terminal-con-neofetch/
|
||||
- https://linuxconfig.org/how-to-display-system-information-with-neofetch
|
||||
- https://www.2daygeek.com/neofetch-display-linux-systems-information-ascii-distribution-logo-terminal/
|
||||
- https://www.cyberciti.biz/howto/neofetch-awesome-system-info-bash-script-for-linux-unix-macos/
|
||||
- https://www.lffl.org/2016/11/neofetch-le-informazioni-sistema-sul-terminale-stile.html
|
||||
- https://www.maketecheasier.com/display-system-information-neofetch-linux/
|
||||
- https://www.omgubuntu.co.uk/2016/11/neofetch-terminal-system-info-app
|
||||
- https://www.omgubuntu.co.uk/2016/12/cli-system-tool-neofetch-2-0-released
|
||||
- https://www.omgubuntu.co.uk/2017/01/neofetch-3-0-released
|
||||
- https://www.ostechnix.com/neofetch-display-linux-systems-information/
|
||||
- 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
|
||||
|
||||
|
||||
### More: \[[Dependencies](https://github.com/dylanaraps/neofetch/wiki/Dependencies)\] \[[Installation](https://github.com/dylanaraps/neofetch/wiki/Installation)\] \[[Wiki](https://github.com/dylanaraps/neofetch/wiki)\]
|
||||
## Thanks
|
||||
|
||||
- [Contributors](https://github.com/dylanaraps/neofetch/contributors)
|
||||
- [Packagers](https://github.com/dylanaraps/neofetch/issues/115)
|
||||
- [Screenfetch](https://github.com/KittyKatt/screenFetch)
|
||||
- [ufetch](https://github.com/jschx/ufetch)
|
||||
|
||||
|
||||
## Donate
|
||||
|
||||
Donations will allow me to spend more time working on `neofetch`.
|
||||
|
||||
If you like `neofetch` and want to give back in some way you can donate here: **https://patreon.com/dyla**
|
||||
|
86
neofetch.1
86
neofetch.1
@@ -1,10 +1,10 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.8.
|
||||
.TH NEOFETCH "1" "January 2019" "Neofetch 6.0.1" "User Commands"
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6.
|
||||
.TH NEOFETCH "1" "May 2018" "Neofetch 4.0.1" "User Commands"
|
||||
.SH NAME
|
||||
Neofetch \- A fast, highly customizable system info script
|
||||
.SH SYNOPSIS
|
||||
.B neofetch
|
||||
\fI\,func_name --option "value" --option "value"\/\fR
|
||||
\fI\,--option "value" --option "value"\/\fR
|
||||
.SH DESCRIPTION
|
||||
Neofetch is a CLI system information tool written in BASH. Neofetch
|
||||
displays information about your system next to an image, your OS logo,
|
||||
@@ -14,35 +14,12 @@ NOTE: Every launch flag has a config option.
|
||||
.SH OPTIONS
|
||||
.SS "INFO:"
|
||||
.TP
|
||||
func_name
|
||||
Specify a function name (second part of info() from config) to
|
||||
quickly display only that function's information.
|
||||
.IP
|
||||
Example: neofetch uptime \fB\-\-uptime_shorthand\fR tiny
|
||||
.IP
|
||||
Example: neofetch uptime disk wm memory
|
||||
.IP
|
||||
This can be used in bars and scripts like so:
|
||||
.IP
|
||||
memory="$(neofetch memory)"; memory="${memory##*: }"
|
||||
.IP
|
||||
For multiple outputs at once (each line of info in an array):
|
||||
.IP
|
||||
IFS=$'\en' read \fB\-d\fR "" \fB\-ra\fR info < <(neofetch memory uptime wm)
|
||||
.IP
|
||||
info=("${info[@]##*: }")
|
||||
.TP
|
||||
\fB\-\-disable\fR infoname
|
||||
Allows you to disable an info line from appearing
|
||||
in the output. 'infoname' is the function name from the
|
||||
\&'print_info()' function inside the config file.
|
||||
For example: 'info "Memory" memory' would be '\-\-disable memory'
|
||||
in the output.
|
||||
.IP
|
||||
NOTE: You can supply multiple args. eg. 'neofetch \fB\-\-disable\fR cpu gpu'
|
||||
.TP
|
||||
\fB\-\-package_managers\fR on/tiny/off
|
||||
Hide/Show Package Manager names . (on, tiny, off)
|
||||
.TP
|
||||
\fB\-\-os_arch\fR on/off
|
||||
Hide/Show OS architecture.
|
||||
.TP
|
||||
@@ -79,8 +56,8 @@ NOTE: This only works on Linux and BSD.
|
||||
NOTE: For FreeBSD and NetBSD\-based systems, you need to enable
|
||||
coretemp kernel module. This only supports newer Intel processors.
|
||||
.TP
|
||||
\fB\-\-distro_shorthand\fR on/tiny/off
|
||||
Shorten the output of distro (on, tiny, off)
|
||||
\fB\-\-distro_shorthand\fR on/off
|
||||
Shorten the output of distro (tiny, on, off)
|
||||
.IP
|
||||
NOTE: This option won't work in Windows (Cygwin)
|
||||
.TP
|
||||
@@ -89,8 +66,8 @@ Shorten the output of kernel
|
||||
.IP
|
||||
NOTE: This option won't work in BSDs (except PacBSD and PC\-BSD)
|
||||
.TP
|
||||
\fB\-\-uptime_shorthand\fR on/tiny/off
|
||||
Shorten the output of uptime (on, tiny, off)
|
||||
\fB\-\-uptime_shorthand\fR on/off
|
||||
Shorten the output of uptime (tiny, on, off)
|
||||
.TP
|
||||
\fB\-\-refresh_rate\fR on/off
|
||||
Whether to display the refresh rate of each monitor
|
||||
@@ -138,21 +115,21 @@ Takes: name, mount, dir
|
||||
\fB\-\-ip_host\fR url
|
||||
URL to query for public IP
|
||||
.TP
|
||||
\fB\-\-ip_timeout\fR int
|
||||
Public IP timeout (in seconds).
|
||||
.TP
|
||||
\fB\-\-song_format\fR format
|
||||
Print the song data in a specific format (see config file).
|
||||
.TP
|
||||
\fB\-\-song_shorthand\fR on/off
|
||||
Print the Artist/Album/Title on separate lines.
|
||||
.TP
|
||||
\fB\-\-memory_percent\fR on/off
|
||||
Display memory percentage.
|
||||
.TP
|
||||
\fB\-\-music_player\fR player\-name
|
||||
Manually specify a player to use.
|
||||
Available values are listed in the config file
|
||||
.TP
|
||||
\fB\-\-install_time\fR on/off
|
||||
Enable/Disable showing the time in Install Date output.
|
||||
.TP
|
||||
\fB\-\-install_time_format\fR 12h/24h
|
||||
Set time format in Install Date to be 12 hour or 24 hour.
|
||||
.SS "TEXT FORMATTING:"
|
||||
.TP
|
||||
\fB\-\-colors\fR x x x x x x
|
||||
@@ -167,9 +144,6 @@ Character to use when underlining title
|
||||
.TP
|
||||
\fB\-\-bold\fR on/off
|
||||
Enable/Disable bold text
|
||||
.TP
|
||||
\fB\-\-separator\fR string
|
||||
Changes the default ':' separator to the specified string.
|
||||
.SS "COLOR BLOCKS:"
|
||||
.TP
|
||||
\fB\-\-color_blocks\fR on/off
|
||||
@@ -217,24 +191,22 @@ Possible values: bar, infobar, barinfo, off
|
||||
.TP
|
||||
\fB\-\-backend\fR backend
|
||||
Which image backend to use.
|
||||
Possible values: 'ascii', 'caca', 'chafa', 'jp2a', 'iterm2',
|
||||
\&'off', 'sixel', 'tycat', 'w3m'
|
||||
Possible values: 'ascii', 'caca', 'catimg', 'jp2a', 'iterm2', 'off',
|
||||
\&'sixel', 'tycat', 'w3m'
|
||||
.TP
|
||||
\fB\-\-source\fR source
|
||||
Which image or ascii file to use.
|
||||
Possible values: 'auto', 'ascii', 'wallpaper', '/path/to/img',
|
||||
\&'/path/to/ascii', '/path/to/dir/', 'command output' [ascii]
|
||||
\&'/path/to/ascii', '/path/to/dir/'
|
||||
.TP
|
||||
\fB\-\-ascii\fR source
|
||||
Shortcut to use 'ascii' backend.
|
||||
.IP
|
||||
NEW: neofetch \fB\-\-ascii\fR "$(fortune | cowsay \fB\-W\fR 30)"
|
||||
.TP
|
||||
\fB\-\-caca\fR source
|
||||
Shortcut to use 'caca' backend.
|
||||
.TP
|
||||
\fB\-\-chafa\fR source
|
||||
Shortcut to use 'chafa' backend.
|
||||
\fB\-\-catimg\fR source
|
||||
Shortcut to use 'catimg' backend.
|
||||
.TP
|
||||
\fB\-\-iterm2\fR source
|
||||
Shortcut to use 'iterm2' backend.
|
||||
@@ -261,7 +233,7 @@ Shortcut to use 'tycat' backend.
|
||||
Shortcut to use 'w3m' backend.
|
||||
.TP
|
||||
\fB\-\-off\fR
|
||||
Shortcut to use 'off' backend (Disable ascii art).
|
||||
Shortcut to use 'off' backend.
|
||||
.IP
|
||||
NOTE: 'source; can be any of the following: 'auto', 'ascii', 'wallpaper', '/path/to/img',
|
||||
\&'/path/to/ascii', '/path/to/dir/'
|
||||
@@ -292,6 +264,8 @@ Whether or not to bold the ascii logo.
|
||||
.TP
|
||||
\fB\-L\fR, \fB\-\-logo\fR
|
||||
Hide the info text and only show the ascii logo.
|
||||
.IP
|
||||
Possible values: bar, infobar, barinfo, off
|
||||
.SS "IMAGE:"
|
||||
.TP
|
||||
\fB\-\-loop\fR
|
||||
@@ -331,6 +305,19 @@ 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
|
||||
@@ -339,9 +326,6 @@ 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
|
||||
|
7
tests/test.sh
Executable file
7
tests/test.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Run all tests.
|
||||
|
||||
./test_misc.sh
|
||||
|
||||
[[ -f /tmp/err ]] || exit 0 && { rm /tmp/err; exit 1; }
|
32
tests/test_misc.sh
Executable file
32
tests/test_misc.sh
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Test misc functions.
|
||||
|
||||
source test_util.sh
|
||||
source ../neofetch
|
||||
|
||||
# Tests only work on Linux for now.
|
||||
os="Linux"
|
||||
|
||||
|
||||
test_convert_time() {
|
||||
# 24 hour time.
|
||||
result="$(convert_time "2016" "04" "14" "23:50")"
|
||||
assert_equals "$result" "Thu 14 Apr 2016 23:50"
|
||||
|
||||
# 12 hour time.
|
||||
install_time_format="12h"
|
||||
result="$(convert_time "2016" "04" "14" "23:50")"
|
||||
assert_equals "$result" "Thu 14 Apr 2016 11:50 PM"
|
||||
}
|
||||
|
||||
test_get_ppid() {
|
||||
result="$(trim "$(get_ppid "1")")"
|
||||
assert_equals "$result" "0"
|
||||
}
|
||||
|
||||
|
||||
printf "%s\\n" "Test MISC functions."
|
||||
|
||||
test_convert_time
|
||||
test_get_ppid
|
11
tests/test_util.sh
Executable file
11
tests/test_util.sh
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Test util functions.
|
||||
|
||||
assert_equals() {
|
||||
# Test equality.
|
||||
local status
|
||||
[[ "$1" == "$2" ]] && status="✔"
|
||||
printf "%s\\n" " ${status:-✖} : ${FUNCNAME[1]}"
|
||||
[[ "$1" == "$2" ]] || { :>/tmp/err; return 1; } && return 0
|
||||
}
|
Reference in New Issue
Block a user