mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-10-04 17:09:21 +00:00
Compare commits
92 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
15a0738b1b | ||
|
04d194b9f9 | ||
|
f1c2b95598 | ||
|
8fce18fcae | ||
|
4d546c4bc0 | ||
|
54c6119041 | ||
|
e2ac16028d | ||
|
1abec60337 | ||
|
2f86d5a7c5 | ||
|
169887a931 | ||
|
59cc08e51c | ||
|
4ee3f48cb2 | ||
|
4fdf4366ad | ||
|
97a437b7ed | ||
|
bc13d6d5d7 | ||
|
2dce22bc66 | ||
|
198d1e77c0 | ||
|
4e3a9a1ac8 | ||
|
608ea47704 | ||
|
3d0ea7c6a2 | ||
|
728357f4ad | ||
|
599ab60909 | ||
|
745665b9d1 | ||
|
ebba162aff | ||
|
9573eee324 | ||
|
3d12661998 | ||
|
4af31a0fea | ||
|
c4869f5e50 | ||
|
568f52c3b9 | ||
|
fae12fadf2 | ||
|
461bbb7b7e | ||
|
c0e3a13f9d | ||
|
9bbd64a790 | ||
|
430f5af564 | ||
|
01c383bceb | ||
|
b22b748af9 | ||
|
ca0fc103f1 | ||
|
0d9f95bf5e | ||
|
c7892a70c7 | ||
|
502f4834fb | ||
|
e66b63d0f3 | ||
|
cfdaac34f2 | ||
|
01b3df7cd2 | ||
|
a9a3d9e5e7 | ||
|
58a57bb153 | ||
|
ac7fe31904 | ||
|
afb5234e9e | ||
|
98b2a4231d | ||
|
7f5554ac6c | ||
|
8ebd3ed981 | ||
|
1ea6b88b5b | ||
|
e85133af65 | ||
|
a6c5c64bea | ||
|
1c24b007c0 | ||
|
8884b19e82 | ||
|
87cfcfc72a | ||
|
0bca00a116 | ||
|
f3b803ae38 | ||
|
237eeeb833 | ||
|
bc0118a759 | ||
|
83c5751395 | ||
|
4064f4340b | ||
|
45a9ac3e84 | ||
|
bade83d5d5 | ||
|
6e527038d8 | ||
|
32c4b00bfd | ||
|
8b87e9978e | ||
|
8325a87add | ||
|
589c54a2ad | ||
|
0fed289d58 | ||
|
6460c1082c | ||
|
539c1462bf | ||
|
a3c41033d2 | ||
|
ee41671dec | ||
|
d68780385f | ||
|
0a70754ef1 | ||
|
13cfef01da | ||
|
6ecaa950e0 | ||
|
38cb68b2dd | ||
|
6bb7126a57 | ||
|
f14700f40e | ||
|
40d764ca6a | ||
|
c521c180bd | ||
|
546c13c100 | ||
|
e4ffa945f9 | ||
|
ef6b55e3f6 | ||
|
dd62ec697f | ||
|
c8cce9acb5 | ||
|
0dff121390 | ||
|
08276bde5e | ||
|
611c88b29c | ||
|
a02eb6f91d |
2
.github/ISSUE_TEMPLATE.md
vendored
2
.github/ISSUE_TEMPLATE.md
vendored
@@ -7,6 +7,8 @@ If you're suggesting a new feature then just a description will suffice.
|
|||||||
|
|
||||||
## Screenshot
|
## Screenshot
|
||||||
|
|
||||||
|
## Config file
|
||||||
|
|
||||||
## Verbose log
|
## Verbose log
|
||||||
|
|
||||||
1. Run `neofetch -vv 2> neofetchlog`
|
1. Run `neofetch -vv 2> neofetchlog`
|
||||||
|
@@ -17,7 +17,7 @@ before_install:
|
|||||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install screenresolution; fi
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install screenresolution; fi
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- time ./neofetch --ascii --config travis -v
|
- time ./neofetch --ascii --config config/travis -v
|
||||||
# See this wiki page for why we're disabling these errors.
|
# See this wiki page for why we're disabling these errors.
|
||||||
# https://github.com/dylanaraps/neofetch/wiki/Shellcheck-Exclusions
|
# https://github.com/dylanaraps/neofetch/wiki/Shellcheck-Exclusions
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then shellcheck neofetch -e SC1090,SC2009,SC2012,SC2016,SC2034,SC2128,SC2153,SC2154,SC2178,SC2010; fi
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then shellcheck neofetch -e SC1090,SC2009,SC2012,SC2016,SC2034,SC2128,SC2153,SC2154,SC2178,SC2010; fi
|
||||||
|
260
CHANGELOG.md
260
CHANGELOG.md
@@ -1,252 +1,88 @@
|
|||||||
This is another large release containing over `550` commits from 7 contributors. Due to the size and large amount of changes made this release expect at least one minor release to fix any bugs that come up.
|
This minor release fixes all of the bugs that were found in the 3.0 release.
|
||||||
|
|
||||||
The version number has been bumped to `3.0` due to the large amount of breaking changes introduced this update. I've added backwards compatibility for all of the new changes but there may still be some breakage. I highly recommend starting with a new config to avoid any issues that may arise.
|
Thanks for all of the bug reports and contributions. :)
|
||||||
|
|
||||||
Neofetch now supports displaying images using `catimg`, `libcaca` and `jp2a`. See this wiki page for screenshots. https://github.com/dylanaraps/neofetch/wiki/Image-Backends
|
|
||||||
|
|
||||||
Thanks to everyone who contributed this release, there were a lot of new faces this time around. :)
|
|
||||||
|
|
||||||
|
|
||||||
## Contributors
|
## Contributors
|
||||||
|
|
||||||
- **[@konimex](https://github.com/konimex)**
|
- **[@SomaUlte](https://github.com/SomaUlte)**
|
||||||
- **[@iandrewt](https://github.com/iandrewt)**
|
|
||||||
- **[@jorgegonzalez](https://github.com/jorgegonzalez)**
|
- **[@jorgegonzalez](https://github.com/jorgegonzalez)**
|
||||||
- **[@z33ky](https://github.com/z33ky)**
|
- **[@dawidd6](https://github.com/dawidd6)**
|
||||||
- **[@mstraube](https://github.com/mstraube)**
|
- **[@mstraube](https://github.com/mstraube)**
|
||||||
- **[@gavinhungry](https://github.com/gavinhungry)**
|
- **[@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)**
|
||||||
|
|
||||||
|
|
||||||
## IRC
|
## Operating System
|
||||||
|
|
||||||
Neofetch now has an IRC channel at `#neofetch` on Freenode. If you have any questions, issues or ideas feel free to join the IRC channel and I'll be happy to assist you. I know that we've already got the Gitter chat but hopefully this makes things easier for those without a GitHub account. :)
|
- Added support for ArchBox Linux.
|
||||||
|
|
||||||
[](http://irc.lc/freenode/neofetch)
|
|
||||||
|
|
||||||
|
|
||||||
## Collaborators
|
|
||||||
|
|
||||||
I have given collaborator access to both **[@konimex](https://github.com/konimex)** and **[@iandrewt](https://github.com/iandrewt)**. In short this allows them to push directly to the master branch of the repo, manage the issue tracker and also merge pull requests. They've been a huge help the past year so this made sense to me.
|
|
||||||
|
|
||||||
|
|
||||||
## OS
|
|
||||||
|
|
||||||
- Added support for AIX.
|
|
||||||
- Added support for AntiX.
|
|
||||||
- Added support for GNU/kFreeBSD.
|
|
||||||
- Added support for Gentoo FreeBSD.
|
|
||||||
- Added support for GrombyangOS.
|
|
||||||
- Added support for Joyent SmartOS.
|
|
||||||
- Added support for Mer.
|
|
||||||
- Added support for MINIX.
|
|
||||||
- Added support for MX.
|
|
||||||
- Added support for Open Source Media Center (OSMC).
|
|
||||||
- Added support for SalentOS.
|
|
||||||
- Added support for TrueOS.
|
|
||||||
- Added support for Windows (MSYS2).
|
|
||||||
|
|
||||||
|
|
||||||
## General
|
## General
|
||||||
|
|
||||||
- The default config file is now installed to `/etc/neofetch/config` and acts as a system-wide config file for Neofetch. Editing this file will make the changes available to all users on the system. Those packaging Neofetch **without** using the Makefile will need to make changes to support this.
|
- Fixed output if subtitles are disabled and `prin` is used in an info function.
|
||||||
- The Makefile was rewritten to remove GNU-isms.
|
- Fixed underlines not working when used with `prin`.
|
||||||
- Removed executable permission from config files. BASH can source them even if they're un-executable.
|
- Fixed HAIKU install path. **[@YellowApple](https://github.com/YellowApple)**
|
||||||
- Travis now runs [shellcheck](https://github.com/koalaman/shellcheck) on every commit and pull request.
|
|
||||||
- We've had to exclude around 10 lint errors, see this wiki page for why we did this:
|
|
||||||
- https://github.com/dylanaraps/neofetch/wiki/Shellcheck-Exclusions
|
## Config
|
||||||
- Neofetch now supports relative path values when specifying the location to images, ascii files and config files.
|
|
||||||
- For example, `neofetch --w3m Pictures/Wallpapers/10.jpg` and `neofetch --w3m 10.jpg` now work.
|
- Fixed default config not found.
|
||||||
- Optimize usage of `get_de()`, `get_wm()` and `get_term().
|
- Don't set locale in config file.
|
||||||
- We were calling these multiple times, we now only run them once and check to see if they were run previously.
|
|
||||||
- Optimize info caching, only check for cache files in functions that use caching.
|
|
||||||
- The manpage is now generated using `help2man`. `help2man` parses the output of `--help` and `--version` to create a manpage. This ensures that our manpage stays 1:1 with the script documentation. We actually found a lot of outdated info in the old manpage thanks to this.
|
|
||||||
- A new flag was added called `--gen-man` which generates a neofetch manpage in your current directory.
|
|
||||||
- Delete most of `info()` and instead call `prin()`.
|
|
||||||
- This removes a lot of duplicate code between `info()` and `prin()`.
|
|
||||||
- Remove `printf` subshells and instead use `printf -v` to declare the variables.
|
|
||||||
- Fixed artifacts when using line-breaks in TTYs.
|
|
||||||
- All errors are now sent to `stderr`.
|
|
||||||
- Renamed `XFCE` --> `Xfce`. **[@gavinhungry](https://github.com/gavinhungry)**
|
|
||||||
- Cleanup `main()`.
|
|
||||||
- Renamed `old_flags()` --> `old_options()`.
|
|
||||||
|
|
||||||
|
|
||||||
## Info
|
## Info
|
||||||
|
|
||||||
|
**Memory**<br \>
|
||||||
|
|
||||||
|
- Changed memory label to `MiB` on OS that output memory in Mebibytes.
|
||||||
|
|
||||||
**Shell**<br \>
|
**Shell**<br \>
|
||||||
|
|
||||||
- [Fish] Fixed memory leak caused by Fish.
|
- Fixed a crash when the user has `bash 3` installed.
|
||||||
- Added support for `xonsh`.
|
|
||||||
- Fixed version output on `ksh`.
|
|
||||||
- Rewrote the function to remove duplicate code.
|
|
||||||
|
|
||||||
**Uptime**<br \>
|
**Packages**<br \>
|
||||||
|
|
||||||
- Moved duplicate code to a function.
|
- Added support for Chromebrew.
|
||||||
- Changed `$uptime_shorthand` to `on` by default.
|
|
||||||
|
|
||||||
**Desktop Environment**<br \>
|
|
||||||
|
|
||||||
- Fixed issues where MATE wouldn't be detected properly.
|
|
||||||
- Added fallback to `$DESKTOP_SESSION`, `$MATE_DESKTOP_SESSION_ID` and `$GNOME_DESKTOP_SESSION_ID`.
|
|
||||||
- Hide Desktop Environment if it matches Window Manager.
|
|
||||||
|
|
||||||
**CPU**<br \>
|
|
||||||
|
|
||||||
- [Linux] Don't simplify `cpufreq` speed option names for no reason.
|
|
||||||
- [Linux] Fixed issues with CPU name detection for architectures other than x86/amd64/ARM.
|
|
||||||
- [NetBSD] Remove case statement in favor of 1 line test.
|
|
||||||
- Simplify check for low CPU speeds.
|
|
||||||
- Expanded `cpu_temp` to take the values `C` and `F`. This means you can now display the CPU temperature as Fahrenheit.
|
|
||||||
|
|
||||||
**CPU Usage**<br \>
|
|
||||||
|
|
||||||
- Added Haiku cores command.
|
|
||||||
- Updated Linux and macOS commands to the match the commands in the `get_cpu()` function.
|
|
||||||
|
|
||||||
**GPU**<br \>
|
**GPU**<br \>
|
||||||
|
|
||||||
- [Linux] Each GPU is now printed on a separate line.
|
- [Linux] Display detailed information about Intel GPUs. **[@SomaUlte](https://github.com/SomaUlte)**
|
||||||
- [Linux] Added `--gpu_type` / `$gpu_type` which lets you display `all`, `dedicated` or `integrated` GPUs.
|
|
||||||
|
|
||||||
**Memory**<br \>
|
|
||||||
|
|
||||||
- [Solaris] Fixed inaccurate used memory size.
|
|
||||||
|
|
||||||
**Resolution**<br \>
|
|
||||||
|
|
||||||
- [Windows] Declare variables locally to fix conflicts in other functions.
|
|
||||||
|
|
||||||
**~~Birthday~~ Install Date**<br \>
|
|
||||||
|
|
||||||
- Renamed `get_birthday()` -- > `get_install_date()`
|
|
||||||
- Removed all `date` command usage from `get_install_date()`.
|
|
||||||
- Added a new function called `convert_time()` which takes the time stamped `ls` output and converts it to a pretty format. The function only uses bash so its much faster than calling `date`. This makes things simple and keeps the output consistent across all Operating Systems. Example: `2016-12-06 16:58:58.000000000` --> `Tue 06 Dec 2016 4:58 PM`
|
|
||||||
- Added an option so users can choose between using 24-hour and 12-hour time format
|
|
||||||
- `get_install_date()` will detect which `ls` program is being used instead of hardcoding them per OS.
|
|
||||||
|
|
||||||
**Disk**<br \>
|
|
||||||
|
|
||||||
- Rewrote function from scratch.
|
|
||||||
- The function is `40` lines smaller than before and works on all \[1\] versions of `df` we tested on \[2\].
|
|
||||||
- Added the option/flag `disk_show` which allows you to specify which disks, mount points or directories to show the disk info of. (One per line)
|
|
||||||
- Added the option/flag `disk_subtitle` which allows you to specify how we label each disk. (Mount point or Disk name)
|
|
||||||
- Removed all percentage calculation since `df` already provides us with the percentage.
|
|
||||||
- Warn the user if `df` isn't installed.
|
|
||||||
- Fixed broken output if `df` wasn't installed but the function was enabled.
|
|
||||||
|
|
||||||
\[1\] The function doesn't work on Haiku since their `df` is wildly non-standard. (The output format and flags are 100% different from all of the other `df` versions floating around.)
|
|
||||||
|
|
||||||
\[2\] Tested on `GNU`, `Busybox`, `BSD`, `Solaris` and `macOS` `df` versions.
|
|
||||||
|
|
||||||
**Theme**<br \>
|
|
||||||
|
|
||||||
- [KDE] Don't display GTK Themes if KDE is detected.
|
|
||||||
- [KDE] If `kde[0-9]-config` isn't found, try and look for `$HOME/.kde`.
|
|
||||||
|
|
||||||
**Window Manager Theme**<br \>
|
|
||||||
|
|
||||||
- Fixed WM Theme not detected on MATE. **[@mstraube](https://github.com/mstraube)**
|
|
||||||
- Fixed WM Theme detection on KDE. **[@mstraube](https://github.com/mstraube)**
|
|
||||||
|
|
||||||
**Song**<br \>
|
|
||||||
|
|
||||||
- Added support for xmms2. **[@z33ky](https://github.com/z33ky)**
|
|
||||||
- Added support for Exaile music player. **[@mstraube](https://github.com/mstraube)**
|
|
||||||
- Added support for JuK .**[@mstraube](https://github.com/mstraube)**
|
|
||||||
- Added support for Bluemindo. **[@mstraube](https://github.com/mstraube)**
|
|
||||||
- Added support for Guayadeque Player. **[@mstraube](https://github.com/mstraube)**
|
|
||||||
- Added support for Yarock. **[@mstraube](https://github.com/mstraube)**
|
|
||||||
- Added support for Qmmp. **[@mstraube](https://github.com/mstraube)**
|
|
||||||
- Added support for QuodLibet. **[@mstraube](https://github.com/mstraube)**
|
|
||||||
- Added support for Mopidy. **[@d3rrial](https://github.com/d3rrial)**
|
|
||||||
- [cmus] Simplify block and fix `artistsort` bug.
|
|
||||||
- Removed `state` detection.
|
|
||||||
- Removed duplicate `dbus-send` commands. **[@mstraube](https://github.com/mstraube)**
|
|
||||||
- Hide output if no song is playing.
|
|
||||||
- Enforce order `artist - title` in `get_song_dbus()`. **[@mstraube](https://github.com/mstraube)**
|
|
||||||
|
|
||||||
**Terminal Font**<br \>
|
|
||||||
|
|
||||||
- Added support for Alacritty.
|
|
||||||
- Added support for Konsole. **[@mstraube](https://github.com/mstraube)**
|
|
||||||
- Added support for Sakura Terminal. **[@mstraube](https://github.com/mstraube)**
|
|
||||||
- Added support for Pantheon Terminal. **[@mstraube](https://github.com/mstraube)**
|
|
||||||
- Added support for deepin-terminal. **[@mstraube](https://github.com/mstraube)**
|
|
||||||
- [Termite] Fixed incorrect font chosen. **[@mstraube](https://github.com/mstraube)**
|
|
||||||
- [Termite] Also look at default config. **[@mstraube](https://github.com/mstraube)**
|
|
||||||
|
|
||||||
**Battery**<br \>
|
|
||||||
|
|
||||||
- [MacOS] Fixed issue where battery always appears as charging. **[@jorgegonzalez](https://github.com/jorgegonzalez)**
|
|
||||||
|
|
||||||
**Local IP**<br \>
|
|
||||||
|
|
||||||
- [BSD and Solaris] Merged the detection to Linux.
|
|
||||||
- [Windows] Support multiple interfaces.
|
|
||||||
|
|
||||||
**Color Blocks**<br \>
|
**Color Blocks**<br \>
|
||||||
|
|
||||||
- Use `start++` instead of adding it manually after case. **[@konimex](https://github.com/konimex)**
|
- Fixed issue with `color_blocks="off"` adding an extra newline to the output.
|
||||||
- Fixed bug where color blocks wouldn't respect width in TTYs.
|
|
||||||
- Cursor positioning now takes `$block_height` into account.
|
**Song**<br \>
|
||||||
- Fixed all artifacts in virtual consoles.
|
|
||||||
- Merged `$start` and `$end` into an array called `block_range`.
|
- Don't print `$song` if it's empty and `song_shorthand` is on. **[@mstraube](https://github.com/mstraube)**
|
||||||
- This makes the config option match the command-line flag `--block_range`.
|
- 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)**
|
||||||
|
|
||||||
|
|
||||||
## Images
|
## Images
|
||||||
|
|
||||||
- [iTerm2] Fixed blank images.
|
- [iTerm2] Fixed issue with line-breaks printing spaces over the image. **[@jorgegonzalez](https://github.com/jorgegonzalez)**
|
||||||
- Fixed bug where image mode would attempt to run in a TTY.
|
- Fixed issue with images not working in Terminology.
|
||||||
- All of the image/ascii backend handling was rewritten. Backend and Image/File/Directory selection is universal now and should make usage easier.
|
- Fixed issue when `image_source` was set to `wall`.
|
||||||
- Added `catimg` backend.
|
- [w3m-img] Fixed issues with `w3m-img` and `tmux`.
|
||||||
- Added `caca` backend.
|
|
||||||
- Added `jp2a` backend.
|
|
||||||
- `--image` has been replaced with `--backend`.
|
|
||||||
- `--backend` takes `ascii`, `caca`, `catimg`, `jp2a`, `iterm2`, `off`, `tycat`, `w3m`.
|
|
||||||
- Shortcut flags were added for easy picking of backends.
|
|
||||||
- Each flag can take a file, image or directory as an argument.
|
|
||||||
- For example: `neofetch --w3m /path/to/img.jpg` `neofetch --ascii /path/to/file`
|
|
||||||
- `--w3m`
|
|
||||||
- `--iterm2`
|
|
||||||
- `--tycat`
|
|
||||||
- `--ascii`
|
|
||||||
- `--off`
|
|
||||||
- `--catimg`
|
|
||||||
- `--caca`
|
|
||||||
- `--jp2a`
|
|
||||||
- All image and ascii file selection has been replaced with the universal `--source`.
|
|
||||||
- The value of `--source` can be any of the following:
|
|
||||||
- `auto`, `ascii`, `wallpaper`, `/path/to/img`, `/path/to/ascii`, `/path/to/dir/`.
|
|
||||||
- Fixed bugs with image shuffle mode.
|
|
||||||
|
|
||||||
|
|
||||||
## Wallpaper
|
|
||||||
|
|
||||||
- Decode URI filenames.
|
|
||||||
|
|
||||||
|
|
||||||
## Ascii
|
## Ascii
|
||||||
|
|
||||||
- Simplified ascii file handling.
|
- [Windows 10] Fixed `ascii_distro` not working.
|
||||||
- Removed a call to `tr` for those using `bash 3`.
|
- Fixed a bug where the backend is `ascii` but the image_source is an image file.
|
||||||
- Fixed distro detection issues.
|
- Fixed custom ascii files not working.
|
||||||
- Removed the assumption that `first word in distro --> ascii file name`
|
- Removed extra backslashes from OpenBSD ascii art. **[@Head-on-a-Stick](https://github.com/Head-on-a-Stick)**
|
||||||
- Added Ubuntu-Studio. **[@konimex](https://github.com/konimex)**
|
|
||||||
- Fixed bug causing macOS ascii art to be used on other Operating Systems.
|
|
||||||
- Display warning about 'ascii' being the new default mode.
|
|
||||||
- Removed `ascii_logo_size` in favor of `ascii_distro='{arch,crux,gentoo}_small'`.
|
|
||||||
- [PCBSD] Use TrueOS ascii art.
|
|
||||||
- Added Void Linux (small) and Alpine Linux (small).
|
|
||||||
|
|
||||||
|
|
||||||
## Screenshot
|
## Scrot
|
||||||
|
|
||||||
- Use arrays for `$scrot_program`
|
- Added message to let users know that a screenshot was taken.
|
||||||
|
|
||||||
|
|
||||||
## Args
|
|
||||||
|
|
||||||
- Fixed bug where `neofetch --config` sourced the user config twice.
|
|
||||||
- Cleaned up config arg handling.
|
|
||||||
|
@@ -7,9 +7,9 @@ ${c1} -`
|
|||||||
`/:-:++oooo+:
|
`/:-:++oooo+:
|
||||||
`/++++/+++++++:
|
`/++++/+++++++:
|
||||||
`/++++++++++++++:
|
`/++++++++++++++:
|
||||||
`/+++ooooooooooooo/`
|
`/+++o${c2}oooooooo${c1}oooo/`
|
||||||
./ooosssso++osssssso+`
|
${c2} ${c1}./${c2}ooosssso++osssssso${c1}+`
|
||||||
.oossssso-````/ossssss+`
|
${c2} .oossssso-````/ossssss+`
|
||||||
-osssssso. :ssssssso.
|
-osssssso. :ssssssso.
|
||||||
:osssssss/ osssso+++.
|
:osssssss/ osssso+++.
|
||||||
/ossssssss/ +ssssooo/-
|
/ossssssss/ +ssssooo/-
|
||||||
|
19
ascii/distro/archbox
Normal file
19
ascii/distro/archbox
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
${c1} ...:+oh/:::..
|
||||||
|
..-/oshhhhhh` `::::-.
|
||||||
|
.:/ohhhhhhhhhhhh` `-::::.
|
||||||
|
.+shhhhhhhhhhhhhhhhh` `.::-.
|
||||||
|
/`-:+shhhhhhhhhhhhhh` .-/+shh
|
||||||
|
/ .:/ohhhhhhhhh` .:/ohhhhhhhh
|
||||||
|
/ `-:+shhh` ..:+shhhhhhhhhhhh
|
||||||
|
/ .:ohhhhhhhhhhhhhhhhhhh
|
||||||
|
/ `hhhhhhhhhhhhhhhhhhhh
|
||||||
|
/ `hhhhhhhhhhhhhhhhhhhh
|
||||||
|
/ `hhhhhhhhhhhhhhhhhhhh
|
||||||
|
/ `hhhhhhhhhhhhhhhhhhhh
|
||||||
|
/ .+o+ `hhhhhhhhhhhhhhhhhhhh
|
||||||
|
/ -hhhhh `hhhhhhhhhhhhhhhhhhhh
|
||||||
|
/ ohhhhho `hhhhhhhhhhhhhhhhhhhh
|
||||||
|
/:::+`hhhhoos` `hhhhhhhhhhhhhhhhhs+`
|
||||||
|
`--/:` /: `hhhhhhhhhhhho/-
|
||||||
|
-/:. `hhhhhhs+:-`
|
||||||
|
::::/ho/-`
|
@@ -7,8 +7,8 @@ ${c1} / ||\| Y J ) / |/| ./
|
|||||||
J |)'( | ` F`.'/ ${c3} _
|
J |)'( | ` F`.'/ ${c3} _
|
||||||
${c1} -<| F __ .-< ${c3}(_)
|
${c1} -<| F __ .-< ${c3}(_)
|
||||||
${c1} | / .-'${c3}. ${c1}`. /${c3}-. ${c1}L___
|
${c1} | / .-'${c3}. ${c1}`. /${c3}-. ${c1}L___
|
||||||
J \\ < ${c3}\ ${c1} | | ${c5}O${c3}\\\\${c1}|.-' ${c3} _
|
J \\ < ${c3}\ ${c1} | | ${c5}O${c3}\\${c1}|.-' ${c3} _
|
||||||
${c1} _J \\ .- \\\\${c3}/ ${c5}O ${c3}| ${c1}| \\ |${c1}F ${c3}(_)
|
${c1} _J \\ .- \\${c3}/ ${c5}O ${c3}| ${c1}| \\ |${c1}F ${c3}(_)
|
||||||
${c1} '-F -<_. \\ .-' `-' L__
|
${c1} '-F -<_. \\ .-' `-' L__
|
||||||
__J _ _. >-' ${c1})${c4}._. ${c1}|-'
|
__J _ _. >-' ${c1})${c4}._. ${c1}|-'
|
||||||
${c1} `-|.' /_. ${c4}\_| ${c1} F
|
${c1} `-|.' /_. ${c4}\_| ${c1} F
|
||||||
|
@@ -3,9 +3,6 @@
|
|||||||
# Neofetch config file
|
# Neofetch config file
|
||||||
# https://github.com/dylanaraps/neofetch
|
# https://github.com/dylanaraps/neofetch
|
||||||
|
|
||||||
# Speed up script by not using unicode
|
|
||||||
export LC_ALL=C
|
|
||||||
export LANG=C
|
|
||||||
|
|
||||||
# See this wiki page for more info:
|
# See this wiki page for more info:
|
||||||
# https://github.com/dylanaraps/neofetch/wiki/Customizing-Info
|
# https://github.com/dylanaraps/neofetch/wiki/Customizing-Info
|
||||||
@@ -710,4 +707,4 @@ image_host="teknik"
|
|||||||
#
|
#
|
||||||
# NOTE: Don't change this value, neofetch reads this to determine
|
# NOTE: Don't change this value, neofetch reads this to determine
|
||||||
# how to handle backwards compatibility.
|
# how to handle backwards compatibility.
|
||||||
config_version="2.1.0"
|
config_version="3.0.1"
|
||||||
|
@@ -38,6 +38,14 @@ print_info() {
|
|||||||
info line_break
|
info line_break
|
||||||
info cols
|
info cols
|
||||||
info line_break
|
info line_break
|
||||||
|
|
||||||
|
# Testing.
|
||||||
|
prin "prin"
|
||||||
|
prin "prin" "prin"
|
||||||
|
|
||||||
|
# Testing no subtitles.
|
||||||
|
info uptime
|
||||||
|
info disk
|
||||||
}
|
}
|
||||||
|
|
||||||
refresh_rate="on"
|
refresh_rate="on"
|
||||||
|
178
neofetch
178
neofetch
@@ -8,6 +8,9 @@
|
|||||||
# Created by Dylan Araps
|
# Created by Dylan Araps
|
||||||
# https://github.com/dylanaraps/
|
# https://github.com/dylanaraps/
|
||||||
|
|
||||||
|
# Neofetch version.
|
||||||
|
version="3.0.1"
|
||||||
|
|
||||||
bash_version="${BASH_VERSION/.*}"
|
bash_version="${BASH_VERSION/.*}"
|
||||||
sys_locale="${LANG:-C}"
|
sys_locale="${LANG:-C}"
|
||||||
XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-${HOME}/.config}"
|
XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-${HOME}/.config}"
|
||||||
@@ -53,13 +56,12 @@ get_distro() {
|
|||||||
|
|
||||||
case "$os" in
|
case "$os" in
|
||||||
"Linux" | "BSD" | "MINIX")
|
"Linux" | "BSD" | "MINIX")
|
||||||
if [[ "$(< /proc/version)" == *"Microsoft"* || "$(< /proc/sys/kernel/osrelease)" == *"Microsoft"* ]]; then
|
if [[ "$(< /proc/version)" == *"Microsoft"* || "$kernel_version" == *"Microsoft"* ]]; then
|
||||||
case "$distro_shorthand" in
|
case "$distro_shorthand" in
|
||||||
"on") distro="$(lsb_release -sir) [Windows 10]" ;;
|
"on") distro="$(lsb_release -sir) [Windows 10]" ;;
|
||||||
"tiny") distro="Windows 10" ;;
|
"tiny") distro="Windows 10" ;;
|
||||||
*) distro="$(lsb_release -sd) on Windows 10" ;;
|
*) distro="$(lsb_release -sd) on Windows 10" ;;
|
||||||
esac
|
esac
|
||||||
ascii_distro="Windows 10"
|
|
||||||
|
|
||||||
elif [[ -f "/etc/GoboLinuxVersion" ]]; then
|
elif [[ -f "/etc/GoboLinuxVersion" ]]; then
|
||||||
case "$distro_shorthand" in
|
case "$distro_shorthand" in
|
||||||
@@ -471,6 +473,9 @@ get_packages() {
|
|||||||
type -p pkg_info >/dev/null && \
|
type -p pkg_info >/dev/null && \
|
||||||
packages="$((packages+=$(pkg_info | wc -l)))"
|
packages="$((packages+=$(pkg_info | wc -l)))"
|
||||||
|
|
||||||
|
type -p crew >/dev/null && \
|
||||||
|
packages="$((packages+=$(ls -l /usr/local/etc/crew/meta/*.filelist | wc -l)))"
|
||||||
|
|
||||||
if type -p pkg >/dev/null; then
|
if type -p pkg >/dev/null; then
|
||||||
case "$kernel_name" in
|
case "$kernel_name" in
|
||||||
"FreeBSD") packages="$((packages+=$(pkg info | wc -l)))" ;;
|
"FreeBSD") packages="$((packages+=$(pkg info | wc -l)))" ;;
|
||||||
@@ -526,7 +531,7 @@ get_shell() {
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
if [[ "$shell_version" == "on" ]]; then
|
if [[ "$shell_version" == "on" ]]; then
|
||||||
case "${SHELL##*/}" in
|
case "${shell_name:=${SHELL##*/}}" in
|
||||||
"bash") shell+="${BASH_VERSION/-*}" ;;
|
"bash") shell+="${BASH_VERSION/-*}" ;;
|
||||||
"sh" | "ash" | "dash") ;;
|
"sh" | "ash" | "dash") ;;
|
||||||
|
|
||||||
@@ -538,7 +543,7 @@ get_shell() {
|
|||||||
|
|
||||||
*)
|
*)
|
||||||
shell+="$("$SHELL" --version 2>&1)"
|
shell+="$("$SHELL" --version 2>&1)"
|
||||||
shell="${shell/ ${SHELL##*/}}"
|
shell="${shell/ "${shell_name}"}"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@@ -584,7 +589,7 @@ get_de() {
|
|||||||
# the desktop variables are sometimes also set to the
|
# the desktop variables are sometimes also set to the
|
||||||
# window manager name. This checks to see if WM == DE
|
# window manager name. This checks to see if WM == DE
|
||||||
# and dicards the DE value.
|
# and dicards the DE value.
|
||||||
[[ "$wm" && "$de" =~ $wm ]] && { unset -v de; return; }
|
[[ "$wm" && "$de" =~ ^$wm$ ]] && { unset -v de; return; }
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@@ -1075,7 +1080,12 @@ get_gpu() {
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
*"intel"*)
|
*"intel"*)
|
||||||
gpu="Intel Integrated Graphics"
|
gpu="$(glxinfo | grep "Device:.*Intel")"
|
||||||
|
gpu="${gpu/*Intel/Intel}"
|
||||||
|
gpu="${gpu/'(R)'}"
|
||||||
|
gpu="${gpu/ \(*}"
|
||||||
|
|
||||||
|
[[ -z "$(trim "$gpu")" ]] && gpu="Intel Integrated Graphics"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*"virtualbox"*)
|
*"virtualbox"*)
|
||||||
@@ -1089,7 +1099,7 @@ get_gpu() {
|
|||||||
gpu="${gpu/Intel }"
|
gpu="${gpu/Intel }"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
prin "${subtitle}${gpu_num}" "$gpu"
|
prin "${subtitle:+${subtitle}${gpu_name}}" "$gpu"
|
||||||
((++gpu_num))
|
((++gpu_num))
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -1244,9 +1254,10 @@ get_memory() {
|
|||||||
mem_total="${mem_stat[11]/.*}"
|
mem_total="${mem_stat[11]/.*}"
|
||||||
mem_free="${mem_stat[16]/.*}"
|
mem_free="${mem_stat[16]/.*}"
|
||||||
mem_used="$((mem_total - mem_free))"
|
mem_used="$((mem_total - mem_free))"
|
||||||
|
mem_label="MB"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
memory="${mem_used}MB / ${mem_total}MB"
|
memory="${mem_used}${mem_label:-MiB} / ${mem_total}${mem_label:-MiB}"
|
||||||
|
|
||||||
# Bars.
|
# Bars.
|
||||||
case "$memory_display" in
|
case "$memory_display" in
|
||||||
@@ -1277,9 +1288,9 @@ get_song() {
|
|||||||
"google play"*) song="$(gpmdp-remote current)" ;;
|
"google play"*) song="$(gpmdp-remote current)" ;;
|
||||||
"rhythmbox"*) song="$(rhythmbox-client --print-playing)" ;;
|
"rhythmbox"*) song="$(rhythmbox-client --print-playing)" ;;
|
||||||
"deadbeef"*) song="$(deadbeef --nowplaying-tf '%artist% - %title%')" ;;
|
"deadbeef"*) song="$(deadbeef --nowplaying-tf '%artist% - %title%')" ;;
|
||||||
"audacious"*) song="$(audtool current-song)" ;;
|
|
||||||
"xmms2d"*) song="$(xmms2 current -f '${artist} - ${title}')" ;;
|
"xmms2d"*) song="$(xmms2 current -f '${artist} - ${title}')" ;;
|
||||||
"qmmp"*) song="$(qmmp --nowplaying '%p - %t')" ;;
|
"qmmp"*) song="$(qmmp --nowplaying '%p - %t')" ;;
|
||||||
|
"audacious"*) get_song_dbus "audacious" ;;
|
||||||
"gnome-music"*) get_song_dbus "GnomeMusic" ;;
|
"gnome-music"*) get_song_dbus "GnomeMusic" ;;
|
||||||
"lollypop"*) get_song_dbus "Lollypop" ;;
|
"lollypop"*) get_song_dbus "Lollypop" ;;
|
||||||
"clementine"*) get_song_dbus "clementine" ;;
|
"clementine"*) get_song_dbus "clementine" ;;
|
||||||
@@ -1327,14 +1338,18 @@ get_song() {
|
|||||||
song="$(dbus-send --print-reply --dest=net.sacredchao.QuodLibet /net/sacredchao/QuodLibet net.sacredchao.QuodLibet.CurrentSong |\
|
song="$(dbus-send --print-reply --dest=net.sacredchao.QuodLibet /net/sacredchao/QuodLibet net.sacredchao.QuodLibet.CurrentSong |\
|
||||||
awk -F'"' '/artist/ {getline; a=$2} /title/ {getline; t=$2} END{print a " - " t}')"
|
awk -F'"' '/artist/ {getline; a=$2} /title/ {getline; t=$2} END{print a " - " t}')"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
mpc >/dev/null 2>&1 && song="$(mpc current)"
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
[[ "$(trim "$song")" = "-" ]] && unset -v song
|
[[ "$(trim "$song")" == "-" ]] && unset -v song
|
||||||
|
|
||||||
# Display Artist and Title on separate lines.
|
# Display Artist and Title on separate lines.
|
||||||
if [[ "$song_shorthand" == "on" ]]; then
|
if [[ "$song_shorthand" == "on" && "$song" ]]; then
|
||||||
artist="${song/ -*}"
|
artist="${song/ -*}"
|
||||||
song="${song/$artist - }"
|
song="${song/*-}"
|
||||||
|
|
||||||
if [[ "$song" != "$artist" ]]; then
|
if [[ "$song" != "$artist" ]]; then
|
||||||
prin "Artist" "$artist"
|
prin "Artist" "$artist"
|
||||||
@@ -1610,6 +1625,7 @@ get_term_font() {
|
|||||||
term_font="$(awk -F ':|#' '/normal:/ {getline; print}' "${XDG_CONFIG_HOME}/alacritty/alacritty.yml")"
|
term_font="$(awk -F ':|#' '/normal:/ {getline; print}' "${XDG_CONFIG_HOME}/alacritty/alacritty.yml")"
|
||||||
term_font="${term_font/*family:}"
|
term_font="${term_font/*family:}"
|
||||||
term_font="${term_font/$'\n'*}"
|
term_font="${term_font/$'\n'*}"
|
||||||
|
term_font="${term_font/\#*}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"Apple_Terminal")
|
"Apple_Terminal")
|
||||||
@@ -1740,7 +1756,11 @@ get_disk() {
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
# Append '(disk mount point)' to the subtitle.
|
# Append '(disk mount point)' to the subtitle.
|
||||||
|
if [[ -z "$subtitle" ]]; then
|
||||||
|
prin "${disk_sub}" "$disk"
|
||||||
|
else
|
||||||
prin "${subtitle} (${disk_sub})" "$disk"
|
prin "${subtitle} (${disk_sub})" "$disk"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1766,7 +1786,7 @@ get_battery() {
|
|||||||
"barinfo") battery="$(bar "$capacity" 100) ${battery}" ;;
|
"barinfo") battery="$(bar "$capacity" 100) ${battery}" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
prin "${subtitle}${bat: -1}" "$battery"
|
prin "${subtitle:+${subtitle}${bat: -1}}" "$battery"
|
||||||
done
|
done
|
||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
@@ -1940,9 +1960,11 @@ get_cols() {
|
|||||||
cols="${cols//nl/\\n\\033[${text_padding}C${zws}}"
|
cols="${cols//nl/\\n\\033[${text_padding}C${zws}}"
|
||||||
|
|
||||||
printf "%b\n" "\033[${text_padding}C${zws}${cols}"
|
printf "%b\n" "\033[${text_padding}C${zws}${cols}"
|
||||||
info_height="$((info_height+=block_height+2))"
|
else
|
||||||
|
printf "\n"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
info_height="$((info_height+=block_height+2))"
|
||||||
unset -v blocks blocks2 cols
|
unset -v blocks blocks2 cols
|
||||||
|
|
||||||
# Tell info() that we printed manually.
|
# Tell info() that we printed manually.
|
||||||
@@ -1952,7 +1974,7 @@ get_cols() {
|
|||||||
# IMAGES
|
# IMAGES
|
||||||
|
|
||||||
image_backend() {
|
image_backend() {
|
||||||
if [[ ! "$image_backend" =~ (off|ascii) ]]; then
|
if [[ ! "$image_backend" =~ ^(off|ascii)$ ]]; then
|
||||||
if ! type -p convert >/dev/null 2>&1; then
|
if ! type -p convert >/dev/null 2>&1; then
|
||||||
image_backend="ascii"
|
image_backend="ascii"
|
||||||
err "Image: Imagemagick not found, falling back to ascii mode."
|
err "Image: Imagemagick not found, falling back to ascii mode."
|
||||||
@@ -1977,7 +1999,6 @@ image_backend() {
|
|||||||
clear
|
clear
|
||||||
zws=" "
|
zws=" "
|
||||||
else
|
else
|
||||||
unset image_program
|
|
||||||
to_ascii "Image: Failed to find terminal window size."
|
to_ascii "Image: Failed to find terminal window size."
|
||||||
err "Image: Check the 'Images in the terminal' wiki page for more info,"
|
err "Image: Check the 'Images in the terminal' wiki page for more info,"
|
||||||
return
|
return
|
||||||
@@ -2001,11 +2022,18 @@ image_backend() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get_ascii() {
|
get_ascii() {
|
||||||
if [[ ! -f "$image_source" || "$image_source" =~ (auto|ascii) ]]; then
|
if [[ ! -f "$image_source" ||
|
||||||
|
"$image_source" =~ ^(auto|ascii)$ ||
|
||||||
|
"$image_source" =~ \.(png|jpg|jpe|jpeg|gif)$ ]]; then
|
||||||
|
|
||||||
# Fallback to distro ascii mode if custom ascii isn't found.
|
# Fallback to distro ascii mode if custom ascii isn't found.
|
||||||
[[ ! "$image_source" =~ (auto|ascii) ]] && \
|
[[ ! "$image_source" =~ ^(auto|ascii)$ ]] && \
|
||||||
err "Ascii: Ascii file not found, using distro ascii."
|
err "Ascii: Ascii file not found, using distro ascii."
|
||||||
|
|
||||||
|
# Fallback to distro ascii mode if source is an image.
|
||||||
|
[[ "$image_source" =~ \.(png|jpg|jpe|jpeg|gif)$ ]] && \
|
||||||
|
err "Image: Source is image file but ascii backend was selected. Using distro ascii."
|
||||||
|
|
||||||
if [[ -d "/usr/share/neofetch/ascii/distro" ]]; then
|
if [[ -d "/usr/share/neofetch/ascii/distro" ]]; then
|
||||||
ascii_dir="/usr/share/neofetch/ascii/distro"
|
ascii_dir="/usr/share/neofetch/ascii/distro"
|
||||||
|
|
||||||
@@ -2015,6 +2043,9 @@ get_ascii() {
|
|||||||
elif [[ -d "/data/data/com.termux/files/usr/share/neofetch/ascii/distro" ]]; then
|
elif [[ -d "/data/data/com.termux/files/usr/share/neofetch/ascii/distro" ]]; then
|
||||||
ascii_dir="/data/data/com.termux/files/usr/share/neofetch/ascii/distro"
|
ascii_dir="/data/data/com.termux/files/usr/share/neofetch/ascii/distro"
|
||||||
|
|
||||||
|
elif [[ -d "/boot/home/config/non-packaged/share/neofetch/ascii/distro" ]]; then
|
||||||
|
ascii_dir="/boot/home/config/non-packaged/share/neofetch/ascii/distro"
|
||||||
|
|
||||||
else
|
else
|
||||||
[[ -z "$script_dir" ]] && script_dir="$(get_full_path "$0")"
|
[[ -z "$script_dir" ]] && script_dir="$(get_full_path "$0")"
|
||||||
ascii_dir="${script_dir%/*}/ascii/distro"
|
ascii_dir="${script_dir%/*}/ascii/distro"
|
||||||
@@ -2059,7 +2090,7 @@ get_ascii() {
|
|||||||
|
|
||||||
get_image_source() {
|
get_image_source() {
|
||||||
case "$image_source" in
|
case "$image_source" in
|
||||||
"auto" | "wallpaper")
|
"auto" | "wall" | "wallpaper")
|
||||||
get_wallpaper 2>/dev/null
|
get_wallpaper 2>/dev/null
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@@ -2079,7 +2110,7 @@ get_image_source() {
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
err "Image: Using image $image"
|
err "Image: Using image '$image'"
|
||||||
}
|
}
|
||||||
|
|
||||||
get_wallpaper() {
|
get_wallpaper() {
|
||||||
@@ -2178,7 +2209,7 @@ get_term_size() {
|
|||||||
printf "%b" "\033Ptmux;\033\033[14t\033\033[c\033\\"
|
printf "%b" "\033Ptmux;\033\033[14t\033\033[c\033\\"
|
||||||
read_flags=(-d c)
|
read_flags=(-d c)
|
||||||
|
|
||||||
elif [[ "$image_program" == "tycat" ]]; then
|
elif [[ "$image_backend" == "tycat" ]]; then
|
||||||
printf "%b" "\033}qs\000"
|
printf "%b" "\033}qs\000"
|
||||||
|
|
||||||
else
|
else
|
||||||
@@ -2192,7 +2223,7 @@ get_term_size() {
|
|||||||
IFS=";" read -s -t 1 "${read_flags[@]}" -r -a term_size
|
IFS=";" read -s -t 1 "${read_flags[@]}" -r -a term_size
|
||||||
|
|
||||||
# Split the string into height/width.
|
# Split the string into height/width.
|
||||||
if [[ "$image_program" == "tycat" ]]; then
|
if [[ "$image_backend" == "tycat" ]]; then
|
||||||
term_width="$((term_size[2] * term_size[0]))"
|
term_width="$((term_size[2] * term_size[0]))"
|
||||||
term_height="$((term_size[3] * term_size[1]))"
|
term_height="$((term_size[3] * term_size[1]))"
|
||||||
|
|
||||||
@@ -2202,7 +2233,7 @@ get_term_size() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Get terminal width/height if \033[14t is unsupported.
|
# Get terminal width/height if \033[14t is unsupported.
|
||||||
if [[ -z "$term_width" && "$image_program" == "w3m" ]]; then
|
if [[ -z "$term_width" && "$image_backend" == "w3m" ]]; then
|
||||||
if type -p xdotool >/dev/null 2>&1; then
|
if type -p xdotool >/dev/null 2>&1; then
|
||||||
current_window="$(xdotool getactivewindow)"
|
current_window="$(xdotool getactivewindow)"
|
||||||
source <(xdotool getwindowgeometry --shell "$current_window")
|
source <(xdotool getwindowgeometry --shell "$current_window")
|
||||||
@@ -2369,6 +2400,7 @@ display_image() {
|
|||||||
|
|
||||||
"iterm2")
|
"iterm2")
|
||||||
printf "%b\a\n" "\033]1337;File=width=${width}px;height=${height}px;inline=1:$(base64 < "$image")"
|
printf "%b\a\n" "\033]1337;File=width=${width}px;height=${height}px;inline=1:$(base64 < "$image")"
|
||||||
|
zws=
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"tycat")
|
"tycat")
|
||||||
@@ -2428,7 +2460,16 @@ scrot_upload() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
image_file="${scrot_dir}${scrot_name}"
|
image_file="${scrot_dir}${scrot_name}"
|
||||||
printf "%s\n" "Uploading image..."
|
|
||||||
|
# Print a message letting the user know we're uploading
|
||||||
|
# the screenshot.
|
||||||
|
printf "%s\r" "Uploading scrot"
|
||||||
|
sleep .2
|
||||||
|
printf "%s\r" "Uploading scrot."
|
||||||
|
sleep .2
|
||||||
|
printf "%s\r" "Uploading scrot.."
|
||||||
|
sleep .2
|
||||||
|
printf "%s\r" "Uploading scrot..."
|
||||||
|
|
||||||
case "$image_host" in
|
case "$image_host" in
|
||||||
"teknik")
|
"teknik")
|
||||||
@@ -2492,6 +2533,16 @@ scrot_program() {
|
|||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Print a message letting the user know we're taking
|
||||||
|
# a screenshot.
|
||||||
|
printf "%s\r" "Taking scrot"
|
||||||
|
sleep .2
|
||||||
|
printf "%s\r" "Taking scrot."
|
||||||
|
sleep .2
|
||||||
|
printf "%s\r" "Taking scrot.."
|
||||||
|
sleep .2
|
||||||
|
printf "%s\r" "Taking scrot..."
|
||||||
|
|
||||||
# Take the scrot.
|
# Take the scrot.
|
||||||
"${scrot_program[@]}" "$1"
|
"${scrot_program[@]}" "$1"
|
||||||
|
|
||||||
@@ -2502,7 +2553,7 @@ scrot_program() {
|
|||||||
|
|
||||||
info() {
|
info() {
|
||||||
# Save subtitle value.
|
# Save subtitle value.
|
||||||
subtitle="$1"
|
[[ "$2" ]] && subtitle="$1"
|
||||||
|
|
||||||
# Make sure that $prin is unset.
|
# Make sure that $prin is unset.
|
||||||
unset -v prin
|
unset -v prin
|
||||||
@@ -2517,25 +2568,35 @@ info() {
|
|||||||
output="$(trim "${!2:-${!1}}")"
|
output="$(trim "${!2:-${!1}}")"
|
||||||
|
|
||||||
if [[ "$2" && "${output// }" ]]; then
|
if [[ "$2" && "${output// }" ]]; then
|
||||||
length="$((${#1} + ${#output} + 2))"
|
|
||||||
prin "$1" "$output"
|
prin "$1" "$output"
|
||||||
|
|
||||||
elif [[ "${output// }" ]]; then
|
elif [[ "${output// }" ]]; then
|
||||||
[[ -z "$length" ]] && length="${#output}"
|
|
||||||
prin "$output"
|
prin "$output"
|
||||||
|
|
||||||
else
|
else
|
||||||
err "Info: Couldn't detect ${1}."
|
err "Info: Couldn't detect ${1}."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
unset -v subtitle
|
||||||
}
|
}
|
||||||
|
|
||||||
prin() {
|
prin() {
|
||||||
# If $2 doesn't exist we format $1 as info.
|
# If $2 doesn't exist we format $1 as info.
|
||||||
[[ -z "$2" ]] && local subtitle_color="$info_color"
|
if [[ "$(trim "$1")" && "$2" ]]; then
|
||||||
|
string="${1}${2:+: $2}"
|
||||||
|
else
|
||||||
|
string="${2:-$1}"
|
||||||
|
local subtitle_color="$info_color"
|
||||||
|
fi
|
||||||
|
string="$(trim "${string//$'\033[0m'}")"
|
||||||
|
|
||||||
|
# Log length if it doesn't exist.
|
||||||
|
if [[ -z "$length" ]]; then
|
||||||
|
length="$(strip_sequences "$string")"
|
||||||
|
length="${#length}"
|
||||||
|
fi
|
||||||
|
|
||||||
# Format the output.
|
# Format the output.
|
||||||
string="${1//$'\033[0m'}${2:+: $2}"
|
|
||||||
string="$(trim "$string")"
|
|
||||||
string="${string/:/${reset}${colon_color}:${info_color}}"
|
string="${string/:/${reset}${colon_color}:${info_color}}"
|
||||||
string="${subtitle_color}${bold}${string}"
|
string="${subtitle_color}${bold}${string}"
|
||||||
|
|
||||||
@@ -2552,9 +2613,10 @@ prin() {
|
|||||||
get_underline() {
|
get_underline() {
|
||||||
if [[ "$underline_enabled" == "on" ]]; then
|
if [[ "$underline_enabled" == "on" ]]; then
|
||||||
printf -v underline "%${length}s"
|
printf -v underline "%${length}s"
|
||||||
underline="${underline_color}${underline// /$underline_char}"
|
printf "%b\n" "${text_padding:+\033[${text_padding}C}${zws}${underline_color}${underline// /$underline_char}${reset} "
|
||||||
unset -v length
|
unset -v length
|
||||||
fi
|
fi
|
||||||
|
prin=1
|
||||||
}
|
}
|
||||||
|
|
||||||
get_line_break() {
|
get_line_break() {
|
||||||
@@ -2603,6 +2665,15 @@ trim_quotes() {
|
|||||||
printf "%s" "$trim_output"
|
printf "%s" "$trim_output"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
strip_sequences() {
|
||||||
|
strip="${1//$'\033['3[0-9]m}"
|
||||||
|
strip="${strip//$'\033['38\;5\;[0-9]m}"
|
||||||
|
strip="${strip//$'\033['38\;5\;[0-9][0-9]m}"
|
||||||
|
strip="${strip//$'\033['38\;5\;[0-9][0-9][0-9]m}"
|
||||||
|
|
||||||
|
printf "%s\n" "$strip"
|
||||||
|
}
|
||||||
|
|
||||||
uppercase() {
|
uppercase() {
|
||||||
((bash_version >= 4)) && printf "%s" "${1^}"
|
((bash_version >= 4)) && printf "%s" "${1^}"
|
||||||
}
|
}
|
||||||
@@ -2666,8 +2737,13 @@ get_distro_colors() {
|
|||||||
ascii_file="arch_old"
|
ascii_file="arch_old"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
"ArchBox"*)
|
||||||
|
set_colors 2 7 1
|
||||||
|
ascii_file="archbox"
|
||||||
|
;;
|
||||||
|
|
||||||
"Arch"*)
|
"Arch"*)
|
||||||
set_colors 4 7 1
|
set_colors 4 4 7 1
|
||||||
ascii_file="arch"
|
ascii_file="arch"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@@ -3131,7 +3207,7 @@ get_distro_colors() {
|
|||||||
ascii_file="void"
|
ascii_file="void"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"Windows 8"* | "Windows 10"*)
|
*"[Windows 10]"* | *"on Windows 10"* | "Windows 8"* | "Windows 10"*)
|
||||||
set_colors 6 7
|
set_colors 6 7
|
||||||
ascii_file="windows10"
|
ascii_file="windows10"
|
||||||
;;
|
;;
|
||||||
@@ -3285,13 +3361,18 @@ get_default_config() {
|
|||||||
if [[ -f "/etc/neofetch/config" ]]; then
|
if [[ -f "/etc/neofetch/config" ]]; then
|
||||||
default_config="/etc/neofetch/config"
|
default_config="/etc/neofetch/config"
|
||||||
|
|
||||||
elif [[ -f "/data/data/com.termux/files/etc/neofetch/config" ]]; then
|
elif [[ -f "/usr/local/etc/neofetch/config" ]]; then
|
||||||
default_config="/data/data/com.termux/files/etc/neofetch/config"
|
default_config="/usr/local/etc/neofetch/config"
|
||||||
|
|
||||||
|
elif [[ -f "/data/data/com.termux/files/usr/etc/neofetch/config" ]]; then
|
||||||
|
default_config="/data/data/com.termux/files/usr/etc/neofetch/config"
|
||||||
|
|
||||||
|
elif [[ -f "/boot/home/config/non-packaged/etc/neofetch/config" ]]; then
|
||||||
|
default_config="/boot/home/config/non-packaged/etc/neofetch/config"
|
||||||
|
|
||||||
else
|
else
|
||||||
[[ -z "$script_dir" ]] && script_dir="$(get_full_path "$0")"
|
[[ -z "$script_dir" ]] && script_dir="$(get_full_path "$0")"
|
||||||
default_config="${script_dir%/*}/config/config"
|
default_config="${script_dir%/*}/config/config"
|
||||||
travis_config="${script_dir%/*}/config/travis"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if source "$default_config"; then
|
if source "$default_config"; then
|
||||||
@@ -3308,12 +3389,6 @@ get_user_config() {
|
|||||||
err "Config: Sourced user config. (${config_file})"
|
err "Config: Sourced user config. (${config_file})"
|
||||||
old_options
|
old_options
|
||||||
return
|
return
|
||||||
|
|
||||||
elif [[ "$config_file" == "travis" ]]; then
|
|
||||||
source "$travis_config"
|
|
||||||
err "Config: Sourced user config. (${travis_config})"
|
|
||||||
old_options
|
|
||||||
return
|
|
||||||
fi
|
fi
|
||||||
mkdir -p "${XDG_CONFIG_HOME}/neofetch/"
|
mkdir -p "${XDG_CONFIG_HOME}/neofetch/"
|
||||||
|
|
||||||
@@ -3322,11 +3397,11 @@ get_user_config() {
|
|||||||
if [[ -f "${XDG_CONFIG_HOME}/neofetch/config" ]]; then
|
if [[ -f "${XDG_CONFIG_HOME}/neofetch/config" ]]; then
|
||||||
config_file="${XDG_CONFIG_HOME}/neofetch/config"
|
config_file="${XDG_CONFIG_HOME}/neofetch/config"
|
||||||
|
|
||||||
elif [[ -f "/usr/share/neofetch/config" ]]; then
|
elif [[ -f "/etc/neofetch/config" ]]; then
|
||||||
cp "/usr/share/neofetch/config" "${XDG_CONFIG_HOME}/neofetch"
|
cp "/usr/share/neofetch/config" "${XDG_CONFIG_HOME}/neofetch"
|
||||||
config_file="${XDG_CONFIG_HOME}/neofetch/config"
|
config_file="${XDG_CONFIG_HOME}/neofetch/config"
|
||||||
|
|
||||||
elif [[ -f "/usr/local/share/neofetch/config" ]]; then
|
elif [[ -f "/usr/local/etc/neofetch/config" ]]; then
|
||||||
cp "/usr/local/share/neofetch/config" "${XDG_CONFIG_HOME}/neofetch"
|
cp "/usr/local/share/neofetch/config" "${XDG_CONFIG_HOME}/neofetch"
|
||||||
config_file="${XDG_CONFIG_HOME}/neofetch/config"
|
config_file="${XDG_CONFIG_HOME}/neofetch/config"
|
||||||
|
|
||||||
@@ -3477,10 +3552,10 @@ old_options() {
|
|||||||
|
|
||||||
# All progress_ variables were changed to bar_.
|
# All progress_ variables were changed to bar_.
|
||||||
[[ -n "$progress_char" ]] && err "Config: \$progress_char is deprecated, use \$bar_char_elapsed and \$bar_char_total instead."
|
[[ -n "$progress_char" ]] && err "Config: \$progress_char is deprecated, use \$bar_char_elapsed and \$bar_char_total instead."
|
||||||
[[ -n "$progress_border" ]] && err "Config: \$progress_border is deprecated, use \$bar_border instead."
|
[[ -n "$progress_border" ]] && { err "Config: \$progress_border is deprecated, use \$bar_border instead."; bar_border="$progress_border"; }
|
||||||
[[ -n "$progress_length" ]] && err "Config: \$progress_length is deprecated, use \$bar_length instead."
|
[[ -n "$progress_length" ]] && { err "Config: \$progress_length is deprecated, use \$bar_length instead."; bar_length="$progress_length"; }
|
||||||
[[ -n "$progress_color_elapsed" ]] && err "Config: \$progress_color_elapsed is deprecated, use \$bar_color_elapsed instead."
|
[[ -n "$progress_color_elapsed" ]] && { err "Config: \$progress_color_elapsed is deprecated, use \$bar_color_elapsed instead."; bar_color_elapsed="$progress_color_elapsed"; }
|
||||||
[[ -n "$progress_color_total" ]] && err "Config: \$progress_color_total is deprecated, use \$bar_color_total instead."
|
[[ -n "$progress_color_total" ]] && { err "Config: \$progress_color_total is deprecated, use \$bar_color_total instead."; bar_color_total="$progress_color_total"; }
|
||||||
|
|
||||||
# All cpufreq values were changed in 3.0.
|
# All cpufreq values were changed in 3.0.
|
||||||
[[ "$speed_type" == "current" ]] && err "Config: speed_type='current' is deprecated, use speed_type='scaling_cur_freq' instead."
|
[[ "$speed_type" == "current" ]] && err "Config: speed_type='current' is deprecated, use speed_type='scaling_cur_freq' instead."
|
||||||
@@ -3496,6 +3571,9 @@ old_options() {
|
|||||||
|
|
||||||
# Fahrenheit support was added to CPU so the options were changed.
|
# Fahrenheit support was added to CPU so the options were changed.
|
||||||
[[ "$cpu_temp" == "on" ]] && { err "Config: cpu_temp='on' is deprecated, use cpu_temp='C' or 'F' instead."; cpu_temp="C"; }
|
[[ "$cpu_temp" == "on" ]] && { err "Config: cpu_temp='on' is deprecated, use cpu_temp='C' or 'F' instead."; cpu_temp="C"; }
|
||||||
|
|
||||||
|
# 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"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
cache_uname() {
|
cache_uname() {
|
||||||
@@ -3811,7 +3889,7 @@ exit 1
|
|||||||
}
|
}
|
||||||
|
|
||||||
version() { printf "%s" "\
|
version() { printf "%s" "\
|
||||||
Neofetch 3.0
|
Neofetch $version
|
||||||
|
|
||||||
Copyright (c) 2016-2017 Dylan Araps
|
Copyright (c) 2016-2017 Dylan Araps
|
||||||
|
|
||||||
@@ -4045,7 +4123,7 @@ main() {
|
|||||||
|
|
||||||
# w3m-img: Draw the image a second time to fix
|
# w3m-img: Draw the image a second time to fix
|
||||||
# rendering issues in specific terminal emulators.
|
# rendering issues in specific terminal emulators.
|
||||||
[[ "$image_program" == *w3m* ]] && display_image 2>/dev/null
|
[[ "$image_backend" == *w3m* ]] && display_image 2>/dev/null
|
||||||
|
|
||||||
# Take a screenshot.
|
# Take a screenshot.
|
||||||
[[ "$scrot" == "on" ]] && take_scrot
|
[[ "$scrot" == "on" ]] && take_scrot
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3.
|
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3.
|
||||||
.TH NEOFETCH "1" "January 2017" "Neofetch 3.0" "User Commands"
|
.TH NEOFETCH "1" "January 2017" "Neofetch 3.0.1" "User Commands"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
Neofetch \- A fast, highly customizable system info script
|
Neofetch \- A fast, highly customizable system info script
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
Reference in New Issue
Block a user