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/)
|
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">
|
||||||
|
|
||||||
|
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**
|
||||||
|
|
||||||
- [**@nero**](https://github.com/nero)
|
[**@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),
|
||||||
- [**@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),
|
||||||
- [**@plgruener**](https://github.com/plgruener)
|
[**@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)
|
||||||
- [**@StarryTony**](https://github.com/StarryTony)
|
|
||||||
- [**@julianaito**](https://github.com/julianaito)
|
|
||||||
- [**@HolyStephano**](https://github.com/HolyStephano)
|
**Breaking Changes**
|
||||||
- [**@nikitenich**](https://github.com/nikitenich)
|
|
||||||
|
- **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**
|
**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)
|
- **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** [macOS]: Added detection of Nix [**@alyssais**](https://github.com/alyssais)
|
||||||
- **Packages**: Fixed packages from pkginfo (pkgutils) not appearing in CRUX/Janus Linux.
|
- **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**: 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** [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)
|
||||||
- **WM** [OpenBSD]: Added a new `ps_flags` to correctly detect non-EWMH WMs. [**@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)
|
- **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**
|
**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 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.
|
- Do not parse file as ASCII if the source is an image file.
|
||||||
|
|
||||||
**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)
|
||||||
|
- Thumbnails are high quality again.
|
||||||
|
- Cached thumbnails are now stored with PATH to prevent collision issues.
|
||||||
|
|
||||||
## [5.0.0] - 2018-06-18
|
## [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)\]
|
### 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>
|
|
||||||
|
|
||||||
|
|||||||
335
neofetch
335
neofetch
@@ -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="5.0.1"
|
version="6.0.1"
|
||||||
|
|
||||||
bash_version="${BASH_VERSION/.*}"
|
bash_version="${BASH_VERSION/.*}"
|
||||||
sys_locale="${LANG:-C}"
|
sys_locale="${LANG:-C}"
|
||||||
@@ -76,15 +76,13 @@ 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
|
||||||
# info "Locale" locale # This only works on glibc systems.
|
# info "Locale" locale # This only works on glibc systems.
|
||||||
|
|
||||||
info line_break
|
|
||||||
info cols
|
info cols
|
||||||
info line_break
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -110,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"
|
||||||
@@ -134,16 +132,31 @@ 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"
|
||||||
|
|
||||||
|
|
||||||
|
# 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
|
# Packages
|
||||||
|
|
||||||
|
|
||||||
@@ -362,6 +375,12 @@ gtk3="on"
|
|||||||
# Flag: --ip_host
|
# Flag: --ip_host
|
||||||
public_ip_host="http://ident.me"
|
public_ip_host="http://ident.me"
|
||||||
|
|
||||||
|
# Public IP timeout.
|
||||||
|
#
|
||||||
|
# Default: '2'
|
||||||
|
# Values: 'int'
|
||||||
|
# Flag: --ip_timeout
|
||||||
|
public_ip_timeout=2
|
||||||
|
|
||||||
|
|
||||||
# Disk
|
# Disk
|
||||||
@@ -650,7 +669,8 @@ disk_display="off"
|
|||||||
# Image backend.
|
# Image backend.
|
||||||
#
|
#
|
||||||
# Default: 'ascii'
|
# 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
|
# Flag: --backend
|
||||||
image_backend="ascii"
|
image_backend="ascii"
|
||||||
|
|
||||||
@@ -829,7 +849,12 @@ get_distro() {
|
|||||||
|
|
||||||
case "$os" in
|
case "$os" in
|
||||||
"Linux" | "BSD" | "MINIX")
|
"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
|
case "$distro_shorthand" in
|
||||||
"on" | "tiny") distro="Red Star OS" ;;
|
"on" | "tiny") distro="Red Star OS" ;;
|
||||||
*) distro="Red Star OS $(awk -F'[^0-9*]' '$0=$2' /etc/redstar-release)"
|
*) 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.
|
# 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" || \
|
||||||
@@ -900,11 +925,6 @@ get_distro() {
|
|||||||
"tiny") distro="${NAME:-${DISTRIB_ID:-${TAILS_PRODUCT_NAME}}}" ;;
|
"tiny") distro="${NAME:-${DISTRIB_ID:-${TAILS_PRODUCT_NAME}}}" ;;
|
||||||
"off") distro="${PRETTY_NAME:-${DISTRIB_DESCRIPTION}} ${UBUNTU_CODENAME}" ;;
|
"off") distro="${PRETTY_NAME:-${DISTRIB_DESCRIPTION}} ${UBUNTU_CODENAME}" ;;
|
||||||
esac
|
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
|
else
|
||||||
for release_file in /etc/*-release; do
|
for release_file in /etc/*-release; do
|
||||||
distro+="$(< "$release_file")"
|
distro+="$(< "$release_file")"
|
||||||
@@ -918,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
|
||||||
@@ -926,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" ;;
|
||||||
@@ -1039,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
|
||||||
;;
|
;;
|
||||||
@@ -1272,6 +1291,16 @@ get_packages() {
|
|||||||
pac() { (($1 > 0)) && { managers+=("$1 (${manager})"); manager_string+="${manager}, "; }; }
|
pac() { (($1 > 0)) && { managers+=("$1 (${manager})"); manager_string+="${manager}, "; }; }
|
||||||
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.
|
||||||
|
[[ -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
|
case "$os" in
|
||||||
"Linux" | "BSD" | "iPhone OS" | "Solaris")
|
"Linux" | "BSD" | "iPhone OS" | "Solaris")
|
||||||
# Package Manager Programs.
|
# Package Manager Programs.
|
||||||
@@ -1291,21 +1320,27 @@ get_packages() {
|
|||||||
has "butch" && tot butch list
|
has "butch" && tot butch list
|
||||||
|
|
||||||
# Counting files/dirs.
|
# Counting files/dirs.
|
||||||
has "emerge" && dir /var/db/pkg/*/*/
|
# Variables need to be unquoted here. Only Bedrock Linux is affected.
|
||||||
has "nix-env" && dir /nix/store/*/
|
# $br_prefix is fixed and won't change based on user input so this is safe either way.
|
||||||
has "guix" && dir /gnu/store/*/
|
# shellcheck disable=SC2086
|
||||||
has "Compile" && dir /Programs/*/
|
{
|
||||||
has "eopkg" && dir /var/lib/eopkg/package/*
|
has "emerge" && dir ${br_prefix}/var/db/pkg/*/*/
|
||||||
has "crew" && dir /usr/local/etc/crew/meta/*.filelist
|
has "nix-env" && dir ${br_prefix}/nix/store/*/
|
||||||
has "pkgtool" && dir /var/log/packages/*
|
has "guix" && dir ${br_prefix}/gnu/store/*/
|
||||||
has "cave" && dir /var/db/paludis/repositories/cross-installed/*/data/*/ \
|
has "Compile" && dir ${br_prefix}/Programs/*/
|
||||||
/var/db/paludis/repositories/installed/data/*/
|
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)
|
# Other (Needs complex command)
|
||||||
has "kpm-pkg" && ((packages+="$(kpm --get-selections | grep -cv deinstall$)"))
|
has "kpm-pkg" && ((packages+="$(kpm --get-selections | grep -cv deinstall$)"))
|
||||||
|
|
||||||
# pkginfo is also the name of a python package manager.
|
# pkginfo is also the name of a python package manager which is painfully slow.
|
||||||
[[ $os != "Linux" ]] && has "pkginfo" && tot pkginfo -i
|
# TODO: Fix this somehow.
|
||||||
|
has pkginfo && tot pkginfo -i
|
||||||
|
|
||||||
case "$kernel_name" in
|
case "$kernel_name" in
|
||||||
"FreeBSD") has "pkg" && tot pkg info ;;
|
"FreeBSD") has "pkg" && tot pkg info ;;
|
||||||
@@ -1803,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
|
||||||
@@ -2067,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.
|
||||||
@@ -2318,7 +2350,10 @@ get_memory() {
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
esac
|
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.
|
# Bars.
|
||||||
case "$memory_display" in
|
case "$memory_display" in
|
||||||
@@ -2370,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.
|
||||||
@@ -2579,6 +2613,7 @@ get_resolution() {
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
resolution="${resolution%,*}"
|
resolution="${resolution%,*}"
|
||||||
|
[[ -z "${resolution/x}" ]] && resolution=
|
||||||
}
|
}
|
||||||
|
|
||||||
get_style() {
|
get_style() {
|
||||||
@@ -2757,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
|
||||||
@@ -2881,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}"
|
||||||
@@ -2925,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)"
|
||||||
@@ -2990,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.
|
||||||
@@ -3043,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
|
||||||
@@ -3275,11 +3308,11 @@ get_public_ip() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z "$public_ip" ]] && type -p curl >/dev/null; then
|
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
|
fi
|
||||||
|
|
||||||
if [[ -z "$public_ip" ]] && type -p wget >/dev/null; then
|
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
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3305,6 +3338,7 @@ get_gpu_driver() {
|
|||||||
gpu_driver="NVIDIA ${gpu_driver/ *}"
|
gpu_driver="NVIDIA ${gpu_driver/ *}"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"Mac OS X")
|
"Mac OS X")
|
||||||
if [[ "$(kextstat | grep "GeForceWeb")" != "" ]]; then
|
if [[ "$(kextstat | grep "GeForceWeb")" != "" ]]; then
|
||||||
gpu_driver="NVIDIA Web Driver"
|
gpu_driver="NVIDIA Web Driver"
|
||||||
@@ -3316,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"
|
||||||
@@ -3347,9 +3383,9 @@ get_cols() {
|
|||||||
cols="${cols//nl/\\n\\e[${text_padding}C${zws}}"
|
cols="${cols//nl/\\n\\e[${text_padding}C${zws}}"
|
||||||
|
|
||||||
# Add block height to info height.
|
# 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
|
fi
|
||||||
|
|
||||||
unset -v blocks blocks2 cols
|
unset -v blocks blocks2 cols
|
||||||
@@ -3369,10 +3405,10 @@ 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" | "jp2a" | "iterm2" | "termpix" |\
|
"caca" | "chafa" | "jp2a" | "iterm2" | "termpix" |\
|
||||||
"tycat" | "w3m" | "sixel" | "pixterm" | "kitty")
|
"tycat" | "w3m" | "sixel" | "pixterm" | "kitty")
|
||||||
get_image_source
|
get_image_source
|
||||||
|
|
||||||
@@ -3397,10 +3433,10 @@ image_backend() {
|
|||||||
|
|
||||||
*)
|
*)
|
||||||
err "Image: Unknown image backend specified '$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')"
|
'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
|
||||||
|
|
||||||
@@ -3408,24 +3444,26 @@ 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"
|
||||||
|
|
||||||
# Calculate size of ascii file in line length / line count.
|
# Calculate size of ascii file in line length / line count.
|
||||||
while IFS=$'\n' read -r line; do
|
while IFS=$'\n' read -r line; do
|
||||||
|
line="${line//\\\\/\\}"
|
||||||
((++lines,${#line}>ascii_len)) && ascii_len="${#line}"
|
((++lines,${#line}>ascii_len)) && ascii_len="${#line}"
|
||||||
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}"
|
||||||
@@ -3561,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)
|
||||||
@@ -3684,9 +3683,12 @@ get_image_size() {
|
|||||||
*) image_size="${image_size/px}" ;;
|
*) image_size="${image_size/px}" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
# Check for terminal padding.
|
||||||
|
[[ "$image_backend" == "w3m" ]] && term_padding
|
||||||
|
|
||||||
width="${width:-$image_size}"
|
width="${width:-$image_size}"
|
||||||
height="${height:-$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() {
|
make_thumbnail() {
|
||||||
@@ -3747,11 +3749,9 @@ make_thumbnail() {
|
|||||||
-background none \
|
-background none \
|
||||||
"$image" \
|
"$image" \
|
||||||
-strip \
|
-strip \
|
||||||
-define "jpeg:size=100x100" \
|
|
||||||
-gravity "$crop_offset" \
|
-gravity "$crop_offset" \
|
||||||
-crop "${size}x${size}+0+0" \
|
-crop "${size}x${size}+0+0" \
|
||||||
-quality 40 \
|
-scale "${width}x${height}" \
|
||||||
-sample "${width}x${height}" \
|
|
||||||
"${thumbnail_dir}/${image_name}"
|
"${thumbnail_dir}/${image_name}"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@@ -3765,17 +3765,21 @@ display_image() {
|
|||||||
case "$image_backend" in
|
case "$image_backend" in
|
||||||
"caca")
|
"caca")
|
||||||
img2txt \
|
img2txt \
|
||||||
-W "$((width / font_width)))" \
|
-W "$((width / font_width))" \
|
||||||
-H "$((height / font_height))" \
|
-H "$((height / font_height))" \
|
||||||
--gamma=0.6 \
|
--gamma=0.6 \
|
||||||
"$image"
|
"$image"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
"chafa")
|
||||||
|
chafa --size="$((width / font_width))x$((height / font_height))" "$image"
|
||||||
|
;;
|
||||||
|
|
||||||
"jp2a")
|
"jp2a")
|
||||||
jp2a \
|
jp2a \
|
||||||
|
--colors \
|
||||||
--width="$((width / font_width))" \
|
--width="$((width / font_width))" \
|
||||||
--height="$((height / font_height))" \
|
--height="$((height / font_height))" \
|
||||||
--colors \
|
|
||||||
"$image"
|
"$image"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@@ -3829,7 +3833,7 @@ display_image() {
|
|||||||
|
|
||||||
# Add a tiny delay to fix issues with images not
|
# Add a tiny delay to fix issues with images not
|
||||||
# appearing in specific terminal emulators.
|
# 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 |\
|
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
|
"${w3m_img_path:-false}" -bg "$background_color" &>/dev/null
|
||||||
;;
|
;;
|
||||||
@@ -3839,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}"
|
||||||
@@ -3906,7 +3910,7 @@ prin() {
|
|||||||
string="${subtitle_color}${bold}${string}"
|
string="${subtitle_color}${bold}${string}"
|
||||||
|
|
||||||
# Print the info.
|
# 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.
|
# Calculate info height.
|
||||||
((++info_height))
|
((++info_height))
|
||||||
@@ -3927,17 +3931,6 @@ get_underline() {
|
|||||||
prin=1
|
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() {
|
get_bold() {
|
||||||
case "$ascii_bold" in
|
case "$ascii_bold" in
|
||||||
"on") ascii_bold='\e[1m' ;;
|
"on") ascii_bold='\e[1m' ;;
|
||||||
@@ -4038,7 +4031,7 @@ color() {
|
|||||||
stdout() {
|
stdout() {
|
||||||
image_backend="off"
|
image_backend="off"
|
||||||
unset subtitle_color colon_color info_color underline_color bold title_color at_color \
|
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
|
c1 c2 c3 c4 c5 c6 c7 c8
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4158,9 +4151,23 @@ kde_config_dir() {
|
|||||||
kde_config_dir="${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() {
|
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))
|
||||||
|
|
||||||
# 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))
|
||||||
@@ -4272,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,
|
||||||
@@ -4299,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)
|
||||||
|
|
||||||
@@ -4307,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)
|
||||||
@@ -4335,8 +4342,10 @@ INFO:
|
|||||||
'dir' shows the basename of the disks's path. (/, Local Disk, etc)
|
'dir' shows the basename of the disks's path. (/, Local Disk, etc)
|
||||||
|
|
||||||
--ip_host url URL to query for public IP
|
--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_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.
|
--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.
|
--music_player player-name Manually specify a player to use.
|
||||||
Available values are listed in the config file
|
Available values are listed in the config file
|
||||||
|
|
||||||
@@ -4372,8 +4381,8 @@ BARS:
|
|||||||
|
|
||||||
IMAGE BACKEND:
|
IMAGE BACKEND:
|
||||||
--backend backend Which image backend to use.
|
--backend backend Which image backend to use.
|
||||||
Possible values: 'ascii', 'caca', 'jp2a', 'iterm2', 'off',
|
Possible values: 'ascii', 'caca', 'chafa', 'jp2a', 'iterm2',
|
||||||
'sixel', 'tycat', 'w3m'
|
'off', 'sixel', 'tycat', 'w3m'
|
||||||
--source source Which image or ascii file to use.
|
--source source Which image or ascii file to use.
|
||||||
Possible values: 'auto', 'ascii', 'wallpaper', '/path/to/img',
|
Possible values: 'auto', 'ascii', 'wallpaper', '/path/to/img',
|
||||||
'/path/to/ascii', '/path/to/dir/', 'command output' [ascii]
|
'/path/to/ascii', '/path/to/dir/', 'command output' [ascii]
|
||||||
@@ -4383,6 +4392,7 @@ IMAGE BACKEND:
|
|||||||
NEW: neofetch --ascii \"\$(fortune | cowsay -W 30)\"
|
NEW: neofetch --ascii \"\$(fortune | cowsay -W 30)\"
|
||||||
|
|
||||||
--caca source Shortcut to use 'caca' backend.
|
--caca source Shortcut to use 'caca' backend.
|
||||||
|
--chafa source Shortcut to use 'chafa' backend.
|
||||||
--iterm2 source Shortcut to use 'iterm2' backend.
|
--iterm2 source Shortcut to use 'iterm2' backend.
|
||||||
--jp2a source Shortcut to use 'jp2a' backend.
|
--jp2a source Shortcut to use 'jp2a' backend.
|
||||||
--kitty source Shortcut to use 'kitty' backend.
|
--kitty source Shortcut to use 'kitty' backend.
|
||||||
@@ -4487,9 +4497,11 @@ get_args() {
|
|||||||
"--shell_path") shell_path="$2" ;;
|
"--shell_path") shell_path="$2" ;;
|
||||||
"--shell_version") shell_version="$2" ;;
|
"--shell_version") shell_version="$2" ;;
|
||||||
"--ip_host") public_ip_host="$2" ;;
|
"--ip_host") public_ip_host="$2" ;;
|
||||||
|
"--ip_timeout") public_ip_timeout="$2" ;;
|
||||||
"--song_format") song_format="$2" ;;
|
"--song_format") song_format="$2" ;;
|
||||||
"--song_shorthand") song_shorthand="$2" ;;
|
"--song_shorthand") song_shorthand="$2" ;;
|
||||||
"--music_player") music_player="$2" ;;
|
"--music_player") music_player="$2" ;;
|
||||||
|
"--memory_percent") memory_percent="$2" ;;
|
||||||
"--cpu_temp")
|
"--cpu_temp")
|
||||||
cpu_temp="$2"
|
cpu_temp="$2"
|
||||||
[[ "$cpu_temp" == "on" ]] && cpu_temp="C"
|
[[ "$cpu_temp" == "on" ]] && cpu_temp="C"
|
||||||
@@ -4565,7 +4577,7 @@ get_args() {
|
|||||||
# Image backend
|
# Image backend
|
||||||
"--backend") image_backend="$2" ;;
|
"--backend") image_backend="$2" ;;
|
||||||
"--source") image_source="$2" ;;
|
"--source") image_source="$2" ;;
|
||||||
"--ascii" | "--caca" | "--jp2a" | "--iterm2" | "--off" | "--pixterm" |\
|
"--ascii" | "--caca" | "--chafa" | "--jp2a" | "--iterm2" | "--off" | "--pixterm" |\
|
||||||
"--sixel" | "--termpix" | "--tycat" | "--w3m" | "--kitty")
|
"--sixel" | "--termpix" | "--tycat" | "--w3m" | "--kitty")
|
||||||
image_backend="${1/--}"
|
image_backend="${1/--}"
|
||||||
case "$2" in
|
case "$2" in
|
||||||
@@ -4609,7 +4621,7 @@ get_args() {
|
|||||||
"--ascii_bold") ascii_bold="$2" ;;
|
"--ascii_bold") ascii_bold="$2" ;;
|
||||||
"--logo" | "-L")
|
"--logo" | "-L")
|
||||||
image_backend="ascii"
|
image_backend="ascii"
|
||||||
print_info() { info line_break; }
|
print_info() { printf '\n'; }
|
||||||
;;
|
;;
|
||||||
|
|
||||||
# Other
|
# Other
|
||||||
@@ -4639,7 +4651,7 @@ get_args() {
|
|||||||
|
|
||||||
"--json")
|
"--json")
|
||||||
json="on"
|
json="on"
|
||||||
unset -f get_title get_cols get_line_break get_underline
|
unset -f get_title get_cols get_underline
|
||||||
|
|
||||||
printf '{\n'
|
printf '{\n'
|
||||||
print_info 2>/dev/null
|
print_info 2>/dev/null
|
||||||
@@ -4681,9 +4693,7 @@ get_args() {
|
|||||||
info "Public IP" public_ip
|
info "Public IP" public_ip
|
||||||
info "Users" users
|
info "Users" users
|
||||||
|
|
||||||
info line_break
|
|
||||||
info cols
|
info cols
|
||||||
info line_break
|
|
||||||
|
|
||||||
# Testing.
|
# Testing.
|
||||||
prin "prin"
|
prin "prin"
|
||||||
@@ -4713,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
|
||||||
@@ -4724,6 +4734,11 @@ get_simple() {
|
|||||||
((simple)) && exit
|
((simple)) && exit
|
||||||
}
|
}
|
||||||
|
|
||||||
|
old_functions() {
|
||||||
|
# Removed functions for backwards compatability.
|
||||||
|
get_line_break() { :; }
|
||||||
|
}
|
||||||
|
|
||||||
get_distro_ascii() {
|
get_distro_ascii() {
|
||||||
# This function gets the distro ascii art and colors.
|
# This function gets the distro ascii art and colors.
|
||||||
#
|
#
|
||||||
@@ -5222,6 +5237,29 @@ ${c1}:syyyyyy/ :yyyyyy/${c2}-yyo.:syyyyyyyyyyy
|
|||||||
EOF
|
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"*)
|
"Bitrig"*)
|
||||||
set_colors 2 7
|
set_colors 2 7
|
||||||
read -rd '' ascii_data <<'EOF'
|
read -rd '' ascii_data <<'EOF'
|
||||||
@@ -5657,7 +5695,7 @@ EOF
|
|||||||
"debian_small")
|
"debian_small")
|
||||||
set_colors 1 7 3
|
set_colors 1 7 3
|
||||||
read -rd '' ascii_data <<'EOF'
|
read -rd '' ascii_data <<'EOF'
|
||||||
${c1}_____
|
${c1} _____
|
||||||
/ __ \\
|
/ __ \\
|
||||||
| / |
|
| / |
|
||||||
| \\___-
|
| \\___-
|
||||||
@@ -6165,8 +6203,8 @@ EOF
|
|||||||
"GoboLinux"*)
|
"GoboLinux"*)
|
||||||
set_colors 5 4 6 2
|
set_colors 5 4 6 2
|
||||||
read -rd '' ascii_data <<'EOF'
|
read -rd '' ascii_data <<'EOF'
|
||||||
${c1}_____ _
|
${c1} _____ _
|
||||||
/ ____| | |
|
/ ____| | |
|
||||||
| | __ ___ | |__ ___
|
| | __ ___ | |__ ___
|
||||||
| | |_ |/ _ \| '_ \ / _ \
|
| | |_ |/ _ \| '_ \ / _ \
|
||||||
| |__| | (_) | |_) | (_) |
|
| |__| | (_) | |_) | (_) |
|
||||||
@@ -8441,12 +8479,12 @@ EOF
|
|||||||
set_colors 2 8
|
set_colors 2 8
|
||||||
read -rd '' ascii_data <<'EOF'
|
read -rd '' ascii_data <<'EOF'
|
||||||
${c1} _______
|
${c1} _______
|
||||||
_ \______ -
|
_ \\______ -
|
||||||
| \ ___ \ |
|
| \\ ___ \\ |
|
||||||
| | / \ | |
|
| | / \ | |
|
||||||
| | \___/ | |
|
| | \___/ | |
|
||||||
| \______ \_|
|
| \\______ \\_|
|
||||||
-_______\
|
-_______\\
|
||||||
EOF
|
EOF
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@@ -8739,6 +8777,7 @@ main() {
|
|||||||
|
|
||||||
image_backend
|
image_backend
|
||||||
get_cache_dir
|
get_cache_dir
|
||||||
|
old_functions
|
||||||
print_info
|
print_info
|
||||||
dynamic_prompt
|
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.
|
.\" 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
|
.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
|
||||||
@@ -138,12 +138,18 @@ Takes: name, mount, dir
|
|||||||
\fB\-\-ip_host\fR url
|
\fB\-\-ip_host\fR url
|
||||||
URL to query for public IP
|
URL to query for public IP
|
||||||
.TP
|
.TP
|
||||||
|
\fB\-\-ip_timeout\fR int
|
||||||
|
Public IP timeout (in seconds).
|
||||||
|
.TP
|
||||||
\fB\-\-song_format\fR format
|
\fB\-\-song_format\fR format
|
||||||
Print the song data in a specific format (see config file).
|
Print the song data in a specific format (see config file).
|
||||||
.TP
|
.TP
|
||||||
\fB\-\-song_shorthand\fR on/off
|
\fB\-\-song_shorthand\fR on/off
|
||||||
Print the Artist/Album/Title on separate lines.
|
Print the Artist/Album/Title on separate lines.
|
||||||
.TP
|
.TP
|
||||||
|
\fB\-\-memory_percent\fR on/off
|
||||||
|
Display memory percentage.
|
||||||
|
.TP
|
||||||
\fB\-\-music_player\fR player\-name
|
\fB\-\-music_player\fR player\-name
|
||||||
Manually specify a player to use.
|
Manually specify a player to use.
|
||||||
Available values are listed in the config file
|
Available values are listed in the config file
|
||||||
@@ -211,8 +217,8 @@ Possible values: bar, infobar, barinfo, off
|
|||||||
.TP
|
.TP
|
||||||
\fB\-\-backend\fR backend
|
\fB\-\-backend\fR backend
|
||||||
Which image backend to use.
|
Which image backend to use.
|
||||||
Possible values: 'ascii', 'caca', 'jp2a', 'iterm2', 'off',
|
Possible values: 'ascii', 'caca', 'chafa', 'jp2a', 'iterm2',
|
||||||
\&'sixel', 'tycat', 'w3m'
|
\&'off', 'sixel', 'tycat', 'w3m'
|
||||||
.TP
|
.TP
|
||||||
\fB\-\-source\fR source
|
\fB\-\-source\fR source
|
||||||
Which image or ascii file to use.
|
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
|
\fB\-\-caca\fR source
|
||||||
Shortcut to use 'caca' backend.
|
Shortcut to use 'caca' backend.
|
||||||
.TP
|
.TP
|
||||||
|
\fB\-\-chafa\fR source
|
||||||
|
Shortcut to use 'chafa' backend.
|
||||||
|
.TP
|
||||||
\fB\-\-iterm2\fR source
|
\fB\-\-iterm2\fR source
|
||||||
Shortcut to use 'iterm2' backend.
|
Shortcut to use 'iterm2' backend.
|
||||||
.TP
|
.TP
|
||||||
|
|||||||
Reference in New Issue
Block a user