mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-12-17 17:37:11 +00:00
Compare commits
72 Commits
comp
...
ascii-imag
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
754ffe2fae | ||
|
|
17f2f5b2a6 | ||
|
|
8ee4710225 | ||
|
|
b8eb8fbaa7 | ||
|
|
3b5ec364e6 | ||
|
|
6c38b81fe1 | ||
|
|
6775a652d3 | ||
|
|
5d33b8d99d | ||
|
|
614fad0421 | ||
|
|
2fef4d9849 | ||
|
|
78f355ba6d | ||
|
|
085bba208a | ||
|
|
9fe7ec4ccf | ||
|
|
2cc7b84189 | ||
|
|
2afc5a27af | ||
|
|
f960594cd4 | ||
|
|
71df4ffd3b | ||
|
|
1332874265 | ||
|
|
22df76c3b6 | ||
|
|
497b782ea1 | ||
|
|
c99fc64b67 | ||
|
|
d43da37d00 | ||
|
|
911c70adc3 | ||
|
|
f70390ede0 | ||
|
|
c651f5e068 | ||
|
|
288036eb26 | ||
|
|
aae3271422 | ||
|
|
61ee751147 | ||
|
|
50804a6877 | ||
|
|
ef94cc6764 | ||
|
|
31af4fe003 | ||
|
|
1da3523e9e | ||
|
|
a596b6467f | ||
|
|
c152801a8a | ||
|
|
97b4f04d33 | ||
|
|
cf07cb0c35 | ||
|
|
af455b2967 | ||
|
|
bdd21fa8a7 | ||
|
|
8a2e973814 | ||
|
|
2bdb5f3b01 | ||
|
|
d35574352f | ||
|
|
01bd13a3b5 | ||
|
|
94362674f2 | ||
|
|
2783446387 | ||
|
|
afb6782a88 | ||
|
|
24f5259339 | ||
|
|
536c0b0ef7 | ||
|
|
b3e6b7e818 | ||
|
|
4ac3dedaa0 | ||
|
|
1fc48be2f4 | ||
|
|
dfafca9f62 | ||
|
|
ea462a8ec1 | ||
|
|
94ae0099be | ||
|
|
e7306982e9 | ||
|
|
40bf68af26 | ||
|
|
078cda7b48 | ||
|
|
329abc5c46 | ||
|
|
440e8ca7b1 | ||
|
|
34eacd561b | ||
|
|
abe6b82fc7 | ||
|
|
26389a8423 | ||
|
|
daf866039e | ||
|
|
059239d2a7 | ||
|
|
8cfabdae47 | ||
|
|
b30151e6dd | ||
|
|
93ffa118a3 | ||
|
|
e7645597e1 | ||
|
|
428b73fc5a | ||
|
|
e95776d40b | ||
|
|
d8f7e8df54 | ||
|
|
bc9fd232e4 | ||
|
|
f847b05e32 |
53
CHANGELOG.md
53
CHANGELOG.md
@@ -7,19 +7,42 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
**Contributors**
|
||||||
|
|
||||||
|
- [**@nero**](https://github.com/nero)
|
||||||
|
- [**@alyssais**](https://github.com/alyssais)
|
||||||
|
- [**@plgruener**](https://github.com/plgruener)
|
||||||
|
|
||||||
|
**Info**
|
||||||
|
|
||||||
|
- **Shell**: Fixed output for mksh [**@nero**](https://github.com/nero)
|
||||||
|
- **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)
|
||||||
|
|
||||||
|
**ASCII**
|
||||||
|
|
||||||
|
- Fixed a bug where ASCII logo changes the terminal foreground color. [**@plgruener**](https://github.com/plgruener)
|
||||||
|
|
||||||
|
## [5.0.0] - 2018-06-18
|
||||||
|
|
||||||
<img src="https://i.imgur.com/ZQI2EYz.png" alt="logo" height="100px">
|
<img src="https://i.imgur.com/ZQI2EYz.png" alt="logo" height="100px">
|
||||||
|
|
||||||
|
A lot of the script has been rewritten and all lint errors have been resolved. There's probably a few bugs so the version number has been bumped to `5.0`. Expect a minor release in the coming days to fix any bugs that come up. Thanks to everyone who contributed to this release.
|
||||||
|
|
||||||
**Contributors**
|
**Contributors**
|
||||||
|
|
||||||
- [**@mstraube**](https://github.com/mstraube)
|
- [**@arisinfenix**](https://github.com/arisinfenix)
|
||||||
- [**@iandrewt**](https://github.com/iandrewt)
|
- [**@iandrewt**](https://github.com/iandrewt)
|
||||||
- [**@konimex**](https://github.com/konimex)
|
- [**@konimex**](https://github.com/konimex)
|
||||||
|
- [**@MindTooth**](https://github.com/MindTooth)
|
||||||
|
|
||||||
**Operating System**
|
**Operating System**
|
||||||
|
|
||||||
- Added support for Condres OS. [**@mstraube**](https://github.com/mstraube)
|
- Added support for Condres OS. [**@arisinfenix**](https://github.com/arisinfenix)
|
||||||
- Added support for RedCore Linux. [**@mstraube**](https://github.com/mstraube)
|
- Added support for RedCore Linux. [**@arisinfenix**](https://github.com/arisinfenix)
|
||||||
- Added support for Regata OS. [**@mstraube**](https://github.com/mstraube)
|
- Added support for Regata OS. [**@arisinfenix**](https://github.com/arisinfenix)
|
||||||
|
- Added support for ClearOS. [**@arisinfenix**](https://github.com/arisinfenix)
|
||||||
- Added support for PureOS.
|
- Added support for PureOS.
|
||||||
- Added support for Kibojoe Linux.
|
- Added support for Kibojoe Linux.
|
||||||
- Added support for SharkLinux.
|
- Added support for SharkLinux.
|
||||||
@@ -62,34 +85,35 @@ See: https://github.com/dylanaraps/neofetch/issues/1001
|
|||||||
- **cpu**: Remove extra call to `uname`.
|
- **cpu**: Remove extra call to `uname`.
|
||||||
- **cpu**: Simplify core calculation.
|
- **cpu**: Simplify core calculation.
|
||||||
- **disk**: Clean up.
|
- **disk**: Clean up.
|
||||||
- **font**: Fix iTerm2 checking for 2 extra profiles that don't exist.
|
- **font**: Fix iTerm2 checking for 2 extra profiles that don't exist. [**@iandrewt**](https://github.com/iandrewt")
|
||||||
[**@iandrewt**](https://github.com/iandrewt")
|
|
||||||
- **gpu**: Fixed ATI/AMD branding issue.
|
- **gpu**: Fixed ATI/AMD branding issue.
|
||||||
- **gpu**: Removed `glxinfo` usage (*too slow*).
|
- **gpu**: Removed `glxinfo` usage (*too slow*).
|
||||||
- **packages**: Added support for `flatpak`.
|
- **packages**: Added support for `flatpak`. [**@konimex**](https://github.com/konimex)
|
||||||
[**@konimex**](https://github.com/konimex)
|
- **packages**: Added support for `snap`. [**@konimex**](https://github.com/konimex)
|
||||||
- **packages**: Added support for `snap`.
|
|
||||||
[**@konimex**](https://github.com/konimex)
|
|
||||||
- **packages**: Added used package managers to output (`Packages: 900
|
- **packages**: Added used package managers to output (`Packages: 900
|
||||||
(pacman, snap)`).
|
(pacman, snap)`).
|
||||||
- **packages**: Fixed issues with `pacman` 5.1.
|
- **packages**: Fixed issues with `pacman` 5.1.
|
||||||
|
- **packages**: Fixed issues with `dpkg`.
|
||||||
- **packages**: Removed `find` usage.
|
- **packages**: Removed `find` usage.
|
||||||
- **packages**: Removed `ls` usage.
|
- **packages**: Removed `ls` usage.
|
||||||
- **packages**: Removed `wc -l` usage.
|
- **packages**: Removed `wc -l` usage.
|
||||||
- **song**: Added support for `gmusicbrowser`.
|
- **song**: Added support for `gmusicbrowser`. [**@arisinfenix**](https://github.com/arisinfenix)
|
||||||
[**@mstraube**](https://github.com/mstraube)
|
- **song**: Added support for `SMPlayer`. [**@arisinfenix**](https://github.com/arisinfenix)
|
||||||
|
- **song**: Added support for `Dragon Player`. [**@arisinfenix**](https://github.com/arisinfenix)
|
||||||
- **song**: Fixed song detection on macOS.
|
- **song**: Fixed song detection on macOS.
|
||||||
- **song**: Fixed song output on systems using `C` locale.
|
- **song**: Fixed song output on systems using `C` locale.
|
||||||
|
- **song**: Added `mpc_args` to send additional arguments to `mpc`.
|
||||||
- **term\_font**: Clean up of config file handling.
|
- **term\_font**: Clean up of config file handling.
|
||||||
- **resolution**: Added support for `xwininfo`.
|
- **resolution**: Added support for `xwininfo`.
|
||||||
|
|
||||||
## [4.0.2] - 2018-05-19
|
## [4.0.2] - 2018-05-19
|
||||||
|
|
||||||
|
### This fixes default config issues on Android, AIX, HP-UX and possibly others.
|
||||||
|
|
||||||
- [config] Fixed `/dev/stdin` error.
|
- [config] Fixed `/dev/stdin` error.
|
||||||
- [config] Added `--print_config` to display the default config file.
|
- [config] Added `--print_config` to display the default config file.
|
||||||
- [macOS] Fixed xquartz issue.
|
- [macOS] Fixed xquartz issue.
|
||||||
|
|
||||||
|
|
||||||
## [4.0.1] - 2018-05-18
|
## [4.0.1] - 2018-05-18
|
||||||
|
|
||||||
### Note: This release is only required for those running `bash <3.3`.
|
### Note: This release is only required for those running `bash <3.3`.
|
||||||
@@ -2752,7 +2776,8 @@ Changelog:
|
|||||||
Let me know if you're having issues.
|
Let me know if you're having issues.
|
||||||
|
|
||||||
|
|
||||||
[Unreleased]: https://github.com/dylanaraps/neofetch/compare/4.0.2...HEAD
|
[Unreleased]: https://github.com/dylanaraps/neofetch/compare/5.0.0...HEAD
|
||||||
|
[5.0.0]: https://github.com/dylanaraps/neofetch/compare/4.0.2...5.0.0
|
||||||
[4.0.2]: https://github.com/dylanaraps/neofetch/compare/4.0.1...4.0.2
|
[4.0.2]: https://github.com/dylanaraps/neofetch/compare/4.0.1...4.0.2
|
||||||
[4.0.1]: https://github.com/dylanaraps/neofetch/compare/4.0.0...4.0.1
|
[4.0.1]: https://github.com/dylanaraps/neofetch/compare/4.0.0...4.0.1
|
||||||
[4.0.0]: https://github.com/dylanaraps/neofetch/compare/3.4.0...4.0.0
|
[4.0.0]: https://github.com/dylanaraps/neofetch/compare/3.4.0...4.0.0
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
<a href="https://travis-ci.org/dylanaraps/neofetch"><img src="https://travis-ci.org/dylanaraps/neofetch.svg?branch=master"></a>
|
<a href="https://travis-ci.org/dylanaraps/neofetch"><img src="https://travis-ci.org/dylanaraps/neofetch.svg?branch=master"></a>
|
||||||
<a href="./LICENSE.md"><img src="https://img.shields.io/badge/license-MIT-blue.svg"></a>
|
<a href="./LICENSE.md"><img src="https://img.shields.io/badge/license-MIT-blue.svg"></a>
|
||||||
<a href="https://github.com/dylanaraps/neofetch/releases"><img src="https://img.shields.io/github/release/dylanaraps/neofetch.svg"></a>
|
<a href="https://github.com/dylanaraps/neofetch/releases"><img src="https://img.shields.io/github/release/dylanaraps/neofetch.svg"></a>
|
||||||
<a href="https://www.patreon.com/dyla"><img src="https://img.shields.io/badge/donate-patreon-yellow.svg"></a>
|
<a href="https://repology.org/metapackage/neofetch"><img src="https://repology.org/badge/tiny-repos/neofetch.svg" alt="Packaging status"></a>
|
||||||
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=V7QNJNKS3WYVS"><img src="https://img.shields.io/badge/donate-paypal-green.svg"></a>
|
<a href="#donate"><img src="https://img.shields.io/badge/donate-donate-yellow.svg"></a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<img src="https://i.imgur.com/GFmC5Ad.png" alt="neofetch" align="right" height="240px">
|
<img src="https://i.imgur.com/GFmC5Ad.png" alt="neofetch" align="right" height="240px">
|
||||||
@@ -58,5 +58,5 @@ Neofetch supports almost 150 different operating systems. From Linux to Windows,
|
|||||||
|
|
||||||
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.
|
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-green.svg"></a> <a href="https://www.patreon.com/dyla"><img src="https://img.shields.io/badge/donate-patreon-yellow.svg"></a>
|
<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>
|
||||||
|
|
||||||
|
|||||||
@@ -1,437 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
# Shell completion for neofetch.
|
|
||||||
shopt -s nullglob
|
|
||||||
|
|
||||||
_neofetch_completions() {
|
|
||||||
local cur prev usage
|
|
||||||
|
|
||||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
|
||||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
|
||||||
usage="$(neofetch -h | awk '/^ --/{printf $1" "}')"
|
|
||||||
|
|
||||||
IFS=$'\n' read -d "" -ra COMPREPLY \
|
|
||||||
< <(compgen -W "$usage" -- "$cur")
|
|
||||||
|
|
||||||
else
|
|
||||||
case "$prev" in
|
|
||||||
"--disable")
|
|
||||||
conf="${HOME}/.config/neofetch/config.conf"
|
|
||||||
|
|
||||||
[[ -f "$conf" ]] &&
|
|
||||||
IFS=$'\n' read -d "" -ra values \
|
|
||||||
< <(awk '/ info /&&!a[$0]++{print $NF}' "$conf")
|
|
||||||
;;
|
|
||||||
|
|
||||||
"--backend")
|
|
||||||
values=(
|
|
||||||
"ascii"
|
|
||||||
"caca"
|
|
||||||
"iterm2"
|
|
||||||
"jp2a"
|
|
||||||
"kitty"
|
|
||||||
"pixterm"
|
|
||||||
"sixel"
|
|
||||||
"termpix"
|
|
||||||
"tycat"
|
|
||||||
"w3m"
|
|
||||||
"off"
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
|
|
||||||
"--os_arch"|\
|
|
||||||
"--speed_shorthand"|\
|
|
||||||
"--cpu_brand"|\
|
|
||||||
"--cpu_speed"|\
|
|
||||||
"--kernel_shorthand"|\
|
|
||||||
"--refresh_rate"|\
|
|
||||||
"--gpu_brand"|\
|
|
||||||
"--gtk_shorthand"|\
|
|
||||||
"--gtk2"|\
|
|
||||||
"--gtk3"|\
|
|
||||||
"--shell_path"|\
|
|
||||||
"--shell_version"|\
|
|
||||||
"--song_shorthand"|\
|
|
||||||
"--underline"|\
|
|
||||||
"--bold"|\
|
|
||||||
"--color_blocks"|\
|
|
||||||
"--bar_border"|\
|
|
||||||
"--ascii_bold")
|
|
||||||
values=(
|
|
||||||
"on"
|
|
||||||
"off"
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
|
|
||||||
"--uptime_shorthand"|\
|
|
||||||
"--package_managers"|\
|
|
||||||
"--distro_shorthand")
|
|
||||||
values=(
|
|
||||||
"on"
|
|
||||||
"tiny"
|
|
||||||
"off"
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
|
|
||||||
"--speed_type")
|
|
||||||
values=(
|
|
||||||
"current"
|
|
||||||
"min"
|
|
||||||
"max"
|
|
||||||
"bios"
|
|
||||||
"scaling_current"
|
|
||||||
"scaling_min"
|
|
||||||
"scaling_max"
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
|
|
||||||
"--cpu_cores")
|
|
||||||
values=(
|
|
||||||
"logical"
|
|
||||||
"physical"
|
|
||||||
"off"
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
|
|
||||||
"--cpu_temp")
|
|
||||||
values=(
|
|
||||||
"C"
|
|
||||||
"F"
|
|
||||||
"off"
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
|
|
||||||
"--gpu_type")
|
|
||||||
values=(
|
|
||||||
"all"
|
|
||||||
"dedicated"
|
|
||||||
"integrated"
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
|
|
||||||
"--disk_show")
|
|
||||||
values=(
|
|
||||||
"/dev/sd"*
|
|
||||||
"/"
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
|
|
||||||
"--disk_subtitle")
|
|
||||||
values=(
|
|
||||||
"name"
|
|
||||||
"mount"
|
|
||||||
"dir"
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
|
|
||||||
"--ip_host")
|
|
||||||
values=(
|
|
||||||
"http://ident.me"
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
|
|
||||||
"--song_format")
|
|
||||||
values=(
|
|
||||||
"\"%artist% - %album% - %title%\""
|
|
||||||
"\"%artist - %title\""
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
|
|
||||||
"--music_player")
|
|
||||||
values=(
|
|
||||||
"amarok"
|
|
||||||
"audacious"
|
|
||||||
"banshee"
|
|
||||||
"bluemindo"
|
|
||||||
"clementine"
|
|
||||||
"cmus"
|
|
||||||
"deadbeef"
|
|
||||||
"deepin-music"
|
|
||||||
"elisa"
|
|
||||||
"exaile"
|
|
||||||
"gmusicbrowser"
|
|
||||||
"gnome-music"
|
|
||||||
"gmusicbrowser"
|
|
||||||
"Google Play"
|
|
||||||
"guayadeque"
|
|
||||||
"iTunes"
|
|
||||||
"juk"
|
|
||||||
"lollypop"
|
|
||||||
"mocp"
|
|
||||||
"mopidy"
|
|
||||||
"mpd"
|
|
||||||
"pogo"
|
|
||||||
"pragha"
|
|
||||||
"qmmp"
|
|
||||||
"quodlibet"
|
|
||||||
"rhythmbox"
|
|
||||||
"sayonara"
|
|
||||||
"spotify"
|
|
||||||
"Spotify"
|
|
||||||
"tomahawk"
|
|
||||||
"vlc"
|
|
||||||
"xmms2d"
|
|
||||||
"yarock"
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
|
|
||||||
"--install_time_format")
|
|
||||||
values=(
|
|
||||||
"12h"
|
|
||||||
"24h"
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
|
|
||||||
"--underline_char")
|
|
||||||
values=(
|
|
||||||
"_"
|
|
||||||
"-"
|
|
||||||
"."
|
|
||||||
"⎯"
|
|
||||||
"―"
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
|
|
||||||
"--block_width"|\
|
|
||||||
"--block_height"|\
|
|
||||||
"--bar_length")
|
|
||||||
values=(
|
|
||||||
{1..9}
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
|
|
||||||
"--cpu_display"|\
|
|
||||||
"--memory_display"|\
|
|
||||||
"--battery_display"|\
|
|
||||||
"--disk_display")
|
|
||||||
values=(
|
|
||||||
"bar"
|
|
||||||
"infobar"
|
|
||||||
"barinfo"
|
|
||||||
"off"
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
|
|
||||||
"--source"|\
|
|
||||||
"--ascii"|\
|
|
||||||
"--caca"|\
|
|
||||||
"--iterm2"|\
|
|
||||||
"--jp2a"|\
|
|
||||||
"--kitty"|\
|
|
||||||
"--pixterm"|\
|
|
||||||
"--sixel"|\
|
|
||||||
"--termpix"|\
|
|
||||||
"--tycat"|\
|
|
||||||
"--w3m")
|
|
||||||
values=(
|
|
||||||
"auto"
|
|
||||||
"ascii"
|
|
||||||
"wallpaper"
|
|
||||||
"/path/to/img.jpg"
|
|
||||||
"/path/to/images"
|
|
||||||
"/path/to/ascii_file"
|
|
||||||
)
|
|
||||||
|
|
||||||
;;
|
|
||||||
|
|
||||||
"--ascii_distro")
|
|
||||||
values=(
|
|
||||||
"aix"
|
|
||||||
"alpine"
|
|
||||||
"alpine_small"
|
|
||||||
"amazon"
|
|
||||||
"anarchy"
|
|
||||||
"android"
|
|
||||||
"antergos"
|
|
||||||
"antix"
|
|
||||||
"aosc"
|
|
||||||
"apricity"
|
|
||||||
"arch"
|
|
||||||
"arch_old"
|
|
||||||
"arch_small"
|
|
||||||
"archbox"
|
|
||||||
"archlabs"
|
|
||||||
"archmerge"
|
|
||||||
"arcolinux"
|
|
||||||
"artix"
|
|
||||||
"arya"
|
|
||||||
"bitrig"
|
|
||||||
"blag"
|
|
||||||
"blankon"
|
|
||||||
"bsd"
|
|
||||||
"bunsenlabs"
|
|
||||||
"calculate"
|
|
||||||
"centos"
|
|
||||||
"chakra"
|
|
||||||
"chaletos"
|
|
||||||
"chapeau"
|
|
||||||
"chrom"
|
|
||||||
"clover"
|
|
||||||
"condres"
|
|
||||||
"crux"
|
|
||||||
"crux_small"
|
|
||||||
"darwin"
|
|
||||||
"debian"
|
|
||||||
"debian_small"
|
|
||||||
"deepin"
|
|
||||||
"desaos"
|
|
||||||
"devuan"
|
|
||||||
"dracos"
|
|
||||||
"dragonfly"
|
|
||||||
"dragonfly_old"
|
|
||||||
"dragonfly_small"
|
|
||||||
"elementary"
|
|
||||||
"endless"
|
|
||||||
"exherbo"
|
|
||||||
"fedora"
|
|
||||||
"freebsd"
|
|
||||||
"freebsd_small"
|
|
||||||
"freemint"
|
|
||||||
"frugalware"
|
|
||||||
"funtoo"
|
|
||||||
"galliumos"
|
|
||||||
"gentoo"
|
|
||||||
"gentoo_small"
|
|
||||||
"gnewsense"
|
|
||||||
"gnu"
|
|
||||||
"gobolinux"
|
|
||||||
"grombyang"
|
|
||||||
"guixsd"
|
|
||||||
"haiku"
|
|
||||||
"hyperbola"
|
|
||||||
"irix"
|
|
||||||
"kali"
|
|
||||||
"kaos"
|
|
||||||
"kde"
|
|
||||||
"kibojoe"
|
|
||||||
"kogaion"
|
|
||||||
"korora"
|
|
||||||
"kslinux"
|
|
||||||
"kubuntu"
|
|
||||||
"lede"
|
|
||||||
"linux lite"
|
|
||||||
"linux mint"
|
|
||||||
"linux"
|
|
||||||
"lmde"
|
|
||||||
"lubuntu"
|
|
||||||
"lunar"
|
|
||||||
"mac"
|
|
||||||
"mageia"
|
|
||||||
"magpieos"
|
|
||||||
"manjaro"
|
|
||||||
"maui"
|
|
||||||
"mer"
|
|
||||||
"minix"
|
|
||||||
"mx"
|
|
||||||
"netbsd"
|
|
||||||
"netrunner"
|
|
||||||
"nitrux"
|
|
||||||
"nixos"
|
|
||||||
"nixos_small"
|
|
||||||
"nurunner"
|
|
||||||
"nutyx"
|
|
||||||
"obrevenge"
|
|
||||||
"open source media center"
|
|
||||||
"openbsd"
|
|
||||||
"openbsd_small"
|
|
||||||
"openindiana"
|
|
||||||
"openmandriva"
|
|
||||||
"opensuse"
|
|
||||||
"openwrt"
|
|
||||||
"oracle"
|
|
||||||
"pacbsd"
|
|
||||||
"parabola"
|
|
||||||
"pardus"
|
|
||||||
"parrot"
|
|
||||||
"parsix"
|
|
||||||
"pcbsd"
|
|
||||||
"pclinuxos"
|
|
||||||
"peppermint"
|
|
||||||
"porteus"
|
|
||||||
"postmarketos"
|
|
||||||
"puppy"
|
|
||||||
"pureos"
|
|
||||||
"qubes"
|
|
||||||
"raspbian"
|
|
||||||
"red star"
|
|
||||||
"redcore"
|
|
||||||
"redcore"
|
|
||||||
"redhat"
|
|
||||||
"regata"
|
|
||||||
"rosa"
|
|
||||||
"sabayon"
|
|
||||||
"sabotage"
|
|
||||||
"sailfishos"
|
|
||||||
"salentos"
|
|
||||||
"scientific"
|
|
||||||
"sharklinux"
|
|
||||||
"siduction"
|
|
||||||
"slackware"
|
|
||||||
"slitaz"
|
|
||||||
"smartos"
|
|
||||||
"solus"
|
|
||||||
"sparky"
|
|
||||||
"steamos"
|
|
||||||
"sunos"
|
|
||||||
"swagarch"
|
|
||||||
"tails"
|
|
||||||
"trisquel"
|
|
||||||
"ubuntu"
|
|
||||||
"ubuntu_old"
|
|
||||||
"void"
|
|
||||||
"void_small"
|
|
||||||
"windows 10"
|
|
||||||
"windows"
|
|
||||||
"xferience"
|
|
||||||
"xubuntu"
|
|
||||||
"zorin"
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
|
|
||||||
"--size")
|
|
||||||
values=(
|
|
||||||
"00px"
|
|
||||||
"00%"
|
|
||||||
"auto"
|
|
||||||
"none"
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
|
|
||||||
"--crop_mode")
|
|
||||||
values=(
|
|
||||||
"normal"
|
|
||||||
"fit"
|
|
||||||
"fill"
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
|
|
||||||
"--crop_offset")
|
|
||||||
values=(
|
|
||||||
"northwest"
|
|
||||||
"north"
|
|
||||||
"northeast"
|
|
||||||
"west"
|
|
||||||
"center"
|
|
||||||
"east"
|
|
||||||
"southwest"
|
|
||||||
"south"
|
|
||||||
"southeast"
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
|
|
||||||
"--config")
|
|
||||||
values=(
|
|
||||||
"none"
|
|
||||||
"/path/to/config"
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
IFS=$'\n' read -d "" -ra COMPREPLY \
|
|
||||||
< <(compgen -W "${values[*]}" -- "$cur")
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
complete -F _neofetch_completions neofetch
|
|
||||||
268
neofetch
268
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="4.0.3"
|
version="5.0.1"
|
||||||
|
|
||||||
bash_version="${BASH_VERSION/.*}"
|
bash_version="${BASH_VERSION/.*}"
|
||||||
sys_locale="${LANG:-C}"
|
sys_locale="${LANG:-C}"
|
||||||
@@ -156,7 +156,7 @@ uptime_shorthand="on"
|
|||||||
# on: '998 (pacman), 8 (flatpak), 4 (snap)'
|
# on: '998 (pacman), 8 (flatpak), 4 (snap)'
|
||||||
# tiny: '908 (pacman, flatpak, snap)'
|
# tiny: '908 (pacman, flatpak, snap)'
|
||||||
# off: '908'
|
# off: '908'
|
||||||
package_managers="tiny"
|
package_managers="on"
|
||||||
|
|
||||||
|
|
||||||
# Shell
|
# Shell
|
||||||
@@ -201,7 +201,7 @@ speed_type="bios_limit"
|
|||||||
#
|
#
|
||||||
# Default: 'off'
|
# Default: 'off'
|
||||||
# Values: 'on', 'off'.
|
# Values: 'on', 'off'.
|
||||||
# Flag: --speed_shorthand.
|
# Flag: --speed_shorthand
|
||||||
# NOTE: This flag is not supported in systems with CPU speed less than 1 GHz
|
# NOTE: This flag is not supported in systems with CPU speed less than 1 GHz
|
||||||
#
|
#
|
||||||
# Example:
|
# Example:
|
||||||
@@ -424,6 +424,7 @@ disk_subtitle="mount"
|
|||||||
# cmus
|
# cmus
|
||||||
# deadbeef
|
# deadbeef
|
||||||
# deepin-music
|
# deepin-music
|
||||||
|
# dragon
|
||||||
# elisa
|
# elisa
|
||||||
# exaile
|
# exaile
|
||||||
# gnome-music
|
# gnome-music
|
||||||
@@ -442,8 +443,8 @@ disk_subtitle="mount"
|
|||||||
# quodlibet
|
# quodlibet
|
||||||
# rhythmbox
|
# rhythmbox
|
||||||
# sayonara
|
# sayonara
|
||||||
|
# smplayer
|
||||||
# spotify
|
# spotify
|
||||||
# Spotify
|
|
||||||
# tomahawk
|
# tomahawk
|
||||||
# vlc
|
# vlc
|
||||||
# xmms2d
|
# xmms2d
|
||||||
@@ -474,6 +475,12 @@ song_format="%artist% - %album% - %title%"
|
|||||||
# off: 'Song: The Fratellis - Costello Music - Chelsea Dagger'
|
# off: 'Song: The Fratellis - Costello Music - Chelsea Dagger'
|
||||||
song_shorthand="off"
|
song_shorthand="off"
|
||||||
|
|
||||||
|
# 'mpc' arguments (specify a host, password etc).
|
||||||
|
#
|
||||||
|
# Default: ''
|
||||||
|
# Example: mpc_args=(-h HOST -P PASSWORD)
|
||||||
|
mpc_args=()
|
||||||
|
|
||||||
|
|
||||||
# Text Colors
|
# Text Colors
|
||||||
|
|
||||||
@@ -774,13 +781,13 @@ get_os() {
|
|||||||
# $kernel_name is set in a function called cache_uname and is
|
# $kernel_name is set in a function called cache_uname and is
|
||||||
# just the output of "uname -s".
|
# just the output of "uname -s".
|
||||||
case "$kernel_name" in
|
case "$kernel_name" in
|
||||||
"Darwin") : "$(sw_vers -productName)" ;;
|
"Darwin"): "$darwin_name" ;;
|
||||||
"SunOS") : "Solaris" ;;
|
"SunOS"): "Solaris" ;;
|
||||||
"Haiku") : "Haiku" ;;
|
"Haiku"): "Haiku" ;;
|
||||||
"MINIX") : "MINIX" ;;
|
"MINIX"): "MINIX" ;;
|
||||||
"AIX") : "AIX" ;;
|
"AIX"): "AIX" ;;
|
||||||
"IRIX"*) : "IRIX" ;;
|
"IRIX"*): "IRIX" ;;
|
||||||
"FreeMiNT") : "FreeMiNT" ;;
|
"FreeMiNT"): "FreeMiNT" ;;
|
||||||
|
|
||||||
"Linux" | "GNU"*)
|
"Linux" | "GNU"*)
|
||||||
: "Linux"
|
: "Linux"
|
||||||
@@ -860,7 +867,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 [[ "$(< /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" || \
|
||||||
@@ -922,13 +929,10 @@ get_distro() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
distro="$(trim_quotes "$distro")"
|
distro="$(trim_quotes "$distro")"
|
||||||
distro="${distro/'NAME='}"
|
distro="${distro/NAME=}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"Mac OS X")
|
"Mac OS X")
|
||||||
osx_version="$(sw_vers -productVersion)"
|
|
||||||
osx_build="$(sw_vers -buildVersion)"
|
|
||||||
|
|
||||||
case "$osx_version" in
|
case "$osx_version" in
|
||||||
"10.4"*) codename="Mac OS X Tiger" ;;
|
"10.4"*) codename="Mac OS X Tiger" ;;
|
||||||
"10.5"*) codename="Mac OS X Leopard" ;;
|
"10.5"*) codename="Mac OS X Leopard" ;;
|
||||||
@@ -959,7 +963,7 @@ get_distro() {
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
"iPhone OS")
|
"iPhone OS")
|
||||||
distro="iOS $(sw_vers -productVersion)"
|
distro="iOS $osx_version"
|
||||||
|
|
||||||
# "uname -m" doesn't print architecture on iOS so we force it off.
|
# "uname -m" doesn't print architecture on iOS so we force it off.
|
||||||
os_arch="off"
|
os_arch="off"
|
||||||
@@ -1179,7 +1183,7 @@ get_uptime() {
|
|||||||
|
|
||||||
"Mac OS X" | "iPhone OS" | "BSD" | "FreeMiNT")
|
"Mac OS X" | "iPhone OS" | "BSD" | "FreeMiNT")
|
||||||
boot="$(sysctl -n kern.boottime)"
|
boot="$(sysctl -n kern.boottime)"
|
||||||
boot="${boot/'{ sec = '}"
|
boot="${boot/\{ sec = }"
|
||||||
boot="${boot/,*}"
|
boot="${boot/,*}"
|
||||||
|
|
||||||
# Get current date in seconds.
|
# Get current date in seconds.
|
||||||
@@ -1257,7 +1261,7 @@ get_packages() {
|
|||||||
"Linux" | "BSD" | "iPhone OS" | "Solaris")
|
"Linux" | "BSD" | "iPhone OS" | "Solaris")
|
||||||
# Package Manager Programs.
|
# Package Manager Programs.
|
||||||
has "pacman-key" && tot pacman -Qq --color never
|
has "pacman-key" && tot pacman -Qq --color never
|
||||||
has "dpkg" && tot dpkg-query -f '\n' -W
|
has "dpkg" && tot dpkg-query -f '.\n' -W
|
||||||
has "rpm" && tot rpm -qa
|
has "rpm" && tot rpm -qa
|
||||||
has "xbps-query" && tot xbps-query -l
|
has "xbps-query" && tot xbps-query -l
|
||||||
has "apk" && tot apk info
|
has "apk" && tot apk info
|
||||||
@@ -1270,6 +1274,7 @@ get_packages() {
|
|||||||
has "sorcery" && tot gaze installed
|
has "sorcery" && tot gaze installed
|
||||||
has "alps" && tot alps showinstalled
|
has "alps" && tot alps showinstalled
|
||||||
has "butch" && tot butch list
|
has "butch" && tot butch list
|
||||||
|
has "pkginfo" && tot pkginfo -i
|
||||||
|
|
||||||
# Counting files/dirs.
|
# Counting files/dirs.
|
||||||
has "emerge" && dir /var/db/pkg/*/*/
|
has "emerge" && dir /var/db/pkg/*/*/
|
||||||
@@ -1287,7 +1292,6 @@ get_packages() {
|
|||||||
|
|
||||||
case "$kernel_name" in
|
case "$kernel_name" in
|
||||||
"FreeBSD") has "pkg" && tot pkg info ;;
|
"FreeBSD") has "pkg" && tot pkg info ;;
|
||||||
"SunOS") has "pkginfo" && tot pkginfo -i ;;
|
|
||||||
*)
|
*)
|
||||||
has "pkg" && dir /var/db/pkg/*
|
has "pkg" && dir /var/db/pkg/*
|
||||||
|
|
||||||
@@ -1301,13 +1305,14 @@ get_packages() {
|
|||||||
|
|
||||||
# Snap hangs if the command is run without the daemon running.
|
# Snap hangs if the command is run without the daemon running.
|
||||||
# Only run snap if the daemon is also running.
|
# Only run snap if the daemon is also running.
|
||||||
has "snap" && ps -e | grep -Fm 1 "snapd" && tot snap list && ((packages-=1))
|
has "snap" && ps -e | grep -qFm 1 "snapd" >/dev/null && tot snap list && ((packages-=1))
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"Mac OS X" | "MINIX")
|
"Mac OS X" | "MINIX")
|
||||||
has "port" && tot port installed && ((packages-=1))
|
has "port" && tot port installed && ((packages-=1))
|
||||||
has "brew" && dir /usr/local/Cellar/*
|
has "brew" && dir /usr/local/Cellar/*
|
||||||
has "pkgin" && tot pkgin list
|
has "pkgin" && tot pkgin list
|
||||||
|
has "nix-env" && dir /nix/store/*/
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"AIX"| "FreeMiNT")
|
"AIX"| "FreeMiNT")
|
||||||
@@ -1362,7 +1367,7 @@ get_shell() {
|
|||||||
"sh" | "ash" | "dash") ;;
|
"sh" | "ash" | "dash") ;;
|
||||||
|
|
||||||
"mksh" | "ksh")
|
"mksh" | "ksh")
|
||||||
shell+="$("$SHELL" -c "printf %s \$KSH_VERSION")"
|
shell+="$("$SHELL" -c "printf %s \"\$KSH_VERSION\"")"
|
||||||
shell="${shell/ * KSH}"
|
shell="${shell/ * KSH}"
|
||||||
shell="${shell/version}"
|
shell="${shell/version}"
|
||||||
;;
|
;;
|
||||||
@@ -1414,7 +1419,7 @@ get_de() {
|
|||||||
((wm_run != 1)) && get_wm
|
((wm_run != 1)) && get_wm
|
||||||
|
|
||||||
if [[ "$XDG_CURRENT_DESKTOP" ]]; then
|
if [[ "$XDG_CURRENT_DESKTOP" ]]; then
|
||||||
de="${XDG_CURRENT_DESKTOP/'X-'}"
|
de="${XDG_CURRENT_DESKTOP/X\-}"
|
||||||
de="${de/Budgie:GNOME/Budgie}"
|
de="${de/Budgie:GNOME/Budgie}"
|
||||||
de="${de/:Unity7:ubuntu}"
|
de="${de/:Unity7:ubuntu}"
|
||||||
|
|
||||||
@@ -1440,7 +1445,7 @@ get_de() {
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
# Fallback to using xprop.
|
# Fallback to using xprop.
|
||||||
[[ "$DISPLAY" && -z "$de" ]] && \
|
[[ "$DISPLAY" && -z "$de" ]] && type -p xprop &>/dev/null && \
|
||||||
de="$(xprop -root | awk '/KDE_SESSION_VERSION|^_MUFFIN|xfce4|xfce5/')"
|
de="$(xprop -root | awk '/KDE_SESSION_VERSION|^_MUFFIN|xfce4|xfce5/')"
|
||||||
|
|
||||||
# Format strings.
|
# Format strings.
|
||||||
@@ -1498,12 +1503,14 @@ get_wm() {
|
|||||||
-e "weston")"
|
-e "weston")"
|
||||||
|
|
||||||
elif [[ "$DISPLAY" && "$os" != "Mac OS X" && "$os" != "FreeMiNT" ]]; then
|
elif [[ "$DISPLAY" && "$os" != "Mac OS X" && "$os" != "FreeMiNT" ]]; then
|
||||||
|
if type -p xprop &>/dev/null; then
|
||||||
id="$(xprop -root -notype _NET_SUPPORTING_WM_CHECK)"
|
id="$(xprop -root -notype _NET_SUPPORTING_WM_CHECK)"
|
||||||
id="${id##* }"
|
id="${id##* }"
|
||||||
wm="$(xprop -id "$id" -notype -len 100 -f _NET_WM_NAME 8t)"
|
wm="$(xprop -id "$id" -notype -len 100 -f _NET_WM_NAME 8t)"
|
||||||
wm="${wm/*WM_NAME = }"
|
wm="${wm/*WM_NAME = }"
|
||||||
wm="${wm/\"}"
|
wm="${wm/\"}"
|
||||||
wm="${wm/\"*}"
|
wm="${wm/\"*}"
|
||||||
|
fi
|
||||||
|
|
||||||
# Window Maker does not set _NET_WM_NAME
|
# Window Maker does not set _NET_WM_NAME
|
||||||
[[ "$wm" =~ "WINDOWMAKER" ]] && wm="wmaker"
|
[[ "$wm" =~ "WINDOWMAKER" ]] && wm="wmaker"
|
||||||
@@ -1675,7 +1682,7 @@ get_wm_theme() {
|
|||||||
wm_theme="$(awk '/(decoration)/ {gsub(/\[/,"",$1); print $1; exit}' "$kdebugrc")"
|
wm_theme="$(awk '/(decoration)/ {gsub(/\[/,"",$1); print $1; exit}' "$kdebugrc")"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
wm_theme="${wm_theme/'theme='}"
|
wm_theme="${wm_theme/theme=}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"Quartz Compositor")
|
"Quartz Compositor")
|
||||||
@@ -1706,7 +1713,7 @@ get_wm_theme() {
|
|||||||
path="${path//\\/\/}"
|
path="${path//\\/\/}"
|
||||||
|
|
||||||
wm_theme="$(grep '^session\.styleFile:' "${path/\.exe/.rc}")"
|
wm_theme="$(grep '^session\.styleFile:' "${path/\.exe/.rc}")"
|
||||||
wm_theme="${wm_theme/'session.styleFile: '}"
|
wm_theme="${wm_theme/session\.styleFile: }"
|
||||||
wm_theme="${wm_theme##*\\}"
|
wm_theme="${wm_theme##*\\}"
|
||||||
wm_theme="${wm_theme%.*}"
|
wm_theme="${wm_theme%.*}"
|
||||||
;;
|
;;
|
||||||
@@ -1716,11 +1723,6 @@ get_wm_theme() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get_cpu() {
|
get_cpu() {
|
||||||
# NetBSD emulates the Linux /proc filesystem instead of using sysctl for hw
|
|
||||||
# information so we have to use this block below which temporarily sets the
|
|
||||||
# OS to "Linux" for the duration of this function.
|
|
||||||
[[ "$distro" == "NetBSD"* ]] && local os="Linux"
|
|
||||||
|
|
||||||
case "$os" in
|
case "$os" in
|
||||||
"Linux" | "MINIX" | "Windows")
|
"Linux" | "MINIX" | "Windows")
|
||||||
# Get CPU name.
|
# Get CPU name.
|
||||||
@@ -1774,15 +1776,13 @@ get_cpu() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Get CPU temp.
|
# Get CPU temp.
|
||||||
if [[ -f "$temp_dir" ]]; then
|
[[ -f "$temp_dir" ]] && \
|
||||||
deg="$(< "$temp_dir")"
|
deg="$(($(< "$temp_dir") * 100 / 10000))"
|
||||||
deg="$((deg * 100 / 10000))"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Get CPU cores.
|
# Get CPU cores.
|
||||||
case "$cpu_cores" in
|
case "$cpu_cores" in
|
||||||
"logical" | "on") cores="$(grep -c "^processor" "$cpu_file")" ;;
|
"logical" | "on") cores="$(grep -c "^processor" "$cpu_file")" ;;
|
||||||
"physical") cores="$(awk '/^core id/&&!a[$0]++{++i}END{print i}' "$cpu_file")" ;;
|
"physical") cores="$(awk '/^core id/&&!a[$0]++{++i} END {print i}' "$cpu_file")" ;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@@ -2029,7 +2029,7 @@ get_gpu() {
|
|||||||
"Linux")
|
"Linux")
|
||||||
# Read GPUs into array.
|
# Read GPUs into array.
|
||||||
gpu_cmd="$(lspci -mm | awk -F '\\"|\\" \\"|\\(' \
|
gpu_cmd="$(lspci -mm | awk -F '\\"|\\" \\"|\\(' \
|
||||||
'/"Display|"3D|"VGA/ {a[$0] = $3 " " $4} END{for(i in a)
|
'/"Display|"3D|"VGA/ {a[$0] = $3 " " $4} END {for(i in a)
|
||||||
{if(!seen[a[i]]++) print a[i]}}')"
|
{if(!seen[a[i]]++) print a[i]}}')"
|
||||||
IFS=$'\n' read -d "" -ra gpus <<< "$gpu_cmd"
|
IFS=$'\n' read -d "" -ra gpus <<< "$gpu_cmd"
|
||||||
|
|
||||||
@@ -2056,11 +2056,10 @@ get_gpu() {
|
|||||||
brand="${brand:-${gpu/*AMD*/AMD}}"
|
brand="${brand:-${gpu/*AMD*/AMD}}"
|
||||||
brand="${brand:-${gpu/*ATI*/ATi}}"
|
brand="${brand:-${gpu/*ATI*/ATi}}"
|
||||||
|
|
||||||
gpu="${gpu/'[AMD/ATI]' }"
|
gpu="${gpu/\[AMD\/ATI\] }"
|
||||||
gpu="${gpu/'[AMD]' }"
|
gpu="${gpu/\[AMD\] }"
|
||||||
gpu="${gpu/OEM }"
|
gpu="${gpu/OEM }"
|
||||||
gpu="${gpu/Advanced Micro Devices, Inc.}"
|
gpu="${gpu/Advanced Micro Devices, Inc.}"
|
||||||
gpu="${gpu/ \/ *}"
|
|
||||||
gpu="${gpu/*\[}"
|
gpu="${gpu/*\[}"
|
||||||
gpu="${gpu/\]*}"
|
gpu="${gpu/\]*}"
|
||||||
gpu="$brand $gpu"
|
gpu="$brand $gpu"
|
||||||
@@ -2074,10 +2073,11 @@ get_gpu() {
|
|||||||
|
|
||||||
*"intel"*)
|
*"intel"*)
|
||||||
gpu="${gpu/*Intel/Intel}"
|
gpu="${gpu/*Intel/Intel}"
|
||||||
gpu="${gpu/'(R)'}"
|
gpu="${gpu/\(R\)}"
|
||||||
gpu="${gpu/'Corporation'}"
|
gpu="${gpu/Corporation}"
|
||||||
gpu="${gpu/ \(*}"
|
gpu="${gpu/ \(*}"
|
||||||
gpu="${gpu/Integrated Graphics Controller}"
|
gpu="${gpu/Integrated Graphics Controller}"
|
||||||
|
gpu="${gpu/*Xeon*/Intel HD Graphics}"
|
||||||
|
|
||||||
[[ -z "$(trim "$gpu")" ]] && gpu="Intel Integrated Graphics"
|
[[ -z "$(trim "$gpu")" ]] && gpu="Intel Integrated Graphics"
|
||||||
;;
|
;;
|
||||||
@@ -2106,7 +2106,7 @@ get_gpu() {
|
|||||||
else
|
else
|
||||||
gpu="$(system_profiler SPDisplaysDataType |\
|
gpu="$(system_profiler SPDisplaysDataType |\
|
||||||
awk -F': ' '/^\ *Chipset Model:/ {printf $2 ", "}')"
|
awk -F': ' '/^\ *Chipset Model:/ {printf $2 ", "}')"
|
||||||
gpu="${gpu//'/ $'}"
|
gpu="${gpu//\/ \$}"
|
||||||
gpu="${gpu%,*}"
|
gpu="${gpu%,*}"
|
||||||
|
|
||||||
cache "gpu" "$gpu"
|
cache "gpu" "$gpu"
|
||||||
@@ -2166,7 +2166,7 @@ get_gpu() {
|
|||||||
|
|
||||||
*)
|
*)
|
||||||
gpu="$(glxinfo | grep -F 'OpenGL renderer string')"
|
gpu="$(glxinfo | grep -F 'OpenGL renderer string')"
|
||||||
gpu="${gpu/'OpenGL renderer string: '}"
|
gpu="${gpu/OpenGL renderer string: }"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
@@ -2234,13 +2234,13 @@ get_memory() {
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
"OpenBSD"*) ;;
|
"OpenBSD"*) ;;
|
||||||
*) mem_free="$(($(vmstat | awk 'END{printf $5}') / 1024))" ;;
|
*) mem_free="$(($(vmstat | awk 'END {printf $5}') / 1024))" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Mem used.
|
# Mem used.
|
||||||
case "$kernel_name" in
|
case "$kernel_name" in
|
||||||
"OpenBSD"*)
|
"OpenBSD"*)
|
||||||
mem_used="$(vmstat | awk 'END{printf $3}')"
|
mem_used="$(vmstat | awk 'END {printf $3}')"
|
||||||
mem_used="${mem_used/M}"
|
mem_used="${mem_used/M}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@@ -2308,6 +2308,7 @@ get_song() {
|
|||||||
"cmus"
|
"cmus"
|
||||||
"deadbeef"
|
"deadbeef"
|
||||||
"deepin-music"
|
"deepin-music"
|
||||||
|
"dragon"
|
||||||
"elise"
|
"elise"
|
||||||
"exaile"
|
"exaile"
|
||||||
"gnome-music"
|
"gnome-music"
|
||||||
@@ -2326,6 +2327,7 @@ get_song() {
|
|||||||
"quodlibet"
|
"quodlibet"
|
||||||
"rhythmbox"
|
"rhythmbox"
|
||||||
"sayonara"
|
"sayonara"
|
||||||
|
"smplayer"
|
||||||
"spotify"
|
"spotify"
|
||||||
"Spotify"
|
"Spotify"
|
||||||
"tomahawk"
|
"tomahawk"
|
||||||
@@ -2335,7 +2337,8 @@ get_song() {
|
|||||||
)
|
)
|
||||||
|
|
||||||
printf -v players "|%s" "${players[@]}"
|
printf -v players "|%s" "${players[@]}"
|
||||||
player="$(ps -e | awk -v pattern="(${players:1})$" '$0 ~ pattern {print $NF; exit}')"
|
player="$(ps aux | awk -v pattern="(${players:1})" \
|
||||||
|
'!/ awk / && 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"
|
||||||
@@ -2353,7 +2356,7 @@ get_song() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
case "${player/*\/}" in
|
case "${player/*\/}" in
|
||||||
"mpd"* | "mopidy"*) song="$(mpc -f '%artist% \n %album% \n %title%' current)" ;;
|
"mpd"*|"mopidy"*) song="$(mpc -f '%artist%\n%album%\n%title%' current "${mpc_args[@]}")" ;;
|
||||||
"mocp"*) song="$(mocp -Q '%artist \n %album \n %song')" ;;
|
"mocp"*) song="$(mocp -Q '%artist \n %album \n %song')" ;;
|
||||||
"google play"*) song="$(gpmdp-remote current)" ;;
|
"google play"*) song="$(gpmdp-remote current)" ;;
|
||||||
"rhythmbox"*) song="$(rhythmbox-client --print-playing-format '%ta \n %at \n %tt')" ;;
|
"rhythmbox"*) song="$(rhythmbox-client --print-playing-format '%ta \n %at \n %tt')" ;;
|
||||||
@@ -2374,6 +2377,10 @@ get_song() {
|
|||||||
"audacious"*) get_song_dbus "audacious" ;;
|
"audacious"*) get_song_dbus "audacious" ;;
|
||||||
"vlc"*) get_song_dbus "vlc" ;;
|
"vlc"*) get_song_dbus "vlc" ;;
|
||||||
"gmusicbrowser"*) get_song_dbus "gmusicbrowser" ;;
|
"gmusicbrowser"*) get_song_dbus "gmusicbrowser" ;;
|
||||||
|
"pragha"*) get_song_dbus "pragha" ;;
|
||||||
|
"amarok"*) get_song_dbus "amarok" ;;
|
||||||
|
"dragon"*) get_song_dbus "dragonplayer" ;;
|
||||||
|
"smplayer"*) get_song_dbus "smplayer" ;;
|
||||||
|
|
||||||
"cmus"*)
|
"cmus"*)
|
||||||
song="$(cmus-remote -Q | awk 'BEGIN { ORS=" "};
|
song="$(cmus-remote -Q | awk 'BEGIN { ORS=" "};
|
||||||
@@ -2410,21 +2417,11 @@ get_song() {
|
|||||||
"banshee"*)
|
"banshee"*)
|
||||||
song="$(banshee --query-artist --query-album --query-title |\
|
song="$(banshee --query-artist --query-album --query-title |\
|
||||||
awk -F':' '/^artist/ {a=$2} /^album/ {b=$2} /^title/ {t=$2}
|
awk -F':' '/^artist/ {a=$2} /^album/ {b=$2} /^title/ {t=$2}
|
||||||
END{print a " \n " b " \n "t}')"
|
END {print a " \n " b " \n "t}')"
|
||||||
;;
|
|
||||||
|
|
||||||
"amarok"*)
|
|
||||||
song="$(qdbus org.kde.amarok /Player GetMetadata |\
|
|
||||||
awk -F':' '/^artist:/ {a=$2} /^album:/ {b=$2} /^title:/ {t=$2}
|
|
||||||
END{print a " \n " b " \n " t}')"
|
|
||||||
;;
|
|
||||||
|
|
||||||
"pragha"*)
|
|
||||||
song="$(pragha -c | awk -F':' '/^artist/ {a=$2} /^album/ {b=$2} /^title/ {t=$2}
|
|
||||||
END{print a " \n " b " \n " t}')"
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"exaile"*)
|
"exaile"*)
|
||||||
|
# NOTE: Exaile >= 4.0.0 will support mpris2.
|
||||||
song="$(dbus-send --print-reply --dest=org.exaile.Exaile /org/exaile/Exaile \
|
song="$(dbus-send --print-reply --dest=org.exaile.Exaile /org/exaile/Exaile \
|
||||||
org.exaile.Exaile.Query |
|
org.exaile.Exaile.Query |
|
||||||
awk -F':|,' '{if ($6 && $8 && $4) printf $6 " \n" $8 " \n" $4}')"
|
awk -F':|,' '{if ($6 && $8 && $4) printf $6 " \n" $8 " \n" $4}')"
|
||||||
@@ -2434,7 +2431,7 @@ get_song() {
|
|||||||
song="$(dbus-send --print-reply --dest=net.sacredchao.QuodLibet \
|
song="$(dbus-send --print-reply --dest=net.sacredchao.QuodLibet \
|
||||||
/net/sacredchao/QuodLibet net.sacredchao.QuodLibet.CurrentSong |\
|
/net/sacredchao/QuodLibet net.sacredchao.QuodLibet.CurrentSong |\
|
||||||
awk -F'"' '/artist/ {getline; a=$2} /album/ {getline; b=$2}
|
awk -F'"' '/artist/ {getline; a=$2} /album/ {getline; b=$2}
|
||||||
/title/ {getline; t=$2} END{print a " \n " b " \n " t}')"
|
/title/ {getline; t=$2} END {print a " \n " b " \n " t}')"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"pogo"*)
|
"pogo"*)
|
||||||
@@ -2754,14 +2751,14 @@ get_term() {
|
|||||||
term="$(tty)"
|
term="$(tty)"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"ruby"|"1"|"systemd"|"sshd"*|"python"*|"USER"*"PID"*|"kdeinit"*|"launchd"*)
|
"ruby"|"1"|"tmux"*|"systemd"|"sshd"*|"python"*|"USER"*"PID"*|"kdeinit"*|"launchd"*)
|
||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"gnome-terminal-") term="gnome-terminal" ;;
|
"gnome-terminal-") term="gnome-terminal" ;;
|
||||||
|
"urxvtd") term="urxvt" ;;
|
||||||
*"nvim") term="Neovim Terminal" ;;
|
*"nvim") term="Neovim Terminal" ;;
|
||||||
*"NeoVimServer"*) term="VimR Terminal" ;;
|
*"NeoVimServer"*) term="VimR Terminal" ;;
|
||||||
*"tmux"*) term="tmux" ;;
|
|
||||||
*) term="${name##*/}" ;;
|
*) term="${name##*/}" ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
@@ -2842,13 +2839,13 @@ END
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
"deepin-terminal"*)
|
"deepin-terminal"*)
|
||||||
term_font="$(awk -F '=' '/font=/ {a=$2} /font_size/ {b=$2} END{print a " " b}' \
|
term_font="$(awk -F '=' '/font=/ {a=$2} /font_size/ {b=$2} END {print a " " b}' \
|
||||||
"${XDG_CONFIG_HOME}/deepin/deepin-terminal/config.conf")"
|
"${XDG_CONFIG_HOME}/deepin/deepin-terminal/config.conf")"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"GNUstep_Terminal")
|
"GNUstep_Terminal")
|
||||||
term_font="$(awk -F '>|<' '/>TerminalFont</ {getline; f=$3}
|
term_font="$(awk -F '>|<' '/>TerminalFont</ {getline; f=$3}
|
||||||
/>TerminalFontSize</ {getline; s=$3} END{print f " " s}' \
|
/>TerminalFontSize</ {getline; s=$3} END {print f " " s}' \
|
||||||
"${HOME}/GNUstep/Defaults/Terminal.plist")"
|
"${HOME}/GNUstep/Defaults/Terminal.plist")"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@@ -2875,7 +2872,7 @@ END
|
|||||||
END { print font " " size}' "${confs[0]}")"
|
END { print font " " size}' "${confs[0]}")"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"konsole"*)
|
"konsole" | "yakuake")
|
||||||
# Get Process ID of current konsole window / tab
|
# Get Process ID of current konsole window / tab
|
||||||
child="$(get_ppid "$$")"
|
child="$(get_ppid "$$")"
|
||||||
|
|
||||||
@@ -2958,7 +2955,7 @@ END
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
"qterminal")
|
"qterminal")
|
||||||
term_font="$(awk -F '=' '/fontFamily=/ {a=$2} /fontSize=/ {b=$2} END{print a " " b}' \
|
term_font="$(awk -F '=' '/fontFamily=/ {a=$2} /fontSize=/ {b=$2} END {print a " " b}' \
|
||||||
"${XDG_CONFIG_HOME}/qterminal.org/qterminal.ini")"
|
"${XDG_CONFIG_HOME}/qterminal.org/qterminal.ini")"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@@ -3019,7 +3016,7 @@ END
|
|||||||
|
|
||||||
"urxvt" | "urxvtd" | "rxvt-unicode" | "xterm")
|
"urxvt" | "urxvtd" | "rxvt-unicode" | "xterm")
|
||||||
xrdb="$(xrdb -query)"
|
xrdb="$(xrdb -query)"
|
||||||
term_font="$(grep -i "${term/d}"'\**\.*font' <<< "$xrdb")"
|
term_font="$(grep -im 1 -e "^${term/d}"'\**\.*font' -e '^\*font' <<< "$xrdb")"
|
||||||
term_font="${term_font/*"*font:"}"
|
term_font="${term_font/*"*font:"}"
|
||||||
term_font="${term_font/*".font:"}"
|
term_font="${term_font/*".font:"}"
|
||||||
term_font="${term_font/*"*.font:"}"
|
term_font="${term_font/*"*.font:"}"
|
||||||
@@ -3050,7 +3047,7 @@ END
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
"xfce4-terminal")
|
"xfce4-terminal")
|
||||||
term_font="$(awk -F '=' '/^FontName/{a=$2}/^FontUseSystem=TRUE/{a=$0}END{print a}' \
|
term_font="$(awk -F '=' '/^FontName/{a=$2}/^FontUseSystem=TRUE/{a=$0} END {print a}' \
|
||||||
"${XDG_CONFIG_HOME}/xfce4/terminal/terminalrc")"
|
"${XDG_CONFIG_HOME}/xfce4/terminal/terminalrc")"
|
||||||
|
|
||||||
[[ "$term_font" == "FontUseSystem=TRUE" ]] && \
|
[[ "$term_font" == "FontUseSystem=TRUE" ]] && \
|
||||||
@@ -3096,7 +3093,7 @@ get_disk() {
|
|||||||
for disk in "${disks[@]}"; do
|
for disk in "${disks[@]}"; do
|
||||||
# Create a second array and make each element split at whitespace this time.
|
# Create a second array and make each element split at whitespace this time.
|
||||||
IFS=" " read -ra disk_info <<< "$disk"
|
IFS=" " read -ra disk_info <<< "$disk"
|
||||||
disk_perc="${disk_info[4]/'%'}"
|
disk_perc="${disk_info[4]/\%}"
|
||||||
|
|
||||||
case "$df_version" in
|
case "$df_version" in
|
||||||
*"befhikm"*)
|
*"befhikm"*)
|
||||||
@@ -3179,12 +3176,19 @@ get_battery() {
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
"OpenBSD"* | "Bitrig"*)
|
"OpenBSD"* | "Bitrig"*)
|
||||||
battery0full="$(sysctl -n hw.sensors.acpibat0.watthour0)"
|
battery0full="$(sysctl -n hw.sensors.acpibat0.watthour0\
|
||||||
battery0full="${battery0full/ Wh*}"
|
hw.sensors.acpibat0.amphour0)"
|
||||||
|
battery0full="${battery0full%% *}"
|
||||||
|
|
||||||
battery0now="$(sysctl -n hw.sensors.acpibat0.watthour3)"
|
battery0now="$(sysctl -n hw.sensors.acpibat0.watthour3\
|
||||||
battery0now="${battery0now/ Wh*}"
|
hw.sensors.acpibat0.amphour3)"
|
||||||
|
battery0now="${battery0now%% *}"
|
||||||
|
|
||||||
|
state="$(sysctl -n hw.sensors.acpibat0.raw0)"
|
||||||
|
state="${state##? (battery }"
|
||||||
|
state="${state%)*}"
|
||||||
|
|
||||||
|
[[ "${state}" == "charging" ]] && battery_state="charging"
|
||||||
[[ "$battery0full" ]] && \
|
[[ "$battery0full" ]] && \
|
||||||
battery="$((100 * ${battery0now/\.} / ${battery0full/\.}))%"
|
battery="$((100 * ${battery0now/\.} / ${battery0full/\.}))%"
|
||||||
;;
|
;;
|
||||||
@@ -3213,9 +3217,9 @@ get_battery() {
|
|||||||
[[ "$battery_state" ]] && battery+=" Charging"
|
[[ "$battery_state" ]] && battery+=" Charging"
|
||||||
|
|
||||||
case "$battery_display" in
|
case "$battery_display" in
|
||||||
"bar") battery="$(bar "${battery/'%'*}" 100)" ;;
|
"bar") battery="$(bar "${battery/\%*}" 100)" ;;
|
||||||
"infobar") battery="${battery} $(bar "${battery/'%'*}" 100)" ;;
|
"infobar") battery="${battery} $(bar "${battery/\%*}" 100)" ;;
|
||||||
"barinfo") battery="$(bar "${battery/'%'*}" 100)${info_color} ${battery}" ;;
|
"barinfo") battery="$(bar "${battery/\%*}" 100)${info_color} ${battery}" ;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3243,7 +3247,7 @@ get_local_ip() {
|
|||||||
|
|
||||||
"Haiku")
|
"Haiku")
|
||||||
local_ip="$(ifconfig | awk -F ': ' '/Bcast/ {print $2}')"
|
local_ip="$(ifconfig | awk -F ': ' '/Bcast/ {print $2}')"
|
||||||
local_ip="${local_ip/', Bcast'}"
|
local_ip="${local_ip/, Bcast}"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
@@ -3361,7 +3365,7 @@ image_backend() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
get_term_size
|
get_window_size
|
||||||
|
|
||||||
((term_width < 1)) && {
|
((term_width < 1)) && {
|
||||||
to_ascii "Image: Failed to find terminal window size."
|
to_ascii "Image: Failed to find terminal window size."
|
||||||
@@ -3389,7 +3393,7 @@ image_backend() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get_ascii() {
|
get_ascii() {
|
||||||
if [[ -f "$image_source" ]]; then
|
if [[ -f "$image_source" && ! "$image_source" =~ (png|jpg|jpeg|jpe|svg|gif) ]]; then
|
||||||
ascii_data="$(< "$image_source")"
|
ascii_data="$(< "$image_source")"
|
||||||
else
|
else
|
||||||
err "Ascii: Ascii file not found, using distro ascii."
|
err "Ascii: Ascii file not found, using distro ascii."
|
||||||
@@ -3400,8 +3404,7 @@ get_ascii() {
|
|||||||
|
|
||||||
# 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} > ascii_length)) && ascii_length="${#line}"
|
((++lines,${#line}>ascii_length)) && ascii_length="${#line}"
|
||||||
((++lines))
|
|
||||||
done <<< "${ascii_data//\$\{??\}}"
|
done <<< "${ascii_data//\$\{??\}}"
|
||||||
|
|
||||||
# Colors.
|
# Colors.
|
||||||
@@ -3413,7 +3416,7 @@ get_ascii() {
|
|||||||
ascii_data="${ascii_data//\$\{c6\}/$c6}"
|
ascii_data="${ascii_data//\$\{c6\}/$c6}"
|
||||||
|
|
||||||
((text_padding=ascii_length+gap))
|
((text_padding=ascii_length+gap))
|
||||||
printf '%b\n' "$ascii_data"
|
printf '%b\n' "$ascii_data${reset}"
|
||||||
LC_ALL=C
|
LC_ALL=C
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3488,6 +3491,11 @@ END
|
|||||||
image="$(decode_url "$image")"
|
image="$(decode_url "$image")"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
"GNOME"*)
|
||||||
|
image="$(gsettings get org.gnome.desktop.background picture-uri)"
|
||||||
|
image="$(decode_url "$image")"
|
||||||
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
if type -p feh >/dev/null && [[ -f "${HOME}/.fehbg" ]]; then
|
if type -p feh >/dev/null && [[ -f "${HOME}/.fehbg" ]]; then
|
||||||
image="$(awk -F\' '/feh/ {printf $(NF-1)}' "${HOME}/.fehbg")"
|
image="$(awk -F\' '/feh/ {printf $(NF-1)}' "${HOME}/.fehbg")"
|
||||||
@@ -3509,7 +3517,7 @@ END
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
# Strip un-needed info from the path.
|
# Strip un-needed info from the path.
|
||||||
image="${image/'file://'}"
|
image="${image/file:\/\/}"
|
||||||
image="$(trim_quotes "$image")"
|
image="$(trim_quotes "$image")"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@@ -3530,11 +3538,11 @@ get_w3m_img_path() {
|
|||||||
err "Image: w3m-img wasn't found on your system"
|
err "Image: w3m-img wasn't found on your system"
|
||||||
}
|
}
|
||||||
|
|
||||||
get_term_size() {
|
get_window_size() {
|
||||||
# This functions gets the current window size in
|
# This functions gets the current window size in
|
||||||
# pixels.
|
# pixels.
|
||||||
#
|
#
|
||||||
# We first try to use the escape sequence "\044[14t"
|
# We first try to use the escape sequence "\033[14t"
|
||||||
# to get the terminal window size in pixels. If this
|
# to get the terminal window size in pixels. If this
|
||||||
# fails we then fallback to using "xdotool" or other
|
# fails we then fallback to using "xdotool" or other
|
||||||
# programs.
|
# programs.
|
||||||
@@ -3606,14 +3614,19 @@ get_term_size() {
|
|||||||
term_width="${term_width:-0}"
|
term_width="${term_width:-0}"
|
||||||
}
|
}
|
||||||
|
|
||||||
get_image_size() {
|
|
||||||
# This functions determines the size to make
|
get_term_size() {
|
||||||
# the thumbnail image.
|
# Get the terminal size in cells.
|
||||||
read -r lines columns <<< "$(stty size)"
|
read -r lines columns < <(stty size)
|
||||||
|
|
||||||
# Calculate font size.
|
# Calculate font size.
|
||||||
font_width="$((term_width / columns))"
|
font_width="$((term_width / columns))"
|
||||||
font_height="$((term_height / lines))"
|
font_height="$((term_height / lines))"
|
||||||
|
}
|
||||||
|
|
||||||
|
get_image_size() {
|
||||||
|
# This functions determines the size to make the thumbnail image.
|
||||||
|
get_term_size
|
||||||
|
|
||||||
case "$image_size" in
|
case "$image_size" in
|
||||||
"auto")
|
"auto")
|
||||||
@@ -3635,17 +3648,15 @@ get_image_size() {
|
|||||||
"none")
|
"none")
|
||||||
# Get image size so that we can do a better crop.
|
# Get image size so that we can do a better crop.
|
||||||
read -r width height <<< "$(identify -format "%w %h" "$image")"
|
read -r width height <<< "$(identify -format "%w %h" "$image")"
|
||||||
crop_mode="none"
|
|
||||||
|
|
||||||
while ((width >= (term_width / 2) || height >= term_height)); do
|
while ((width >= (term_width / 2) || height >= term_height)); do
|
||||||
((width=width/2))
|
((width=width/2,height=height/2))
|
||||||
((height=height/2))
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
crop_mode="none"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*) image_size="${image_size/px}" ;;
|
||||||
image_size="${image_size/px}"
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
width="${width:-$image_size}"
|
width="${width:-$image_size}"
|
||||||
@@ -4063,7 +4074,7 @@ get_user_config() {
|
|||||||
|
|
||||||
elif [[ -f "${files[0]}" ]]; then
|
elif [[ -f "${files[0]}" ]]; then
|
||||||
source "${files[0]}"
|
source "${files[0]}"
|
||||||
err "Config: Sourced user config. (${config_file})"
|
err "Config: Sourced user config. (${files[0]})"
|
||||||
|
|
||||||
else
|
else
|
||||||
config_file="${XDG_CONFIG_HOME}/neofetch/config.conf"
|
config_file="${XDG_CONFIG_HOME}/neofetch/config.conf"
|
||||||
@@ -4150,6 +4161,14 @@ cache_uname() {
|
|||||||
kernel_name="${uname[0]}"
|
kernel_name="${uname[0]}"
|
||||||
kernel_version="${uname[1]}"
|
kernel_version="${uname[1]}"
|
||||||
kernel_machine="${uname[2]}"
|
kernel_machine="${uname[2]}"
|
||||||
|
|
||||||
|
if [[ "$kernel_name" == "Darwin" ]]; then
|
||||||
|
IFS=$'\n' read -d "" -ra sw_vers < <(awk -F'<|>' '/string/ {print $3}' \
|
||||||
|
"/System/Library/CoreServices/SystemVersion.plist")
|
||||||
|
darwin_name="${sw_vers[2]}"
|
||||||
|
osx_version="${sw_vers[3]}"
|
||||||
|
osx_build="${sw_vers[0]}"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
get_ppid() {
|
get_ppid() {
|
||||||
@@ -4157,7 +4176,7 @@ get_ppid() {
|
|||||||
case "$os" in
|
case "$os" in
|
||||||
"Windows")
|
"Windows")
|
||||||
ppid="$(ps -p "${1:-$PPID}" | awk '{printf $2}')"
|
ppid="$(ps -p "${1:-$PPID}" | awk '{printf $2}')"
|
||||||
ppid="${ppid/'PPID'}"
|
ppid="${ppid/PPID}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"Linux")
|
"Linux")
|
||||||
@@ -4178,7 +4197,7 @@ get_process_name() {
|
|||||||
case "$os" in
|
case "$os" in
|
||||||
"Windows")
|
"Windows")
|
||||||
name="$(ps -p "${1:-$PPID}" | awk '{printf $8}')"
|
name="$(ps -p "${1:-$PPID}" | awk '{printf $8}')"
|
||||||
name="${name/'COMMAND'}"
|
name="${name/COMMAND}"
|
||||||
name="${name/*\/}"
|
name="${name/*\/}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@@ -4569,7 +4588,7 @@ get_args() {
|
|||||||
"-v") verbose="on" ;;
|
"-v") verbose="on" ;;
|
||||||
"--print_config") printf '%s\n' "$config"; exit ;;
|
"--print_config") printf '%s\n' "$config"; exit ;;
|
||||||
"-vv") set -x; verbose="on" ;;
|
"-vv") set -x; verbose="on" ;;
|
||||||
"-h"|"--help") usage ;;
|
"--help") usage ;;
|
||||||
"--version")
|
"--version")
|
||||||
printf '%s\n' "Neofetch $version"
|
printf '%s\n' "Neofetch $version"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -4645,7 +4664,8 @@ get_args() {
|
|||||||
cpu_temp="C"
|
cpu_temp="C"
|
||||||
|
|
||||||
# Known implicit unused variables.
|
# Known implicit unused variables.
|
||||||
printf '%s\n' "$kernel $icons $font $battery $locale"
|
mpc_args=()
|
||||||
|
printf '%s\n' "$kernel $icons $font $battery $locale ${mpc_args[*]}"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@@ -4934,7 +4954,7 @@ ${c1} /\
|
|||||||
/${c2} __ \
|
/${c2} __ \
|
||||||
/ ( ) \
|
/ ( ) \
|
||||||
/ __| |__\\\
|
/ __| |__\\\
|
||||||
/// \\\\\
|
/// \\\\\\
|
||||||
EOF
|
EOF
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@@ -5403,6 +5423,32 @@ ${c1} ..,:${c3}dOkxl:.
|
|||||||
EOF
|
EOF
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
"ClearOS"*)
|
||||||
|
set_colors 2
|
||||||
|
read -rd '' ascii_data <<'EOF'
|
||||||
|
${c1} `.--::::::--.`
|
||||||
|
.-:////////////////:-.
|
||||||
|
`-////////////////////////-`
|
||||||
|
-////////////////////////////-
|
||||||
|
`//////////////-..-//////////////`
|
||||||
|
./////////////: ://///////////.
|
||||||
|
`//////:..-////: :////-..-//////`
|
||||||
|
://////` -///:.``.:///-` ://///:
|
||||||
|
`///////:. -////////-` `:///////`
|
||||||
|
.//:--////:. -////-` `:////--://.
|
||||||
|
./: .////:. --` `:////- :/.
|
||||||
|
`//-` .////:. `:////- `-//`
|
||||||
|
:///-` .////:. `:////- `-///:
|
||||||
|
`/////-` -///: :///- `-/////`
|
||||||
|
`//////- `///: :///` .//////`
|
||||||
|
`:////: `///: :///` -////:`
|
||||||
|
.://: `///: :///` -//:.
|
||||||
|
.:: `///: :///` -:.
|
||||||
|
`///: :///`
|
||||||
|
`... ...`
|
||||||
|
EOF
|
||||||
|
;;
|
||||||
|
|
||||||
"Clover"*)
|
"Clover"*)
|
||||||
set_colors 2 6
|
set_colors 2 6
|
||||||
read -rd '' ascii_data <<'EOF'
|
read -rd '' ascii_data <<'EOF'
|
||||||
@@ -6093,6 +6139,24 @@ WW W
|
|||||||
EOF
|
EOF
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
"januslinux"*)
|
||||||
|
set_colors 7
|
||||||
|
read -rd '' ascii_data <<'EOF'
|
||||||
|
${c1} ________________
|
||||||
|
|\ \
|
||||||
|
| \ \
|
||||||
|
| \ \
|
||||||
|
| \ ______________\
|
||||||
|
| | |
|
||||||
|
| | |
|
||||||
|
| | |
|
||||||
|
\ | januslinux |
|
||||||
|
\ | |
|
||||||
|
\ | |
|
||||||
|
\|______________|
|
||||||
|
EOF
|
||||||
|
;;
|
||||||
|
|
||||||
"Kali"*)
|
"Kali"*)
|
||||||
set_colors 4 8
|
set_colors 4 8
|
||||||
read -rd '' ascii_data <<'EOF'
|
read -rd '' ascii_data <<'EOF'
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6.
|
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6.
|
||||||
.TH NEOFETCH "1" "June 2018" "Neofetch 4.0.3" "User Commands"
|
.TH NEOFETCH "1" "June 2018" "Neofetch 5.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
|
||||||
@@ -23,7 +23,7 @@ For example: 'info "Memory" memory' would be '\-\-disable memory'
|
|||||||
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/off
|
||||||
Hide/Show Package Manager names.
|
Hide/Show Package Manager names . (tiny, on, off)
|
||||||
.TP
|
.TP
|
||||||
\fB\-\-os_arch\fR on/off
|
\fB\-\-os_arch\fR on/off
|
||||||
Hide/Show OS architecture.
|
Hide/Show OS architecture.
|
||||||
@@ -260,8 +260,6 @@ Whether or not to bold the ascii logo.
|
|||||||
.TP
|
.TP
|
||||||
\fB\-L\fR, \fB\-\-logo\fR
|
\fB\-L\fR, \fB\-\-logo\fR
|
||||||
Hide the info text and only show the ascii logo.
|
Hide the info text and only show the ascii logo.
|
||||||
.IP
|
|
||||||
Possible values: bar, infobar, barinfo, off
|
|
||||||
.SS "IMAGE:"
|
.SS "IMAGE:"
|
||||||
.TP
|
.TP
|
||||||
\fB\-\-loop\fR
|
\fB\-\-loop\fR
|
||||||
|
|||||||
Reference in New Issue
Block a user