mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-10-04 17:09:21 +00:00
Compare commits
123 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
e506315bac | ||
|
9c48d2548a | ||
|
23f0e9d200 | ||
|
eda671d732 | ||
|
f24432a63a | ||
|
36203d1919 | ||
|
e021d30d1e | ||
|
832c7bbd81 | ||
|
e4e4594aef | ||
|
6b926485f1 | ||
|
87927bc81b | ||
|
11c8c289a8 | ||
|
f5e55acc67 | ||
|
17d334e44f | ||
|
83a0781a3f | ||
|
b8bcd13346 | ||
|
d55ff4ee94 | ||
|
a76d3285b2 | ||
|
d23a071fc0 | ||
|
2094c134ce | ||
|
ea580434aa | ||
|
28adc60e57 | ||
|
d8e1150e19 | ||
|
9902609679 | ||
|
5cca832de5 | ||
|
15451a5283 | ||
|
0180485851 | ||
|
8deb31b3d6 | ||
|
6a3845486b | ||
|
0573560cca | ||
|
65fb501c1f | ||
|
0e50e7d3ba | ||
|
0efc00419e | ||
|
ea55959468 | ||
|
cedc3846d1 | ||
|
efa8110d31 | ||
|
1216c9d5ad | ||
|
d23dcbe3bc | ||
|
e6044b3c41 | ||
|
d742d9aa9c | ||
|
e562e73387 | ||
|
f8f26453ae | ||
|
b37916e42a | ||
|
631ae8d2b4 | ||
|
a6573119f9 | ||
|
1e6804f54a | ||
|
4659863737 | ||
|
d34f01f21b | ||
|
464a810f94 | ||
|
1e9c22af9f | ||
|
a575c01b5c | ||
|
e1f2dcac93 | ||
|
012e2cbcb1 | ||
|
48e1cd5132 | ||
|
e92a03816e | ||
|
7f732aef1e | ||
|
fc06ad86cf | ||
|
adeb59173d | ||
|
bfcab94391 | ||
|
18143b4be2 | ||
|
6803b571b7 | ||
|
0c4d4eb23a | ||
|
1bd185874c | ||
|
91a7bd4737 | ||
|
7cf891a63b | ||
|
fd3d2fc29b | ||
|
f7614f5703 | ||
|
ce7ef19372 | ||
|
7bf8f17854 | ||
|
9b0c8fff2c | ||
|
ac7cf27147 | ||
|
30a6d8641b | ||
|
d8561cceed | ||
|
8d250e41ba | ||
|
8c783d63a2 | ||
|
53eafeb414 | ||
|
1a6fe2099c | ||
|
93bfcf178a | ||
|
707601bbf7 | ||
|
98061ca6c0 | ||
|
0c03845100 | ||
|
569bef567f | ||
|
24283be05d | ||
|
e8bdd31b46 | ||
|
c9d14c2dbe | ||
|
38641c690e | ||
|
d1e81f3344 | ||
|
3cf7c5ffa2 | ||
|
e2d1cb27a5 | ||
|
eec7f08eee | ||
|
4387233378 | ||
|
e9c8e6c2a3 | ||
|
072ad5cfff | ||
|
982f2b59ec | ||
|
1af650eaf1 | ||
|
39986f2197 | ||
|
716e50ecbf | ||
|
51fa1b3c12 | ||
|
ceadf7d5fa | ||
|
6c8d8f2cc6 | ||
|
9becea4feb | ||
|
153c26aa1f | ||
|
110e95a194 | ||
|
07ade10735 | ||
|
0dea3ba495 | ||
|
8c3fef5396 | ||
|
c583d06780 | ||
|
953979937f | ||
|
7afd5b2d22 | ||
|
b952030011 | ||
|
fefad4f98c | ||
|
199dadd537 | ||
|
0af39a6d30 | ||
|
ca54e76f52 | ||
|
2b2a9c19dc | ||
|
69046ae124 | ||
|
04d180c6f0 | ||
|
43132fc4e5 | ||
|
6ee9464101 | ||
|
bff259fdd0 | ||
|
b4e5169aa9 | ||
|
8fb4aec1ed | ||
|
e44a06aa2c |
144
CHANGELOG.md
144
CHANGELOG.md
@@ -1,88 +1,104 @@
|
||||
This minor release fixes all of the bugs that were found in the 3.0 release.
|
||||
|
||||
Thanks for all of the bug reports and contributions. :)
|
||||
|
||||
|
||||
## Contributors
|
||||
|
||||
- **[@SomaUlte](https://github.com/SomaUlte)**
|
||||
- **[@jorgegonzalez](https://github.com/jorgegonzalez)**
|
||||
- **[@dawidd6](https://github.com/dawidd6)**
|
||||
- **[@mstraube](https://github.com/mstraube)**
|
||||
- **[@YellowApple](https://github.com/YellowApple)**
|
||||
- **[@siiptuo](https://github.com/siiptuo)**
|
||||
- **[@Head-on-a-Stick](https://github.com/Head-on-a-Stick)**
|
||||
- **[@konimex](https://github.com/konimex)**
|
||||
- **[@mstraube](https://github.com/mstraube)**
|
||||
- **[@jorgegonzalez](https://github.com/jorgegonzalez)**
|
||||
- **[@ikeydoherty](https://github.com/ikeydoherty)**
|
||||
- **[@eliezio](https://github.com/eliezio)**
|
||||
- **[@nilesr](https://github.com/nilesr)**
|
||||
- **[@dritter](https://github.com/dritter)**
|
||||
- **[@HebaruSan](https://github.com/HebaruSan)**
|
||||
- **[@LER0ever](https://github.com/LER0ever)**
|
||||
- **[@obrevenge](https://github.com/obrevenge)**
|
||||
- **[@ajjames31](https://github.com/ajjames31)**
|
||||
- Eliezio Oliveira
|
||||
|
||||
|
||||
## Operating System
|
||||
|
||||
- Added support for ArchBox Linux.
|
||||
- Added Chrome OS Crouton support. **[@LER0ever](https://github.com/LER0ever)**
|
||||
- Added support for SliTaz. **[@nilesr](https://github.com/nilesr)**
|
||||
- Added support for Nitrux. **[@mstraube](https://github.com/mstraube)**
|
||||
- Added support for DesaOS.
|
||||
- Added support for MinGW.
|
||||
- Added support for OBRevenge. **[@obrevenge](https://github.com/obrevenge)**
|
||||
- Added support for ArchLabs. **[@obrevenge](https://github.com/obrevenge)**
|
||||
|
||||
|
||||
## General
|
||||
## Screenshot
|
||||
|
||||
- Fixed output if subtitles are disabled and `prin` is used in an info function.
|
||||
- Fixed underlines not working when used with `prin`.
|
||||
- Fixed HAIKU install path. **[@YellowApple](https://github.com/YellowApple)**
|
||||
The screenshot feature no longer requires any configuration before working. We no longer hardcode `${HOME}/Pictures/neofetch` as the screenshot location. Here's how the `-s` and `-su` flags now function:
|
||||
|
||||
- `neofetch -s` will save a file in the current directory named: `neofetch-$(date +%F-%I-%M-%S-${RANDOM}).png`
|
||||
- `neofetch -s test.png` will save a file in the current directory called `test.png`
|
||||
- `neofetch -s ~/` will save a file in `~` called `neofetch-$(date +%F-%I-%M-%S-${RANDOM}).png`
|
||||
- `neofetch -s ~/test.png` will save a file in `~` called `test.png`.
|
||||
|
||||
|
||||
## Config
|
||||
## ASCII
|
||||
|
||||
- Fixed default config not found.
|
||||
- Don't set locale in config file.
|
||||
|
||||
|
||||
## Info
|
||||
|
||||
**Memory**<br \>
|
||||
|
||||
- Changed memory label to `MiB` on OS that output memory in Mebibytes.
|
||||
|
||||
**Shell**<br \>
|
||||
|
||||
- Fixed a crash when the user has `bash 3` installed.
|
||||
|
||||
**Packages**<br \>
|
||||
|
||||
- Added support for Chromebrew.
|
||||
|
||||
**GPU**<br \>
|
||||
|
||||
- [Linux] Display detailed information about Intel GPUs. **[@SomaUlte](https://github.com/SomaUlte)**
|
||||
|
||||
**Color Blocks**<br \>
|
||||
|
||||
- Fixed issue with `color_blocks="off"` adding an extra newline to the output.
|
||||
|
||||
**Song**<br \>
|
||||
|
||||
- Don't print `$song` if it's empty and `song_shorthand` is on. **[@mstraube](https://github.com/mstraube)**
|
||||
- Fixed `mpd` detection when `mpd` is on a different host. **[@dawidd6](https://github.com/dawidd6)**
|
||||
- Use `get_song_dbus` for Audacious. **[@mstraube](https://github.com/mstraube)**
|
||||
|
||||
**Terminal Font**<br \>
|
||||
|
||||
- [Alacritty] Fixed font detection. **[@siiptuo](https://github.com/siiptuo)**
|
||||
- Arch ASCII art now uses lighter colors.
|
||||
- Fixed Ubuntu-Studio ASCII setting. **[@@HebaruSan](https://github.com/HebaruSan)**
|
||||
- Updated Parabola logo. **[@mstraube](https://github.com/mstraube)**
|
||||
- Updated Raspbian ASCII art.
|
||||
|
||||
|
||||
## Images
|
||||
|
||||
- [iTerm2] Fixed issue with line-breaks printing spaces over the image. **[@jorgegonzalez](https://github.com/jorgegonzalez)**
|
||||
- Fixed issue with images not working in Terminology.
|
||||
- Fixed issue when `image_source` was set to `wall`.
|
||||
- [w3m-img] Fixed issues with `w3m-img` and `tmux`.
|
||||
- Added `libsixel` backend.
|
||||
- Added `termpix` backend.
|
||||
- Only use a zero width space in the `w3m` backend.
|
||||
- Fixed bug causing terminal size to not be found.
|
||||
- [iTerm2] Fixed images not appearing inside `tmux`.
|
||||
|
||||
|
||||
## Ascii
|
||||
## Info
|
||||
|
||||
- [Windows 10] Fixed `ascii_distro` not working.
|
||||
- Fixed a bug where the backend is `ascii` but the image_source is an image file.
|
||||
- Fixed custom ascii files not working.
|
||||
- Removed extra backslashes from OpenBSD ascii art. **[@Head-on-a-Stick](https://github.com/Head-on-a-Stick)**
|
||||
**Locale**
|
||||
|
||||
- Added a new function to display system locale. (Disabled by default)
|
||||
|
||||
## Scrot
|
||||
**CPU**
|
||||
|
||||
- Added message to let users know that a screenshot was taken.
|
||||
- Added option to show decimals in CPU speed.
|
||||
|
||||
**Terminal Font**
|
||||
|
||||
- Added \*experimental\* font detection for iTerm2. **[@dritter](https://github.com/dritter)**
|
||||
|
||||
**Window Manager**
|
||||
|
||||
- [MacOS] Added support for Kwm. **[@jorgegonzalez](https://github.com/jorgegonzalez)**
|
||||
- [MacOS] Added support for Spectacle. **[@jorgegonzalez](https://github.com/jorgegonzalez)**
|
||||
- [MacOS] Added support for Amethyst. **[@jorgegonzalez](https://github.com/jorgegonzalez)**
|
||||
|
||||
**Battery**
|
||||
|
||||
- Added battery support for Bay Trail devices. **[@mstraube](https://github.com/mstraube)**
|
||||
|
||||
**Disk**
|
||||
|
||||
- Added new option to only show dir name in subtitle.
|
||||
|
||||
**Song**
|
||||
|
||||
- Added support for Deepin Music. **[@mstraube](https://github.com/mstraube)**
|
||||
- Added support for Tomahawk. **[@mstraube](https://github.com/mstraube)**
|
||||
- Fixed Audacious song output when `dbus-send` fails. **[@mstraube](https://github.com/mstraube)**
|
||||
|
||||
**Local IP**
|
||||
|
||||
- [Linux] Fixed UID showing instead of Local IP on several versions/configs of iproute2.
|
||||
|
||||
**Packages**
|
||||
|
||||
- [eopkg] Use a faster detection method. **[@ikeydoherty](https://github.com/ikeydoherty)**
|
||||
|
||||
**Resolution**
|
||||
|
||||
- [macOS] Fixed `screenresolution` not appearing at all on newer versions. **[@eliezio](https://github.com/eliezio)**
|
||||
- [Linux] Show decimals.
|
||||
|
||||
**GPU**
|
||||
|
||||
- [Linux] Hide duplicate GPU lines (Only display 1).
|
||||
|
12
README.md
12
README.md
@@ -6,11 +6,11 @@
|
||||
[](./LICENSE.md)
|
||||
[](https://github.com/dylanaraps/neofetch/releases)
|
||||
|
||||
Neofetch is a CLI system information tool written in BASH. Neofetch displays information about your system next to an image, your OS logo, or any ascii file of your choice. The main purpose of Neofetch is to be used in screenshots to show other users what OS/Distro you're running, what Theme/Icons you're using and etc.
|
||||
Neofetch is a CLI system information tool written in BASH. Neofetch displays information about your system next to an image, your OS logo, or any ASCII file of your choice. The main purpose of Neofetch is to be used in screenshots to show other users what OS/Distro you're running, what Theme/Icons you're using etc.
|
||||
|
||||
Neofetch is highly customizable through the use of commandline flags or the user config file. There are over 50 config options to mess around with and there's the `print_info()` function and friends which let you add your own custom info.
|
||||
Neofetch is highly customizable through the use of command line flags or the user config file. There are over 50 config options to mess around with and there's the `print_info()` function and friends which let you add your own custom info.
|
||||
|
||||
Neofetch can be used on any OS that has BASH, it's just a matter of adding support. If your OS/Distro isn't in the list below, feel free to open an issue on the repo and I'll gladly add support. Neofetch currently supports `Linux`, `MacOS`, `iOS`, `BSD`, `Solaris`, `Android`, `Haiku`, `GNU Hurd`, `MINIX`, `AIX`, and `Windows (Cygwin/MSYS2/Windows 10 Linux subsystem)`.
|
||||
Neofetch can be used on any OS that has BASH, it's just a matter of adding support. If your OS/Distro isn't in the list below, feel free to open an issue on the repo and I'll gladly add support. Neofetch currently supports `Linux`, `MacOS`, `iOS`, `BSD`, `Solaris`, `Android`, `Haiku`, `GNU Hurd`, `MINIX`, `AIX`, and `Windows (Cygwin/MSYS2/MinGW/Windows 10 Linux subsystem)`.
|
||||
|
||||
For more information:
|
||||
|
||||
@@ -48,7 +48,7 @@ https://github.com/dylanaraps/neofetch/wiki/Customizing-Info
|
||||
|
||||
### Customizing the script using a custom alias
|
||||
|
||||
If you don't want to use the config file you can customize almost everything using launch flags!
|
||||
If you don't want to use the config file you can customize almost everything using launch flags.
|
||||
|
||||
Here's an example neofetch alias:
|
||||
|
||||
@@ -76,6 +76,6 @@ Thanks to:
|
||||
- Thanks for using Neofetch!
|
||||
- [Screenfetch](https://github.com/KittyKatt/screenFetch):
|
||||
- We've used some snippets as a base for a few functions in this script.
|
||||
- Some of the ascii logos.
|
||||
- Some of the ASCII logos.
|
||||
- [ufetch](https://github.com/jschx/ufetch):
|
||||
- Tiny ascii logos
|
||||
- Tiny ASCII logos
|
||||
|
18
ascii/distro/archlabs
Normal file
18
ascii/distro/archlabs
Normal file
@@ -0,0 +1,18 @@
|
||||
${c1} sy
|
||||
h--d
|
||||
d---:
|
||||
:----/N
|
||||
:------/N
|
||||
N/----:---+
|
||||
N/---+/ :--:o
|
||||
N/--:/ ::::s
|
||||
+--- ::::s
|
||||
N+---+ ::::s
|
||||
N+----o +:o s::::s
|
||||
N/----:: s:::s h:::::s
|
||||
N/----:::y::::+ o::::::o
|
||||
N/---::::::::::s d::::::::+N
|
||||
/--::::::::::::dd::::::::::+N
|
||||
:-:::/+syhd NNN N dhys+/:::/
|
||||
d::+ydN /s+/d
|
||||
hsd y\\.
|
16
ascii/distro/desaos
Normal file
16
ascii/distro/desaos
Normal file
@@ -0,0 +1,16 @@
|
||||
${c1}███████████████████████
|
||||
███████████████████████
|
||||
███████████████████████
|
||||
███████████████████████
|
||||
████████ ███████
|
||||
████████ ███████
|
||||
████████ ███████
|
||||
████████ ███████
|
||||
████████ ███████
|
||||
████████ ███████
|
||||
████████ ███████
|
||||
██████████████████████████████
|
||||
██████████████████████████████
|
||||
████████████████████████
|
||||
████████████████████████
|
||||
████████████████████████
|
18
ascii/distro/nitrux
Normal file
18
ascii/distro/nitrux
Normal file
@@ -0,0 +1,18 @@
|
||||
${c1}`:/.
|
||||
`/yo
|
||||
`/yo
|
||||
`/yo .+:.
|
||||
`/yo .sys+:.`
|
||||
`/yo `-/sys+:.`
|
||||
`/yo ./sss+:.`
|
||||
`/yo .:oss+:-`
|
||||
`/yo ./o///:-`
|
||||
`/yo `.-:///////:`
|
||||
`/yo `.://///++//-``
|
||||
`/yo `.-:////++++/-`
|
||||
`/yo `-://///++o+/-`
|
||||
`/yo `-/+o+++ooo+/-`
|
||||
`/s+:+oooossso/.`
|
||||
`//+sssssso:.
|
||||
`+syyyy+:`
|
||||
:+s+-
|
18
ascii/distro/obrevenge
Normal file
18
ascii/distro/obrevenge
Normal file
@@ -0,0 +1,18 @@
|
||||
${c1} __ __
|
||||
_@@@@ @@@g_
|
||||
_@@@@@@ @@@@@@
|
||||
_@@@@@@M W@@@@@@_
|
||||
j@@@@P ^W@@@@
|
||||
@@@@L____ _____Q@@@@
|
||||
Q@@@@@@@@@@j@@@@@@@@@@
|
||||
@@@@@ T@j@ T@@@@@
|
||||
@@@@@ ___Q@J@ _@@@@@
|
||||
@@@@@fMMM@@j@jggg@@@@@@
|
||||
@@@@@ j@j@^MW@P @@@@
|
||||
Q@@@@@ggg@@f@ @@@@@@L
|
||||
^@@@@WWMMP ^ Q@@@@
|
||||
@@@@@_ _@@@@l
|
||||
W@@@@@g_____g@@@@@P
|
||||
@@@@@@@@@@@@@@@@l
|
||||
^W@@@@@@@@@@@P
|
||||
^TMMMMTll
|
@@ -1,17 +1,16 @@
|
||||
${c1} eeeeeeeee
|
||||
eeeeeeeeeeeeeee
|
||||
eeeeee${c2}//////////${c1}eeeee
|
||||
eeeee${c2}///////////////${c1}eeeee
|
||||
eeeee${c2}/// ////${c1}eeee
|
||||
eeee${c2}// ///${c1}eeeee
|
||||
eee ${c2}///${c1}eeeee
|
||||
ee ${c2}//${c1}eeeeee
|
||||
e ${c2}/${c1}eeeeeee
|
||||
eeeeeee
|
||||
eeeeee
|
||||
eeeeee
|
||||
eeeee
|
||||
eeee
|
||||
eee
|
||||
ee
|
||||
e
|
||||
${c1} `.-. `.
|
||||
`.` `:++. `-+o+.
|
||||
`` `:+/. `:+/. `-+oooo+
|
||||
``-::-.:+/. `:+/. `-+oooooo+
|
||||
`.-:///- ..` .-. `-+oooooooo-
|
||||
`..-..` `+ooooooooo:
|
||||
`` :oooooooo/
|
||||
`ooooooo:
|
||||
`oooooo:
|
||||
-oooo+.
|
||||
+ooo/`
|
||||
-ooo-
|
||||
`+o/.
|
||||
/+-
|
||||
//`
|
||||
-.
|
||||
|
@@ -1,18 +1,23 @@
|
||||
${c1} .',;:cc;,'. .,;::c:,,.
|
||||
,ooolcloooo: 'oooooccloo:
|
||||
.looooc;;:ol :oc;;:ooooo'
|
||||
;oooooo: ,ooooooc.
|
||||
.,:;'. .;:;'.
|
||||
${c2}.... ..'''''. ....
|
||||
.''. ..'''''. ..''.
|
||||
.. ..... ..... ..
|
||||
. .''''''' .''''''. .
|
||||
.'' .'''''''' .'''''''. ''.
|
||||
''' ''''''' .'''''' '''
|
||||
.' ........... ... .'.
|
||||
.... ''''''''. .''.
|
||||
'''''. ''''''''. .'''''
|
||||
'''''. .'''''. .'''''.
|
||||
..''. . .''..
|
||||
.'''''''
|
||||
......
|
||||
${c1} `.::///+:/-. --///+//-:``
|
||||
`+oooooooooooo: `+oooooooooooo:
|
||||
/oooo++//ooooo: ooooo+//+ooooo.
|
||||
`+ooooooo:-:oo- +o+::/ooooooo:
|
||||
`:oooooooo+`` `.oooooooo+-
|
||||
`:++ooo/. :+ooo+/.`
|
||||
${c2}...` `.----.` ``..
|
||||
.::::-``:::::::::.`-:::-`
|
||||
-:::-` .:::::::-` `-:::-
|
||||
`::. `.--.` `` `.---.``.::`
|
||||
.::::::::` -::::::::` `
|
||||
.::` .:::::::::- `::::::::::``::.
|
||||
-:::` ::::::::::. ::::::::::.`:::-
|
||||
:::: -::::::::. `-:::::::: ::::
|
||||
-::- .-:::-.``....``.-::-. -::-
|
||||
.. `` .::::::::. `..`..
|
||||
-:::-` -::::::::::` .:::::`
|
||||
:::::::` -::::::::::` :::::::.
|
||||
.::::::: -::::::::. ::::::::
|
||||
`-:::::` ..--.` ::::::.
|
||||
`...` `...--..` `...`
|
||||
.::::::::::
|
||||
`.-::::-`
|
||||
|
17
ascii/distro/slitaz
Normal file
17
ascii/distro/slitaz
Normal file
@@ -0,0 +1,17 @@
|
||||
${c1} @ @( @
|
||||
@@ @@ @ @/
|
||||
@@ @@ @@ @@
|
||||
@@ %@@ @@ @@
|
||||
@@ %@@@ @@@@@. @@@@ @@
|
||||
@@@ @@@@ @@@@@@@ &@@@ @@@
|
||||
@@@@@@@ %@@@@@@@@@@@@ &@@@% @@@@@@@/
|
||||
,@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||
.@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@/
|
||||
@@@@@@. @@@@@@@@@@@@@@@@@@@@@ /@@@@@@
|
||||
@@ @@@@@ @@@@@@@@@@@@, @@@@@ @@@
|
||||
@@ @@@@. @@@@@@@@@@@@@% #@@@@ @@.
|
||||
@@ ,@@ @@@@@@@@@@@@@ @@@ @@
|
||||
@ @@. @@@@@@@@@@@@@ @@@ *@
|
||||
@ @@ @@@@@@@@@@@@ @@ @
|
||||
@ @@@@@@@@@. #@
|
||||
@ ,@@@@@ @
|
@@ -37,6 +37,7 @@ print_info() {
|
||||
# info "Public IP" public_ip
|
||||
# info "Users" users
|
||||
# info "Install Date" install_date
|
||||
# info "Locale" locale # This only works on glibc systems.
|
||||
|
||||
info line_break
|
||||
info cols
|
||||
@@ -138,6 +139,17 @@ shell_version="on"
|
||||
# NOTE: Any file in '/sys/devices/system/cpu/cpu0/cpufreq' can be used as a value.
|
||||
speed_type="bios_limit"
|
||||
|
||||
# CPU speed shorthand
|
||||
#
|
||||
# Default: 'off'
|
||||
# Values: 'on', 'off'.
|
||||
# Flag: --speed_shorthand.
|
||||
#
|
||||
# Example:
|
||||
# on: 'i7-6500U (4) @ 3.1GHz'
|
||||
# off: 'i7-6500U (4) @ 3.100GHz'
|
||||
speed_shorthand="off"
|
||||
|
||||
# Shorten the output of the CPU function
|
||||
#
|
||||
# Default: 'off'
|
||||
@@ -317,7 +329,7 @@ disk_show=('/')
|
||||
# What to append to the Disk subtitle.
|
||||
#
|
||||
# Default: 'mount'
|
||||
# Values: 'mount', 'name'
|
||||
# Values: 'mount', 'name', 'dir'
|
||||
# Flag: --disk_subtitle
|
||||
#
|
||||
# Example:
|
||||
@@ -326,6 +338,11 @@ disk_show=('/')
|
||||
#
|
||||
# mount: 'Disk (/): 74G / 118G (66%)'
|
||||
# 'Disk (/mnt/Local Disk): 74G / 118G (66%)'
|
||||
# 'Disk (/mnt/Videos): 74G / 118G (66%)'
|
||||
#
|
||||
# dir: 'Disk (/): 74G / 118G (66%)'
|
||||
# 'Disk (Local Disk): 74G / 118G (66%)'
|
||||
# 'Disk (Videos): 74G / 118G (66%)'
|
||||
disk_subtitle="mount"
|
||||
|
||||
|
||||
@@ -670,16 +687,6 @@ scrot="off"
|
||||
# Flag: --scrot_cmd
|
||||
scrot_cmd="auto"
|
||||
|
||||
# Screenshot Directory
|
||||
# Where to save the screenshots
|
||||
#
|
||||
# Default: '~/Pictures/'
|
||||
# Values: 'dir'
|
||||
# Flag: --scrot_dir
|
||||
#
|
||||
# Note: Neofetch won't create the directory if it doesn't exist.
|
||||
scrot_dir="$HOME/Pictures/"
|
||||
|
||||
# Screenshot Filename
|
||||
# What to name the screenshots
|
||||
#
|
||||
@@ -707,4 +714,4 @@ image_host="teknik"
|
||||
#
|
||||
# NOTE: Don't change this value, neofetch reads this to determine
|
||||
# how to handle backwards compatibility.
|
||||
config_version="3.0.1"
|
||||
config_version="3.1.0"
|
||||
|
338
neofetch
338
neofetch
@@ -9,7 +9,7 @@
|
||||
# https://github.com/dylanaraps/
|
||||
|
||||
# Neofetch version.
|
||||
version="3.0.1"
|
||||
version="3.1.0"
|
||||
|
||||
bash_version="${BASH_VERSION/.*}"
|
||||
sys_locale="${LANG:-C}"
|
||||
@@ -38,7 +38,7 @@ get_os() {
|
||||
"Linux" | "GNU"*) os="Linux" ;;
|
||||
"Darwin") os="$(sw_vers -productName)" ;;
|
||||
*"BSD" | "DragonFly" | "Bitrig") os="BSD" ;;
|
||||
"CYGWIN"* | "MSYS"*) os="Windows" ;;
|
||||
"CYGWIN"* | "MSYS"* | "MINGW"*) os="Windows" ;;
|
||||
"SunOS") os="Solaris" ;;
|
||||
"Haiku") os="Haiku" ;;
|
||||
"MINIX") os="MINIX" ;;
|
||||
@@ -63,6 +63,13 @@ get_distro() {
|
||||
*) distro="$(lsb_release -sd) on Windows 10" ;;
|
||||
esac
|
||||
|
||||
elif [[ "$(< /proc/version)" == *"cros"* || -f "/dev/cros_ec" ]]; then
|
||||
case "$distro_shorthand" in
|
||||
"on") distro="$(lsb_release -sir) [Chrome OS]" ;;
|
||||
"tiny") distro="Chrome OS" ;;
|
||||
*) distro="$(lsb_release -sd) on Chrome OS" ;;
|
||||
esac
|
||||
|
||||
elif [[ -f "/etc/GoboLinuxVersion" ]]; then
|
||||
case "$distro_shorthand" in
|
||||
"on" | "tiny") distro="GoboLinux" ;;
|
||||
@@ -93,6 +100,9 @@ get_distro() {
|
||||
"tiny") distro="${distro//version*}" ;;
|
||||
esac
|
||||
|
||||
elif type -p tazpkg >/dev/null; then
|
||||
distro="SliTaz $(< /etc/slitaz-release)"
|
||||
|
||||
elif [[ -d "/system/app/" && -d "/system/priv-app" ]]; then
|
||||
distro="Android $(getprop ro.build.version.release)"
|
||||
|
||||
@@ -468,7 +478,7 @@ get_packages() {
|
||||
packages="$((packages+=$(ls -d -1 /Programs/*/ | wc -l)))"
|
||||
|
||||
type -p eopkg >/dev/null && \
|
||||
packages="$((packages+=$(eopkg list-installed | wc -l)))"
|
||||
packages="$((packages+=$(ls -1 /var/lib/eopkg/package | wc -l)))"
|
||||
|
||||
type -p pkg_info >/dev/null && \
|
||||
packages="$((packages+=$(pkg_info | wc -l)))"
|
||||
@@ -476,6 +486,9 @@ get_packages() {
|
||||
type -p crew >/dev/null && \
|
||||
packages="$((packages+=$(ls -l /usr/local/etc/crew/meta/*.filelist | wc -l)))"
|
||||
|
||||
type -p tazpkg >/dev/null && \
|
||||
packages="$((packages+=$(tazpkg list | wc -l) - 6))"
|
||||
|
||||
if type -p pkg >/dev/null; then
|
||||
case "$kernel_name" in
|
||||
"FreeBSD") packages="$((packages+=$(pkg info | wc -l)))" ;;
|
||||
@@ -629,7 +642,17 @@ get_wm() {
|
||||
|
||||
else
|
||||
case "$os" in
|
||||
"Mac OS X") wm="Quartz Compositor" ;;
|
||||
"Mac OS X")
|
||||
ps_line="$(ps -e | grep -o '[S]pectacle\|[A]methyst\|[k]wm')"
|
||||
|
||||
case "$ps_line" in
|
||||
*"kwm"*) wm="Kwm" ;;
|
||||
*"Amethyst"*) wm="Amethyst" ;;
|
||||
*"Spectacle"*) wm="Spectacle" ;;
|
||||
*) wm="Quartz Compositor" ;;
|
||||
esac
|
||||
;;
|
||||
|
||||
"Windows")
|
||||
wm="$(tasklist | grep -m 1 -o -F -e "bugn" -e "Windawesome" -e "blackbox" -e "emerge" -e "litestep")"
|
||||
[[ "$wm" == "blackbox" ]] && wm="bbLean (Blackbox)"
|
||||
@@ -805,11 +828,10 @@ get_cpu() {
|
||||
speed="$(< "${speed_dir}/bios_limit")" || \
|
||||
speed="$(< "${speed_dir}/scaling_max_freq")" || \
|
||||
speed="$(< "${speed_dir}/cpuinfo_max_freq")"
|
||||
speed="$((speed / 100000))"
|
||||
speed="$((speed / 1000))"
|
||||
|
||||
else
|
||||
speed="$(awk -F ': |\\.' '/cpu MHz/ {printf $2; exit}' /proc/cpuinfo)"
|
||||
speed="$((speed / 100))"
|
||||
fi
|
||||
|
||||
# Get CPU temp.
|
||||
@@ -877,7 +899,6 @@ get_cpu() {
|
||||
# Get CPU speed.
|
||||
speed="$(sysctl -n hw.cpuspeed)"
|
||||
[[ -z "$speed" ]] && speed="$(sysctl -n hw.clockrate)"
|
||||
speed="$((speed / 100))"
|
||||
|
||||
# Get CPU cores.
|
||||
cores="$(sysctl -n hw.ncpu)"
|
||||
@@ -915,7 +936,6 @@ get_cpu() {
|
||||
|
||||
# Get CPU speed.
|
||||
speed="$(psrinfo -v | awk '/operates at/ {print $6; exit}')"
|
||||
speed="$((speed / 100))"
|
||||
|
||||
# Get CPU cores.
|
||||
case "$cpu_cores" in
|
||||
@@ -932,7 +952,6 @@ get_cpu() {
|
||||
# Get CPU speed.
|
||||
speed="$(sysinfo -cpu | awk '/running at/ {print $NF; exit}')"
|
||||
speed="${speed/MHz}"
|
||||
speed="$((speed / 100))"
|
||||
|
||||
# Get CPU cores.
|
||||
cores="$(sysinfo -cpu | grep -c -F 'CPU #')"
|
||||
@@ -945,7 +964,6 @@ get_cpu() {
|
||||
# Get CPU speed.
|
||||
speed="$(prtconf | awk -F':' '/Processor Clock Speed/ {printf $2}')"
|
||||
speed="${speed/MHz}"
|
||||
speed="$((speed / 100))"
|
||||
|
||||
# Get CPU cores.
|
||||
case "$cpu_cores" in
|
||||
@@ -955,8 +973,12 @@ get_cpu() {
|
||||
;;
|
||||
esac
|
||||
|
||||
# Fix for speeds under 1ghz.
|
||||
if [[ "$speed" ]]; then
|
||||
# Hide decimals if on.
|
||||
[[ "$speed_shorthand" == "on" ]] && \
|
||||
speed="$((speed / 100))"
|
||||
|
||||
# Fix for speeds under 1ghz.
|
||||
if [[ -z "${speed:1}" ]]; then
|
||||
speed="0.${speed}"
|
||||
else
|
||||
@@ -1039,7 +1061,7 @@ get_cpu_usage() {
|
||||
case "$cpu_display" in
|
||||
"bar") cpu_usage="$(bar "$cpu_usage" 100)" ;;
|
||||
"infobar") cpu_usage="${cpu_usage}% $(bar "$cpu_usage" 100)" ;;
|
||||
"barinfo") cpu_usage="$(bar "$cpu_usage" 100) ${cpu_usage}%" ;;
|
||||
"barinfo") cpu_usage="$(bar "$cpu_usage" 100)${info_color} ${cpu_usage}%" ;;
|
||||
*) cpu_usage="${cpu_usage}%" ;;
|
||||
esac
|
||||
}
|
||||
@@ -1049,7 +1071,7 @@ get_gpu() {
|
||||
"Linux")
|
||||
# Read GPUs into array.
|
||||
IFS=$'\n'
|
||||
gpus=($(lspci -mm | awk -F '\\"|\\" \\"' '/"Display|"3D|"VGA/ {print $3 " " $4}'))
|
||||
gpus=($(lspci -mm | awk -F '\\"|\\" \\"' '!a[$0]++ && /"Display|"3D|"VGA/ {print $3 " " $4}'))
|
||||
IFS="$old_ifs"
|
||||
|
||||
# Number the GPUs if more than one exists.
|
||||
@@ -1263,13 +1285,13 @@ get_memory() {
|
||||
case "$memory_display" in
|
||||
"bar") memory="$(bar "${mem_used}" "${mem_total}")" ;;
|
||||
"infobar") memory="${memory} $(bar "${mem_used}" "${mem_total}")" ;;
|
||||
"barinfo") memory="$(bar "${mem_used}" "${mem_total}") ${memory}" ;;
|
||||
"barinfo") memory="$(bar "${mem_used}" "${mem_total}")${info_color} ${memory}" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
get_song() {
|
||||
# This is absurdly long.
|
||||
player="$(ps x | awk '!(/awk|Helper|Cache/) && /mpd|mopidy|cmus|mocp|spotify|Google Play|iTunes.app|rhythmbox|banshee|amarok|deadbeef|audacious|xmms2d|gnome-music|lollypop|clementine|pragha|exaile|juk|bluemindo|guayadeque|yarock|qmmp|quodlibet/ {printf $5 " " $6; exit}')"
|
||||
player="$(ps x | awk '!(/ awk|Helper|Cache/) && /mpd|mopidy|cmus|mocp|spotify|Google Play|iTunes.app|rhythmbox|banshee|amarok|deadbeef|audacious|xmms2d|gnome-music|lollypop|clementine|pragha|exaile|juk|bluemindo|guayadeque|yarock|qmmp|quodlibet|deepin-music|tomahawk/ {printf $5 " " $6; exit}')"
|
||||
|
||||
get_song_dbus() {
|
||||
# Multiple players use an almost identical dbus command to get the information.
|
||||
@@ -1284,20 +1306,30 @@ get_song() {
|
||||
|
||||
case "${player/*\/}" in
|
||||
"mpd"* | "mopidy"*) song="$(mpc current)" ;;
|
||||
"mocp"*) song="$(mocp -Q "%artist - %song")" ;;
|
||||
"google play"*) song="$(gpmdp-remote current)" ;;
|
||||
"rhythmbox"*) song="$(rhythmbox-client --print-playing)" ;;
|
||||
"deadbeef"*) song="$(deadbeef --nowplaying-tf '%artist% - %title%')" ;;
|
||||
"xmms2d"*) song="$(xmms2 current -f '${artist} - ${title}')" ;;
|
||||
"qmmp"*) song="$(qmmp --nowplaying '%p - %t')" ;;
|
||||
"audacious"*) get_song_dbus "audacious" ;;
|
||||
"gnome-music"*) get_song_dbus "GnomeMusic" ;;
|
||||
"lollypop"*) get_song_dbus "Lollypop" ;;
|
||||
"clementine"*) get_song_dbus "clementine" ;;
|
||||
"juk"*) get_song_dbus "juk" ;;
|
||||
"bluemindo"*) get_song_dbus "Bluemindo" ;;
|
||||
"guayadeque"*) get_song_dbus "guayadeque" ;;
|
||||
"yarock"*) get_song_dbus "yarock" ;;
|
||||
"mocp"*) song="$(mocp -Q "%artist - %song")" ;;
|
||||
"google play"*) song="$(gpmdp-remote current)" ;;
|
||||
"rhythmbox"*) song="$(rhythmbox-client --print-playing)" ;;
|
||||
"deadbeef"*) song="$(deadbeef --nowplaying-tf '%artist% - %title%')" ;;
|
||||
"xmms2d"*) song="$(xmms2 current -f '${artist} - ${title}')" ;;
|
||||
"qmmp"*) song="$(qmmp --nowplaying '%p - %t')" ;;
|
||||
"gnome-music"*) get_song_dbus "GnomeMusic" ;;
|
||||
"lollypop"*) get_song_dbus "Lollypop" ;;
|
||||
"clementine"*) get_song_dbus "clementine" ;;
|
||||
"juk"*) get_song_dbus "juk" ;;
|
||||
"bluemindo"*) get_song_dbus "Bluemindo" ;;
|
||||
"guayadeque"*) get_song_dbus "guayadeque" ;;
|
||||
"yarock"*) get_song_dbus "yarock" ;;
|
||||
"deepin-music"*) get_song_dbus "deepinmusic" ;;
|
||||
"tomahawk"*) get_song_dbus "tomahawk" ;;
|
||||
|
||||
"audacious"*)
|
||||
song="$(audtool current-song)"
|
||||
|
||||
# Remove Album from 'Artist - Album - Title'
|
||||
song="${song/-* -/-}"
|
||||
|
||||
[[ -z "$song" ]] && get_song_dbus "audacious"
|
||||
;;
|
||||
|
||||
"cmus"*)
|
||||
song="$(cmus-remote -Q | awk '/tag artist/ {$1=$2=""; print; print " - "} /tag title/ {$1=$2=""; print}')"
|
||||
@@ -1369,7 +1401,6 @@ get_resolution() {
|
||||
"off") resolution="$(xrandr --nograb --current | awk '/\*/ {printf $1 ", "}')" ;;
|
||||
esac
|
||||
resolution="${resolution//\*}"
|
||||
resolution="${resolution//\.[0-9][0-9]}"
|
||||
|
||||
elif type -p xdpyinfo >/dev/null; then
|
||||
resolution="$(xdpyinfo | awk '/dimensions:/ {printf $2}')"
|
||||
@@ -1378,7 +1409,7 @@ get_resolution() {
|
||||
|
||||
"Mac OS X")
|
||||
if type -p screenresolution >/dev/null; then
|
||||
resolution="$(screenresolution get | awk '/Display/ {printf $6 "Hz, "}')"
|
||||
resolution="$(screenresolution get 2>&1 | awk '/Display/ {printf $6 "Hz, "}')"
|
||||
resolution="${resolution//x??@/ @ }"
|
||||
|
||||
else
|
||||
@@ -1632,6 +1663,46 @@ get_term_font() {
|
||||
term_font="$(osascript -e 'tell application "Terminal" to font name of window frontmost')"
|
||||
;;
|
||||
|
||||
"iTerm2")
|
||||
# Unfortunately the profile name is not unique, but it seems to be the only thing
|
||||
# that identifies an active profile. There is the "id of current session of current window"
|
||||
# thou, but that does not match to a guid in the plist.
|
||||
# So, be warned! Collisions may occur!
|
||||
# See: https://groups.google.com/forum/#!topic/iterm2-discuss/0tO3xZ4Zlwg
|
||||
local current_profile_name
|
||||
current_profile_name="$(osascript -e 'tell application "iTerm2" to profile name of current session of current window')"
|
||||
|
||||
# Warning: Dynamic profiles are not taken into account here!
|
||||
# https://www.iterm2.com/documentation-dynamic-profiles.html
|
||||
|
||||
# Count Guids in "New Bookmarks"; they should be unique
|
||||
local profiles_count
|
||||
profiles_count="$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:" ~/Library/Preferences/com.googlecode.iterm2.plist 2>/dev/null | grep -c "Guid")"
|
||||
|
||||
for ((i=0; i<=profiles_count; i++)); do
|
||||
local profile_name
|
||||
profile_name="$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${i}:Name:" ~/Library/Preferences/com.googlecode.iterm2.plist 2>/dev/null)"
|
||||
|
||||
if [[ "$profile_name" == "$current_profile_name" ]]; then
|
||||
# "Normal Font"
|
||||
term_font="$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${i}:Normal\ Font:" ~/Library/Preferences/com.googlecode.iterm2.plist)"
|
||||
# Font for non-ascii characters
|
||||
# Only check for a different non-ascii font, if the user checked
|
||||
# the "use a different font for non-ascii text" switch.
|
||||
local use_different_font
|
||||
use_different_font="$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${i}:Use\ Non-ASCII\ Font:" ~/Library/Preferences/com.googlecode.iterm2.plist)"
|
||||
|
||||
if [[ "$use_different_font" == "true" ]]; then
|
||||
local non_ascii_font
|
||||
non_ascii_font="$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${i}:Non\ Ascii\ Font:" ~/Library/Preferences/com.googlecode.iterm2.plist)"
|
||||
|
||||
[[ "$term_font" != "$non_ascii_font" ]] && \
|
||||
term_font="$term_font (normal) / $non_ascii_font (non-ascii)"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
;;
|
||||
|
||||
"deepin-terminal"*)
|
||||
term_font="$(awk -F '=' '/font=/ {a=$2} /font_size/ {b=$2} END{print a " " b}' "${XDG_CONFIG_HOME}/deepin/deepin-terminal/config.conf")"
|
||||
;;
|
||||
@@ -1744,6 +1815,10 @@ get_disk() {
|
||||
# Subtitle.
|
||||
case "$disk_subtitle" in
|
||||
"name") disk_sub="${disk_info[0]}" ;;
|
||||
"dir")
|
||||
disk_sub="${disk_info[5]/*\/}"
|
||||
[[ -z "$disk_sub" ]] && disk_sub="${disk_info[5]}"
|
||||
;;
|
||||
*) disk_sub="${disk_info[5]}" ;;
|
||||
esac
|
||||
|
||||
@@ -1751,7 +1826,7 @@ get_disk() {
|
||||
case "$disk_display" in
|
||||
"bar") disk="$(bar "$disk_perc" "100")" ;;
|
||||
"infobar") disk+=" $(bar "$disk_perc" "100")" ;;
|
||||
"barinfo") disk="$(bar "$disk_perc" "100") $disk" ;;
|
||||
"barinfo") disk="$(bar "$disk_perc" "100")${info_color} $disk" ;;
|
||||
"perc") disk="${disk_perc}% $(bar "$disk_perc" "100")" ;;
|
||||
esac
|
||||
|
||||
@@ -1767,26 +1842,24 @@ get_disk() {
|
||||
get_battery() {
|
||||
case "$os" in
|
||||
"Linux")
|
||||
# We use 'prin' here and exit the function early so that we can
|
||||
# do multi battery support with a single battery per line.
|
||||
for bat in "/sys/class/power_supply/BAT"*; do
|
||||
# We use 'prin' here so that we can do multi battery support
|
||||
# with a single battery per line.
|
||||
for bat in "/sys/class/power_supply/"{BAT,axp288_fuel_gauge}*; do
|
||||
capacity="$(< "${bat}/capacity")"
|
||||
status="$(< "${bat}/status")"
|
||||
|
||||
# Fix for bash on Windows 10 which includes /proc files
|
||||
# for battery usage despite there not being a battery
|
||||
# installed.
|
||||
[[ -z "$capacity" ]] && return
|
||||
if [[ "$capacity" ]]; then
|
||||
battery="${capacity}% [${status}]"
|
||||
|
||||
battery="${capacity}% [${status}]"
|
||||
case "$battery_display" in
|
||||
"bar") battery="$(bar "$capacity" 100)" ;;
|
||||
"infobar") battery+=" $(bar "$capacity" 100)" ;;
|
||||
"barinfo") battery="$(bar "$capacity" 100)${info_color} ${battery}" ;;
|
||||
esac
|
||||
|
||||
case "$battery_display" in
|
||||
"bar") battery="$(bar "$capacity" 100)" ;;
|
||||
"infobar") battery+=" $(bar "$capacity" 100)" ;;
|
||||
"barinfo") battery="$(bar "$capacity" 100) ${battery}" ;;
|
||||
esac
|
||||
|
||||
prin "${subtitle:+${subtitle}${bat: -1}}" "$battery"
|
||||
bat="${bat/*axp288_fuel_gauge}"
|
||||
prin "${subtitle:+${subtitle}${bat: -1}}" "$battery"
|
||||
fi
|
||||
done
|
||||
return
|
||||
;;
|
||||
@@ -1840,14 +1913,15 @@ get_battery() {
|
||||
case "$battery_display" in
|
||||
"bar") battery="$(bar "${battery/'%'*}" 100)" ;;
|
||||
"infobar") battery="${battery} $(bar "${battery/'%'*}" 100)" ;;
|
||||
"barinfo") battery="$(bar "${battery/'%'*}" 100) ${battery}" ;;
|
||||
"barinfo") battery="$(bar "${battery/'%'*}" 100)${info_color} ${battery}" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
get_local_ip() {
|
||||
case "$os" in
|
||||
"Linux" | "BSD" | "Solaris" | "AIX")
|
||||
local_ip="$(ip route get 1 | awk '{print $NF;exit}')"
|
||||
local_ip="$(ip route get 1 | awk -F'src' '{print $2; exit}')"
|
||||
local_ip="${local_ip/uid*}"
|
||||
[[ -z "$local_ip" ]] && local_ip="$(ifconfig -a | awk '/broadcast/ {print $2; exit}')"
|
||||
;;
|
||||
|
||||
@@ -1900,7 +1974,7 @@ get_install_date() {
|
||||
"Windows")
|
||||
case "$kernel_name" in
|
||||
"CYGWIN"*) install_file="/cygdrive/c/Windows/explorer.exe" ;;
|
||||
"MSYS"*) install_file="/c/Windows/explorer.exe" ;;
|
||||
"MSYS"* | "MINGW"*) install_file="/c/Windows/explorer.exe" ;;
|
||||
esac
|
||||
;;
|
||||
"Haiku") install_file="/boot" ;;
|
||||
@@ -1930,6 +2004,10 @@ get_install_date() {
|
||||
install_date="$(convert_time "${install_date[@]}")"
|
||||
}
|
||||
|
||||
get_locale() {
|
||||
locale="$sys_locale"
|
||||
}
|
||||
|
||||
get_cols() {
|
||||
if [[ "$color_blocks" == "on" ]]; then
|
||||
# Convert the width to space chars.
|
||||
@@ -1949,22 +2027,22 @@ get_cols() {
|
||||
done
|
||||
|
||||
# Convert height into spaces.
|
||||
printf -v spaces "%${block_height}s"
|
||||
printf -v block_spaces "%${block_height}s"
|
||||
|
||||
# Convert the spaces into rows of blocks.
|
||||
[[ "$blocks" ]] && cols+="${spaces// /${blocks}${reset}nl}"
|
||||
[[ "$blocks2" ]] && cols+="${spaces// /${blocks2}${reset}nl}"
|
||||
[[ "$blocks" ]] && cols+="${block_spaces// /${blocks}${reset}nl}"
|
||||
[[ "$blocks2" ]] && cols+="${block_spaces// /${blocks2}${reset}nl}"
|
||||
|
||||
# Add newlines to the string.
|
||||
cols="${cols%%'nl'}"
|
||||
cols="${cols//nl/\\n\\033[${text_padding}C${zws}}"
|
||||
|
||||
# Add block height to info height.
|
||||
info_height="$((info_height+=block_height+2))"
|
||||
|
||||
printf "%b\n" "\033[${text_padding}C${zws}${cols}"
|
||||
else
|
||||
printf "\n"
|
||||
fi
|
||||
|
||||
info_height="$((info_height+=block_height+2))"
|
||||
unset -v blocks blocks2 cols
|
||||
|
||||
# Tell info() that we printed manually.
|
||||
@@ -1985,7 +2063,7 @@ image_backend() {
|
||||
"ascii") get_ascii ;;
|
||||
"off") image_backend="off" ;;
|
||||
|
||||
"caca" | "catimg" | "jp2a" | "iterm2" | "tycat" | "w3m")
|
||||
"caca" | "catimg" | "jp2a" | "iterm2" | "termpix" | "tycat" | "w3m" | "sixel")
|
||||
get_image_source
|
||||
|
||||
if [[ ! -f "$image" ]]; then
|
||||
@@ -1997,7 +2075,6 @@ image_backend() {
|
||||
|
||||
if [[ "$term_width" ]] && ((term_width >= 1)); then
|
||||
clear
|
||||
zws=" "
|
||||
else
|
||||
to_ascii "Image: Failed to find terminal window size."
|
||||
err "Image: Check the 'Images in the terminal' wiki page for more info,"
|
||||
@@ -2011,7 +2088,7 @@ image_backend() {
|
||||
|
||||
*)
|
||||
err "Image: Unknown image backend specified '$image_backend'."
|
||||
err "Image: Valid backends are: 'ascii', 'caca', 'catimg', 'jp2a', 'iterm2', 'off', 'tycat', 'w3m')"
|
||||
err "Image: Valid backends are: 'ascii', 'caca', 'catimg', 'jp2a', 'iterm2', 'off', 'sixel', 'termpix', 'tycat', 'w3m')"
|
||||
err "Image: Falling back to ascii mode."
|
||||
get_ascii
|
||||
;;
|
||||
@@ -2156,7 +2233,7 @@ get_wallpaper() {
|
||||
"Windows XP")
|
||||
case "$kernel_name" in
|
||||
"CYGWIN"*) image="/cygdrive/c/Documents and Settings/${USER}" ;;
|
||||
"MSYS2"*) image="/c/Documents and Settings/${USER}" ;;
|
||||
"MSYS2"* | "MINGW*") image="/c/Documents and Settings/${USER}" ;;
|
||||
esac
|
||||
image+="/Local Settings/Application Data/Microsoft"
|
||||
image+="/Wallpaper1.bmp"
|
||||
@@ -2233,7 +2310,7 @@ get_term_size() {
|
||||
fi
|
||||
|
||||
# Get terminal width/height if \033[14t is unsupported.
|
||||
if [[ -z "$term_width" && "$image_backend" == "w3m" ]]; then
|
||||
if [[ -z "$term_width" ]]; then
|
||||
if type -p xdotool >/dev/null 2>&1; then
|
||||
current_window="$(xdotool getactivewindow)"
|
||||
source <(xdotool getwindowgeometry --shell "$current_window")
|
||||
@@ -2384,23 +2461,32 @@ make_thumbnail() {
|
||||
display_image() {
|
||||
case "$image_backend" in
|
||||
"caca")
|
||||
img2txt -W "$((width / font_width)))" -H "$((height / font_height))" --gamma=0.6 "$image" || to_off "Image: catimg failed to display the image."
|
||||
zws=
|
||||
img2txt -W "$((width / font_width)))" -H "$((height / font_height))" --gamma=0.6 "$image" || to_off "Image: libcaca failed to display the image."
|
||||
;;
|
||||
|
||||
"catimg")
|
||||
catimg -w "$((width * 2 / font_width))" -r 0 "$image" || to_off "Image: catimg failed to display the image."
|
||||
zws=
|
||||
;;
|
||||
|
||||
"jp2a")
|
||||
jp2a --width="$((width / font_width))" --colors "$image" || to_off "Image: jp2a failed to display the image."
|
||||
zws=
|
||||
;;
|
||||
|
||||
"sixel")
|
||||
img2sixel -w "$width" "$image" || to_off "Image: libsixel failed to display the image."
|
||||
;;
|
||||
|
||||
"termpix")
|
||||
termpix --width "$((width / font_width))" "$image" || to_off "Image: termpix failed to display the image."
|
||||
;;
|
||||
|
||||
"iterm2")
|
||||
printf "%b\a\n" "\033]1337;File=width=${width}px;height=${height}px;inline=1:$(base64 < "$image")"
|
||||
zws=
|
||||
iterm_cmd="\033]1337;File=width=${width}px;height=${height}px;inline=1:$(base64 < "$image")"
|
||||
|
||||
# Tmux requires an additional escape sequence for this to work.
|
||||
[[ -n "$TMUX" ]] && iterm_cmd="\033Ptmux;\033${iterm_cmd}\033\\"
|
||||
|
||||
printf "%b\a\n" "$iterm_cmd"
|
||||
;;
|
||||
|
||||
"tycat")
|
||||
@@ -2415,6 +2501,8 @@ display_image() {
|
||||
sleep 0.05
|
||||
printf "%b\n" "0;1;$xoffset;$yoffset;$width;$height;;;;;$image\n4;\n3;" |\
|
||||
"${w3m_img_path:-false}" -bg "$background_color" >/dev/null & 2>&1 || to_off "Image: w3m-img failed to display the image."
|
||||
|
||||
zws=" "
|
||||
;;
|
||||
esac
|
||||
}
|
||||
@@ -2438,17 +2526,14 @@ to_off() {
|
||||
err "$1"
|
||||
image_backend="off"
|
||||
text_padding=
|
||||
zws=
|
||||
}
|
||||
|
||||
# SCREENSHOT
|
||||
|
||||
take_scrot() {
|
||||
if [[ -d "$scrot_dir" ]]; then
|
||||
scrot_program "${scrot_dir}${scrot_name}" 2>/dev/null
|
||||
else
|
||||
printf "%s\n" "Screenshot: $scrot_dir doesn't exist. Edit the config file or create the directory to take screenshots."
|
||||
fi
|
||||
scrot_program "${scrot_dir}${scrot_name}" 2>/dev/null
|
||||
|
||||
err "Scrot: Saved screenshot as: ${scrot_dir}${scrot_name}"
|
||||
|
||||
[[ "$scrot_upload" == "on" ]] && scrot_upload
|
||||
}
|
||||
@@ -2489,13 +2574,16 @@ scrot_upload() {
|
||||
|
||||
scrot_args() {
|
||||
scrot="on"
|
||||
case "$2" in
|
||||
"-"* | "") ;;
|
||||
*)
|
||||
scrot_name="${2##*/}"
|
||||
scrot_dir="${2/$scrot_name}"
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ "$2" =~ \.(png|jpg|jpe|jpeg|gif)$ ]]; then
|
||||
scrot_name="${2##*/}"
|
||||
scrot_dir="${2/$scrot_name}"
|
||||
|
||||
elif [[ -d "$2" ]]; then
|
||||
scrot_dir="$2"
|
||||
else
|
||||
scrot_dir="${PWD:+${PWD}/}"
|
||||
fi
|
||||
}
|
||||
|
||||
scrot_program() {
|
||||
@@ -2625,6 +2713,7 @@ get_line_break() {
|
||||
|
||||
# Calculate info height.
|
||||
((++info_height))
|
||||
line_breaks+=$'\n'
|
||||
|
||||
# Tell info() that we printed manually.
|
||||
prin=1
|
||||
@@ -2728,12 +2817,12 @@ get_distro_colors() {
|
||||
;;
|
||||
|
||||
"arch_small")
|
||||
set_colors 4 7 1
|
||||
set_colors 6 7 1
|
||||
ascii_file="arch_small"
|
||||
;;
|
||||
|
||||
"arch_old")
|
||||
set_colors 4 7 1
|
||||
set_colors 6 7 1
|
||||
ascii_file="arch_old"
|
||||
;;
|
||||
|
||||
@@ -2742,8 +2831,13 @@ get_distro_colors() {
|
||||
ascii_file="archbox"
|
||||
;;
|
||||
|
||||
"ARCHlabs"*)
|
||||
set_colors 6 6 7 1
|
||||
ascii_file="archlabs"
|
||||
;;
|
||||
|
||||
"Arch"*)
|
||||
set_colors 4 4 7 1
|
||||
set_colors 6 6 7 1
|
||||
ascii_file="arch"
|
||||
;;
|
||||
|
||||
@@ -2817,6 +2911,11 @@ get_distro_colors() {
|
||||
ascii_file="deepin"
|
||||
;;
|
||||
|
||||
"DesaOS")
|
||||
set_colors 2 7
|
||||
ascii_file="desaos"
|
||||
;;
|
||||
|
||||
"Devuan"*)
|
||||
set_colors 5 7
|
||||
ascii_file="devuan"
|
||||
@@ -2997,11 +3096,21 @@ get_distro_colors() {
|
||||
ascii_file="netrunner"
|
||||
;;
|
||||
|
||||
"Nitrux"*)
|
||||
set_colors 4
|
||||
ascii_file="nitrux"
|
||||
;;
|
||||
|
||||
"NixOS"*)
|
||||
set_colors 4 6
|
||||
ascii_file="nixos"
|
||||
;;
|
||||
|
||||
"OBRevenge"*)
|
||||
set_colors 1 7 3
|
||||
ascii_file="obrevenge"
|
||||
;;
|
||||
|
||||
"openbsd_small")
|
||||
set_colors 3 7 6 1 8
|
||||
ascii_file="openbsd_small"
|
||||
@@ -3132,6 +3241,11 @@ get_distro_colors() {
|
||||
ascii_file="slackware"
|
||||
;;
|
||||
|
||||
"SliTaz"*)
|
||||
set_colors 3 3
|
||||
ascii_file="slitaz"
|
||||
;;
|
||||
|
||||
"SmartOS"*)
|
||||
set_colors 6 7
|
||||
ascii_file="smartos"
|
||||
@@ -3192,6 +3306,11 @@ get_distro_colors() {
|
||||
ascii_file="ubuntu_old"
|
||||
;;
|
||||
|
||||
"Ubuntu-Studio")
|
||||
set_colors 6 7
|
||||
ascii_file="ubuntu-studio"
|
||||
;;
|
||||
|
||||
"Ubuntu"*)
|
||||
set_colors 1 7 3
|
||||
ascii_file="ubuntu"
|
||||
@@ -3309,8 +3428,8 @@ set_text_colors() {
|
||||
fi
|
||||
|
||||
case "$bar_color_total $1" in
|
||||
"distro "[736]) bar_color_total="$c2" ;;
|
||||
"distro "[0-9]) bar_color_total="$c1" ;;
|
||||
"distro "[736]) bar_color_total="$(color "$1")" ;;
|
||||
"distro "[0-9]) bar_color_total="$(color "$2")" ;;
|
||||
*) bar_color_total="$(color "$bar_color_total")" ;;
|
||||
esac
|
||||
}
|
||||
@@ -3318,7 +3437,7 @@ set_text_colors() {
|
||||
color() {
|
||||
case "$1" in
|
||||
[0-6]) printf "%b" "${reset}\033[3${1}m" ;;
|
||||
7 | "fg") printf "%b" "$reset" ;;
|
||||
7 | "fg") printf "%b" "\033[37m${reset}" ;;
|
||||
*) printf "%b" "\033[38;5;${1}m" ;;
|
||||
esac
|
||||
}
|
||||
@@ -3426,14 +3545,14 @@ bar() {
|
||||
printf -v total "%$((bar_length - elapsed))s"
|
||||
|
||||
# Set the colors and swap the spaces for $bar_char_.
|
||||
bar+="${bar_color_elapsed}${prog// /$bar_char_elapsed}"
|
||||
bar+="${bar_color_total}${total// /$bar_char_total}"
|
||||
bar+="${bar_color_elapsed}${prog// /${bar_char_elapsed}}"
|
||||
bar+="${bar_color_total}${total// /${bar_char_total}}"
|
||||
|
||||
# Borders.
|
||||
[[ "$bar_border" == "on" ]] && \
|
||||
bar="$(color fg)[${bar}$(color fg)]"
|
||||
|
||||
printf "%b\n" "${bar}${info_color}"
|
||||
printf "%b" "${bar}${info_color}"
|
||||
}
|
||||
|
||||
cache() {
|
||||
@@ -3497,34 +3616,30 @@ get_term_padding() {
|
||||
|
||||
dynamic_prompt() {
|
||||
case "$image_backend" in
|
||||
"ascii") ;;
|
||||
"ascii") printf "\n" ;;
|
||||
"off") return ;;
|
||||
*)
|
||||
get_term_padding 2>/dev/null
|
||||
|
||||
# Calculate image height in terminal cells.
|
||||
lines="$(((border * 2 + height + yoffset) / font_height))"
|
||||
get_term_padding
|
||||
lines="$(((border + height + yoffset) / font_height))"
|
||||
image_prompt="on"
|
||||
;;
|
||||
esac
|
||||
|
||||
# If the info is higher than the ascii/image place the prompt
|
||||
# based on the info height instead of the ascii/image height.
|
||||
if ((lines < info_height)); then
|
||||
printf "\n"
|
||||
[[ "$image_prompt" ]] && printf "\n"
|
||||
return
|
||||
else
|
||||
[[ "$image_prompt" ]] && printf "%b\n" "$line_breaks"
|
||||
lines="$((lines - info_height))"
|
||||
fi
|
||||
|
||||
# Set the prompt location.
|
||||
if ((lines < 0)); then
|
||||
printf "%b" "\033[${lines/-}A"
|
||||
else
|
||||
printf "%b" "\033[${lines}B"
|
||||
fi
|
||||
# Print a newline if color blocks are disabled.
|
||||
[[ -z "$block_spaces" ]] && printf "\n"
|
||||
|
||||
# Add some padding.
|
||||
printf "\n\n\n\n"
|
||||
# Set the prompt location.
|
||||
((lines > 0)) && printf "%b" "\033[${lines}B"
|
||||
}
|
||||
|
||||
old_functions() {
|
||||
@@ -3574,6 +3689,9 @@ old_options() {
|
||||
|
||||
# Birthday was renamed to Install Date in 3.0
|
||||
[[ -n "$birthday_time" ]] && { err "Config: \$birthday_time is deprecated, use \3install_time instead."; install_time="$birthday_time"; }
|
||||
|
||||
# Scrot dir was removed in 3.1.0.
|
||||
[[ -n "$scrot_dir" ]] && scrot_dir=
|
||||
}
|
||||
|
||||
cache_uname() {
|
||||
@@ -3724,6 +3842,7 @@ INFO:
|
||||
|
||||
NOTE: This only supports Linux with cpufreq.
|
||||
|
||||
--speed_shorthand on/off Whether or not to show decimals in CPU speed.
|
||||
--cpu_shorthand type Shorten the output of CPU
|
||||
Possible values: name, speed, tiny, on, off
|
||||
--cpu_cores type Whether or not to display the number of CPU cores
|
||||
@@ -3764,12 +3883,15 @@ INFO:
|
||||
|
||||
NOTE: Multiple values can be given. (--disk_show '/' '/dev/sdc1')
|
||||
|
||||
--disk_subtitle name/mount What information to append to the Disk subtitle.
|
||||
--disk_subtitle type What information to append to the Disk subtitle.
|
||||
Takes: name, mount, dir
|
||||
|
||||
'name' shows the disk's name (sda1, sda2, etc)
|
||||
|
||||
'mount' shows the disk's mount point (/, /mnt/Local Disk, etc)
|
||||
|
||||
'dir' shows the basename of the disks's path. (/, Local Disk, etc)
|
||||
|
||||
--ip_host url URL to query for public IP
|
||||
--song_shorthand on/off Print the Artist/Title on separate lines
|
||||
--install_time on/off Enable/Disable showing the time in Install Date output.
|
||||
@@ -3807,7 +3929,7 @@ BARS:
|
||||
|
||||
IMAGE BACKEND:
|
||||
--backend backend Which image backend to use.
|
||||
Possible values: 'ascii', 'caca', 'catimg', 'jp2a', 'iterm2', 'off', 'tycat', 'w3m'
|
||||
Possible values: 'ascii', 'caca', 'catimg', 'jp2a', 'iterm2', 'off', 'sixel', 'tycat', 'w3m'
|
||||
--source source Which image or ascii file to use.
|
||||
Possible values: 'auto', 'ascii', 'wallpaper', '/path/to/img', '/path/to/ascii', '/path/to/dir/'
|
||||
--ascii source Shortcut to use 'ascii' backend.
|
||||
@@ -3815,6 +3937,8 @@ IMAGE BACKEND:
|
||||
--catimg source Shortcut to use 'catimg' backend.
|
||||
--iterm2 source Shortcut to use 'iterm2' backend.
|
||||
--jp2a source Shortcut to use 'jp2a' backend.
|
||||
--sixel source Shortcut to use 'sixel' backend.
|
||||
--termpix source Shortcut to use 'termpix' backend.
|
||||
--tycat source Shortcut to use 'tycat' backend.
|
||||
--w3m source Shortcut to use 'w3m' backend.
|
||||
--off Shortcut to use 'off' backend.
|
||||
@@ -3927,6 +4051,7 @@ get_args() {
|
||||
"--cpu_cores") cpu_cores="$2" ;;
|
||||
"--cpu_speed") cpu_speed="$2" ;;
|
||||
"--speed_type") speed_type="$2" ;;
|
||||
"--speed_shorthand") speed_shorthand="$2" ;;
|
||||
"--distro_shorthand") distro_shorthand="$2" ;;
|
||||
"--kernel_shorthand") kernel_shorthand="$2" ;;
|
||||
"--uptime_shorthand") uptime_shorthand="$2" ;;
|
||||
@@ -4017,7 +4142,7 @@ get_args() {
|
||||
# Image backend
|
||||
"--backend") image_backend="$2" ;;
|
||||
"--source") image_source="$2" ;;
|
||||
"--ascii" | "--caca" | "--catimg" | "--jp2a" | "--iterm2" | "--off" | "--tycat" | "--w3m")
|
||||
"--ascii" | "--caca" | "--catimg" | "--jp2a" | "--iterm2" | "--off" | "--sixel" | "--termpix" | "--tycat" | "--w3m")
|
||||
image_backend="${1/--}"
|
||||
case "$2" in
|
||||
"-"* | "") ;;
|
||||
@@ -4114,7 +4239,6 @@ main() {
|
||||
printf "\033[?25l\033[?7l"
|
||||
fi
|
||||
|
||||
# get_image_backend
|
||||
image_backend
|
||||
old_functions
|
||||
get_cache_dir
|
||||
|
18
neofetch.1
18
neofetch.1
@@ -1,5 +1,5 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3.
|
||||
.TH NEOFETCH "1" "January 2017" "Neofetch 3.0.1" "User Commands"
|
||||
.TH NEOFETCH "1" "April 2017" "Neofetch 3.1.0" "User Commands"
|
||||
.SH NAME
|
||||
Neofetch \- A fast, highly customizable system info script
|
||||
.SH SYNOPSIS
|
||||
@@ -30,6 +30,9 @@ scaling_current, scaling_min, scaling_max
|
||||
.IP
|
||||
NOTE: This only supports Linux with cpufreq.
|
||||
.TP
|
||||
\fB\-\-speed_shorthand\fR on/off
|
||||
Whether or not to show decimals in CPU speed.
|
||||
.TP
|
||||
\fB\-\-cpu_shorthand\fR type
|
||||
Shorten the output of CPU
|
||||
Possible values: name, speed, tiny, on, off
|
||||
@@ -96,12 +99,15 @@ Possible values: '/', '/dev/sdXX', '/path/to/mount point'
|
||||
.IP
|
||||
NOTE: Multiple values can be given. (\fB\-\-disk_show\fR '/' '/dev/sdc1')
|
||||
.TP
|
||||
\fB\-\-disk_subtitle\fR name/mount
|
||||
\fB\-\-disk_subtitle\fR type
|
||||
What information to append to the Disk subtitle.
|
||||
Takes: name, mount, dir
|
||||
.IP
|
||||
\&'name' shows the disk's name (sda1, sda2, etc)
|
||||
.IP
|
||||
\&'mount' shows the disk's mount point (/, \fI\,/mnt/Local\/\fP Disk, etc)
|
||||
.IP
|
||||
\&'dir' shows the basename of the disks's path. (/, Local Disk, etc)
|
||||
.TP
|
||||
\fB\-\-ip_host\fR url
|
||||
URL to query for public IP
|
||||
@@ -175,7 +181,7 @@ Possible values: bar, infobar, barinfo, off
|
||||
.TP
|
||||
\fB\-\-backend\fR backend
|
||||
Which image backend to use.
|
||||
Possible values: 'ascii', 'caca', 'catimg', 'jp2a', 'iterm2', 'off', 'tycat', 'w3m'
|
||||
Possible values: 'ascii', 'caca', 'catimg', 'jp2a', 'iterm2', 'off', 'sixel', 'tycat', 'w3m'
|
||||
.TP
|
||||
\fB\-\-source\fR source
|
||||
Which image or ascii file to use.
|
||||
@@ -196,6 +202,12 @@ Shortcut to use 'iterm2' backend.
|
||||
\fB\-\-jp2a\fR source
|
||||
Shortcut to use 'jp2a' backend.
|
||||
.TP
|
||||
\fB\-\-sixel\fR source
|
||||
Shortcut to use 'sixel' backend.
|
||||
.TP
|
||||
\fB\-\-termpix\fR source
|
||||
Shortcut to use 'termpix' backend.
|
||||
.TP
|
||||
\fB\-\-tycat\fR source
|
||||
Shortcut to use 'tycat' backend.
|
||||
.TP
|
||||
|
Reference in New Issue
Block a user