Compare commits

...

18 Commits

Author SHA1 Message Date
Dylan Araps
5b301c773b docs: update 2019-01-15 19:58:32 +02:00
Dylan Araps
68645339d3 general: fix image sizing in VTE terminals. 2019-01-15 19:56:37 +02:00
Dylan Araps
415ef5d4ae misc: Quote all the things 2019-01-09 10:43:22 +02:00
Dylan Araps
acc8103dde fixed travis 2019-01-09 08:59:23 +02:00
Dylan Araps
78e0fa3212 docs: update 2019-01-09 08:50:57 +02:00
Dylan Araps
64188697b8 ascii: Fixed bug causing files named ascii to not work. 2019-01-09 08:50:01 +02:00
Dylan Araps
9431a593f6 ascii: Fixed bug causing ascii files to not work. 2019-01-09 08:48:07 +02:00
Dylan Araps
23fc5aff3d docs: update 2019-01-09 08:00:16 +02:00
Dylan Araps
7df1d0e3ef misc: cleanup 2019-01-09 07:50:44 +02:00
black
228fb778cb Merge pull request #1161 from asantam/master
Made variables local in get_cols function
2019-01-09 07:34:15 +02:00
black
3c07884032 Merge pull request #1162 from xPMo/on_tiny_off
Where supported, keep on/tiny/off flags in the same order
2019-01-09 07:30:32 +02:00
xPMo
766113a0c2 manpage: add "tiny" where supported 2019-01-08 19:49:07 -06:00
xPMo
661d003be2 order options "on, tiny, off" 2019-01-08 19:47:31 -06:00
Andres Santamaria Artigas
2ecd8102d0 Made variables local in get_cols function
The variables blocks, blocks2, and cols were not set as local in the
get_cols function, which made neofetch print whatever value they had
before showing the colorblocks. This commit makes these variables local
so the output doesn't get affected if they are set beforehand.
2019-01-08 20:32:34 -05:00
Dylan Araps
b6b320a75a docs: update 2019-01-08 21:39:07 +02:00
Dylan Araps
b49ecb68f8 term_font [kitty]: Fix bug with empty config 2019-01-08 20:53:00 +02:00
Dylan Araps
ca9d161bc9 version: bump 2019-01-08 18:40:32 +02:00
Dylan Araps
7a64ce22a8 docs: update 2019-01-08 18:39:59 +02:00
4 changed files with 113 additions and 140 deletions

View File

@@ -5,13 +5,40 @@ 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/) 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). 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"> <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** **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) [**@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** **OS**
@@ -26,7 +53,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
**Highlights** **Highlights**
- [ASCII] Added support for command output. You can now use whatever terminal commands you like as the ASCII art. [ASCII] Added support for command output. You can now use whatever
terminal commands you like as the ASCII art.
```sh ```sh
# Use fortune and cowsay as ascii art. # Use fortune and cowsay as ascii art.
@@ -38,7 +66,8 @@ neofetch --ascii "$(figlet -w 30 hello world)"
<img src="https://i.imgur.com/ozoXAvz.jpg" alt="scrot" height="400px"> <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. Added a new "simple" mode. You can now use neofetch for scripting
by getting it to output individual info functions in plain text.
```sh ```sh
# Example: # Example:
@@ -61,8 +90,20 @@ IFS=$'\n' read -d "" -ra info < <(neofetch memory uptime wm)
info=("${info[@]##*: }") 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** **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. - **Song**: Added snippet to display music player.
- `[[ $player ]] && prin "Music Player" "$player"` - `[[ $player ]] && prin "Music Player" "$player"`
- NOTE: Must have `info "Song" song` enabled. - NOTE: Must have `info "Song" song` enabled.
@@ -82,6 +123,7 @@ info=("${info[@]##*: }")
- **Terminal Font**: Added support for Yakuake [**@plgruener**](https://github.com/plgruener) - **Terminal Font**: Added support for Yakuake [**@plgruener**](https://github.com/plgruener)
- **Terminal Font** [Kitty]: Use `kitty --debug-config` to get font information. - **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** [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** [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) - **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**: Added detection for FVWM. [**@julianaito**](https://github.com/julianaito)
@@ -89,9 +131,12 @@ info=("${info[@]##*: }")
- **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) - **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** - **Battery** [OpenBSD]: Improve charge `%` and add status. **Charlène**
- **GPU** [AMD]: Remove unnecessary check. - **GPU** [AMD]: Remove unnecessary check.
- **Public IP**: Added configurable timeout to requests.
- **Resolution**: If resolution is not found, don't print anything.
**ASCII** **ASCII**
- Fixed issues with various ASCII arts (namely the `_small` ones).
- Added support for command output. - Added support for command output.
- `neofetch --ascii "$(fortune|cowsay -W 30)"` - `neofetch --ascii "$(fortune|cowsay -W 30)"`
- `neofetch --ascii "$(figlet -w 30 hello world)"` - `neofetch --ascii "$(figlet -w 30 hello world)"`
@@ -103,9 +148,14 @@ info=("${info[@]##*: }")
**Image** **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) - **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**: 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) - **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. - Cached thumbnails are now stored with PATH to prevent collision issues.
## [5.0.0] - 2018-06-18 ## [5.0.0] - 2018-06-18

View File

@@ -26,37 +26,3 @@ Neofetch supports almost 150 different operating systems. From Linux to Windows,
### More: \[[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
- 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
- https://www.linuxuprising.com/2018/05/display-system-information-on-linux.html
- https://esgeeks.com/neofetch-informacion-sistema-linux/
## 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 allow me to spend more time working on `neofetch` and my other Open Source projects. If you like `neofetch` and want to give back in some way you can donate at the links below.
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=V7QNJNKS3WYVS"><img src="https://img.shields.io/badge/donate-paypal-yellow.svg"></a> <a href="https://www.patreon.com/dyla"><img src="https://img.shields.io/badge/donate-patreon-yellow.svg"> </a><a href="https://liberapay.com/2211/"><img src="https://img.shields.io/badge/donate-liberapay-yellow.svg"></a>

147
neofetch
View File

@@ -28,7 +28,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE. # SOFTWARE.
version="6.0.0" version="6.0.1"
bash_version="${BASH_VERSION/.*}" bash_version="${BASH_VERSION/.*}"
sys_locale="${LANG:-C}" sys_locale="${LANG:-C}"
@@ -76,7 +76,7 @@ print_info() {
# info "Battery" battery # info "Battery" battery
# info "Font" font # info "Font" font
# info "Song" song # info "Song" song
# [[ $player ]] && prin "Music Player" "$player" # [[ "$player" ]] && prin "Music Player" "$player"
# info "Local IP" local_ip # info "Local IP" local_ip
# info "Public IP" public_ip # info "Public IP" public_ip
# info "Users" users # info "Users" users
@@ -108,7 +108,7 @@ kernel_shorthand="on"
# Shorten the output of the distro function # Shorten the output of the distro function
# #
# Default: 'off' # Default: 'off'
# Values: 'on', 'off', 'tiny' # Values: 'on', 'tiny', 'off'
# Flag: --distro_shorthand # Flag: --distro_shorthand
# Supports: Everything except Windows and Haiku # Supports: Everything except Windows and Haiku
distro_shorthand="off" distro_shorthand="off"
@@ -132,13 +132,13 @@ os_arch="on"
# Shorten the output of the uptime function # Shorten the output of the uptime function
# #
# Default: 'on' # Default: 'on'
# Values: 'on', 'off', 'tiny' # Values: 'on', 'tiny', 'off'
# Flag: --uptime_shorthand # Flag: --uptime_shorthand
# #
# Example: # Example:
# on: '2 days, 10 hours, 3 mins' # on: '2 days, 10 hours, 3 mins'
# off: '2 days, 10 hours, 3 minutes'
# tiny: '2d 10h 3m' # tiny: '2d 10h 3m'
# off: '2 days, 10 hours, 3 minutes'
uptime_shorthand="on" uptime_shorthand="on"
@@ -849,7 +849,7 @@ get_distro() {
case "$os" in case "$os" in
"Linux" | "BSD" | "MINIX") "Linux" | "BSD" | "MINIX")
if [[ -f /bedrock/etc/bedrock-release && $PATH == */bedrock/cross/* ]]; then if [[ -f "/bedrock/etc/bedrock-release" && "$PATH" == */bedrock/cross/* ]]; then
case "$distro_shorthand" in case "$distro_shorthand" in
"on" | "tiny") distro="Bedrock Linux" ;; "on" | "tiny") distro="Bedrock Linux" ;;
*) distro="$(< /bedrock/etc/bedrock-release)" *) distro="$(< /bedrock/etc/bedrock-release)"
@@ -906,7 +906,7 @@ get_distro() {
# Chrome OS doesn't conform to the /etc/*-release standard. # Chrome OS doesn't conform to the /etc/*-release standard.
# While the file is a series of variables they can't be sourced # While the file is a series of variables they can't be sourced
# by the shell since the values aren't quoted. # by the shell since the values aren't quoted.
elif [[ -f /etc/lsb-release && "$(< /etc/lsb-release)" == *CHROMEOS* ]]; then elif [[ -f "/etc/lsb-release" && "$(< /etc/lsb-release)" == *CHROMEOS* ]]; then
distro="$(awk -F '=' '/NAME|VERSION/ {printf $2 " "}' /etc/lsb-release)" distro="$(awk -F '=' '/NAME|VERSION/ {printf $2 " "}' /etc/lsb-release)"
elif [[ -f "/etc/os-release" || \ elif [[ -f "/etc/os-release" || \
@@ -938,7 +938,7 @@ get_distro() {
distro="${distro/DragonFly/DragonFlyBSD}" distro="${distro/DragonFly/DragonFlyBSD}"
# Workarounds for FreeBSD based distros. # Workarounds for FreeBSD based distros.
[[ -f "/etc/pcbsd-lang" ]] && distro="PCBSD" [[ -f "/etc/pcbsd-lang" ]] && distro="PCBSD"
[[ -f "/etc/trueos-lang" ]] && distro="TrueOS" [[ -f "/etc/trueos-lang" ]] && distro="TrueOS"
# /etc/pacbsd-release is an empty file # /etc/pacbsd-release is an empty file
@@ -946,15 +946,14 @@ get_distro() {
fi fi
fi fi
if [[ "$(< /proc/version)" == *"Microsoft"* || if [[ "$(< /proc/version)" == *Microsoft* || "$kernel_version" == *Microsoft* ]]; then
"$kernel_version" == *"Microsoft"* ]]; then
case "$distro_shorthand" in case "$distro_shorthand" in
"on") distro+=" [Windows 10]" ;; "on") distro+=" [Windows 10]" ;;
"tiny") distro="Windows 10" ;; "tiny") distro="Windows 10" ;;
*) distro+=" on Windows 10" ;; *) distro+=" on Windows 10" ;;
esac esac
elif [[ "$(< /proc/version)" == *"chrome-bot"* || -f "/dev/cros_ec" ]]; then elif [[ "$(< /proc/version)" == *chrome-bot* || -f "/dev/cros_ec" ]]; then
case "$distro_shorthand" in case "$distro_shorthand" in
"on") distro+=" [Chrome OS]" ;; "on") distro+=" [Chrome OS]" ;;
"tiny") distro="Chrome OS" ;; "tiny") distro="Chrome OS" ;;
@@ -1059,15 +1058,15 @@ get_model() {
if [[ -d "/system/app/" && -d "/system/priv-app" ]]; then if [[ -d "/system/app/" && -d "/system/priv-app" ]]; then
model="$(getprop ro.product.brand) $(getprop ro.product.model)" model="$(getprop ro.product.brand) $(getprop ro.product.model)"
elif [[ -f /sys/devices/virtual/dmi/id/product_name || elif [[ -f "/sys/devices/virtual/dmi/id/product_name" ||
-f /sys/devices/virtual/dmi/id/product_version ]]; then -f "/sys/devices/virtual/dmi/id/product_version" ]]; then
model="$(< /sys/devices/virtual/dmi/id/product_name)" model="$(< /sys/devices/virtual/dmi/id/product_name)"
model+=" $(< /sys/devices/virtual/dmi/id/product_version)" model+=" $(< /sys/devices/virtual/dmi/id/product_version)"
elif [[ -f /sys/firmware/devicetree/base/model ]]; then elif [[ -f "/sys/firmware/devicetree/base/model" ]]; then
model="$(< /sys/firmware/devicetree/base/model)" model="$(< /sys/firmware/devicetree/base/model)"
elif [[ -f /tmp/sysinfo/model ]]; then elif [[ -f "/tmp/sysinfo/model" ]]; then
model="$(< /tmp/sysinfo/model)" model="$(< /tmp/sysinfo/model)"
fi fi
;; ;;
@@ -1293,7 +1292,7 @@ get_packages() {
tot() { IFS=$'\n' read -d "" -ra pkgs < <("$@");((packages+="${#pkgs[@]}"));pac "${#pkgs[@]}"; } tot() { IFS=$'\n' read -d "" -ra pkgs < <("$@");((packages+="${#pkgs[@]}"));pac "${#pkgs[@]}"; }
# Redefine tot() for Bedrock Linux. # Redefine tot() for Bedrock Linux.
[[ -f /bedrock/etc/bedrock-release && $PATH == */bedrock/cross/* ]] && { [[ -f "/bedrock/etc/bedrock-release" && "$PATH" == */bedrock/cross/* ]] && {
tot() { tot() {
IFS=$'\n' read -d "" -ra pkgs < <(for s in $(brl list); do strat -r "$s" "$@"; done) IFS=$'\n' read -d "" -ra pkgs < <(for s in $(brl list); do strat -r "$s" "$@"; done)
((packages+="${#pkgs[@]}")) ((packages+="${#pkgs[@]}"))
@@ -1839,8 +1838,7 @@ get_cpu() {
fi fi
# Get CPU temp. # Get CPU temp.
[[ -f "$temp_dir" ]] && \ [[ -f "$temp_dir" ]] && deg="$(($(< "$temp_dir") * 100 / 10000))"
deg="$(($(< "$temp_dir") * 100 / 10000))"
# Get CPU cores. # Get CPU cores.
case "$cpu_cores" in case "$cpu_cores" in
@@ -2103,9 +2101,7 @@ get_gpu() {
# Checking the first two array elements should # Checking the first two array elements should
# be safe since there won't be 2 intel outputs if # be safe since there won't be 2 intel outputs if
# there's a dedicated GPU in play. # there's a dedicated GPU in play.
[[ "${gpus[0]}" == *Intel* && \ [[ "${gpus[0]}" == *Intel* && "${gpus[1]}" == *Intel* ]] && unset -v "gpus[0]"
"${gpus[1]}" == *Intel* ]] && \
unset -v "gpus[0]"
for gpu in "${gpus[@]}"; do for gpu in "${gpus[@]}"; do
# GPU shorthand tests. # GPU shorthand tests.
@@ -2355,7 +2351,7 @@ get_memory() {
esac esac
[[ $memory_percent == on ]] && ((mem_perc=mem_used * 100 / mem_total)) [[ "$memory_percent" == "on" ]] && ((mem_perc=mem_used * 100 / mem_total))
memory="${mem_used}${mem_label:-MiB} / ${mem_total}${mem_label:-MiB} ${mem_perc:+(${mem_perc}%)}" memory="${mem_used}${mem_label:-MiB} / ${mem_total}${mem_label:-MiB} ${mem_perc:+(${mem_perc}%)}"
@@ -2409,8 +2405,7 @@ get_song() {
player="$(ps aux | awk -v pattern="(${players:1})" \ player="$(ps aux | awk -v pattern="(${players:1})" \
'!/ awk / && !/iTunesHelper/ && match($0,pattern){print substr($0,RSTART,RLENGTH); exit}')" '!/ awk / && !/iTunesHelper/ && match($0,pattern){print substr($0,RSTART,RLENGTH); exit}')"
[[ "$music_player" && "$music_player" != "auto" ]] && \ [[ "$music_player" && "$music_player" != "auto" ]] && player="$music_player"
player="$music_player"
get_song_dbus() { get_song_dbus() {
# Multiple players use an almost identical dbus command to get the information. # Multiple players use an almost identical dbus command to get the information.
@@ -2618,7 +2613,7 @@ get_resolution() {
esac esac
resolution="${resolution%,*}" resolution="${resolution%,*}"
[[ -z ${resolution/x} ]] && resolution= [[ -z "${resolution/x}" ]] && resolution=
} }
get_style() { get_style() {
@@ -2797,11 +2792,8 @@ get_term() {
esac esac
# Most likely TosWin2 on FreeMiNT - quick check # Most likely TosWin2 on FreeMiNT - quick check
[[ "$TERM" == "tw52" || "$TERM" == "tw100" ]] && \ [[ "$TERM" == "tw52" || "$TERM" == "tw100" ]] && term="TosWin2"
term="TosWin2" [[ "$SSH_CONNECTION" ]] && term="$SSH_TTY"
[[ "$SSH_CONNECTION" ]] && \
term="$SSH_TTY"
# Check $PPID for terminal emulator. # Check $PPID for terminal emulator.
while [[ -z "$term" ]]; do while [[ -z "$term" ]]; do
@@ -2921,6 +2913,8 @@ END
"kitty"*) "kitty"*)
kitty_config="$(kitty --debug-config)" kitty_config="$(kitty --debug-config)"
[[ "$kitty_config" != *font_family* ]] && return
term_font_size="${kitty_config/*font_size}" term_font_size="${kitty_config/*font_size}"
term_font_size="${term_font_size/$'\n'*}" term_font_size="${term_font_size/$'\n'*}"
term_font="${kitty_config/*font_family}" term_font="${kitty_config/*font_family}"
@@ -2965,7 +2959,7 @@ END
mateterm_config="/tmp/mateterm.cfg" mateterm_config="/tmp/mateterm.cfg"
# Ensure /tmp exists and we do not overwrite anything. # Ensure /tmp exists and we do not overwrite anything.
if [[ -d /tmp && ! -f "$mateterm_config" ]]; then if [[ -d "/tmp" && ! -f "$mateterm_config" ]]; then
mate-terminal --save-config="$mateterm_config" mate-terminal --save-config="$mateterm_config"
role="$(xprop -id "${WINDOWID}" WM_WINDOW_ROLE)" role="$(xprop -id "${WINDOWID}" WM_WINDOW_ROLE)"
@@ -3030,7 +3024,7 @@ END
# On Linux we can get the exact path to the running binary through the procfs # On Linux we can get the exact path to the running binary through the procfs
# (in case `st` is launched from outside of $PATH) on other systems we just # (in case `st` is launched from outside of $PATH) on other systems we just
# have to guess and assume `st` is invoked from somewhere in the users $PATH # have to guess and assume `st` is invoked from somewhere in the users $PATH
[[ -L /proc/$parent/exe ]] && binary="/proc/$parent/exe" || binary="$(type -p st)" [[ -L "/proc/$parent/exe" ]] && binary="/proc/$parent/exe" || binary="$(type -p st)"
# Grep the output of strings on the `st` binary for anything that looks vaguely # Grep the output of strings on the `st` binary for anything that looks vaguely
# like a font definition. NOTE: There is a slight limitation in this approach. # like a font definition. NOTE: There is a slight limitation in this approach.
@@ -3083,8 +3077,7 @@ END
term_font="$(trim "${term_font/*"faceName:"}")" term_font="$(trim "${term_font/*"faceName:"}")"
# xft: isn't required at the beginning so we prepend it if it's missing # xft: isn't required at the beginning so we prepend it if it's missing
[[ "${term_font:0:1}" != "-" && \ [[ "${term_font:0:1}" != "-" && "${term_font:0:4}" != "xft:" ]] && \
"${term_font:0:4}" != "xft:" ]] && \
term_font="xft:$term_font" term_font="xft:$term_font"
# Xresources has two different font formats, this checks which # Xresources has two different font formats, this checks which
@@ -3357,6 +3350,8 @@ get_gpu_driver() {
} }
get_cols() { get_cols() {
local blocks blocks2 cols
if [[ "$color_blocks" == "on" ]]; then if [[ "$color_blocks" == "on" ]]; then
# Convert the width to space chars. # Convert the width to space chars.
printf -v block_width "%${block_width}s" printf -v block_width "%${block_width}s"
@@ -3410,7 +3405,7 @@ image_backend() {
{ image_backend="ascii"; err "Image: Imagemagick not found, falling back to ascii mode."; } { image_backend="ascii"; err "Image: Imagemagick not found, falling back to ascii mode."; }
case "${image_backend:-off}" in case "${image_backend:-off}" in
"ascii") get_ascii ;; "ascii") print_ascii ;;
"off") image_backend="off" ;; "off") image_backend="off" ;;
"caca" | "chafa" | "jp2a" | "iterm2" | "termpix" |\ "caca" | "chafa" | "jp2a" | "iterm2" | "termpix" |\
@@ -3441,7 +3436,7 @@ image_backend() {
err "Image: Valid backends are: 'ascii', 'caca', 'chafa', 'jp2a', 'iterm2', 'kitty', err "Image: Valid backends are: 'ascii', 'caca', 'chafa', 'jp2a', 'iterm2', 'kitty',
'off', 'sixel', 'pixterm', 'termpix', 'tycat', 'w3m')" 'off', 'sixel', 'pixterm', 'termpix', 'tycat', 'w3m')"
err "Image: Falling back to ascii mode." err "Image: Falling back to ascii mode."
get_ascii print_ascii
;; ;;
esac esac
@@ -3449,13 +3444,14 @@ image_backend() {
[[ "$image_backend" != "off" ]] && printf '\e[%sA\e[9999999D' "${lines:-0}" [[ "$image_backend" != "off" ]] && printf '\e[%sA\e[9999999D' "${lines:-0}"
} }
get_ascii() { print_ascii() {
[[ ! "$image_source" =~ (ascii|auto) ]] && if [[ -f "$image_source" && ! "$image_source" =~ (png|jpg|jpeg|jpe|svg|gif) ]]; then
if [[ -f "$image_source" && ! "$image_source" =~ (png|jpg|jpeg|jpe|svg|gif) ]]; then ascii_data="$(< "$image_source")"
ascii_data="$(< "$image_source")" elif [[ "$image_source" == "ascii" || $image_source == auto ]]; then
else :
ascii_data="$image_source" else
fi ascii_data="$image_source"
fi
# Set locale to get correct padding. # Set locale to get correct padding.
LC_ALL="$sys_locale" LC_ALL="$sys_locale"
@@ -3467,7 +3463,7 @@ get_ascii() {
done <<< "${ascii_data//\$\{??\}}" done <<< "${ascii_data//\$\{??\}}"
# Fallback if file not found. # Fallback if file not found.
((lines==1)) && { lines=; ascii_len=; image_source="auto"; get_distro_ascii; get_ascii; return; } ((lines==1)) && { lines=; ascii_len=; image_source=auto; get_distro_ascii; print_ascii; return; }
# Colors. # Colors.
ascii_data="${ascii_data//\$\{c1\}/$c1}" ascii_data="${ascii_data//\$\{c1\}/$c1}"
@@ -3603,49 +3599,10 @@ get_w3m_img_path() {
get_window_size() { get_window_size() {
# This functions gets the current window size in # This functions gets the current window size in
# pixels. # pixels.
# [[ "$image_backend" == "kitty" ]] &&
# We first try to use the escape sequence "\033[14t"
# to get the terminal window size in pixels. If this
# fails we then fallback to using "xdotool" or other
# programs.
# Tmux has a special way of reading escape sequences
# so we have to use a slightly different sequence to
# get the terminal size.
if [[ "$image_backend" == "tycat" ]]; then
printf '%b' '\e}qs\000'
else
case "${TMUX:-null}" in
"null") printf '%b' '\e[14t' ;;
*) printf '%b' '\ePtmux;\e\e[14t\e\\ ' ;;
esac
fi
# The escape codes above print the desired output as
# user input so we have to use read to store the out
# -put as a variable.
# The 1 second timeout is required for older bash
case "${BASH_VERSINFO[0]}" in
4|5) IFS=';t' read -d t -t 0.05 -sra term_size ;;
*) IFS=';t' read -d t -t 1 -sra term_size ;;
esac
unset IFS
# Split the string into height/width.
if [[ "$image_backend" == "tycat" ]]; then
term_width="$((term_size[2] * term_size[0]))"
term_height="$((term_size[3] * term_size[1]))"
else
term_height="${term_size[1]}"
term_width="${term_size[2]}"
fi
[[ "$image_backend" == "kitty" ]] && \
IFS=x read -r term_width term_height < <(kitty +kitten icat --print-window-size) IFS=x read -r term_width term_height < <(kitty +kitten icat --print-window-size)
# Get terminal width/height if \e[14t is unsupported. # Get terminal width/height.
if (( "${term_width:-0}" < 50 )) && [[ "$DISPLAY" && "$os" != "Mac OS X" ]]; then if (( "${term_width:-0}" < 50 )) && [[ "$DISPLAY" && "$os" != "Mac OS X" ]]; then
if type -p xdotool &>/dev/null; then if type -p xdotool &>/dev/null; then
IFS=$'\n' read -d "" -ra win < <(xdotool getactivewindow getwindowgeometry --shell %1) IFS=$'\n' read -d "" -ra win < <(xdotool getactivewindow getwindowgeometry --shell %1)
@@ -3727,7 +3684,7 @@ get_image_size() {
esac esac
# Check for terminal padding. # Check for terminal padding.
[[ $image_backend == w3m ]] && term_padding [[ "$image_backend" == "w3m" ]] && term_padding
width="${width:-$image_size}" width="${width:-$image_size}"
height="${height:-$image_size}" height="${height:-$image_size}"
@@ -3886,7 +3843,7 @@ display_image() {
to_ascii() { to_ascii() {
err "$1" err "$1"
image_backend="ascii" image_backend="ascii"
get_ascii print_ascii
# Set cursor position next image/ascii. # Set cursor position next image/ascii.
printf '\e[%sA\e[9999999D' "${lines:-0}" printf '\e[%sA\e[9999999D' "${lines:-0}"
@@ -4196,7 +4153,7 @@ kde_config_dir() {
term_padding() { term_padding() {
# Get terminal padding to properly align cursor. # Get terminal padding to properly align cursor.
[[ -z $term ]] && get_term [[ -z "$term" ]] && get_term
case "$term" in case "$term" in
urxvt*|"rxvt-unicode") urxvt*|"rxvt-unicode")
@@ -4208,9 +4165,9 @@ term_padding() {
} }
dynamic_prompt() { dynamic_prompt() {
[[ $image_backend == off ]] && { printf '\n'; return; } [[ "$image_backend" == "off" ]] && { printf '\n'; return; }
[[ $image_backend != ascii ]] && ((lines=(height + yoffset) / font_height + 1)) [[ "$image_backend" != "ascii" ]] && ((lines=(height + yoffset) / font_height + 1))
[[ $image_backend == w3m ]] && ((lines=lines + padding / font_height + 1)) [[ "$image_backend" == "w3m" ]] && ((lines=lines + padding / font_height + 1))
# If the ascii art is taller than the info. # If the ascii art is taller than the info.
((lines=lines>info_height?lines-info_height+1:1)) ((lines=lines>info_height?lines-info_height+1:1))
@@ -4322,7 +4279,7 @@ INFO:
NOTE: You can supply multiple args. eg. 'neofetch --disable cpu gpu' NOTE: You can supply multiple args. eg. 'neofetch --disable cpu gpu'
--package_managers on/off Hide/Show Package Manager names . (tiny, on, off) --package_managers on/off Hide/Show Package Manager names . (on, tiny, off)
--os_arch on/off Hide/Show OS architecture. --os_arch on/off Hide/Show OS architecture.
--speed_type type Change the type of cpu speed to display. --speed_type type Change the type of cpu speed to display.
Possible values: current, min, max, bios, Possible values: current, min, max, bios,
@@ -4349,7 +4306,7 @@ INFO:
NOTE: For FreeBSD and NetBSD-based systems, you need to enable NOTE: For FreeBSD and NetBSD-based systems, you need to enable
coretemp kernel module. This only supports newer Intel processors. coretemp kernel module. This only supports newer Intel processors.
--distro_shorthand on/off Shorten the output of distro (tiny, on, off) --distro_shorthand on/off Shorten the output of distro (on, tiny, off)
NOTE: This option won't work in Windows (Cygwin) NOTE: This option won't work in Windows (Cygwin)
@@ -4357,7 +4314,7 @@ INFO:
NOTE: This option won't work in BSDs (except PacBSD and PC-BSD) NOTE: This option won't work in BSDs (except PacBSD and PC-BSD)
--uptime_shorthand on/off Shorten the output of uptime (tiny, on, off) --uptime_shorthand on/off Shorten the output of uptime (on, tiny, off)
--refresh_rate on/off Whether to display the refresh rate of each monitor --refresh_rate on/off Whether to display the refresh rate of each monitor
Unsupported on Windows Unsupported on Windows
--gpu_brand on/off Enable/Disable GPU brand in output. (AMD/NVIDIA/Intel) --gpu_brand on/off Enable/Disable GPU brand in output. (AMD/NVIDIA/Intel)
@@ -4766,7 +4723,7 @@ get_args() {
get_simple() { get_simple() {
while [[ "$1" ]]; do while [[ "$1" ]]; do
[[ $(type -t "get_$1") == function ]] && { [[ "$(type -t "get_$1")" == "function" ]] && {
get_distro get_distro
stdout stdout
simple=1 simple=1

View File

@@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.8. .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.8.
.TH NEOFETCH "1" "January 2019" "Neofetch 6.0.0" "User Commands" .TH NEOFETCH "1" "January 2019" "Neofetch 6.0.1" "User Commands"
.SH NAME .SH NAME
Neofetch \- A fast, highly customizable system info script Neofetch \- A fast, highly customizable system info script
.SH SYNOPSIS .SH SYNOPSIS
@@ -40,8 +40,8 @@ For example: 'info "Memory" memory' would be '\-\-disable memory'
.IP .IP
NOTE: You can supply multiple args. eg. 'neofetch \fB\-\-disable\fR cpu gpu' NOTE: You can supply multiple args. eg. 'neofetch \fB\-\-disable\fR cpu gpu'
.TP .TP
\fB\-\-package_managers\fR on/off \fB\-\-package_managers\fR on/tiny/off
Hide/Show Package Manager names . (tiny, on, off) Hide/Show Package Manager names . (on, tiny, off)
.TP .TP
\fB\-\-os_arch\fR on/off \fB\-\-os_arch\fR on/off
Hide/Show OS architecture. Hide/Show OS architecture.
@@ -79,8 +79,8 @@ NOTE: This only works on Linux and BSD.
NOTE: For FreeBSD and NetBSD\-based systems, you need to enable NOTE: For FreeBSD and NetBSD\-based systems, you need to enable
coretemp kernel module. This only supports newer Intel processors. coretemp kernel module. This only supports newer Intel processors.
.TP .TP
\fB\-\-distro_shorthand\fR on/off \fB\-\-distro_shorthand\fR on/tiny/off
Shorten the output of distro (tiny, on, off) Shorten the output of distro (on, tiny, off)
.IP .IP
NOTE: This option won't work in Windows (Cygwin) NOTE: This option won't work in Windows (Cygwin)
.TP .TP
@@ -89,8 +89,8 @@ Shorten the output of kernel
.IP .IP
NOTE: This option won't work in BSDs (except PacBSD and PC\-BSD) NOTE: This option won't work in BSDs (except PacBSD and PC\-BSD)
.TP .TP
\fB\-\-uptime_shorthand\fR on/off \fB\-\-uptime_shorthand\fR on/tiny/off
Shorten the output of uptime (tiny, on, off) Shorten the output of uptime (on, tiny, off)
.TP .TP
\fB\-\-refresh_rate\fR on/off \fB\-\-refresh_rate\fR on/off
Whether to display the refresh rate of each monitor Whether to display the refresh rate of each monitor