Compare commits

...

150 Commits

Author SHA1 Message Date
Dylan Araps
8572cf9a08 W3m: Fix zws 2017-05-07 09:55:24 +10:00
Dylan Araps
abaf8808fe Docs: CHANGELOG 2017-05-04 08:51:49 +10:00
Dylan Araps
7646a76d02 Ascii: Add ubuntu-mate ascii, closes #712 2017-05-04 08:51:06 +10:00
Dylan Araps
4718dedd31 Update CHANGELOG.md 2017-05-03 20:27:27 +10:00
Dylan Araps
993d95d6bd Merge pull request #710 from mstraube/mateterm
Term: Add font support for mate-terminal
2017-05-03 20:26:33 +10:00
Michael Straube
3242425c4f Term: Add font support for mate-terminal 2017-05-03 11:02:27 +02:00
Herdiansyah
55420c3c30 Merge pull request #711 from konimex/fallback
Misc: Use fallback values for some functions
2017-05-02 16:47:16 +07:00
Muhammad Herdiansyah
def8123c46 Misc: Use fallback values for some functions 2017-05-01 15:05:40 +07:00
Dylan Araps
fe3da7e0b8 Update CHANGELOG.md 2017-04-28 22:05:16 +10:00
Dylan Araps
28f5630b05 Merge pull request #709 from ARCHLabs/master
Ascii logo - tip of archlabs is not in the middle
2017-04-28 22:04:13 +10:00
Erik Dubois
38b705dd59 tip of archlabs is not in the middle
added a few spaces to have the tip "sy" in the middle of the logo
2017-04-28 13:32:53 +02:00
dylan araps
3025c2a8c4 General: Bash version docs 2017-04-28 11:24:30 +10:00
Dylan Araps
efd48587c3 GPU: Revert unique filter 2017-04-27 09:09:36 +10:00
Dylan Araps
c48f201a9d Docs: CHANGELOG 2017-04-27 09:07:32 +10:00
Dylan Araps
901d5319bc Merge pull request #705 from dawidd6/master
Do not detect ibus* or indicator* as player
2017-04-27 09:07:58 +10:00
dawidd6
874a29e0c3 do not detect ibus* or indicator* as player 2017-04-26 21:06:47 +02:00
dylan araps
05503e3914 GPU: Fix unique cpu filter 2017-04-26 12:32:41 +10:00
dylan araps
c8b7ed6d1b Merge branch 'master' of https://github.com/dylanaraps/neofetch 2017-04-26 11:48:54 +10:00
dylan araps
b0cd5f07ec General: Bump version numbers 2017-04-26 11:48:22 +10:00
Dylan Araps
781a0fff9b Docs: CHANGELOG 2017-04-26 08:13:31 +10:00
Dylan Araps
74e8facfe2 GPU: Correctly filter out duplicate GPU names. 2017-04-26 08:12:35 +10:00
Dylan Araps
04cf863f78 Docs: Changelog 2017-04-26 07:42:01 +10:00
Dylan Araps
a1d87ea105 Image: Added --loop flag. 2017-04-26 07:39:10 +10:00
Dylan Araps
eeaae2d554 Docs: CHANGELOG 2017-04-26 07:29:05 +10:00
Dylan Araps
0b3fe3301f Merge pull request #703 from MatthewCox/patch-1
Fix termite font matching
2017-04-26 07:29:43 +10:00
Matthew Cox
1948f0e4ff Fix termite font matching
Each config parameter is allowed arbitrary whitespace before it.
It took me a long time to work out why it was always returning the /etc/xdg/termite/config value!
2017-04-25 19:36:49 +01:00
dylan araps
72e4e35b28 Docs: Clear changelog 2017-04-25 13:06:47 +10:00
dylan araps
e506315bac Version: Bump version to 3.1.0 2017-04-25 13:01:27 +10:00
dylan araps
9c48d2548a Ascii: Update raspbian 2017-04-25 12:55:09 +10:00
dylan araps
23f0e9d200 Docs: Changelog 2017-04-25 12:52:53 +10:00
dylan araps
eda671d732 Ascii: New raspbian ascii art 2017-04-25 12:52:16 +10:00
dylan araps
f24432a63a Docs: Changelog 2017-04-25 12:46:29 +10:00
dylan araps
36203d1919 Ascii: Fix ascii art 2017-04-25 12:44:41 +10:00
Dylan Araps
e021d30d1e Merge pull request #699 from obrevenge/master
added obrevenge and archlabs ascii art for compatiblity for both new distros
2017-04-25 12:38:02 +10:00
dylan araps
832c7bbd81 Docs: Changelog 2017-04-25 12:40:45 +10:00
Dylan Araps
e4e4594aef Merge pull request #701 from LER0ever/master
OS: add Chrome OS crouton support
2017-04-25 12:34:40 +10:00
LER0ever
6b926485f1 OS: add Chrome OS crouton support 2017-04-24 13:49:34 -05:00
obrevenge
87927bc81b removed whitespace, added ${c1} to archlabs, added both to get_distro_colors() 2017-04-15 22:00:20 -05:00
obrevenge
11c8c289a8 added obrevenge and archlabs ascii 2017-04-15 11:52:22 -05:00
Dylan Araps
f5e55acc67 Update CHANGELOG.md 2017-04-12 10:39:27 +10:00
Dylan Araps
17d334e44f Merge pull request #697 from mstraube/music
Song: Add support for Deepin Music and Tomahawk
2017-04-12 10:38:33 +10:00
Michael Straube
83a0781a3f General: Align some lines 2017-04-12 00:16:50 +02:00
Michael Straube
b8bcd13346 Song: Add support for Tomahawk 2017-04-11 21:31:46 +02:00
Michael Straube
d55ff4ee94 Song: Add support for Deepin Music 2017-04-11 21:21:52 +02:00
Dylan Araps
a76d3285b2 DOCS: CHANGELOG 2017-04-11 08:54:06 +10:00
Dylan Araps
d23a071fc0 Merge pull request #695 from HebaruSan/master
Fix --ascii_distro ubuntu-studio
2017-04-11 08:53:29 +10:00
Paul Hebble
2094c134ce Fix --ascii_distro ubuntu-studio
The ascii/distro directory has an ubuntu-studio file, which is
documented in the --help text, but when I try to use that option, it
falls back to the default Ubuntu logo.

This change adds a case for Ubuntu-Studio to set ascii_file and the
colors based on the logo at https://ubuntustudio.org.
2017-04-10 17:05:38 -05:00
Dylan Araps
ea580434aa Update CHANGELOG.md 2017-04-10 21:37:09 +10:00
Dylan Araps
28adc60e57 Merge pull request #693 from mstraube/battery
Add battery support for Bay Trail devices
2017-04-10 21:36:24 +10:00
Michael Straube
d8e1150e19 Battery: Add support for Bay Trail devices (axp288_fuel_gauge) 2017-04-10 13:27:34 +02:00
Dylan Araps
9902609679 General: README 2017-04-10 10:01:38 +10:00
Dylan Araps
5cca832de5 Ascii: Update DesaOS logo 2017-04-10 09:18:24 +10:00
Dylan Araps
15451a5283 Update CHANGELOG.md 2017-04-06 09:34:56 +10:00
Dylan Araps
0180485851 Merge pull request #682 from dylanaraps/get_locale
Info: Added function to display locale.
2017-04-06 09:33:55 +10:00
Dylan Araps
8deb31b3d6 General: Add warning about glibc to get_locale 2017-04-06 09:28:11 +10:00
Dylan Araps
6a3845486b Update README.md 2017-04-06 07:57:15 +10:00
Dylan Araps
0573560cca Update README.md 2017-04-06 07:56:51 +10:00
Herdiansyah
65fb501c1f Merge pull request #692 from konimex/mingw
OS: Added support for MinGW
2017-04-05 23:22:33 +07:00
Muhammad Herdiansyah
0e50e7d3ba Docs: Changelog 2017-04-05 23:21:53 +07:00
Muhammad Herdiansyah
0efc00419e OS: Added support for MinGW 2017-04-05 15:08:09 +07:00
Dylan Araps
ea55959468 docs: CHANGELOG 2017-04-04 08:54:15 +10:00
Dylan Araps
cedc3846d1 Merge pull request #688 from dylanaraps/disk_dir
Disk: Add new option to only show dir name in subtitle.
2017-04-04 08:54:11 +10:00
Dylan Araps
efa8110d31 docs: Changelog 2017-04-04 08:52:11 +10:00
Dylan Araps
1216c9d5ad Merge pull request #681 from dylanaraps/scrot_fix
Scrot: Make scrot easier to use.
2017-04-04 08:51:06 +10:00
Dylan Araps
d23dcbe3bc Docs: Changelog 2017-04-04 08:47:58 +10:00
Dylan Araps
e6044b3c41 Distro: Add support for DesaOS 2017-04-04 08:47:26 +10:00
Dylan Araps
d742d9aa9c Disk: Add new option to only show dir name in subtitle 2017-04-02 06:58:48 +10:00
Dylan Araps
e562e73387 DOCS: CHANGELOG 2017-03-28 08:50:23 +11:00
Dylan Araps
f8f26453ae Ascii: [Arch] Use brighter colors 2017-03-28 08:49:46 +11:00
Dylan Araps
b37916e42a DOCS: Changelog 2017-03-27 09:51:34 +11:00
Dylan Araps
631ae8d2b4 GPU: [Linux] Hide duplicate lines 2017-03-27 09:50:52 +11:00
Dylan Araps
a6573119f9 Info: Added function to display locale 2017-03-27 08:51:56 +11:00
Dylan Araps
1e6804f54a Scrot: Log where the file was saved and fix bug with empty filename 2017-03-27 08:45:12 +11:00
Dylan Araps
4659863737 Scrot: Unset scrot_dir if the user has set it 2017-03-27 08:33:13 +11:00
Dylan Araps
d34f01f21b Scrot: Make scrot easier to use 2017-03-27 08:29:04 +11:00
Dylan Araps
464a810f94 Docs: Changelog 2017-03-23 08:05:29 +11:00
Dylan Araps
1e9c22af9f Merge branch 'master' of github.com:dylanaraps/neofetch 2017-03-23 08:03:56 +11:00
Dylan Araps
a575c01b5c iTerm2: Fix image mode in tmux, closes #678 2017-03-23 08:03:43 +11:00
Dylan Araps
e1f2dcac93 Update CHANGELOG.md 2017-03-23 00:00:48 +11:00
Dylan Araps
012e2cbcb1 Update CHANGELOG.md 2017-03-23 00:00:40 +11:00
Dylan Araps
48e1cd5132 Merge pull request #677 from mstraube/nitrux
OS: Add support for Nitrux
2017-03-23 00:00:16 +11:00
Michael Straube
e92a03816e OS: Add support for Nitrux 2017-03-22 11:13:39 +01:00
Dylan Araps
7f732aef1e Update CHANGELOG.md 2017-03-22 15:18:36 +11:00
Dylan Araps
fc06ad86cf Merge pull request #674 from dylanaraps/speed_fix
CPU: Add option to show decimals in CPU speed.
2017-03-22 15:18:03 +11:00
Dylan Araps
adeb59173d Update CHANGELOG.md 2017-03-22 14:29:50 +11:00
Dylan Araps
bfcab94391 Update CHANGELOG.md 2017-03-22 14:29:20 +11:00
Dylan Araps
18143b4be2 Merge pull request #676 from jorgegonzalez/master
WM: Add support for Amethyst on macOS
2017-03-22 14:28:50 +11:00
Jorge Gonzalez
6803b571b7 Change if statement to a switch 2017-03-21 19:58:47 -04:00
Jorge Gonzalez
0c4d4eb23a Reduce macOS WM detections to one ps call 2017-03-21 18:37:41 -04:00
Jorge Gonzalez
1bd185874c WM: Add support for Amethyst on macOS 2017-03-21 13:45:23 -04:00
Dylan Araps
91a7bd4737 Update CHANGELOG.md 2017-03-15 21:27:16 +11:00
Dylan Araps
7cf891a63b Merge pull request #670 from dritter/add_iterm2_font_detection
Add iterm2 font detection
2017-03-15 21:25:55 +11:00
Muhammad Herdiansyah
fd3d2fc29b Docs: Changelog 2017-03-10 10:43:21 +07:00
Herdiansyah
f7614f5703 Merge pull request #675 from nilesr/master
SliTaz support added
2017-03-10 08:31:48 +07:00
Niles Rogoff
ce7ef19372 Correct style 2017-03-09 13:27:16 -08:00
Niles Rogoff
7bf8f17854 Slitaz support added 2017-03-09 10:55:06 -08:00
Dylan Araps
9b0c8fff2c Docs: Changelog 2017-03-09 12:07:58 +11:00
Dylan Araps
ac7cf27147 Resolution: Show decimals 2017-03-09 12:07:29 +11:00
Dylan Araps
30a6d8641b CPU: Added speed_shorthand to toggle showing decimals in the output 2017-03-09 12:03:17 +11:00
Dylan Araps
d8561cceed CPU: Show an additional digit in cpu speed 2017-03-09 11:47:52 +11:00
Dominik Ritter
8d250e41ba Fix newlines 2017-03-09 01:17:31 +01:00
Dominik Ritter
8c783d63a2 Add newlines 2017-03-09 01:13:31 +01:00
Dominik Ritter
53eafeb414 Fix code style 2017-03-08 23:19:03 +01:00
Muhammad Herdiansyah
1a6fe2099c Docs: Changelog 2017-03-05 09:53:02 +07:00
Muhammad Herdiansyah
93bfcf178a Merge branch 'fix-issue-662' of https://github.com/eliezio/neofetch 2017-03-05 09:44:12 +07:00
Eliezio Oliveira
707601bbf7 MacOS screenresolution: accepts output from stdout and stderr. Closes #662 2017-03-04 20:36:35 -03:00
Muhammad Herdiansyah
98061ca6c0 Docs: CHANGELOG 2017-03-03 14:46:48 +07:00
Muhammad Herdiansyah
0c03845100 Packages: Used better method for checking packages in eopkg (#669) 2017-03-03 14:43:10 +07:00
Dominik Ritter
569bef567f Fix code style 2017-03-03 00:32:04 +01:00
Dominik Ritter
24283be05d Mute error message, when PlistBuddy is not installed
PlistBuddy is part of XCode. It may be that users don't have it
installed.
2017-03-02 23:56:49 +01:00
Dylan Araps
e8bdd31b46 Update CHANGELOG.md 2017-03-02 12:42:06 +11:00
Dylan Araps
c9d14c2dbe Merge pull request #665 from jorgegonzalez/master
WM: Add support for Spectacle on macOS
2017-03-02 12:41:35 +11:00
Dominik Ritter
38641c690e Add warning about iTerm2s dynamic profiles 2017-03-02 02:30:53 +01:00
Dominik Ritter
d1e81f3344 Add reference to post on iTerm2 list
because of ambiguous active profile name
2017-03-02 02:28:23 +01:00
Dominik Ritter
3cf7c5ffa2 Only print non-ascii font if switch "use different font" is active 2017-03-02 02:17:36 +01:00
Dominik Ritter
e2d1cb27a5 Fix comparison 2017-03-02 01:56:29 +01:00
Dominik Ritter
eec7f08eee Add warning about possible profile name collisions 2017-03-02 01:50:17 +01:00
Dominik Ritter
4387233378 Add warning that false positives can occur 2017-03-02 01:46:22 +01:00
Dominik Ritter
e9c8e6c2a3 Add font detection for iTerm2 2017-03-02 01:45:46 +01:00
Jorge Gonzalez
072ad5cfff Fix ps line 2017-02-28 11:50:23 -05:00
Jorge Gonzalez
982f2b59ec WM: Add support for Spectacle on macOS 2017-02-28 11:36:57 -05:00
Muhammad Herdiansyah
1af650eaf1 Docs: CHANGELOG 2017-02-28 22:47:40 +07:00
Muhammad Herdiansyah
39986f2197 Local IP: Fixed UID showing instead of IP 2017-02-28 11:59:01 +07:00
Dylan Araps
716e50ecbf Bar: Fix incorrect coloring. Closes #661 2017-02-25 19:02:49 +11:00
Dylan Araps
51fa1b3c12 Bar: Semi-fix the color issues when barinfo is used 2017-02-24 10:18:37 +11:00
Dylan Araps
ceadf7d5fa WM: Fix indent 2017-02-23 14:24:30 +11:00
Dylan Araps
6c8d8f2cc6 Merge pull request #660 from jorgegonzalez/master
WM: Add support for Kwm on macOS
2017-02-23 14:18:51 +11:00
Jorge Gonzalez
9becea4feb WM: Add support for Kwm on macOS 2017-02-22 22:12:48 -05:00
Dylan Araps
153c26aa1f Merge pull request #659 from dylanaraps/revert-658-master
Revert "WM: Add support for Kwm on macOS"
2017-02-23 13:55:11 +11:00
Dylan Araps
110e95a194 Revert "WM: Add support for Kwm on macOS" 2017-02-23 13:54:52 +11:00
Dylan Araps
07ade10735 Docs: Changelog 2017-02-23 12:48:56 +11:00
Dylan Araps
0dea3ba495 Merge pull request #658 from jorgegonzalez/master
WM: Add support for Kwm on macOS
2017-02-23 12:47:37 +11:00
Jorge Gonzalez
8c3fef5396 Modify ps line 2017-02-22 17:19:52 -05:00
Jorge Gonzalez
c583d06780 WM: Add support for Kwm on macOS 2017-02-22 12:37:01 -05:00
Dylan Araps
953979937f Docs: Changelog 2017-02-19 10:44:42 +11:00
Dylan Araps
7afd5b2d22 Song: Fix audacious fallback 2017-02-19 10:42:45 +11:00
Dylan Araps
b952030011 Song: Use audtool before falling back to dbus 2017-02-17 10:23:12 +11:00
Dylan Araps
fefad4f98c Docs: CHANGELOG 2017-02-09 11:01:19 +11:00
Dylan Araps
199dadd537 Images: Fix bug with getting terminal size 2017-02-09 11:00:50 +11:00
Dylan Araps
0af39a6d30 Docs: CHANGELOG 2017-02-09 10:36:54 +11:00
Dylan Araps
ca54e76f52 Images: Added termpix backend 2017-02-09 10:36:21 +11:00
Dylan Araps
2b2a9c19dc Docs: CHANGELOG 2017-02-09 10:24:58 +11:00
Dylan Araps
69046ae124 Image: Added sixel backend 2017-02-09 10:23:21 +11:00
Dylan Araps
04d180c6f0 Update CHANGELOG.md 2017-02-06 08:13:04 +11:00
Dylan Araps
43132fc4e5 Merge pull request #656 from mstraube/parabola
Ascii: Parabola logo
2017-02-06 08:11:54 +11:00
Michael Straube
6ee9464101 Ascii: Parabola logo 2017-02-05 17:47:29 +01:00
Dylan Araps
bff259fdd0 General: Fix prompt height when color blocks are disabled in config 2017-01-31 23:32:10 +11:00
Dylan Araps
b4e5169aa9 General: Simplified prompt calculation, un-hardcoded line breaks. Closes #652 2017-01-31 07:45:52 +11:00
Dylan Araps
8fb4aec1ed General: Bump version to 3.0.2 2017-01-30 19:56:39 +11:00
Dylan Araps
e44a06aa2c Docs: Clear changelog 2017-01-30 19:56:01 +11:00
13 changed files with 535 additions and 277 deletions

View File

@@ -1,88 +1,41 @@
This minor release fixes all of the bugs that were found in the 3.0 release.
Thanks for all of the bug reports and contributions. :)
## Contributors ## Contributors
- **[@SomaUlte](https://github.com/SomaUlte)** - **[@MatthewCox](https://github.com/MatthewCox)**
- **[@jorgegonzalez](https://github.com/jorgegonzalez)**
- **[@dawidd6](https://github.com/dawidd6)** - **[@dawidd6](https://github.com/dawidd6)**
- **[@erikdubois](https://github.com/erikdubois)**
- **[@mstraube](https://github.com/mstraube)** - **[@mstraube](https://github.com/mstraube)**
- **[@YellowApple](https://github.com/YellowApple)**
- **[@siiptuo](https://github.com/siiptuo)**
- **[@Head-on-a-Stick](https://github.com/Head-on-a-Stick)**
- **[@konimex](https://github.com/konimex)**
## Operating System
- Added support for ArchBox Linux.
## General ## General
- Fixed output if subtitles are disabled and `prin` is used in an info function. - Minimum required BASH version is now 3.2.
- Fixed underlines not working when used with `prin`. - (Neofetch has always used 3.2+ features, I've just made it obvious now in the documentation.)
- Fixed HAIKU install path. **[@YellowApple](https://github.com/YellowApple)**
## Config
- Fixed default config not found.
- Don't set locale in config file.
## Info
**Memory**<br \>
- Changed memory label to `MiB` on OS that output memory in Mebibytes.
**Shell**<br \>
- Fixed a crash when the user has `bash 3` installed.
**Packages**<br \>
- Added support for Chromebrew.
**GPU**<br \>
- [Linux] Display detailed information about Intel GPUs. **[@SomaUlte](https://github.com/SomaUlte)**
**Color Blocks**<br \>
- Fixed issue with `color_blocks="off"` adding an extra newline to the output.
**Song**<br \>
- Don't print `$song` if it's empty and `song_shorthand` is on. **[@mstraube](https://github.com/mstraube)**
- Fixed `mpd` detection when `mpd` is on a different host. **[@dawidd6](https://github.com/dawidd6)**
- Use `get_song_dbus` for Audacious. **[@mstraube](https://github.com/mstraube)**
**Terminal Font**<br \>
- [Alacritty] Fixed font detection. **[@siiptuo](https://github.com/siiptuo)**
## Images ## Images
- [iTerm2] Fixed issue with line-breaks printing spaces over the image. **[@jorgegonzalez](https://github.com/jorgegonzalez)** - [w3m] Added `--loop` flag which makes Neofetch draw the image once per second.
- Fixed issue with images not working in Terminology. - This is a workaround to the images disappearing on resize and workspace switch.
- Fixed issue when `image_source` was set to `wall`. - Use Ctrl+C to exit.
- [w3m-img] Fixed issues with `w3m-img` and `tmux`.
## Ascii ## Ascii
- [Windows 10] Fixed `ascii_distro` not working. - Added Ubuntu-MATE ascii art.
- Fixed a bug where the backend is `ascii` but the image_source is an image file. - Fixed ArchLabs ascii art. **[@erikdubois](https://github.com/erikdubois)**
- Fixed custom ascii files not working.
- Removed extra backslashes from OpenBSD ascii art. **[@Head-on-a-Stick](https://github.com/Head-on-a-Stick)**
## Scrot ## Info
- Added message to let users know that a screenshot was taken. **Terminal Emulator**
- Added font support for mate-terminal. **[@mstraube](https://github.com/mstraube)**
- [Termite] Fix font mismatch. **[@MatthewCox](https://github.com/MatthewCox)**
**GPU**
- [Linux] Fixed GPU sort.
**Song**
- Do not detect ibus\* or indicator\* as player. **[@dawidd6](https://github.com/dawidd6)**

View File

@@ -6,11 +6,11 @@
[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE.md) [![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE.md)
[![Latest release](https://img.shields.io/github/release/dylanaraps/neofetch.svg)](https://github.com/dylanaraps/neofetch/releases) [![Latest release](https://img.shields.io/github/release/dylanaraps/neofetch.svg)](https://github.com/dylanaraps/neofetch/releases)
Neofetch is a CLI system information tool written in BASH. Neofetch displays information about your system next to an image, your OS logo, or any ascii file of your choice. The main purpose of Neofetch is to be used in screenshots to show other users what OS/Distro you're running, what Theme/Icons you're using and etc. Neofetch is a CLI system information tool written in BASH. Neofetch displays information about your system next to an image, your OS logo, or any ASCII file of your choice. The main purpose of Neofetch is to be used in screenshots to show other users what OS/Distro you're running, what Theme/Icons you're using etc.
Neofetch is highly customizable through the use of command line flags or the user config file. There are over 50 config options to mess around with and there's the `print_info()` function and friends which let you add your own custom info. Neofetch is highly customizable through the use of command line flags or the user config file. There are over 50 config options to mess around with and there's the `print_info()` function and friends which let you add your own custom info.
Neofetch can be used on any OS that has BASH, it's just a matter of adding support. If your OS/Distro isn't in the list below, feel free to open an issue on the repo and I'll gladly add support. Neofetch currently supports `Linux`, `MacOS`, `iOS`, `BSD`, `Solaris`, `Android`, `Haiku`, `GNU Hurd`, `MINIX`, `AIX`, and `Windows (Cygwin/MSYS2/Windows 10 Linux subsystem)`. Neofetch can be used on any OS that has BASH 3.2+, it's just a matter of adding support. If your OS/Distro isn't in the list below, feel free to open an issue on the repo and I'll gladly add support. Neofetch currently supports `Linux`, `MacOS`, `iOS`, `BSD`, `Solaris`, `Android`, `Haiku`, `GNU Hurd`, `MINIX`, `AIX`, and `Windows (Cygwin/MSYS2/MinGW/Windows 10 Linux subsystem)`.
For more information: For more information:
@@ -48,7 +48,7 @@ https://github.com/dylanaraps/neofetch/wiki/Customizing-Info
### Customizing the script using a custom alias ### Customizing the script using a custom alias
If you don't want to use the config file you can customize almost everything using launch flags! If you don't want to use the config file you can customize almost everything using launch flags.
Here's an example neofetch alias: Here's an example neofetch alias:
@@ -76,6 +76,6 @@ Thanks to:
- Thanks for using Neofetch! - Thanks for using Neofetch!
- [Screenfetch](https://github.com/KittyKatt/screenFetch): - [Screenfetch](https://github.com/KittyKatt/screenFetch):
- We've used some snippets as a base for a few functions in this script. - We've used some snippets as a base for a few functions in this script.
- Some of the ascii logos. - Some of the ASCII logos.
- [ufetch](https://github.com/jschx/ufetch): - [ufetch](https://github.com/jschx/ufetch):
- Tiny ascii logos - Tiny ASCII logos

18
ascii/distro/archlabs Normal file
View File

@@ -0,0 +1,18 @@
${c1} sy
h--d
d---:
:----/N
:------/N
N/----:---+
N/---+/ :--:o
N/--:/ ::::s
+--- ::::s
N+---+ ::::s
N+----o +:o s::::s
N/----:: s:::s h:::::s
N/----:::y::::+ o::::::o
N/---::::::::::s d::::::::+N
/--::::::::::::dd::::::::::+N
:-:::/+syhd NNN N dhys+/:::/
d::+ydN /s+/d
arc y\\.

16
ascii/distro/desaos Normal file
View File

@@ -0,0 +1,16 @@
${c1}███████████████████████
███████████████████████
███████████████████████
███████████████████████
████████ ███████
████████ ███████
████████ ███████
████████ ███████
████████ ███████
████████ ███████
████████ ███████
██████████████████████████████
██████████████████████████████
████████████████████████
████████████████████████
████████████████████████

18
ascii/distro/nitrux Normal file
View File

@@ -0,0 +1,18 @@
${c1}`:/.
`/yo
`/yo
`/yo .+:.
`/yo .sys+:.`
`/yo `-/sys+:.`
`/yo ./sss+:.`
`/yo .:oss+:-`
`/yo ./o///:-`
`/yo `.-:///////:`
`/yo `.://///++//-``
`/yo `.-:////++++/-`
`/yo `-://///++o+/-`
`/yo `-/+o+++ooo+/-`
`/s+:+oooossso/.`
`//+sssssso:.
`+syyyy+:`
:+s+-

18
ascii/distro/obrevenge Normal file
View File

@@ -0,0 +1,18 @@
${c1} __ __
_@@@@ @@@g_
_@@@@@@ @@@@@@
_@@@@@@M W@@@@@@_
j@@@@P ^W@@@@
@@@@L____ _____Q@@@@
Q@@@@@@@@@@j@@@@@@@@@@
@@@@@ T@j@ T@@@@@
@@@@@ ___Q@J@ _@@@@@
@@@@@fMMM@@j@jggg@@@@@@
@@@@@ j@j@^MW@P @@@@
Q@@@@@ggg@@f@ @@@@@@L
^@@@@WWMMP ^ Q@@@@
@@@@@_ _@@@@l
W@@@@@g_____g@@@@@P
@@@@@@@@@@@@@@@@l
^W@@@@@@@@@@@P
^TMMMMTll

View File

@@ -1,17 +1,16 @@
${c1} eeeeeeeee ${c1} `.-. `.
eeeeeeeeeeeeeee `.` `:++. `-+o+.
eeeeee${c2}//////////${c1}eeeee `` `:+/. `:+/. `-+oooo+
eeeee${c2}///////////////${c1}eeeee ``-::-.:+/. `:+/. `-+oooooo+
eeeee${c2}/// ////${c1}eeee `.-:///- ..` .-. `-+oooooooo-
eeee${c2}// ///${c1}eeeee `..-..` `+ooooooooo:
eee ${c2}///${c1}eeeee `` :oooooooo/
ee ${c2}//${c1}eeeeee `ooooooo:
e ${c2}/${c1}eeeeeee `oooooo:
eeeeeee -oooo+.
eeeeee +ooo/`
eeeeee -ooo-
eeeee `+o/.
eeee /+-
eee //`
ee -.
e

View File

@@ -1,18 +1,23 @@
${c1} .',;:cc;,'. .,;::c:,,. ${c1} `.::///+:/-. --///+//-:``
,ooolcloooo: 'oooooccloo: `+oooooooooooo: `+oooooooooooo:
.looooc;;:ol :oc;;:ooooo' /oooo++//ooooo: ooooo+//+ooooo.
;oooooo: ,ooooooc. `+ooooooo:-:oo- +o+::/ooooooo:
.,:;'. .;:;'. `:oooooooo+`` `.oooooooo+-
${c2}.... ..'''''. .... `:++ooo/. :+ooo+/.`
.''. ..'''''. ..''. ${c2}...` `.----.` ``..
.. ..... ..... .. .::::-``:::::::::.`-:::-`
. .''''''' .''''''. . -:::-` .:::::::-` `-:::-
.'' .'''''''' .'''''''. ''. `::. `.--.` `` `.---.``.::`
''' ''''''' .'''''' ''' .::::::::` -::::::::` `
.' ........... ... .'. .::` .:::::::::- `::::::::::``::.
.... ''''''''. .''. -:::` ::::::::::. ::::::::::.`:::-
'''''. ''''''''. .''''' :::: -::::::::. `-:::::::: ::::
'''''. .'''''. .'''''. -::- .-:::-.``....``.-::-. -::-
..''. . .''.. .. `` .::::::::. `..`..
.''''''' -:::-` -::::::::::` .:::::`
...... :::::::` -::::::::::` :::::::.
.::::::: -::::::::. ::::::::
`-:::::` ..--.` ::::::.
`...` `...--..` `...`
.::::::::::
`.-::::-`

17
ascii/distro/slitaz Normal file
View File

@@ -0,0 +1,17 @@
${c1} @ @( @
@@ @@ @ @/
@@ @@ @@ @@
@@ %@@ @@ @@
@@ %@@@ @@@@@. @@@@ @@
@@@ @@@@ @@@@@@@ &@@@ @@@
@@@@@@@ %@@@@@@@@@@@@ &@@@% @@@@@@@/
,@@@@@@@@@@@@@@@@@@@@@@@@@
.@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@/
@@@@@@. @@@@@@@@@@@@@@@@@@@@@ /@@@@@@
@@ @@@@@ @@@@@@@@@@@@, @@@@@ @@@
@@ @@@@. @@@@@@@@@@@@@% #@@@@ @@.
@@ ,@@ @@@@@@@@@@@@@ @@@ @@
@ @@. @@@@@@@@@@@@@ @@@ *@
@ @@ @@@@@@@@@@@@ @@ @
@ @@@@@@@@@. #@
@ ,@@@@@ @

20
ascii/distro/ubuntu-mate Normal file
View File

@@ -0,0 +1,20 @@
${c1} `:+shmNNMMNNmhs+:`
.odMMMMMMMMMMMMMMMMMMdo.
/dMMMMMMMMMMMMMMMmMMMMMMMMd/
:mMMMMMMMMMMMMNNNNM/`/yNMMMMMMm:
`yMMMMMMMMMms:..-::oM: -omMMMMMy`
`dMMMMMMMMy-.odNMMMMMM: -odMMMMMMd`
hMMMMMMMm-.hMMy/....+M:`/yNm+mMMMMMMMh
/MMMMNmMN-:NMy`-yNMMMMMmNyyMN:`dMMMMMMM/
hMMMMm -odMMh`sMMMMMMMMMMs sMN..MMMMMMMh
NMMMMm `/yNMMMMMMMMMMMM: MM+ mMMMMMMN
NMMMMm `/yNMMMMMMMMMMMM: MM+ mMMMMMMN
hMMMMm -odMMh sMMMMMMMMMMs oMN..MMMMMMMh
/MMMMNNMN-:NMy`-yNMMMMMNNsyMN:`dMMMMMMM/
hMMMMMMMm-.hMMy/....+M:.+hNd+mMMMMMMMh
`dMMMMMMMMy-.odNMMMMMM: :smMMMMMMd`
yMMMMMMMMMms/..-::oM: .+dMMMMMy
:mMMMMMMMMMMMMNNNNM: :smMMMMMMm:
/dMMMMMMMMMMMMMMMdNMMMMMMMd/
.odMMMMMMMMMMMMMMMMMMdo.
`:+shmNNMMNNmhs+:`

View File

@@ -37,6 +37,7 @@ print_info() {
# info "Public IP" public_ip # info "Public IP" public_ip
# info "Users" users # info "Users" users
# info "Install Date" install_date # info "Install Date" install_date
# info "Locale" locale # This only works on glibc systems.
info line_break info line_break
info cols info cols
@@ -138,6 +139,17 @@ shell_version="on"
# NOTE: Any file in '/sys/devices/system/cpu/cpu0/cpufreq' can be used as a value. # NOTE: Any file in '/sys/devices/system/cpu/cpu0/cpufreq' can be used as a value.
speed_type="bios_limit" speed_type="bios_limit"
# CPU speed shorthand
#
# Default: 'off'
# Values: 'on', 'off'.
# Flag: --speed_shorthand.
#
# Example:
# on: 'i7-6500U (4) @ 3.1GHz'
# off: 'i7-6500U (4) @ 3.100GHz'
speed_shorthand="off"
# Shorten the output of the CPU function # Shorten the output of the CPU function
# #
# Default: 'off' # Default: 'off'
@@ -317,7 +329,7 @@ disk_show=('/')
# What to append to the Disk subtitle. # What to append to the Disk subtitle.
# #
# Default: 'mount' # Default: 'mount'
# Values: 'mount', 'name' # Values: 'mount', 'name', 'dir'
# Flag: --disk_subtitle # Flag: --disk_subtitle
# #
# Example: # Example:
@@ -326,6 +338,11 @@ disk_show=('/')
# #
# mount: 'Disk (/): 74G / 118G (66%)' # mount: 'Disk (/): 74G / 118G (66%)'
# 'Disk (/mnt/Local Disk): 74G / 118G (66%)' # 'Disk (/mnt/Local Disk): 74G / 118G (66%)'
# 'Disk (/mnt/Videos): 74G / 118G (66%)'
#
# dir: 'Disk (/): 74G / 118G (66%)'
# 'Disk (Local Disk): 74G / 118G (66%)'
# 'Disk (Videos): 74G / 118G (66%)'
disk_subtitle="mount" disk_subtitle="mount"
@@ -523,6 +540,7 @@ disk_display="off"
# Backend Settings # Backend Settings
# Image backend. # Image backend.
# #
# Default: 'ascii' # Default: 'ascii'
@@ -585,6 +603,15 @@ ascii_bold="on"
# Image Options # Image Options
# Image loop
# Setting this to on will make neofetch redraw the image constantly until
# Ctrl+C is pressed. This fixes display issues in some terminal emulators.
#
# Default: 'off'
# Values: 'on', 'off'
# Flag: --loop
image_loop="off"
# Thumbnail directory # Thumbnail directory
# #
# Default: '~/.cache/thumbnails/neofetch' # Default: '~/.cache/thumbnails/neofetch'
@@ -670,16 +697,6 @@ scrot="off"
# Flag: --scrot_cmd # Flag: --scrot_cmd
scrot_cmd="auto" scrot_cmd="auto"
# Screenshot Directory
# Where to save the screenshots
#
# Default: '~/Pictures/'
# Values: 'dir'
# Flag: --scrot_dir
#
# Note: Neofetch won't create the directory if it doesn't exist.
scrot_dir="$HOME/Pictures/"
# Screenshot Filename # Screenshot Filename
# What to name the screenshots # What to name the screenshots
# #
@@ -707,4 +724,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="3.0.1" config_version="3.1.0-git"

424
neofetch
View File

@@ -9,7 +9,7 @@
# https://github.com/dylanaraps/ # https://github.com/dylanaraps/
# Neofetch version. # Neofetch version.
version="3.0.1" version="3.1.0-git"
bash_version="${BASH_VERSION/.*}" bash_version="${BASH_VERSION/.*}"
sys_locale="${LANG:-C}" sys_locale="${LANG:-C}"
@@ -38,7 +38,7 @@ get_os() {
"Linux" | "GNU"*) os="Linux" ;; "Linux" | "GNU"*) os="Linux" ;;
"Darwin") os="$(sw_vers -productName)" ;; "Darwin") os="$(sw_vers -productName)" ;;
*"BSD" | "DragonFly" | "Bitrig") os="BSD" ;; *"BSD" | "DragonFly" | "Bitrig") os="BSD" ;;
"CYGWIN"* | "MSYS"*) os="Windows" ;; "CYGWIN"* | "MSYS"* | "MINGW"*) os="Windows" ;;
"SunOS") os="Solaris" ;; "SunOS") os="Solaris" ;;
"Haiku") os="Haiku" ;; "Haiku") os="Haiku" ;;
"MINIX") os="MINIX" ;; "MINIX") os="MINIX" ;;
@@ -63,6 +63,13 @@ get_distro() {
*) distro="$(lsb_release -sd) on Windows 10" ;; *) distro="$(lsb_release -sd) on Windows 10" ;;
esac esac
elif [[ "$(< /proc/version)" == *"cros"* || -f "/dev/cros_ec" ]]; then
case "$distro_shorthand" in
"on") distro="$(lsb_release -sir) [Chrome OS]" ;;
"tiny") distro="Chrome OS" ;;
*) distro="$(lsb_release -sd) on Chrome OS" ;;
esac
elif [[ -f "/etc/GoboLinuxVersion" ]]; then elif [[ -f "/etc/GoboLinuxVersion" ]]; then
case "$distro_shorthand" in case "$distro_shorthand" in
"on" | "tiny") distro="GoboLinux" ;; "on" | "tiny") distro="GoboLinux" ;;
@@ -93,6 +100,9 @@ get_distro() {
"tiny") distro="${distro//version*}" ;; "tiny") distro="${distro//version*}" ;;
esac esac
elif type -p tazpkg >/dev/null; then
distro="SliTaz $(< /etc/slitaz-release)"
elif [[ -d "/system/app/" && -d "/system/priv-app" ]]; then elif [[ -d "/system/app/" && -d "/system/priv-app" ]]; then
distro="Android $(getprop ro.build.version.release)" distro="Android $(getprop ro.build.version.release)"
@@ -468,7 +478,7 @@ get_packages() {
packages="$((packages+=$(ls -d -1 /Programs/*/ | wc -l)))" packages="$((packages+=$(ls -d -1 /Programs/*/ | wc -l)))"
type -p eopkg >/dev/null && \ type -p eopkg >/dev/null && \
packages="$((packages+=$(eopkg list-installed | wc -l)))" packages="$((packages+=$(ls -1 /var/lib/eopkg/package | wc -l)))"
type -p pkg_info >/dev/null && \ type -p pkg_info >/dev/null && \
packages="$((packages+=$(pkg_info | wc -l)))" packages="$((packages+=$(pkg_info | wc -l)))"
@@ -476,6 +486,9 @@ get_packages() {
type -p crew >/dev/null && \ type -p crew >/dev/null && \
packages="$((packages+=$(ls -l /usr/local/etc/crew/meta/*.filelist | wc -l)))" packages="$((packages+=$(ls -l /usr/local/etc/crew/meta/*.filelist | wc -l)))"
type -p tazpkg >/dev/null && \
packages="$((packages+=$(tazpkg list | wc -l) - 6))"
if type -p pkg >/dev/null; then 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)))" ;;
@@ -629,7 +642,17 @@ get_wm() {
else else
case "$os" in case "$os" in
"Mac OS X") wm="Quartz Compositor" ;; "Mac OS X")
ps_line="$(ps -e | grep -o '[S]pectacle\|[A]methyst\|[k]wm')"
case "$ps_line" in
*"kwm"*) wm="Kwm" ;;
*"Amethyst"*) wm="Amethyst" ;;
*"Spectacle"*) wm="Spectacle" ;;
*) wm="Quartz Compositor" ;;
esac
;;
"Windows") "Windows")
wm="$(tasklist | grep -m 1 -o -F -e "bugn" -e "Windawesome" -e "blackbox" -e "emerge" -e "litestep")" wm="$(tasklist | grep -m 1 -o -F -e "bugn" -e "Windawesome" -e "blackbox" -e "emerge" -e "litestep")"
[[ "$wm" == "blackbox" ]] && wm="bbLean (Blackbox)" [[ "$wm" == "blackbox" ]] && wm="bbLean (Blackbox)"
@@ -805,11 +828,10 @@ get_cpu() {
speed="$(< "${speed_dir}/bios_limit")" || \ speed="$(< "${speed_dir}/bios_limit")" || \
speed="$(< "${speed_dir}/scaling_max_freq")" || \ speed="$(< "${speed_dir}/scaling_max_freq")" || \
speed="$(< "${speed_dir}/cpuinfo_max_freq")" speed="$(< "${speed_dir}/cpuinfo_max_freq")"
speed="$((speed / 100000))" speed="$((speed / 1000))"
else else
speed="$(awk -F ': |\\.' '/cpu MHz/ {printf $2; exit}' /proc/cpuinfo)" speed="$(awk -F ': |\\.' '/cpu MHz/ {printf $2; exit}' /proc/cpuinfo)"
speed="$((speed / 100))"
fi fi
# Get CPU temp. # Get CPU temp.
@@ -877,7 +899,6 @@ get_cpu() {
# Get CPU speed. # Get CPU speed.
speed="$(sysctl -n hw.cpuspeed)" speed="$(sysctl -n hw.cpuspeed)"
[[ -z "$speed" ]] && speed="$(sysctl -n hw.clockrate)" [[ -z "$speed" ]] && speed="$(sysctl -n hw.clockrate)"
speed="$((speed / 100))"
# Get CPU cores. # Get CPU cores.
cores="$(sysctl -n hw.ncpu)" cores="$(sysctl -n hw.ncpu)"
@@ -915,7 +936,6 @@ get_cpu() {
# Get CPU speed. # Get CPU speed.
speed="$(psrinfo -v | awk '/operates at/ {print $6; exit}')" speed="$(psrinfo -v | awk '/operates at/ {print $6; exit}')"
speed="$((speed / 100))"
# Get CPU cores. # Get CPU cores.
case "$cpu_cores" in case "$cpu_cores" in
@@ -932,7 +952,6 @@ get_cpu() {
# Get CPU speed. # Get CPU speed.
speed="$(sysinfo -cpu | awk '/running at/ {print $NF; exit}')" speed="$(sysinfo -cpu | awk '/running at/ {print $NF; exit}')"
speed="${speed/MHz}" speed="${speed/MHz}"
speed="$((speed / 100))"
# Get CPU cores. # Get CPU cores.
cores="$(sysinfo -cpu | grep -c -F 'CPU #')" cores="$(sysinfo -cpu | grep -c -F 'CPU #')"
@@ -945,7 +964,6 @@ get_cpu() {
# Get CPU speed. # Get CPU speed.
speed="$(prtconf | awk -F':' '/Processor Clock Speed/ {printf $2}')" speed="$(prtconf | awk -F':' '/Processor Clock Speed/ {printf $2}')"
speed="${speed/MHz}" speed="${speed/MHz}"
speed="$((speed / 100))"
# Get CPU cores. # Get CPU cores.
case "$cpu_cores" in case "$cpu_cores" in
@@ -955,8 +973,12 @@ get_cpu() {
;; ;;
esac esac
# Fix for speeds under 1ghz.
if [[ "$speed" ]]; then if [[ "$speed" ]]; then
# Hide decimals if on.
[[ "$speed_shorthand" == "on" ]] && \
speed="$((speed / 100))"
# Fix for speeds under 1ghz.
if [[ -z "${speed:1}" ]]; then if [[ -z "${speed:1}" ]]; then
speed="0.${speed}" speed="0.${speed}"
else else
@@ -1039,7 +1061,7 @@ get_cpu_usage() {
case "$cpu_display" in case "$cpu_display" in
"bar") cpu_usage="$(bar "$cpu_usage" 100)" ;; "bar") cpu_usage="$(bar "$cpu_usage" 100)" ;;
"infobar") cpu_usage="${cpu_usage}% $(bar "$cpu_usage" 100)" ;; "infobar") cpu_usage="${cpu_usage}% $(bar "$cpu_usage" 100)" ;;
"barinfo") cpu_usage="$(bar "$cpu_usage" 100) ${cpu_usage}%" ;; "barinfo") cpu_usage="$(bar "$cpu_usage" 100)${info_color} ${cpu_usage}%" ;;
*) cpu_usage="${cpu_usage}%" ;; *) cpu_usage="${cpu_usage}%" ;;
esac esac
} }
@@ -1151,7 +1173,16 @@ get_gpu() {
esac esac
;; ;;
"BSD" | "Solaris" | "MINIX" | "AIX") "Windows")
gpu="$(wmic path Win32_VideoController get caption)"
gpu="${gpu//Caption}"
;;
"Haiku")
gpu="$(listdev | grep -A2 -F 'device Display controller' | awk -F':' '/device beef/ {print $2}')"
;;
*)
case "$kernel_name" in case "$kernel_name" in
"FreeBSD"* | "DragonFly"*) "FreeBSD"* | "DragonFly"*)
gpu="$(pciconf -lv | grep -B 4 -F "VGA" | grep -F "device")" gpu="$(pciconf -lv | grep -B 4 -F "VGA" | grep -F "device")"
@@ -1165,15 +1196,6 @@ get_gpu() {
;; ;;
esac esac
;; ;;
"Windows")
gpu="$(wmic path Win32_VideoController get caption)"
gpu="${gpu//Caption}"
;;
"Haiku")
gpu="$(listdev | grep -A2 -F 'device Display controller' | awk -F':' '/device beef/ {print $2}')"
;;
esac esac
if [[ "$gpu_brand" == "off" ]]; then if [[ "$gpu_brand" == "off" ]]; then
@@ -1263,13 +1285,13 @@ get_memory() {
case "$memory_display" in case "$memory_display" in
"bar") memory="$(bar "${mem_used}" "${mem_total}")" ;; "bar") memory="$(bar "${mem_used}" "${mem_total}")" ;;
"infobar") memory="${memory} $(bar "${mem_used}" "${mem_total}")" ;; "infobar") memory="${memory} $(bar "${mem_used}" "${mem_total}")" ;;
"barinfo") memory="$(bar "${mem_used}" "${mem_total}") ${memory}" ;; "barinfo") memory="$(bar "${mem_used}" "${mem_total}")${info_color} ${memory}" ;;
esac esac
} }
get_song() { get_song() {
# This is absurdly long. # This is absurdly long.
player="$(ps x | awk '!(/awk|Helper|Cache/) && /mpd|mopidy|cmus|mocp|spotify|Google Play|iTunes.app|rhythmbox|banshee|amarok|deadbeef|audacious|xmms2d|gnome-music|lollypop|clementine|pragha|exaile|juk|bluemindo|guayadeque|yarock|qmmp|quodlibet/ {printf $5 " " $6; exit}')" player="$(ps x | awk '!(/ awk|Helper|Cache|ibus|indicator/) && /mpd|mopidy|cmus|mocp|spotify|Google Play|iTunes.app|rhythmbox|banshee|amarok|deadbeef|audacious|xmms2d|gnome-music|lollypop|clementine|pragha|exaile|juk|bluemindo|guayadeque|yarock|qmmp|quodlibet|deepin-music|tomahawk/ {printf $5 " " $6; exit}')"
get_song_dbus() { get_song_dbus() {
# Multiple players use an almost identical dbus command to get the information. # Multiple players use an almost identical dbus command to get the information.
@@ -1290,7 +1312,6 @@ get_song() {
"deadbeef"*) song="$(deadbeef --nowplaying-tf '%artist% - %title%')" ;; "deadbeef"*) song="$(deadbeef --nowplaying-tf '%artist% - %title%')" ;;
"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" ;;
@@ -1298,6 +1319,17 @@ get_song() {
"bluemindo"*) get_song_dbus "Bluemindo" ;; "bluemindo"*) get_song_dbus "Bluemindo" ;;
"guayadeque"*) get_song_dbus "guayadeque" ;; "guayadeque"*) get_song_dbus "guayadeque" ;;
"yarock"*) get_song_dbus "yarock" ;; "yarock"*) get_song_dbus "yarock" ;;
"deepin-music"*) get_song_dbus "deepinmusic" ;;
"tomahawk"*) get_song_dbus "tomahawk" ;;
"audacious"*)
song="$(audtool current-song)"
# Remove Album from 'Artist - Album - Title'
song="${song/-* -/-}"
[[ -z "$song" ]] && get_song_dbus "audacious"
;;
"cmus"*) "cmus"*)
song="$(cmus-remote -Q | awk '/tag artist/ {$1=$2=""; print; print " - "} /tag title/ {$1=$2=""; print}')" song="$(cmus-remote -Q | awk '/tag artist/ {$1=$2=""; print; print " - "} /tag title/ {$1=$2=""; print}')"
@@ -1362,23 +1394,9 @@ get_song() {
get_resolution() { get_resolution() {
case "$os" in case "$os" in
"Linux" | "BSD" | "Solaris" | "MINIX" | "AIX")
if type -p xrandr >/dev/null; then
case "$refresh_rate" in
"on") resolution="$(xrandr --nograb --current | awk 'match($0,/[0-9]*\.[0-9]*\*/) {printf $1 " @ " substr($0,RSTART,RLENGTH) "Hz, "}')" ;;
"off") resolution="$(xrandr --nograb --current | awk '/\*/ {printf $1 ", "}')" ;;
esac
resolution="${resolution//\*}"
resolution="${resolution//\.[0-9][0-9]}"
elif type -p xdpyinfo >/dev/null; then
resolution="$(xdpyinfo | awk '/dimensions:/ {printf $2}')"
fi
;;
"Mac OS X") "Mac OS X")
if type -p screenresolution >/dev/null; then if type -p screenresolution >/dev/null; then
resolution="$(screenresolution get | awk '/Display/ {printf $6 "Hz, "}')" resolution="$(screenresolution get 2>&1 | awk '/Display/ {printf $6 "Hz, "}')"
resolution="${resolution//x??@/ @ }" resolution="${resolution//x??@/ @ }"
else else
@@ -1420,6 +1438,19 @@ get_resolution() {
[[ "$refresh_rate" == "off" ]] && resolution="${resolution/ @*}" [[ "$refresh_rate" == "off" ]] && resolution="${resolution/ @*}"
;; ;;
*)
if type -p xrandr >/dev/null; then
case "$refresh_rate" in
"on") resolution="$(xrandr --nograb --current | awk 'match($0,/[0-9]*\.[0-9]*\*/) {printf $1 " @ " substr($0,RSTART,RLENGTH) "Hz, "}')" ;;
"off") resolution="$(xrandr --nograb --current | awk '/\*/ {printf $1 ", "}')" ;;
esac
resolution="${resolution//\*}"
elif type -p xdpyinfo >/dev/null; then
resolution="$(xdpyinfo | awk '/dimensions:/ {printf $2}')"
fi
;;
esac esac
resolution="${resolution%,*}" resolution="${resolution%,*}"
@@ -1632,6 +1663,46 @@ get_term_font() {
term_font="$(osascript -e 'tell application "Terminal" to font name of window frontmost')" term_font="$(osascript -e 'tell application "Terminal" to font name of window frontmost')"
;; ;;
"iTerm2")
# Unfortunately the profile name is not unique, but it seems to be the only thing
# that identifies an active profile. There is the "id of current session of current window"
# thou, but that does not match to a guid in the plist.
# So, be warned! Collisions may occur!
# See: https://groups.google.com/forum/#!topic/iterm2-discuss/0tO3xZ4Zlwg
local current_profile_name
current_profile_name="$(osascript -e 'tell application "iTerm2" to profile name of current session of current window')"
# Warning: Dynamic profiles are not taken into account here!
# https://www.iterm2.com/documentation-dynamic-profiles.html
# Count Guids in "New Bookmarks"; they should be unique
local profiles_count
profiles_count="$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:" ~/Library/Preferences/com.googlecode.iterm2.plist 2>/dev/null | grep -c "Guid")"
for ((i=0; i<=profiles_count; i++)); do
local profile_name
profile_name="$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${i}:Name:" ~/Library/Preferences/com.googlecode.iterm2.plist 2>/dev/null)"
if [[ "$profile_name" == "$current_profile_name" ]]; then
# "Normal Font"
term_font="$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${i}:Normal\ Font:" ~/Library/Preferences/com.googlecode.iterm2.plist)"
# Font for non-ascii characters
# Only check for a different non-ascii font, if the user checked
# the "use a different font for non-ascii text" switch.
local use_different_font
use_different_font="$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${i}:Use\ Non-ASCII\ Font:" ~/Library/Preferences/com.googlecode.iterm2.plist)"
if [[ "$use_different_font" == "true" ]]; then
local non_ascii_font
non_ascii_font="$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${i}:Non\ Ascii\ Font:" ~/Library/Preferences/com.googlecode.iterm2.plist)"
[[ "$term_font" != "$non_ascii_font" ]] && \
term_font="$term_font (normal) / $non_ascii_font (non-ascii)"
fi
fi
done
;;
"deepin-terminal"*) "deepin-terminal"*)
term_font="$(awk -F '=' '/font=/ {a=$2} /font_size/ {b=$2} END{print a " " b}' "${XDG_CONFIG_HOME}/deepin/deepin-terminal/config.conf")" term_font="$(awk -F '=' '/font=/ {a=$2} /font_size/ {b=$2} END{print a " " b}' "${XDG_CONFIG_HOME}/deepin/deepin-terminal/config.conf")"
;; ;;
@@ -1663,6 +1734,34 @@ get_term_font() {
[[ "$profile_filename" ]] && term_font="$(awk -F '=|,' '/Font=/ {print $2 " " $3}' "$profile_filename")" [[ "$profile_filename" ]] && term_font="$(awk -F '=|,' '/Font=/ {print $2 " " $3}' "$profile_filename")"
;; ;;
"mate-terminal")
# To get the actual config we have to create a temporarily file with the --save-config option.
mateterm_config="/tmp/mateterm.cfg"
# Ensure /tmp exists and we do not overwrite anything.
if [[ -d /tmp && ! -f "$mateterm_config" ]]; then
mate-terminal --save-config="$mateterm_config"
role="$(xprop -id "${WINDOWID}" WM_WINDOW_ROLE)"
role="${role##*= }"
term_id="$(grep -A1 "${role//\"}" "$mateterm_config")"
term_id="${term_id##*=}"
profile="$(grep -A1 "\[$term_id\]" "$mateterm_config")"
profile="${profile##*=}"
rm -f "$mateterm_config"
if [[ "$(gsettings get org.mate.terminal.profile:/org/mate/terminal/profiles/"${profile}"/ use-system-font)" == "true" ]]; then
term_font="$(gsettings get org.mate.interface monospace-font-name)"
else
term_font="$(gsettings get org.mate.terminal.profile:/org/mate/terminal/profiles/"${profile}"/ font)"
fi
term_font="$(trim_quotes "$term_font")"
fi
;;
"mintty") "mintty")
term_font="$(awk -F '=' '!/^($|#)/ && /Font/ {printf $2; exit}' "${HOME}/.minttyrc")" term_font="$(awk -F '=' '!/^($|#)/ && /Font/ {printf $2; exit}' "${HOME}/.minttyrc")"
;; ;;
@@ -1685,7 +1784,7 @@ get_term_font() {
"termite") "termite")
[[ -f "${XDG_CONFIG_HOME}/termite/config" ]] && termite_config="${XDG_CONFIG_HOME}/termite/config" [[ -f "${XDG_CONFIG_HOME}/termite/config" ]] && termite_config="${XDG_CONFIG_HOME}/termite/config"
term_font="$(awk -F '= ' '/\[options\]/ {opt=1} /^font/ {if(opt==1) a=$2; opt=0} END{print a}' "/etc/xdg/termite/config" "$termite_config")" term_font="$(awk -F '= ' '/\[options\]/ {opt=1} /^\s*font/ {if(opt==1) a=$2; opt=0} END{print a}' "/etc/xdg/termite/config" "$termite_config")"
;; ;;
"urxvt" | "urxvtd" | "rxvt-unicode" | "xterm") "urxvt" | "urxvtd" | "rxvt-unicode" | "xterm")
@@ -1744,6 +1843,10 @@ get_disk() {
# Subtitle. # Subtitle.
case "$disk_subtitle" in case "$disk_subtitle" in
"name") disk_sub="${disk_info[0]}" ;; "name") disk_sub="${disk_info[0]}" ;;
"dir")
disk_sub="${disk_info[5]/*\/}"
[[ -z "$disk_sub" ]] && disk_sub="${disk_info[5]}"
;;
*) disk_sub="${disk_info[5]}" ;; *) disk_sub="${disk_info[5]}" ;;
esac esac
@@ -1751,7 +1854,7 @@ get_disk() {
case "$disk_display" in case "$disk_display" in
"bar") disk="$(bar "$disk_perc" "100")" ;; "bar") disk="$(bar "$disk_perc" "100")" ;;
"infobar") disk+=" $(bar "$disk_perc" "100")" ;; "infobar") disk+=" $(bar "$disk_perc" "100")" ;;
"barinfo") disk="$(bar "$disk_perc" "100") $disk" ;; "barinfo") disk="$(bar "$disk_perc" "100")${info_color} $disk" ;;
"perc") disk="${disk_perc}% $(bar "$disk_perc" "100")" ;; "perc") disk="${disk_perc}% $(bar "$disk_perc" "100")" ;;
esac esac
@@ -1767,26 +1870,24 @@ get_disk() {
get_battery() { get_battery() {
case "$os" in case "$os" in
"Linux") "Linux")
# We use 'prin' here and exit the function early so that we can # We use 'prin' here so that we can do multi battery support
# do multi battery support with a single battery per line. # with a single battery per line.
for bat in "/sys/class/power_supply/BAT"*; do for bat in "/sys/class/power_supply/"{BAT,axp288_fuel_gauge}*; do
capacity="$(< "${bat}/capacity")" capacity="$(< "${bat}/capacity")"
status="$(< "${bat}/status")" status="$(< "${bat}/status")"
# Fix for bash on Windows 10 which includes /proc files if [[ "$capacity" ]]; then
# for battery usage despite there not being a battery
# installed.
[[ -z "$capacity" ]] && return
battery="${capacity}% [${status}]" battery="${capacity}% [${status}]"
case "$battery_display" in case "$battery_display" in
"bar") battery="$(bar "$capacity" 100)" ;; "bar") battery="$(bar "$capacity" 100)" ;;
"infobar") battery+=" $(bar "$capacity" 100)" ;; "infobar") battery+=" $(bar "$capacity" 100)" ;;
"barinfo") battery="$(bar "$capacity" 100) ${battery}" ;; "barinfo") battery="$(bar "$capacity" 100)${info_color} ${battery}" ;;
esac esac
bat="${bat/*axp288_fuel_gauge}"
prin "${subtitle:+${subtitle}${bat: -1}}" "$battery" prin "${subtitle:+${subtitle}${bat: -1}}" "$battery"
fi
done done
return return
;; ;;
@@ -1840,14 +1941,15 @@ get_battery() {
case "$battery_display" in case "$battery_display" in
"bar") battery="$(bar "${battery/'%'*}" 100)" ;; "bar") battery="$(bar "${battery/'%'*}" 100)" ;;
"infobar") battery="${battery} $(bar "${battery/'%'*}" 100)" ;; "infobar") battery="${battery} $(bar "${battery/'%'*}" 100)" ;;
"barinfo") battery="$(bar "${battery/'%'*}" 100) ${battery}" ;; "barinfo") battery="$(bar "${battery/'%'*}" 100)${info_color} ${battery}" ;;
esac esac
} }
get_local_ip() { get_local_ip() {
case "$os" in case "$os" in
"Linux" | "BSD" | "Solaris" | "AIX") "Linux" | "BSD" | "Solaris" | "AIX")
local_ip="$(ip route get 1 | awk '{print $NF;exit}')" local_ip="$(ip route get 1 | awk -F'src' '{print $2; exit}')"
local_ip="${local_ip/uid*}"
[[ -z "$local_ip" ]] && local_ip="$(ifconfig -a | awk '/broadcast/ {print $2; exit}')" [[ -z "$local_ip" ]] && local_ip="$(ifconfig -a | awk '/broadcast/ {print $2; exit}')"
;; ;;
@@ -1900,7 +2002,7 @@ get_install_date() {
"Windows") "Windows")
case "$kernel_name" in case "$kernel_name" in
"CYGWIN"*) install_file="/cygdrive/c/Windows/explorer.exe" ;; "CYGWIN"*) install_file="/cygdrive/c/Windows/explorer.exe" ;;
"MSYS"*) install_file="/c/Windows/explorer.exe" ;; "MSYS"* | "MINGW"*) install_file="/c/Windows/explorer.exe" ;;
esac esac
;; ;;
"Haiku") install_file="/boot" ;; "Haiku") install_file="/boot" ;;
@@ -1930,6 +2032,10 @@ get_install_date() {
install_date="$(convert_time "${install_date[@]}")" install_date="$(convert_time "${install_date[@]}")"
} }
get_locale() {
locale="$sys_locale"
}
get_cols() { get_cols() {
if [[ "$color_blocks" == "on" ]]; then if [[ "$color_blocks" == "on" ]]; then
# Convert the width to space chars. # Convert the width to space chars.
@@ -1949,22 +2055,22 @@ get_cols() {
done done
# Convert height into spaces. # Convert height into spaces.
printf -v spaces "%${block_height}s" printf -v block_spaces "%${block_height}s"
# Convert the spaces into rows of blocks. # Convert the spaces into rows of blocks.
[[ "$blocks" ]] && cols+="${spaces// /${blocks}${reset}nl}" [[ "$blocks" ]] && cols+="${block_spaces// /${blocks}${reset}nl}"
[[ "$blocks2" ]] && cols+="${spaces// /${blocks2}${reset}nl}" [[ "$blocks2" ]] && cols+="${block_spaces// /${blocks2}${reset}nl}"
# Add newlines to the string. # Add newlines to the string.
cols="${cols%%'nl'}" cols="${cols%%'nl'}"
cols="${cols//nl/\\n\\033[${text_padding}C${zws}}" cols="${cols//nl/\\n\\033[${text_padding}C${zws}}"
# Add block height to info height.
info_height="$((info_height+=block_height+2))"
printf "%b\n" "\033[${text_padding}C${zws}${cols}" printf "%b\n" "\033[${text_padding}C${zws}${cols}"
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.
@@ -1985,7 +2091,7 @@ image_backend() {
"ascii") get_ascii ;; "ascii") get_ascii ;;
"off") image_backend="off" ;; "off") image_backend="off" ;;
"caca" | "catimg" | "jp2a" | "iterm2" | "tycat" | "w3m") "caca" | "catimg" | "jp2a" | "iterm2" | "termpix" | "tycat" | "w3m" | "sixel")
get_image_source get_image_source
if [[ ! -f "$image" ]]; then if [[ ! -f "$image" ]]; then
@@ -1997,7 +2103,6 @@ image_backend() {
if [[ "$term_width" ]] && ((term_width >= 1)); then if [[ "$term_width" ]] && ((term_width >= 1)); then
clear clear
zws=" "
else else
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,"
@@ -2011,7 +2116,7 @@ image_backend() {
*) *)
err "Image: Unknown image backend specified '$image_backend'." err "Image: Unknown image backend specified '$image_backend'."
err "Image: Valid backends are: 'ascii', 'caca', 'catimg', 'jp2a', 'iterm2', 'off', 'tycat', 'w3m')" err "Image: Valid backends are: 'ascii', 'caca', 'catimg', 'jp2a', 'iterm2', 'off', 'sixel', 'termpix', 'tycat', 'w3m')"
err "Image: Falling back to ascii mode." err "Image: Falling back to ascii mode."
get_ascii get_ascii
;; ;;
@@ -2115,7 +2220,29 @@ get_image_source() {
get_wallpaper() { get_wallpaper() {
case "$os" in case "$os" in
"Linux" | "BSD" | "Solaris" | "MINIX" | "AIX") "Mac OS X")
image="$(osascript -e 'tell application "System Events" to picture of current desktop')"
;;
"Windows")
case "$distro" in
"Windows XP")
case "$kernel_name" in
"CYGWIN"*) image="/cygdrive/c/Documents and Settings/${USER}" ;;
"MSYS2"* | "MINGW*") image="/c/Documents and Settings/${USER}" ;;
esac
image+="/Local Settings/Application Data/Microsoft"
image+="/Wallpaper1.bmp"
;;
"Windows"*)
image="$APPDATA/Microsoft/Windows/Themes"
image+="/TranscodedWallpaper.jpg"
;;
esac
;;
*)
# Get DE if user has disabled the function. # Get DE if user has disabled the function.
((de_run != 1)) && get_de ((de_run != 1)) && get_de
@@ -2146,28 +2273,6 @@ get_wallpaper() {
image="${image/'file://'}" image="${image/'file://'}"
image="$(trim_quotes "$image")" image="$(trim_quotes "$image")"
;; ;;
"Mac OS X")
image="$(osascript -e 'tell application "System Events" to picture of current desktop')"
;;
"Windows")
case "$distro" in
"Windows XP")
case "$kernel_name" in
"CYGWIN"*) image="/cygdrive/c/Documents and Settings/${USER}" ;;
"MSYS2"*) image="/c/Documents and Settings/${USER}" ;;
esac
image+="/Local Settings/Application Data/Microsoft"
image+="/Wallpaper1.bmp"
;;
"Windows"*)
image="$APPDATA/Microsoft/Windows/Themes"
image+="/TranscodedWallpaper.jpg"
;;
esac
;;
esac esac
# If image is an xml file, don't use it. # If image is an xml file, don't use it.
@@ -2233,7 +2338,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_backend" == "w3m" ]]; then if [[ -z "$term_width" ]]; 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")
@@ -2384,23 +2489,32 @@ make_thumbnail() {
display_image() { display_image() {
case "$image_backend" in case "$image_backend" in
"caca") "caca")
img2txt -W "$((width / font_width)))" -H "$((height / font_height))" --gamma=0.6 "$image" || to_off "Image: catimg failed to display the image." img2txt -W "$((width / font_width)))" -H "$((height / font_height))" --gamma=0.6 "$image" || to_off "Image: libcaca failed to display the image."
zws=
;; ;;
"catimg") "catimg")
catimg -w "$((width * 2 / font_width))" -r 0 "$image" || to_off "Image: catimg failed to display the image." catimg -w "$((width * 2 / font_width))" -r 0 "$image" || to_off "Image: catimg failed to display the image."
zws=
;; ;;
"jp2a") "jp2a")
jp2a --width="$((width / font_width))" --colors "$image" || to_off "Image: jp2a failed to display the image." jp2a --width="$((width / font_width))" --colors "$image" || to_off "Image: jp2a failed to display the image."
zws= ;;
"sixel")
img2sixel -w "$width" "$image" || to_off "Image: libsixel failed to display the image."
;;
"termpix")
termpix --width "$((width / font_width))" "$image" || to_off "Image: termpix failed to display the image."
;; ;;
"iterm2") "iterm2")
printf "%b\a\n" "\033]1337;File=width=${width}px;height=${height}px;inline=1:$(base64 < "$image")" iterm_cmd="\033]1337;File=width=${width}px;height=${height}px;inline=1:$(base64 < "$image")"
zws=
# Tmux requires an additional escape sequence for this to work.
[[ -n "$TMUX" ]] && iterm_cmd="\033Ptmux;\033${iterm_cmd}\033\\"
printf "%b\a\n" "$iterm_cmd"
;; ;;
"tycat") "tycat")
@@ -2415,6 +2529,8 @@ display_image() {
sleep 0.05 sleep 0.05
printf "%b\n" "0;1;$xoffset;$yoffset;$width;$height;;;;;$image\n4;\n3;" |\ printf "%b\n" "0;1;$xoffset;$yoffset;$width;$height;;;;;$image\n4;\n3;" |\
"${w3m_img_path:-false}" -bg "$background_color" >/dev/null & 2>&1 || to_off "Image: w3m-img failed to display the image." "${w3m_img_path:-false}" -bg "$background_color" >/dev/null & 2>&1 || to_off "Image: w3m-img failed to display the image."
zws="\xE2\x80\x8B\x20"
;; ;;
esac esac
} }
@@ -2438,17 +2554,14 @@ to_off() {
err "$1" err "$1"
image_backend="off" image_backend="off"
text_padding= text_padding=
zws=
} }
# SCREENSHOT # SCREENSHOT
take_scrot() { take_scrot() {
if [[ -d "$scrot_dir" ]]; then
scrot_program "${scrot_dir}${scrot_name}" 2>/dev/null 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." err "Scrot: Saved screenshot as: ${scrot_dir}${scrot_name}"
fi
[[ "$scrot_upload" == "on" ]] && scrot_upload [[ "$scrot_upload" == "on" ]] && scrot_upload
} }
@@ -2489,13 +2602,16 @@ scrot_upload() {
scrot_args() { scrot_args() {
scrot="on" scrot="on"
case "$2" in
"-"* | "") ;; if [[ "$2" =~ \.(png|jpg|jpe|jpeg|gif)$ ]]; then
*)
scrot_name="${2##*/}" scrot_name="${2##*/}"
scrot_dir="${2/$scrot_name}" scrot_dir="${2/$scrot_name}"
;;
esac elif [[ -d "$2" ]]; then
scrot_dir="$2"
else
scrot_dir="${PWD:+${PWD}/}"
fi
} }
scrot_program() { scrot_program() {
@@ -2621,10 +2737,11 @@ get_underline() {
get_line_break() { get_line_break() {
# Print it directly. # Print it directly.
printf "%s\n" "${zws}" printf "%b\n" "${zws}"
# Calculate info height. # Calculate info height.
((++info_height)) ((++info_height))
line_breaks+="\n"
# Tell info() that we printed manually. # Tell info() that we printed manually.
prin=1 prin=1
@@ -2728,12 +2845,12 @@ get_distro_colors() {
;; ;;
"arch_small") "arch_small")
set_colors 4 7 1 set_colors 6 7 1
ascii_file="arch_small" ascii_file="arch_small"
;; ;;
"arch_old") "arch_old")
set_colors 4 7 1 set_colors 6 7 1
ascii_file="arch_old" ascii_file="arch_old"
;; ;;
@@ -2742,8 +2859,13 @@ get_distro_colors() {
ascii_file="archbox" ascii_file="archbox"
;; ;;
"ARCHlabs"*)
set_colors 6 6 7 1
ascii_file="archlabs"
;;
"Arch"*) "Arch"*)
set_colors 4 4 7 1 set_colors 6 6 7 1
ascii_file="arch" ascii_file="arch"
;; ;;
@@ -2817,6 +2939,11 @@ get_distro_colors() {
ascii_file="deepin" ascii_file="deepin"
;; ;;
"DesaOS")
set_colors 2 7
ascii_file="desaos"
;;
"Devuan"*) "Devuan"*)
set_colors 5 7 set_colors 5 7
ascii_file="devuan" ascii_file="devuan"
@@ -2997,11 +3124,21 @@ get_distro_colors() {
ascii_file="netrunner" ascii_file="netrunner"
;; ;;
"Nitrux"*)
set_colors 4
ascii_file="nitrux"
;;
"NixOS"*) "NixOS"*)
set_colors 4 6 set_colors 4 6
ascii_file="nixos" ascii_file="nixos"
;; ;;
"OBRevenge"*)
set_colors 1 7 3
ascii_file="obrevenge"
;;
"openbsd_small") "openbsd_small")
set_colors 3 7 6 1 8 set_colors 3 7 6 1 8
ascii_file="openbsd_small" ascii_file="openbsd_small"
@@ -3132,6 +3269,11 @@ get_distro_colors() {
ascii_file="slackware" ascii_file="slackware"
;; ;;
"SliTaz"*)
set_colors 3 3
ascii_file="slitaz"
;;
"SmartOS"*) "SmartOS"*)
set_colors 6 7 set_colors 6 7
ascii_file="smartos" ascii_file="smartos"
@@ -3187,11 +3329,21 @@ get_distro_colors() {
ascii_file="ubuntu-gnome" ascii_file="ubuntu-gnome"
;; ;;
"Ubuntu-MATE"*)
set_colors 2 7
ascii_file="ubuntu-mate"
;;
"ubuntu_old") "ubuntu_old")
set_colors 1 7 3 set_colors 1 7 3
ascii_file="ubuntu_old" ascii_file="ubuntu_old"
;; ;;
"Ubuntu-Studio")
set_colors 6 7
ascii_file="ubuntu-studio"
;;
"Ubuntu"*) "Ubuntu"*)
set_colors 1 7 3 set_colors 1 7 3
ascii_file="ubuntu" ascii_file="ubuntu"
@@ -3309,8 +3461,8 @@ set_text_colors() {
fi fi
case "$bar_color_total $1" in case "$bar_color_total $1" in
"distro "[736]) bar_color_total="$c2" ;; "distro "[736]) bar_color_total="$(color "$1")" ;;
"distro "[0-9]) bar_color_total="$c1" ;; "distro "[0-9]) bar_color_total="$(color "$2")" ;;
*) bar_color_total="$(color "$bar_color_total")" ;; *) bar_color_total="$(color "$bar_color_total")" ;;
esac esac
} }
@@ -3318,7 +3470,7 @@ set_text_colors() {
color() { color() {
case "$1" in case "$1" in
[0-6]) printf "%b" "${reset}\033[3${1}m" ;; [0-6]) printf "%b" "${reset}\033[3${1}m" ;;
7 | "fg") printf "%b" "$reset" ;; 7 | "fg") printf "%b" "\033[37m${reset}" ;;
*) printf "%b" "\033[38;5;${1}m" ;; *) printf "%b" "\033[38;5;${1}m" ;;
esac esac
} }
@@ -3426,14 +3578,14 @@ bar() {
printf -v total "%$((bar_length - elapsed))s" printf -v total "%$((bar_length - elapsed))s"
# Set the colors and swap the spaces for $bar_char_. # Set the colors and swap the spaces for $bar_char_.
bar+="${bar_color_elapsed}${prog// /$bar_char_elapsed}" bar+="${bar_color_elapsed}${prog// /${bar_char_elapsed}}"
bar+="${bar_color_total}${total// /$bar_char_total}" bar+="${bar_color_total}${total// /${bar_char_total}}"
# Borders. # Borders.
[[ "$bar_border" == "on" ]] && \ [[ "$bar_border" == "on" ]] && \
bar="$(color fg)[${bar}$(color fg)]" bar="$(color fg)[${bar}$(color fg)]"
printf "%b\n" "${bar}${info_color}" printf "%b" "${bar}${info_color}"
} }
cache() { cache() {
@@ -3497,34 +3649,30 @@ get_term_padding() {
dynamic_prompt() { dynamic_prompt() {
case "$image_backend" in case "$image_backend" in
"ascii") ;; "ascii") printf "\n" ;;
"off") return ;; "off") return ;;
*) *)
get_term_padding 2>/dev/null get_term_padding
lines="$(((border + height + yoffset) / font_height))"
# Calculate image height in terminal cells. image_prompt="on"
lines="$(((border * 2 + height + yoffset) / font_height))"
;; ;;
esac esac
# If the info is higher than the ascii/image place the prompt # If the info is higher than the ascii/image place the prompt
# based on the info height instead of the ascii/image height. # based on the info height instead of the ascii/image height.
if ((lines < info_height)); then if ((lines < info_height)); then
printf "\n" [[ "$image_prompt" ]] && printf "\n"
return return
else else
[[ "$image_prompt" ]] && printf "%b\n" "$line_breaks"
lines="$((lines - info_height))" lines="$((lines - info_height))"
fi fi
# Set the prompt location. # Print a newline if color blocks are disabled.
if ((lines < 0)); then [[ -z "$block_spaces" ]] && printf "\n"
printf "%b" "\033[${lines/-}A"
else
printf "%b" "\033[${lines}B"
fi
# Add some padding. # Set the prompt location.
printf "\n\n\n\n" ((lines > 0)) && printf "%b" "\033[${lines}B"
} }
old_functions() { old_functions() {
@@ -3574,6 +3722,9 @@ old_options() {
# Birthday was renamed to Install Date in 3.0 # 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"; } [[ -n "$birthday_time" ]] && { err "Config: \$birthday_time is deprecated, use \3install_time instead."; install_time="$birthday_time"; }
# Scrot dir was removed in 3.1.0.
[[ -n "$scrot_dir" ]] && scrot_dir=
} }
cache_uname() { cache_uname() {
@@ -3724,6 +3875,7 @@ INFO:
NOTE: This only supports Linux with cpufreq. NOTE: This only supports Linux with cpufreq.
--speed_shorthand on/off Whether or not to show decimals in CPU speed.
--cpu_shorthand type Shorten the output of CPU --cpu_shorthand type Shorten the output of CPU
Possible values: name, speed, tiny, on, off Possible values: name, speed, tiny, on, off
--cpu_cores type Whether or not to display the number of CPU cores --cpu_cores type Whether or not to display the number of CPU cores
@@ -3764,12 +3916,15 @@ INFO:
NOTE: Multiple values can be given. (--disk_show '/' '/dev/sdc1') NOTE: Multiple values can be given. (--disk_show '/' '/dev/sdc1')
--disk_subtitle name/mount What information to append to the Disk subtitle. --disk_subtitle type What information to append to the Disk subtitle.
Takes: name, mount, dir
'name' shows the disk's name (sda1, sda2, etc) 'name' shows the disk's name (sda1, sda2, etc)
'mount' shows the disk's mount point (/, /mnt/Local Disk, etc) 'mount' shows the disk's mount point (/, /mnt/Local Disk, etc)
'dir' shows the basename of the disks's path. (/, Local Disk, etc)
--ip_host url URL to query for public IP --ip_host url URL to query for public IP
--song_shorthand on/off Print the Artist/Title on separate lines --song_shorthand on/off Print the Artist/Title on separate lines
--install_time on/off Enable/Disable showing the time in Install Date output. --install_time on/off Enable/Disable showing the time in Install Date output.
@@ -3807,7 +3962,7 @@ BARS:
IMAGE BACKEND: IMAGE BACKEND:
--backend backend Which image backend to use. --backend backend Which image backend to use.
Possible values: 'ascii', 'caca', 'catimg', 'jp2a', 'iterm2', 'off', 'tycat', 'w3m' Possible values: 'ascii', 'caca', 'catimg', 'jp2a', 'iterm2', 'off', 'sixel', 'tycat', 'w3m'
--source source Which image or ascii file to use. --source source Which image or ascii file to use.
Possible values: 'auto', 'ascii', 'wallpaper', '/path/to/img', '/path/to/ascii', '/path/to/dir/' Possible values: 'auto', 'ascii', 'wallpaper', '/path/to/img', '/path/to/ascii', '/path/to/dir/'
--ascii source Shortcut to use 'ascii' backend. --ascii source Shortcut to use 'ascii' backend.
@@ -3815,6 +3970,8 @@ IMAGE BACKEND:
--catimg source Shortcut to use 'catimg' backend. --catimg source Shortcut to use 'catimg' backend.
--iterm2 source Shortcut to use 'iterm2' backend. --iterm2 source Shortcut to use 'iterm2' backend.
--jp2a source Shortcut to use 'jp2a' backend. --jp2a source Shortcut to use 'jp2a' backend.
--sixel source Shortcut to use 'sixel' backend.
--termpix source Shortcut to use 'termpix' backend.
--tycat source Shortcut to use 'tycat' backend. --tycat source Shortcut to use 'tycat' backend.
--w3m source Shortcut to use 'w3m' backend. --w3m source Shortcut to use 'w3m' backend.
--off Shortcut to use 'off' backend. --off Shortcut to use 'off' backend.
@@ -3843,6 +4000,7 @@ ASCII:
Possible values: bar, infobar, barinfo, off Possible values: bar, infobar, barinfo, off
IMAGE: IMAGE:
--loop Redraw the image constantly until Ctrl+C is used. This fixes issues in some terminals emulators when using image mode.
--size 00px | --size 00% How to size the image. --size 00px | --size 00% How to size the image.
Possible values: auto, 00px, 00%, none Possible values: auto, 00px, 00%, none
--crop_mode mode Which crop mode to use --crop_mode mode Which crop mode to use
@@ -3927,6 +4085,7 @@ get_args() {
"--cpu_cores") cpu_cores="$2" ;; "--cpu_cores") cpu_cores="$2" ;;
"--cpu_speed") cpu_speed="$2" ;; "--cpu_speed") cpu_speed="$2" ;;
"--speed_type") speed_type="$2" ;; "--speed_type") speed_type="$2" ;;
"--speed_shorthand") speed_shorthand="$2" ;;
"--distro_shorthand") distro_shorthand="$2" ;; "--distro_shorthand") distro_shorthand="$2" ;;
"--kernel_shorthand") kernel_shorthand="$2" ;; "--kernel_shorthand") kernel_shorthand="$2" ;;
"--uptime_shorthand") uptime_shorthand="$2" ;; "--uptime_shorthand") uptime_shorthand="$2" ;;
@@ -4017,7 +4176,7 @@ get_args() {
# Image backend # Image backend
"--backend") image_backend="$2" ;; "--backend") image_backend="$2" ;;
"--source") image_source="$2" ;; "--source") image_source="$2" ;;
"--ascii" | "--caca" | "--catimg" | "--jp2a" | "--iterm2" | "--off" | "--tycat" | "--w3m") "--ascii" | "--caca" | "--catimg" | "--jp2a" | "--iterm2" | "--off" | "--sixel" | "--termpix" | "--tycat" | "--w3m")
image_backend="${1/--}" image_backend="${1/--}"
case "$2" in case "$2" in
"-"* | "") ;; "-"* | "") ;;
@@ -4026,6 +4185,7 @@ get_args() {
;; ;;
# Image options # Image options
"--loop") image_loop="on" ;;
"--image_size" | "--size") image_size="$2" ;; "--image_size" | "--size") image_size="$2" ;;
"--crop_mode") crop_mode="$2" ;; "--crop_mode") crop_mode="$2" ;;
"--crop_offset") crop_offset="$2" ;; "--crop_offset") crop_offset="$2" ;;
@@ -4114,7 +4274,6 @@ main() {
printf "\033[?25l\033[?7l" printf "\033[?25l\033[?7l"
fi fi
# get_image_backend
image_backend image_backend
old_functions old_functions
get_cache_dir get_cache_dir
@@ -4131,6 +4290,9 @@ main() {
# Show error messages. # Show error messages.
[[ "$verbose" == "on" ]] && printf "%b" "$err" >&2 [[ "$verbose" == "on" ]] && printf "%b" "$err" >&2
# If `--loop` was used, constantly redraw the image.
while [[ "$image_loop" == "on" && "$image_backend" == "w3m" ]]; do display_image; sleep 1s; done
return 0 return 0
} }

View File

@@ -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.1" "User Commands" .TH NEOFETCH "1" "April 2017" "Neofetch 3.1.0-git" "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
@@ -30,6 +30,9 @@ scaling_current, scaling_min, scaling_max
.IP .IP
NOTE: This only supports Linux with cpufreq. NOTE: This only supports Linux with cpufreq.
.TP .TP
\fB\-\-speed_shorthand\fR on/off
Whether or not to show decimals in CPU speed.
.TP
\fB\-\-cpu_shorthand\fR type \fB\-\-cpu_shorthand\fR type
Shorten the output of CPU Shorten the output of CPU
Possible values: name, speed, tiny, on, off Possible values: name, speed, tiny, on, off
@@ -96,12 +99,15 @@ Possible values: '/', '/dev/sdXX', '/path/to/mount point'
.IP .IP
NOTE: Multiple values can be given. (\fB\-\-disk_show\fR '/' '/dev/sdc1') NOTE: Multiple values can be given. (\fB\-\-disk_show\fR '/' '/dev/sdc1')
.TP .TP
\fB\-\-disk_subtitle\fR name/mount \fB\-\-disk_subtitle\fR type
What information to append to the Disk subtitle. What information to append to the Disk subtitle.
Takes: name, mount, dir
.IP .IP
\&'name' shows the disk's name (sda1, sda2, etc) \&'name' shows the disk's name (sda1, sda2, etc)
.IP .IP
\&'mount' shows the disk's mount point (/, \fI\,/mnt/Local\/\fP Disk, etc) \&'mount' shows the disk's mount point (/, \fI\,/mnt/Local\/\fP Disk, etc)
.IP
\&'dir' shows the basename of the disks's path. (/, Local Disk, etc)
.TP .TP
\fB\-\-ip_host\fR url \fB\-\-ip_host\fR url
URL to query for public IP URL to query for public IP
@@ -175,7 +181,7 @@ Possible values: bar, infobar, barinfo, off
.TP .TP
\fB\-\-backend\fR backend \fB\-\-backend\fR backend
Which image backend to use. Which image backend to use.
Possible values: 'ascii', 'caca', 'catimg', 'jp2a', 'iterm2', 'off', 'tycat', 'w3m' Possible values: 'ascii', 'caca', 'catimg', 'jp2a', 'iterm2', 'off', 'sixel', 'tycat', 'w3m'
.TP .TP
\fB\-\-source\fR source \fB\-\-source\fR source
Which image or ascii file to use. Which image or ascii file to use.
@@ -196,6 +202,12 @@ Shortcut to use 'iterm2' backend.
\fB\-\-jp2a\fR source \fB\-\-jp2a\fR source
Shortcut to use 'jp2a' backend. Shortcut to use 'jp2a' backend.
.TP .TP
\fB\-\-sixel\fR source
Shortcut to use 'sixel' backend.
.TP
\fB\-\-termpix\fR source
Shortcut to use 'termpix' backend.
.TP
\fB\-\-tycat\fR source \fB\-\-tycat\fR source
Shortcut to use 'tycat' backend. Shortcut to use 'tycat' backend.
.TP .TP
@@ -235,6 +247,9 @@ Hide the info text and only show the ascii logo.
Possible values: bar, infobar, barinfo, off Possible values: bar, infobar, barinfo, off
.SS "IMAGE:" .SS "IMAGE:"
.TP .TP
\fB\-\-loop\fR
Redraw the image constantly until Ctrl+C is used. This fixes issues in some terminals emulators when using image mode.
.TP
\fB\-\-size\fR 00px | \fB\-\-size\fR 00% \fB\-\-size\fR 00px | \fB\-\-size\fR 00%
How to size the image. How to size the image.
Possible values: auto, 00px, 00%, none Possible values: auto, 00px, 00%, none