Compare commits

...

106 Commits
2.0 ... 2.0.2

Author SHA1 Message Date
Dylan Araps
ae4e2b038d GPU: [Linux + AMD] Remove some OEM stuff from the info 2016-12-07 12:17:08 +11:00
Dylan Araps
0b2bbeeead Changelog 2016-12-07 10:13:10 +11:00
Dylan Araps
d381102f57 Theme: Fix incorrect theme output on Cinnamon 2016-12-07 10:04:59 +11:00
Dylan Araps
38943eedca Update CHANGELOG.md 2016-12-07 01:10:35 +11:00
Dylan Araps
2f28c9ee61 Changelog 2016-12-07 01:11:57 +11:00
Dylan Araps
cd6618d5d0 Update CHANGELOG.md 2016-12-07 00:55:00 +11:00
Dylan Araps
8f0bb0fcd3 GPU: Disable caching on all systems but macOS. Fixes #509 2016-12-07 00:54:37 +11:00
Dylan Araps
461a5692ac Version: Bump Neofetch to 2.0.2 2016-12-07 00:45:53 +11:00
Dylan Araps
de614f5bf1 Packages: Revert wc -l optimization 2016-12-07 00:35:27 +11:00
Dylan Araps
3466422a4f Merge branch 'master' of https://github.com/dylanaraps/neofetch 2016-12-06 12:14:27 +11:00
Dylan Araps
b5bc72ac51 General: Bump version number to 2.1 2016-12-06 12:14:13 +11:00
Dylan Araps
7a49de1002 Update CHANGELOG.md 2016-12-06 12:03:27 +11:00
Dylan Araps
afcb210aaa General: Quote string 2016-12-06 12:03:09 +11:00
Dylan Araps
fec061d9fd Update CHANGELOG.md 2016-12-06 12:02:51 +11:00
Dylan Araps
0fd55c5b5c Image: Only call grep once 2016-12-06 11:46:34 +11:00
Dylan Araps
9c9e08f17d Docs: Add notes about ubuntu flavors 2016-12-06 10:32:47 +11:00
Dylan Araps
09b2d671cd Changelog 2016-12-06 10:28:58 +11:00
Dylan Araps
2f3c749d9c Ascii: Added ascii art for Ubuntu-Budgie 2016-12-06 10:27:44 +11:00
Dylan Araps
fcf5612bf1 Changelog' 2016-12-06 09:58:31 +11:00
Dylan Araps
642439ece6 Changelog 2016-12-06 09:06:18 +11:00
Dylan Araps
0c03b4e4d0 Distro: Added support for Parrot Security 2016-12-06 09:04:23 +11:00
Dylan Araps
1c55695579 Changelog 2016-12-05 22:56:56 +11:00
Dylan Araps
c6e1b21087 Merge pull request #505 from konimex/master
BSD: Use $kernel_name instead of $distro in some functions
2016-12-05 22:52:31 +11:00
Muhammad Herdiansyah
de91180567 BSD: Use $kernel_name instead of $distro in some functions 2016-12-05 18:07:20 +07:00
Dylan Araps
15be77e495 Update CHANGELOG.md 2016-12-05 21:38:32 +11:00
Dylan Araps
94e31b49d4 Merge pull request #504 from konimex/master
Wallpaper: Expanded support to Solaris and GNU Hurd
2016-12-05 21:37:53 +11:00
Muhammad Herdiansyah
a40c0fd7ad Wallpaper: Expanded support to Solaris and GNU Hurd 2016-12-05 17:36:21 +07:00
Dylan Araps
0418a1bce7 Update CHANGELOG.md 2016-12-05 20:48:03 +11:00
Dylan Araps
e2827fefbf Merge pull request #502 from dylanaraps/scrot_auto
Scrot: Automatically detect tools
2016-12-05 20:41:19 +11:00
Dylan Araps
b93acd15ff Readme 2016-12-05 20:11:00 +11:00
Dylan Araps
708c39779f Readme 2016-12-05 20:08:47 +11:00
Dylan Araps
4915525ac5 Update Readme 2016-12-05 19:54:01 +11:00
Dylan Araps
5c5b88e148 Changelog 2016-12-05 19:46:24 +11:00
Dylan Araps
98a2f6ae2c Image Upload: Set teknik as default 2016-12-05 19:44:42 +11:00
Dylan Araps
57007583d2 Changelog 2016-12-05 19:41:57 +11:00
Dylan Araps
6c54c3f612 Merge branch 'master' of https://github.com/dylanaraps/neofetch 2016-12-05 19:41:04 +11:00
Dylan Araps
da87d54d72 Image Upload: [teknik] Fix file type 2016-12-05 19:40:56 +11:00
Dylan Araps
ac0d30f568 Update README.md 2016-12-05 15:51:32 +11:00
Dylan Araps
cf57ebe7f7 Screenshot: Add support for macOS and Haiku 2016-12-05 15:42:32 +11:00
Dylan Araps
beb4d3a40b Changelog 2016-12-05 15:26:09 +11:00
Dylan Araps
9a04c65c66 Distro: Add support for AOSC OS 2016-12-05 15:25:28 +11:00
Dylan Araps
3f3326ca29 Scrot: Automatically detect tools 2016-12-05 15:14:44 +11:00
Dylan Araps
e5717904e8 Update CHANGELOG.md 2016-12-05 14:38:03 +11:00
Dylan Araps
16f59cb534 Update CHANGELOG.md 2016-12-05 14:37:53 +11:00
Dylan Araps
1c1aae107c Update CHANGELOG.md 2016-12-05 14:36:30 +11:00
Dylan Araps
32adaa3b39 Docs: Added note about old logos 2016-12-05 14:31:56 +11:00
Dylan Araps
f060c7f20c Update CHANGELOG.md 2016-12-05 13:41:33 +11:00
Dylan Araps
234dddead4 Merge pull request #501 from dylanaraps/wallp
Wallpaper: Rewrite wallpaper functon.
2016-12-05 13:40:39 +11:00
Dylan Araps
daf0e25d4f Wallpaper: Rewrite wallpaper functon. 2016-12-05 13:37:32 +11:00
Dylan Araps
4284e3a53c Update Changelog 2016-12-05 12:47:31 +11:00
Dylan Araps
e64a98ec48 Merge pull request #498 from dylanaraps/gpu_fix2
GPU: Fix bug with sound card being detected, closes #491
2016-12-05 12:43:15 +11:00
Dylan Araps
4490d8155f Changelog 2016-12-05 10:58:43 +11:00
Dylan Araps
983968fa7c Merge pull request #500 from dylanaraps/freebsd_memfix
Memory: [BSD] Rewrite BSD memory function.
2016-12-05 10:53:53 +11:00
Dylan Araps
242b2bd589 Memory: [BSD] Remove Free from output 2016-12-05 10:55:56 +11:00
Dylan Araps
4c860aaea4 Memory: [FreeBSD] Fix memory usage 2016-12-05 10:51:00 +11:00
Dylan Araps
13135b698e Memory: [FreeBSD] Rewrite memory functon 2016-12-05 10:30:01 +11:00
Dylan Araps
8d0b8ac0d3 Update CHANGELOG.md 2016-12-05 09:50:39 +11:00
Dylan Araps
c30523dd95 Merge pull request #499 from dylanaraps/cinnamon_version
DE: Print Cinnamon version, closes #494
2016-12-05 09:48:35 +11:00
Dylan Araps
3b4a1864bd DE: Print Cinnamon version, closes #494 2016-12-05 09:29:41 +11:00
Dylan Araps
e357203c5f Distro: [RFRemix] Use fedora ascii art 2016-12-05 09:24:27 +11:00
Dylan Araps
4d240088be GPU: Fix bug with sound card being detected, closes #491 2016-12-05 09:16:51 +11:00
Dylan Araps
b5485bea7a Distro add back full lsb_release support. Closes #493 2016-12-05 09:13:19 +11:00
Dylan Araps
772bf3b3f1 Update CHANGELOG.md 2016-12-04 09:19:23 +11:00
Dylan Araps
cdc6d5b465 Merge pull request #490 from dylanaraps/lsb-release2
Distro: Add back lsb_release detection
2016-12-04 09:18:42 +11:00
Dylan Araps
c8d5044e2e Distro: Remove DISTRIB_CODENAME 2016-12-04 09:20:38 +11:00
Dylan Araps
3766833329 Distro: Add DISTRIB_CODENAME 2016-12-04 09:14:41 +11:00
Dylan Araps
25fa44b2ef Distro: Use /etc/lsb-release file instead 2016-12-04 08:37:28 +11:00
Dylan Araps
b177d4f6f6 Distro: Add back lsb_release detection 2016-12-04 07:49:27 +11:00
Dylan Araps
4e6793d17e Config: Add notes about CPU temperature 2016-12-03 21:18:25 +11:00
Dylan Araps
7910249476 Ascii: Better SwagArch ascii 2016-12-03 21:05:43 +11:00
Dylan Araps
d7eb6ba321 Update Changelog 2016-12-03 20:44:49 +11:00
Dylan Araps
989ca16f05 Distro: Added support for SwagArch 2016-12-03 20:44:13 +11:00
Dylan Araps
dfc64f6b19 CPU: Fix incorrect CPU speeds 2016-12-03 19:33:36 +11:00
Dylan Araps
18cfafa998 Model: Remove dummy info 2016-12-03 17:35:11 +11:00
Dylan Araps
19a6357ce9 Image: Fix issue where '--image ascii' didn't work 2016-12-03 17:19:01 +11:00
Dylan Araps
4b4426f3ff Changelog: Remove windows binary chars 2016-12-03 17:10:41 +11:00
Dylan Araps
d267e51fd0 Changelog: Update changelog 2016-12-03 17:02:21 +11:00
Dylan Araps
adff1f61ff Merge pull request #486 from dylanaraps/pkg2
Packages: Call wc -l once at the end, instead of multiple times.
2016-12-03 16:55:28 +11:00
Dylan Araps
3d900d3d55 Merge pull request #487 from dylanaraps/ascii_colors
Ascii: --ascii_colors, don't color text colors
2016-12-03 16:55:17 +11:00
Dylan Araps
ff43eb39a5 Ascii: --ascii_colors, don't color text colors 2016-12-03 16:51:56 +11:00
Dylan Araps
394eccecd2 Packages: Only call wc -l once 2016-12-03 16:02:42 +11:00
Dylan Araps
9a0a996f89 Merge pull request #485 from konimex/master
Kernel: Modify how kernel_shorthand works in BSDs
2016-12-03 15:44:45 +11:00
Dylan Araps
4bdae818b3 Call wc -l once 2016-12-03 15:43:48 +11:00
Muhammad Herdiansyah
63c532f2c5 Kernel: Modify how kernel_shorthand works in BSDs 2016-12-03 11:20:31 +07:00
Dylan Araps
9d6fbc6850 Merge branch 'master' of https://github.com/dylanaraps/neofetch 2016-12-03 14:06:04 +11:00
Dylan Araps
350188203e Ascii: Added old Ubuntu ascii art 2016-12-03 14:05:51 +11:00
Dylan Araps
0d424ec0a6 Ascii: Added old Ubuntu ascii art 2016-12-03 14:05:46 +11:00
Dylan Araps
e08605d914 Update CHANGELOG.md 2016-12-03 10:40:34 +11:00
Dylan Araps
28fd8e8f93 Changelog 2016-12-03 10:38:43 +11:00
Dylan Araps
e961202568 Merge pull request #480 from dylanaraps/ubuntu
Ascii: Update Ubuntu logo
2016-12-03 10:34:09 +11:00
Dylan Araps
6bbd1c0580 Remove newline 2016-12-03 10:36:11 +11:00
Dylan Araps
6b0c6f8232 Ascii: Update ubuntu ascii 2016-12-03 10:34:49 +11:00
Dylan Araps
9e2ca7c118 Changelog: Remove windows newlines' 2016-12-03 10:17:17 +11:00
Dylan Araps
41c6952a66 Changelog 2016-12-03 10:14:23 +11:00
Dylan Araps
f8a111a0fe Merge pull request #481 from dylanaraps/def_mode
Image: Change default mode to ascii
2016-12-03 10:09:36 +11:00
Dylan Araps
df4efe6fb6 Ascii: Update Ubuntu logo 2016-12-03 10:03:46 +11:00
Dylan Araps
849bfe87d7 Changelog: Update 2016-12-03 09:49:21 +11:00
Dylan Araps
3bf9658ab4 Distro: Added support for Apricity OS, closes #479 2016-12-03 09:46:57 +11:00
Dylan Araps
34c34d8ecf Image: Change default mode to ascii 2016-12-03 09:33:24 +11:00
Dylan Araps
4118ea0d43 Public IP: Disable caching 2016-12-03 09:10:45 +11:00
Dylan Araps
230b217339 Ascii: Added GoboLinux ascii art 2016-12-02 23:16:47 +11:00
Dylan Araps
6b2b57eedd Update CHANGELOG.md 2016-12-02 23:04:45 +11:00
Dylan Araps
4e48f90012 Merge pull request #476 from konimex/gobolinux
Distro: Added support for GoboLinux
2016-12-02 23:03:50 +11:00
Muhammad Herdiansyah
956c79d0de Distro: Added support for GoboLinux 2016-12-02 18:18:55 +07:00
Dylan Araps
0b3e0a0f20 Config: Fix config file typo, closes #475 2016-12-02 22:06:01 +11:00
Dylan Araps
51622c371f Changelog: Clear changelog 2016-12-02 21:05:02 +11:00
13 changed files with 372 additions and 310 deletions

View File

@@ -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.

View File

@@ -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
View 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
View 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
View 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
View 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
View 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:,
''

View File

@@ -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+/-.

View 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
View 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++.

View File

@@ -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
View File

@@ -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

View File

@@ -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.