mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-12-22 19:49:54 +00:00
Compare commits
48 Commits
clean
...
vte_img_fi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5b301c773b | ||
|
|
68645339d3 | ||
|
|
415ef5d4ae | ||
|
|
acc8103dde | ||
|
|
78e0fa3212 | ||
|
|
64188697b8 | ||
|
|
9431a593f6 | ||
|
|
23fc5aff3d | ||
|
|
7df1d0e3ef | ||
|
|
228fb778cb | ||
|
|
3c07884032 | ||
|
|
766113a0c2 | ||
|
|
661d003be2 | ||
|
|
2ecd8102d0 | ||
|
|
b6b320a75a | ||
|
|
b49ecb68f8 | ||
|
|
ca9d161bc9 | ||
|
|
7a64ce22a8 | ||
|
|
c9d6ef5c40 | ||
|
|
c6bd0461a0 | ||
|
|
c1da5eb09a | ||
|
|
12d9f93750 | ||
|
|
32a44b4d62 | ||
|
|
e2e98a6c7c | ||
|
|
c76c122650 | ||
|
|
eaa59da1e9 | ||
|
|
056a99bfa2 | ||
|
|
074323f0ed | ||
|
|
f24fed6df3 | ||
|
|
86372fe6a8 | ||
|
|
4f89361e50 | ||
|
|
653712c06a | ||
|
|
de5a260f6b | ||
|
|
617769059b | ||
|
|
4d6a4fb425 | ||
|
|
85a1bd0af7 | ||
|
|
5316b568e7 | ||
|
|
7677cd2b4b | ||
|
|
3a0e2ec68c | ||
|
|
62ada359fc | ||
|
|
ad2727620c | ||
|
|
ccabbbe678 | ||
|
|
1f8b18d7ca | ||
|
|
804f88aa7a | ||
|
|
041a1459b6 | ||
|
|
fbb69625a7 | ||
|
|
d36ee68f2c | ||
|
|
e155df7a72 |
135
CHANGELOG.md
135
CHANGELOG.md
@@ -5,39 +5,158 @@ 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**
|
||||
|
||||
- [**@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)
|
||||
[**@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
|
||||
|
||||
|
||||
34
README.md
34
README.md
@@ -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)\]
|
||||
|
||||
## 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>
|
||||
|
||||
|
||||
323
neofetch
323
neofetch
@@ -28,7 +28,7 @@
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
version="5.0.1"
|
||||
version="6.0.1"
|
||||
|
||||
bash_version="${BASH_VERSION/.*}"
|
||||
sys_locale="${LANG:-C}"
|
||||
@@ -76,15 +76,13 @@ print_info() {
|
||||
# info "Battery" battery
|
||||
# info "Font" font
|
||||
# info "Song" song
|
||||
# [[ $player ]] && prin "Music Player" "$player"
|
||||
# [[ "$player" ]] && prin "Music Player" "$player"
|
||||
# info "Local IP" local_ip
|
||||
# info "Public IP" public_ip
|
||||
# info "Users" users
|
||||
# info "Locale" locale # This only works on glibc systems.
|
||||
|
||||
info line_break
|
||||
info cols
|
||||
info line_break
|
||||
}
|
||||
|
||||
|
||||
@@ -110,7 +108,7 @@ kernel_shorthand="on"
|
||||
# Shorten the output of the distro function
|
||||
#
|
||||
# Default: 'off'
|
||||
# Values: 'on', 'off', 'tiny'
|
||||
# Values: 'on', 'tiny', 'off'
|
||||
# Flag: --distro_shorthand
|
||||
# Supports: Everything except Windows and Haiku
|
||||
distro_shorthand="off"
|
||||
@@ -134,16 +132,31 @@ os_arch="on"
|
||||
# Shorten the output of the uptime function
|
||||
#
|
||||
# Default: 'on'
|
||||
# Values: 'on', 'off', 'tiny'
|
||||
# Values: 'on', 'tiny', 'off'
|
||||
# Flag: --uptime_shorthand
|
||||
#
|
||||
# Example:
|
||||
# on: '2 days, 10 hours, 3 mins'
|
||||
# off: '2 days, 10 hours, 3 minutes'
|
||||
# tiny: '2d 10h 3m'
|
||||
# off: '2 days, 10 hours, 3 minutes'
|
||||
uptime_shorthand="on"
|
||||
|
||||
|
||||
# Memory
|
||||
|
||||
|
||||
# Show memory pecentage in output.
|
||||
#
|
||||
# Default: 'off'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --memory_percent
|
||||
#
|
||||
# Example:
|
||||
# on: '1801MiB / 7881MiB (22%)'
|
||||
# off: '1801MiB / 7881MiB'
|
||||
memory_percent="off"
|
||||
|
||||
|
||||
# Packages
|
||||
|
||||
|
||||
@@ -362,6 +375,12 @@ gtk3="on"
|
||||
# Flag: --ip_host
|
||||
public_ip_host="http://ident.me"
|
||||
|
||||
# Public IP timeout.
|
||||
#
|
||||
# Default: '2'
|
||||
# Values: 'int'
|
||||
# Flag: --ip_timeout
|
||||
public_ip_timeout=2
|
||||
|
||||
|
||||
# Disk
|
||||
@@ -650,7 +669,8 @@ disk_display="off"
|
||||
# Image backend.
|
||||
#
|
||||
# Default: 'ascii'
|
||||
# Values: 'ascii', 'caca', 'jp2a', 'iterm2', 'off', 'termpix', 'pixterm', 'tycat', 'w3m', 'kitty'
|
||||
# Values: 'ascii', 'caca', 'chafa', 'jp2a', 'iterm2', 'off',
|
||||
# 'termpix', 'pixterm', 'tycat', 'w3m', 'kitty'
|
||||
# Flag: --backend
|
||||
image_backend="ascii"
|
||||
|
||||
@@ -829,7 +849,12 @@ get_distro() {
|
||||
|
||||
case "$os" in
|
||||
"Linux" | "BSD" | "MINIX")
|
||||
if [[ -f "/etc/redstar-release" ]]; then
|
||||
if [[ -f "/bedrock/etc/bedrock-release" && "$PATH" == */bedrock/cross/* ]]; then
|
||||
case "$distro_shorthand" in
|
||||
"on" | "tiny") distro="Bedrock Linux" ;;
|
||||
*) distro="$(< /bedrock/etc/bedrock-release)"
|
||||
esac
|
||||
elif [[ -f "/etc/redstar-release" ]]; then
|
||||
case "$distro_shorthand" in
|
||||
"on" | "tiny") distro="Red Star OS" ;;
|
||||
*) distro="Red Star OS $(awk -F'[^0-9*]' '$0=$2' /etc/redstar-release)"
|
||||
@@ -881,7 +906,7 @@ get_distro() {
|
||||
# Chrome OS doesn't conform to the /etc/*-release standard.
|
||||
# While the file is a series of variables they can't be sourced
|
||||
# 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)"
|
||||
|
||||
elif [[ -f "/etc/os-release" || \
|
||||
@@ -900,11 +925,6 @@ get_distro() {
|
||||
"tiny") distro="${NAME:-${DISTRIB_ID:-${TAILS_PRODUCT_NAME}}}" ;;
|
||||
"off") distro="${PRETTY_NAME:-${DISTRIB_DESCRIPTION}} ${UBUNTU_CODENAME}" ;;
|
||||
esac
|
||||
|
||||
# Workarounds for distros that go against the os-release standard.
|
||||
[[ -z "${distro// }" ]] && distro="$(awk '/BLAG/ {print $1; exit}')" "${files[@]}"
|
||||
[[ -z "${distro// }" ]] && distro="$(awk -F'=' '{print $2; exit}')" "${files[@]}"
|
||||
|
||||
else
|
||||
for release_file in /etc/*-release; do
|
||||
distro+="$(< "$release_file")"
|
||||
@@ -926,15 +946,14 @@ get_distro() {
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "$(< /proc/version)" == *"Microsoft"* ||
|
||||
"$kernel_version" == *"Microsoft"* ]]; then
|
||||
if [[ "$(< /proc/version)" == *Microsoft* || "$kernel_version" == *Microsoft* ]]; then
|
||||
case "$distro_shorthand" in
|
||||
"on") distro+=" [Windows 10]" ;;
|
||||
"tiny") distro="Windows 10" ;;
|
||||
*) distro+=" on Windows 10" ;;
|
||||
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
|
||||
"on") distro+=" [Chrome OS]" ;;
|
||||
"tiny") distro="Chrome OS" ;;
|
||||
@@ -1039,15 +1058,15 @@ get_model() {
|
||||
if [[ -d "/system/app/" && -d "/system/priv-app" ]]; then
|
||||
model="$(getprop ro.product.brand) $(getprop ro.product.model)"
|
||||
|
||||
elif [[ -f /sys/devices/virtual/dmi/id/product_name ||
|
||||
-f /sys/devices/virtual/dmi/id/product_version ]]; then
|
||||
elif [[ -f "/sys/devices/virtual/dmi/id/product_name" ||
|
||||
-f "/sys/devices/virtual/dmi/id/product_version" ]]; then
|
||||
model="$(< /sys/devices/virtual/dmi/id/product_name)"
|
||||
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)"
|
||||
|
||||
elif [[ -f /tmp/sysinfo/model ]]; then
|
||||
elif [[ -f "/tmp/sysinfo/model" ]]; then
|
||||
model="$(< /tmp/sysinfo/model)"
|
||||
fi
|
||||
;;
|
||||
@@ -1272,6 +1291,16 @@ get_packages() {
|
||||
pac() { (($1 > 0)) && { managers+=("$1 (${manager})"); manager_string+="${manager}, "; }; }
|
||||
tot() { IFS=$'\n' read -d "" -ra pkgs < <("$@");((packages+="${#pkgs[@]}"));pac "${#pkgs[@]}"; }
|
||||
|
||||
# Redefine tot() for Bedrock Linux.
|
||||
[[ -f "/bedrock/etc/bedrock-release" && "$PATH" == */bedrock/cross/* ]] && {
|
||||
tot() {
|
||||
IFS=$'\n' read -d "" -ra pkgs < <(for s in $(brl list); do strat -r "$s" "$@"; done)
|
||||
((packages+="${#pkgs[@]}"))
|
||||
pac "${#pkgs[@]}"
|
||||
}
|
||||
br_prefix="/bedrock/strata/*"
|
||||
}
|
||||
|
||||
case "$os" in
|
||||
"Linux" | "BSD" | "iPhone OS" | "Solaris")
|
||||
# Package Manager Programs.
|
||||
@@ -1291,21 +1320,27 @@ get_packages() {
|
||||
has "butch" && tot butch list
|
||||
|
||||
# Counting files/dirs.
|
||||
has "emerge" && dir /var/db/pkg/*/*/
|
||||
has "nix-env" && dir /nix/store/*/
|
||||
has "guix" && dir /gnu/store/*/
|
||||
has "Compile" && dir /Programs/*/
|
||||
has "eopkg" && dir /var/lib/eopkg/package/*
|
||||
has "crew" && dir /usr/local/etc/crew/meta/*.filelist
|
||||
has "pkgtool" && dir /var/log/packages/*
|
||||
has "cave" && dir /var/db/paludis/repositories/cross-installed/*/data/*/ \
|
||||
/var/db/paludis/repositories/installed/data/*/
|
||||
# Variables need to be unquoted here. Only Bedrock Linux is affected.
|
||||
# $br_prefix is fixed and won't change based on user input so this is safe either way.
|
||||
# shellcheck disable=SC2086
|
||||
{
|
||||
has "emerge" && dir ${br_prefix}/var/db/pkg/*/*/
|
||||
has "nix-env" && dir ${br_prefix}/nix/store/*/
|
||||
has "guix" && dir ${br_prefix}/gnu/store/*/
|
||||
has "Compile" && dir ${br_prefix}/Programs/*/
|
||||
has "eopkg" && dir ${br_prefix}/var/lib/eopkg/package/*
|
||||
has "crew" && dir ${br_prefix}/usr/local/etc/crew/meta/*.filelist
|
||||
has "pkgtool" && dir ${br_prefix}/var/log/packages/*
|
||||
has "cave" && dir ${br_prefix}/var/db/paludis/repositories/cross-installed/*/data/*/ \
|
||||
${br_prefix}/var/db/paludis/repositories/installed/data/*/
|
||||
}
|
||||
|
||||
# Other (Needs complex command)
|
||||
has "kpm-pkg" && ((packages+="$(kpm --get-selections | grep -cv deinstall$)"))
|
||||
|
||||
# pkginfo is also the name of a python package manager.
|
||||
[[ $os != "Linux" ]] && has "pkginfo" && tot pkginfo -i
|
||||
# pkginfo is also the name of a python package manager which is painfully slow.
|
||||
# TODO: Fix this somehow.
|
||||
has pkginfo && tot pkginfo -i
|
||||
|
||||
case "$kernel_name" in
|
||||
"FreeBSD") has "pkg" && tot pkg info ;;
|
||||
@@ -1803,8 +1838,7 @@ get_cpu() {
|
||||
fi
|
||||
|
||||
# Get CPU temp.
|
||||
[[ -f "$temp_dir" ]] && \
|
||||
deg="$(($(< "$temp_dir") * 100 / 10000))"
|
||||
[[ -f "$temp_dir" ]] && deg="$(($(< "$temp_dir") * 100 / 10000))"
|
||||
|
||||
# Get CPU cores.
|
||||
case "$cpu_cores" in
|
||||
@@ -2067,9 +2101,7 @@ get_gpu() {
|
||||
# Checking the first two array elements should
|
||||
# be safe since there won't be 2 intel outputs if
|
||||
# there's a dedicated GPU in play.
|
||||
[[ "${gpus[0]}" == *Intel* && \
|
||||
"${gpus[1]}" == *Intel* ]] && \
|
||||
unset -v "gpus[0]"
|
||||
[[ "${gpus[0]}" == *Intel* && "${gpus[1]}" == *Intel* ]] && unset -v "gpus[0]"
|
||||
|
||||
for gpu in "${gpus[@]}"; do
|
||||
# GPU shorthand tests.
|
||||
@@ -2318,7 +2350,10 @@ get_memory() {
|
||||
;;
|
||||
|
||||
esac
|
||||
memory="${mem_used}${mem_label:-MiB} / ${mem_total}${mem_label:-MiB}"
|
||||
|
||||
[[ "$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}%)}"
|
||||
|
||||
# Bars.
|
||||
case "$memory_display" in
|
||||
@@ -2370,8 +2405,7 @@ get_song() {
|
||||
player="$(ps aux | awk -v pattern="(${players:1})" \
|
||||
'!/ awk / && !/iTunesHelper/ && match($0,pattern){print substr($0,RSTART,RLENGTH); exit}')"
|
||||
|
||||
[[ "$music_player" && "$music_player" != "auto" ]] && \
|
||||
player="$music_player"
|
||||
[[ "$music_player" && "$music_player" != "auto" ]] && player="$music_player"
|
||||
|
||||
get_song_dbus() {
|
||||
# Multiple players use an almost identical dbus command to get the information.
|
||||
@@ -2579,6 +2613,7 @@ get_resolution() {
|
||||
esac
|
||||
|
||||
resolution="${resolution%,*}"
|
||||
[[ -z "${resolution/x}" ]] && resolution=
|
||||
}
|
||||
|
||||
get_style() {
|
||||
@@ -2757,11 +2792,8 @@ get_term() {
|
||||
esac
|
||||
|
||||
# Most likely TosWin2 on FreeMiNT - quick check
|
||||
[[ "$TERM" == "tw52" || "$TERM" == "tw100" ]] && \
|
||||
term="TosWin2"
|
||||
|
||||
[[ "$SSH_CONNECTION" ]] && \
|
||||
term="$SSH_TTY"
|
||||
[[ "$TERM" == "tw52" || "$TERM" == "tw100" ]] && term="TosWin2"
|
||||
[[ "$SSH_CONNECTION" ]] && term="$SSH_TTY"
|
||||
|
||||
# Check $PPID for terminal emulator.
|
||||
while [[ -z "$term" ]]; do
|
||||
@@ -2881,6 +2913,8 @@ END
|
||||
|
||||
"kitty"*)
|
||||
kitty_config="$(kitty --debug-config)"
|
||||
[[ "$kitty_config" != *font_family* ]] && return
|
||||
|
||||
term_font_size="${kitty_config/*font_size}"
|
||||
term_font_size="${term_font_size/$'\n'*}"
|
||||
term_font="${kitty_config/*font_family}"
|
||||
@@ -2925,7 +2959,7 @@ END
|
||||
mateterm_config="/tmp/mateterm.cfg"
|
||||
|
||||
# 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"
|
||||
|
||||
role="$(xprop -id "${WINDOWID}" WM_WINDOW_ROLE)"
|
||||
@@ -2990,7 +3024,7 @@ END
|
||||
# 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
|
||||
# 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
|
||||
# like a font definition. NOTE: There is a slight limitation in this approach.
|
||||
@@ -3043,8 +3077,7 @@ END
|
||||
term_font="$(trim "${term_font/*"faceName:"}")"
|
||||
|
||||
# xft: isn't required at the beginning so we prepend it if it's missing
|
||||
[[ "${term_font:0:1}" != "-" && \
|
||||
"${term_font:0:4}" != "xft:" ]] && \
|
||||
[[ "${term_font:0:1}" != "-" && "${term_font:0:4}" != "xft:" ]] && \
|
||||
term_font="xft:$term_font"
|
||||
|
||||
# Xresources has two different font formats, this checks which
|
||||
@@ -3275,11 +3308,11 @@ get_public_ip() {
|
||||
fi
|
||||
|
||||
if [[ -z "$public_ip" ]] && type -p curl >/dev/null; then
|
||||
public_ip="$(curl --max-time 10 -w '\n' "$public_ip_host")"
|
||||
public_ip="$(curl --max-time "$public_ip_timeout" -w '\n' "$public_ip_host")"
|
||||
fi
|
||||
|
||||
if [[ -z "$public_ip" ]] && type -p wget >/dev/null; then
|
||||
public_ip="$(wget -T 10 -qO- "$public_ip_host")"
|
||||
public_ip="$(wget -T "$public_ip_timeout" -qO- "$public_ip_host")"
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -3305,6 +3338,7 @@ get_gpu_driver() {
|
||||
gpu_driver="NVIDIA ${gpu_driver/ *}"
|
||||
fi
|
||||
;;
|
||||
|
||||
"Mac OS X")
|
||||
if [[ "$(kextstat | grep "GeForceWeb")" != "" ]]; then
|
||||
gpu_driver="NVIDIA Web Driver"
|
||||
@@ -3316,6 +3350,8 @@ get_gpu_driver() {
|
||||
}
|
||||
|
||||
get_cols() {
|
||||
local blocks blocks2 cols
|
||||
|
||||
if [[ "$color_blocks" == "on" ]]; then
|
||||
# Convert the width to space chars.
|
||||
printf -v block_width "%${block_width}s"
|
||||
@@ -3347,9 +3383,9 @@ get_cols() {
|
||||
cols="${cols//nl/\\n\\e[${text_padding}C${zws}}"
|
||||
|
||||
# Add block height to info height.
|
||||
((info_height+=block_height-1))
|
||||
((info_height+=block_range[1]>7?block_height+3:block_height+2))
|
||||
|
||||
printf '\e[%bC%b' "$text_padding" "${zws}${cols}"
|
||||
printf '\n\e[%bC%b\n\n' "$text_padding" "${zws}${cols}"
|
||||
fi
|
||||
|
||||
unset -v blocks blocks2 cols
|
||||
@@ -3369,10 +3405,10 @@ image_backend() {
|
||||
{ image_backend="ascii"; err "Image: Imagemagick not found, falling back to ascii mode."; }
|
||||
|
||||
case "${image_backend:-off}" in
|
||||
"ascii") get_ascii ;;
|
||||
"ascii") print_ascii ;;
|
||||
"off") image_backend="off" ;;
|
||||
|
||||
"caca" | "jp2a" | "iterm2" | "termpix" |\
|
||||
"caca" | "chafa" | "jp2a" | "iterm2" | "termpix" |\
|
||||
"tycat" | "w3m" | "sixel" | "pixterm" | "kitty")
|
||||
get_image_source
|
||||
|
||||
@@ -3397,10 +3433,10 @@ image_backend() {
|
||||
|
||||
*)
|
||||
err "Image: Unknown image backend specified '$image_backend'."
|
||||
err "Image: Valid backends are: 'ascii', 'caca', 'jp2a', 'iterm2', 'kitty',
|
||||
err "Image: Valid backends are: 'ascii', 'caca', 'chafa', 'jp2a', 'iterm2', 'kitty',
|
||||
'off', 'sixel', 'pixterm', 'termpix', 'tycat', 'w3m')"
|
||||
err "Image: Falling back to ascii mode."
|
||||
get_ascii
|
||||
print_ascii
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -3408,10 +3444,11 @@ image_backend() {
|
||||
[[ "$image_backend" != "off" ]] && printf '\e[%sA\e[9999999D' "${lines:-0}"
|
||||
}
|
||||
|
||||
get_ascii() {
|
||||
[[ ! "$image_source" =~ (ascii|auto) ]] &&
|
||||
print_ascii() {
|
||||
if [[ -f "$image_source" && ! "$image_source" =~ (png|jpg|jpeg|jpe|svg|gif) ]]; then
|
||||
ascii_data="$(< "$image_source")"
|
||||
elif [[ "$image_source" == "ascii" || $image_source == auto ]]; then
|
||||
:
|
||||
else
|
||||
ascii_data="$image_source"
|
||||
fi
|
||||
@@ -3421,11 +3458,12 @@ get_ascii() {
|
||||
|
||||
# Calculate size of ascii file in line length / line count.
|
||||
while IFS=$'\n' read -r line; do
|
||||
line="${line//\\\\/\\}"
|
||||
((++lines,${#line}>ascii_len)) && ascii_len="${#line}"
|
||||
done <<< "${ascii_data//\$\{??\}}"
|
||||
|
||||
# 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.
|
||||
ascii_data="${ascii_data//\$\{c1\}/$c1}"
|
||||
@@ -3561,49 +3599,10 @@ get_w3m_img_path() {
|
||||
get_window_size() {
|
||||
# This functions gets the current window size in
|
||||
# pixels.
|
||||
#
|
||||
# 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" ]] && \
|
||||
[[ "$image_backend" == "kitty" ]] &&
|
||||
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 type -p xdotool &>/dev/null; then
|
||||
IFS=$'\n' read -d "" -ra win < <(xdotool getactivewindow getwindowgeometry --shell %1)
|
||||
@@ -3684,9 +3683,12 @@ get_image_size() {
|
||||
*) image_size="${image_size/px}" ;;
|
||||
esac
|
||||
|
||||
# Check for terminal padding.
|
||||
[[ "$image_backend" == "w3m" ]] && term_padding
|
||||
|
||||
width="${width:-$image_size}"
|
||||
height="${height:-$image_size}"
|
||||
text_padding="$((width / font_width + gap + xoffset/font_width))"
|
||||
text_padding="$(((width + padding + xoffset) / font_width + gap))"
|
||||
}
|
||||
|
||||
make_thumbnail() {
|
||||
@@ -3747,11 +3749,9 @@ make_thumbnail() {
|
||||
-background none \
|
||||
"$image" \
|
||||
-strip \
|
||||
-define "jpeg:size=100x100" \
|
||||
-gravity "$crop_offset" \
|
||||
-crop "${size}x${size}+0+0" \
|
||||
-quality 40 \
|
||||
-sample "${width}x${height}" \
|
||||
-scale "${width}x${height}" \
|
||||
"${thumbnail_dir}/${image_name}"
|
||||
;;
|
||||
esac
|
||||
@@ -3765,17 +3765,21 @@ display_image() {
|
||||
case "$image_backend" in
|
||||
"caca")
|
||||
img2txt \
|
||||
-W "$((width / font_width)))" \
|
||||
-W "$((width / font_width))" \
|
||||
-H "$((height / font_height))" \
|
||||
--gamma=0.6 \
|
||||
"$image"
|
||||
;;
|
||||
|
||||
"chafa")
|
||||
chafa --size="$((width / font_width))x$((height / font_height))" "$image"
|
||||
;;
|
||||
|
||||
"jp2a")
|
||||
jp2a \
|
||||
--colors \
|
||||
--width="$((width / font_width))" \
|
||||
--height="$((height / font_height))" \
|
||||
--colors \
|
||||
"$image"
|
||||
;;
|
||||
|
||||
@@ -3829,7 +3833,7 @@ display_image() {
|
||||
|
||||
# Add a tiny delay to fix issues with images not
|
||||
# appearing in specific terminal emulators.
|
||||
sleep 0.05
|
||||
((BASH_VERSINFO[0]>3)) && sleep 0.05
|
||||
printf '%b\n%s;\n%s\n' "0;1;$xoffset;$yoffset;$width;$height;;;;;$image" 3 4 |\
|
||||
"${w3m_img_path:-false}" -bg "$background_color" &>/dev/null
|
||||
;;
|
||||
@@ -3839,7 +3843,7 @@ display_image() {
|
||||
to_ascii() {
|
||||
err "$1"
|
||||
image_backend="ascii"
|
||||
get_ascii
|
||||
print_ascii
|
||||
|
||||
# Set cursor position next image/ascii.
|
||||
printf '\e[%sA\e[9999999D' "${lines:-0}"
|
||||
@@ -3906,7 +3910,7 @@ prin() {
|
||||
string="${subtitle_color}${bold}${string}"
|
||||
|
||||
# Print the info.
|
||||
printf '%b\n' "${text_padding:+\e[${text_padding}C}${zws}${string}${reset} "
|
||||
printf '%b\n' "${text_padding:+\e[${text_padding}C}${zws}${string//\\n}${reset} "
|
||||
|
||||
# Calculate info height.
|
||||
((++info_height))
|
||||
@@ -3927,17 +3931,6 @@ get_underline() {
|
||||
prin=1
|
||||
}
|
||||
|
||||
get_line_break() {
|
||||
# Print it directly.
|
||||
printf '%b\n' "$zws"
|
||||
|
||||
# Calculate info height.
|
||||
((++info_height))
|
||||
|
||||
# Tell info() that we printed manually.
|
||||
prin=1
|
||||
}
|
||||
|
||||
get_bold() {
|
||||
case "$ascii_bold" in
|
||||
"on") ascii_bold='\e[1m' ;;
|
||||
@@ -4038,7 +4031,7 @@ color() {
|
||||
stdout() {
|
||||
image_backend="off"
|
||||
unset subtitle_color colon_color info_color underline_color bold title_color at_color \
|
||||
text_padding zws reset color_blocks get_line_break bar_color_elapsed bar_color_total \
|
||||
text_padding zws reset color_blocks bar_color_elapsed bar_color_total \
|
||||
c1 c2 c3 c4 c5 c6 c7 c8
|
||||
}
|
||||
|
||||
@@ -4158,9 +4151,23 @@ kde_config_dir() {
|
||||
kde_config_dir="${kde_config_dir/$'/:'*}"
|
||||
}
|
||||
|
||||
term_padding() {
|
||||
# Get terminal padding to properly align cursor.
|
||||
[[ -z "$term" ]] && get_term
|
||||
|
||||
case "$term" in
|
||||
urxvt*|"rxvt-unicode")
|
||||
[[ -z "$xrdb" ]] && xrdb="$(xrdb -query)"
|
||||
padding="${xrdb/*.internalBorder:}"
|
||||
((padding=${padding/$'\n'*}))
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
dynamic_prompt() {
|
||||
[[ "$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))
|
||||
|
||||
# If the ascii art is taller than the info.
|
||||
((lines=lines>info_height?lines-info_height+1:1))
|
||||
@@ -4272,7 +4279,7 @@ INFO:
|
||||
|
||||
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.
|
||||
--speed_type type Change the type of cpu speed to display.
|
||||
Possible values: current, min, max, bios,
|
||||
@@ -4299,7 +4306,7 @@ INFO:
|
||||
NOTE: For FreeBSD and NetBSD-based systems, you need to enable
|
||||
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)
|
||||
|
||||
@@ -4307,7 +4314,7 @@ INFO:
|
||||
|
||||
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
|
||||
Unsupported on Windows
|
||||
--gpu_brand on/off Enable/Disable GPU brand in output. (AMD/NVIDIA/Intel)
|
||||
@@ -4335,8 +4342,10 @@ INFO:
|
||||
'dir' shows the basename of the disks's path. (/, Local Disk, etc)
|
||||
|
||||
--ip_host url URL to query for public IP
|
||||
--ip_timeout int Public IP timeout (in seconds).
|
||||
--song_format format Print the song data in a specific format (see config file).
|
||||
--song_shorthand on/off Print the Artist/Album/Title on separate lines.
|
||||
--memory_percent on/off Display memory percentage.
|
||||
--music_player player-name Manually specify a player to use.
|
||||
Available values are listed in the config file
|
||||
|
||||
@@ -4372,8 +4381,8 @@ BARS:
|
||||
|
||||
IMAGE BACKEND:
|
||||
--backend backend Which image backend to use.
|
||||
Possible values: 'ascii', 'caca', 'jp2a', 'iterm2', 'off',
|
||||
'sixel', 'tycat', 'w3m'
|
||||
Possible values: 'ascii', 'caca', 'chafa', 'jp2a', 'iterm2',
|
||||
'off', 'sixel', 'tycat', 'w3m'
|
||||
--source 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]
|
||||
@@ -4383,6 +4392,7 @@ IMAGE BACKEND:
|
||||
NEW: neofetch --ascii \"\$(fortune | cowsay -W 30)\"
|
||||
|
||||
--caca source Shortcut to use 'caca' backend.
|
||||
--chafa source Shortcut to use 'chafa' backend.
|
||||
--iterm2 source Shortcut to use 'iterm2' backend.
|
||||
--jp2a source Shortcut to use 'jp2a' backend.
|
||||
--kitty source Shortcut to use 'kitty' backend.
|
||||
@@ -4487,9 +4497,11 @@ get_args() {
|
||||
"--shell_path") shell_path="$2" ;;
|
||||
"--shell_version") shell_version="$2" ;;
|
||||
"--ip_host") public_ip_host="$2" ;;
|
||||
"--ip_timeout") public_ip_timeout="$2" ;;
|
||||
"--song_format") song_format="$2" ;;
|
||||
"--song_shorthand") song_shorthand="$2" ;;
|
||||
"--music_player") music_player="$2" ;;
|
||||
"--memory_percent") memory_percent="$2" ;;
|
||||
"--cpu_temp")
|
||||
cpu_temp="$2"
|
||||
[[ "$cpu_temp" == "on" ]] && cpu_temp="C"
|
||||
@@ -4565,7 +4577,7 @@ get_args() {
|
||||
# Image backend
|
||||
"--backend") image_backend="$2" ;;
|
||||
"--source") image_source="$2" ;;
|
||||
"--ascii" | "--caca" | "--jp2a" | "--iterm2" | "--off" | "--pixterm" |\
|
||||
"--ascii" | "--caca" | "--chafa" | "--jp2a" | "--iterm2" | "--off" | "--pixterm" |\
|
||||
"--sixel" | "--termpix" | "--tycat" | "--w3m" | "--kitty")
|
||||
image_backend="${1/--}"
|
||||
case "$2" in
|
||||
@@ -4609,7 +4621,7 @@ get_args() {
|
||||
"--ascii_bold") ascii_bold="$2" ;;
|
||||
"--logo" | "-L")
|
||||
image_backend="ascii"
|
||||
print_info() { info line_break; }
|
||||
print_info() { printf '\n'; }
|
||||
;;
|
||||
|
||||
# Other
|
||||
@@ -4639,7 +4651,7 @@ get_args() {
|
||||
|
||||
"--json")
|
||||
json="on"
|
||||
unset -f get_title get_cols get_line_break get_underline
|
||||
unset -f get_title get_cols get_underline
|
||||
|
||||
printf '{\n'
|
||||
print_info 2>/dev/null
|
||||
@@ -4681,9 +4693,7 @@ get_args() {
|
||||
info "Public IP" public_ip
|
||||
info "Users" users
|
||||
|
||||
info line_break
|
||||
info cols
|
||||
info line_break
|
||||
|
||||
# Testing.
|
||||
prin "prin"
|
||||
@@ -4713,7 +4723,7 @@ get_args() {
|
||||
|
||||
get_simple() {
|
||||
while [[ "$1" ]]; do
|
||||
[[ $(type -t "get_$1") == function ]] && {
|
||||
[[ "$(type -t "get_$1")" == "function" ]] && {
|
||||
get_distro
|
||||
stdout
|
||||
simple=1
|
||||
@@ -4724,6 +4734,11 @@ get_simple() {
|
||||
((simple)) && exit
|
||||
}
|
||||
|
||||
old_functions() {
|
||||
# Removed functions for backwards compatability.
|
||||
get_line_break() { :; }
|
||||
}
|
||||
|
||||
get_distro_ascii() {
|
||||
# This function gets the distro ascii art and colors.
|
||||
#
|
||||
@@ -5222,6 +5237,29 @@ ${c1}:syyyyyy/ :yyyyyy/${c2}-yyo.:syyyyyyyyyyy
|
||||
EOF
|
||||
;;
|
||||
|
||||
"Bedrock"*)
|
||||
set_colors 8 7
|
||||
read -rd '' ascii_data <<'EOF'
|
||||
${c1}--------------------------------------
|
||||
--------------------------------------
|
||||
--------------------------------------
|
||||
---${c2}\\\\\\\\\\\\\\\\\\\\\\\\${c1}-----------------------
|
||||
----${c2}\\\\\\ \\\\\\${c1}----------------------
|
||||
-----${c2}\\\\\\ \\\\\\${c1}---------------------
|
||||
------${c2}\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\${c1}------
|
||||
-------${c2}\\\\\\ \\\\\\${c1}-----
|
||||
--------${c2}\\\\\\ \\\\\\${c1}----
|
||||
---------${c2}\\\\\\ ______ \\\\\\${c1}---
|
||||
----------${c2}\\\\\\ ///${c1}---
|
||||
-----------${c2}\\\\\\ ///${c1}----
|
||||
------------${c2}\\\\\\ ///${c1}-----
|
||||
-------------${c2}\\\\\\////////////////${c1}------
|
||||
--------------------------------------
|
||||
--------------------------------------
|
||||
--------------------------------------
|
||||
EOF
|
||||
;;
|
||||
|
||||
"Bitrig"*)
|
||||
set_colors 2 7
|
||||
read -rd '' ascii_data <<'EOF'
|
||||
@@ -5657,7 +5695,7 @@ EOF
|
||||
"debian_small")
|
||||
set_colors 1 7 3
|
||||
read -rd '' ascii_data <<'EOF'
|
||||
${c1}_____
|
||||
${c1} _____
|
||||
/ __ \\
|
||||
| / |
|
||||
| \\___-
|
||||
@@ -6165,8 +6203,8 @@ EOF
|
||||
"GoboLinux"*)
|
||||
set_colors 5 4 6 2
|
||||
read -rd '' ascii_data <<'EOF'
|
||||
${c1}_____ _
|
||||
/ ____| | |
|
||||
${c1} _____ _
|
||||
/ ____| | |
|
||||
| | __ ___ | |__ ___
|
||||
| | |_ |/ _ \| '_ \ / _ \
|
||||
| |__| | (_) | |_) | (_) |
|
||||
@@ -8441,12 +8479,12 @@ EOF
|
||||
set_colors 2 8
|
||||
read -rd '' ascii_data <<'EOF'
|
||||
${c1} _______
|
||||
_ \______ -
|
||||
| \ ___ \ |
|
||||
_ \\______ -
|
||||
| \\ ___ \\ |
|
||||
| | / \ | |
|
||||
| | \___/ | |
|
||||
| \______ \_|
|
||||
-_______\
|
||||
| \\______ \\_|
|
||||
-_______\\
|
||||
EOF
|
||||
;;
|
||||
|
||||
@@ -8739,6 +8777,7 @@ main() {
|
||||
|
||||
image_backend
|
||||
get_cache_dir
|
||||
old_functions
|
||||
print_info
|
||||
dynamic_prompt
|
||||
|
||||
|
||||
27
neofetch.1
27
neofetch.1
@@ -1,5 +1,5 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.8.
|
||||
.TH NEOFETCH "1" "January 2019" "Neofetch 5.0.1" "User Commands"
|
||||
.TH NEOFETCH "1" "January 2019" "Neofetch 6.0.1" "User Commands"
|
||||
.SH NAME
|
||||
Neofetch \- A fast, highly customizable system info script
|
||||
.SH SYNOPSIS
|
||||
@@ -40,8 +40,8 @@ For example: 'info "Memory" memory' would be '\-\-disable memory'
|
||||
.IP
|
||||
NOTE: You can supply multiple args. eg. 'neofetch \fB\-\-disable\fR cpu gpu'
|
||||
.TP
|
||||
\fB\-\-package_managers\fR on/off
|
||||
Hide/Show Package Manager names . (tiny, on, off)
|
||||
\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.
|
||||
@@ -79,8 +79,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/off
|
||||
Shorten the output of distro (tiny, on, off)
|
||||
\fB\-\-distro_shorthand\fR on/tiny/off
|
||||
Shorten the output of distro (on, tiny, off)
|
||||
.IP
|
||||
NOTE: This option won't work in Windows (Cygwin)
|
||||
.TP
|
||||
@@ -89,8 +89,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/off
|
||||
Shorten the output of uptime (tiny, on, off)
|
||||
\fB\-\-uptime_shorthand\fR on/tiny/off
|
||||
Shorten the output of uptime (on, tiny, off)
|
||||
.TP
|
||||
\fB\-\-refresh_rate\fR on/off
|
||||
Whether to display the refresh rate of each monitor
|
||||
@@ -138,12 +138,18 @@ 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
|
||||
@@ -211,8 +217,8 @@ Possible values: bar, infobar, barinfo, off
|
||||
.TP
|
||||
\fB\-\-backend\fR backend
|
||||
Which image backend to use.
|
||||
Possible values: 'ascii', 'caca', 'jp2a', 'iterm2', 'off',
|
||||
\&'sixel', 'tycat', 'w3m'
|
||||
Possible values: 'ascii', 'caca', 'chafa', 'jp2a', 'iterm2',
|
||||
\&'off', 'sixel', 'tycat', 'w3m'
|
||||
.TP
|
||||
\fB\-\-source\fR source
|
||||
Which image or ascii file to use.
|
||||
@@ -227,6 +233,9 @@ NEW: neofetch \fB\-\-ascii\fR "$(fortune | cowsay \fB\-W\fR 30)"
|
||||
\fB\-\-caca\fR source
|
||||
Shortcut to use 'caca' backend.
|
||||
.TP
|
||||
\fB\-\-chafa\fR source
|
||||
Shortcut to use 'chafa' backend.
|
||||
.TP
|
||||
\fB\-\-iterm2\fR source
|
||||
Shortcut to use 'iterm2' backend.
|
||||
.TP
|
||||
|
||||
Reference in New Issue
Block a user