pax_global_header 0000666 0000000 0000000 00000000064 12553057605 0014522 g ustar 00root root 0000000 0000000 52 comment=9d85e6831c0ee07913d4fd10b9c1911a3ded0a13
screenfetch-3.7.0/ 0000775 0000000 0000000 00000000000 12553057605 0014022 5 ustar 00root root 0000000 0000000 screenfetch-3.7.0/CHANGELOG 0000664 0000000 0000000 00000035354 12553057605 0015246 0 ustar 00root root 0000000 0000000 **** **** **** ****
screenFetch
changelog
**** **** **** ****
- Fixing package detection in apt/dpkg distros
- Fix xmonad detection
- Add detection for Sabayon, Haiku, Logos and Chapeau
- Add ChromeOS logo (without distro detection)
- Add an option to supply custom ASCII art
- Combine GTK 2/3 themes if they are the same
- Reimplement '-d' (allows for setting what information is displayed on the command line)
v3.6.5
- Fixed RAM usage on OS X
- Added old FreeBSD logo
- Added portrait mode output
- Simplify Scientific Linux detection
- Added '--version' command line longoption as an alternative to '-v'
- Added Evolve OS detection
- Added imgur to configured upload hosts
- Fine tuned more of the upload function
v3.6.2
- Added upload support via -u flag
- Added pre-configured hosts for -u uploading: teknik, pomf, hmp, and mediacrush
- Added a configurable section for an scp upload to a specified destination
- Removed -m flag
v3.6.0
- Added PowerPC support for OS X
- Added support for Korora and Void Linux
- Readme: added installation instruction for Debian
v3.5.0
- update list of supported systems
- Fix Parabola pkg detection.
- Adding support for the echinus (dwm fork) WM.
- Add 2bwm support.
- Various Parabola GNU/Linux-libre aesthetic fixes.
- Adding NetBSD to supported distros in --help.
- Fix OpenBSD total RAM output.
- Un-camelCase the *box WMs, matching the documentation for the *box WMs.
- Added support for Windows 8.1 (Cygwin)
- Removed resolution from screenfetch when resolution cannot be found (Win8.1 cygwin)
- Fix detection of PowerPC G3 to be more exact instead of triggering on UltraSparcs
- Fixing shrx's URL.
- add manpage
- update header license text to GPLv3
- Red Hat Linux -> Red Hat Enterprise Linux
- Fix Parabola in --help.
- improved GPU detection formatting, fixed dual GPU detection formatting
- Fixes for OS X
- Fix Arch Linux detection for updated lsb_release
- Fix for Debian
- Added support for Raspbian, Antergos and KaOS
- Fixes for Cinnamon
- Fix for Android being detected if getprop exists. Disabling Android support until I figure out a better detection method.
- Redirect STDERR to function to make errors prettier.
- Commenting gsettings usage for GTK3 theme detection. Causes glib core dump in some places. Removed until I figure out why.
v3.2.2
- Adding a 256 support for Ubuntu logo
- gpu_info code is still present but no longer in use
- OSX: Fix X11.app from launching, add Theme Name, GTK fix, fix for Mac's version of sed to fix cpu detection
- Fix for LXDE detection related things.
- Fixes for elementary OS detection.
- Adding Jiyuu Linux detection and ASCII.
- Fix for Funtoo detection and Funtoo-text.
v3.2.0
- Add Support to Kali Linux.
- Possible fix for distro detection with cases.
- Fixes for CentOS detection.
- Fix for bspwm.
- Removing disk from DISPLAY.
- Fixes for Mutter/GNOME Shell
- Fixing spacing issues in new eOS ASCII.
v3.1.0
- Fixing some stuff for FreeBSD GPU detection.
- Add alternate Manjaro art. Use with -A 'Manjaro-tree'.
- Fixed funtoo detection
- Added Sabayon
- Tweaked Fedora art
- Adding Notion WM to detected window managers
- Adding GPU detection to display and Cygwin GPU detection
- Color centralization. All logos and labels use color aliases now (i.e. blue/light blue).
- Fix for verbose output with error suppressing (-E).
- Fix for *BSD detectdisk.
- Fixing a problem with _net_wm_name
- Fix for elementary OS detection
- Fix for the BASH pre 4.0-ish lower-to-upper in WM detection.
v3.0.5
- OS X GPU detection added.
- Fix for -n.
- FreeBSD portmaster support for pkg detection.
- Switching to printf in various places. Part of a big printf move.
- Removal of -e and theme exporting.
- detectdisk added.
- Fix for WM detection in OS X.
v3.0.0
- Colors bugfixes/changes.
- -l disabled FOREVER.
- Various *BSD bugfixes.
- Funtoo detection added.
- -c now allows 256 colors.
- Fix Scientific Linux detection.
- Moving of functions for cleanup.
- Added -d back in for now.
- OS X bugfixes.
- WM non-case-sensitive now.
- ppc cpu detection fixes.
v2.9.0
- Started work on re-adding Cygwin detection.
- Cleaning up above.
- Cygwin logo fixed.
- Many Cygwin bugfixes/additions.
v2.8.4
- GTK detection bugfixes.
- Cygwin logo changed.
- E17 detection added.
- Updated --help.
- BackTrack Linux detection added.
- OpenBSD shell detection fix.
- *BSD bugfixes.
- Fixes for cpu speed detection.
- Changed Android logo.
- Changed CrunchBang logo.
- Added -N to strip all colors.
- Actually added --help. -h still works.
- Sabayon Linux detection added.
- GPU detection added (Very Experimental!!!)
- Many tweaks on above.
- Adding -E to suppress all errors (STDERR).
v2.8.1
- *BSD shell detection fix.
- Unity detection added.
- Experimental Android support.
- Various WM/DE bugfixes.
- Closing up outstanding issues/pulls.
- If "Not Found", continue. Do Not Display.
- Scientific Linux detection added.
- Manjaro logo changed.
v2.7.7
- KWin detection fixes.
- KDE detection fixes.
- Manjaro Linux ASCII changed.
- Attempts at automated truncating.
- Organization of WM names in functions.
- Compiz detection fixes.
- CrunchBang Waldorf detection fix.
- Shell version detection. Also, SHELL DETECTION.
- Formatting fixes.
- Basic razorqt detection.
- Fixing RHEL detection.
- No displaying of X-dependent info if X isn't found to be running.
- Remove -l flag.
- Lotsa OS X detection bugfixes.
- FluxBox detection fix.
- FreeBSD uptime bugfix.
v2.7.5
- Adding Cinnamon detection.
- Updated README for how to.
- *BSD memory detection bugfixes.
- Other miscellanious *BSD bugfixes.
- Optimizations and code cleanup.
- README changes.
- gsettings detection fix.
- RHEL detection fix.
- /etc/os-release detection fix.
- BASH optimizations.
- Huge detectdistro overhaul.
- More tweaks on above.
- detectgtk optimization/cleanup/fixes.
v2.5.5
- herbstluftwm detection.
- Added Manjaro Linux detection.
- NetBSD detection and fixes.
- Cleanup and fixes for DE detection.
v2.5.3 (lots of stuff)
- GTK3 bugfixes.
- Fuduntu detection added.
- OS X memory bugfixes.
- Fragmented BSD flavors like they should be.
- FreeBSD bugfixes.
- Added DragonFlyBSD detection.
- xmonad detection bugfix.
- Fix CrunchBang detection.
- Add Trisquel detectin.
v2.5.0
- Mac OS X detection added.
- Lots of tweaking on OS X detection.
- Fixes for distro detection.
- Change for BSD logo.
- Script now exits with 0 status.
- macports and homebrew detection for OS X.
- Experimental Cygwin detection. Commented out until cleaned.
v2.4.7
- KWin detection bugfixes.
- Fixed non-ascii output.
- Fix for Frugalware pkg detection.
- Fix Gentoo detection.
- Proper GTK3 detection for GNOME.
- DE detection cleanup.
- GNOME Shell detection.
- Various code cleanups.
v2.4.5
- Added Chakra detection.
- GTK detection bugfixes.
- Experimental GTK3 detection.
v2.4.4
- SpectrWM added. Kept old ScrotWM for legacy.
- Colors bugfixes.
- Fixed LinuxDeepin and Parabola detection/logos.
v2.4.3
- Woo! Colors! Define colors with -c.
v2.4.2
- Added Viperr detection.
- Added LinuxDeepin detection.
v2.4.1
- Spacing fixes
- Added ParabolaGNU detection.
- Fixed list of supported distributions in --help.
v2.4.0
- New SolusOS logo and fixed detection
- Added CPU detection.
- Added Memory detection.
- Added Package Count detection (only working on Arch and SolusOS).
v2.3.9
- Fixed SolusOS detection.
- Added MATE detection, theme detection possibly not working yet. Fixed WindowMaker detection.
- Getting a DEB out! \o/
v2.3.8
- Adding tentative dminiwm support.
- net-tools deprecated. Relying on /proc/sys/kernel/hostname from now on.
- Adding tentative monsterwm support.
- Fixing openSUSE detection
v2.3.7
- Correctly tabulated and added Mageia distro detection and ASCII.
- Adding tentative SolusOS detection via /etc/issue
- Adding SolusOS logo and colors.
v2.3.6
- Adding tentative PeppermintOS detection.
- A couple of attempted KDE/KWin fixes.
- Fixed /etc/os-release detection
- Updating Frugalware detection with /etc/os-release.
v2.3.5
- Adding tentative Frugalware detection.
- Adding 256 color support.
- suse and version fix
- Fixed a couple logo spacing issues. Added spaceing insensitivity to the -D flag.
- Added / fixed LXDE support.
v2.3.4
- Fixed an error causing stuff to not be detected.
- e17 support
- Several other fixes an revertions
v2.3.2
- Adding new Slackware ASCII art and detection.
v2.3.1
- Fixing 'n/a' displaying of release/codename in my_distro.
v2.3.0
- Added SuSe detection and made an ASCII logo for it.
v2.2.9
- Attempting to fix DE detection with new GDM3
v2.2.8
- Fixing some quotes errors and LMDE detection.
v2.2.7
- Fixed a few space errors in Debian logo and added new LMDE logo.
- Removing official Compiz support. That should straighten a few things out.
v2.2.4
- Temporarily re-enabling bg support via -B flag.
v2.2.3
- Removing showing background by default by request.
- Correction in WM name (subtle)
v2.2.1
- Added a couple of WMs: subtle, e16, and sawfish
v2.2.0
- Deleted extra ASCII stuff and completely rewrote output stuff.
v2.1.7
- Added a few changes and lsb_release support.
v2.1.5
- Fixed multi-monitor resolution detection and modified default screenshot filename.
- Lots of capitalization errors in WM detection were brought to my attention. Fixed.
- Attempting to fix detection of Crunchbang Statler.
v2.1.4
- Commented out the DISPLAY setting on commandline until its stable.
v2.1.3 (HOLY SHIT BIG CHANGES)
- Added shitload of new features. Keep reading.
- Added function to set script variables on commandline execution. (i.e. screenfetch-dev -o 'baseurl="http://www.example.com"')
- Added function to set display info on commandline execution. (i.i. screenfetch-dev -d 'Host, OS, Kernel, Uptime, Theme, Icons')
- Added function to export theme if wanted upon execution. Currently only supports the following window managers: PekWM, OpenBox, BlackBox, FluxBox, Metacity (kind of), Xfwm4 (kind of). This is a really big addition, and quite experimental. Things that are currently sought out and exported are the following: GTK Theme Folder, Icon Theme Folder, WM Theme Folder, Background Image, and screenshot taken by screenfetch. If you would like anything else exported with this let me know and I'll see what I can do.
- Added function to upload screenshot taken to server you have ssh access on after info is displayed. MUST set baseurl, serveraddr, and serverdir variables for this to work. See -o flag.
- Added new support for detecting the following window managers: Musca, i3, Ratpoison, wmii, Wmfs, ScrotWM, and Beryl.
- Attempted to fix XFCE detection by limiting the processes that result in XFCE to only "xfce4-desktop". Dunno if this will work or not. Email me.
- Added function to detect hostname and user. Displayed in info output.
- Added function to detect resolution. Displayed in info output. Untested, and possibly not working, on multiple monitor setups. Email me.
- Added function to detect working shell. Might also add function to detect terminal type in the future.
- Fixed bug in GNOME background output. Was outputing entire pathname. Now only outputs the filename of the image.
- Replaced old Arch Linux logo with new updated one. Don't really like the new one, but it was popular demand. Old one is still available through -D with the 'Arch Linux - Old' argument for those of us that are old school.
v2.0.3
- Adding XMonad detection.
v2.0.1
- Fixing some spelling errors and added a few minor things.
- Experimental truncating based upon terminal width.
- Changed default Arch Linux ASCII logo due to popular demand. Old one is still available.
v1.8.4
- Added experimental Compiz detection (WM and theme)
- Added experimental StumpWM detection (Just WM). Thanks to gtklocker for this part.
v1.8.3
- Added the groundwork for background support, terminal width detection (and thus truncating upon being over this width), and a couple other things I can't remember at the moment.
- Gonna update a couple of the ASCII arts. :D
v1.7.9
- Added support to DETECT the following window managers: dwm, awesome, and WindowMaker
- Added support for lighter backgrounds. If you have a lighter background, specify -l as a flag on the command-line. This will turn all white output to dark gray output.
- screenFetch was featured in the ALM (Arch Linux Magazine)! The issue can be found and downloaded at http://www.archlinux.org/static/magazine/2010/ALM-2010-Apr.pdf
v1.7.7
- Added FVWM support per request of goran'agar on the Arch forums.
v1.7.6.5
- Fixed broken -s flag to take screenshot.
- Put calling for verbose function back into other functions.
v1.7.6 (important)
- Working distribution detection! Most of the distributions I've included have been untested as of yet. Which means I could REALLY use some testers for these distros. The ones that still need testing are as follows: SUSE, Mandriva/Mandrake, Gentoo, Fedora, Red Hat Linux, and BSD. If you would like to help test these distributions, let me know by emailing me at kittykatt@archlinux.us
- Reworked a lot of the code to be functions instead of repeating parts. Looks a lot cleaner now.
- This update was mainly Kingdomcome's doing. So thank him profusely.
v1.7.5 (HUGE)
- Massive rewrite, cleaning up a huge portion of the code.
- Made several repeating parts of the code into functions.
- Learned getopts. Rewrote flag support with it. Flags now supported are as follows:
~ -D 'DISTRO NAME' Specify distribution name
~ -c 'command' Specify custom screenshot command.
~ -V Print current version of script.
~ -v Turn on verbose output.
~ -s Take screenshot.
~ -n Display info only and no ASCII logo.
~ -h Display help menu.
- Added version number to DE reporting. Except LXDE. Because they fail.
- Thanks to h2 for many, many, many suggestions and a lot of help. This update would most likely not have been possible without him.
v1.4.5
- Cleaned up WM Theme detection code.
v1.4.4
- Changed version system
- Fixed if statement for "Not Present" or "LXDE" DE (Thanks to ArcherSeven for pointing it out)
v1.4.3 (big)
- Complete rewrite of DE and WM detection (Once again thanks to King)
- Implemented LXDE support (Yay!)
- Discussed ideas for "united" DE detection
v1.4
- Complete rewrite of the uptime field (Thanks a bunch Kingdomcome)
v1.3
- Added some flag support (notably --version, --screen, and --help)
- Added commented lines for --distro and --command flags (future use)
- Fixed another color escape sequence.
v1.2
- Fixed uptime errors when uptime > 1 day
v1.1
- Fixed color closing in the generic tux ASCII logo (thanks Suhana)
- Changed architecture detection to "uname -m" across the board (thanks ikey for that one)
v1.0
- First version. Let's start! :D
screenfetch-3.7.0/COPYING 0000664 0000000 0000000 00000104513 12553057605 0015061 0 ustar 00root root 0000000 0000000 GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Copyright (C)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
Copyright (C)
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
.
screenfetch-3.7.0/README.mkdn 0000664 0000000 0000000 00000011562 12553057605 0015637 0 ustar 00root root 0000000 0000000 # screenFetch - The Bash Screenshot Information Tool
## What is screenFetch?
screenFetch is a "Bash Screenshot Information Tool". This handy Bash
script can be used to generate one of those nifty terminal theme
information + ASCII distribution logos you see in everyone's screenshots
nowadays. It will auto-detect your distribution and display an ASCII
version of that distribution's logo and some valuable information to the
right. There are options to specify no ASCII art, colors, taking a
screenshot upon displaying info, and even customizing the screenshot
command! This script is very easy to add to and can easily be extended.
## How do I get screenFetch?
### Arch Linux
1. Install `screenfetch` from the official repositories or `screenfetch-git` from the AUR. That's it!
### Mageia
1. Install screenfetch from the official repositories with urpmi or rpmdrake.
e.g.: `urpmi screenfetch`
### Mac
1. Run `brew install screenfetch` after installing [Homebrew](http://brew.sh)
### Gentoo or Sabayon
1. Emerge screenfetch from portage using `emerge screenfetch`
2. Sabayon users can install screenfetch from entropy using `equo install screenfetch`
### Ubuntu (>14.04) and Debian (stable/testing/unstable)
1. Install: `apt-get install screenfetch`
2. There is also a PPA for Ubuntu located at https://launchpad.net/%7Edjcj/+archive/ubuntu/screenfetch
### FreeBSD
1. screenfetch can be installed by using the ports system.
### Fedora (21 or later)
1. Install it with yum running: `yum install screenfetch`
### Others
1. Download the latest source at https://github.com/KittyKatt/screenFetch
2. In a terminal, make the file executable by doing the following: `chmod +x /path/to/screenfetch/screenfetch-dev`
3. Then, either keep it there, or move it to somewhere in your $PATH to make it available without having to use the full path to the script.
## Running screenfetch
To run screenFetch, open a terminal of some sort and type in the command `screenfetch`
or wherever you saved the script to. This will generate an ASCII logo with the
information printed to the side of the logo. There are some options that may be
specified on the command line, and those are shown below or by executing `screenfetch -h`:
-v Verbose output.
-o 'OPTIONS' Allows for setting script variables on the
command line. Must be in the following format...
'OPTION1="OPTIONARG1";OPTION2="OPTIONARG2"'
-n Do not display ASCII distribution logo.
-N Strip all color from output.
-t Truncate output based on terminal width (Experimental!).
-p Output in portrait mode, with logo above info.
-s(m) Using this flag tells the script that you want it
to take a screenshot. Use the -m flag if you would like
to move it to a new location afterwards.
-c string You may change the outputted colors with -c. The format is
as follows: [0-9][0-9],[0-9][0-9]. The first argument controls the
ASCII logo colors and the label colors. The second argument
controls the colors of the information found. One argument may be
used without the other.
-a 'PATH' You can specify a custom ASCII art by passing the path
to a Bash script, defining `startline` and `fulloutput`
variables, and optionally `labelcolor` and `textcolor`.
See the `asciiText` function in the source code for more
informations on the variables format.
-S 'COMMAND' Here you can specify a custom screenshot command for
the script to execute. Surrounding quotes are required.
-D 'DISTRO' Here you can specify your distribution for the script
to use. Surrounding quotes are required.
-A 'DISTRO' Here you can specify the distribution art that you want
displayed. This is for when you want your distro
detected but want to display a different logo.
-E Suppress output of errors.
-V, --version Display current script version.
-h, --help Display this help.
## Contact Me
If you would like to suggest something new, inform me of an issue in the
script, become part of the project, or talk to me about anything else,
you can either email me at `zeldarealm@gmail.com` or you can connect
to Rizon and reach me at `irc://irc.rizon.net/screenFetch`
## Screenshots




screenfetch-3.7.0/TODO 0000664 0000000 0000000 00000002326 12553057605 0014515 0 ustar 00root root 0000000 0000000 **##** *#* TO DO LIST *#* **##**
This small list will be the central place where I will list ideas and
things I want to happen with screenFetch.
Obvious Things:
1) Add any and all suggested WMs.
2) More distros! Suggest them and I'll add them. Or I'll add them as I find them.
Other Things:
1) Better GTK3 detection. Fix for gsettings stuff.
2) Better -c. Support setting of all available colors in an ascii logo.
3) Centralized color setting. c{1,2,3,etc} and lablecolors all set in one place.
4) Better disk detection. Fix problems with it.
5) Cleanup detectuptime, detectcpu, *
6) Custom logos file. Source logos file with -C flag is present. -A will act normally
if -C is present as well.
That's about it for now. If you can help with any of these, please
please PLEASE let me know by emailing me at kittykatt@kittykatt.us or by
stopping by SilverIRC on your favorite IRC client. The network can be
accessed by pointing your IRC client to kittykatt.silverirc.com. #me0wz
is my home channel. If you don't have an IRC client, head on over to
http://www.silverirc.com/index.php?page=chat and that'll join
you to #randomz, where I can be reached as well.
Thank you for any help.
~KittyKatt (Brett Bohnenkamper)
screenfetch-3.7.0/screenfetch-dev 0000775 0000000 0000000 00000504105 12553057605 0017022 0 ustar 00root root 0000000 0000000 #!/usr/bin/env bash
# screenFetch - a CLI Bash script to show system/theme info in screenshots
# Copyright (c) 2010-2015 Brett Bohnenkamper
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
# Yes, I do realize some of this is horribly ugly coding. Any ideas/suggestions would be
# appreciated by emailing me or by stopping by http://github.com/KittyKatt/screenFetch. You
# could also drop in on the IRC channel at irc://irc.rizon.net/screenFetch.
# to put forth suggestions/ideas. Thank you.
# Requires: bash 4.0+
# Optional dependencies: xorg-xdpyinfo (resoluton detection)
# scrot (screenshot taking)
# curl (screenshot uploading)
LANG=C
LANGUAGE=C
LC_ALL=C
scriptVersion="3.6.8"
######################
# Settings for fetcher
######################
# This setting controls what ASCII logo is displayed.
# distro="Linux"
# This sets the information to be displayed. Available: distro, Kernel, DE, WM, Win_theme, Theme, Icons, Font, Background, ASCII. To get just the information, and not a text-art logo, you would take "ASCII" out of the below variable.
#display="distro host kernel uptime pkgs shell res de wm wmtheme gtk disk cpu gpu mem"
valid_display=( distro host kernel uptime pkgs shell res de wm wmtheme gtk disk cpu gpu mem )
display=( distro host kernel uptime pkgs shell res de wm wmtheme gtk cpu gpu mem )
# Display Type: ASCII or Text
display_type="ASCII"
# Plain logo
display_logo="no"
# Colors to use for the information found. These are set below according to distribution. If you would like to set your OWN color scheme for these, uncomment the lines below and edit them to your heart's content.
# textcolor="\e[0m"
# labelcolor="\e[1;34m"
# WM & DE process names
# Removed WM's: compiz
wmnames=( fluxbox openbox blackbox xfwm4 metacity kwin icewm pekwm fvwm dwm awesome wmaker stumpwm musca xmonad.* i3 ratpoison scrotwm spectrwm wmfs wmii beryl subtle e16 enlightenment sawfish emerald monsterwm dminiwm compiz Finder herbstluftwm notion bspwm cinnamon 2bwm echinus swm budgie-wm dtwm 9wm )
denames=( gnome-session xfce-mcs-manage xfce4-session xfconfd ksmserver lxsession gnome-settings-daemon mate-session mate-settings-daemon Finder )
# Screenshot Settings
# This setting lets the script know if you want to take a screenshot or not. 1=Yes 0=No
screenshot=
# This setting lets the script know if you want to upload the screenshot to a filehost. 1=Yes 0=No
upload=
# This setting lest the script know where you would like to upload the file to. Valid hosts are: teknik, mediacrush, pomf, imgur, hmp, and a configurable local.
uploadLoc=
# You can specify a custom screenshot command here. Just uncomment and edit. Otherwise, we'll be using the default command: scrot -cd3.
# screenCommand="scrot -cd5"
shotfile=$(printf "screenFetch-`date +'%Y-%m-%d_%H-%M-%S'`.png")
# Verbose Setting - Set to 1 for verbose output.
verbosity=
#############################################
#### CODE No need to edit past here CODE ####
#############################################
#########################################
# Static Variables and Common Functions #
#########################################
c0="\033[0m" # Reset Text
bold="\033[1m" # Bold Text
underline="\033[4m" # Underline Text
display_index=0
# User options
gtk_2line="no"
# Static Color Definitions
colorize () {
printf "\033[38;5;$1m"
}
getColor() {
if [[ -n "$1" ]]; then
if [[ ${BASH_VERSINFO[0]} -ge 4 ]]; then
if [[ ${BASH_VERSINFO[0]} -eq 4 && ${BASH_VERSINFO[1]} -gt 1 ]] || [[ ${BASH_VERSINFO[0]} -gt 4 ]]; then
tmp_color=${1,,}
else
tmp_color="$(tr '[:upper:]' '[:lower:]' <<< ${1})"
fi
else
tmp_color="$(tr '[:upper:]' '[:lower:]' <<< ${1})"
fi
case "${tmp_color}" in
'black') color_ret='\033[0m\033[30m';;
'red') color_ret='\033[0m\033[31m';;
'green') color_ret='\033[0m\033[32m';;
'brown') color_ret='\033[0m\033[33m';;
'blue') color_ret='\033[0m\033[34m';;
'purple') color_ret='\033[0m\033[35m';;
'cyan') color_ret='\033[0m\033[36m';;
'light grey') color_ret='\033[0m\033[37m';;
'dark grey') color_ret='\033[0m\033[1;30m';;
'light red') color_ret='\033[0m\033[1;31m';;
'light green') color_ret='\033[0m\033[1;32m';;
'yellow') color_ret='\033[0m\033[1;33m';;
'light blue') color_ret='\033[0m\033[1;34m';;
'light purple') color_ret='\033[0m\033[1;35m';;
'light cyan') color_ret='\033[0m\033[1;36m';;
'white') color_ret='\033[0m\033[1;37m';;
# Some 256 colors
'orange') color_ret="$(colorize '202')";;
# HaikuOS
'black_haiku') color_ret="$(colorize '7')";;
esac
[[ -n "${color_ret}" ]] && echo "${color_ret}"
else
:
fi
}
verboseOut() {
if [[ "$verbosity" -eq "1" ]]; then
printf "\033[1;31m:: \033[0m$1\n"
fi
}
errorOut() {
printf "\033[1;37m[[ \033[1;31m! \033[1;37m]] \033[0m$1\n"
}
stderrOut() {
while IFS='' read -r line; do printf "\033[1;37m[[ \033[1;31m! \033[1;37m]] \033[0m${line}\n"; done
}
####################
# Color Defines
####################
colorNumberToCode() {
number="$1"
if [[ "${number}" == "na" ]]; then
unset code
elif [[ $(tput colors) -eq "256" ]]; then
code=$(colorize "${number}")
else
case "$number" in
0|00) code=$(getColor 'black');;
1|01) code=$(getColor 'red');;
2|02) code=$(getColor 'green');;
3|03) code=$(getColor 'brown');;
4|04) code=$(getColor 'blue');;
5|05) code=$(getColor 'purple');;
6|06) code=$(getColor 'cyan');;
7|07) code=$(getColor 'light grey');;
8|08) code=$(getColor 'dark grey');;
9|09) code=$(getColor 'light red');;
10) code=$(getColor 'light green');;
11) code=$(getColor 'yellow');;
12) code=$(getColor 'light blue');;
13) code=$(getColor 'light purple');;
14) code=$(getColor 'light cyan');;
15) code=$(getColor 'white');;
*) unset code;;
esac
fi
echo -n "${code}"
}
detectColors() {
my_colors=$(sed 's/^,/na,/;s/,$/,na/;s/,/ /' <<< "${OPTARG}")
my_lcolor=$(awk -F' ' '{print $1}' <<< "${my_colors}")
my_lcolor=$(colorNumberToCode "${my_lcolor}")
my_hcolor=$(awk -F' ' '{print $2}' <<< "${my_colors}")
my_hcolor=$(colorNumberToCode "${my_hcolor}")
}
supported_distros="Antergos, Arch Linux (Old and Current Logos), BLAG, CentOS, Chakra, Chapeau, CrunchBang, CRUX, Debian, Deepin, Dragora, elementary OS, Evolve OS, Fedora, Frugalware, Fuduntu, Funtoo, Gentoo, gNewSense, Jiyuu Linux, Kali Linux, KaOS, Korora, LinuxDeepin, Linux Mint, LMDE, Logos, Mageia, Mandriva/Mandrake, Manjaro, NixOS, openSUSE, Parabola GNU/Linux-libre, PeppermintOS, Raspbian, Red Hat Enterprise Linux, Sabayon, Scientific Linux, Slackware, Solus, TinyCore, Trisquel, Ubuntu, Viperr and Void."
supported_other="Dragonfly/Free/Open/Net BSD, Haiku, Mac OS X and Windows+Cygwin."
supported_dms="KDE, Gnome, Unity, Xfce, LXDE, Cinnamon, MATE, CDE and RazorQt."
supported_wms="2bwm, 9wm, Awesome, Beryl, Blackbox, Cinnamon, Compiz, dminiwm, dwm, dtwm, E16, E17, echinus, Emerald, FluxBox, FVWM, herbstluftwm, IceWM, KWin, Metacity, monsterwm, Musca, Gala, Mutter, Muffin, Notion, OpenBox, PekWM, Ratpoison, Sawfish, ScrotWM, SpectrWM, StumpWM, subtle, WindowMaker, WMFS, wmii, Xfwm4, XMonad and i3."
displayHelp() {
printf "${underline}Usage${c0}:\n"
printf " ${0} [OPTIONAL FLAGS]\n\n"
printf "screenFetch - a CLI Bash script to show system/theme info in screenshots.\n\n"
printf "${underline}Supported GNU/Linux Distributions${c0}:\n"
printf "${supported_distros}" | fold -s | sed 's/^/\t/g'
printf "\n\n"
printf "${underline}Other Supported Systems${c0}:\n"
printf "${supported_other}" | fold -s | sed 's/^/\t/g'
printf "\n\n"
printf "${underline}Supported Desktop Managers${c0}:\n"
printf "${supported_dms}" | fold -s | sed 's/^/\t/g'
printf "\n\n"
printf "${underline}Supported Window Managers${c0}:\n"
printf "${supported_wms}" | fold -s | sed 's/^/\t/g'
printf "\n\n"
printf "${underline}Options${c0}:\n"
printf " ${bold}-v${c0} Verbose output.\n"
printf " ${bold}-o 'OPTIONS'${c0} Allows for setting script variables on the\n"
printf " command line. Must be in the following format...\n"
printf " 'OPTION1=\"OPTIONARG1\";OPTION2=\"OPTIONARG2\"'\n"
printf " ${bold}-d '+var;-var;var'${c0} Allows for setting what information is displayed\n"
printf " on the command line. You can add displays with +var,var. You\n"
printf " can delete displays with -var,var. Setting without + or - will\n"
printf " set display to that explicit combination. Add and delete statements\n"
printf " may be used in conjunction by placing a ; between them as so:\n"
printf " +var,var,var;-var,var.\n"
printf " ${bold}-n${c0} Do not display ASCII distribution logo.\n"
printf " ${bold}-L${c0} Display ASCII distribution logo only.\n"
printf " ${bold}-N${c0} Strip all color from output.\n"
printf " ${bold}-t${c0} Truncate output based on terminal width (Experimental!).\n"
printf " ${bold}-p${c0} Portrait output.\n"
printf " ${bold}-s(u)${c0} Using this flag tells the script that you want it\n"
printf " to take a screenshot. Use the -u flag if you would like\n"
printf " to upload the screenshots to one of the pre-configured\n"
printf " locations. These include: teknik, pomf, imgur, mediacrush, and hmp.\n"
printf " ${bold}-c string${c0} You may change the outputted colors with -c. The format is\n"
printf " as follows: [0-9][0-9],[0-9][0-9]. The first argument controls the\n"
printf " ASCII logo colors and the label colors. The second argument\n"
printf " controls the colors of the information found. One argument may be\n"
printf " used without the other.\n"
printf " ${bold}-a 'PATH'${c0} You can specify a custom ASCII art by passing the path\n"
printf " to a Bash script, defining \`startline\` and \`fulloutput\`\n"
printf " variables, and optionally \`labelcolor\` and \`textcolor\`.\n"
printf " See the \`asciiText\` function in the source code for more\n"
printf " informations on the variables format.\n"
printf " ${bold}-S 'COMMAND'${c0} Here you can specify a custom screenshot command for\n"
printf " the script to execute. Surrounding quotes are required.\n"
printf " ${bold}-D 'DISTRO'${c0} Here you can specify your distribution for the script\n"
printf " to use. Surrounding quotes are required.\n"
printf " ${bold}-A 'DISTRO'${c0} Here you can specify the distribution art that you want\n"
printf " displayed. This is for when you want your distro\n"
printf " detected but want to display a different logo.\n"
printf " ${bold}-E${c0} Suppress output of errors.\n"
printf " ${bold}-V${c0} Display current script version.\n"
printf " ${bold}-h${c0} Display this help.\n"
}
displayVersion() {
printf ${underline}"screenFetch"${c0}" - Version ${scriptVersion}\n"
printf "Created by and licensed to Brett Bohnenkamper \n"
printf "OS X porting done almost solely by shrx (https://github.com/shrx) and John D. Duncan, III (https://github.com/JohnDDuncanIII).\n\n"
printf "This is free software; see the source for copying conditions. There is NO warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
}
#####################
# Begin Flags Phase
#####################
case $1 in
--help) displayHelp; exit 0;;
--version) displayVersion; exit 0;;
esac
while getopts ":hsu:evVEnLNtlS:A:D:o:Bc:d:pa:" flags; do
case $flags in
h) displayHelp; exit 0 ;;
s) screenshot='1' ;;
S) screenCommand="${OPTARG}" ;;
u) upload='1'; uploadLoc="${OPTARG}" ;;
v) verbosity=1 ;;
V) displayVersion; exit 0 ;;
E) errorSuppress='1' ;;
D) distro="${OPTARG}" ;;
A) asc_distro="${OPTARG}" ;;
t) truncateSet='Yes' ;;
n) display_type='Text' ;;
L) display_type='ASCII'; display_logo='Yes' ;;
o) overrideOpts="${OPTARG}" ;;
c) detectColors "${OPTARGS}" ;;
d) overrideDisplay="${OPTARG}" ;;
N) no_color='1' ;;
p) portraitSet='Yes' ;;
a) art="${OPTARG}" ;;
:) errorOut "Error: You're missing an argument somewhere. Exiting."; exit 1 ;;
?) errorOut "Error: Invalid flag somewhere. Exiting."; exit 1 ;;
*) errorOut "Error"; exit 1 ;;
esac
done
###################
# End Flags Phase
###################
############################
# Override Options/Display
############################
if [[ "$overrideOpts" ]]; then
verboseOut "Found 'o' flag in syntax. Overriding some script variables..."
OLD_IFS="$IFS"
IFS=";"
for overopt in "${overrideOpts}"; do
eval "${overrideOpts}"
done
IFS="$OLD_IFS"
fi
#########################
# Begin Detection Phase
#########################
# Distro Detection - Begin
detectdistro () {
if [[ -z "${distro}" ]]; then
distro="Unknown"
# LSB Release Check
if type -p lsb_release >/dev/null 2>&1; then
# read distro_detect distro_release distro_codename <<< $(lsb_release -sirc)
distro_detect=( $(lsb_release -sirc) )
if [[ ${#distro_detect[@]} -eq 3 ]]; then
distro_codename=${distro_detect[2]}
distro_release=${distro_detect[1]}
distro_detect=${distro_detect[0]}
else
for ((i=0; i<${#distro_detect[@]}; i++)); do
if [[ ${distro_detect[$i]} =~ ^[[:digit:]]+((.[[:digit:]]+|[[:digit:]]+|)+)$ ]]; then
distro_release=${distro_detect[$i]}
distro_codename=${distro_detect[@]:$(($i+1)):${#distro_detect[@]}+1}
distro_detect=${distro_detect[@]:0:${i}}
break 1
elif [[ ${distro_detect[$i]} =~ [Nn]/[Aa] || ${distro_detect[$i]} == "rolling" ]]; then
distro_release=${distro_detect[$i]}
distro_codename=${distro_detect[@]:$(($i+1)):${#distro_detect[@]}+1}
distro_detect=${distro_detect[@]:0:${i}}
break 1
fi
done
fi
case "${distro_detect}" in
"archlinux"|"Arch Linux"|"arch"|"Arch"|"archarm")
distro="Arch Linux"
distro_release="n/a"
if grep -q 'antergos' /etc/os-release; then
distro="Antergos"
distro_release="n/a"
fi
if grep -q -i 'logos' /etc/os-release; then
distro="Logos"
distro_release="n/a"
fi
;;
"BLAG")
distro="BLAG"
distro_more="$(head -n1 /etc/fedora-release)"
;;
"Chakra")
distro="Chakra"
distro_release=""
;;
"CentOS") distro="CentOS"
;;
"Chapeau") distro="Chapeau"
;;
"Debian")
if [[ -f /etc/crunchbang-lsb-release || -f /etc/lsb-release-crunchbang ]]; then
distro="CrunchBang"
distro_release=$(awk -F'=' '/^DISTRIB_RELEASE=/ {print $2}' /etc/lsb-release-crunchbang)
distro_codename=$(awk -F'=' '/^DISTRIB_DESCRIPTION=/ {print $2}' /etc/lsb-release-crunchbang)
elif [[ -f /etc/os-release ]]; then
if [[ "$(cat /etc/os-release)" =~ "Raspbian" ]]; then
distro="Raspbian"
distro_release=$(awk -F'=' '/^PRETTY_NAME=/ {print $2}' /etc/os-release)
else
distro="Debian"
fi
else
distro="Debian"
fi
;;
"Raspbian")
distro="Raspbian"
;;
"elementary"|"elementary OS")
distro="elementary OS"
;;
"EvolveOS")
distro="Evolve OS"
;;
"KaOS"|"kaos")
distro="KaOS"
;;
"Fedora")
distro="Fedora"
;;
"frugalware")
distro="Frugalware"
distro_codename=null
distro_release=null
;;
"Fuduntu")
distro="Fuduntu"
distro_codename=null
;;
"Gentoo")
if [[ "$(lsb_release -sd)" =~ "Funtoo" ]]; then
distro="Funtoo"
else
distro="Gentoo"
fi
;;
"gNewSense")
distro="gNewSense"
;;
"Jiyuu Linux")
distro="Jiyuu Linux"
;;
"LinuxDeepin")
distro="LinuxDeepin"
distro_codename=null
;;
"Deepin")
distro="Deepin"
;;
"Kali"|"Debian Kali Linux")
distro="Kali Linux"
;;
"Korora")
distro="Korora"
;;
"Lunar Linux"|"lunar")
distro="Lunar Linux"
;;
"Mageia")
distro="Mageia"
;;
"MandrivaLinux")
distro="Mandriva"
case "${distro_codename}" in
"turtle"|"Henry_Farman"|"Farman"|"Adelie"|"pauillac")
distro="Mandriva-${distro_release}"
distro_codename=null
;;
esac
;;
"ManjaroLinux")
distro="Manjaro"
;;
"NixOS")
distro="NixOS"
;;
"LinuxMint")
distro="Mint"
if [[ "${distro_codename}" == "debian" ]]; then
distro="LMDE"
distro_codename="n/a"
distro_release="n/a"
fi
;;
"SUSE LINUX"|"openSUSE project")
distro="openSUSE"
;;
"Parabola GNU/Linux-libre"|"Parabola")
distro="Parabola GNU/Linux-libre"
distro_codename="n/a"
distro_release="n/a"
;;
"Peppermint")
distro="Peppermint"
distro_codename=null
;;
"CentOS")
distro="Red Hat Enterprise Linux"
;;
"Sabayon")
distro="Sabayon"
;;
"Solus")
distro="Solus"
;;
"Trisquel")
distro="Trisquel"
;;
"Ubuntu")
distro="Ubuntu"
;;
"Viperr")
distro="Viperr"
distro_codename=null
;;
*)
;;
esac
if [[ "${distro_detect}" =~ "RedHatEnterprise" ]]; then distro="Red Hat Enterprise Linux"; fi
if [[ -n ${distro_release} && ${distro_release} != "n/a" ]]; then distro_more="$distro_release"; fi
if [[ -n ${distro_codename} && ${distro_codename} != "n/a" ]]; then distro_more="$distro_more $distro_codename"; fi
if [[ -n ${distro_more} ]]; then
distro_more="${distro} ${distro_more}"
fi
fi
# Existing File Check
if [ "$distro" == "Unknown" ]; then
if [ $(uname -o 2>/dev/null) ]; then
case "$(uname -o)" in
"Cygwin")
distro="Cygwin"
fake_distro="${distro}"
;;
"Haiku")
distro="Haiku"
fake_distro="${distro}"
;;
"GNU/Linux")
if type -p crux >/dev/null 2>&1; then
distro="CRUX"
distro_more="${distro} $(crux | awk '{print $3}')"
fi
if type -p nixos-version >/dev/null 2>&1; then
distro="NixOS"
distro_more="NixOS $(nixos-version)"
fi
;;
esac
fi
if [[ "${distro}" == "Unknown" ]]; then
if [ -f /etc/os-release ]; then
distrib_id=$(/dev/null; then
distro="Mac OS X"
elif [[ -f /var/run/dmesg.boot ]]; then
distro=$(awk 'BEGIN {
distro = "Unknown"
}
{
if ($0 ~ /DragonFly/) {
distro = "DragonFlyBSD"
exit
}
else if ($0 ~ /FreeBSD/) {
distro = "FreeBSD"
exit
}
else if ($0 ~ /NetBSD/) {
distro = "NetBSD"
exit
}
else if ($0 ~ /OpenBSD/) {
distro = "OpenBSD"
exit
}
} END {
print distro
}' /var/run/dmesg.boot)
fi
fi
fi
if [[ "${distro}" == "Unknown" ]] && [[ "${OSTYPE}" == "linux-gnu" || "${OSTYPE}" == "linux" || "${OSTYPE}" == "gnu" ]]; then
if [[ -f /etc/issue ]]; then
distro=$(awk 'BEGIN {
distro = "Unknown"
}
{
if ($0 ~ /"LinuxDeepin"/) {
distro = "LinuxDeepin"
exit
}
else if ($0 ~ /"Parabola GNU\/Linux-libre"/) {
distro = "Parabola GNU/Linux-libre"
exit
}
else if ($0 ~ /"Solus"/) {
distro = "Solus"
exit
}
} END {
print distro
}' /etc/issue)
fi
fi
if [[ "${distro}" == "Unknown" ]] && [[ "${OSTYPE}" == "linux-gnu" || "${OSTYPE}" == "linux" || "${OSTYPE}" == "gnu" ]]; then
if [[ -f /etc/system-release ]]; then
if grep -q "Scientific Linux" /etc/system-release; then
distro="Scientific Linux"
fi
fi
fi
fi
fi
if [[ "${distro}" != "Haiku" ]]; then
if [[ ${BASH_VERSINFO[0]} -ge 4 ]]; then
if [[ ${BASH_VERSINFO[0]} -eq 4 && ${BASH_VERSINFO[1]} -gt 1 ]] || [[ ${BASH_VERSINFO[0]} -gt 4 ]]; then
distro=${distro,,}
else
distro="$(tr '[:upper:]' '[:lower:]' <<< ${distro})"
fi
else
distro="$(tr '[:upper:]' '[:lower:]' <<< ${distro})"
fi
fi
case $distro in
antergos) distro="Antergos" ;;
arch*linux*old) distro="Arch Linux - Old" ;;
arch|arch*linux) distro="Arch Linux" ;;
dragora) distro="Dragora" ;;
elementary|'elementary os') distro="elementary OS";;
evolveos) distro="Evolve OS" ;;
fedora) distro="Fedora" ;;
gnewsense) distro="gNewSense" ;;
korora) distro="Korora" ;;
blag) distro="BLAG" ;;
chapeau) distro="Chapeau" ;;
crux) distro="CRUX" ;;
mageia) distro="Mageia" ;;
mandriva) distro="Mandriva" ;;
mandrake) distro="Mandrake" ;;
mint) distro="Mint" ;;
nix|nix*os) distro="NixOS" ;;
kali*linux) distro="Kali Linux" ;;
lmde) distro="LMDE" ;;
lunar|lunar*linux) distro="Lunar Linux";;
opensuse) distro="openSUSE" ;;
ubuntu) distro="Ubuntu" ;;
debian) distro="Debian" ;;
raspbian) distro="Raspbian" ;;
freebsd) distro="FreeBSD" ;;
freebsd*old) distro="FreeBSD - Old" ;;
logos) distro="Logos" ;;
openbsd) distro="OpenBSD" ;;
dragonflybsd) distro="DragonFlyBSD" ;;
netbsd) distro="NetBSD" ;;
red*hat*) distro="Red Hat Enterprise Linux" ;;
crunchbang) distro="CrunchBang" ;;
gentoo) distro="Gentoo" ;;
funtoo) distro="Funtoo" ;;
sabayon) distro="Sabayon" ;;
slackware) distro="Slackware" ;;
frugalware) distro="Frugalware" ;;
peppermint) distro="Peppermint" ;;
solus) distro="Solus" ;;
trisquel) distro="Trisquel";;
parabolagnu|parabolagnu/linux-libre|'parabola gnu/linux-libre'|parabola) distro="Parabola GNU/Linux-libre" ;;
viperr) distro="Viperr" ;;
void) distro="Void" ;;
kaos) distro="KaOS";;
linuxdeepin) distro="LinuxDeepin" ;;
deepin) distro="Deepin" ;;
chakra) distro="Chakra" ;;
centos) distro="CentOS" ;;
mac*os*x) distro="Mac OS X" ;;
fuduntu) distro="Fuduntu" ;;
manjaro) distro="Manjaro" ;;
cygwin) distro="Cygwin" ;;
haiku) distro="Haiku" ;;
esac
verboseOut "Finding distro...found as '${distro} ${distro_release}'"
}
# Distro Detection - End
# Host and User detection - Begin
detecthost () {
myUser=${USER}
myHost=${HOSTNAME}
if [[ "${distro}" == "Mac OS X" ]]; then myHost=${myHost/.local}; fi
verboseOut "Finding hostname and user...found as '${myUser}@${myHost}'"
}
# Find Number of Running Processes
# processnum="$(( $( ps aux | wc -l ) - 1 ))"
# Kernel Version Detection - Begin
detectkernel () {
kernel=( $(uname -srm) )
kernel="${kernel[${#kernel[@]}-1]} ${kernel[@]:0:${#kernel[@]}-1}"
verboseOut "Finding kernel version...found as '${kernel}'"
}
# Kernel Version Detection - End
# Uptime Detection - Begin
detectuptime () {
unset uptime
if [[ "${distro}" == "Mac OS X" || "${distro}" == "FreeBSD" ]]; then
boot=$(sysctl -n kern.boottime | cut -d "=" -f 2 | cut -d "," -f 1)
now=$(date +%s)
uptime=$(($now-$boot))
elif [[ "${distro}" == "OpenBSD" ]]; then
boot=$(sysctl -n kern.boottime)
now=$(date +%s)
uptime=$((${now} - ${boot}))
elif [[ "${distro}" == "Haiku" ]]; then
uptime=$(uptime | cut -d ',' -f2,3 | sed 's/ up //; s/ hour,/h/; s/ minutes/m/;')
else
if [[ -f /proc/uptime ]]; then
uptime=$(/dev/null 2>&1; then
port_pkgs=$(port installed 2>/dev/null | wc -l)
pkgs=$((${pkgs} + (${port_pkgs} -1)))
fi
if type -p brew >/dev/null 2>&1; then
brew_pkgs=$(brew list -1 2>/dev/null | wc -l)
pkgs=$((${pkgs} + ${brew_pkgs}))
fi
;;
'OpenBSD')
pkgs=$(pkg_info | wc -l | awk '{sub(" ", "");print $1}')
if type -p portmaster >/dev/null 2>&1; then
ports=$(portmaster -l | grep -Eo '[0-9]+ total installed' | sed 's/ total installed//')
pkgs=$((${pkgs} + ${ports}))
fi
;;
'FreeBSD')
pkgs=$(if TMPDIR=/dev/null ASSUME_ALWAYS_YES=1 PACKAGESITE=file:///nonexistent pkg info pkg >/dev/null 2>&1; then
pkg info | wc -l | awk '{print $1}'; else pkg_info | wc -l | awk '{sub(" ", "");print $1}'; fi)
;;
'Cygwin')
cygfix=2
pkgs=$(($(cygcheck -cd | wc -l) - ${cygfix}))
if [ -d "/cygdrive/c/ProgramData/chocolatey/lib" ]; then
chocopkgs=$(( $(ls -1 /cygdrive/c/ProgramData/chocolatey/lib | wc -l) ))
pkgs=$((${pkgs} + ${chocopkgs}))
fi
;;
esac
verboseOut "Finding current package count...found as '$pkgs'"
}
# CPU Detection - Begin
detectcpu () {
REGEXP="-r"
if [ "$distro" == "Mac OS X" ]; then
cpu=$(machine)
if [[ $cpu == "ppc750" ]]; then
cpu="IBM PowerPC G3"
elif [[ $cpu == "ppc7400" || $cpu == "ppc7450" ]]; then
cpu="IBM PowerPC G4"
elif [[ $cpu == "ppc970" ]]; then
cpu="IBM PowerPC G5"
else
cpu=$(sysctl -n machdep.cpu.brand_string)
fi
REGEXP="-E"
elif [ "$OSTYPE" == "gnu" ]; then
# no /proc/cpuinfo on GNU/Hurd
if [ "$(uname -m | grep 'i*86')" ]; then
cpu="Unknown x86"
else
cpu="Unknown"
fi
elif [[ "$distro" == "FreeBSD" || "$distro" == "DragonflyBSD" ]]; then
cpu=$(sysctl -n hw.model)
elif [ "$distro" == "OpenBSD" ]; then
cpu=$(sysctl -n hw.model | sed 's/@.*//')
elif [ "$distro" == "Haiku" ]; then
cpu=$(sysinfo -cpu | grep 'CPU #0' | cut -d'"' -f2 | sed 's/(tm)//; s/Processor//;')
cpu_mhz=$(sysinfo -cpu | grep 'running at' | awk 'BEGIN{FS="running at "} { print $2; exit }' | cut -d'M' -f1)
if [ $(echo $cpu_mhz) -gt 999 ];then
cpu_ghz=$(awk '{print $1/1000}' <<< "${cpu_mhz}")
cpu="$cpu @ ${cpu_ghz}GHz"
else
cpu="$cpu @ ${cpu_mhz}MHz"
fi
else
cpu=$(awk 'BEGIN{FS=":"} /model name/ { print $2; exit }' /proc/cpuinfo | sed 's/ @/\n/' | head -1)
cpun=$(grep "physical id" /proc/cpuinfo | sort | uniq | wc -l)
if [ -z "$cpu" ]; then
cpu=$(awk 'BEGIN{FS=":"} /Hardware/ { print $2; exit }' /proc/cpuinfo)
fi
if [ -z "$cpu" ]; then
cpu=$(awk 'BEGIN{FS=":"} /^cpu/ { gsub(/ +/," ",$2); print $2; exit}' /proc/cpuinfo | sed 's/, altivec supported//;s/^ //')
if [[ $cpu =~ ^(PPC)*9.+ ]]; then
model="IBM PowerPC G5 "
elif [[ $cpu =~ 740/750 ]]; then
model="IBM PowerPC G3 "
elif [[ $cpu =~ ^74.+ ]]; then
model="Motorola PowerPC G4 "
elif [[ "$(cat /proc/cpuinfo)" =~ "BCM2708" ]]; then
model="Broadcom BCM2835 ARM1176JZF-S"
else
model="IBM PowerPC G3 "
fi
cpu="${model}${cpu}"
fi
loc="/sys/devices/system/cpu/cpu0/cpufreq"
if [ -f ${loc}/bios_limit ];then
cpu_mhz=$(awk '{print $1/1000}' "${loc}/bios_limit")
elif [ -f $loc/scaling_max_freq ];then
cpu_mhz=$(awk '{print $1/1000}' "${loc}/scaling_max_freq")
else
cpu_mhz=$(awk -F':' '/cpu MHz/{ print int($2+.5) }' /proc/cpuinfo | head -n 1)
fi
if [ -n "$cpu_mhz" ];then
if [ $(echo $cpu_mhz | cut -d. -f1) -gt 999 ];then
cpu_ghz=$(awk '{print $1/1000}' <<< "${cpu_mhz}")
cpu="$cpu @ ${cpu_ghz}GHz"
else
cpu="$cpu @ ${cpu_mhz}MHz"
fi
fi
fi
if [[ "${cpun}" -gt "1" ]]; then
cpu=$(sed $REGEXP 's/\([tT][mM]\)|\([Rr]\)|[pP]rocessor//g' <<< "${cpun}x ${cpu}" | xargs)
else
cpu=$(sed $REGEXP 's/\([tT][mM]\)|\([Rr]\)|[pP]rocessor//g' <<< "${cpu}" | xargs)
fi
verboseOut "Finding current CPU...found as '$cpu'"
}
# CPU Detection - End
# GPU Detection - Begin (EXPERIMENTAL!)
detectgpu () {
if [[ "${distro}" == "FreeBSD" ]]; then
gpu_info=$(pciconf -lv 2> /dev/null | grep -B 4 VGA)
gpu_info=$(grep -E 'device.*=.*' <<< "${gpu_info}")
gpu="${gpu_info##*device*= }"
gpu="${gpu//\'}"
# gpu=$(sed 's/.*device.*= //' <<< "${gpu_info}" | sed "s/'//g")
elif [[ "$distro" != "Mac OS X" ]]; then
if [[ -n "$(PATH="/opt/bin:$PATH" type -p nvidia-smi)" ]]; then
gpu=$($(PATH="/opt/bin:$PATH" type -p nvidia-smi | cut -f1) -q | awk -F':' '/Product Name/ {gsub(/: /,":"); print $2}' | sed ':a;N;$!ba;s/\n/, /g')
elif [[ -n "$(PATH="/usr/sbin:$PATH" type -p glxinfo)" && -z "${gpu}" ]]; then
gpu_info=$($(PATH="/usr/sbin:$PATH" type -p glxinfo | cut -f1) 2>/dev/null)
gpu=$(grep "OpenGL renderer string" <<< "${gpu_info}" | cut -d ':' -f2 | sed -n '1h;2,$H;${g;s/\n/,/g;p}')
gpu="${gpu:1}"
gpu_info=$(grep "OpenGL vendor string" <<< "${gpu_info}")
elif [[ -n "$(PATH="/usr/sbin:$PATH" type -p lspci)" && -z "$gpu" ]]; then
gpu_info=$($(PATH="/usr/bin:$PATH" type -p lspci | cut -f1) 2> /dev/null | grep VGA)
gpu=$(grep -oE '\[.*\]' <<< "${gpu_info}" | sed 's/\[//;s/\]//' | sed -n '1h;2,$H;${g;s/\n/, /g;p}')
fi
elif [[ "${distro}" == "Mac OS X" ]]; then
gpu=$(system_profiler SPDisplaysDataType | awk -F': ' '/^\ *Chipset Model:/ {print $2}' | awk '{ printf "%s / ", $0 }' | sed -e 's/\/ $//g')
elif [[ "${distro}" == "Cygwin" ]]; then
gpu=$(wmic path Win32_VideoController get caption)
gpu=$(tail -1 <<< ${gpu})
fi
if [ -n "$gpu" ];then
if [ $(grep -i nvidia <<< "${gpu_info}" | wc -l) -gt 0 ];then
gpu_info="NVidia "
elif [ $(grep -i intel <<< "${gpu_info}" | wc -l) -gt 0 ];then
gpu_info="Intel "
elif [ $(grep -i amd <<< "${gpu_info}" | wc -l) -gt 0 ];then
gpu_info="AMD "
elif [[ $(grep -i ati <<< "${gpu_info}" | wc -l) -gt 0 || $(grep -i radeon <<< "${gpu_info}" | wc -l) -gt 0 ]]; then
gpu_info="ATI "
else
gpu_info=$(cut -d ':' -f2 <<< "${gpu_info}")
gpu_info="${gpu_info:1} "
fi
gpu="${gpu}"
else
gpu="Not Found"
fi
verboseOut "Finding current GPU...found as '$gpu'"
}
# GPU Detection - End
# Disk Usage Detection - Begin
detectdisk () {
diskusage="Unknown"
if type -p df >/dev/null 2>&1; then
if [[ "${distro}" =~ (Free|Net|Open|DragonFly)BSD ]]; then
totaldisk=$(df -h -c 2>/dev/null | tail -1)
elif [[ "${distro}" == "Mac OS X" ]]; then
totaldisk=$(df -H / 2>/dev/null | tail -1)
else
totaldisk=$(df -h --total 2>/dev/null | tail -1)
fi
disktotal=$(awk '{print $2}' <<< "${totaldisk}")
diskused=$(awk '{print $3}' <<< "${totaldisk}")
diskusedper=$(awk '{print $5}' <<< "${totaldisk}")
diskusage="${diskused} / ${disktotal} (${diskusedper})"
diskusage_verbose=$(sed 's/%/%%/' <<< $diskusage)
fi
verboseOut "Finding current disk usage...found as '$diskusage_verbose'"
}
# Disk Usage Detection - End
# Memory Detection - Begin
detectmem () {
hw_mem=0
free_mem=0
human=1024
if [ "$distro" == "Mac OS X" ]; then
totalmem=$(echo "$(sysctl -n hw.memsize)"/${human}^2|bc)
wiredmem=$(vm_stat | grep wired | awk '{ print $4 }' | sed 's/\.//')
activemem=$(vm_stat | grep ' active' | awk '{ print $3 }' | sed 's/\.//')
compressedmem=$(vm_stat | grep occupied | awk '{ print $5 }' | sed 's/\.//')
usedmem=$(((${wiredmem} + ${activemem} + ${compressedmem}) * 4 / $human))
elif [ "$distro" == "Cygwin" ]; then
total_mem=$(awk '/MemTotal/ { print $2 }' /proc/meminfo)
totalmem=$((${total_mem}/$human))
free_mem=$(awk '/MemFree/ { print $2 }' /proc/meminfo)
used_mem=$((${total_mem} - ${free_mem}))
usedmem=$((${used_mem} / $human))
elif [ "$distro" == "FreeBSD" ]; then
phys_mem=$(sysctl -n hw.physmem)
size_mem=$phys_mem
size_chip=1
guess_chip=`echo "$size_mem / 8 - 1" | bc`
while [ $guess_chip != 0 ]; do
guess_chip=`echo "$guess_chip / 2" | bc`
size_chip=`echo "$size_chip * 2" | bc`
done
round_mem=`echo "( $size_mem / $size_chip + 1 ) * $size_chip " | bc`
totalmem=$(($round_mem / ($human * $human) ))
pagesize=$(sysctl -n hw.pagesize)
inactive_count=$(sysctl -n vm.stats.vm.v_inactive_count)
inactive_mem=$(($inactive_count * $pagesize))
cache_count=$(sysctl -n vm.stats.vm.v_cache_count)
cache_mem=$(($cache_count * $pagesize))
free_count=$(sysctl -n vm.stats.vm.v_free_count)
free_mem=$(($free_count * $pagesize))
avail_mem=$(($inactive_mem + $cache_mem + $free_mem))
used_mem=$(($round_mem - $avail_mem))
usedmem=$(($used_mem / ($human * $human) ))
elif [ "$distro" == "OpenBSD" ]; then
totalmem=$(dmesg | grep 'real mem' | cut -d' ' -f5 | tr -d '()MB')
usedmem=$(top -1 1 | awk '/Real:/ {print $3}' | sed 's/M.*//')
elif [ "$distro" == "NetBSD" ]; then
phys_mem=$(awk '/MemTotal/ { print $2 }' /proc/meminfo)
totalmem=$((${phys_mem} / $human))
if grep -q 'Cached' /proc/meminfo; then
cache=$(awk '/Cached/ {print $2}' /proc/meminfo)
usedmem=$((${cache} / $human))
else
free_mem=$(awk '/MemFree/ { print $2 }' /proc/meminfo)
used_mem=$((${phys_mem} - ${free_mem}))
usedmem=$((${used_mem} / $human))
fi
elif [ "$distro" == "Haiku" ]; then
totalmem=$(( $(sysinfo -mem | head -n1 | cut -d'/' -f3 | tr -d ' ' | tr -d ')') / $human / $human ))
usedmem=$(( $(sysinfo -mem | head -n1 | cut -d'/' -f2 | sed 's/max//; s/ //g') / $human / $human ))
else
mem_info=$(&1 )"
;;
*)
version_data="$( $1 $get_version 2>/dev/null )"
;;
esac
if [[ -n $version_data ]];then
version=$(awk '
BEGIN {
IGNORECASE=1
}
/'$2'/ {
gsub(/(,|v|V)/, "",$'$3')
if ($2 ~ /[Bb][Aa][Ss][Hh]/) {
gsub(/\(.*|-release|-version\)/,"",$4)
}
print $'$3'
exit # quit after first match prints
}' <<< "$version_data")
fi
echo "$version"
}
detectshell () {
if [[ ! "${shell_type}" ]]; then
if [[ "${distro}" == "Cygwin" || "${distro}" == "Haiku" || "${OSTYPE}" == "gnu" ]]; then
shell_type=$(echo "$SHELL" | awk -F'/' '{print $NF}')
else
if [[ "${OSTYPE}" == "linux-gnu" || "${OSTYPE}" == "linux" ]]; then
shell_type=$(ps -p $PPID -o cmd --no-heading)
elif [[ "${distro}" == "Mac OS X" || "${distro}" == "FreeBSD" || "${distro}" == "OpenBSD" ]]; then
shell_type=$(ps -p $PPID -o args | tail -1)
else
shell_type=$(ps -p $(ps -p $PPID | awk '$1 !~ /PID/ {print $1}') | awk 'FNR>1 {print $1}')
fi
shell_type=${shell_type/-}
shell_type=${shell_type//*\/}
fi
fi
case $shell_type in
bash)
shell_version_data=$( detectshell_ver "$shell_type" "^GNU.bash,.version" "4" )
;;
csh)
shell_version_data=$( detectshell_ver "$shell_type" "$shell_type" "3" )
;;
dash)
shell_version_data=$( detectshell_ver "$shell_type" "$shell_type" "3" )
;;
ksh)
shell_version_data=$( detectshell_ver "$shell_type" "version" "5" )
;;
tcsh)
shell_version_data=$( detectshell_ver "$shell_type" "^tcsh" "2" )
;;
zsh)
shell_version_data=$( detectshell_ver "$shell_type" "^zsh" "2" )
;;
esac
if [[ -n $shell_version_data ]];then
shell_type="$shell_type $shell_version_data"
fi
myShell=${shell_type}
verboseOut "Finding current shell...found as '$myShell'"
}
# Shell Detection - End
# Resolution Detection - Begin
detectres () {
if [[ ${distro} != "Mac OS X" && ${distro} != "Cygwin" ]]; then
if [[ -n ${DISPLAY} ]]; then
if type -p xdpyinfo >/dev/null 2>&1; then
if [[ "$distro" =~ "BSD" ]]; then
xResolution=$(xdpyinfo | sed -n 's/.*dim.* \([0-9]*x[0-9]*\) .*/\1/pg' | tr '\n' ' ')
else
xResolution=$(xdpyinfo | sed -n 's/.*dim.* \([0-9]*x[0-9]*\) .*/\1/pg' | sed ':a;N;$!ba;s/\n/ /g')
fi
fi
fi
elif [[ ${distro} == "Mac OS X" ]]; then
xResolution=$(system_profiler SPDisplaysDataType | awk '/Resolution:/ {print $2"x"$4" "}')
if [[ "$(echo $xResolution | wc -l)" -ge 1 ]]; then
xResolution=$(echo $xResolution | tr "\\n" "," | sed 's/\(.*\),/\1/')
fi
elif [[ "${distro}" == "Cygwin" ]]; then
width=($(wmic desktopmonitor get screenwidth | grep -vE '[a-z]+' | tr '\r\n' ' '))
height=($(wmic desktopmonitor get screenheight | grep -vE '[a-z]+' | tr '\r\n' ' '))
xResolution=""
len=${#width[@]}
delim=" "
for ((i=0;i/dev/null 2>&1;then
xprop_root="$(xprop -root 2>/dev/null)"
if [[ -n ${xprop_root} ]]; then
DE=$(echo "${xprop_root}" | awk 'BEGIN {
de = "Not Present"
}
{
if ($1 ~ /^_DT_SAVE_MODE/) {
de = $NF
gsub(/\"/,"",de)
de = toupper(de)
exit
}
else if ($1 ~/^KDE_SESSION_VERSION/) {
de = "KDE"$NF
exit
}
else if ($1 ~ /^_MARCO/) {
de = "MATE"
exit
}
else if ($1 ~ /^_MUFFIN/) {
de = "Cinnamon"
exit
}
else if ($0 ~ /"xfce4"/) {
de = "XFCE4"
exit
}
else if ($0 ~ /"xfce5"/) {
de = "XFCE5"
exit
}
} END {
print de
}')
fi
fi
if [[ ${DE} == "Not Present" ]]; then
# Lets use xdg-open code for Gnome/Enlightment/KDe/Lxde/Mate/XFCE detection
# http://bazaar.launchpad.net/~vcs-imports/xdg-utils/master/view/head:/scripts/xdg-utils-common.in#L251
if [ -n "${XDG_CURRENT_DESKTOP}" ]; then
case "${XDG_CURRENT_DESKTOP}" in
ENLIGHTENMENT)
DE=Enlightenment;
;;
GNOME)
DE=Gnome;
;;
KDE)
DE=KDE;
;;
LUMINA)
DE=Lumina;
;;
LXDE)
DE=LXDE;
;;
MATE)
DE=Mate;
;;
XFCE)
DE=XFCE
;;
'X-Cinnamon')
DE=Cinnamon
;;
Unity)
DE=Unity
;;
esac
fi
if [ x"$DE" = x"" ]; then
# classic fallbacks
if [ x"$KDE_FULL_SESSION" != x"" ]; then DE=KDE;
elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=Gnome;
elif [ x"$MATE_DESKTOP_SESSION_ID" != x"" ]; then DE=MATE;
elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/null 2>&1` ; then DE=Gnome;
elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=XFCE;
elif xprop -root 2> /dev/null | grep -i '^xfce_desktop_window' >/dev/null 2>&1; then DE=XFCE
elif echo $DESKTOP | grep -q '^Enlightenment'; then DE=Enlightenment;
fi
fi
if [ x"$DE" = x"" ]; then
# fallback to checking $DESKTOP_SESSION
case "$DESKTOP_SESSION" in
gnome)
DE=Gnome;
;;
LUMINA)
DE=Lumina;
;;
LXDE|Lubuntu)
DE=LXDE;
;;
MATE)
DE=MATE;
;;
xfce|xfce4|'Xfce Session')
DE=XFCE;
;;
'budgie-desktop')
DE=Budgie
;;
Cinnamon)
DE=Cinnamon
;;
esac
fi
if [ x"$GDMSESSION" = x"" ]; then
# fallback to checking $GDMSESSION
case "$GDMSESSION" in
Lumina*|LUMINA*|lumina*)
DE=Lumina
;;
MATE|mate)
DE=MATE
;;
esac
fi
if [[ ${DE} == "Gnome" ]]; then
if type -p xprop >/dev/null 2>&1; then
if xprop -name "unity-launcher" >/dev/null 2>&1; then
DE="Unity"
elif xprop -name "launcher" >/dev/null 2>&1 &&
xprop -name "panel" >/dev/null 2>&1; then
DE="Unity"
fi
fi
fi
if [[ ${DE} == "KDE" ]]; then
if [[ -n ${KDE_SESSION_VERSION} ]]; then
if [[ ${KDE_SESSION_VERSION} == '5' ]]; then
DE="KDE5"
elif [[ ${KDE_SESSION_VERSION} == '4' ]]; then
DE="KDE4"
fi
elif [[ -n ${KDE_FULL_SESSION} ]]; then
if [[ ${KDE_FULL_SESSION} == 'true' ]]; then
DE="KDE"
DEver_data=$( kded --version 2>/dev/null )
DEver=$( grep -si '^KDE:' <<< "$DEver_data" | awk '{print $2}' )
fi
fi
fi
fi
if [[ ${DE} != "Not Present" ]]; then
if [[ ${DE} == "Cinnamon" ]]; then
if type -p >/dev/null 2>&1; then
DEver=$(cinnamon --version)
DE="${DE} ${DEver//* }"
fi
elif [[ ${DE} == "Gnome" || ${DE} == "GNOME" ]]; then
if type -p gnome-session >/dev/null 2>&1; then
DEver=$(gnome-session --version 2> /dev/null)
DE="${DE} ${DEver//* }"
elif type -p gnome-session-properties >/dev/null 2>&1; then
DEver=$(gnome-session-properties --version 2> /dev/null)
DE="${DE} ${DEver//* }"
fi
elif [[ ${DE} == "KDE4" || ${DE} == "KDE5" ]]; then
if type -p kded${DE#KDE} >/dev/null 2>&1; then
DEver=$(kded${DE#KDE} --version)
for l in $(echo "${DEver// /_}"); do
if [[ ${l//:*} == "KDE_Development_Platform" ]]; then
DEver=${l//*:_}
DE="KDE ${DEver//_*}"
fi;
done
fi
elif [[ ${DE} == "Lumina" ]]; then
if type -p Lumina-DE.real >/dev/null 2>&1; then
lumina="$(type -p Lumina-DE.real)"
elif type -p Lumina-DE >/dev/null 2>&1; then
lumina="$(type -p Lumina-DE)"
fi
if [[ x"$lumina" != x ]]; then
if grep -e '--version' "$lumina" >/dev/null; then
DEver=$("$lumina" --version 2>&1 | tr -d \")
DE="${DE} ${DEver}"
fi
fi
elif [[ ${DE} == "MATE" ]]; then
if type -p mate-session >/dev/null 2>&1; then
DEver=$(mate-session --version)
DE="${DE} ${DEver//* }"
fi
elif [[ ${DE} == "Unity" ]]; then
if type -p unity >/dev/null 2>&1; then
DEver=$(unity --version)
DE="${DE} ${DEver//* }"
fi
fi
fi
if [[ "${DE}" == "Not Present" ]]; then
if pgrep -U ${UID} lxsession >/dev/null 2>&1; then
DE="LXDE"
if type -p lxpanel >/dev/null 2>&1; then
DEver=$(lxpanel -v)
DE="${DE} $DEver"
fi
elif pgrep -U ${UID} razor-session >/dev/null 2>&1; then
DE="RazorQt"
elif pgrep -U ${UID} dtsession >/dev/null 2>&1; then
DE="CDE"
fi
fi
fi
elif [[ "${distro}" == "Mac OS X" ]]; then
if ps -U ${USER} | grep [F]inder >/dev/null 2>&1; then
DE="Aqua"
fi
elif [[ "${distro}" == "Cygwin" ]]; then
winver=`wmic os get version | grep -o '^[0-9]'`
if [ "$winver" == "7" ]; then DE='Aero'
elif [ "$winver" == "6" ]; then DE='Aero'
else DE='Luna'; fi
fi
verboseOut "Finding desktop environment...found as '$DE'"
}
### DE Detection - End
# WM Detection - Begin
detectwm () {
WM="Not Found"
if [[ ${distro} != "Mac OS X" && ${distro} != "Cygwin" ]]; then
if [[ -n ${DISPLAY} ]]; then
for each in "${wmnames[@]}"; do
PID="$(pgrep -U ${UID} "^$each$")"
if [ "$PID" ]; then
case $each in
'2bwm') WM="2bwm";;
'9wm') WM="9wm";;
'awesome') WM="Awesome";;
'beryl') WM="Beryl";;
'bspwm') WM="bspwm";;
'blackbox') WM="BlackBox";;
'budgie-wm') WM="BudgieWM";;
'cinnamon') WM="Muffin";;
'compiz') WM="Compiz";;
'dminiwm') WM="dminiwm";;
'dwm') WM="dwm";;
'dtwm') WM="dtwm";;
'e16') WM="E16";;
'emerald') WM="Emerald";;
'enlightenment') WM="E17";;
'fluxbox') WM="FluxBox";;
'fvwm') WM="FVWM";;
'herbstluftwm') WM="herbstluftwm";;
'icewm') WM="IceWM";;
'kwin') WM="KWin";;
'metacity') WM="Metacity";;
'monsterwm') WM="monsterwm";;
'musca') WM="Musca";;
'notion') WM="Notion";;
'openbox') WM="OpenBox";;
'pekwm') WM="PekWM";;
'ratpoison') WM="Ratpoison";;
'sawfish') WM="Sawfish";;
'scrotwm') WM="ScrotWM";;
'spectrwm') WM="SpectrWM";;
'stumpwm') WM="StumpWM";;
'subtle') WM="subtle";;
'swm') WM="swm";;
'wmaker') WM="WindowMaker";;
'wmfs') WM="WMFS";;
'wmii') WM="wmii";;
'xfwm4') WM="Xfwm4";;
'i3') WM="i3";;
'xmonad.*') WM="XMonad";;
esac
fi
if [[ ${WM} != "Not Found" ]]; then
break 1
fi
done
if [[ ${WM} == "Not Found" ]]; then
if type -p xprop >/dev/null 2>&1; then
WM=$(xprop -root _NET_SUPPORTING_WM_CHECK)
if [[ "$WM" =~ 'not found' ]]; then
WM="Not Found"
elif [[ "$WM" =~ 'Not found' ]]; then
WM="Not Found"
elif [[ "$WM" =~ '[Ii]nvalid window id format' ]]; then
WM="Not Found"
elif [[ "$WM" =~ "no such" ]]; then
WM="Not Found"
else
WM=${WM//* }
WM=$(xprop -id ${WM} 8s _NET_WM_NAME)
WM=$(echo $(WM=${WM//*= }; echo ${WM//\"}))
fi
fi
else
if [[ ${BASH_VERSINFO[0]} -ge 4 ]]; then
if [[ ${BASH_VERSINFO[0]} -eq 4 && ${BASH_VERSINFO[1]} -gt 1 ]] || [[ ${BASH_VERSINFO[0]} -gt 4 ]]; then
WM=${WM,,}
else
WM="$(tr '[:upper:]' '[:lower:]' <<< ${WM})"
fi
else
WM="$(tr '[:upper:]' '[:lower:]' <<< ${WM})"
fi
case ${WM} in
'2bwm') WM="2bwm";;
'awesome') WM="Awesome";;
'beryl') WM="Beryl";;
'blackbox') WM="BlackBox";;
'budgiewm') WM="BudgieWM";;
'cinnamon') WM="Cinnamon";;
'compiz') WM="Compiz";;
'dminiwm') WM="dminiwm";;
'dwm') WM="dwm";;
'e16') WM="E16";;
'echinus') WM="echinus";;
'emerald') WM="Emerald";;
'enlightenment') WM="E17";;
'fluxbox') WM="FluxBox";;
'fvwm') WM="FVWM";;
'herbstluftwm') WM="herbstluftwm";;
'icewm') WM="IceWM";;
'kwin') WM="KWin";;
'metacity') WM="Metacity";;
'monsterwm') WM="monsterwm";;
'musca') WM="Musca";;
*'gala'*) WM="Gala";;
'mutter'*) WM="Mutter";;
'gnome shell'*) WM="Mutter";;
'muffin') WM="Muffin";;
'notion') WM="Notion";;
'openbox') WM="OpenBox";;
'pekwm') WM="PekWM";;
'ratpoison') WM="Ratpoison";;
'sawfish') WM="Sawfish";;
'scrotwm') WM="ScrotWM";;
'spectrwm') WM="SpectrWM";;
'stumpwm') WM="StumpWM";;
'subtle') WM="subtle";;
'swm') WM="swm";;
'wmaker') WM="WindowMaker";;
'wmfs') WM="WMFS";;
'wmii') WM="wmii";;
'xfwm4') WM="Xfwm4";;
'xmonad') WM="XMonad";;
'i3') WM="i3";;
esac
fi
fi
elif [[ ${distro} == "Mac OS X" && "${WM}" == "Not Found" ]]; then
if ps -U ${USER} | grep Finder >/dev/null 2>&1; then
WM="Quartz Compositor"
fi
elif [[ "${distro}" == "Cygwin" ]]; then
bugn=$(tasklist | grep -o 'bugn' | tr -d '\r \n')
wind=$(tasklist | grep -o 'Windawesome' | tr -d '\r \n')
if [ "$bugn" = "bugn" ]; then WM="bug.n"
elif [ "$wind" = "Windawesome" ]; then WM="Windawesome"
else WM="DWM"; fi
fi
verboseOut "Finding window manager...found as '$WM'"
}
# WM Detection - End
# WM Theme Detection - BEGIN
detectwmtheme () {
Win_theme="Not Found"
case $WM in
'2bwm') Win_theme="Not Applicable";;
'9wm') Win_theme="Not Applicable";;
'Awesome') if [ -f ${XDG_CONFIG_HOME:-${HOME}/.config}/awesome/rc.lua ]; then Win_theme="$(grep -e '^[^-].*\(theme\|beautiful\).*lua' ${XDG_CONFIG_HOME:-${HOME}/.config}/awesome/rc.lua | grep '[a-zA-Z0-9]\+/[a-zA-Z0-9]\+.lua' -o | cut -d'/' -f1 | head -n1)"; fi;;
'BlackBox') if [ -f $HOME/.blackboxrc ]; then Win_theme="$(awk -F"/" '/styleFile/ {print $NF}' $HOME/.blackboxrc)"; fi;;
'Beryl') Win_theme="Not Applicable";;
'bspwm') Win_theme="Not Applicable";;
'BudgieWM')
Win_theme="$(gsettings get org.gnome.desktop.wm.preferences theme)"
Win_theme="${Win_theme//\'}"
;;
'Cinnamon'|'Muffin')
de_theme="$(gsettings get org.cinnamon.theme name)"
de_theme=${de_theme//"'"}
win_theme="$(gsettings get org.cinnamon.desktop.wm.preferences theme)"
win_theme=${win_theme//"'"}
Win_theme="${de_theme} (${win_theme})"
;;
'Compiz'|'Mutter'*|'GNOME Shell'|'Gala')
if type -p gsettings >/dev/null 2>&1; then
Win_theme="$(gsettings get org.gnome.desktop.wm.preferences theme)"
Win_theme=${Win_theme//"'"}
elif type -p gconftool-2 >/dev/null 2>&1; then
Win_theme=$(gconftool-2 -g /apps/metacity/general/theme)
fi
;;
'dminiwm') Win_theme="Not Applicable";;
'dwm') Win_theme="Not Applicable";;
'E16') Win_theme="$(awk -F"= " '/theme.name/ {print $2}' $HOME/.e16/e_config--0.0.cfg)";;
'E17'|'Enlightenment')
if [ "$(which eet 2>/dev/null)" ]; then
econfig="$(eet -d $HOME/.e/e/config/standard/e.cfg config | awk '/value \"file\" string.*.edj/{ print $4 }')"
econfigend="${econfig##*/}"
Win_theme=${econfigend%.*}
fi
;;
#E17 doesn't store cfg files in text format so for now get the profile as opposed to theme. atyoung
#TODO: Find a way to extract and read E17 .cfg files ( google seems to have nothing ). atyoung
'E17') Win_theme=${E_CONF_PROFILE};;
'echinus') Win_theme="Not Applicable";;
'Emerald') if [ -f $HOME/.emerald/theme/theme.ini ]; then Win_theme="$(for a in /usr/share/emerald/themes/* $HOME/.emerald/themes/*; do cmp "$HOME/.emerald/theme/theme.ini" "$a/theme.ini" &>/dev/null && basename "$a"; done)"; fi;;
'Finder') Win_theme="Not Applicable";;
'FluxBox'|'Fluxbox') if [ -f $HOME/.fluxbox/init ]; then Win_theme="$(awk -F"/" '/styleFile/ {print $NF}' $HOME/.fluxbox/init)"; fi;;
'FVWM') Win_theme="Not Applicable";;
'i3') Win_theme="Not Applicable";;
'IceWM') if [ -f $HOME/.icewm/theme ]; then Win_theme="$(awk -F"[\",/]" '!/#/ {print $2}' $HOME/.icewm/theme)"; fi;;
'KWin'*)
if [[ -z $KDE_CONFIG_DIR ]]; then
if type -p kde5-config >/dev/null 2>&1; then
KDE_CONFIG_DIR=$(kde5-config --localprefix)
elif type -p kde4-config >/dev/null 2>&1; then
KDE_CONFIG_DIR=$(kde4-config --localprefix)
elif type -p kde-config >/dev/null 2>&1; then
KDE_CONFIG_DIR=$(kde-config --localprefix)
fi
fi
if [[ -n $KDE_CONFIG_DIR ]]; then
KDE_CONFIG_DIR=${KDE_CONFIG_DIR%/}
if [[ -f $KDE_CONFIG_DIR/share/config/kwinrc ]]; then
Win_theme=$(awk '/PluginLib=kwin3_/{gsub(/PluginLib=kwin3_/,"",$0); print $0; exit}' $KDE_CONFIG_DIR/share/config/kwinrc)
fi
if [[ -z $Win_theme ]]; then
if [[ -f $KDE_CONFIG_DIR/share/config/kdebugrc ]]; then
Win_theme=$(awk '/(decoration)/ {gsub(/\[/,"",$1); print $1; exit}' $KDE_CONFIG_DIR/share/config/kdebugrc)
if [[ -z $Win_theme ]]; then
Win_theme="Not Applicable"
fi
else
Win_theme="Not Applicable"
fi
fi
if [[ $Win_theme != 'Not Applicable' ]]; then
if [[ ${BASH_VERSINFO[0]} -ge 4 ]]; then
if [[ ${BASH_VERSINFO[0]} -eq 4 && ${BASH_VERSINFO[1]} -gt 1 ]] || [[ ${BASH_VERSINFO[0]} -gt 4 ]]; then
Win_theme=${Win_theme^}
else
Win_theme="$(tr '[:lower:]' '[:upper:]' <<< ${Win_theme:0:1})${Win_theme:1}"
fi
else
Win_theme="$(tr '[:lower:]' '[:upper:]' <<< ${Win_theme:0:1})${Win_theme:1}"
fi
fi
fi
;;
'Marco')
Win_theme="$(gsettings get org.mate.Marco.general theme)"
Win_theme=${Win_theme//"'"}
;;
'Metacity') if [ "`gconftool-2 -g /apps/metacity/general/theme`" ]; then Win_theme="$(gconftool-2 -g /apps/metacity/general/theme)"; fi ;;
'monsterwm') Win_theme="Not Applicable";;
'Musca') Win_theme="Not Applicable";;
'Notion') Win_theme="Not Applicable";;
'OpenBox'|'Openbox')
if [ -f ${XDG_CONFIG_HOME:-${HOME}/.config}/openbox/rc.xml ]; then
Win_theme="$(awk -F"[<,>]" '/]" '//dev/null 2>&1; then
if [ -f ~/Library/Preferences/com.googlecode.iterm2.plist ]; then
gtkFont=$(str1=$(defaults read com.googlecode.iTerm2|grep -m 1 "Normal Font");echo ${str1:29:${#str1}-29-2})
fi
fi
else
case $DE in
'KDE'*) # Desktop Environment found as "KDE"
if type - p kde4-config >/dev/null 2>&1; then
KDE_CONFIG_DIR=$(kde4-config --localprefix)
if [[ -d ${KDE_CONFIG_DIR} ]]; then
if [[ -f "${KDE_CONFIG_DIR}/share/config/kdeglobals" ]]; then
KDE_CONFIG_FILE="${KDE_CONFIG_DIR}/share/config/kdeglobals"
fi
fi
elif type -p kde5-config >/dev/null 2>&1; then
KDE_CONFIG_DIR=$(kde5-config --localprefix)
if [[ -d ${KDE_CONFIG_DIR} ]]; then
if [[ -f "${KDE_CONFIG_DIR}/share/config/kdeglobals" ]]; then
KDE_CONFIG_FILE="${KDE_CONFIG_DIR}/share/config/kdeglobals"
fi
fi
elif type -p kde-config >/dev/null 2>&1; then
KDE_CONFIG_DIR=$(kde-config --localprefix)
if [[ -d ${KDE_CONFIG_DIR} ]]; then
if [[ -f "${KDE_CONFIG_DIR}/share/config/kdeglobals" ]]; then
KDE_CONFIG_FILE="${KDE_CONFIG_DIR}/share/config/kdeglobals"
fi
fi
fi
if [[ -n ${KDE_CONFIG_FILE} ]]; then
if grep -q "widgetStyle=" "${KDE_CONFIG_FILE}"; then
gtk2Theme=$(awk -F"=" '/widgetStyle=/ {print $2}' "${KDE_CONFIG_FILE}")
elif grep -q "colorScheme=" "${KDE_CONFIG_FILE}"; then
gtk2Theme=$(awk -F"=" '/colorScheme=/ {print $2}' "${KDE_CONFIG_FILE}")
fi
if grep -q "Theme=" "${KDE_CONFIG_FILE}"; then
gtkIcons=$(awk -F"=" '/Theme=/ {print $2}' "${KDE_CONFIG_FILE}")
fi
if grep -q "Font=" "${KDE_CONFIG_FILE}"; then
gtkFont=$(awk -F"=" '/font=/ {print $2}' "${KDE_CONFIG_FILE}")
fi
fi
if [[ -f $HOME/.gtkrc-2.0 ]]; then
gtk2Theme=$(grep '^gtk-theme-name' $HOME/.gtkrc-2.0 | awk -F'=' '{print $2}')
gtk2Theme=${gtk2Theme//\"/}
gtkIcons=$(grep '^gtk-icon-theme-name' $HOME/.gtkrc-2.0 | awk -F'=' '{print $2}')
gtkIcons=${gtkIcons//\"/}
gtkFont=$(grep 'font_name' $HOME/.gtkrc-2.0 | awk -F'=' '{print $2}')
gtkFont=${gtkFont//\"/}
fi
if [[ -f $HOME/.config/gtk-3.0/settings.ini ]]; then
gtk3Theme=$(grep '^gtk-theme-name=' $HOME/.config/gtk-3.0/settings.ini | awk -F'=' '{print $2}')
fi
;;
'Cinnamon'*) # Desktop Environment found as "Cinnamon"
if type -p gsettings >/dev/null 2>&1; then
gtk3Theme=$(gsettings get org.cinnamon.desktop.interface gtk-theme)
gtk3Theme=${gtk3Theme//"'"}
gtk2Theme=${gtk3Theme}
gtkIcons=$(gsettings get org.cinnamon.desktop.interface icon-theme)
gtkIcons=${gtkIcons//"'"}
gtkFont=$(gsettings get org.cinnamon.desktop.interface font-name)
gtkFont=${gtkFont//"'"}
if [ "$background_detect" == "1" ]; then gtkBackground=$(gsettings get org.gnome.desktop.background picture-uri); fi
fi
;;
'GNOME'*|'Gnome'*|'Unity'*|'Budgie') # Desktop Environment found as "GNOME"
if type -p gsettings >/dev/null 2>&1; then
gtk3Theme=$(gsettings get org.gnome.desktop.interface gtk-theme)
gtk3Theme=${gtk3Theme//"'"}
gtk2Theme=${gtk3Theme}
gtkIcons=$(gsettings get org.gnome.desktop.interface icon-theme)
gtkIcons=${gtkIcons//"'"}
gtkFont=$(gsettings get org.gnome.desktop.interface font-name)
gtkFont=${gtkFont//"'"}
if [ "$background_detect" == "1" ]; then gtkBackground=$(gsettings get org.gnome.desktop.background picture-uri); fi
elif type -p gconftool-2 >/dev/null 2>&1; then
gtk2Theme=$(gconftool-2 -g /desktop/gnome/interface/gtk_theme)
gtkIcons=$(gconftool-2 -g /desktop/gnome/interface/icon_theme)
gtkFont=$(gconftool-2 -g /desktop/gnome/interface/font_name)
if [ "$background_detect" == "1" ]; then
gtkBackgroundFull=$(gconftool-2 -g /desktop/gnome/background/picture_filename)
gtkBackground=$(echo "$gtkBackgroundFull" | awk -F"/" '{print $NF}')
fi
fi
;;
'MATE'*) # MATE desktop environment
#if type -p gsettings >/dev/null 2&>1; then
gtk3Theme=$(gsettings get org.mate.interface gtk-theme)
# gtk3Theme=${gtk3Theme//"'"}
gtk2Theme=${gtk3Theme}
gtkIcons=$(gsettings get org.mate.interface icon-theme)
gtkIcons=${gtkIcons//"'"}
gtkFont=$(gsettings get org.mate.interface font-name)
gtkFont=${gtkFont//"'"}
#fi
;;
'XFCE'*) # Desktop Environment found as "XFCE"
if type -p xfconf-query >/dev/null 2>&1; then
gtk2Theme=$(xfconf-query -c xsettings -p /Net/ThemeName)
fi
if type -p xfconf-query >/dev/null 2>&1; then
gtkIcons=$(xfconf-query -c xsettings -p /Net/IconThemeName)
fi
if type -p xfconf-query >/dev/null 2>&1; then
gtkFont=$(xfconf-query -c xsettings -p /Gtk/FontName)
fi
;;
'LXDE'*)
if [ -f ${XDG_CONFIG_HOME:-${HOME}/.config}/lxde/config ]; then
lxdeconf="/lxde/config"
elif [ "$distro" == "Trisquel" ]; then
lxdeconf=""
elif [ "$distro" == "FreeBSD" ]; then
lxdeconf=""
else
lxdeconf="/lxsession/LXDE/desktop.conf"
fi
# TODO: Clean me.
if grep -q "sNet\/ThemeName" ${XDG_CONFIG_HOME:-${HOME}/.config}$lxdeconf 2>/dev/null; then
gtk2Theme=$(awk -F'=' '/sNet\/ThemeName/ {print $2}' ${XDG_CONFIG_HOME:-${HOME}/.config}$lxdeconf)
fi
if grep -q IconThemeName ${XDG_CONFIG_HOME:-${HOME}/.config}$lxdeconf 2>/dev/null; then
gtkIcons=$(awk -F'=' '/sNet\/IconThemeName/ {print $2}' ${XDG_CONFIG_HOME:-${HOME}/.config}$lxdeconf)
fi
if grep -q FontName ${XDG_CONFIG_HOME:-${HOME}/.config}$lxdeconf 2>/dev/null; then
gtkFont=$(awk -F'=' '/sGtk\/FontName/ {print $2}' ${XDG_CONFIG_HOME:-${HOME}/.config}$lxdeconf)
fi
;;
# /home/me/.config/rox.sourceforge.net/ROX-Session/Settings.xml
*) # Lightweight or No DE Found
if [ -f "$HOME/.gtkrc-2.0" ]; then
if grep -q gtk-theme $HOME/.gtkrc-2.0; then
gtk2Theme=$(awk -F'"' '/^gtk-theme/ {print $2}' $HOME/.gtkrc-2.0)
fi
if grep -q icon-theme $HOME/.gtkrc-2.0; then
gtkIcons=$(awk -F'"' '/^gtk-icon-theme/ {print $2}' $HOME/.gtkrc-2.0)
fi
if grep -q font $HOME/.gtkrc-2.0; then
gtkFont=$(awk -F'"' '/^gtk-font-name/ {print $2}' $HOME/.gtkrc-2.0)
fi
fi
# $HOME/.gtkrc.mine theme detect only
if [ -f "$HOME/.gtkrc.mine" ]; then
if grep -q "^include" $HOME/.gtkrc.mine; then
gtk2Theme=$(grep '^include.*gtkrc' $HOME/.gtkrc.mine | awk -F "/" '{ print $5 }')
fi
if grep -q "^gtk-icon-theme-name" $HOME/.gtkrc.mine; then
gtkIcons=$(grep '^gtk-icon-theme-name' $HOME/.gtkrc.mine | awk -F '"' '{print $2}')
fi
fi
# /etc/gtk-2.0/gtkrc compatability
if [[ -f /etc/gtk-2.0/gtkrc && ! -f $HOME/.gtkrc-2.0 && ! -f $HOME/.gtkrc.mine ]]; then
if grep -q gtk-theme-name /etc/gtk-2.0/gtkrc; then
gtk2Theme=$(awk -F'"' '/^gtk-theme-name/ {print $2}' /etc/gtk-2.0/gtkrc)
fi
if grep -q gtk-fallback-theme-name /etc/gtk-2.0/gtkrc && ! [ "x$gtk2Theme" = "x" ]; then
gtk2Theme=$(awk -F'"' '/^gtk-fallback-theme-name/ {print $2}' /etc/gtk-2.0/gtkrc)
fi
if grep -q icon-theme /etc/gtk-2.0/gtkrc; then
gtkIcons=$(awk -F'"' '/^icon-theme/ {print $2}' /etc/gtk-2.0/gtkrc)
fi
if grep -q gtk-fallback-icon-theme /etc/gtk-2.0/gtkrc && ! [ "x$gtkIcons" = "x" ]; then
gtkIcons=$(awk -F'"' '/^gtk-fallback-icon-theme/ {print $2}' /etc/gtk-2.0/gtkrc)
fi
if grep -q font /etc/gtk-2.0/gtkrc; then
gtkFont=$(awk -F'"' '/^gtk-font-name/ {print $2}' /etc/gtk-2.0/gtkrc)
fi
fi
# EXPERIMENTAL gtk3 Theme detection
if [ -f "$HOME/.config/gtk-3.0/settings.ini" ]; then
if grep -q gtk-theme-name $HOME/.config/gtk-3.0/settings.ini; then
gtk3Theme=$(awk -F'=' '/^gtk-theme-name/ {print $2}' $HOME/.config/gtk-3.0/settings.ini)
fi
fi
# Proper gtk3 Theme detection
#if type -p gsettings >/dev/null 2>&1; then
# gtk3Theme=$(gsettings get org.gnome.desktop.interface gtk-theme 2>/dev/null)
# gtk3Theme=${gtk3Theme//"'"}
#fi
# ROX-Filer icon detect only
if [ -a "${XDG_CONFIG_HOME:-${HOME}/.config}/rox.sourceforge.net/ROX-Filer/Options" ]; then
gtkIcons=$(awk -F'[>,<]' '/^icon_theme/ {print $3}' ${XDG_CONFIG_HOME:-${HOME}/.config}/rox.sourceforge.net/ROX-Filer/Options)
fi
# E17 detection
if [ $E_ICON_THEME ]; then
gtkIcons=${E_ICON_THEME}
gtk2Theme="Not available."
gtkFont="Not available."
fi
# Background Detection (feh, nitrogen)
if [ "$background_detect" == "1" ]; then
if [ -a $HOME/.fehbg ]; then
gtkBackgroundFull=$(awk -F"'" '/feh --bg/{print $2}' $HOME/.fehbg 2>/dev/null)
gtkBackground=$(echo "$gtkBackgroundFull" | awk -F"/" '{print $NF}')
elif [ -a ${XDG_CONFIG_HOME:-${HOME}/.config}/nitrogen/bg-saved.cfg ]; then
gtkBackground=$(awk -F"/" '/file=/ {print $NF}' ${XDG_CONFIG_HOME:-${HOME}/.config}/nitrogen/bg-saved.cfg)
fi
fi
if [ "$distro" == "Cygwin" -a "$gtkFont" == "Not Found" ]; then
if [ -f "$HOME/.minttyrc" ]; then
gtkFont="$(grep '^Font=.*' "$HOME/.minttyrc" | grep -o '[0-9A-z ]*$')"
fi
fi
;;
esac
fi
verboseOut "Finding GTK2 theme...found as '$gtk2Theme'"
verboseOut "Finding GTK3 theme...found as '$gtk3Theme'"
verboseOut "Finding icon theme...found as '$gtkIcons'"
verboseOut "Finding user font...found as '$gtkFont'"
[[ $gtkBackground ]] && verboseOut "Finding background...found as '$gtkBackground'"
}
# GTK Theme\Icon\Font Detection - END
# Android-specific detections
detectdroid () {
distro_ver=$(getprop ro.build.version.release)
hostname=$(getprop net.hostname)
_device=$(getprop ro.product.device)
_model=$(getprop ro.product.model)
device="${_model} (${_device})"
if [[ $(getprop ro.build.host) == "cyanogenmod" ]]; then
rom=$(getprop ro.cm.version)
else
rom=$(getprop ro.build.display.id)
fi
baseband=$(getprop ro.baseband)
cpu=$(grep '^Processor' /proc/cpuinfo)
cpu=$(echo "$cpu" | sed 's/Processor.*: //')
}
#######################
# End Detection Phase
#######################
takeShot () {
if [[ -z $screenCommand ]]; then
if [[ "${upload}" == "1" ]]; then
shotfiles[1]=${shotfile}
if [ "$distro" == "Mac OS X" ]; then
displays="$(system_profiler SPDisplaysDataType | grep 'Resolution:' | wc -l | tr -d ' ')"
for (( i=2; i<=$displays; i++))
do
shotfiles[$i]="$(echo ${shotfile} | sed "s/\(.*\)\./\1_${i}./")"
done
printf "Taking shot in 3.. "; sleep 1; printf "2.. "; sleep 1; printf "1.. "; sleep 1; printf "0.\n"; screencapture -x ${shotfiles[@]} &> /dev/null
else scrot -cd3 "${shotfile}"; fi
if [ -f "${shotfile}" ]; then
verboseOut "Screenshot saved at '${shotfiles[@]}'"
printf "${bold}==>${c0} Uploading your screenshot now..."
case "${uploadLoc}" in
'teknik')
baseurl='https://u.teknik.io'
uploadurl='https://api.teknik.io/upload/post'
ret=$(curl -sf -F file="@${shotfiles[@]}" ${uploadurl})
desturl="${ret##*url\":\"}"
desturl="${desturl%%\"*}"
desturl="${desturl//\\}"
;;
'mediacrush')
baseurl='https://mediacru.sh'
uploadurl='https://mediacru.sh/api/upload/file'
ret=$(curl -sf -F file="@${shotfiles[@]};type=image/png" ${uploadurl})
filehash=$(echo "${ret}" | grep "hash" | cut -d '"' -f4)
desturl="${baseurl}/${filehash}"
;;
'imgur')
baseurl='http://imgur.com'
uploadurl='http://imgur.com/upload'
ret=$(curl -sf -F file="@${shotfiles[@]}" ${uploadurl})
filehash="${ret##*hash\":\"}"
filehash="${filehash%%\"*}"
desturl="${baseurl}/${filehash}"
;;
'pomf')
baseurl='http://a.pomf.se'
uploadurl='http://pomf.se/upload.php'
ret=$(curl --silent -sf -F files[]="@${shotfiles[@]}" ${uploadurl})
filehash="${ret##*url\":\"}"
filehash="${filehash%%\"*}"
desturl="${baseurl}/${filehash}"
;;
'hmp')
baseurl='http://i.hmp.me/m'
uploadurl='http://hmp.me/ap/?uf=1'
ret=$(curl -sf -F a="@${shotfiles[@]};type=image/png" ${uploadurl})
desturl="${ret##*img_path\":\"}"
desturl="${desturl%%\"*}"
desturl="${desturl//\\}"
;;
'local-example')
baseurl="http://www.example.com"
serveraddr="www.example.com"
scptimeout="20"
serverdir="/path/to/directory"
scp -qo ConnectTimeout="${scptimeout}" "${shotfiles[@]}" "${serveraddr}:${serverdir}"
desturl="${baseurl}/${shotfile}"
;;
esac
printf "your screenshot can be viewed at ${desturl}\n"
else
errorOut "ERROR: Problem saving screenshot to ${shotfiles[@]}"
fi
else
shotfiles[1]=${shotfile}
if [ "$distro" == "Mac OS X" ]; then
displays="$(system_profiler SPDisplaysDataType | grep 'Resolution:' | wc -l | tr -d ' ')"
for (( i=2; i<=$displays; i++))
do
shotfiles[$i]="$(echo ${shotfile} | sed "s/\(.*\)\./\1_${i}./")"
done
printf "Taking shot in 3.. "; sleep 1; printf "2.. "; sleep 1; printf "1.. "; sleep 1; printf "0.\n"; screencapture -x ${shotfiles[@]} &> /dev/null
else scrot -cd3 "${shotfile}"; fi
if [ -f "${shotfile}" ]; then
verboseOut "Screenshot saved at '${shotfiles[@]}'"
else
errorOut "ERROR: Problem saving screenshot to ${shotfiles[@]}"
fi
fi
else
$screenCommand
fi
}
asciiText () {
# Distro logos and ASCII outputs
if [[ "$fake_distro" ]]; then distro="${fake_distro}"; fi
if [[ "$asc_distro" ]]; then myascii="${asc_distro}"
elif [[ "$art" ]]; then myascii="custom"
else myascii="${distro}"; fi
case ${myascii} in
"custom") source "$art" ;;
"Arch Linux - Old")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'white') # White
c2=$(getColor 'light blue') # Light Blue
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
startline="0"
fulloutput=("$c1 __ %s"
"$c1 _=(SDGJT=_ %s"
"$c1 _GTDJHGGFCVS) %s"
"$c1 ,GTDJGGDTDFBGX0 %s"
"$c1 JDJDIJHRORVFSBSVL$c2-=+=,_ %s"
"$c1 IJFDUFHJNXIXCDXDSV,$c2 \"DEBL %s"
"$c1 [LKDSDJTDU=OUSCSBFLD.$c2 '?ZWX, %s"
"$c1 ,LMDSDSWH' \`DCBOSI$c2 DRDS], %s"
"$c1 SDDFDFH' !YEWD,$c2 )HDROD %s"
"$c1 !KMDOCG &GSU|$c2\_GFHRGO\' %s"
"$c1 HKLSGP'$c2 __$c1\TKM0$c2\GHRBV)' %s"
"$c1 JSNRVW'$c2 __+MNAEC$c1\IOI,$c2\BN' %s"
"$c1 HELK['$c2 __,=OFFXCBGHC$c1\FD) %s"
"$c1 ?KGHE $c2\_-#DASDFLSV='$c1 'EF %s"
"$c1 'EHTI !H %s"
"$c1 \`0F' '! %s"
" %s"
" %s")
;;
"Arch Linux")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'light cyan') # Light
c2=$(getColor 'cyan') # Dark
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
startline="1"
fulloutput=("${c1} -\`"
"${c1} .o+\` %s"
"${c1} \`ooo/ %s"
"${c1} \`+oooo: %s"
"${c1} \`+oooooo: %s"
"${c1} -+oooooo+: %s"
"${c1} \`/:-:++oooo+: %s"
"${c1} \`/++++/+++++++: %s"
"${c1} \`/++++++++++++++: %s"
"${c1} \`/+++o"${c2}"oooooooo"${c1}"oooo/\` %s"
"${c2} "${c1}"./"${c2}"ooosssso++osssssso"${c1}"+\` %s"
"${c2} .oossssso-\`\`\`\`/ossssss+\` %s"
"${c2} -osssssso. :ssssssso. %s"
"${c2} :osssssss/ osssso+++. %s"
"${c2} /ossssssss/ +ssssooo/- %s"
"${c2} \`/ossssso+/:- -:/+osssso+- %s"
"${c2} \`+sso+:-\` \`.-/+oso: %s"
"${c2} \`++:. \`-/+/%s"
"${c2} .\` \`/%s")
;;
"Mint")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'white') # White
c2=$(getColor 'light green') # Bold Green
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
startline="0"
fulloutput=(" %s"
"$c2 MMMMMMMMMMMMMMMMMMMMMMMMMmds+. %s"
"$c2 MMm----::-://////////////oymNMd+\` %s"
"$c2 MMd "$c1"/++ "$c2"-sNMd: %s"
"$c2 MMNso/\` "$c1"dMM \`.::-. .-::.\` "$c2".hMN: %s"
"$c2 ddddMMh "$c1"dMM :hNMNMNhNMNMNh: "$c2"\`NMm %s"
"$c2 NMm "$c1"dMM .NMN/-+MMM+-/NMN\` "$c2"dMM %s"
"$c2 NMm "$c1"dMM -MMm \`MMM dMM. "$c2"dMM %s"
"$c2 NMm "$c1"dMM -MMm \`MMM dMM. "$c2"dMM %s"
"$c2 NMm "$c1"dMM .mmd \`mmm yMM. "$c2"dMM %s"
"$c2 NMm "$c1"dMM\` ..\` ... ydm. "$c2"dMM %s"
"$c2 hMM- "$c1"+MMd/-------...-:sdds "$c2"dMM %s"
"$c2 -NMm- "$c1":hNMNNNmdddddddddy/\` "$c2"dMM %s"
"$c2 -dMNs-"$c1"\`\`-::::-------.\`\` "$c2"dMM %s"
"$c2 \`/dMNmy+/:-------------:/yMMM %s"
"$c2 ./ydNMMMMMMMMMMMMMMMMMMMMM %s"
"$c2 \.MMMMMMMMMMMMMMMMMMM %s"
" %s")
;;
"LMDE")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'white') # White
c2=$(getColor 'light green') # Bold Green
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
startline="0"
fulloutput=(" "${c1}"\`.-::---.. %s"
"${c2} .:++++ooooosssoo:. %s"
"${c2} .+o++::. \`.:oos+. %s"
"${c2} :oo:.\` -+oo"${c1}": %s"
"${c2} "${c1}"\`"${c2}"+o/\` ."${c1}"::::::"${c2}"-. .++-"${c1}"\` %s"
"${c2} "${c1}"\`"${c2}"/s/ .yyyyyyyyyyo: +o-"${c1}"\` %s"
"${c2} "${c1}"\`"${c2}"so .ss ohyo\` :s-"${c1}": %s"
"${c2} "${c1}"\`"${c2}"s/ .ss h m myy/ /s\`"${c1}"\` %s"
"${c2} \`s: \`oo s m Myy+-o:\` %s"
"${c2} \`oo :+sdoohyoydyso/. %s"
"${c2} :o. .:////////++: %s"
"${c2} \`/++ "${c1}"-:::::- %s"
"${c2} "${c1}"\`"${c2}"++- %s"
"${c2} "${c1}"\`"${c2}"/+- %s"
"${c2} "${c1}"."${c2}"+/. %s"
"${c2} "${c1}"."${c2}":+-. %s"
"${c2} \`--.\`\` %s"
" %s")
;;
"Ubuntu")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'white') # White
c2=$(getColor 'light red') # Light Red
c3=$(getColor 'yellow') # Bold Yellow
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; c3="${my_lcolor}"; fi
startline="0"
fulloutput=("$c2 ./+o+- %s"
"$c1 yyyyy- $c2-yyyyyy+ %s"
"$c1 $c1://+//////$c2-yyyyyyo %s"
"$c3 .++ $c1.:/++++++/-$c2.+sss/\` %s"
"$c3 .:++o: $c1/++++++++/:--:/- %s"
"$c3 o:+o+:++.$c1\`..\`\`\`.-/oo+++++/ %s"
"$c3 .:+o:+o/.$c1 \`+sssoo+/ %s"
"$c1 .++/+:$c3+oo+o:\`$c1 /sssooo. %s"
"$c1 /+++//+:$c3\`oo+o$c1 /::--:. %s"
"$c1 \+/+o+++$c3\`o++o$c2 ++////. %s"
"$c1 .++.o+$c3++oo+:\`$c2 /dddhhh. %s"
"$c3 .+.o+oo:.$c2 \`oddhhhh+ %s"
"$c3 \+.++o+o\`$c2\`-\`\`\`\`.:ohdhhhhh+ %s"
"$c3 \`:o+++ $c2\`ohhhhhhhhyo++os: %s"
"$c3 .o:$c2\`.syhhhhhhh/$c3.oo++o\` %s"
"$c2 /osyyyyyyo$c3++ooo+++/ %s"
"$c2 \`\`\`\`\` $c3+oo+++o\: %s"
"$c3 \`oo++. %s")
;;
"Debian")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'white') # White
c2=$(getColor 'light red') # Light Red
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
startline="0"
fulloutput=(" $c1 _,met\$\$\$\$\$gg. %s"
" $c1 ,g\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$P. %s"
" $c1 ,g\$\$P\"\" \"\"\"Y\$\$.\". %s"
" $c1 ,\$\$P' \`\$\$\$. %s"
" $c1',\$\$P ,ggs. \`\$\$b: %s"
" $c1\`d\$\$' ,\$P\"\' $c2.$c1 \$\$\$ %s"
" $c1 \$\$P d\$\' $c2,$c1 \$\$P %s"
" $c1 \$\$: \$\$. $c2-$c1 ,d\$\$' %s"
" $c1 \$\$\; Y\$b._ _,d\$P' %s"
" $c1 Y\$\$. $c2\`.$c1\`\"Y\$\$\$\$P\"' %s"
" $c1 \`\$\$b $c2\"-.__ %s"
" $c1 \`Y\$\$ %s"
" $c1 \`Y\$\$. %s"
" $c1 \`\$\$b. %s"
" $c1 \`Y\$\$b. %s"
" $c1 \`\"Y\$b._ %s"
" $c1 \`\"\"\"\" %s"
" %s")
;;
"Raspbian")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'light green') # Light Green
c2=$(getColor 'light red') # Light Red
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
startline="0"
fulloutput=(" $c1 .',;:cc;,'. .,;::c:,,. %s"
" $c1,ooolcloooo: 'oooooccloo: %s"
" $c1.looooc;;:ol :oc;;:ooooo' %s"
" $c1;oooooo: ,ooooooc. %s"
" $c1.,:;'. .;:;'. %s"
" $c2.... ..'''''. .... %s"
" $c2.''. ..'''''. ..''. %s"
" $c2.. ..... ..... .. %s"
" $c2. .''''''' .''''''. . %s"
" $c2.'' .'''''''' .'''''''. ''. %s"
" $c2''' ''''''' .'''''' ''' %s"
" $c2.' ........... ... .'. %s"
" $c2.... ''''''''. .''. %s"
" $c2'''''. ''''''''. .''''' %s"
" $c2'''''. .'''''. .'''''. %s"
" $c2..''. . .''.. %s"
" $c2.''''''' %s"
" $c2...... %s")
;;
"CrunchBang")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'white') # White
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
startline="0"
fulloutput=(" %s"
"$c2 "$c1"███"$c2" "$c1"███"$c2" "$c1"███"$c2" %s"
"$c2 "$c1"███"$c2" "$c1"███"$c2" "$c1"███"$c2" %s"
"$c2 "$c1"███"$c2" "$c1"███"$c2" "$c1"███"$c2" %s"
"$c2 "$c1"███"$c2" "$c1"███"$c2" "$c1"███"$c2" %s"
"$c2 "$c1"████████████████████████████"$c2" "$c1"███"$c2" %s"
"$c2 "$c1"████████████████████████████"$c2" "$c1"███"$c2" %s"
"$c2 "$c1"███"$c2" "$c1"███"$c2" "$c1"███"$c2" %s"
"$c2 "$c1"███"$c2" "$c1"███"$c2" "$c1"███"$c2" %s"
"$c2 "$c1"███"$c2" "$c1"███"$c2" "$c1"███"$c2" %s"
"$c2 "$c1"███"$c2" "$c1"███"$c2" "$c1"███"$c2" %s"
"$c2 "$c1"████████████████████████████"$c2" "$c1"███"$c2" %s"
"$c2 "$c1"████████████████████████████"$c2" "$c1"███"$c2" %s"
"$c2 "$c1"███"$c2" "$c1"███"$c2" %s"
"$c2 "$c1"███"$c2" "$c1"███"$c2" %s"
"$c2 "$c1"███"$c2" "$c1"███"$c2" "$c1"███"$c2" %s"
"$c2 "$c1"███"$c2" "$c1"███"$c2" "$c1"███"$c2" %s"
"$c2 %s")
;;
"CRUX")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'light cyan')
c2=$(getColor 'yellow')
c3=$(getColor 'white')
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; fi
startline="1"
fulloutput=(""
"${c1} odddd %s"
"${c1} oddxkkkxxdoo %s"
"${c1} ddcoddxxxdoool %s"
"${c1} xdclodod olol %s"
"${c1} xoc xdd olol %s"
"${c1} xdc ${c2}k00${c1}Okdlol %s"
"${c1} xxd${c2}kOKKKOkd${c1}ldd %s"
"${c1} xdco${c2}xOkdlo${c1}dldd %s"
"${c1} ddc:cl${c2}lll${c1}oooodo %s"
"${c1} odxxdd${c3}xkO000kx${c1}ooxdo %s"
"${c1} oxdd${c3}x0NMMMMMMWW0od${c1}kkxo %s"
"${c1} oooxd${c3}0WMMMMMMMMMW0o${c1}dxkx %s"
"${c1} docldkXW${c3}MMMMMMMWWN${c1}Odolco %s"
"${c1} xx${c2}dx${c1}kxxOKN${c3}WMMWN${c1}0xdoxo::c %s"
"${c2} xOkkO${c1}0oo${c3}odOW${c2}WW${c1}XkdodOxc:l %s"
"${c2} dkkkxkkk${c3}OKX${c2}NNNX0Oxx${c1}xc:cd %s"
"${c2} odxxdx${c3}xllod${c2}ddooxx${c1}dc:ldo %s"
"${c2} lodd${c1}dolccc${c2}ccox${c1}xoloo"
"")
;;
"ChromeOS")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'green') # Green
c2=$(getColor 'light red') # Light Red
c3=$(getColor 'yellow') # Bold Yellow
c4=$(getColor 'light blue') # Light Blue
c5=$(getColor 'white') # White
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; c3="${my_lcolor}"; c4="${my_lcolor}"; c5="${my_lcolor}"; fi
startline="0"
fulloutput=("$c2 .,:loool:,. %s"
"$c2 .,coooooooooooooc,. %s"
"$c2 .,lllllllllllllllllllll,. %s"
"$c2 ;ccccccccccccccccccccccccc; %s"
"$c1 '${c2}ccccccccccccccccccccccccccccc. %s"
"$c1 ,oo${c2}c::::::::okO${c5}000${c3}0OOkkkkkkkkkkk: %s"
"$c1 .ooool${c2};;;;:x${c5}K0${c4}kxxxxxk${c5}0X${c3}K0000000000. %s"
"$c1 :oooool${c2};,;O${c5}K${c4}ddddddddddd${c5}KX${c3}000000000d %s"
"$c1 lllllool${c2};l${c5}N${c4}dllllllllllld${c5}N${c3}K000000000 %s"
"$c1 lllllllll${c2}o${c5}M${c4}dccccccccccco${c5}W${c3}K000000000 %s"
"$c1 ;cllllllllX${c5}X${c4}c:::::::::c${c5}0X${c3}000000000d %s"
"$c1 .ccccllllllO${c5}Nk${c4}c;,,,;cx${c5}KK${c3}0000000000. %s"
"$c1 .cccccclllllxOO${c5}OOO${c1}Okx${c3}O0000000000; %s"
"$c1 .:ccccccccllllllllo${c3}O0000000OOO, %s"
"$c1 ,:ccccccccclllcd${c3}0000OOOOOOl. %s"
"$c1 '::ccccccccc${c3}dOOOOOOOkx:. %s"
"$c1 ..,::cccc${c3}xOOOkkko;. %s"
"$c1 ..,:${c3}dOkxl:. %s")
;;
"Gentoo")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'white') # White
c2=$(getColor 'light purple') # Light Purple
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
startline="0"
fulloutput=("$c2 -/oyddmdhs+:. %s"
"$c2 -o"$c1"dNMMMMMMMMNNmhy+"$c2"-\` %s"
"$c2 -y"$c1"NMMMMMMMMMMMNNNmmdhy"$c2"+- %s"
"$c2 \`o"$c1"mMMMMMMMMMMMMNmdmmmmddhhy"$c2"/\` %s"
"$c2 om"$c1"MMMMMMMMMMMN"$c2"hhyyyo"$c1"hmdddhhhd"$c2"o\` %s"
"$c2.y"$c1"dMMMMMMMMMMd"$c2"hs++so/s"$c1"mdddhhhhdm"$c2"+\` %s"
"$c2 oy"$c1"hdmNMMMMMMMN"$c2"dyooy"$c1"dmddddhhhhyhN"$c2"d. %s"
"$c2 :o"$c1"yhhdNNMMMMMMMNNNmmdddhhhhhyym"$c2"Mh %s"
"$c2 .:"$c1"+sydNMMMMMNNNmmmdddhhhhhhmM"$c2"my %s"
"$c2 /m"$c1"MMMMMMNNNmmmdddhhhhhmMNh"$c2"s: %s"
"$c2 \`o"$c1"NMMMMMMMNNNmmmddddhhdmMNhs"$c2"+\` %s"
"$c2 \`s"$c1"NMMMMMMMMNNNmmmdddddmNMmhs"$c2"/. %s"
"$c2 /N"$c1"MMMMMMMMNNNNmmmdddmNMNdso"$c2":\` %s"
"$c2+M"$c1"MMMMMMNNNNNmmmmdmNMNdso"$c2"/- %s"
"$c2yM"$c1"MNNNNNNNmmmmmNNMmhs+/"$c2"-\` %s"
"$c2/h"$c1"MMNNNNNNNNMNdhs++/"$c2"-\` %s"
"$c2\`/"$c1"ohdmmddhys+++/:"$c2".\` %s"
"$c2 \`-//////:--. %s")
;;
"Funtoo")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'white') # White
c2=$(getColor 'light purple') # Light Purple
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
startline="0"
fulloutput=(" %s"
" %s"
" %s"
" %s"
"${c1} _______ ____ %s"
"${c1} /MMMMMMM/ /MMMM| _____ _____ %s"
"${c1} __/M${c2}.MMM.${c1}M/_____________|M${c2}.M${c1}MM|/MMMMM\/MMMMM\ %s"
"${c1}|MMMM${c2}MM'${c1}MMMMMMMMMMMMMMMMMMM${c2}MM${c1}MMMM${c2}.MMMM..MMMM.${c1}MM\ %s"
"${c1}|MM${c2}MMMMMMM${c1}/m${c2}MMMMMMMMMMMMMMMMMMMMMM${c1}MMMM${c2}MM${c1}MMMM${c2}MM${c1}MM| %s"
"${c1}|MMMM${c2}MM${c1}MMM${c2}MM${c1}MM${c2}MM${c1}MM${c2}MM${c1}MMMMM${c2}\MMM${c1}MMM${c2}MM${c1}MMMM${c2}MM${c1}MMMM${c2}MM${c1}MM| %s"
"${c1} |MM${c2}MM${c1}MMM${c2}MM${c1}MM${c2}MM${c1}MM${c2}MM${c1}MM${c2}MM${c1}MM${c2}MMM${c1}MMMM${c2}'MMMM''MMMM'${c1}MM/ %s"
"${c1} |MM${c2}MM${c1}MMM${c2}MM${c1}MM${c2}MM${c1}MM${c2}MM${c1}MM${c2}MM${c1}MM${c2}MMM${c1}MMM\MMMMM/\MMMMM/ %s"
"${c1} |MM${c2}MM${c1}MMM${c2}MM${c1}MMMMMM${c2}MM${c1}MM${c2}MM${c1}MM${c2}MMMMM'${c1}M| %s"
"${c1} |MM${c2}MM${c1}MMM${c2}MMMMMMMMMMMMMMMMM MM'${c1}M/ %s"
"${c1} |MMMMMMMMMMMMMMMMMMMMMMMMMMMM/ %s"
" %s"
" %s"
" %s")
;;
"Fedora")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'white') # White
c2=$(getColor 'light blue') # Light Blue
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
startline="0"
fulloutput=("$c2 /:-------------:\ %s"
"$c2 :-------------------:: %s"
"$c2 :-----------"$c1"/shhOHbmp"$c2"---:\\ %s"
"$c2 /-----------"$c1"omMMMNNNMMD "$c2"---: %s"
"$c2 :-----------"$c1"sMMMMNMNMP"$c2". ---: %s"
"$c2 :-----------"$c1":MMMdP"$c2"------- ---\ %s"
"$c2 ,------------"$c1":MMMd"$c2"-------- ---: %s"
"$c2 :------------"$c1":MMMd"$c2"------- .---: %s"
"$c2 :---- "$c1"oNMMMMMMMMMNho"$c2" .----: %s"
"$c2 :-- ."$c1"+shhhMMMmhhy++"$c2" .------/ %s"
"$c2 :- -------"$c1":MMMd"$c2"--------------: %s"
"$c2 :- --------"$c1"/MMMd"$c2"-------------; %s"
"$c2 :- ------"$c1"/hMMMy"$c2"------------: %s"
"$c2 :--"$c1" :dMNdhhdNMMNo"$c2"------------; %s"
"$c2 :---"$c1":sdNMMMMNds:"$c2"------------: %s"
"$c2 :------"$c1":://:"$c2"-------------:: %s"
"$c2 :---------------------:// %s"
" %s")
;;
"Chapeau")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'white') # White
c2=$(getColor 'light green') # Light Green
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
startline="0"
fulloutput=("$c2 .-/-. %s"
"$c2 ////////. %s"
"$c2 ////////"$c1"y+"$c2"//. %s"
"$c2 ////////"$c1"mMN"$c2"/////. %s"
"$c2 ////////"$c1"mMN+"$c2"////////. %s"
"$c2 ////////////////////////. %s"
"$c2 /////////+"$c1"shhddhyo"$c2"+////////. %s"
"$c2 ////////"$c1"ymMNmdhhdmNNdo"$c2"///////. %s"
"$c2 ///////+"$c1"mMms"$c2"////////"$c1"hNMh"$c2"///////. %s"
"$c2 ///////"$c1"NMm+"$c2"//////////"$c1"sMMh"$c2"/////// %s"
"$c2 //////"$c1"oMMNmmmmmmmmmmmmMMm"$c2"/////// %s"
"$c2 //////"$c1"+MMmssssssssssssss+"$c2"/////// %s"
"$c2 \`//////"$c1"yMMy"$c2"//////////////////// %s"
"$c2 \`//////"$c1"smMNhso++oydNm"$c2"//////// %s"
"$c2 \`///////"$c1"ohmNMMMNNdy+"$c2"/////// %s"
"$c2 \`//////////"$c1"++"$c2"////////// %s"
"$c2 \`////////////////. %s"
"$c2 -////////- %s"
" %s")
;;
"Korora")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'white')
c2=$(getColor 'light blue')
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
startline="0"
fulloutput=("$c1 ____________ %s"
"$c1 _add55555555554"$c2": %s"
"$c1 _w?'"$c2"\`\`\`\`\`\`\`\`\`\`'"$c1")k"$c2": %s"
"$c1 _Z'"$c2"\`"$c1" ]k"$c2": %s"
"$c1 m("$c2"\`"$c1" )k"$c2": %s"
"$c1 _.ss"$c2"\`"$c1"m["$c2"\`"$c1", ]e"$c2": %s"
"$c1 .uY\"^\`"$c2"\`"$c1"Xc"$c2"\`"$c1"?Ss. d("$c2"\` %s"
"$c1 jF'"$c2"\`"$c1" \`@. "$c2"\`"$c1"Sc .jr"$c2"\` %s"
"$c1 jr"$c2"\`"$c1" \`?n_ "$c2"\`"$c1"$; _a2\""$c2"\` %s"
"$c1 .m"$c2":"$c1" \`~M"$c2"\`"$c1"1k"$c2"\`"$c1"5?!\`"$c2"\` %s"
"$c1 :#"$c2":"$c1" "$c2"\`"$c1")e"$c2"\`\`\` %s"
"$c1 :m"$c2":"$c1" ,#'"$c2"\` %s"
"$c1 :#"$c2":"$c1" .s2'"$c2"\` %s"
"$c1 :m,________.aa7^"$c2"\` %s"
"$c1 :#baaaaaaas!J'"$c2"\` %s"
"$c2 \`\`\`\`\`\`\`\`\`\`\` %s")
;;
"gNewSense")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'light blue') # Light Blue
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; fi
startline="0"
fulloutput=("$c1 ..,,,,.. %s"
"$c1 .oocchhhhhhhhhhccoo. %s"
"$c1 .ochhlllllllc hhhhhh ollllllhhco. %s"
"$c1 ochlllllllllll hhhllllllhhh lllllllllllhco %s"
"$c1 .cllllllllllllll hlllllo +hllh llllllllllllllc. %s"
"$c1 ollllllllllhco\'\' hlllllo +hllh \`\`ochllllllllllo %s"
"$c1 hllllllllc\' hllllllllllllh \`cllllllllh %s"
"$c1 ollllllh +llllllllllll+ hllllllo %s"
"$c1 \`cllllh. ohllllllho .hllllc\' %s"
"$c1 ochllc. ++++ .cllhco %s"
"$c1 \`+occooo+. .+ooocco+\' %s"
"$c1 \`+oo++++ ++++oo+\' %s"
"$c1 %s")
;;
"BLAG")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'light purple')
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; fi
startline="0"
fulloutput=("$c1 d %s"
"$c1 ,MK: %s"
"$c1 xMMMX: %s"
"$c1 .NMMMMMX; %s"
"$c1 lMMMMMMMM0clodkO0KXWW: %s"
"$c1 KMMMMMMMMMMMMMMMMMMX' %s"
"$c1 .;d0NMMMMMMMMMMMMMMMMMMK. %s"
"$c1 .;dONMMMMMMMMMMMMMMMMMMMMMMx %s"
"$c1 'dKMMMMMMMMMMMMMMMMMMMMMMMMl %s"
"$c1 .:xKWMMMMMMMMMMMMMMMMMMM0. %s"
"$c1 .:xNMMMMMMMMMMMMMMMMMK. %s"
"$c1 lMMMMMMMMMMMMMMMMMMK. %s"
"$c1 ,MMMMMMMMWkOXWMMMMMM0 %s"
"$c1 .NMMMMMNd. \`':ldko %s"
"$c1 OMMMK: %s"
"$c1 oWk, %s"
"$c1 ;: %s")
;;
"FreeBSD")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'white') # white
c2=$(getColor 'light red') # Light Red
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
startline="0"
fulloutput=(" %s" # user@host
" "$c1"\`\`\` "$c2"\` %s" # OS
" "$c1"\` \`.....---..."$c2"....--.\`\`\` -/ %s" # Kernel
" "$c1"+o .--\` "$c2"/y:\` +. %s" # Uptime
" "$c1" yo\`:. "$c2":o \`+- %s" # Packages
" "$c1"y/ "$c2"-/\` -o/ %s" # Shell
" "$c1".- "$c2"::/sy+:. %s" # Resolution
" "$c1"/ "$c2"\`-- / %s" # DE
" "$c1"\`: "$c2":\` %s" # WM
" "$c1"\`: "$c2":\` %s" # WM Theme
" "$c1"/ "$c2"/ %s" # GTK2 Theme
" "$c1".- "$c2"-. %s" # GTK3 Theme
" "$c1"-- "$c2"-. %s" # Icon Theme
" "$c1"\`:\` "$c2"\`:\` %s" # Font
" "$c2".-- \`--. %s" # Disk
" "$c2" .---.....----. %s" # CPU
" %s" # GPU
" %s" # RAM
)
;;
"FreeBSD - Old")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'white') # white
c2=$(getColor 'light red') # Light Red
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
startline="0"
fulloutput=("$c2 , , %s" # user@host
"$c2 /( )\` %s" # OS
"$c2 \ \___ / | %s" # Kernel
"$c2 /- "$c1"_$c2 \`-/ ' %s" # Uptime
"$c2 ($c1/\/ \ $c2\ /\\ %s" # Packages
"$c1 / / |$c2 \` \\ %s" # Shell
"$c1 O O )$c2 / | %s" # Resolution
"$c1 \`-^--'\`$c2< ' %s" # DE
"$c2 (_.) _ ) / %s" # WM
"$c2 \`.___/\` / %s" # WM Theme
"$c2 \`-----' / %s" # GTK2 Theme
"$c1 <----. "$c2"__/ __ \\ %s" # GTK3 Theme
"$c1 <----|===="$c2"O}}}$c1==$c2} \} \/$c1==== %s" # Icon Theme
"$c1 <----' $c2\`--' \`.__,' \\ %s" # Font
"$c2 | | %s" # Disk
"$c2 \ / /\\ %s" # CPU
"$c2 ______( (_ / \______/ %s" # GPU
"$c2 ,' ,-----' | %s" # RAM
"$c2 \`--{__________)"
"")
;;
"OpenBSD")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'yellow') # Light Yellow
c2=$(getColor 'brown') # Bold Yellow
c3=$(getColor 'light cyan') # Light Cyan
c4=$(getColor 'light red') # Light Red
c5=$(getColor 'dark grey')
fi
if [ -n "${my_lcolor}" ]; then c1="$my_lcolor"; c2="${my_color}"; fi
startline="3"
fulloutput=(
" "$c3" _ "
" "$c3"(_) "
""$c1" | . "
""$c1" . |L /| . "$c3" _ %s"
""$c1" _ . |\ _| \--+._/| . "$c3"(_) %s"
""$c1" / ||\| Y J ) / |/| ./ %s"
""$c1" J |)'( | \` F\`.'/ "$c3" _ %s"
""$c1" -<| F __ .-< "$c3"(_) %s"
""$c1" | / .-'"$c3". "$c1"\`. /"$c3"-. "$c1"L___ %s"
""$c1" J \ < "$c3"\ "$c1" | | "$c5"O"$c3"\\\\"$c1"|.-' "$c3" _ %s"
""$c1" _J \ .- \\\\"$c3"/ "$c5"O "$c3"| "$c1"| \ |"$c1"F "$c3"(_) %s"
""$c1" '-F -<_. \ .-' \`-' L__ %s"
""$c1"__J _ _. >-' "$c2")"$c4"._. "$c1"|-' %s "
""$c1" \`-|.' /_. "$c4"\_| "$c1" F %s "
""$c1" /.- . _.< %s"
""$c1" /' /.' .' \`\ %s"
""$c1" /L /' |/ _.-'-\ %s "
""$c1" /'J ___.---'\| %s"
""$c1" |\ .--' V | \`. \` %s "
""$c1" |/\`. \`-. \`._) %s"
""$c1" / .-.\ %s"
""$c1" \ ( \`\ "
""$c1" \`.\ "
)
;;
"DragonFlyBSD")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'light red') # Red
c2=$(getColor 'white') # White
c3=$(getColor 'yellow') #
c4=$(getColor 'light red')
fi
startline="0"
fulloutput=(" "$c1" | %s"
" "$c1" .-. %s"
" "$c3" ()"$c1"I"$c3"() %s"
" "$c1" \"==.__:-:__.==\" %s"
" "$c1"\"==.__/~|~\__.==\" %s"
" "$c1"\"==._( Y )_.==\" %s"
" "$c2".-'~~\"\"~=--...,__"$c1"\/|\/"$c2"__,...--=~\"\"~~'-. %s"
" "$c2"( ..="$c1"\\\\="$c1"/"$c2"=.. )%s"
" "$c2"\`'-. ,.-\"\`;"$c1"/=\\\\"$c2" ;\"-.,_ .-'\`%s"
" "$c2" \`~\"-=-~\` .-~\` "$c1"|=|"$c2" \`~-. \`~-=-\"~\` %s"
" "$c2" .-~\` /"$c1"|=|"$c2"\ \`~-. %s"
" "$c2" .~\` / "$c1"|=|"$c2" \ \`~. %s"
" "$c2" .-~\` .' "$c1"|=|"$c2" \\\\\`. \`~-. %s"
" "$c2" (\` _,.-=\"\` "$c1" |=|"$c2" \`\"=-.,_ \`) %s"
" "$c2" \`~\"~\"\` "$c1" |=|"$c2" \`\"~\"~\` %s"
" "$c1" /=\ %s"
" "$c1" \=/ %s"
" "$c1" ^ %s"
)
;;
"NetBSD")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'light red') # Light Red
c2=$(getColor 'white') # White
fi
startline="0"
fulloutput=(
" "$c1"__,gnnnOCCCCCOObaau,_ %s"
" "$c2"_._ "$c1"__,gnnCCCCCCCCOPF\"'' %s"
" "$c2"(N\\\\\\\\"$c1"XCbngg,._____.,gnnndCCCCCCCCCCCCF\"___,,,,___ %s"
" "$c2"\\\\N\\\\\\\\"$c1"XCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCOOOOPYvv. %s"
" "$c2"\\\\N\\\\\\\\"$c1"XCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCPF\"'' %s"
" "$c2"\\\\N\\\\\\\\"$c1"XCCCCCCCCCCCCCCCCCCCCCCCCCOF\"' %s"
" "$c2"\\\\N\\\\\\\\"$c1"XCCCCCCCCCCCCCCCCCCCCOF\"' %s"
" "$c2"\\\\N\\\\\\\\"$c1"XCCCCCCCCCCCCCCCPF\"' %s"
" "$c2"\\\\N\\\\\\\\"$c1"\"PCOCCCOCCFP\"\" %s"
" "$c2"\\\\N\ %s"
" "$c2"\\\\N\ %s"
" "$c2"\\\\N\ %s"
" "$c2"\\\\NN\ %s"
" "$c2"\\\\NN\ %s"
" "$c2"\\\\NNA. %s"
" "$c2"\\\\NNA, %s"
" "$c2"\\\\NNN, %s"
" "$c2"\\\\NNN\ %s"
" "$c2"\\\\NNN\ "
" "$c2"\\\\NNNA")
;;
"Mandriva"|"Mandrake")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'light blue') # Light Blue
c2=$(getColor 'yellow') # Bold Yellow
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
startline="0"
fulloutput=(" %s"
"$c2 \`\` %s"
"$c2 \`-. %s"
"$c1 \` $c2.--- %s"
"$c1 -/ $c2-::--\` %s"
"$c1 \`++ $c2\`----...\`\`\`-:::::. %s"
"$c1 \`os. $c2.::::::::::::::-\`\`\` \` \` %s"
"$c1 +s+ $c2.::::::::::::::::---...--\` %s"
"$c1 -ss: $c2\`-::::::::::::::::-.\`\`.\`\` %s"
"$c1 /ss- $c2.::::::::::::-.\`\` \` %s"
"$c1 +ss: $c2.::::::::::::- %s"
"$c1 /sso $c2.::::::-::::::- %s"
"$c1 .sss/ $c2-:::-.\` .::::: %s"
"$c1 /sss+. $c2..\`$c1 \`--\` $c2.::: %s"
"$c1 -ossso+/:://+/-\` $c2.:\` %s"
"$c1 -/+ooo+/-. $c2\` %s"
" %s"
" %s")
;;
"openSUSE")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'light green') # Bold Green
c2=$(getColor 'white') # Bold White
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
startline="0"
fulloutput=("$c2 .;ldkO0000Okdl;. %s"
"$c2 .;d00xl:,'....';:ok00d;. %s"
"$c2 .d00l' ,o00d. %s"
"$c2 .d0Kd."$c1" :Okxol:;'. "$c2":O0d. %s"
"$c2 'OK"$c1"KKK0kOKKKKKKKKKKOxo:' "$c2"lKO' %s"
"$c2 ,0K"$c1"KKKKKKKKKKKKKKK0d:"$c2",,,"$c1":dx:"$c2" ;00, %s"
"$c2 .OK"$c1"KKKKKKKKKKKKKKKk."$c2".oOkdl."$c1"'0k."$c2" cKO. %s"
"$c2 :KK"$c1"KKKKKKKKKKKKKKK: "$c2"kKx..od "$c1"lKd"$c2" .OK: %s"
"$c2 dKK"$c1"KKKKKKKKKOx0KKKd "$c2";0KKKO, "$c1"kKKc"$c2" dKd %s"
"$c2 dKK"$c1"KKKKKKKKKK;.;oOKx,.."$c2"'"$c1"..;kKKK0."$c2" dKd %s"
"$c2 :KK"$c1"KKKKKKKKKK0o;...;cdxxOK0Oxc,. "$c2".0K: %s"
"$c2 kKK"$c1"KKKKKKKKKKKKK0xl;'......,cdo "$c2"lKk %s"
"$c2 '0K"$c1"KKKKKKKKKKKKKKKKKKKK00KKOo; "$c2"c00' %s"
"$c2 .kK"$c1"KKOxddxkOO00000Okxoc;'. "$c2".dKk. %s"
"$c2 l0Ko. .c00l. %s"
"$c2 .l0Kk:. .;xK0l. %s"
"$c2 ,lkK0xl:;,,,,;:ldO0kl, %s"
"$c2 .':ldxkkkkxdl:'. %s")
;;
"Slackware")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'light blue') # Light Blue
c2=$(getColor 'white') # Bold White
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
startline="1"
fulloutput=("$c1 :::::::"
"$c1 ::::::::::::::::::: %s"
"$c1 ::::::::::::::::::::::::: %s"
"$c1 ::::::::"${c2}"cllcccccllllllll"${c1}":::::: %s"
"$c1 :::::::::"${c2}"lc dc"${c1}"::::::: %s"
"$c1 ::::::::"${c2}"cl clllccllll oc"${c1}"::::::::: %s"
"$c1 :::::::::"${c2}"o lc"${c1}"::::::::"${c2}"co oc"${c1}":::::::::: %s"
"$c1 ::::::::::"${c2}"o cccclc"${c1}":::::"${c2}"clcc"${c1}":::::::::::: %s"
"$c1 :::::::::::"${c2}"lc cclccclc"${c1}"::::::::::::: %s"
"$c1 ::::::::::::::"${c2}"lcclcc lc"${c1}":::::::::::: %s"
"$c1 ::::::::::"${c2}"cclcc"${c1}":::::"${c2}"lccclc oc"${c1}"::::::::::: %s"
"$c1 ::::::::::"${c2}"o l"${c1}"::::::::::"${c2}"l lc"${c1}"::::::::::: %s"
"$c1 :::::"${c2}"cll"${c1}":"${c2}"o clcllcccll o"${c1}"::::::::::: %s"
"$c1 :::::"${c2}"occ"${c1}":"${c2}"o clc"${c1}"::::::::::: %s"
"$c1 ::::"${c2}"ocl"${c1}":"${c2}"ccslclccclclccclclc"${c1}"::::::::::::: %s"
"$c1 :::"${c2}"oclcccccccccccccllllllllllllll"${c1}"::::: %s"
"$c1 ::"${c2}"lcc1lcccccccccccccccccccccccco"${c1}":::: %s"
"$c1 :::::::::::::::::::::::::::::::: %s"
"$c1 :::::::::::::::::::::::::::: %s"
"$c1 ::::::::::::::::::::::"
"$c1 ::::::::::::")
;;
"Red Hat Enterprise Linux")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'white') # White
c2=$(getColor 'light red') # Light Red
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
startline="0"
fulloutput=(" %s"
"$c2 \`.-..........\` %s"
"$c2 \`////////::.\`-/. %s"
"$c2 -: ....-////////. %s"
"$c2 //:-::///////////\` %s"
"$c2 \`--::: \`-://////////////: %s"
"$c2 //////- \`\`.-:///////// .\` %s"
"$c2 \`://////:-.\` :///////::///:\` %s"
"$c2 .-/////////:---/////////////: %s"
"$c2 .-://////////////////////. %s"
"$c1 yMN+\`.-$c2::///////////////-\` %s"
"$c1 .-\`:NMMNMs\` \`..-------..\` %s"
"$c1 MN+/mMMMMMhoooyysshsss %s"
"$c1 MMM MMMMMMMMMMMMMMyyddMMM+ %s"
"$c1 MMMM MMMMMMMMMMMMMNdyNMMh\` hyhMMM %s"
"$c1 MMMMMMMMMMMMMMMMyoNNNMMM+. MMMMMMMM %s"
"$c1 MMNMMMNNMMMMMNM+ mhsMNyyyyMNMMMMsMM %s"
" %s")
;;
"Frugalware")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'white') # White
c2=$(getColor 'light blue') # Light Blue
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
startline="3"
fulloutput=("${c2} \`++/::-.\`"
"${c2} /o+++++++++/::-.\`"
"${c2} \`o+++++++++++++++o++/::-.\`"
"${c2} /+++++++++++++++++++++++oo++/:-.\`\` %s"
"${c2} .o+ooooooooooooooooooosssssssso++oo++/:-\` %s"
"${c2} ++osoooooooooooosssssssssssssyyo+++++++o: %s"
"${c2} -o+ssoooooooooooosssssssssssssyyo+++++++s\` %s"
"${c2} o++ssoooooo++++++++++++++sssyyyyo++++++o: %s"
"${c2} :o++ssoooooo"${c1}"/-------------"${c2}"+syyyyyo+++++oo %s"
"${c2} \`o+++ssoooooo"${c1}"/-----"${c2}"+++++ooosyyyyyyo++++os: %s"
"${c2} /o+++ssoooooo"${c1}"/-----"${c2}"ooooooosyyyyyyyo+oooss %s"
"${c2} .o++++ssooooos"${c1}"/------------"${c2}"syyyyyyhsosssy- %s"
"${c2} ++++++ssooooss"${c1}"/-----"${c2}"+++++ooyyhhhhhdssssso %s"
"${c2} -s+++++syssssss"${c1}"/-----"${c2}"yyhhhhhhhhhhhddssssy. %s"
"${c2} sooooooyhyyyyyh"${c1}"/-----"${c2}"hhhhhhhhhhhddddyssy+ %s"
"${c2} :yooooooyhyyyhhhyyyyyyhhhhhhhhhhdddddyssy\` %s"
"${c2} yoooooooyhyyhhhhhhhhhhhhhhhhhhhddddddysy/ %s"
"${c2}-ysooooooydhhhhhhhhhhhddddddddddddddddssy %s"
"${c2} .-:/+osssyyyysyyyyyyyyyyyyyyyyyyyyyyssy: %s"
"${c2} \`\`.-/+oosysssssssssssssssssssssss %s"
"${c2} \`\`.:/+osyysssssssssssssh. %s"
"${c2} \`-:/+osyyssssyo"
"${c2} .-:+++\`")
;;
"Peppermint")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'white') # White
c2=$(getColor 'light red') # Light Red
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
startline="0"
fulloutput=("${c2} 8ZZZZZZ"${c1}"MMMMM %s"
"${c2} .ZZZZZZZZZ"${c1}"MMMMMMM. %s"
"${c1} MM"${c2}"ZZZZZZZZZ"${c1}"MMMMMMM"${c2}"ZZZZ %s"
"${c1} MMMMM"${c2}"ZZZZZZZZ"${c1}"MMMMM"${c2}"ZZZZZZZM %s"
"${c1} MMMMMMM"${c2}"ZZZZZZZ"${c1}"MMMM"${c2}"ZZZZZZZZZ. %s"
"${c1} MMMMMMMMM"${c2}"ZZZZZZ"${c1}"MMM"${c2}"ZZZZZZZZZZZI %s"
"${c1} MMMMMMMMMMM"${c2}"ZZZZZZ"${c1}"MM"${c2}"ZZZZZZZZZZ"${c1}"MMM %s"
"${c2} .ZZZ"${c1}"MMMMMMMMMM"${c2}"IZZ"${c1}"MM"${c2}"ZZZZZ"${c1}"MMMMMMMMM %s"
"${c2} ZZZZZZZ"${c1}"MMMMMMMM"${c2}"ZZ"${c1}"M"${c2}"ZZZZ"${c1}"MMMMMMMMMMM %s"
"${c2} ZZZZZZZZZZZZZZZZ"${c1}"M"${c2}"Z"${c1}"MMMMMMMMMMMMMMM %s"
"${c2} .ZZZZZZZZZZZZZ"${c1}"MMM"${c2}"Z"${c1}"M"${c2}"ZZZZZZZZZZ"${c1}"MMMM %s"
"${c2} .ZZZZZZZZZZZ"${c1}"MMM"${c2}"7ZZ"${c1}"MM"${c2}"ZZZZZZZZZZ7"${c1}"M %s"
"${c2} ZZZZZZZZZ"${c1}"MMMM"${c2}"ZZZZ"${c1}"MMMM"${c2}"ZZZZZZZ77 %s"
"${c1} MMMMMMMMMMMM"${c2}"ZZZZZ"${c1}"MMMM"${c2}"ZZZZZ77 %s"
"${c1} MMMMMMMMMM"${c2}"7ZZZZZZ"${c1}"MMMMM"${c2}"ZZ77 %s"
"${c1} .MMMMMMM"${c2}"ZZZZZZZZ"${c1}"MMMMM"${c2}"Z7Z %s"
"${c1} MMMMM"${c2}"ZZZZZZZZZ"${c1}"MMMMMMM %s"
"${c2} NZZZZZZZZZZZ"${c1}"MMMMM %s"
"${c2} ZZZZZZZZZ"${c1}"MM")
;;
"Solus")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'white') # White
c2=$(getColor 'dark grey') # Light Gray
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
startline="0"
fulloutput=("${c1} e e %s"
"${c1} eee ee %s"
"${c1} eeee eee %s"
"${c2} wwwwwwwww"${c1}"eeeeee %s"
"${c2} wwwwwwwwwwwwwww"${c1}"eee %s"
"${c2} wwwwwwwwwwwwwwwwwww"${c1}"eeeeeeee %s"
"${c2} wwwww "${c1}"eeeee"${c2}"wwwwww"${c1}"eeee %s"
"${c2} www "${c1}"eeee"${c2}"wwwwww"${c1}"e %s"
"${c2} ww "${c1}"ee"${c2}"wwwwww %s"
"${c2} w wwwww %s"
"${c2} wwwww %s"
"${c2} wwwww %s"
"${c2} wwwww %s"
"${c2} wwww %s"
"${c2} wwww %s"
"${c2} wwww %s"
"${c2} www %s"
"${c2} ww %s")
;;
"Mageia")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'white') # White
c2=$(getColor 'light cyan') # Light Cyan
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
startline="0"
fulloutput=("$c2 .°°. %s"
"$c2 °° .°°. %s"
"$c2 .°°°. °° %s"
"$c2 . . %s"
"$c2 °°° .°°°. %s"
"$c2 .°°°. '___' %s"
"$c1 .${c2}'___' $c1 . %s"
"$c1 :dkxc;'. ..,cxkd; %s"
"$c1 .dkk. kkkkkkkkkk .kkd. %s"
"$c1 .dkk. ';cloolc;. .kkd %s"
"$c1 ckk. .kk; %s"
"$c1 xO: cOd %s"
"$c1 xO: lOd %s"
"$c1 lOO. .OO: %s"
"$c1 .k00. .00x %s"
"$c1 .k00; ;00O. %s"
"$c1 .lO0Kc;,,,,,,;c0KOc. %s"
"$c1 ;d00KKKKKK00d; %s"
"$c1 .,KKKK,. ")
;;
"Parabola GNU/Linux-libre")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'light purple') # Light Purple
c2=$(getColor 'white') # White
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
startline="0"
fulloutput=(" %s"
"${c1} eeeeeeeee %s"
"${c1} eeeeeeeeeeeeeee %s"
"${c1} eeeeee"${c2}"//////////"${c1}"eeeee %s"
"${c1} eeeee"${c2}"///////////////"${c1}"eeeee %s"
"${c1} eeeee"${c2}"/// ////"${c1}"eeee %s"
"${c1} eeee"${c2}"// ///"${c1}"eeeee %s"
"${c1} eee "${c2}"///"${c1}"eeeee %s"
"${c1}ee "${c2}"//"${c1}"eeeeee %s"
"${c1}e "${c2}"/"${c1}"eeeeeee %s"
"${c1} eeeeeee %s"
"${c1} eeeeee %s"
"${c1} eeeeee %s"
"${c1} eeeee %s"
"${c1} eeee %s"
"${c1} eee %s"
"${c1} ee %s"
"${c1} e %s")
;;
"Viperr")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'white') # White
c2=$(getColor 'dark grey') # Dark Gray
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
startline="0"
fulloutput=("${c1} wwzapd dlzazw %s"
"${c1} an"${c2}"#"${c1}"zncmqzepweeirzpas"${c2}"#"${c1}"xz %s"
"${c1} apez"${c2}"##"${c1}"qzdkawweemvmzdm"${c2}"##"${c1}"dcmv %s"
"${c1}zwepd"${c2}"####"${c1}"qzdweewksza"${c2}"####"${c1}"ezqpa %s"
"${c1}ezqpdkapeifjeeazezqpdkazdkwqz %s"
"${c1} ezqpdksz"${c2}"##"${c1}"wepuizp"${c2}"##"${c1}"wzeiapdk %s"
"${c1} zqpakdpa"${c2}"#"${c1}"azwewep"${c2}"#"${c1}"zqpdkqze %s"
"${c1} apqxalqpewenwazqmzazq %s"
"${c1} mn"${c2}"##"${c1}"=="${c2}"#######"${c1}"=="${c2}"##"${c1}"qp %s"
"${c1} qw"${c2}"##"${c1}"="${c2}"#######"${c1}"="${c2}"##"${c1}"zl %s"
"${c1} z0"${c2}"######"${c1}"="${c2}"######"${c1}"0a %s"
"${c1} qp"${c2}"#####"${c1}"="${c2}"#####"${c1}"mq %s"
"${c1} az"${c2}"####"${c1}"==="${c2}"####"${c1}"mn %s"
"${c1} ap"${c2}"#########"${c1}"qz %s"
"${c1} 9qlzskwdewz %s"
"${c1} zqwpakaiw %s"
"${c1} qoqpe %s"
" %s")
;;
"LinuxDeepin")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'light green') # Bold Green
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; fi
startline="0"
fulloutput=("${c1} eeeeeeeeeeeeeeeeeeeeeeeeeeee %s"
"${c1} eee eeeeeee eeeeeeee %s"
"${c1}ee eeeeeeeee eeeeeeeee ee %s"
"${c1}e eeeeeeeee eeeeeeeee e %s"
"${c1}e eeeeeee eeeeeeeeee e %s"
"${c1}e eeeeee eeeee e %s"
"${c1}e eeeee eee eee e %s"
"${c1}e eeeee ee eeeeee e %s"
"${c1}e eeeee eee eee e %s"
"${c1}e eeeeeeeeee eeee e %s"
"${c1}e eeeee eeee e %s"
"${c1}e eeeeee e %s"
"${c1}e eeeeeee e %s"
"${c1}e eee eeeeeeee e %s"
"${c1}eeeeeeeeeeeeeeee e %s"
"${c1}eeeeeeeeeeeee ee %s"
"${c1} eeeeeeeeeee eee %s"
"${c1} eeeeeeeeeeeeeeeeeeeeeeeeeeee %s"
" %s")
;;
"Deepin")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'cyan') # Bold Green
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; fi
startline="0"
fulloutput=("${c1} ............ %s"
"${c1} .';;;;;. .,;,. %s"
"${c1} .,;;;;;;;. ';;;;;;;. %s"
"${c1} .;::::::::' .,::;;,''''',. %s"
"${c1} ,'.:::::::: .;;'. '; %s"
"${c1} ;' 'cccccc, ,' :: '.. .: %s"
"${c1} ,, :ccccc. ;: .c, '' :. ,; %s"
"${c1} .l. cllll' ., .lc :; .l' l. %s"
"${c1} .c :lllc ;cl: .l' .ll. :' %s"
"${c1} .l 'looc. . ,o: 'oo' c, %s"
"${c1} .o. .:ool::coc' .ooo' o. %s"
"${c1} :: ..... .;dddo ;c %s"
"${c1} l:... .';lddddo. ,o %s"
"${c1} lxxxxxdoolllodxxxxxxxxxc :l %s"
"${c1} ,dxxxxxxxxxxxxxxxxxxl. 'o, %s"
"${c1} ,dkkkkkkkkkkkkko;. .;o; %s"
"${c1} .;okkkkkdl;. .,cl:. %s"
"${c1} .,:cccccccc:,. %s")
;;
"Chakra")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'light blue') # Light Blue
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; fi
startline="0"
fulloutput=("${c1} _ _ _ \"kkkkkkkk. %s"
"${c1} ,kkkkkkkk., \'kkkkkkkkk, %s"
"${c1} ,kkkkkkkkkkkk., \'kkkkkkkkk. %s"
"${c1} ,kkkkkkkkkkkkkkkk,\'kkkkkkkk, %s"
"${c1} ,kkkkkkkkkkkkkkkkkkk\'kkkkkkk. %s"
"${c1} \"\'\'\"\'\'\',;::,,\"\'\'kkk\'\'kkkkk; __ %s"
"${c1} ,kkkkkkkkkk, \"k\'\'kkkkk\' ,kkkk %s"
"${c1} ,kkkkkkk\' ., \' .: \'kkkk\',kkkkkk %s"
"${c1} ,kkkkkkkk\'.k\' , ,kkkk;kkkkkkkkk %s"
"${c1} ,kkkkkkkk\';kk \'k \"\'k\',kkkkkkkkkkkk %s"
"${c1} .kkkkkkkkk.kkkk.\'kkkkkkkkkkkkkkkkkk\' %s"
"${c1} ;kkkkkkkk\'\'kkkkkk;\'kkkkkkkkkkkkk\'\' %s"
"${c1} \'kkkkkkk; \'kkkkkkkk.,\"\"\'\'\"\'\'\"\" %s"
"${c1} \'\'kkkk; \'kkkkkkkkkk., %s"
"${c1} \';\' \'kkkkkkkkkkkk., %s"
"${c1} ';kkkkkkkkkk\' %s"
"${c1} ';kkkkkk\' %s"
"${c1} \"\'\'\" %s")
;;
"Fuduntu")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'dark grey') # Dark Gray
c2=$(getColor 'yellow') # Bold Yellow
c3=$(getColor 'light red') # Light Red
c4=$(getColor 'white') # White
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; fi
startline="1"
fulloutput=("${c1} \`dwoapfjsod\`"${c2}" \`dwoapfjsod\`"
"${c1} \`xdwdsfasdfjaapz\`"${c2}" \`dwdsfasdfjaapzx\` %s"
"${c1} \`wadladfladlafsozmm\`"${c2}" \`wadladfladlafsozmm\` %s"
"${c1} \`aodowpwafjwodisosoaas\`"${c2}" \`odowpwafjwodisosoaaso\` %s"
"${c1} \`adowofaowiefawodpmmxs\`"${c2}" \`dowofaowiefawodpmmxso\` %s"
"${c1} \`asdjafoweiafdoafojffw\`"${c2}" \`sdjafoweiafdoafojffwq\` %s"
"${c1} \`dasdfjalsdfjasdlfjdd\`"${c2}" \`asdfjalsdfjasdlfjdda\` %s"
"${c1} \`dddwdsfasdfjaapzxaw\`"${c2}" \`ddwdsfasdfjaapzxawo\` %s"
"${c1} \`dddwoapfjsowzocmw\`"${c2}" \`ddwoapfjsowzocmwp\` %s"
"${c1} \`ddasowjfowiejao\`"${c2}" \`dasowjfowiejaow\` %s"
" %s"
"${c3} \`ddasowjfowiejao\`"${c4}" \`dasowjfowiejaow\` %s"
"${c3} \`dddwoapfjsowzocmw\`"${c4}" \`ddwoapfjsowzocmwp\` %s"
"${c3} \`dddwdsfasdfjaapzxaw\`"${c4}" \`ddwdsfasdfjaapzxawo\` %s"
"${c3} \`dasdfjalsdfjasdlfjdd\`"${c4}" \`asdfjalsdfjasdlfjdda\` %s"
"${c3} \`asdjafoweiafdoafojffw\`"${c4}" \`sdjafoweiafdoafojffwq\` %s"
"${c3} \`adowofaowiefawodpmmxs\`"${c4}" \`dowofaowiefawodpmmxso\` %s"
"${c3} \`aodowpwafjwodisosoaas\`"${c4}" \`odowpwafjwodisosoaaso\` %s"
"${c3} \`wadladfladlafsozmm\`"${c4}" \`wadladfladlafsozmm\` %s"
"${c3} \`dwdsfasdfjaapzx\`"${c4}" \`dwdsfasdfjaapzx\`"
"${c3} \`woapfjsod\`"${c4}" \`woapfjsod\`")
;;
"Mac OS X")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'green') # Green
c2=$(getColor 'brown') # Yellow
c3=$(getColor 'light red') # Orange
c4=$(getColor 'red') # Red
c5=$(getColor 'purple') # Purple
c6=$(getColor 'blue') # Blue
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; c3="${my_lcolor}"; c4="${my_lcolor}"; c5="${my_lcolor}"; c6="${my_lcolor}"; fi
startline="0"
fulloutput=("\n${c1} -/+:. %s"
"${c1} :++++. %s"
"${c1} /+++/. %s"
"${c1} .:-::- .+/:-\`\`.::- %s"
"${c1} .:/++++++/::::/++++++/:\` %s"
"${c2} .:///////////////////////:\` %s"
"${c2} ////////////////////////\` %s"
"${c3} -+++++++++++++++++++++++\` %s"
"${c3} /++++++++++++++++++++++/ %s"
"${c4} /sssssssssssssssssssssss. %s"
"${c4} :ssssssssssssssssssssssss- %s"
"${c5} osssssssssssssssssssssssso/\` %s"
"${c5} \`syyyyyyyyyyyyyyyyyyyyyyyy+\` %s"
"${c6} \`ossssssssssssssssssssss/ %s"
"${c6} :ooooooooooooooooooo+. %s"
"${c6} \`:+oo+/:-..-:/+o+/- %s\n")
;;
"Mac OS X - Classic")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'blue') # Blue
c2=$(getColor 'light blue') # Light blue
c3=$(getColor 'light grey') # Gray
c4=$(getColor 'dark grey') # Dark Ggray
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
startline="0"
fulloutput=("${c3}\n .. %s"
"${c3} dWc %s"
"${c3} ,X0' %s"
"${c1} ;;;;;;;;;;;;;;;;;;${c3}0Mk${c2}::::::::::::::: %s"
"${c1} ;;;;;;;;;;;;;;;;;${c3}KWo${c2}:::::::::::::::: %s"
"${c1} ;;;;;;;;;${c4}NN${c1};;;;;${c3}KWo${c2}:::::${c3}NN${c2}:::::::::: %s"
"${c1} ;;;;;;;;;${c4}NN${c1};;;;${c3}0Md${c2}::::::${c3}NN${c2}:::::::::: %s"
"${c1} ;;;;;;;;;${c4}NN${c1};;;${c3}xW0${c2}:::::::${c3}NN${c2}:::::::::: %s"
"${c1} ;;;;;;;;;;;;;;${c3}KMc${c2}::::::::::::::::::: %s"
"${c1} ;;;;;;;;;;;;;${c3}lWX${c2}:::::::::::::::::::: %s"
"${c1} ;;;;;;;;;;;;;${c3}xWWXXXXNN7${c2}::::::::::::: %s"
"${c1} ;;;;;;;;;;;;;;;;;;;;${c3}WK${c2}:::::::::::::: %s"
"${c1} ;;;;;${c4}TKX0ko.${c1};;;;;;;${c3}kMx${c2}:::${c3}.cOKNF${c2}::::: %s"
"${c1} ;;;;;;;;${c4}\`kO0KKKKKKK${c3}NMNXK0OP*${c2}:::::::: %s"
"${c1} ;;;;;;;;;;;;;;;;;;;${c3}kMx${c2}:::::::::::::: %s"
"${c1} ;;;;;;;;;;;;;;;;;;;;${c3}WX${c2}:::::::::::::: %s"
"${c3} lMc %s"
"${c3} kN. %s"
"${c3} o' %s\n")
;;
"Windows"|"Cygwin")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'light red') # Red
c2=$(getColor 'light green') # Green
c3=$(getColor 'light blue') # Blue
c4=$(getColor 'yellow') # Yellow
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; c3="${my_lcolor}"; c4="${my_lcolor}"; fi
startline="0"
fulloutput=("${c1} ,.=:!!t3Z3z., %s"
"${c1} :tt:::tt333EE3 %s"
"${c1} Et:::ztt33EEEL${c2} @Ee., .., %s"
"${c1} ;tt:::tt333EE7${c2} ;EEEEEEttttt33# %s"
"${c1} :Et:::zt333EEQ.${c2} \$EEEEEttttt33QL %s"
"${c1} it::::tt333EEF${c2} @EEEEEEttttt33F %s"
"${c1} ;3=*^\`\`\`\"*4EEV${c2} :EEEEEEttttt33@. %s"
"${c3} ,.=::::!t=., ${c1}\`${c2} @EEEEEEtttz33QF %s"
"${c3} ;::::::::zt33)${c2} \"4EEEtttji3P* %s"
"${c3} :t::::::::tt33.${c4}:Z3z..${c2} \`\`${c4} ,..g. %s"
"${c3} i::::::::zt33F${c4} AEEEtttt::::ztF %s"
"${c3} ;:::::::::t33V${c4} ;EEEttttt::::t3 %s"
"${c3} E::::::::zt33L${c4} @EEEtttt::::z3F %s"
"${c3}{3=*^\`\`\`\"*4E3)${c4} ;EEEtttt:::::tZ\` %s"
"${c3} \`${c4} :EEEEtttt::::z7 %s"
"${c4} \"VEzjt:;;z>*\` %s")
;;
"Haiku")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'black_haiku') # Black
c2=$(getColor 'light grey') # Light Gray
c3=$(getColor 'green') # Green
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; c3="${my_lcolor}"; fi
startline="0"
fulloutput=(
"${c1} :dc' %s"
"${c1} 'l:;'${c2},${c1}'ck. .;dc:. %s"
"${c1} co ${c2}..${c1}k. .;; ':o. %s"
"${c1} co ${c2}..${c1}k. ol ${c2}.${c1}0. %s"
"${c1} co ${c2}..${c1}k. oc ${c2}..${c1}0. %s"
"${c1} co ${c2}..${c1}k. oc ${c2}..${c1}0. %s"
"${c1}.Ol,. co ${c2}...''${c1}Oc;kkodxOdddOoc,. %s"
"${c1} ';lxxlxOdxkxk0kd${c3}oooll${c1}dl${c3}ccc:${c1}clxd; %s"
"${c1} ..${c3}oOolllllccccccc:::::${c1}od; %s"
"${c1} cx:ooc${c3}:::::::;${c1}cooolcX. %s"
"${c1} cd${c2}.${c1}''cloxdoollc' ${c2}...${c1}0. %s"
"${c1} cd${c2}......${c1}k;${c2}.${c1}xl${c2}.... .${c1}0. %s"
"${c1} .::c${c2};..${c1}cx;${c2}.${c1}xo${c2}..... .${c1}0. %s"
"${c1} '::c'${c2}...${c1}do${c2}..... .${c1}K, %s"
"${c1} cd,.${c2}....:${c1}O,${c2}...... %s"
"${c1} ':clod:'${c2}...... %s"
"${c1} ${c2}. %s")
;;
"Trisquel")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'light blue') # Light Blue
c2=$(getColor 'light cyan') # Blue
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
startline="0"
fulloutput=(
"${c1} ▄▄▄▄▄▄ %s"
"${c1} ▄█████████▄ %s"
"${c1} ▄▄▄▄▄▄ ████▀ ▀████ %s"
"${c1} ▄██████████▄ ████▀ ▄▄ ▀███ %s"
"${c1} ▄███▀▀ ▀▀████ ███▄ ▄█ ███ %s"
"${c1} ▄███ ▄▄▄ ████▄ ▀██████ ▄███ %s"
"${c1} ███ █▀▀██▄ █████▄ ▀▀ ▄████ %s"
"${c1} ▀███ ███ ███████▄▄ ▄▄██████ %s"
"${c1} ▀███▄ ▄███ █████████████${c2}████▀ %s"
"${c1} ▀█████████ ███████${c2}███▀▀▀ %s"
"${c1} ▀▀███▀▀ ██${c2}████▀▀ %s"
"${c2} ██████▀ ▄▄▄▄ %s"
"${c2} █████▀ ████████ %s"
"${c2} █████ ███▀ ▀███ %s"
"${c2} ████▄ ██▄▄▄ ███ %s"
"${c2} █████▄ ▀▀ ▄██ %s"
"${c2} ██████▄▄▄████ %s"
"${c2} ▀▀█████▀▀ %s")
;;
"Manjaro")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'light green') # Green
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; fi
startline="0"
fulloutput=(
"${c1} ██████████████████ ████████ %s"
"${c1} ██████████████████ ████████ %s"
"${c1} ██████████████████ ████████ %s"
"${c1} ██████████████████ ████████ %s"
"${c1} ████████ ████████ %s"
"${c1} ████████ ████████ ████████ %s"
"${c1} ████████ ████████ ████████ %s"
"${c1} ████████ ████████ %s"
"${c1} ████████ ████████ ████████ %s"
"${c1} ████████ ████████ ████████ %s"
"${c1} ████████ ████████ ████████ %s"
"${c1} ████████ ████████ ████████ %s"
"${c1} ████████ ████████ ████████ %s"
"${c1} ████████ ████████ ████████ %s"
"${c1} ████████ ████████ ████████ %s"
"${c1} ████████ ████████ ████████ %s"
"${c1} ████████ ████████ ████████ %s"
" %s")
;;
"Logos")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'green') # Green
c2=$(getColor 'white') # White
fi
startline="0"
fulloutput=(
"$c1 ..:.:. $c2%s"
"$c1 ..:.:.:.:. $c2%s"
"$c1 ..:.:.:.:.:.:. $c2%s"
"$c1 ..:.:.:.:.:.:.:.:. $c2%s"
"$c1 .:.::;.::::..:.:.:. $c2%s"
"$c1 .:.:.::.::.::.;;/ $c2%s"
"$c1 .:.::.:::///// $c2%s"
"$c1 ..;;/////// $c2%s"
"$c1 /////////// $c2%s"
"$c1 ////////////// $c2%s"
"$c1 ///////////////// $c2%s"
"$c1 /////////////////// $c2%s"
"$c1 ////////////////// $c2%s"
"$c1 ////////////// $c2%s"
"$c1 ////////// $c2%s"
"$c1 ////// $c2%s"
"$c1 // $c2%s")
;;
"Manjaro-tree")
if [[ "$no_color" != "1" ]]; then
c1="\e[1;32m" # Green
c2="\e[1;33m" # Yellow
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
startline="0"
fulloutput=(
"${c1} ### %s"
"${c1} ### #### %s"
"${c1} ### #### %s"
"${c1} ##### ##### %s"
"${c1} ################# %s"
"${c1} ### ##### #### %s"
"${c1} ## ${c2}OOO ${c1}### %s"
"${c1} # ${c2}WW ${c1}## %s"
"${c1} ${c2}WW ${c1}# %s"
"${c2} WW %s"
"${c2} WW %s"
"${c2} WW %s"
"${c2} WW %s"
"${c2} WW %s"
"${c2} WW %s"
"${c2} WW %s"
"${c2} WW %s"
" %s")
;;
"elementary OS"|"elementary os")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'white') # White
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; fi
startline="0"
fulloutput=(
" %s"
"${c1} eeeeeeeeeeeeeeeee %s"
"${c1} eeeeeeeeeeeeeeeeeeeeeee %s"
"${c1} eeeee eeeeeeeeeeee eeeee %s"
"${c1} eeee eeeee eee eeee %s"
"${c1} eeee eeee eee eeee %s"
"${c1}eee eee eee eee %s"
"${c1}eee eee eee eee %s"
"${c1}ee eee eeee eeee %s"
"${c1}ee eee eeeee eeeeee %s"
"${c1}ee eee eeeee eeeee ee %s"
"${c1}eee eeee eeeeee eeeee eee %s"
"${c1}eee eeeeeeeeee eeeeee eee %s"
"${c1} eeeeeeeeeeeeeeeeeeeeeeee eeeee %s"
"${c1} eeeeeeee eeeeeeeeeeee eeee %s"
"${c1} eeeee eeeee %s"
"${c1} eeeeeee eeeeeee %s"
"${c1} eeeeeeeeeeeeeeeee %s")
;;
"Android")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'white') # White
c2=$(getColor 'light green') # Bold Green
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; fi
startline="2"
fulloutput=(
"${c2} ╲ ▁▂▂▂▁ ╱"
"${c2} ▄███████▄ "
"${c2} ▄██${c1} ${c2}███${c1} ${c2}██▄ %s"
"${c2} ▄███████████▄ %s"
"${c2} ▄█ ▄▄▄▄▄▄▄▄▄▄▄▄▄ █▄ %s"
"${c2} ██ █████████████ ██ %s"
"${c2} ██ █████████████ ██ %s"
"${c2} ██ █████████████ ██ %s"
"${c2} ██ █████████████ ██ %s"
"${c2} █████████████ %s"
"${c2} ███████████ %s"
"${c2} ██ ██"
"${c2} ██ ██")
;;
"Scientific Linux")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'light blue')
c2=$(getColor 'light red')
c3=$(getColor 'white')
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
startline="1"
fulloutput=("${c1} =/;;/-"
"${c1} +: // %s"
"${c1} /; /; %s"
"${c1} -X H. %s"
"${c1} .//;;;:;;-, X= :+ .-;:=;:;#;. %s"
"${c1} M- ,=;;;#:, ,:#;;:=, ,@ %s"
"${c1} :# :#.=/++++/=.$= #= %s"
"${c1} ,#; #/:+/;,,/++:+/ ;+. %s"
"${c1} ,+/. ,;@+, ,#H;, ,/+, %s"
"${c1} ;+;;/= @. ${c2}.H${c3}#${c2}#X ${c1}-X :///+; %s"
"${c1} ;+=;;;.@, ${c3}.X${c2}M${c3}@$. ${c1}=X.//;=#/. %s"
"${c1} ,;: :@#= =\$H: .+#- %s"
"${c1} ,#= #;-///==///-// =#, %s"
"${c1} ;+ :#-;;;:;;;;-X- +: %s"
"${c1} @- .-;;;;M- =M/;;;-. -X %s"
"${c1} :;;::;;-. #- :+ ,-;;-;:== %s"
"${c1} ,X H. %s"
"${c1} ;/ #= %s"
"${c1} // +; %s"
"${c1} '////'")
;;
"BackTrack Linux")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'white') # White
c2=$(getColor 'light red') # Light Red
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
startline="1"
fulloutput=("${c1}.............."
"${c1} ..,;:ccc,. %s"
"${c1} ......''';lxO. %s"
"${c1}.....''''..........,:ld; %s"
"${c1} .';;;:::;,,.x, %s"
"${c1} ..'''. 0Xxoc:,. ... %s"
"${c1} .... ,ONkc;,;cokOdc',. %s"
"${c1} . OMo ':"${c2}"dd"${c1}"o. %s"
"${c1} dMc :OO; %s"
"${c1} 0M. .:o. %s"
"${c1} ;Wd %s"
"${c1} ;XO, %s"
"${c1} ,d0Odlc;,.. %s"
"${c1} ..',;:cdOOd::,. %s"
"${c1} .:d;.':;. %s"
"${c1} 'd, .' %s"
"${c1} ;l ..%s"
"${c1} .o %s"
"${c1} c %s"
"${c1} .'"
"${c1} .")
;;
"Kali Linux")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'light blue') # White
c2=$(getColor 'black') # Light Red
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
startline="1"
fulloutput=("${c1}.............."
"${c1} ..,;:ccc,. %s"
"${c1} ......''';lxO. %s"
"${c1}.....''''..........,:ld; %s"
"${c1} .';;;:::;,,.x, %s"
"${c1} ..'''. 0Xxoc:,. ... %s"
"${c1} .... ,ONkc;,;cokOdc',. %s"
"${c1} . OMo ':"${c2}"dd"${c1}"o. %s"
"${c1} dMc :OO; %s"
"${c1} 0M. .:o. %s"
"${c1} ;Wd %s"
"${c1} ;XO, %s"
"${c1} ,d0Odlc;,.. %s"
"${c1} ..',;:cdOOd::,. %s"
"${c1} .:d;.':;. %s"
"${c1} 'd, .' %s"
"${c1} ;l ..%s"
"${c1} .o %s"
"${c1} c %s"
"${c1} .'"
"${c1} .")
;;
"Sabayon")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'white') # White
c2=$(getColor 'light blue') # Blue
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; fi
startline="0"
fulloutput=("${c2} ........... %s"
"${c2} .. .. %s"
"${c2} .. .. %s"
"${c2} .. ${c1}o ${c2}.. %s"
"${c2} .. ${c1}:W' ${c2}.. %s"
"${c2} .. ${c1}.d. ${c2}.. %s"
"${c2}:. ${c1}.KNO ${c2}.: %s"
"${c2}:. ${c1}cNNN. ${c2}.: %s"
"${c2}: ${c1}dXXX, ${c2}: %s"
"${c2}: ${c1}. dXXX, .cd, ${c2}: %s"
"${c2}: ${c1}'kc .. dKKK. ,ll;:' ${c2}: %s"
"${c2}: ${c1}.xkkxc;..dkkkc',cxkkl ${c2}: %s"
"${c2}:. ${c1}.,cdddddddddddddo:. ${c2}.: %s"
"${c2} .. ${c1}:lllllll: ${c2}.. %s"
"${c2} .. ${c1}',,,,, ${c2}.. %s"
"${c2} .. .. %s"
"${c2} .. .. %s"
"${c2} ............... %s")
;;
"KaOS")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'light blue')
c2=$(getColor 'light grey')
c3=$(getColor 'red')
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
startline="0"
fulloutput=(
"${c1} ████████ ████████ %s"
"${c1} ██████ ██████ %s"
"${c1} ████ ████ %s"
"${c1} █ █ %s"
"${c1} █ %s"
"${c1} █ ${c2} ████████ ████████%s"
"${c1} █ ${c2} ██████ ██████ %s"
"${c1} █ ${c2} ████ ████ %s"
"${c1} █ ${c2} █ █ %s"
"${c1} █ ${c2} █ %s"
"${c1} ${c3}███████ ███████ %s"
"${c1} ${c3} █████ █████${c2} █ %s"
"${c1} █${c3} ███ ███ ${c2} █ %s"
"${c1} █ ${c3} █ ${c2} █ %s"
"${c1} █ ${c3}█ ${c2} █ %s"
"${c1} █ ${c3}█ ${c2} █ %s")
;;
"CentOS")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'yellow') # White
c2=$(getColor 'light green') # White
c3=$(getColor 'light blue') # White
c4=$(getColor 'light purple') # White
c5=$(getColor 'white') # White
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; fi
startline="0"
fulloutput=("${c1} .. %s"
"${c1} .PLTJ. %s"
"${c1} <><><><> %s"
" ${c2}KKSSV' 4KKK ${c1}LJ${c4} KKKL.'VSSKK %s"
" ${c2}KKV' 4KKKKK ${c1}LJ${c4} KKKKAL 'VKK %s"
" ${c2}V' ' 'VKKKK ${c1}LJ${c4} KKKKV' ' 'V %s"
" ${c2}.4MA.' 'VKK ${c1}LJ${c4} KKV' '.4Mb. %s"
"${c4} . ${c2}KKKKKA.' 'V ${c1}LJ${c4} V' '.4KKKKK ${c3}. %s"
"${c4} .4D ${c2}KKKKKKKA.'' ${c1}LJ${c4} ''.4KKKKKKK ${c3}FA. %s"
"${c4} %s"
"${c4} 'VD ${c3}KKKKKKKK'.. ${c2}LJ ${c1}..'KKKKKKKK ${c3}FV %s"
"${c4} ' ${c3}VKKKKK'. .4 ${c2}LJ ${c1}K. .'KKKKKV ${c3}' %s"
" ${c3} 'VK'. .4KK ${c2}LJ ${c1}KKA. .'KV' %s"
" ${c3}A. . .4KKKK ${c2}LJ ${c1}KKKKA. . .4 %s"
" ${c3}KKA. 'KKKKK ${c2}LJ ${c1}KKKKK' .4KK %s"
" ${c3}KKSSA. VKKK ${c2}LJ ${c1}KKKV .4SSKK %s"
"${c2} <><><><> %s"
"${c2} 'MKKM' %s"
"${c2} ''")
;;
"Jiyuu Linux")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'light blue') # Light Blue
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; fi
startline="0"
fulloutput=("${c1}+++++++++++++++++++++++. %s"
"${c1}ss:-......-+so/:----.os- %s"
"${c1}ss +s/ os- %s"
"${c1}ss :s+ os- %s"
"${c1}ss os. os- %s"
"${c1}ss .so os- %s"
"${c1}ss :s+ os- %s"
"${c1}ss /s/ os- %s"
"${c1}ss /s: os- %s"
"${c1}ss +s- os- %s"
"${c1}ss-.....os:..........os- %s"
"${c1}++++++++os+++++++++oooo. %s"
"${c1} os. ./oo/. %s"
"${c1} os. ./oo: %s"
"${c1} os. ./oo: %s"
"${c1} os oo+- %s"
"${c1} os+- %s"
"${c1} /. %s")
;;
"Antergos")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'blue') # Light Blue
c2=$(getColor 'light blue') # Light Blue
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; fi
startline="1"
fulloutput=("${c1} \`.-/::/-\`\`"
"${c1} .-/osssssssso/. %s"
"${c1} :osyysssssssyyys+- %s"
"${c1} \`.+yyyysssssssssyyyyy+. %s"
"${c1} \`/syyyyyssssssssssyyyyys-\` %s"
"${c1} \`/yhyyyyysss${c2}++${c1}ssosyyyyhhy/\` %s"
"${c1} .ohhhyyyys${c2}o++/+o${c1}so${c2}+${c1}syy${c2}+${c1}shhhho. %s"
"${c1} .shhhhys${c2}oo++//+${c1}sss${c2}+++${c1}yyy${c2}+s${c1}hhhhs. %s"
"${c1} -yhhhhs${c2}+++++++o${c1}ssso${c2}+++${c1}yyy${c2}s+o${c1}hhddy: %s"
"${c1} -yddhhy${c2}o+++++o${c1}syyss${c2}++++${c1}yyy${c2}yooy${c1}hdddy- %s"
"${c1} .yddddhs${c2}o++o${c1}syyyyys${c2}+++++${c1}yyhh${c2}sos${c1}hddddy\` %s"
"${c1}\`odddddhyosyhyyyyyy${c2}++++++${c1}yhhhyosddddddo %s"
"${c1}.dmdddddhhhhhhhyyyo${c2}+++++${c1}shhhhhohddddmmh. %s"
"${c1}ddmmdddddhhhhhhhso${c2}++++++${c1}yhhhhhhdddddmmdy %s"
"${c1}dmmmdddddddhhhyso${c2}++++++${c1}shhhhhddddddmmmmh %s"
"${c1}-dmmmdddddddhhys${c2}o++++o${c1}shhhhdddddddmmmmd- %s"
"${c1} .smmmmddddddddhhhhhhhhhdddddddddmmmms. %s"
"${c1} \`+ydmmmdddddddddddddddddddmmmmdy/. %s"
"${c1} \`.:+ooyyddddddddddddyyso+:.\`")
;;
"Void")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'green') # Dark Green
c2=$(getColor 'light green') # Light Green
c3=$(getColor 'dark grey') # Black
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; c3="${my_lcolor}"; fi
startline="0"
fulloutput=("${c2} __.;=====;.__ %s"
"${c2} _.=+==++=++=+=+===;. %s"
"${c2} -=+++=+===+=+=+++++=_ %s"
"${c1} . "${c2}"-=:\`\` \`--==+=++==. %s"
"${c1} _vi, "${c2}"\` --+=++++: %s"
"${c1} .uvnvi. "${c2}"_._ -==+==+. %s"
"${c1} .vvnvnI\` "${c2}".;==|==;. :|=||=|. %s"
"${c3} +QmQQm"${c1}"pvvnv; "${c3}"_yYsyQQWUUQQQm #QmQ#"${c2}":"${c3}"QQQWUV\$QQmL %s"
"${c3} -QQWQW"${c1}"pvvo"${c3}"wZ?.wQQQE"${c2}"==<"${c3}"QWWQ/QWQW.QQWW"${c2}"(: "${c3}"jQWQE %s"
"${c3} -\$QQQQmmU' jQQQ@"${c2}"+=<"${c3}"QWQQ)mQQQ.mQQQC"${c2}"+;${c3}jWQQ@' %s"
"${c3} -\$WQ8Y"${c1}"nI: ${c3}QWQQwgQQWV"${c2}"\`"${c3}"mWQQ.jQWQQgyyWW@! %s"
"${c1} -1vvnvv. "${c2}"\`~+++\` ++|+++ %s"
"${c1} +vnvnnv, "${c2}"\`-|=== %s"
"${c1} +vnvnvns. . "${c2}":=- %s"
"${c1} -Invnvvnsi..___..=sv=. "${c2}"\` %s"
"${c1} +Invnvnvnnnnnnnnvvnn;. %s"
"${c1} ~|Invnvnvvnvvvnnv}+\` %s"
"${c1} -~\"|{*l}*|\"\"~ %s")
;;
"NixOS")
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'purple')
c2=$(getColor 'light blue')
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
startline="0"
fulloutput=("${c2} .:. %s"
"${c2} ::: %s"
"${c2} ... ::: ${c1}.:. %s"
"${c2} ':::::. ::: ${c1}::: %s"
"${c1} ... ${c2}':::::: ${c1}::: .. %s"
"${c1} ::::. ..${c2}':::::. ${c1}::: .::::' %s"
"${c1} ''::::..::::'' ${c2}'':::.${c1}::::::'' %s"
"${c1} .::::${c2}.${c1}'' ${c2}':${c1}:::' %s"
"${c1} .:::::${c2}::: ${c1}::: %s"
"${c1} .:::' ${c2}::: ${c1}::: ${c2}..::: %s"
"${c1} '' ${c2}::: ${c1}:${c2}.:::::'' %s"
"${c2} .:::${c1}:. ${c2}.:::::' %s"
"${c2} ..::::::${c1}'::::. ${c2}.:::::''::::.. %s"
"${c2} ::::' ::: ${c1}'::::${c2}':' ${c2}'::::. %s"
"${c2} ''' ::: ${c1}:::::::. ${c2}''' %s"
"${c2} ::: ${c1}::: ':::::. %s"
"${c2} ::: ${c1}::: ''' %s"
"${c2} ' ${c1}::: %s"
"${c1} ::: %s"
"${c1} ' %s")
;;
*)
if [ "$(echo "${kernel}" | grep 'Linux' )" ]; then
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'white') # White
c2=$(getColor 'dark grey') # Light Gray
c3=$(getColor 'yellow') # Light Yellow
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; c3="${my_lcolor}"; fi
startline="0"
fulloutput=(" %s"
" %s"
" %s"
"$c2 #####$c0 %s"
"$c2 ####### %s"
"$c2 ##"$c1"O$c2#"$c1"O$c2## %s"
"$c2 #$c3#####$c2# %s"
"$c2 ##$c1##$c3###$c1##$c2## %s"
"$c2 #$c1##########$c2## %s"
"$c2 #$c1############$c2## %s"
"$c2 #$c1############$c2### %s"
"$c3 ##$c2#$c1###########$c2##$c3# %s"
"$c3 ######$c2#$c1#######$c2#$c3###### %s"
"$c3 #######$c2#$c1#####$c2#$c3####### %s"
"$c3 #####$c2#######$c3##### %s"
" %s"
" %s"
" %s")
elif [[ "$(echo "${kernel}" | grep 'GNU' )" || "$(echo "${kernel}" | grep 'Hurd' )" || "${OSTYPE}" == "gnu" ]]; then
startline="0"
fulloutput=(
" _-\`\`\`\`\`-, ,- '- . %s"
" .' .- - | | - -. \`. %s"
" /.' / \`. \\ %s"
" :/ : _... ..._ \`\` : %s"
" :: : /._ .\`:'_.._\\. || : %s"
" :: \`._ ./ ,\` : \\ . _.'' . %s"
" \`:. / | -. \\-. \\\\\_ / %s"
" \\:._ _/ .' .@) \\@) \` \`\\ ,.' %s"
" _/,--' .- .\\,-.\`--\`. %s"
" ,'/'' (( \\ \` ) %s"
" /'/' \\ \`-' ( %s"
" '/'' \`._,-----' %s"
" ''/' .,---' %s"
" ''/' ;: %s"
" ''/'' ''/ %s"
" ''/''/'' %s"
" '/'/' %s"
" \`; %s")
# Source: https://www.gnu.org/graphics/alternative-ascii.en.html
# Copyright (C) 2003, Vijay Kumar
# Permission is granted to copy, distribute and/or modify this image under the
# terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
else
if [[ "$no_color" != "1" ]]; then
c1=$(getColor 'light green') # Light Green
fi
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; fi
startline="0"
fulloutput=(" %s"
" %s"
"$c1 UUU UUU NNN NNN IIIII XXX XXXX%s"
"$c1 UUU UUU NNNN NNN III XX xXX %s"
"$c1 UUU UUU NNNNN NNN III XX xXX %s"
"$c1 UUU UUU NNN NN NNN III XXXX %s"
"$c1 UUU UUU NNN NN NNN III xXX %s"
"$c1 UUU UUU NNN NN NNN III xXXXX %s"
"$c1 UUU UUU NNN NNNNN III xXX XX %s"
"$c1 UUUuuuUUU NNN NNNN III xXX XX %s"
"$c1 UUUUU NNN NNN IIIII xXXx xXXx%s"
" %s"
" %s"
" %s"
" %s")
fi
;;
esac
# Truncate lines based on terminal width.
if [ "$truncateSet" == "Yes" ]; then
for ((i=0; i<${#fulloutput[@]}; i++)); do
my_out=$(printf "${fulloutput[i]}$c0\n" "${out_array}")
my_out_full=$(echo "$my_out" | cat -v)
termWidth=$(tput cols)
SHOPT_EXTGLOB_STATE=$(shopt -p extglob)
read SHOPT_CMD SHOPT_STATE SHOPT_OPT <<< ${SHOPT_EXTGLOB_STATE}
if [[ ${SHOPT_STATE} == "-u" ]]; then
shopt -s extglob
fi
stringReal="${my_out_full//\^\[\[@([0-9]|[0-9];[0-9][0-9])m}"
if [[ ${SHOPT_STATE} == "-u" ]]; then
shopt -u extglob
fi
if [[ "${#stringReal}" -le "${termWidth}" ]]; then
echo -e "${my_out}"$c0
elif [[ "${#stringReal}" -gt "${termWidth}" ]]; then
((NORMAL_CHAR_COUNT=0))
for ((j=0; j<=${#my_out_full}; j++)); do
if [[ "${my_out_full:${j}:3}" == '^[[' ]]; then
if [[ "${my_out_full:${j}:5}" =~ ^\^\[\[[[:digit:]]m$ ]]; then
if [[ ${j} -eq 0 ]]; then
j=$((${j} + 5))
else
j=$((${j} + 4))
fi
elif [[ "${my_out_full:${j}:8}" =~ ^\^\[\[[[:digit:]]\;[[:digit:]][[:digit:]]m ]]; then
if [[ ${j} -eq 0 ]]; then
j=$((${j} + 8))
else
j=$((${j} + 7))
fi
fi
else
((NORMAL_CHAR_COUNT++))
if [[ ${NORMAL_CHAR_COUNT} -ge ${termWidth} ]]; then
echo -e "${my_out:0:$((${j} - 5))}"$c0
break 1
fi
fi
done
fi
if [[ "$i" -ge "$startline" ]]; then
unset out_array[0]
out_array=( "${out_array[@]}" )
fi
done
elif [[ "$portraitSet" = "Yes" ]]; then
for ((i=0; $i<${#fulloutput[*]}; i++)); do
printf "${fulloutput[$i]}$c0\n"
done
printf "\n"
for ((i=0; $i<${#fulloutput[*]}; i++)); do
[[ -z "$out_array" ]] && continue
printf "%s\n" "${out_array}"
unset out_array[0]
out_array=( "${out_array[@]}" )
done
elif [[ "$display_logo" == "Yes" ]]; then
for ((i=0; i<${#fulloutput[*]}; i++)); do
printf "${fulloutput[i]}\n"
done
else
#n=${#fulloutput[*]}
for ((i=0; i<${#fulloutput[*]}; i++)); do
# echo "${out_array[@]}"
febreeze=$(awk 'BEGIN{srand();print int(rand()*(1000-1))+1 }')
if [[ "${febreeze}" == "411" || "${febreeze}" == "188" || "${febreeze}" == "15" || "${febreeze}" == "166" || "${febreeze}" == "609" ]]; then
f_size=${#fulloutput[*]}
o_size=${#out_array[*]}
f_max=$(( 32768 / f_size * f_size ))
#o_max=$(( 32768 / o_size * o_size ))
for ((a=f_size-1; a>0; a--)); do
while (( (rand=$RANDOM) >= f_max )); do :; done
rand=$(( rand % (a+1) ))
tmp=${fulloutput[a]} fulloutput[a]=${fulloutput[rand]} fulloutput[rand]=$tmp
done
for ((b=o_size-1; b>0; b--)); do
rand=$(( rand % (b+1) ))
tmp=${out_array[b]} out_array[b]=${out_array[rand]} out_array[rand]=$tmp
done
fi
printf "${fulloutput[i]}$c0\n" "${out_array}"
if [[ "$i" -ge "$startline" ]]; then
unset out_array[0]
out_array=( "${out_array[@]}" )
fi
done
fi
# Done with ASCII output
}
infoDisplay () {
textcolor="\033[0m"
[[ "$my_hcolor" ]] && textcolor="${my_hcolor}"
#TODO: Centralize colors and use them across the board so we only change them one place.
myascii="${distro}"
[[ "${asc_distro}" ]] && myascii="${asc_distro}"
case ${myascii} in
"Arch Linux - Old"|"Fedora"|"Korora"|"Chapeau"|"Mandriva"|"Mandrake"|"Chakra"|"ChromeOS"|"Sabayon"|"Slackware"|"Mac OS X"|"Trisquel"|"Kali Linux"|"Jiyuu Linux"|"Antergos"|"KaOS"|"Logos"|"gNewSense"|"NixOS") labelcolor=$(getColor 'light blue');;
"Arch Linux"|"Frugalware"|"Mageia"|"Deepin"|"CRUX") labelcolor=$(getColor 'light cyan');;
"Mint"|"LMDE"|"openSUSE"|"LinuxDeepin"|"DragonflyBSD"|"Manjaro"|"Manjaro-tree"|"Android"|"Void") labelcolor=$(getColor 'light green');;
"Ubuntu"|"FreeBSD"|"FreeBSD - Old"|"Debian"|"Raspbian"|"BSD"|"Red Hat Enterprise Linux"|"Peppermint"|"Cygwin"|"Fuduntu"|"NetBSD"|"Scientific Linux"|"DragonFlyBSD"|"BackTrack Linux") labelcolor=$(getColor 'light red');;
"CrunchBang"|"Solus"|"Viperr"|"elementary"*) labelcolor=$(getColor 'dark grey');;
"Gentoo"|"Parabola GNU/Linux-libre"|"Funtoo"|"Funtoo-text"|"BLAG") labelcolor=$(getColor 'light purple');;
"Haiku") labelcolor=$(getColor 'green');;
"CentOS"|*) labelcolor=$(getColor 'yellow');;
esac
[[ "$my_lcolor" ]] && labelcolor="${my_lcolor}"
if [[ "$art" ]]; then source "$art"; fi
if [[ "$no_color" == "1" ]]; then labelcolor=""; bold=""; c0=""; textcolor=""; fi
# Some verbosity stuff
[[ "$screenshot" == "1" ]] && verboseOut "Screenshot will be taken after info is displayed."
[[ "$upload" == "1" ]] && verboseOut "Screenshot will be transferred/uploaded to specified location."
#########################
# Info Variable Setting #
#########################
if [[ "${distro}" == "Android" ]]; then
myhostname=$(echo -e "${labelcolor}${hostname}"); out_array=( "${out_array[@]}" "$myhostname" )
mydistro=$(echo -e "$labelcolor OS:$textcolor $distro $distro_ver"); out_array=( "${out_array[@]}" "$mydistro" )
mydevice=$(echo -e "$labelcolor Device:$textcolor $device"); out_array=( "${out_array[@]}" "$mydevice" )
myrom=$(echo -e "$labelcolor ROM:$textcolor $rom"); out_array=( "${out_array[@]}" "$myrom" )
mybaseband=$(echo -e "$labelcolor Baseband:$textcolor $baseband"); out_array=( "${out_array[@]}" "$mybaseband" )
mykernel=$(echo -e "$labelcolor Kernel:$textcolor $kernel"); out_array=( "${out_array[@]}" "$mykernel" )
myuptime=$(echo -e "$labelcolor Uptime:$textcolor $uptime"); out_array=( "${out_array[@]}" "$myuptime" )
mycpu=$(echo -e "$labelcolor CPU:$textcolor $cpu"); out_array=( "${out_array[@]}" "$mycpu" )
mygpu=$(echo -e "$labelcolor GPU:$textcolor $cpu"); out_array=( "${out_array[@]}" "$mygpu" )
mymem=$(echo -e "$labelcolor RAM:$textcolor $mem"); out_array=( "${out_array[@]}" "$mymem" )
else
if [[ "${display[@]}" =~ "host" ]]; then myinfo=$(echo -e "${labelcolor}${myUser}$textcolor${bold}@${c0}${labelcolor}${myHost}"); out_array=( "${out_array[@]}" "$myinfo" ); ((display_index++)); fi
if [[ "${display[@]}" =~ "distro" ]]; then
if [ "$distro" == "Mac OS X" ]; then
sysArch=`str1=$(ioreg -l -p IODeviceTree | grep firmware-abi);echo ${str1: -4: 2}bit`
prodVers=`prodVers=$(sw_vers|grep ProductVersion);echo ${prodVers:15}`
buildVers=`buildVers=$(sw_vers|grep BuildVersion);echo ${buildVers:14}`
if [ -n "$distro_more" ]; then mydistro=$(echo -e "$labelcolor OS:$textcolor $distro_more $sysArch")
else mydistro=$(echo -e "$labelcolor OS:$textcolor $sysArch $distro $prodVers $buildVers"); fi
elif [[ "$distro" == "Cygwin" ]]; then
distro=$(wmic os get name | head -2 | tail -1)
distro=$(expr match "$distro" '\(Microsoft Windows [A-Za-z0-9.]\+\)')
sysArch=$(wmic os get OSArchitecture | head -2 | tail -1 | tr -d '\r ')
mydistro=$(echo -e "$labelcolor OS:$textcolor $distro $sysArch")
else
if [ -n "$distro_more" ]; then mydistro=$(echo -e "$labelcolor OS:$textcolor $distro_more")
else mydistro=$(echo -e "$labelcolor OS:$textcolor $distro $sysArch"); fi
fi
out_array=( "${out_array[@]}" "$mydistro" )
((display_index++))
fi
if [[ "${display[@]}" =~ "kernel" ]]; then mykernel=$(echo -e "$labelcolor Kernel:$textcolor $kernel"); out_array=( "${out_array[@]}" "$mykernel" ); ((display_index++)); fi
if [[ "${display[@]}" =~ "uptime" ]]; then myuptime=$(echo -e "$labelcolor Uptime:$textcolor $uptime"); out_array=( "${out_array[@]}" "$myuptime" ); ((display_index++)); fi
if [[ "${display[@]}" =~ "pkgs" ]]; then mypkgs=$(echo -e "$labelcolor Packages:$textcolor $pkgs"); out_array=( "${out_array[@]}" "$mypkgs" ); ((display_index++)); fi
if [[ "${display[@]}" =~ "shell" ]]; then myshell=$(echo -e "$labelcolor Shell:$textcolor $myShell"); out_array=( "${out_array[@]}" "$myshell" ); ((display_index++)); fi
if [[ -n "$DISPLAY" || "$distro" == "Mac OS X" ]]; then
if [ -n "${xResolution}" ]; then
if [[ "${display[@]}" =~ "res" ]]; then myres=$(echo -e "$labelcolor Resolution:${textcolor} $xResolution"); out_array=( "${out_array[@]}" "$myres" ); ((display_index++)); fi
fi
if [[ "${display[@]}" =~ "de" ]]; then
if [[ "${DE}" != "Not Present" ]]; then
myde=$(echo -e "$labelcolor DE:$textcolor $DE"); out_array=( "${out_array[@]}" "$myde" ); ((display_index++))
fi
fi
if [[ "${display[@]}" =~ "wm" ]]; then mywm=$(echo -e "$labelcolor WM:$textcolor $WM"); out_array=( "${out_array[@]}" "$mywm" ); ((display_index++)); fi
if [[ "${display[@]}" =~ "wmtheme" ]]; then
if [[ "${Win_theme}" == "Not Applicable" || "${Win_theme}" == "Not Found" ]]; then
:
else
mywmtheme=$(echo -e "$labelcolor WM Theme:$textcolor $Win_theme"); out_array=( "${out_array[@]}" "$mywmtheme" ); ((display_index++)); fi
fi
if [[ "${display[@]}" =~ "gtk" ]]; then
if [ "$distro" == "Mac OS X" ]; then
if [[ "$gtkFont" != "Not Applicable" && "$gtkFont" != "Not Found" ]]; then
if [ -n "$gtkFont" ]; then
myfont=$(echo -e "$labelcolor Font:$textcolor $gtkFont"); out_array=( "${out_array[@]}" "$myfont" ); ((display_index++))
fi
fi
else
if [[ "$gtk2Theme" != "Not Applicable" && "$gtk2Theme" != "Not Found" ]]; then
if [ -n "$gtk2Theme" ]; then
mygtk2="${gtk2Theme} [GTK2]"
fi
fi
if [[ "$gtk3Theme" != "Not Applicable" && "$gtk3Theme" != "Not Found" ]]; then
if [ -n "$mygtk2" ]; then
mygtk3=", ${gtk3Theme} [GTK3]"
else
mygtk3="${gtk3Theme} [GTK3]"
fi
fi
if [[ "$gtk_2line" == "yes" ]]; then
mygtk2=$(echo -e "$labelcolor GTK2 Theme:$textcolor $gtk2Theme"); out_array=( "${out_array[@]}" "$mygtk2" ); ((display_index++))
mygtk3=$(echo -e "$labelcolor GTK3 Theme:$textcolor $gtk3Theme"); out_array=( "${out_array[@]}" "$mygtk3" ); ((display_index++))
else
if [[ "$gtk2Theme" == "$gtk3Theme" ]]; then
if [[ "$gtk2Theme" != "Not Applicable" && "$gtk2Theme" != "Not Found" ]]; then
mygtk=$(echo -e "$labelcolor GTK Theme:$textcolor ${gtk2Theme} [GTK2/3]"); out_array=( "${out_array[@]}" "$mygtk" ); ((display_index++))
fi
else
mygtk=$(echo -e "$labelcolor GTK Theme:$textcolor ${mygtk2}${mygtk3}"); out_array=( "${out_array[@]}" "$mygtk" ); ((display_index++))
fi
fi
if [[ "$gtkIcons" != "Not Applicable" && "$gtkIcons" != "Not Found" ]]; then
if [ -n "$gtkIcons" ]; then
myicons=$(echo -e "$labelcolor Icon Theme:$textcolor $gtkIcons"); out_array=( "${out_array[@]}" "$myicons" ); ((display_index++))
fi
fi
if [[ "$gtkFont" != "Not Applicable" && "$gtkFont" != "Not Found" ]]; then
if [ -n "$gtkFont" ]; then
myfont=$(echo -e "$labelcolor Font:$textcolor $gtkFont"); out_array=( "${out_array[@]}" "$myfont" ); ((display_index++))
fi
fi
# [ "$gtkBackground" ] && mybg=$(echo -e "$labelcolor BG:$textcolor $gtkBackground"); out_array=( "${out_array[@]}" "$mybg" ); ((display_index++))
fi
fi
elif [[ "$fake_distro" == "Cygwin" ]]; then
if [[ "${display[@]}" =~ "res" && -n "$xResolution" ]]; then myres=$(echo -e "$labelcolor Resolution:${textcolor} $xResolution"); out_array=( "${out_array[@]}" "$myres" ); ((display_index++)); fi
if [[ "${display[@]}" =~ "de" ]]; then
if [[ "${DE}" != "Not Present" ]]; then
myde=$(echo -e "$labelcolor DE:$textcolor $DE"); out_array=( "${out_array[@]}" "$myde" ); ((display_index++))
fi
fi
if [[ "${display[@]}" =~ "wm" ]]; then mywm=$(echo -e "$labelcolor WM:$textcolor $WM"); out_array=( "${out_array[@]}" "$mywm" ); ((display_index++)); fi
if [[ "${display[@]}" =~ "wmtheme" ]]; then
if [[ "${Win_theme}" == "Not Applicable" || "${Win_theme}" == "Not Found" ]]; then
:
else
mywmtheme=$(echo -e "$labelcolor WM Theme:$textcolor $Win_theme"); out_array=( "${out_array[@]}" "$mywmtheme" ); ((display_index++))
fi
fi
fi
[[ "${fake_distro}" != "Cygwin" ]] && if [[ "${display[@]}" =~ "disk" ]]; then mydisk=$(echo -e "$labelcolor Disk:$textcolor $diskusage"); out_array=( "${out_array[@]}" "$mydisk" ); ((display_index++)); fi
if [[ "${display[@]}" =~ "cpu" ]]; then mycpu=$(echo -e "$labelcolor CPU:$textcolor $cpu"); out_array=( "${out_array[@]}" "$mycpu" ); ((display_index++)); fi
if [[ "${display[@]}" =~ "gpu" ]] && [[ "$gpu" != "Not Found" ]]; then mygpu=$(echo -e "$labelcolor GPU:$textcolor $gpu"); out_array=( "${out_array[@]}" "$mygpu" ); ((display_index++)); fi
if [[ "${display[@]}" =~ "mem" ]]; then mymem=$(echo -e "$labelcolor RAM:$textcolor $mem"); out_array=( "${out_array[@]}" "$mymem" ); ((display_index++)); fi
fi
if [[ "$display_type" == "ASCII" ]]; then
asciiText
else
if [[ "${display[@]}" =~ "host" ]]; then echo -e " $myinfo"; fi
if [[ "${display[@]}" =~ "distro" ]]; then echo -e "$mydistro"; fi
if [[ "${display[@]}" =~ "kernel" ]]; then echo -e "$mykernel"; fi
if [[ "${distro}" == "Android" ]]; then
echo -e "$mydevice"
echo -e "$myrom"
echo -e "$mybaseband"
echo -e "$mykernel"
echo -e "$myuptime"
echo -e "$mycpu"
echo -e "$mymem"
else
if [[ "${display[@]}" =~ "uptime" ]]; then echo -e "$myuptime"; fi
if [[ "${display[@]}" =~ "pkgs" ]]; then echo -e "$mypkgs"; fi
if [[ "${display[@]}" =~ "shell" ]]; then echo -e "$myshell"; fi
if [[ "${display[@]}" =~ "res" ]]; then echo -e "$myres"; fi
if [[ "${display[@]}" =~ "de" ]]; then
if [[ "${DE}" != "Not Present" ]]; then echo -e "$myde"; fi
fi
if [[ "${display[@]}" =~ "wm" ]]; then
echo -e "$mywm"
if [[ "${Win_theme}" != "Not Applicable" && "${Win_theme}" != "Not Found" ]]; then
echo -e "$mywmtheme"
fi
fi
if [[ "${display[@]}" =~ "gtk" ]]; then
echo -e "$mygtk2"
echo -e "$mygtk3"
echo -e "$myicons"
echo -e "$myfont"
fi
if [[ "${display[@]}" =~ "disk" ]]; then echo -e "$mydisk"; fi
if [[ "${display[@]}" =~ "cpu" ]]; then echo -e "$mycpu"; fi
if [[ "${display[@]}" =~ "gpu" ]]; then echo -e "$mygpu"; fi
if [[ "${display[@]}" =~ "mem" ]]; then echo -e "$mymem"; fi
fi
fi
}
##################
# Let's Do This!
##################
if [[ -f "$HOME/.screenfetchOR" ]]; then
source $HOME/.screenfetchOR
fi
if [[ "$overrideDisplay" ]]; then
verboseOut "Found 'd' flag in syntax. Overriding display..."
OLDIFS=$IFS
IFS=';'
for i in ${overrideDisplay}; do
modchar="${i:0:1}"
if [[ "${modchar}" == "-" ]]; then
i=${i/${modchar}}
_OLDIFS=IFS
IFS=,
for n in $i; do
if [[ ! "${display[@]}" =~ "$n" ]]; then
echo "The var $n is not currently being displayed."
else
display=( "${display[@]/${n}}" )
fi
done
IFS=$_OLDIFS
elif [[ "${modchar}" == "+" ]]; then
i=${i/${modchar}}
_OLDIFS=IFS
IFS=,
for n in $i; do
if [[ "${valid_display[@]}" =~ "$n" ]]; then
if [[ "${display[@]}" =~ "$n" ]]; then
echo "The $n var is already being displayed."
else
display+=($n)
fi
else
echo "The var $n is not a valid display var."
fi
done
IFS=$_OLDIFS
else
IFS=$OLDIFS
i="${i//,/ }"
display=( $i )
fi
done
IFS=$OLDIFS
fi
# Check for android
#if type -p getprop >/dev/null 2>&1; then
# distro="Android"
# detectmem
# detectuptime
# detectkernel
# detectdroid
# infoDisplay
# exit 0
#fi
for i in "${display[@]}"; do
if [[ ! "$i" == "" ]]; then
if [[ $i =~ wm ]]; then
! [[ $WM ]] && detectwm;
! [[ $Win_theme ]] && detectwmtheme;
else
if [[ "${display[*]}" =~ "$i" ]]; then
if [[ "$errorSuppress" == "1" ]]; then detect${i} 2>/dev/null
else
exec 3> >(stderrOut)
detect${i} 2>&3
exec 3>&-
fi
fi
fi
fi
done
infoDisplay
[ "$screenshot" == "1" ] && takeShot
[ "$exportTheme" == "1" ] && themeExport
exit 0
screenfetch-3.7.0/screenfetch.1 0000664 0000000 0000000 00000011563 12553057605 0016403 0 ustar 00root root 0000000 0000000 .TH SCREENFETCH "1" "April 2015" "3.6.5" "User Commands"
.\" Don't remove the lines starting with ».\" @supported_« !
.\" They're important for update-manpage.sh.
.SH NAME
screenFetch \- The Bash Screenshot Information Tool
.SH SYNOPSIS
.B screenfetch \fR[OPTIONAL FLAGS]
.SH DESCRIPTION
This handy Bash script can be used to generate one of those
nifty terminal theme information + ASCII distribution logos you
see in everyone's screenshots nowadays. It will auto-detect your
distribution and display an ASCII version of that distribution's
logo and some valuable information to the right. There are options
to specify no ASCII art, colors, taking a screenshot upon displaying
info, and even customizing the screenshot command!
This script is very easy to add to and can easily be extended.
.PP
Supported GNU/Linux Distributions:
.IP
.\" @supported_distros_start@
Antergos, Arch Linux (Old and Current Logos), BLAG, CentOS, Chakra, Chapeau, CrunchBang, CRUX, Debian, Deepin, Dragora, elementary OS, Evolve OS, Fedora, Frugalware, Fuduntu, Funtoo, Gentoo, gNewSense, Jiyuu Linux, Kali Linux, KaOS, Korora, LinuxDeepin, Linux Mint, LMDE, Logos, Mageia, Mandriva/Mandrake, Manjaro, NixOS, openSUSE, Parabola GNU/Linux-libre, PeppermintOS, Raspbian, Red Hat Enterprise Linux, Sabayon, Scientific Linux, Slackware, SolusOS, TinyCore, Trisquel, Ubuntu, Viperr and Void.
.\" @supported_distros_end@
.PP
Other Supported Systems:
.IP
.\" @supported_other_start@
Dragonfly/Free/Open/Net BSD, Haiku, Mac OS X and Windows+Cygwin.
.\" @supported_other_end@
.PP
Supported Desktop Managers:
.IP
.\" @supported_dms_start@
KDE, Gnome, Unity, Xfce, LXDE, Cinnamon, MATE, CDE and RazorQt.
.\" @supported_dms_end@
.PP
Supported Window Managers:
.IP
.\" @supported_wms_start@
2bwm, 9wm, Awesome, Beryl, Blackbox, Cinnamon, Compiz, dminiwm, dwm, dtwm, E16, E17, echinus, Emerald, FluxBox, FVWM, herbstluftwm, IceWM, KWin, Metacity, monsterwm, Musca, Gala, Mutter, Muffin, Notion, OpenBox, PekWM, Ratpoison, Sawfish, ScrotWM, SpectrWM, StumpWM, subtle, WindowMaker, WMFS, wmii, Xfwm4, XMonad and i3.
.\" @supported_wms_end@
.SH OPTIONS
.TP
.B \-v
Verbose output.
.TP
.B \-o 'OPTIONS'
Allows for setting script variables on the
command line. Must be in the following format:
\&'OPTION1="OPTIONARG1";OPTION2="OPTIONARG2"'
.TP
.B -d '+var;-var;var'
Allows for setting what information is displayed on the command line. You can
add displays with +var,var. You can delete displays with -var,var. Setting
without + or - will set display to that explicit combination. Add and delete
statements may be used in conjunction by placing a ; between them as so:
+var,var,var;-var,var.
.TP
.B \-n
Do not display ASCII distribution logo.
.TP
.B \-L
Display ASCII distribution logo only.
.TP
.B \-N
Strip all color from output.
.TP
.B \-t
Truncate output based on terminal width (Experimental!).
.TP
.B \-p
Output in portrait mode, with logo above info.
.TP
.B \-s(u)
Using this flag tells the script that you want it
to take a screenshot. Use the \fB\-u\fR flag if you would like
to upload the screenshots to one of the pre-configured
locations. These include: teknik, pomf, imgur, mediacrush, and hmp.
.TP
.B \-c string
You may change the outputted colors with \fB\-c\fR. The format is
as follows: [0\-9][0\-9],[0\-9][0\-9]. The first argument controls the
ASCII logo colors and the label colors. The second argument
controls the colors of the information found. One argument may be
used without the other.
.TP
.B \-a 'PATH'
You can specify a custom ASCII art by passing the path to a Bash script,
defining \fBstartline\fR and \fBfulloutput\fR variables, and optionally
\fBlabelcolor\fR and \fBtextcolor\fR. See the \fBasciiText\fR function
in the source code for more informations on the variables format.
.TP
.B \-S 'COMMAND'
Here you can specify a custom screenshot command for
the script to execute. Surrounding quotes are required.
.TP
.B \-D 'DISTRO'
Here you can specify your distribution for the script
to use. Surrounding quotes are required.
.TP
.B \-A 'DISTRO'
Here you can specify the distribution art that you want
displayed. This is for when you want your distro
detected but want to display a different logo.
.TP
.B \-E
Suppress output of errors.
.TP
.B \-V, \-\-version
Display current script version.
.TP
.B \-h, \-\-help
Display this help.
.SH "SEE ALSO"
http://github.com/KittyKatt/screenFetch
.SH AUTHOR
Created by and licensed to Brett Bohnenkamper .
OS X porting done almost solely by shrx and John D. Duncan, III .
.PP
This manual page was written by djcj
.SH REPORTING BUGS
Report bugs to
.SH COPYRIGHT
This is free software; you can redistribute it and/or modify
it under the terms of the GNU GPL version 3 or (at your option) any later version.
There is NO warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
screenfetch-3.7.0/update-manpage.sh 0000775 0000000 0000000 00000001050 12553057605 0017245 0 ustar 00root root 0000000 0000000 #!/bin/sh
LANG=C
LANGUAGE=C
LC_ALL=C
man=screenfetch.1
script=screenfetch-dev
version=$(grep 'scriptVersion=' $script | cut -d'"' -f2)
date=$(date +"%B %Y")
mv $man $man.old
echo ".TH SCREENFETCH \"1\" \"$date\" \"$version\" \"User Commands\"" > $man
grep -v -e '^.TH ' $man.old >> $man
for s in supported_distros supported_other supported_dms supported_wms ; do
sed -i "/@${s}_start@/,/@${s}_end@/{/@${s}_start@/!{/@${s}_end@/!d}}" $man
list="$(grep "${s}=" $script | cut -d'"' -f2)"
sed -i "s:@${s}_start@:@${s}_start@\n${list}:" $man
done