mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-10-04 01:00:17 +00:00
Compare commits
106 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
ae4e2b038d | ||
|
0b2bbeeead | ||
|
d381102f57 | ||
|
38943eedca | ||
|
2f28c9ee61 | ||
|
cd6618d5d0 | ||
|
8f0bb0fcd3 | ||
|
461a5692ac | ||
|
de614f5bf1 | ||
|
3466422a4f | ||
|
b5bc72ac51 | ||
|
7a49de1002 | ||
|
afcb210aaa | ||
|
fec061d9fd | ||
|
0fd55c5b5c | ||
|
9c9e08f17d | ||
|
09b2d671cd | ||
|
2f3c749d9c | ||
|
fcf5612bf1 | ||
|
642439ece6 | ||
|
0c03b4e4d0 | ||
|
1c55695579 | ||
|
c6e1b21087 | ||
|
de91180567 | ||
|
15be77e495 | ||
|
94e31b49d4 | ||
|
a40c0fd7ad | ||
|
0418a1bce7 | ||
|
e2827fefbf | ||
|
b93acd15ff | ||
|
708c39779f | ||
|
4915525ac5 | ||
|
5c5b88e148 | ||
|
98a2f6ae2c | ||
|
57007583d2 | ||
|
6c54c3f612 | ||
|
da87d54d72 | ||
|
ac0d30f568 | ||
|
cf57ebe7f7 | ||
|
beb4d3a40b | ||
|
9a04c65c66 | ||
|
3f3326ca29 | ||
|
e5717904e8 | ||
|
16f59cb534 | ||
|
1c1aae107c | ||
|
32adaa3b39 | ||
|
f060c7f20c | ||
|
234dddead4 | ||
|
daf0e25d4f | ||
|
4284e3a53c | ||
|
e64a98ec48 | ||
|
4490d8155f | ||
|
983968fa7c | ||
|
242b2bd589 | ||
|
4c860aaea4 | ||
|
13135b698e | ||
|
8d0b8ac0d3 | ||
|
c30523dd95 | ||
|
3b4a1864bd | ||
|
e357203c5f | ||
|
4d240088be | ||
|
b5485bea7a | ||
|
772bf3b3f1 | ||
|
cdc6d5b465 | ||
|
c8d5044e2e | ||
|
3766833329 | ||
|
25fa44b2ef | ||
|
b177d4f6f6 | ||
|
4e6793d17e | ||
|
7910249476 | ||
|
d7eb6ba321 | ||
|
989ca16f05 | ||
|
dfc64f6b19 | ||
|
18cfafa998 | ||
|
19a6357ce9 | ||
|
4b4426f3ff | ||
|
d267e51fd0 | ||
|
adff1f61ff | ||
|
3d900d3d55 | ||
|
ff43eb39a5 | ||
|
394eccecd2 | ||
|
9a0a996f89 | ||
|
4bdae818b3 | ||
|
63c532f2c5 | ||
|
9d6fbc6850 | ||
|
350188203e | ||
|
0d424ec0a6 | ||
|
e08605d914 | ||
|
28fd8e8f93 | ||
|
e961202568 | ||
|
6bbd1c0580 | ||
|
6b0c6f8232 | ||
|
9e2ca7c118 | ||
|
41c6952a66 | ||
|
f8a111a0fe | ||
|
df4efe6fb6 | ||
|
849bfe87d7 | ||
|
3bf9658ab4 | ||
|
34c34d8ecf | ||
|
4118ea0d43 | ||
|
230b217339 | ||
|
6b2b57eedd | ||
|
4e48f90012 | ||
|
956c79d0de | ||
|
0b3e0a0f20 | ||
|
51622c371f |
155
CHANGELOG.md
155
CHANGELOG.md
@@ -1,161 +1,20 @@
|
||||
## Neofetch 2.0
|
||||
This minor release fixes some issues related to new features added in 2.0. These issues weren't picked up in the time between 2.0 and 2.1 and another minor release is needed due to the Packages issue being rather important.
|
||||
|
||||
This is the biggest release of Neofetch in a long time. 97 files were changed with 2700~ additions to 2900~ deletions. Although the changelog isn't as interesting this time majority of the script has been rewritten, restructered and cleaned up. Every function and variable name follows a proper naming scheme and a large number of bugs were fixed.
|
||||
These issues were fixed by reverting the GPU caching and Packages optimizations. These issues occurred because not enough testing was done before these were implemented in master. In the future I'll take more care with testing these larger changes before they hit the master branch and I apologize for there being yet another release in one week.
|
||||
|
||||
Since this version of Neofetch differs so much from the previous versions expect a 2.0.1 release a few days later to fix any bugs that are found after release.
|
||||
|
||||
The ascii file handling was rewritten, ascii art is now stored/read as plain text! All `eval` usage was removed from Neofetch, vim fold markers/comments are no longer enforced and we now run on GNU Hurd, Haiku and more.
|
||||
|
||||
When I was rewriting parts of the script I thought to myself; Neofetch is using the bash shebang and does depend on bash so why not take full advantage of the features bash has to offer? All tests were changed from `[` to `[[`, arithmetic tests now use `(())` and C style for loops are used where possible.
|
||||
|
||||
All of the config file documentation was rewritten and multiple wiki pages were created to hopefully make using/configuring Neofetch easier than ever before. You can see the wiki here: [Neofetch Wiki](https://github.com/dylanaraps/neofetch/wiki)
|
||||
|
||||
Some of the config options/arguments were renamed/changed and Neofetch will warn you on run if you're using deprecated options (`neofetch -v`). For this release Neofetch **will** include backwards compatibility with the old config file but I'd like to remove this stuff in 2.1. I recommend using this release with a fresh config file so that you can make use of the new documentation.
|
||||
|
||||
I say this every release; This changelog is incomplete, for a full list of changes take a look through the commit history. Neofetch now has an unspoken commit style so reading the commit history won't hurt as much as it used to.
|
||||
|
||||
Thanks to all of the contributors this time around, you guys are a big help and I really appreciate your work towards making Neofetch better and better each release. :)
|
||||
|
||||
## Contributors
|
||||
|
||||
- **[@konimex](https://github.com/konimex)**
|
||||
- **[@TonCherAmi](https://github.com/TonCherAmi)**
|
||||
- **[@JorgeGonzalez](https://github.com/JorgeGonzalez)**
|
||||
- **[@iandrewt](https://github.com/iandrewt)**
|
||||
- **[@iwamatsu](https://github.com/iwamatsu)**
|
||||
- **[@Brottweiler](https://github.com/Brottweiler)**
|
||||
|
||||
|
||||
## Packages
|
||||
|
||||
- Neofetch is now in Debian's official repos.
|
||||
- Neofetch is now in Ubuntu's official repos.
|
||||
|
||||
|
||||
## General
|
||||
|
||||
- All functions/variables now follow the same naming scheme. `example_func_name`
|
||||
- Call `uname` once and cache the output instead of calling `uname` 4-5 times.
|
||||
- Cleaned up and rewrote large chunks of the script.
|
||||
- Convert math tests to correct syntax.
|
||||
- Fixed `--disable` and capitalized arguments.
|
||||
- Fixed issue where `bold=off` wouldn't work.
|
||||
- Fixed issue where info wasn't detected properly but the subtitle was still displayed.
|
||||
- Fixed issue where using `--disable func func` broke other args.
|
||||
- Removed all traces of `eval` from Neofetch.
|
||||
- Removed all vim fold markers and stopped enforcing folding for vim users.
|
||||
- See [#431](https://github.com/dylanaraps/neofetch/pull/431)
|
||||
- Rewrote all of config file documentation.
|
||||
- Swap all tests from `[` to `[[`.
|
||||
|
||||
|
||||
## Operating System
|
||||
|
||||
- Added support for ChaletOS.
|
||||
- Added support for DracOS.
|
||||
- Added support for GNU Hurd. **[@konimex](https://github.com/konimex)**
|
||||
- Added support for Haiku. **[@konimex](https://github.com/konimex)**
|
||||
- Added support for Korora. **[@konimex](https://github.com/konimex)**
|
||||
- Added support for Netrunner. **[@konimex](https://github.com/konimex)**
|
||||
- Added support for Pardus.
|
||||
- Added support for iPhone 7 and 7 Plus.
|
||||
|
||||
|
||||
## Ascii
|
||||
|
||||
- Ascii art is no longer read as a script and is now read as plain text.
|
||||
- See this wiki page about the new ascii art format.
|
||||
- https://github.com/dylanaraps/neofetch/wiki/Custom-Ascii-art-file-format
|
||||
- Neofetch now displays your OS's ascii logo if your distro's logo isn't found. **[@konimex](https://github.com/konimex)**
|
||||
- Example: [Linux] Tux is displayed if there's no distro ascii.
|
||||
- `neofetch --ascii_distro x` now sets the mode to ascii for you. You no longer have to use a combination of `--ascii` and `--ascii_distro`.
|
||||
- [Arch Linux] Changed default ascii colors.
|
||||
- [Bunsenlabs] Changed default ascii colors.
|
||||
- Fixed issue with Solarized and certain ascii art.
|
||||
- Remove all duplicates from `get_distro_colors()`.
|
||||
- Remove execution permission flag from ascii art files. **[@iwamatsu](https://github.com/iwamatsu)**
|
||||
- Rename `colors()` to `get_distro_colors()`.
|
||||
- Rename `setcolors()` to `set_colors()`.
|
||||
- Update Netrunner ascii art.
|
||||
- Added old arch ascii logo. **[@Brottweiler](https://github.com/Brottweiler)**
|
||||
- Useable by using `--ascii_distro arch_old` or by editing the config.
|
||||
|
||||
|
||||
## Images
|
||||
|
||||
- Fixed images not appearing in st.
|
||||
- Added `to_ascii()` and `to_off()`.
|
||||
- These functions are used when falling back to different image modes.
|
||||
- Renamed `check_old_flags()` to `old_flags()` to match `old_functions()`.
|
||||
- Split `get_image()` into `get_term_size()`, `get_image_size()`, `get_image_program()` and `make_thumbnail()`.
|
||||
- Use `$XDG_CACHE_HOME` as the thumbnail dir if available.
|
||||
|
||||
|
||||
## Wallpaper
|
||||
|
||||
- Added support for Cinnamon.
|
||||
|
||||
|
||||
## Bars
|
||||
|
||||
- Rename all `progress_` variables to `bar_` to match the function name.
|
||||
I also want to apologize to those packaging Neofetch for this unexpected release.
|
||||
|
||||
|
||||
## Info
|
||||
|
||||
**Distro**<br \>
|
||||
|
||||
- [Linux] Source `/etc/*-release` files instead of having a dozen separate `awk` commands.
|
||||
- We source `/etc/os-release` before falling back to `/etc/*-release`.
|
||||
- Remove lsb_release detection.
|
||||
- This change was made since lsb_release prints innacurate results on some distros.
|
||||
- Added fallback when distro isn't found. **[@konimex](https://github.com/konimex)**
|
||||
- Example: `Linux (Unknown)`
|
||||
|
||||
**Packages**<br \>
|
||||
|
||||
- [Solus] If `pisi` is unavailable, use `eopkg`.
|
||||
- Added package detection for Lunar Linux. **[@konimex](https://github.com/konimex)**
|
||||
- Added package detection for TinyCore. **[@konimex](https://github.com/konimex)**
|
||||
- Remove `/usr/games` from `$PATH` to fix issues with pacman game.
|
||||
- Fixed issue where package output was off by one.
|
||||
|
||||
**GPU**<br \>
|
||||
|
||||
- GPU is now cached till reboot.
|
||||
- [Linux] Prefer dedicated GPU over integrated GPU.
|
||||
- Fixed bug with `--gpu_brand` not working.
|
||||
|
||||
**Terminal**<br \>
|
||||
**Theme**<br \>
|
||||
|
||||
- Added support for HyperTerm. **[@JorgeGonzalez](https://github.com/JorgeGonzalez)**
|
||||
|
||||
**Terminal Font**<br \>
|
||||
|
||||
- Added support for HyperTerm. **[@JorgeGonzalez](https://github.com/JorgeGonzalez)**
|
||||
|
||||
**CPU**<br \>
|
||||
|
||||
- [BSD] Added cpu_temp support. **[@konimex](https://github.com/konimex)**
|
||||
|
||||
**CPU Usage**<br \>
|
||||
|
||||
- [iOS] Fixed CPU usage.
|
||||
|
||||
**Shell**<br \>
|
||||
|
||||
- [bash] Simplify bash version.
|
||||
|
||||
**Song**<br \>
|
||||
|
||||
- Added support for Clementine. **[@konimex](https://github.com/konimex)**
|
||||
- Added support for GNOME Music. **[@konimex](https://github.com/konimex)**
|
||||
- Added support for Lollypop. **[@konimex](https://github.com/konimex)**
|
||||
- Added support for Pragha. **[@konimex](https://github.com/konimex)**
|
||||
|
||||
**Public IP**<br \>
|
||||
|
||||
- Cache the output of the command. **[@konimex](https://github.com/konimex)**
|
||||
- [dig] Fixed connection timed out with public_ip. **[@iandrewt](https://github.com/iandrewt)**
|
||||
|
||||
**Resolution**<br \>
|
||||
|
||||
- [MacOS] If refresh rate is empty don't append Hz.
|
||||
- [Cinnamon] Fixed incorrect information.
|
||||
|
60
README.md
60
README.md
@@ -6,7 +6,7 @@ Neofetch is a CLI system information tool written in BASH. Neofetch displays inf
|
||||
|
||||
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 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` and `Windows (Cygwin/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` and `Windows (Cygwin/Windows 10 Linux subsystem)`.
|
||||
|
||||
For more information:
|
||||
|
||||
@@ -34,10 +34,12 @@ Neofetch will by default create a config file at `$HOME/.config/neofetch/config`
|
||||
|
||||
You can launch the script without a config file by using the flag `--config none` and you can specify a custom config location using `--config path/to/config`.
|
||||
|
||||
See this wiki page for the default config: https://github.com/dylanaraps/neofetch/wiki/Config-File
|
||||
|
||||
|
||||
### Customizing what info gets displayed
|
||||
|
||||
https://github.com/dylanaraps/fetch/wiki/Customizing-Info
|
||||
https://github.com/dylanaraps/neofetch/wiki/Customizing-Info
|
||||
|
||||
|
||||
### Customizing the script using a custom alias
|
||||
@@ -58,60 +60,18 @@ alias neofetch2="neofetch \
|
||||
```
|
||||
|
||||
|
||||
## Frequently Asked Questions
|
||||
|
||||
|
||||
### How do I enable screenfetch mode?
|
||||
|
||||
Launching the script with `--ascii` or setting `image="ascii"` inside the config file will launch the script in "screenfetch mode". The script will display your distro's ascii next to the info, exactly like screenfetch.
|
||||
|
||||
**NOTE:** If you **don't** have an image-mode dependency installed screenfetch mode will be used automatically.
|
||||
|
||||
### Why doesn't Neofetch support my wallpaper setter?
|
||||
|
||||
It's hard to add support for other wallpaper setters as they don't provide a way of getting the current wallpaper from the cli.
|
||||
|
||||
If your wallpaper setter **does** provide a way of getting the current wallpaper or you know where the wallpaper is stored then adding support won't be a problem!
|
||||
|
||||
|
||||
## Issues and Workarounds
|
||||
|
||||
### getgpu doesn't show my exact video card name
|
||||
|
||||
If your `lspci | grep "VGA"` output looks like this:
|
||||
|
||||
```
|
||||
01:00.0 VGA compatible controller: NVIDIA Corporation Device 1401 (rev a1)
|
||||
```
|
||||
|
||||
Instead of this:
|
||||
|
||||
```
|
||||
01:00.0 VGA compatible controller: NVIDIA Corporation GM206 [GeForce GTX 960] (rev a1)
|
||||
```
|
||||
|
||||
Then you're affected by the issue.
|
||||
|
||||
This is caused by your `/usr/share/misc/pci.ids*` files being outdated and you can fix it by running this command as root.
|
||||
|
||||
```
|
||||
sudo update-pciids
|
||||
```
|
||||
|
||||
### Neofetch doesn't work correctly with ConEmu.
|
||||
|
||||
You need to be using the CYGWIN/Msys connector for Neofetch to work seamlessly with ConEmu.
|
||||
|
||||
https://conemu.github.io/en/CygwinMsysConnector.html
|
||||
|
||||
|
||||
## Thanks
|
||||
|
||||
Thanks to:
|
||||
|
||||
- [Contributors](https://github.com/dylanaraps/neofetch/contributors)
|
||||
- Thanks for making Neofetch better, I really appreciate it.
|
||||
- [Packagers](https://github.com/dylanaraps/neofetch/issues/115)
|
||||
- Thanks for maintaining Neofetch packages.
|
||||
- Users
|
||||
- Thanks for using my script!
|
||||
- [Screenfetch](https://github.com/KittyKatt/screenFetch):
|
||||
- I've used some snippets as a base for a few functions in this script.
|
||||
- Some of the ascii logos.
|
||||
- [ufetch](https://github.com/jschx/ufetch):
|
||||
- Tiny ascii logos
|
||||
- Everyone else helped out in one way or another. I'd list all of the names but there's just too many of you. :)
|
||||
|
20
ascii/distro/aosc
Normal file
20
ascii/distro/aosc
Normal file
@@ -0,0 +1,20 @@
|
||||
${c2} .:+syhhhhys+:.
|
||||
.ohNMMMMMMMMMMMMMMNho.
|
||||
`+mMMMMMMMMMMmdmNMMMMMMMMm+`
|
||||
+NMMMMMMMMMMMM/ `./smMMMMMN+
|
||||
.mMMMMMMMMMMMMMMo -yMMMMMm.
|
||||
:NMMMMMMMMMMMMMMMs .hMMMMN:
|
||||
.NMMMMhmMMMMMMMMMMm+/- oMMMMN.
|
||||
dMMMMs ./ymMMMMMMMMMMNy. sMMMMd
|
||||
-MMMMN` oMMMMMMMMMMMN: `NMMMM-
|
||||
/MMMMh NMMMMMMMMMMMMm hMMMM/
|
||||
/MMMMh NMMMMMMMMMMMMm hMMMM/
|
||||
-MMMMN` :MMMMMMMMMMMMy. `NMMMM-
|
||||
dMMMMs .yNMMMMMMMMMMMNy/. sMMMMd
|
||||
.NMMMMo -/+sMMMMMMMMMMMmMMMMN.
|
||||
:NMMMMh. .MMMMMMMMMMMMMMMN:
|
||||
.mMMMMMy- NMMMMMMMMMMMMMm.
|
||||
+NMMMMMms/.` mMMMMMMMMMMMN+
|
||||
`+mMMMMMMMMNmddMMMMMMMMMMm+`
|
||||
.ohNMMMMMMMMMMMMMMNho.
|
||||
.:+syhhhhys+:.
|
18
ascii/distro/apricity
Normal file
18
ascii/distro/apricity
Normal file
@@ -0,0 +1,18 @@
|
||||
${c2} ./o-
|
||||
``...`` `:. -/:
|
||||
`-+ymNMMMMMNmho-` :sdNNm/
|
||||
`+dMMMMMMMMMMMMMMMmo` sh:.:::-
|
||||
/mMMMMMMMMMMMMMMMMMMMm/`sNd/
|
||||
oMMMMMMMMMMMMMMMMMMMMMMMs -`
|
||||
:MMMMMMMMMMMMMMMMMMMMMMMMM/
|
||||
NMMMMMMMMMMMMMMMMMMMMMMMMMd
|
||||
MMMMMMMmdmMMMMMMMMMMMMMMMMd
|
||||
MMMMMMy` .mMMMMMMMMMMMmho:`
|
||||
MMMMMMNo/sMMMMMMMNdy+-.`-/
|
||||
MMMMMMMMMMMMNdy+:.`.:ohmm:
|
||||
MMMMMMMmhs+-.`.:+ymNMMMy.
|
||||
MMMMMM/`.-/ohmNMMMMMMy-
|
||||
MMMMMMNmNNMMMMMMMMmo.
|
||||
MMMMMMMMMMMMMMMms:`
|
||||
MMMMMMMMMMNds/.
|
||||
dhhyys+/-`
|
13
ascii/distro/gobolinux
Normal file
13
ascii/distro/gobolinux
Normal file
@@ -0,0 +1,13 @@
|
||||
${c1}+Nhsssss. `MM:
|
||||
${c2}MM/ ./:::/- `MMo::// ./:::/-
|
||||
MM/-osdd-+mm---hNs`MM+--/Md.omd---dmo
|
||||
${c3}MM/ `MM:sMm yMh`MM: .MM-yMh hMy
|
||||
mM+..-MM:oNm...hNy`MM/..:Mm.sNd...dNs
|
||||
${c4}`+++++oo.`-o++++:``oo++++o` `:o+++o:`
|
||||
|
||||
${c1}oo- :o+
|
||||
${c2}MM/ /yo
|
||||
MM/ +mh mmyoosm/`+mh omy`od+..+mo
|
||||
${c3}MM/ sMm MM/ `MM:sMm yMh -dmmm:
|
||||
MM/ sMm MM/ `MM:sMm yMh .hNNm.
|
||||
${c4}MMhsssss.sMm MM/ `MM:-yNsssmMh`sNs-.sMs
|
24
ascii/distro/parrot
Normal file
24
ascii/distro/parrot
Normal file
@@ -0,0 +1,24 @@
|
||||
${c1} `:oho/-`
|
||||
`mMMMMMMMMMMMNmmdhy-
|
||||
dMMMMMMMMMMMMMMMMMMs`
|
||||
+MMsohNMMMMMMMMMMMMMm/
|
||||
.My .+dMMMMMMMMMMMMMh.
|
||||
+ :NMMMMMMMMMMMMNo
|
||||
`yMMMMMMMMMMMMMm:
|
||||
/NMMMMMMMMMMMMMy`
|
||||
.hMMMMMMMMMMMMMN+
|
||||
``-NMMMMMMMMMd-
|
||||
/MMMMMMMMMMMs`
|
||||
mMMMMMMMsyNMN/
|
||||
+MMMMMMMo :sNh.
|
||||
`NMMMMMMm -o/
|
||||
oMMMMMMM.
|
||||
`NMMMMMM+
|
||||
+MMd/NMh
|
||||
mMm -mN`
|
||||
/MM `h:
|
||||
dM` .
|
||||
:M-
|
||||
d:
|
||||
-+
|
||||
-
|
15
ascii/distro/swagarch
Normal file
15
ascii/distro/swagarch
Normal file
@@ -0,0 +1,15 @@
|
||||
${c2} .;ldkOKXXNNNNXXK0Oxoc,.
|
||||
,lkXMMNK0OkkxkkOKWMMMMMMMMMM;
|
||||
'K0xo ..,;:c:. `'lKMMMMM0
|
||||
.lONMMMMMM' `lNMk'
|
||||
${c2} ;WMMMMMMMMMO. ${c1}....::...
|
||||
${c2} OMMMMMMMMMMMMKl. ${c1}.,;;;;;ccccccc,
|
||||
${c2} `0MMMMMMMMMMMMMM0: ${c1}.. .ccccccc.
|
||||
${c2} 'kWMMMMMMMMMMMMMNo. ${c1}.,:' .ccccccc.
|
||||
${c2} `c0MMMMMMMMMMMMMN,${c1},:c; :cccccc:
|
||||
${c2} ckl. `lXMMMMMMMMMX${c1}occcc:.. ;ccccccc.
|
||||
${c2}dMMMMXd, `OMMMMMMWk${c1}ccc;:''` ,ccccccc:
|
||||
${c2}XMMMMMMMWKkxxOWMMMMMNo${c1}ccc; .cccccccc.
|
||||
${c2} `':ldxO0KXXXXXK0Okdo${c1}cccc. :cccccccc.
|
||||
:ccc:' `cccccccc:,
|
||||
''
|
@@ -1,18 +1,20 @@
|
||||
${c1} ./+o+-
|
||||
${c2} yyyyy- ${c1}-yyyyyy+
|
||||
${c2} ${c2}://+//////${c1}-yyyyyyo
|
||||
${c3} .++ ${c2}.:/++++++/-${c1}.+sss/`
|
||||
${c3} .:++o: ${c2}/++++++++/:--:/-
|
||||
${c3} o:+o+:++.${c2}`..```.-/oo+++++/
|
||||
${c3} .:+o:+o/.${c2} `+sssoo+/
|
||||
${c2} .++/+:${c3}+oo+o:`${c2} /sssooo.
|
||||
${c2}/+++//+:${c3}`oo+o${c2} /::--:.
|
||||
${c2}+/+o+++${c3}`o++o${c1} ++////.
|
||||
${c2} .++.o+${c3}++oo+:`${c1} /dddhhh.
|
||||
${c3} .+.o+oo:.${c1} `oddhhhh+
|
||||
${c3} +.++o+o`${c1}`-````.:ohdhhhhh+
|
||||
${c3} `:o+++ ${c1}`ohhhhhhhhyo++os:
|
||||
${c3} .o:${c1}`.syhhhhhhh/${c3}.oo++o`
|
||||
${c1} /osyyyyyyo${c3}++ooo+++/
|
||||
${c1} ````` ${c3}+oo+++o:
|
||||
${c3} `oo++.
|
||||
${c1} .-/+oossssoo+/-.
|
||||
`:+ssssssssssssssssss+:`
|
||||
-+ssssssssssssssssssyyssss+-
|
||||
.ossssssssssssssssss${c2}dMMMNy${c1}sssso.
|
||||
/sssssssssss${c2}hdmmNNmmyNMMMMh${c1}ssssss/
|
||||
+sssssssss${c2}hm${c1}yd${c2}MMMMMMMNddddy${c1}ssssssss+
|
||||
/ssssssss${c2}hNMMM${c1}yh${c2}hyyyyhmNMMMNh${c1}ssssssss/
|
||||
.ssssssss${c2}dMMMNh${c1}ssssssssss${c2}hNMMMd${c1}ssssssss.
|
||||
+ssss${c2}hhhyNMMNy${c1}ssssssssssss${c2}yNMMMy${c1}sssssss+
|
||||
oss${c2}yNMMMNyMMh${c1}ssssssssssssss${c2}hmmmh${c1}ssssssso
|
||||
oss${c2}yNMMMNyMMh${c1}sssssssssssssshmmmh${c1}ssssssso
|
||||
+ssss${c2}hhhyNMMNy${c1}ssssssssssss${c2}yNMMMy${c1}sssssss+
|
||||
.ssssssss${c2}dMMMNh${c1}ssssssssss${c2}hNMMMd${c1}ssssssss.
|
||||
/ssssssss${c2}hNMMM${c1}yh${c2}hyyyyhdNMMMNh${c1}ssssssss/
|
||||
+sssssssss${c2}dm${c1}yd${c2}MMMMMMMMddddy${c1}ssssssss+
|
||||
/sssssssssss${c2}hdmNNNNmyNMMMMh${c1}ssssss/
|
||||
.ossssssssssssssssss${c2}dMMMNy${c1}sssso.
|
||||
-+sssssssssssssssss${c2}yyy${c1}ssss+-
|
||||
`:+ssssssssssssssssss+:`
|
||||
.-/+oossssoo+/-.
|
||||
|
20
ascii/distro/ubuntu-budgie
Normal file
20
ascii/distro/ubuntu-budgie
Normal file
@@ -0,0 +1,20 @@
|
||||
${c2} ./oydmMMMMMMmdyo/.
|
||||
:smMMMMMMMMMMMhs+:++yhs:
|
||||
`omMMMMMMMMMMMN+` `odo`
|
||||
/NMMMMMMMMMMMMN- `sN/
|
||||
`hMMMMmhhmMMMMMMh sMh`
|
||||
.mMmo- /yMMMMm` `MMm.
|
||||
mN/ yMMMMMMMd- MMMm
|
||||
oN- oMMMMMMMMMms+//+o+: :MMMMo
|
||||
m/ +NMMMMMMMMMMMMMMMMm. :NMMMMm
|
||||
M` .NMMMMMMMMMMMMMMMNodMMMMMMM
|
||||
M- sMMMMMMMMMMMMMMMMMMMMMMMMM
|
||||
mm` mMMMMMMMMMNdhhdNMMMMMMMMMm
|
||||
oMm/ .dMMMMMMMMh: :dMMMMMMMo
|
||||
mMMNyo/:/sdMMMMMMMMM+ sMMMMMm
|
||||
.mMMMMMMMMMMMMMMMMMs `NMMMm.
|
||||
`hMMMMMMMMMMM.oo+. `MMMh`
|
||||
/NMMMMMMMMMo sMN/
|
||||
`omMMMMMMMMy. :dmo`
|
||||
:smMMMMMMMh+-` `.:ohs:
|
||||
./oydmMMMMMMdhyo/.
|
19
ascii/distro/ubuntu_old
Normal file
19
ascii/distro/ubuntu_old
Normal file
@@ -0,0 +1,19 @@
|
||||
|
||||
${c1} ./+o+-
|
||||
${c2} yyyyy- ${c1}-yyyyyy+
|
||||
${c2} ${c2}://+//////${c1}-yyyyyyo
|
||||
${c3} .++ ${c2}.:/++++++/-${c1}.+sss/`
|
||||
${c3} .:++o: ${c2}/++++++++/:--:/-
|
||||
${c3} o:+o+:++.${c2}`..```.-/oo+++++/
|
||||
${c3} .:+o:+o/.${c2} `+sssoo+/
|
||||
${c2} .++/+:${c3}+oo+o:`${c2} /sssooo.
|
||||
${c2}/+++//+:${c3}`oo+o${c2} /::--:.
|
||||
${c2}+/+o+++${c3}`o++o${c1} ++////.
|
||||
${c2} .++.o+${c3}++oo+:`${c1} /dddhhh.
|
||||
${c3} .+.o+oo:.${c1} `oddhhhh+
|
||||
${c3} +.++o+o`${c1}`-````.:ohdhhhhh+
|
||||
${c3} `:o+++ ${c1}`ohhhhhhhhyo++os:
|
||||
${c3} .o:${c1}`.syhhhhhhh/${c3}.oo++o`
|
||||
${c1} /osyyyyyyo${c3}++ooo+++/
|
||||
${c1} ````` ${c3}+oo+++o:
|
||||
${c3} `oo++.
|
@@ -134,13 +134,11 @@ shell_version="on"
|
||||
|
||||
# CPU speed type
|
||||
#
|
||||
# Default: 'max'
|
||||
# Default: 'bios'
|
||||
# Values: 'current', 'min', 'max', 'bios',
|
||||
# 'scaling_current', 'scaling_min',
|
||||
# 'scaling_max'
|
||||
# Flag: --speed_type
|
||||
# Supports: Linux with 'cpufreq'
|
||||
speed_type="current"
|
||||
speed_type="bios"
|
||||
|
||||
# Shorten the output of the CPU function
|
||||
#
|
||||
@@ -184,11 +182,16 @@ cpu_cores="logical"
|
||||
|
||||
# CPU Temperature
|
||||
# Hide/Show CPU temperature.
|
||||
# Note the temperature is added to the regular CPU function.
|
||||
#
|
||||
# Default: 'off'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --cpu_temp
|
||||
# Supports: Linux
|
||||
#
|
||||
# Example:
|
||||
# on: 'Intel i7-6500U (4) @ 3.1GHz [27.2°C]'
|
||||
# off: 'Intel i7-6500U (4) @ 3.1GHz'
|
||||
cpu_temp="off"
|
||||
|
||||
|
||||
@@ -478,10 +481,12 @@ disk_display="off"
|
||||
|
||||
# Image Source
|
||||
#
|
||||
# Default: 'wallpaper'
|
||||
# Values: 'wallpaper', '/path/to/img', '/path/to/dir/', 'off'
|
||||
# Default: 'ascii'
|
||||
# Values: 'ascii', 'wallpaper', '/path/to/img', '/path/to/dir/', 'off'
|
||||
# Flag: --image
|
||||
image_source="wallpaper"
|
||||
#
|
||||
# NOTE: Change this to 'wallpaper', '/path/to/img' or /path/to/dir/' to enable image mode. You can also launch neofetch with '--image wallpaper' and etc.
|
||||
image_source="ascii"
|
||||
|
||||
# Thumbnail directory
|
||||
#
|
||||
@@ -577,6 +582,11 @@ ascii="distro"
|
||||
# Default: 'auto'
|
||||
# Values: 'auto', 'distro_name'
|
||||
# Flag: --ascii_distro
|
||||
#
|
||||
# NOTE: Arch and Ubuntu have 'old' logo varients.
|
||||
# Change this to 'arch_old' or 'ubuntu_old' to use the old logos.
|
||||
# NOTE: Ubuntu has flavor varients.
|
||||
# Change this to 'Lubuntu', 'Xubuntu', 'Ubuntu-GNOME' or 'Ubuntu-Budgie' to use the flavors.
|
||||
ascii_distro="auto"
|
||||
|
||||
# Ascii Colors
|
||||
@@ -621,16 +631,20 @@ ascii_bold="on"
|
||||
# -s
|
||||
scrot="off"
|
||||
|
||||
# Screenshot program to launch
|
||||
# If you're not using 'scrot' change this to your screenshot
|
||||
# program.
|
||||
# Screenshot Program
|
||||
# Neofetch will automatically use whatever screenshot tool
|
||||
# is installed on your system.
|
||||
#
|
||||
# Default: 'scrot -c -d 3'
|
||||
# Values: 'cmd -flags'
|
||||
# If 'neofetch -v' says that it couldn't find a screenshot
|
||||
# tool or you're using a custom tool then you can change
|
||||
# the option below to a custom command.
|
||||
#
|
||||
# Default: 'auto'
|
||||
# Values: 'auto' 'cmd -flags'
|
||||
# Flag: --scrot_cmd
|
||||
scrot_cmd="scrot -c -d 3"
|
||||
scrot_cmd="auto"
|
||||
|
||||
# Scrot dir
|
||||
# Screenshot Directory
|
||||
# Where to save the screenshots
|
||||
#
|
||||
# Default: '~/Pictures/'
|
||||
@@ -640,7 +654,7 @@ scrot_cmd="scrot -c -d 3"
|
||||
# Note: Neofetch won't create the directory if it doesn't exist.
|
||||
scrot_dir="$HOME/Pictures/"
|
||||
|
||||
# Scrot filename
|
||||
# Screenshot Filename
|
||||
# What to name the screenshots
|
||||
#
|
||||
# Default: 'neofetch-$(date +%F-%I-%M-%S-${RANDOM}).png'
|
||||
@@ -651,10 +665,13 @@ scrot_name="neofetch-$(date +%F-%I-%M-%S-${RANDOM}).png"
|
||||
# Image upload host
|
||||
# Where to upload the image.
|
||||
#
|
||||
# Default: 'imgur'
|
||||
# Default: 'teknik'
|
||||
# Values: 'imgur', 'teknik'
|
||||
# Flag: --image_host
|
||||
image_host="imgur"
|
||||
#
|
||||
# NOTE: If you'd like another image host to be added to Neofetch.
|
||||
# Open an issue on github.
|
||||
image_host="teknik"
|
||||
|
||||
|
||||
# Config Options
|
||||
|
239
neofetch
239
neofetch
@@ -52,12 +52,26 @@ get_distro() {
|
||||
esac
|
||||
ascii_distro="Windows 10"
|
||||
|
||||
elif [[ -f "/etc/GoboLinuxVersion" ]]; then
|
||||
case "$distro_shorthand" in
|
||||
"on" | "tiny") distro="GoboLinux" ;;
|
||||
*) distro="GoboLinux $(< /etc/GoboLinuxVersion)"
|
||||
esac
|
||||
|
||||
elif [[ -f "/etc/redstar-release" ]]; then
|
||||
case "$distro_shorthand" in
|
||||
"on" | "tiny") distro="Red Star OS" ;;
|
||||
*) distro="Red Star OS $(awk -F'[^0-9*]' '$0=$2' /etc/redstar-release)"
|
||||
esac
|
||||
|
||||
elif type -p lsb_release >/dev/null; then
|
||||
case "$distro_shorthand" in
|
||||
"on") lsb_flags="-sir" ;;
|
||||
"tiny") lsb_flags="-si" ;;
|
||||
*) lsb_flags="-sd" ;;
|
||||
esac
|
||||
distro="$(lsb_release $lsb_flags)"
|
||||
|
||||
elif type -p guix >/dev/null; then
|
||||
distro="GuixSD"
|
||||
|
||||
@@ -77,7 +91,7 @@ get_distro() {
|
||||
source "$file" && break
|
||||
done
|
||||
|
||||
# The 3rd line down matches the fold marker syntax. {{{
|
||||
# Format the distro name.
|
||||
case "$distro_shorthand" in
|
||||
"on") distro="${NAME:-${DISTRIB_ID}} ${VERSION_ID:-${DISTRIB_RELEASE}}" ;;
|
||||
"tiny") distro="${NAME:-${DISTRIB_ID:-${TAILS_PRODUCT_NAME}}}" ;;
|
||||
@@ -190,12 +204,6 @@ get_model() {
|
||||
elif [[ -f /tmp/sysinfo/model ]]; then
|
||||
model="$(< /tmp/sysinfo/model)"
|
||||
fi
|
||||
|
||||
model="${model//To Be Filled*}"
|
||||
model="${model//OEM*}"
|
||||
model="${model//Not Applicable}"
|
||||
model="${model//System Product Name}"
|
||||
model="${model//System Version}"
|
||||
;;
|
||||
|
||||
"Mac OS X") model="$(sysctl -n hw.model)" ;;
|
||||
@@ -254,6 +262,14 @@ get_model() {
|
||||
model="$(prtconf -b | awk -F':' '/banner-name/ {printf $2}')"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Remove dummy OEM info
|
||||
model="${model//To Be Filled*}"
|
||||
model="${model//OEM*}"
|
||||
model="${model//Not Applicable}"
|
||||
model="${model//System Product Name}"
|
||||
model="${model//System Version}"
|
||||
model="${model//Undefined}"
|
||||
}
|
||||
|
||||
get_title() {
|
||||
@@ -267,7 +283,7 @@ get_kernel() {
|
||||
esac
|
||||
|
||||
# Hardcode kernel settings in BSDs
|
||||
if [[ "$os" == "BSD" && ! "$distro" =~ (PacBSD|PCBSD) ]]; then
|
||||
if [[ "$os" == "BSD" && "$distro" =~ "$kernel_name" ]]; then
|
||||
case "$distro_shorthand" in
|
||||
"on" | "tiny") kernel="$kernel_version" ;;
|
||||
*) unset kernel ;;
|
||||
@@ -410,6 +426,9 @@ get_packages() {
|
||||
type -p tce-status >/dev/null && \
|
||||
packages="$((packages+=$(tce-status -i | wc -l)))"
|
||||
|
||||
type -p Compile >/dev/null && \
|
||||
packages="$((packages+=$(ls -d -1 /Programs/*/ | wc -l)))"
|
||||
|
||||
# pisi is sometimes unavailable in Solus(?). This uses eopkg
|
||||
# instead if pisi isn't found.
|
||||
if type -p pisi >/dev/null; then
|
||||
@@ -524,17 +543,18 @@ get_de() {
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ -n "$DISPLAY" && -z "$de" ]]; then
|
||||
# Fallback to using xprop.
|
||||
[[ -n "$DISPLAY" && -z "$de" ]] && \
|
||||
de="$(xprop -root | awk '/KDE_SESSION_VERSION|^_MUFFIN|xfce4|xfce5/')"
|
||||
|
||||
case "$de" in
|
||||
"KDE_SESSION_VERSION"*) de="KDE${de/* = }" ;;
|
||||
*"TDE_FULL_SESSION"*) de="Trinity" ;;
|
||||
*"MUFFIN"*) de="$(cinnamon --version)"; de="${de:-Cinnamon}" ;;
|
||||
*"xfce4"*) de="XFCE4" ;;
|
||||
*"xfce5"*) de="XFCE5" ;;
|
||||
esac
|
||||
fi
|
||||
# Format strings
|
||||
case "$de" in
|
||||
"KDE_SESSION_VERSION"*) de="KDE${de/* = }" ;;
|
||||
*"TDE_FULL_SESSION"*) de="Trinity" ;;
|
||||
*"MUFFIN"* | "Cinnamon") de="$(cinnamon --version)"; de="${de:-Cinnamon}" ;;
|
||||
*"xfce4"*) de="XFCE4" ;;
|
||||
*"xfce5"*) de="XFCE5" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
get_wm() {
|
||||
@@ -705,14 +725,12 @@ get_cpu() {
|
||||
"min") speed_type="scaling_min_freq" ;;
|
||||
"max") speed_type="scaling_max_freq" ;;
|
||||
"bios") speed_type="bios_limit" ;;
|
||||
"scaling_current") speed_type="scaling_cur_freq" ;;
|
||||
"scaling_min") speed_type="scaling_min_freq" ;;
|
||||
"scaling_max") speed_type="scaling_max_freq" ;;
|
||||
esac
|
||||
|
||||
# Fallback to cpuinfo_max_freq if $speed_type fails
|
||||
speed="$(< "${speed_dir}/${speed_type}")" || \
|
||||
speed="$(< "${speed_dir}/cpuinfo_max_freq")"
|
||||
speed="$(< "${speed_dir}/bios_limit")" || \
|
||||
speed="$(< "${speed_dir}/scaling_max_freq")"
|
||||
|
||||
speed="$((speed / 100000))"
|
||||
|
||||
@@ -730,7 +748,7 @@ get_cpu() {
|
||||
|
||||
# Show/hide hyperthreaded cores
|
||||
case "$cpu_cores" in
|
||||
"logical" | "on") cores="$(grep -c ^processor /proc/cpuinfo)" ;;
|
||||
"logical" | "on") cores="$(grep -c "^processor" /proc/cpuinfo)" ;;
|
||||
"physical") cores="$(grep "^core id" /proc/cpuinfo | sort -u | wc -l)" ;;
|
||||
esac
|
||||
;;
|
||||
@@ -788,8 +806,8 @@ get_cpu() {
|
||||
|
||||
# Get cpu temp
|
||||
if [[ "$cpu_temp" == "on" ]]; then
|
||||
case "$distro" in
|
||||
"FreeBSD"* | "PacBSD"* | "DragonFly"* | "PCBSD"*)
|
||||
case "$kernel_name" in
|
||||
"FreeBSD"* | "DragonFly"*)
|
||||
temp="$(sysctl -n dev.cpu.0.temperature)"
|
||||
temp="[${temp/C/°C}]"
|
||||
;;
|
||||
@@ -921,13 +939,15 @@ get_cpu_usage() {
|
||||
get_gpu() {
|
||||
case "$os" in
|
||||
"Linux" | "GNU")
|
||||
gpu="$(PATH="/sbin:$PATH" lspci -mm | awk -F '\\"|\\" \\"' '/Display|3D|VGA/ {print $3 " " $4}')"
|
||||
gpu="$(PATH="/sbin:$PATH" lspci -mm | awk -F '\\"|\\" \\"' '/"Display|"3D|"VGA/ {print $3 " " $4}')"
|
||||
|
||||
case "$gpu" in
|
||||
*"advanced"*)
|
||||
gpu="${gpu//Intel*$'\n'}"
|
||||
gpu="${gpu/'[AMD/ATI]' }"
|
||||
gpu="${gpu/'[AMD]' }"
|
||||
gpu="${gpu/OEM }"
|
||||
gpu="${gpu/ \/ *}"
|
||||
gpu="${gpu/*\[}"
|
||||
gpu="${gpu/\]*}"
|
||||
gpu="AMD $gpu"
|
||||
@@ -953,6 +973,7 @@ get_gpu() {
|
||||
gpu="$(system_profiler SPDisplaysDataType | awk -F': ' '/^\ *Chipset Model:/ {printf $2 ", "}')"
|
||||
gpu="${gpu//'/ $'}"
|
||||
gpu="${gpu%,*}"
|
||||
cache "gpu" "$gpu"
|
||||
;;
|
||||
|
||||
"iPhone OS")
|
||||
@@ -988,8 +1009,8 @@ get_gpu() {
|
||||
;;
|
||||
|
||||
"BSD" | "Solaris")
|
||||
case "$distro" in
|
||||
"FreeBSD"* | "DragonFlyBSD"* | "PacBSD"*)
|
||||
case "$kernel_name" in
|
||||
"FreeBSD"* | "DragonFly"*)
|
||||
gpu="$(pciconf -lv | grep -B 4 -F "VGA" | grep -F "device")"
|
||||
gpu="${gpu/*device*= }"
|
||||
gpu="$(trim_quotes "$gpu")"
|
||||
@@ -1017,8 +1038,6 @@ get_gpu() {
|
||||
gpu="${gpu/NVIDIA}"
|
||||
gpu="${gpu/Intel}"
|
||||
fi
|
||||
|
||||
cache "gpu" "$gpu"
|
||||
}
|
||||
|
||||
get_memory() {
|
||||
@@ -1047,21 +1066,28 @@ get_memory() {
|
||||
;;
|
||||
|
||||
"BSD")
|
||||
case "$distro" in
|
||||
"NetBSD"*)
|
||||
memfree="$(($(awk -F ':|kB' '/MemFree:/ {printf $2}' /proc/meminfo) / 1024))"
|
||||
mem_total="$(($(sysctl -n hw.physmem64) / 1024 / 1024))"
|
||||
;;
|
||||
|
||||
*)
|
||||
memfree="$(($(vmstat | awk 'END{printf $5}') / 1024))"
|
||||
mem_total="$(($(sysctl -n hw.physmem) / 1024 / 1024))"
|
||||
;;
|
||||
# Mem total
|
||||
case "$kernel_name" in
|
||||
"NetBSD"*) mem_total="$(($(sysctl -n hw.physmem64) / 1024 / 1024))" ;;
|
||||
*) mem_total="$(($(sysctl -n hw.physmem) / 1024 / 1024))" ;;
|
||||
esac
|
||||
|
||||
case "$distro" in
|
||||
"OpenBSD"*) mem_used="$(($(vmstat | awk 'END {printf $4}') / 1024))" ;;
|
||||
*) mem_used="$((mem_total - memfree))" ;;
|
||||
# Mem free
|
||||
case "$kernel_name" in
|
||||
"NetBSD"*) mem_free="$(($(awk -F ':|kB' '/MemFree:/ {printf $2}' /proc/meminfo) / 1024))" ;;
|
||||
"FreeBSD"* | "DragonFly"*)
|
||||
mem_free="$(top -d 1 | awk -F ',' '/^Mem:/ {print $5}')"
|
||||
mem_free="${mem_free/M Free}"
|
||||
;;
|
||||
|
||||
"OpenBSD"*) ;;
|
||||
*) mem_free="$(($(vmstat | awk 'END{printf $5}') / 1024))" ;;
|
||||
esac
|
||||
|
||||
# Mem used
|
||||
case "$kernel_name" in
|
||||
"OpenBSD"*) mem_used="$(($(vmstat | awk 'END{printf $4}') / 1024))" ;;
|
||||
*) mem_used="$((mem_total - mem_free))" ;;
|
||||
esac
|
||||
;;
|
||||
|
||||
@@ -1329,7 +1355,7 @@ get_style() {
|
||||
fi
|
||||
;;
|
||||
|
||||
*"Cinnamon")
|
||||
*"Cinnamon"*)
|
||||
if type -p gsettings >/dev/null; then
|
||||
gtk3_theme="$(gsettings get org.cinnamon.desktop.interface "$gsettings")"
|
||||
gtk2_theme="$gtk3_theme"
|
||||
@@ -1573,7 +1599,7 @@ get_disk() {
|
||||
|
||||
"Mac OS X" | "BSD" | "Haiku")
|
||||
case "$distro" in
|
||||
"FreeBSD"* | *"OS X"* | "Mac"* )
|
||||
"FreeBSD"* | *"OS X"* | "Mac"*)
|
||||
df_flags="-l -H /"
|
||||
df_dir="/"
|
||||
;;
|
||||
@@ -1649,7 +1675,7 @@ get_battery() {
|
||||
;;
|
||||
|
||||
"BSD")
|
||||
case "$distro" in
|
||||
case "$kernel_name" in
|
||||
"FreeBSD"* | "DragonFly"*)
|
||||
battery="$(acpiconf -i 0 | awk -F ':\t' '/Remaining capacity/ {print $2}')"
|
||||
battery_state="$(acpiconf -i 0 | awk -F ':\t\t\t' '/State/ {print $2}')"
|
||||
@@ -1739,8 +1765,6 @@ get_public_ip() {
|
||||
if [[ -z "$public_ip" ]] && type -p wget >/dev/null; then
|
||||
public_ip="$(wget -T 10 -qO- "$public_ip_host")"
|
||||
fi
|
||||
|
||||
cache "public_ip" "$public_ip"
|
||||
}
|
||||
|
||||
get_users() {
|
||||
@@ -1771,7 +1795,7 @@ get_birthday() {
|
||||
;;
|
||||
|
||||
"BSD")
|
||||
case "$distro" in
|
||||
case "$kernel_name" in
|
||||
"OpenBSD"* | "Bitrig"*)
|
||||
birthday="$(ls -alctT / | awk '/lost\+found/ {printf $6 " " $7 " " $9 " " $8}')"
|
||||
birthday_shorthand="on"
|
||||
@@ -2009,28 +2033,31 @@ get_w3m_img_path() {
|
||||
|
||||
get_wallpaper() {
|
||||
case "$os" in
|
||||
"Linux" | "BSD")
|
||||
if type -p feh >/dev/null && [[ -f "$HOME/.fehbg" ]]; then
|
||||
image="$(awk -F\' '/feh/ {printf $2}' "$HOME/.fehbg")"
|
||||
"Linux" | "BSD" | "Solaris" | "GNU")
|
||||
# Get DE if user has disabled the function.
|
||||
[[ -z "$de" ]] && get_de
|
||||
|
||||
elif type -p nitrogen >/dev/null; then
|
||||
image="$(awk -F'=' '/file/ {printf $2;exit;}' "$XDG_CONFIG_HOME/nitrogen/bg-saved.cfg")"
|
||||
case "$de" in
|
||||
"Cinnamon"*) image="$(gsettings get org.cinnamon.desktop.background picture-uri)" ;;
|
||||
"MATE"*) image="$(gsettings get org.mate.background picture-filename)" ;;
|
||||
"XFCE"*) image="$(xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/workspace0/last-image)" ;;
|
||||
*)
|
||||
if type -p feh >/dev/null && [[ -f "$HOME/.fehbg" ]]; then
|
||||
image="$(awk -F\' '/feh/ {printf $2}' "$HOME/.fehbg")"
|
||||
|
||||
elif type -p gsettings >/dev/null; then
|
||||
# Get DE if user has disabled the function.
|
||||
[[ -z "$de" ]] && get_de
|
||||
elif type -p nitrogen >/dev/null; then
|
||||
image="$(awk -F'=' '/file/ {printf $2;exit;}' "$XDG_CONFIG_HOME/nitrogen/bg-saved.cfg")"
|
||||
|
||||
case "$de" in
|
||||
"Cinnamon"*) image="$(gsettings get org.cinnamon.desktop.background picture-uri)" ;;
|
||||
"MATE"*) image="$(gsettings get org.mate.background picture-filename)" ;;
|
||||
*) image="$(gsettings get org.gnome.desktop.background picture-uri)" ;;
|
||||
esac
|
||||
else
|
||||
image="$(gsettings get org.gnome.desktop.background picture-uri)"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# Strip quotes etc from the path.
|
||||
image="${image/'file://'}"
|
||||
image="$(trim_quotes "$image")"
|
||||
image="${image//\%20/ }"
|
||||
fi
|
||||
# Strip quotes etc from the path.
|
||||
image="${image/'file://'}"
|
||||
image="$(trim_quotes "$image")"
|
||||
image="${image//\%20/ }"
|
||||
;;
|
||||
|
||||
"Mac OS X")
|
||||
@@ -2112,7 +2139,8 @@ get_term_size() {
|
||||
elif type -p xwininfo >/dev/null 2>&1; then
|
||||
# Get the focused window's ID.
|
||||
if type -p xdpyinfo >/dev/null 2>&1; then
|
||||
current_window="$(xdpyinfo | grep -F "focus" | grep -E -o "0x[0-9a-f]+")"
|
||||
current_window="$(xdpyinfo | grep -E -o "focus:.*0x[0-9a-f]+")"
|
||||
current_window="${current_window/*window }"
|
||||
elif type -p xprop >/dev/null 2>&1; then
|
||||
current_window="$(xprop -root | awk '/_NET_ACTIVE_WINDOW\(WINDOW\)/{print $NF}')"
|
||||
fi
|
||||
@@ -2293,7 +2321,7 @@ to_off() {
|
||||
|
||||
take_scrot() {
|
||||
if [[ -d "$scrot_dir" ]]; then
|
||||
$scrot_cmd "${scrot_dir}${scrot_name}"
|
||||
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
|
||||
@@ -2312,7 +2340,7 @@ scrot_upload() {
|
||||
|
||||
case "$image_host" in
|
||||
"teknik")
|
||||
image_url="$(curl -sf -F file="@${image_file}" "https://api.teknik.io/v1/Upload")"
|
||||
image_url="$(curl -sf -F file="@${image_file};type=image/png" "https://api.teknik.io/v1/Upload")"
|
||||
image_url="$(awk -F 'url:|,' '{printf $2}' <<< "${image_url//\"}")"
|
||||
;;
|
||||
|
||||
@@ -2337,6 +2365,47 @@ scrot_args() {
|
||||
esac
|
||||
}
|
||||
|
||||
scrot_program() {
|
||||
# Detect screenshot program.
|
||||
#
|
||||
# We first check to see if an X server is running before
|
||||
# falling back to OS specific screenshot tools.
|
||||
if [[ -n "$DISPLAY" ]]; then
|
||||
if [[ "$scrot_cmd" != "auto" ]] && type -p "$scrot_cmd" >/dev/null; then
|
||||
scrot_program="$scrot_cmd"
|
||||
|
||||
elif type -p scrot >/dev/null; then
|
||||
scrot_program="scrot"
|
||||
|
||||
elif type -p maim >/dev/null; then
|
||||
scrot_program="maim"
|
||||
|
||||
elif type -p import >/dev/null; then
|
||||
scrot_program="import -window root"
|
||||
|
||||
elif type -p imlib2_grab >/dev/null; then
|
||||
scrot_program="imlib2_grab"
|
||||
|
||||
elif type -p gnome-screenshot >/dev/null; then
|
||||
scrot_program="gnome-screenshot -f"
|
||||
|
||||
else
|
||||
err "Scrot: No screen capture tool found."
|
||||
return
|
||||
fi
|
||||
else
|
||||
case "$os" in
|
||||
"Mac OS X") scrot_program="screencapture -S" ;;
|
||||
"Haiku") scrot_program="screenshot -s" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Take the scrot.
|
||||
$scrot_program "$1"
|
||||
|
||||
err "Scrot: Screen captured using $scrot_program"
|
||||
}
|
||||
|
||||
# TEXT FORMATTING
|
||||
|
||||
info() {
|
||||
@@ -2484,14 +2553,23 @@ get_distro_colors() {
|
||||
#
|
||||
# $ascii_distro is the same as $distro
|
||||
case "$ascii_distro" in
|
||||
"Arch"* | "Kogaion"* | "Elementary"* | "GalliumOS"* | "Rosa"* | "OpenWrt"* | "Netrunner"* | "PCLinuxOS"* | "Slackware"* | "KaOS"* | "Kubuntu"* | "Lubuntu"* | "Xubuntu"* | "OpenIndiana"* | "Fedora"* | "Korora"* | "Sabayon"* | "Frugalware"* | "Exherbo"* | "Scientific"* | "Solus"* | "ChaletOS"*)
|
||||
"Arch"* | "Kogaion"* | "Elementary"* | "GalliumOS"* | "Rosa"* | "OpenWrt"* | "Netrunner"* | "PCLinuxOS"* | "Slackware"* | "KaOS"* | "Kubuntu"* | "Lubuntu"* | "Xubuntu"* | "OpenIndiana"* | "Fedora"* | "Korora"* | "Sabayon"* | "Frugalware"* | "Exherbo"* | "Scientific"* | "Solus"* | "ChaletOS"* | "Apricity"* | "SwagArch"* | "AOSC"* | "Ubuntu-Budgie"*)
|
||||
set_colors 4 7 1
|
||||
;;
|
||||
|
||||
"RFRemix"*)
|
||||
set_colors 4 7 1
|
||||
ascii_distro="Fedora"
|
||||
;;
|
||||
|
||||
"CentOS"*)
|
||||
set_colors 3 2 4 5 7
|
||||
;;
|
||||
|
||||
"GoboLinux"*)
|
||||
set_colors 5 4 6 2
|
||||
;;
|
||||
|
||||
"CRUX"* | "Chakra"* | "gNewSense"* | "SailfishOS"* | "Alpine"* | "Ubuntu-GNOME"* | "Qubes"*)
|
||||
set_colors 4 5 7 6
|
||||
;;
|
||||
@@ -2590,7 +2668,7 @@ get_distro_colors() {
|
||||
set_colors 2 8
|
||||
;;
|
||||
|
||||
"Mageia"* | "Porteus"*)
|
||||
"Mageia"* | "Porteus"* | "Parrot"*)
|
||||
set_colors 6 7
|
||||
;;
|
||||
|
||||
@@ -2634,12 +2712,13 @@ get_distro_colors() {
|
||||
|
||||
# Overwrite distro colors if '$ascii_colors' doesn't
|
||||
# equal 'distro'.
|
||||
[[ "${ascii_colors[0]}" != "distro" ]] && \
|
||||
if [[ "${ascii_colors[0]}" != "distro" ]]; then
|
||||
color_text="off"
|
||||
set_colors ${ascii_colors[@]}
|
||||
fi
|
||||
}
|
||||
|
||||
set_colors() {
|
||||
# Ascii colors
|
||||
c1="$(color "$1")${ascii_bold}"
|
||||
c2="$(color "$2")${ascii_bold}"
|
||||
c3="$(color "$3")${ascii_bold}"
|
||||
@@ -2647,7 +2726,10 @@ set_colors() {
|
||||
c5="$(color "$5")${ascii_bold}"
|
||||
c6="$(color "$6")${ascii_bold}"
|
||||
|
||||
# Text colors
|
||||
[[ "$color_text" != "off" ]] && set_text_colors $@
|
||||
}
|
||||
|
||||
set_text_colors() {
|
||||
if [[ "${colors[0]}" == "distro" ]]; then
|
||||
title_color="$(color "$1")"
|
||||
at_color="$reset"
|
||||
@@ -3027,6 +3109,11 @@ usage() { printf "%s" "
|
||||
distro, /path/to/ascii
|
||||
--ascii_colors x x x x x x Colors to print the ascii art
|
||||
--ascii_distro distro Which Distro's ascii art to print
|
||||
NOTE: Arch and Ubuntu have 'old' logo varients.
|
||||
NOTE: Use 'arch_old' or 'ubuntu_old' to use the old logos.
|
||||
NOTE: Ubuntu has flavor varients.
|
||||
NOTE: Change this to 'Lubuntu', 'Xubuntu', 'Ubuntu-GNOME'
|
||||
or 'Ubuntu-Budgie' to use the flavors.
|
||||
--ascii_logo_size Size of ascii logo.
|
||||
Supported distros: Arch, Gentoo, Crux, OpenBSD.
|
||||
--ascii_bold on/off Whether or not to bold the ascii logo.
|
||||
@@ -3145,7 +3232,7 @@ get_args() {
|
||||
# Image
|
||||
"--image")
|
||||
image_source="$2"
|
||||
case "$2" in "-"* | "") image_backend="ascii" ;; esac
|
||||
case "$2" in "-"* | "" | "ascii") image_backend="ascii" ;; esac
|
||||
;;
|
||||
|
||||
"--image_size" | "--size") image_size="$2" ;;
|
||||
@@ -3216,7 +3303,7 @@ get_args() {
|
||||
"-v") verbose="on" ;;
|
||||
"-vv") set -x; verbose="on" ;;
|
||||
"--help") usage ;;
|
||||
"--version") printf "%s\n" "Neofetch 2.0"; exit ;;
|
||||
"--version") printf "%s\n" "Neofetch 2.0.2"; exit ;;
|
||||
esac
|
||||
|
||||
shift
|
||||
|
10
neofetch.1
10
neofetch.1
@@ -1,4 +1,4 @@
|
||||
.TH NEOFETCH "1" "December 2016" "2.0" "User Commands"
|
||||
.TH NEOFETCH "1" "December 2016" "2.0.2" "User Commands"
|
||||
.SH NAME
|
||||
neofetch \- simple system information script
|
||||
|
||||
@@ -228,6 +228,14 @@ Colors to print the ASCII art
|
||||
.TP
|
||||
.B \--ascii_distro 'distro'
|
||||
Which Distro\'s ASCII art to print
|
||||
.br
|
||||
NOTE: Arch and Ubuntu have 'old' logo varients.
|
||||
.br
|
||||
NOTE: Use 'arch_old' or 'ubuntu_old' to use the old logos.
|
||||
.br
|
||||
NOTE: Ubuntu has flavor varients.
|
||||
.br
|
||||
NOTE: Change this to 'Lubuntu', 'Xubuntu', 'Ubuntu-GNOME' or 'Ubuntu-Budgie' to use the flavors.
|
||||
.TP
|
||||
.B \--ascii_logo_size 'size'
|
||||
Size of ascii logo.
|
||||
|
Reference in New Issue
Block a user