From d83a172950d90861d63b3891b14d5106e710502d Mon Sep 17 00:00:00 2001 From: xero Date: Sun, 1 Nov 2015 15:40:55 -0500 Subject: use ~/bin like a civilized nixer --- bin/bin/epoch | 9 + bin/bin/gfx-intel | 9 + bin/bin/gfx-off | 9 + bin/bin/gfx-on | 9 + bin/bin/gfx-radeon | 9 + bin/bin/gfx-status | 39 + bin/bin/gitio | 80 + bin/bin/hash-compare | 17 + bin/bin/img | 32 + bin/bin/ix | 35 + bin/bin/screenfetch | 3414 ++++++++++++++++++++++++++++++++++++++++++ bin/bin/skull | 70 + bin/bin/tmx | 45 + bin/bin/todo | 60 + bin/bin/toggle-touchpad | 20 + fun/bin/2spooky.lua | 79 + fun/bin/colors | 13 + fun/bin/colorscheme | 27 + fun/bin/dna | 46 + fun/bin/ghosts | 31 + fun/bin/invaders | 54 + fun/bin/metroid | 27 + fun/bin/pacman | 37 + fun/bin/pipes | 122 ++ fun/bin/pipesx | 193 +++ fun/bin/rain | 100 ++ fun/bin/ryu | 188 +++ fun/bin/slendy | 35 + fun/code/fun/2spooky.lua | 79 - fun/code/fun/colors | 13 - fun/code/fun/colorscheme | 27 - fun/code/fun/dna | 46 - fun/code/fun/ghosts | 31 - fun/code/fun/invaders | 54 - fun/code/fun/metroid | 27 - fun/code/fun/pacman | 37 - fun/code/fun/pipes | 122 -- fun/code/fun/pipesx | 193 --- fun/code/fun/rain | 100 -- fun/code/fun/ryu | 188 --- fun/code/fun/screenfetch | 1378 ----------------- fun/code/fun/skull | 70 - fun/code/fun/slendy | 35 - sys/code/sys/gfx-intel | 9 - sys/code/sys/gfx-off | 9 - sys/code/sys/gfx-on | 9 - sys/code/sys/gfx-radeon | 9 - sys/code/sys/gfx-status | 39 - sys/code/sys/gitio | 80 - sys/code/sys/goodbye | 37 - sys/code/sys/hash-compare | 17 - sys/code/sys/img | 32 - sys/code/sys/info | 3414 ------------------------------------------ sys/code/sys/ix | 35 - sys/code/sys/tmx | 45 - sys/code/sys/toggle-touchpad | 20 - zsh/.zsh/aliases.zsh | 15 +- 57 files changed, 4813 insertions(+), 6166 deletions(-) create mode 100755 bin/bin/epoch create mode 100755 bin/bin/gfx-intel create mode 100755 bin/bin/gfx-off create mode 100755 bin/bin/gfx-on create mode 100755 bin/bin/gfx-radeon create mode 100755 bin/bin/gfx-status create mode 100755 bin/bin/gitio create mode 100755 bin/bin/hash-compare create mode 100644 bin/bin/img create mode 100755 bin/bin/ix create mode 100755 bin/bin/screenfetch create mode 100755 bin/bin/skull create mode 100755 bin/bin/tmx create mode 100755 bin/bin/todo create mode 100755 bin/bin/toggle-touchpad create mode 100755 fun/bin/2spooky.lua create mode 100755 fun/bin/colors create mode 100755 fun/bin/colorscheme create mode 100755 fun/bin/dna create mode 100755 fun/bin/ghosts create mode 100755 fun/bin/invaders create mode 100755 fun/bin/metroid create mode 100755 fun/bin/pacman create mode 100755 fun/bin/pipes create mode 100755 fun/bin/pipesx create mode 100755 fun/bin/rain create mode 100755 fun/bin/ryu create mode 100755 fun/bin/slendy delete mode 100755 fun/code/fun/2spooky.lua delete mode 100755 fun/code/fun/colors delete mode 100755 fun/code/fun/colorscheme delete mode 100755 fun/code/fun/dna delete mode 100755 fun/code/fun/ghosts delete mode 100755 fun/code/fun/invaders delete mode 100755 fun/code/fun/metroid delete mode 100755 fun/code/fun/pacman delete mode 100755 fun/code/fun/pipes delete mode 100755 fun/code/fun/pipesx delete mode 100755 fun/code/fun/rain delete mode 100755 fun/code/fun/ryu delete mode 100755 fun/code/fun/screenfetch delete mode 100755 fun/code/fun/skull delete mode 100755 fun/code/fun/slendy delete mode 100755 sys/code/sys/gfx-intel delete mode 100755 sys/code/sys/gfx-off delete mode 100755 sys/code/sys/gfx-on delete mode 100755 sys/code/sys/gfx-radeon delete mode 100755 sys/code/sys/gfx-status delete mode 100755 sys/code/sys/gitio delete mode 100755 sys/code/sys/goodbye delete mode 100755 sys/code/sys/hash-compare delete mode 100644 sys/code/sys/img delete mode 100755 sys/code/sys/info delete mode 100755 sys/code/sys/ix delete mode 100755 sys/code/sys/tmx delete mode 100755 sys/code/sys/toggle-touchpad diff --git a/bin/bin/epoch b/bin/bin/epoch new file mode 100755 index 0000000..ba45b02 --- /dev/null +++ b/bin/bin/epoch @@ -0,0 +1,9 @@ +#!/bin/bash + +# get seconds since epoch +test "x$1" == x && date +%s && exit 0 + +# or convert epoch seconds to date format (see "man date" for options) +EPOCH="$1" +shift +date -d @"$EPOCH" "$@" diff --git a/bin/bin/gfx-intel b/bin/bin/gfx-intel new file mode 100755 index 0000000..804de12 --- /dev/null +++ b/bin/bin/gfx-intel @@ -0,0 +1,9 @@ +#!/bin/bash + +integrated=$(echo IGD | sudo tee /sys/kernel/debug/vgaswitcheroo/switch) + +notify-send -t 5000 \ +-i "/home/xero/.config/awesome/themes/ghost/gfx.png" \ +' gfx status +░░▒▒▓▓▓████▓▓▓▒▒░░' \ +" intel powered on" \ No newline at end of file diff --git a/bin/bin/gfx-off b/bin/bin/gfx-off new file mode 100755 index 0000000..aeb6daf --- /dev/null +++ b/bin/bin/gfx-off @@ -0,0 +1,9 @@ +#!/bin/bash + +integrated=$(echo OFF | sudo tee /sys/kernel/debug/vgaswitcheroo/switch) + +notify-send -t 5000 \ +-i "/home/xero/.config/awesome/themes/ghost/gfx.png" \ +' gfx status +░░▒▒▓▓▓████▓▓▓▒▒░░' \ +"unused powered off" \ No newline at end of file diff --git a/bin/bin/gfx-on b/bin/bin/gfx-on new file mode 100755 index 0000000..57d08d4 --- /dev/null +++ b/bin/bin/gfx-on @@ -0,0 +1,9 @@ +#!/bin/bash + +integrated=$(echo ON | sudo tee /sys/kernel/debug/vgaswitcheroo/switch) + +notify-send -t 5000 \ +-i "/home/xero/.config/awesome/themes/ghost/gfx.png" \ +' gfx status +░░▒▒▓▓▓████▓▓▓▒▒░░' \ +" both powered on" \ No newline at end of file diff --git a/bin/bin/gfx-radeon b/bin/bin/gfx-radeon new file mode 100755 index 0000000..a0db665 --- /dev/null +++ b/bin/bin/gfx-radeon @@ -0,0 +1,9 @@ +#!/bin/bash + +integrated=$(echo DIS | sudo tee /sys/kernel/debug/vgaswitcheroo/switch) + +notify-send -t 5000 \ +-i "/home/xero/.config/awesome/themes/ghost/gfx.png" \ +' gfx status +░░▒▒▓▓▓████▓▓▓▒▒░░' \ +"radeon powered on" \ No newline at end of file diff --git a/bin/bin/gfx-status b/bin/bin/gfx-status new file mode 100755 index 0000000..93d564a --- /dev/null +++ b/bin/bin/gfx-status @@ -0,0 +1,39 @@ +#!/bin/bash + +pci_integrated=$(lspci | grep VGA | sed -n '1p' | cut -f 1 -d " ") +pci_discrete=$(lspci | grep VGA | sed -n '2p' | cut -f 1 -d " ") + +integrated=$(cat /sys/kernel/debug/vgaswitcheroo/switch | grep $pci_integrated | grep -o -P ':.:...:') +discrete=$(cat /sys/kernel/debug/vgaswitcheroo/switch | grep $pci_discrete | grep -o -P ':.:...:') + +name_integrated=$(lspci | grep VGA | sed -n '1p' | sed -e "s/.* VGA compatible controller[ :]*//g" | sed -e "s/ Corporation//g" | sed -e "s/ Technologies Inc//g" | sed -e 's/\[[0-9]*\]: //g' | sed -e 's/\[[0-9:a-z]*\]//g' | sed -e 's/(rev [a-z0-9]*)//g' | sed -e "s/ Integrated Graphics Controller//g") +name_discrete=$(lspci | grep VGA | sed -n '2p' | sed -e "s/.* VGA compatible controller[ :]*//g" | sed -e "s/ Corporation//g" | sed -e "s/ Technologies Inc//g" | sed -e 's/\[[0-9]*\]: //g' | sed -e 's/\[[0-9:a-z]*\]//g' | sed -e 's/(rev [a-z0-9]*)//g' | sed -e "s/ Integrated Graphics Controller//g") + +if [ "$integrated" = ":+:Pwr:" ] +then +integrated_condition="on" +elif [ "$integrated" = ": :Pwr:" ] +then +integrated_condition="on" +elif [ "$integrated" = ": :Off:" ] +then +integrated_condition="off" +fi + +if [ "$discrete" = ":+:Pwr:" ] +then +discrete_condition="on" +elif [ "$discrete" = ": :Pwr:" ] +then +discrete_condition="on" +elif [ "$discrete" = ": :Off:" ] +then +discrete_condition="off" +fi + +notify-send -t 5000 \ +-i "/home/xero/.config/awesome/themes/ghost/gfx.png" \ +' gfx status +░░▒▒▓▓███▓▓▒▒░░' \ +" intel = $integrated_condition + radeon = $discrete_condition" \ No newline at end of file diff --git a/bin/bin/gitio b/bin/bin/gitio new file mode 100755 index 0000000..b6a7983 --- /dev/null +++ b/bin/bin/gitio @@ -0,0 +1,80 @@ +#!/bin/sh +# +# ██ ██ ██ +# █████ ░░ ░██ ░░ +# ██░░░██ ██ ██████ ██ ██████ +# ░██ ░██░██░░░██░ ░██ ██░░░░██ +# ░░██████░██ ░██ ░██░██ ░██ +# ░░░░░██░██ ░██ ░██░██ ░██ +# █████ ░██ ░░██ ██░██░░██████ +# ░░░░░ ░░ ░░ ░░ ░░ ░░░░░░ +# +# create short / vanity github urls +# ▟▙ +# ▟▒░░░░░░░▜▙▜████████████████████████████████▛ +# ▜▒░░░░░░░▟▛▟▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▛ +# ▜▛ +# xero / syntax-samurai + +usage () { + cat < + +# 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 my IRC network, SilverIRC, at irc://kittykatt.silverirc.com/me0wz +# to put forth suggestions/ideas. Thank you. + + +LANG=C +LANGUAGE=C +LC_ALL=C + +scriptVersion="3.5.0" + +###################### +# Settings for fetcher +###################### + +# This setting controls what ASCII logo is displayed. Available: Arch Linux (Old and Current Logos), Linux Mint, Ubuntu, Crunchbang, Debian, Raspbian, Gentoo, Mandrake/Mandriva, Slackware, SUSE, Fedora, BSD, OS X and None +# 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" +display=( distro host kernel uptime pkgs shell res de wm wmtheme gtk cpu gpu mem ) +# Display Type: ASCII or Text +display_type="ASCII" + +# 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 ) +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= +# 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" +hostshot= +baseurl="http://www.example.com" +serveraddr="www.example.com" +scptimeout="20" +serverdir="/path/to/directory" +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 () { + echo -ne "\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')";; + esac + [[ -n "${color_ret}" ]] && echo "${color_ret}" + else + : + fi +} + +function verboseOut { + printf "\033[1;31m:: \033[0m$1\n" +} + +function errorOut { + printf "\033[1;37m[[ \033[1;31m! \033[1;37m]] \033[0m$1\n" +} +function stderrOut { + while IFS='' read -r line; do printf "\033[1;37m[[ \033[1;31m! \033[1;37m]] \033[0m${line}\n"; done +} + + +#################### +# Color Defines +#################### + +detectColors() { + my_colors=$(printf "$OPTARG" | sed 's/^,/na,/;s/,$/,na/;s/,/ /') + my_lcolor=$(printf "$my_colors" | awk -F' ' '{print $1}') + if [[ "$my_lcolor" != "na" ]]; then + if [[ $(tput colors) -eq "256" ]]; then my_lcolor="\033[38;5;${my_lcolor}m" + else + case $my_lcolor in + 0|00) export my_lcolor=$(getColor 'black');; + 1|01) export my_lcolor=$(getColor 'red');; + 2|02) export my_lcolor=$(getColor 'green');; + 3|03) export my_lcolor=$(getColor 'brown');; + 4|04) export my_lcolor=$(getColor 'blue');; + 5|05) export my_lcolor=$(getColor 'purple');; + 6|06) export my_lcolor=$(getColor 'cyan');; + 7|07) export my_lcolor=$(getColor 'light grey');; + 8|08) export my_lcolor=$(getColor 'dark grey');; + 9|09) export my_lcolor=$(getColor 'light red');; + 10) export my_lcolor=$(getColor 'light green');; + 11) export my_lcolor=$(getColor 'yellow');; + 12) export my_lcolor=$(getColor 'light blue');; + 13) export my_lcolor=$(getColor 'light purple');; + 14) export my_lcolor=$(getColor 'light cyan');; + 15) export my_lcolor=$(getColor 'white');; + *) unset my_lcolor; continue ;; + esac + fi + else + unset my_lcolor + fi + my_hcolor=$(printf "$my_colors" | awk -F' ' '{print $2}') + if [[ "$my_hcolor" != "na" ]]; then + if [[ $(tput colors) -eq "256" ]]; then my_hcolor="\033[38;5;${my_hcolor}m" + else + case $my_hcolor in + 0|00) export my_hcolor=$(getColor 'black');; + 1|01) export my_hcolor=$(getColor 'red');; + 2|02) export my_hcolor=$(getColor 'green');; + 3|03) export my_hcolor=$(getColor 'brown');; + 4|04) export my_hcolor=$(getColor 'blue');; + 5|05) export my_hcolor=$(getColor 'purple');; + 6|06) export my_hcolor=$(getColor 'cyan');; + 7|07) export my_hcolor=$(getColor 'light grey');; + 8|08) export my_hcolor=$(getColor 'dark grey');; + 9|09) export my_hcolor=$(getColor 'light red');; + 10) export my_hcolor=$(getColor 'light green');; + 11) export my_hcolor=$(getColor 'yellow');; + 12) export my_hcolor=$(getColor 'light blue');; + 13) export my_hcolor=$(getColor 'light purple');; + 14) export my_hcolor=$(getColor 'light cyan');; + 15) export my_hcolor=$(getColor 'white');; + *) unset my_hcolor; continue ;; + esac + fi + else + unset my_hcolor + fi +} + + +displayHelp() { + printf "${underline}Usage${c0}:\n" +# printf " screenFetch [OPTIONAL FLAGS]\n\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 " Arch Linux (Old and Current Logos), Antergos, Chakra, CentOS, Debian,\n" + printf " CrunchBang, Raspbian, elementary OS, Fedora, Frugalware, Fuduntu, Gentoo,\n" + printf " Funtoo, Jiyuu Linux, LinuxDeepin, Kali Linux, Mageia, Mandriva, Manjaro,\n" + printf " Linux Mint, LMDE, openSUSE, Parabola GNU/Linux-libre, Peppermint,\n" + printf " Red Hat Enterprise Linux, Sabayon, Scientific Linux, Slackware, SolusOS,\n" + printf " TinyCore, Trisquel, Ubuntu and Viperr.\n\n" + printf "${underline}Other Supported Systems${c0}:\n" + printf " Mac OS X, FreeBSD, DragonFlyBSD, NetBSD, OpenBSD, Android and Cygwin.\n\n" + printf "${underline}Supported Desktop Managers${c0}:\n" + printf " KDE, Gnome, Unity, Xfce, LXDE, Cinnamon, MATE and RazorQt.\n\n" + printf "${underline}Supported Window Managers${c0}:\n" + printf " 2bwm, Awesome, Beryl, Blackbox, Cinnamon, Compiz, dminiwm, dwm, E16, E17,\n" + printf " echinus, Emerald, FluxBox, FVWM, herbstluftwm, IceWM, KWin, Metacity,\n" + printf " monsterwm, Musca, Gala, Mutter, Muffin, Notion, OpenBox, PekWM, Ratpoison,\n" + printf " Sawfish, ScrotWM, SpectrWM, StumpWM, subtle, WindowMaker, WMFS, wmii,\n" + printf " Xfwm4, XMonad and i3.\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" + #echo -e " ${bold}-d 'ARGUMENTS'${c0} Allows for setting what information is displayed" + #echo -e " on the command line. Format must be as follows:" + #echo -e " OPTION,OPTION,OPTION,OPTION. Valid options are" + #echo -e " host, distro, kernel, uptime, pkgs, shell, res, de, wm," + #echo -e " wmtheme, gtk, cpu, gpu, mem." + printf " ${bold}-n${c0} Do not display ASCII distribution logo.\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}-s(m)${c0} Using this flag tells the script that you want it\n" + printf " to take a screenshot. Use the -m flag if you would like\n" + printf " to move it to a new location afterwards.\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}-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" +} + +##################### +# Begin Flags Phase +##################### + +case $1 in + --help) displayHelp; exit 0;; +esac + + +while getopts ":hsmevVEnNtlS:A:D:o:Bc:d:" flags; do + case $flags in + h) displayHelp; exit 0;; + s) screenshot=1; continue;; + S) screenCommand=$OPTARG; continue;; + m) hostshot=1; continue;; + v) verbosity=1; continue;; + V) + 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 Hu6.\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" + exit 0 + ;; + E) errorSuppress="1";; + D) distro=$OPTARG; continue;; + A) asc_distro=$OPTARG; continue;; + t) truncateSet="Yes";; + n) display_type="Text";; + o) overrideOpts=$OPTARG; continue;; + c) detectColors "$OPTARGS"; continue;; + d) overrideDisplay=$OPTARG; continue;; + N) no_color='1';; + :) 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 +#################### + +if [[ "$overrideOpts" ]]; then + [[ "$verbosity" -eq "1" ]] && 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 + + if [[ "${distro_detect}" == "archlinux" || "${distro_detect}" == "Arch Linux" || "${distro_detect}" == "arch" || "${distro_detect}" == "Arch" || "${distro_detect}" == "archarm" ]]; then + distro="Arch Linux" + distro_release="n/a" + if grep -q 'antergos' /etc/os-release; then + distro="Antergos" + distro_release="n/a" + fi + elif [[ "${distro_detect}" == "Chakra" ]]; then + distro="Chakra" + distro_release=null + elif [[ "${distro_detect}" == "CentOS" ]]; then + distro="CentOS" + elif [[ "${distro_detect}" == "Debian" ]]; then + 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 + elif [[ "${distro_detect}" == "elementary" || "${distro_detect}" == "elementary OS" ]]; then + distro="elementary OS" + elif [[ "${distro_detect}" == "KaOS" || "${distro_detect}" == "kaos" ]]; then + distro="KaOS" + elif [[ "${distro_detect}" == "Fedora" ]]; then + distro="Fedora" + elif [[ "${distro_detect}" == "frugalware" ]]; then + distro="Frugalware" + distro_codename=null + distro_release=null + elif [[ "${distro_detect}" == "Fuduntu" ]]; then + distro="Fuduntu" + distro_codename=null + elif [[ "${distro_detect}" == "Gentoo" ]]; then + if [[ "$(lsb_release -sd)" =~ "Funtoo" ]]; then + distro="Funtoo" + else + distro="Gentoo" + fi + elif [[ "${distro_detect}" == "Jiyuu Linux" ]]; then + distro="Jiyuu Linux" + elif [[ "${distro_detect}" == "LinuxDeepin" ]]; then + distro="LinuxDeepin" + distro_codename=null + elif [[ "${distro_detect}" == "Debian Kali Linux" ]]; then + distro="Kali Linux" + elif [[ "${distro_detect}" == "Mageia" ]]; then + distro="Mageia" + elif [[ "$distro_detect" == "MandrivaLinux" ]]; then + distro="Mandriva" + if [[ "${distro_codename}" == "turtle" ]]; then + distro="Mandriva-${distro_release}" + distro_codename=null + elif [[ "${distro_codename}" == "Henry_Farman" ]]; then + distro="Mandriva-${distro_release}" + distro_codename=null + elif [[ "${distro_codename}" == "Farman" ]]; then + distro="Mandriva-${distro_release}" + distro_codename=null + elif [[ "${distro_codename}" == "Adelie" ]]; then + distro="Mandriva-${distro_release}" + distro_codename=null + elif [[ "${distro_codename}" == "pauillac" ]]; then + distro="Mandriva-${distro_release}" + distro_codename=null + fi + elif [[ "${distro_detect}" == "ManjaroLinux" ]]; then + distro="Manjaro" + elif [[ "${distro_detect}" == "LinuxMint" ]]; then + distro="Mint" + if [[ "${distro_codename}" == "debian" ]]; then + distro="LMDE" + distro_codename="n/a" + distro_release="n/a" + fi + elif [[ "${distro_detect}" == "SUSE LINUX" || "${distro_detect}" == "openSUSE project" ]]; then + distro="openSUSE" + elif [[ "${distro_detect}" == "Parabola GNU/Linux-libre" || "${distro_detect}" == "Parabola" ]]; then + distro="Parabola GNU/Linux-libre" + distro_codename="n/a" + distro_release="n/a" + elif [[ "${distro_detect}" == "Peppermint" ]]; then + distro="Peppermint" + distro_codename=null + elif [[ "${distro_detect}" == "CentOS" || "${distro_detect}" =~ "RedHatEnterprise" ]]; then + distro="Red Hat Enterprise Linux" + elif [[ "${distro_detect}" == "Sabayon" ]]; then + distro="Sabayon" + elif [[ "${distro_detect}" == "SolusOS" ]]; then + distro="SolusOS" + elif [[ "${distro_detect}" == "Trisquel" ]]; then + distro="Trisquel" + elif [[ "${distro_detect}" == "Ubuntu" ]]; then + distro="Ubuntu" + elif [[ "${distro_detect}" == "Viperr" ]]; then + distro="Viperr" + distro_codename=null + 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 + if [ `uname -o` == "Cygwin" ]; then distro="Cygwin"; fake_distro="${distro}"; fi + fi + 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" ]]; 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 ~ /"SolusOS"/) { + distro = "SolusOS" + exit + } + } END { + print distro + }' /etc/issue) + fi + fi + if [[ "${distro}" == "Unknown" ]] && [[ "${OSTYPE}" == "linux-gnu" || "${OSTYPE}" == "linux" ]]; then + if [[ -f /etc/system-release ]]; then + distro=$(awk 'BEGIN { + distro = "Unknown" + } + { + if ($0 ~ /"Scientific\ Linux"/) { + distro = "Scientific Linux" + exit + } + } END { + print distro + }' /etc/system-release) + fi + fi + + + + fi + fi + 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 + case $distro in + antergos) distro="Antergos" ;; + arch*linux*old) distro="Arch Linux - Old" ;; + arch*linux) distro="Arch Linux" ;; + arch) distro="Arch Linux";; + 'elementary'|'elementary os') distro="elementary OS";; + fedora) distro="Fedora" ;; + mageia) distro="Mageia" ;; + mandriva) distro="Mandriva" ;; + mandrake) distro="Mandrake" ;; + mint) distro="Mint" ;; + kali*linux) distro="Kali Linux" ;; + lmde) distro="LMDE" ;; + opensuse) distro="openSUSE" ;; + ubuntu) distro="Ubuntu" ;; + debian) distro="Debian" ;; + raspbian) distro="Raspbian" ;; + freebsd) distro="FreeBSD" ;; + 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" ;; + slackware) distro="Slackware" ;; + frugalware) distro="Frugalware" ;; + peppermint) distro="Peppermint" ;; + solusos) distro="SolusOS" ;; + parabolagnu|parabolagnu/linux-libre|'parabola gnu/linux-libre'|parabola) distro="Parabola GNU/Linux-libre" ;; + viperr) distro="Viperr" ;; + kaos) distro="KaOS";; + linuxdeepin) distro="LinuxDeepin" ;; + chakra) distro="Chakra" ;; + centos) distro="CentOS";; + mac*os*x) distro="Mac OS X" ;; + fuduntu) distro="Fuduntu" ;; + manjaro) distro="Manjaro" ;; + cygwin) distro="Cygwin" ;; + esac + [[ "$verbosity" -eq "1" ]] && 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 + [[ "$verbosity" -eq "1" ]] && 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}" + [[ "$verbosity" -eq "1" ]] && verboseOut "Finding kernel version...found as '$kernel'" +} +# Kernel Version Detection - End + + +# Uptime Detection - Begin +detectuptime () { + unset uptime + if [ "$distro" == "Mac OS X" ]; then + boot=`sysctl -n kern.boottime | cut -d "=" -f 2 | cut -d "," -f 1` + now=`date +%s` + uptime=$(($now-$boot)) + elif [[ "${distro}" == "FreeBSD" || "${distro}" == "OpenBSD" ]]; then + if [[ "${distro}" == "FreeBSD" ]]; then boot=`sysctl -n kern.boottime | cut -d "=" -f 2 | cut -d "," -f 1` + else boot=$(sysctl -n kern.boottime); fi + now=$(date +%s) + uptime=$((${now} - ${boot})) + 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)) ;; + esac + [[ "$verbosity" -eq "1" ]] && verboseOut "Finding current package count...found as '$pkgs'" +} + + + + +# CPU Detection - Begin +detectcpu () { + REGEXP="-r" + if [ "$distro" == "Mac OS X" ]; then + cpu=$(echo $(sysctl -n machdep.cpu.brand_string)) + REGEXP="-E" + elif [ "$distro" == "FreeBSD" ]; then cpu=$(sysctl -n hw.model) + elif [ "$distro" == "DragonflyBSD" ]; then cpu=$(sysctl -n hw.model) + elif [ "$distro" == "OpenBSD" ]; then cpu=$(sysctl -n hw.model | sed 's/@.*//') + else + cpu=$(awk 'BEGIN{FS=":"} /model name/ { print $2; exit }' /proc/cpuinfo | sed 's/ @/\n/' | head -1) + 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=$(cat $loc/bios_limit | awk '{print $1/1000}') + elif [ -f $loc/scaling_max_freq ];then + cpu_mhz=$(cat $loc/scaling_max_freq | awk '{print $1/1000}') + else + cpu_mhz=$(awk -F':' '/cpu MHz/{ print int($2+.5) }' /proc/cpuinfo | head -n 1) + fi + if [ -n "$cpu_mhz" ];then + if [ $cpu_mhz -gt 999 ];then + cpu_ghz=$(echo $cpu_mhz | awk '{print $1/1000}') + cpu="$cpu @ ${cpu_ghz}GHz" + else + cpu="$cpu @ ${cpu_mhz}MHz" + fi + fi + fi + cpu=$(echo "${cpu}" | sed $REGEXP 's/\([tT][mM]\)|\([Rr]\)|[pP]rocessor//g' | xargs) + [[ "$verbosity" -eq "1" ]] && 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=$(echo "${gpu_info}" | grep -E 'device.*=.*') + gpu=$(echo "${gpu_info}" | sed 's/.*device.*= //' | sed "s/'//g") + elif [[ "$distro" != "Mac OS X" ]]; then + if [ -n "$(type -p lspci)" ]; then + gpu_info=$(lspci 2> /dev/null | grep VGA) + gpu=$(echo "$gpu_info" | grep -oE '\[.*\]' | sed 's/\[//;s/\]//') + gpu=$(echo "${gpu}" | sed -n '1h;2,$H;${g;s/\n/, /g;p}') + elif [[ -n "$(type -p glxinfo)" && -z "$gpu" ]]; then + gpu_info=$(glxinfo 2>/dev/null) + gpu=$(echo "$gpu_info" | grep "OpenGL renderer string") + gpu=$(echo "$gpu" | cut -d ':' -f2) + gpu="${gpu:1}" + gpu_info=$(echo "$gpu_info" | grep "OpenGL vendor string") + 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 [ $(echo "$gpu_info" | grep -i nvidia | wc -l) -gt 0 ];then + gpu_info="NVidia " + elif [ $(echo "$gpu_info" | grep -i intel | wc -l) -gt 0 ];then + gpu_info="Intel " + elif [ $(echo "$gpu_info" | grep -i amd | wc -l) -gt 0 ];then + gpu_info="AMD " + elif [[ $(echo "$gpu_info" | grep -i ati | wc -l) -gt 0 || $(echo "$gpu_info" | grep -i radeon | wc -l) -gt 0 ]]; then + gpu_info="ATI " + else + gpu_info=$(echo "$gpu_info" | cut -d ':' -f2) + gpu_info="${gpu_info:1} " + fi + gpu="${gpu}" + else + gpu="Not Found" + fi + + [[ "$verbosity" -eq "1" ]] && 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 + [[ "$verbosity" -eq "1" ]] && 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) + usedmem=$(top -l 1 | awk '{ + if ($0 ~ /PhysMem/) { + for (x=1; x<=NF; x++) { + if ($x ~ /wired/) { + wired = $(x-1) + gsub(/[^0-9]/,"",wired) + } + + if ($x ~ /^active/) { + active = $(x-1) + gsub(/[^0-9]/,"",active) + } + + if ($x ~ /inactive/) { + inactive = $(x-1) + gsub(/[^0-9]/,"",inactive) + } + } + usedmem = wired + active + inactive + print usedmem + exit + } + }') + elif [ "$distro" == "Cygwin" ]; then + total_mem=$(awk '/MemTotal/ { print $2 }' /proc/meminfo) + totalmem=$((${total_mem}/1024)) + free_mem=$(awk '/MemFree/ { print $2 }' /proc/meminfo) + used_mem=$((${total_mem} - ${free_mem})) + usedmem=$((${used_mem}/1024)) + 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=$(top -1 1 | awk '/Real:/ {k=split($3,a,"/");print a[k] }' | tr -d 'M') + 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 + else + mem_info=$(1 {print $1}') + 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} + [[ "$verbosity" -eq "1" ]] && 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 [[ "$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 + 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 + if [[ -n ${GNOME_DESKTOP_SESSION_ID} ]]; then + DE="Gnome" + 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 + elif [[ -n ${MATE_DESKTOP_SESSION_ID} ]]; then + DE="MATE" + elif [[ -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 + + 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-properties >/dev/null 2>&1; then + DEver=$(gnome-session-properties --version) + DE="${DE} ${DEver//* }" + elif type -p gnome-session >/dev/null 2>&1; then + DEver=$(gnome-session --version) + 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} == "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" + 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 + [[ "$verbosity" -eq "1" ]] && 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";; + 'awesome') WM="Awesome";; + 'beryl') WM="Beryl";; + 'bspwm') WM="bspwm";; + 'blackbox') WM="BlackBox";; + 'cinnamon') WM="Muffin";; + 'compiz') WM="Compiz";; + 'dminiwm') WM="dminiwm";; + 'dwm') WM="dwm";; + '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";; + '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";; + '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";; + '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 [F]inder >/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 + [[ "$verbosity" -eq "1" ]] && 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 Present";; + '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 Present";; + 'bspwm') Win_theme="Not Present";; + '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 Present";; + 'dwm') Win_theme="Not Present";; + '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 Present";; + '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 Present";; + 'FluxBox'|'Fluxbox') if [ -f $HOME/.fluxbox/init ]; then Win_theme="$(awk -F"/" '/styleFile/ {print $NF}' $HOME/.fluxbox/init)"; fi;; + 'FVWM') Win_theme="Not Present";; + 'i3') Win_theme="Not Present";; + '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 + Win_theme=$(awk '/PluginLib=kwin3_/{gsub(/PluginLib=kwin3_/,"",$0); print $0; exit}' $KDE_CONFIG_DIR/share/config/kwinrc) + 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 Found" + fi + else + Win_theme="Not Found" + fi + fi + + if [[ $Win_theme != 'Not Found' ]]; 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 Present";; + 'Musca') Win_theme="Not Present";;\ + 'Notion') Win_theme="Not Present";; + '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'*) # 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="$(cat $HOME/.minttyrc | grep '^Font=.*' | grep -o '[0-9A-z ]*$')" + fi + fi + ;; + esac + fi + if [[ "$verbosity" -eq "1" ]]; then + 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'" + fi +} +# 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 [[ "$hostshot" == "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 + [[ "$verbosity" -eq "1" ]] && verboseOut "Screenshot saved at '${shotfiles[@]}'" + scp -qo ConnectTimeout="${scptimeout}" "${shotfiles[@]}" "${serveraddr}:${serverdir}" + echo -e "${bold}==>${c0} Your screenshot can be viewed at ${baseurl}/$shotfile" + else + verboseOut "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 + [[ "$verbosity" -eq "1" ]] && verboseOut "Screenshot saved at '${shotfiles[@]}'" + else + verboseOut "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}" + else myascii="${distro}"; fi + case ${myascii} in + "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="15" + fulloutput=("${c1} ▒█ " +"${c1} ▒▒██ " +"${c1} ▒▒▒███ " +"${c1} ▒▒▒▒████ " +"${c1} ▒▒▒▒▒█████ " +"${c1} ▒▒▒▒▒▒██████ " +"${c1} ▒▒▒▒▒▒▒███████ " +"${c1} ▒▒▒▒▒▒▒▒████████ " +"${c1} ▒▒▒▒▒▒▒▒▒█████████ " +"${c1} ▒▒▒▒▒▒▒▒▒▒██████████ " +"${c1} ▒▒▒▒▒▒▒▒▒▒▒███████████ " +"${c1} ▒▒▒▒▒▒▒▒▒▒▒▒████████████ " +"${c1} ▒▒▒▒▒▒▒▒▒▒▒ ███████████ " +"${c1} ▒▒▒▒▒▒▒▒▒▒ ██████████ " +"${c1} " +"${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") + + ;; + + "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-3color") + 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") + ;; + + "Ubuntu") + if [[ "$no_color" != "1" ]]; then + if [[ $(tput colors) -eq "256" ]]; then c1=$(getColor 'orange') # Orange if 256 support + else c1=$(getColor 'yellow'); fi # Bold Yellow + fi + if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c1="${my_lcolor}"; c1="${my_lcolor}"; fi + startline="0" + fulloutput=("$c1 ./+o+- %s" +"$c1 yyyyy- $c1-yyyyyy+ %s" +"$c1 $c1://+//////$c1-yyyyyyo %s" +"$c1 .++ $c1.:/++++++/-$c1.+sss/\` %s" +"$c1 .:++o: $c1/++++++++/:--:/- %s" +"$c1 o:+o+:++.$c1\`..\`\`\`.-/oo+++++/ %s" +"$c1 .:+o:+o/.$c1 \`+sssoo+/ %s" +"$c1 .++/+:$c1+oo+o:\`$c1 /sssooo. %s" +"$c1 /+++//+:$c1\`oo+o$c1 /::--:. %s" +"$c1 \+/+o+++$c1\`o++o$c1 ++////. %s" +"$c1 .++.o+$c1++oo+:\`$c1 /dddhhh. %s" +"$c1 .+.o+oo:.$c1 \`oddhhhh+ %s" +"$c1 \+.++o+o\`\`-\`\`$c1\`\`.:ohdhhhhh+ %s" +"$c1 \`:o+++ $c1\`ohhhhhhhhyo++os: %s" +"$c1 .o:$c1\`.syhhhhhhh/$c1.oo++o\` %s" +"$c1 /osyyyyyyo$c1++ooo+++/ %s" +"$c1 \`\`\`\`\` $c1+oo+++o\: %s" +"$c1 \`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") + ;; + + "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}..${c2}----"$c1"/hMMMy"$c2"------------: %s" +"$c2 :--"$c1" :dMNdhhdNMMNo"$c2"------------; %s" +"$c2 :---"$c1":sdNMMMMNds:"$c2"------------: %s" +"$c2 :------"$c1":://:"$c2"-------------:: %s" +"$c2 :---------------------:// %s" +" %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 +) + ;; + + + "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") + ;; + + "SolusOS") + 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") + ;; + + + "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") + ;; + + "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") + ;; + + "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") + ;; + + + "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+:.\`") + ;; + + *) + 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") + ;; + 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 + else + #n=${#fulloutput[*]} + for ((i=0; i<${#fulloutput[*]}; i++)); do + # echo "${out_array[@]}" + 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"|"Mandriva"|"Mandrake"|"Chakra"|"Sabayon"|"Slackware"|"Mac OS X"|"Trisquel"|"Kali Linux"|"Jiyuu Linux"|"Antergos"|"KaOS") labelcolor=$(getColor 'light blue');; + "Arch Linux"|"Frugalware"|"Mageia") labelcolor=$(getColor 'light cyan');; + "Mint"|"LMDE"|"openSUSE"|"LinuxDeepin"|"DragonflyBSD"|"Manjaro"|"Manjaro-tree"|"Android") labelcolor=$(getColor 'light green');; + "Ubuntu-3color"|"FreeBSD"|"Debian"|"Raspbian"|"BSD"|"Red Hat Enterprise Linux"|"Peppermint"|"Cygwin"|"Fuduntu"|"NetBSD"|"Scientific Linux"|"DragonFlyBSD"|"BackTrack Linux") labelcolor=$(getColor 'light red');; + "CrunchBang"|"SolusOS"|"Viperr"|"elementary"*) labelcolor=$(getColor 'dark grey');; + "Gentoo"|"Parabola GNU/Linux-libre"|"Funtoo"|"Funtoo-text") labelcolor=$(getColor 'light purple');; + "CentOS"|"Ubuntu"|*) labelcolor=$(getColor 'yellow');; + esac + [[ "$my_lcolor" ]] && labelcolor="${my_lcolor}" + if [[ "$no_color" == "1" ]]; then labelcolor=""; bold=""; c0=""; textcolor=""; fi + # Some verbosity stuff + [[ "$verbosity" == "1" ]] && [[ "$screenshot" == "1" ]] && verboseOut "Screenshot will be taken after info is displayed." + [[ "$verbosity" == "1" ]] && [[ "$hostshot" == "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 [[ "${display[@]}" =~ "res" ]]; 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 Present" ]]; 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 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 Found" ]; then + if [ -n "$gtk2Theme" ]; then + mygtk2="${gtk2Theme} [GTK2]" + fi + fi + if [ "$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 + mygtk=$(echo -e "$labelcolor GTK Theme:$textcolor ${mygtk2}${mygtk3}"); out_array=( "${out_array[@]}" "$mygtk" ); ((display_index++)) + fi + if [ "$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 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 Present" ]]; 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 Present" ]]; 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 + [[ "$verbosity" -eq "1" ]] && verboseOut "Found 'd' flag in syntax. Overriding some display options..." + overrideDisplay=${overrideDisplay//,/ } + display=( $overrideDisplay ) +fi + +# Check for android +#if type -p getprop >/dev/null 2>&1; then +# distro="Android" +# detectmem +# detectuptime +# detectkernel +# detectdroid +# infoDisplay +# exit 0 +#fi +Win_theme='greybeard' +for i in "${display[@]}"; do + 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 +done + +infoDisplay +[ "$screenshot" == "1" ] && takeShot +[ "$exportTheme" == "1" ] && themeExport + +exit 0 \ No newline at end of file diff --git a/bin/bin/skull b/bin/bin/skull new file mode 100755 index 0000000..91deff5 --- /dev/null +++ b/bin/bin/skull @@ -0,0 +1,70 @@ +#!/bin/bash + +f=3 b=4 +for j in f b; do + for i in {0..7}; do + printf -v $j$i %b "\e[${!j}${i}m" + done +done +bld=$'\e[1m' +rst=$'\e[0m' +inv=$'\e[7m' + + +cat << EOF +$f4 ...----.... +$f4 ..-:"'' ''"-.. +$f4 .-' '-. +$f4 .' . . '. +$f4 .' . . . . .''. +$f4 .' . . . . . . . ..:. +$f4 .' . . . . . . .. . . ....::. +$f4 .. . . . . . . .. . ....:IA. +$f4 .: . . . . . . .. . .. .. ....:IA. +$f4 .: . . .. . . . . .. . ... ....:.:VHA. +$f4 '.. . .. . . . . .. . .. . .....:.::IHHB. +$f4 .:. . . . . . . . . . . ...:.:... .......:HIHMM. +$f4 .:.... . . ."::"'.. . . . .:.:.:II;,. .. ..:IHIMMA +$f4 ':.:.. ..::IHHHHHI::. . . ...:.::::.,,,. . ....VIMMHM +$f4 .:::I. .AHHHHHHHHHHAI::. .:...,:IIHHHHHHMMMHHL:. . VMMMM +$f4 .:.:V.:IVHHHHHHHMHMHHH::..:" .:HIHHHHHHHHHHHHHMHHA. .VMMM. +$f4 :..V.:IVHHHHHMMHHHHHHHB... . .:VPHHMHHHMMHHHHHHHHHAI.:VMMI +$f4 ::V..:VIHHHHHHMMMHHHHHH. . .I":IIMHHMMHHHHHHHHHHHAPI:WMM +$f4 ::". .:.HHHHHHHHMMHHHHHI. . .:..I:MHMMHHHHHHHHHMHV:':H:WM +$f4 :: . :.::IIHHHHHHMMHHHHV .ABA.:.:IMHMHMMMHMHHHHV:'. .IHWW +$f4 '. ..:..:.:IHHHHHMMHV" .AVMHMA.:.'VHMMMMHHHHHV:' . :IHWV +$f4 :. .:...:".:.:TPP" .AVMMHMMA.:. "VMMHHHP.:... .. :IVAI +$f4 .:. '... .:"' . ..HMMMHMMMA::. ."VHHI:::.... .:IHW' +$f4 ... . . ..:IIPPIH: ..HMMMI.MMMV:I:. .:ILLH:.. ...:I:IM +$f4 : . .'"' .:.V". .. . :HMMM:IMMMI::I. ..:HHIIPPHI::'.P:HM. +$f4 :. . . .. ..:.. . :AMMM IMMMM..:...:IV":T::I::.".:IHIMA +$f4 'V:.. .. . .. . . . 'VMMV..VMMV :....:V:.:..:....::IHHHMH +$f4 "IHH:.II:.. .:. . . . . " :HB"" . . ..PI:.::.:::..:IHHMMV" +$f4 :IP""HHII:. . . . . .'V:. . . ..:IH:.:.::IHIHHMMMMM" +$f4 :V:. VIMA:I.. . . . .. . . .:.I:I:..:IHHHHMMHHMMM +$f4 :"VI:.VWMA::. .: . .. .:. ..:.I::.:IVHHHMMMHMMMMI +$f4 :."VIIHHMMA:. . . .: .:.. . .:.II:I:AMMMMMMHMMMMMI +$f4 :..VIHIHMMMI...::.,:.,:!"I:!"I!"I!"V:AI:VAMMMMMMHMMMMMM' +$f4 ':.:HIHIMHHA:"!!"I.:AXXXVVXXXXXXXA:."HPHIMMMMHHMHMMMMMV +$f4 V:H:I:MA:W'I :AXXXIXII:IIIISSSSSSXXA.I.VMMMHMHMMMMMM +$f4 'I::IVA ASSSSXSSSSBBSBMBSSSSSSBBMMMBS.VVMMHIMM'"' +$f4 I:: VPAIMSSSSSSSSSBSSSMMBSSSBBMMMMXXI:MMHIMMI +$f4 .I::. "H:XIIXBBMMMMMMMMMMMMMMMMMBXIXXMMPHIIMM' +$f4 :::I. ':XSSXXIIIIXSSBMBSSXXXIIIXXSMMAMI:.IMM +$f4 :::I:. .VSSSSSISISISSSBII:ISSSSBMMB:MI:..:MM +$f4 ::.I:. ':"SSSSSSSISISSXIIXSSSSBMMB:AHI:..MMM. +$f4 ::.I:. . ..:"BBSSSSSSSSSSSSBBBMMMB:AHHI::.HMMI +$f4 :..::. . ..::":BBBBBSSBBBMMMB:MMMMHHII::IHHMI +$f4 ':.I:... ....:IHHHHHMMMMMMMMMMMMMMMHHIIIIHMMV" +$f4 "V:. ..:...:.IHHHMMMMMMMMMMMMMMMMHHHMHHMHP' +$f4 ':. .:::.:.::III::IHHHHMMMMMHMHMMHHHHM" +$f4 "::....::.:::..:..::IIIIIHHHHMMMHHMV" +$f4 "::.::.. .. . ...:::IIHHMMMMHMV" +$f4 "V::... . .I::IHHMMV"' +$f4 '"VHVHHHAHHHHMMV:"' + +$rst + +EOF + + diff --git a/bin/bin/tmx b/bin/bin/tmx new file mode 100755 index 0000000..c912561 --- /dev/null +++ b/bin/bin/tmx @@ -0,0 +1,45 @@ +# +# Modified TMUX start script from: +# http://forums.gentoo.org/viewtopic-t-836006-start-0.html +# +# Store it to `~/bin/tmx` and issue `chmod +x`. +# + +# Works because bash automatically trims by assigning to variables and by +# passing arguments +trim() { echo $1; } + +if [[ -z "$1" ]]; then + echo "Specify session name as the first argument" + exit +fi + +# Only because I often issue `ls` to this script by accident +if [[ "$1" == "ls" ]]; then + tmux ls + exit +fi + +base_session="$1" +# This actually works without the trim() on all systems except OSX +tmux_nb=$(trim `tmux ls | grep "^$base_session" | wc -l`) +if [[ "$tmux_nb" == "0" ]]; then + echo "Launching tmux base session $base_session ..." + tmux new-session -s $base_session +else + # Make sure we are not already in a tmux session + if [[ -z "$TMUX" ]]; then + echo "Launching copy of base session $base_session ..." + # Session is is date and time to prevent conflict + session_id=`date +%Y%m%d%H%M%S` + # Create a new session (without attaching it) and link to base session + # to share windows + tmux new-session -d -t $base_session -s $session_id + if [[ "$2" == "1" ]]; then + # Create a new window in that session + tmux new-window + fi + # Attach to the new session & kill it once orphaned + tmux attach-session -t $session_id \; set-option destroy-unattached + fi +fi diff --git a/bin/bin/todo b/bin/bin/todo new file mode 100755 index 0000000..378f251 --- /dev/null +++ b/bin/bin/todo @@ -0,0 +1,60 @@ +#!/bin/bash +# +# simple todo script +# +# ▓▓▓▓▓▓▓▓▓▓ +# ░▓ author ▓ xero +# ░▓ code ▓ http://code.xero.nu/todo +# ░▓ mirror ▓ http://pub.iotek.org/p/mJPHqv8 +# ░▓▓▓▓▓▓▓▓▓▓ +# ░░░░░░░░░░ + +file="~/.todo" +( [ -e "$file" ] || touch "$file" ) && [ ! -w "$file" ] && echo cannot write to $file && exit 1 +if [[ -z $1 || $1 == "--help" || $1 == "-h" || $1 == "help" ]]; then + echo "┌──────[ todo ]──[ version 0.0.1 ]─────── ─ ─" + echo "│ usage: todo " + echo "│ author: xero harrison - http://xero.nu" + echo "├────────────────[ options ]"───────────── ─ ─ + echo "│ -s, --show display the todo list" + echo "│ -a, --add add a todo item" + echo "│ -d, --delete delete a todo item" + echo "│ -h, --help display this screen" + echo "└──────────────────────────────────────── ─ ─" +elif [[ $1 = '--show' || $1 = '-s' || $1 == "show" ]]; then + while true; + do + clear + echo "" + echo " ██ ██" + echo " ░██ ░██" + echo " ██████ ██████ ██████ ██████" + echo " ░░░██ ░██░░░░██░██░░░██░██ ░██" + echo " ░██ ░██ ░██░██ ░██░██ ░██" + echo " ░░██ ░░██████ ░░██████░░██████" + echo " ░░ ░░░░░░ ░░░░░░ ░░░░░░" + echo "" + echo " _ __ __________________ __ _" + echo "" + nl -b a $file + sleep 4 + done; +elif [[ $1 = '--delete' || $1 = '-d' || $1 == "delete" ]]; then + if [[ -z $2 ]]; then + echo "missing option" + echo "pass an item number to delete" + else + sed -e $2'd' -i $file + fi +elif [[ $1 = '--add' || $1 = '-a' || $1 == "add" ]]; then + if [[ -z $2 ]]; then + echo "missing option" + echo "pass an item to add" + else + echo $2 >> $file + fi +else + echo "unknown option" + echo "call 'todo --help' for more info" +fi +exit diff --git a/bin/bin/toggle-touchpad b/bin/bin/toggle-touchpad new file mode 100755 index 0000000..2381a86 --- /dev/null +++ b/bin/bin/toggle-touchpad @@ -0,0 +1,20 @@ +#!/bin/bash +# +# enable/disable touchpad +# find your touchpad name: +# egrep -i 'synap|alps|etps' /proc/bus/input/devices +PAD='SynPS/2 Synaptics TouchPad' +A=`xinput list-props "$PAD" | sed -n -e 's/.*Device Enabled ([0-9][0-9]*):\t\(.*\)/\1/p' ` +if [ $A -eq 1 ]; then +xinput set-int-prop "$PAD" "Device Enabled" 8 0 +notify-send -t 5000 \ +' touchpad +░░▒▒▓▓██▓▓▒▒░░' \ +' disabled' +else +xinput set-int-prop "$PAD" "Device Enabled" 8 1 +notify-send -t 5000 \ +' touchpad +░░▒▒▓▓██▓▓▒▒░░' \ +' enabled' +fi diff --git a/fun/bin/2spooky.lua b/fun/bin/2spooky.lua new file mode 100755 index 0000000..a0ebc5d --- /dev/null +++ b/fun/bin/2spooky.lua @@ -0,0 +1,79 @@ + --Definitely not my best work, first script I've done in Lua 5.2 + function draw() + nissue = { + "\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[1;33m", + ",~~~~~~~~~~~~~, \027[0;31m..:::::::::.. \027[1;33m ,~~~~~~~~~~~~~,\027[1;33m", + "\027[1;33m:\027[1;32m .-======-,\027[1;33m : \027[0;31m ..:::\027[1;37maad8888888baa\027[0;31m:::.. \027[1;33m:\027[1;34mExploit-the \027[1;33m :\027[1;32m", + "\027[1;33m:\027[1;32m ||\027[0;31mH4CK3R\027[1;32m|# \027[1;33m : \027[0;31m .::::\027[1;37md:?88888888888?::8b\027[0;31m::::. \027[1;33m :\027[0;31m.-------,./|\027[1;33m :\027[1;32m", + "\027[1;33m:\027[1;32m ||______|| \027[1;33m :\027[1;34m&&&& \027[0;31m.:::\027[1;37md8888:?88888888??a888888b\027[0;31m:::. \027[1;34m &&&&\027[1;33m:\027[0;31m{ \027[1;33m VIRUS \027[0;31m /\027[1;33m :\027[1;33m", + "\027[1;33m:\027[1;32m | ___ | \027[1;33m : \027[1;34m + \027[0;31m.:::\027[1;37md8888888a8888888aa8888888888b\027[0;31m:::. \027[1;34m + \027[1;33m :\027[0;31m \\\027[1;33m DROPPER\027[0;31m 7\027[1;33m :\027[1;33m", + "\027[1;33m:\027[1;32m | |\027[1;35m[]\027[1;32m | | \027[1;33m : \027[1;34m &\027[0;31m::::\027[1;37mdP\027[0;31m\023\022\021\020\019\018\017\016\027[1;37m88888888888\027[0;31m\023\022\021\020\019\018\017\016\027[1;37mYb\027[0;31m::::\027[1;34m&&\027[1;33m :\027[0;31m ~. ,--.( \027[1;33m :\027[1;33m", + "\027[1;33m:\027[1;32m `-------' \027[1;33m : \027[0;31m::::\027[1;37mdP\027[0;31m\024:::::::\015\027[1;37mY888888888P\027[0;31m\024:::::::\015\027[1;37mYb\027[0;31m::::\027[1;33m : \027[0;31m '~ `;\027[1;33m :\027[1;33m", + "\027[1;33m:\027[0;31mReverse- \027[1;33m : \027[0;31m::::\027[1;37md8\027[0;31m\001:::::::::\014\027[1;37mY8888888P\027[0;31m\001:::::::::\014\027[1;37m8b\027[0;31m::::\027[1;33m :\027[1;34mNation's-\027[0;31mData\027[1;33m:\027[1;33m", + "\027[1;33m:\027[0;31mEngineering \027[1;33m: \027[0;31m.::::\027[1;37m88\027[0;31m\002\003\004\005\006\007\008\009\010\011\012\013\027[1;37mY88888P\027[0;31m\002\003\004\005\006\007\008\009\010\011\012\013\027[1;37m88\027[0;31m::::.\027[1;33m `~~~~~~~~~~~~'\027[1;33m", + "\027[1;33m `~~~~~~~~~~~~' \027[0;31m:::::\027[1;37mY8baaaaaaaaaa88P\027[0;31m:\027[1;37mT\027[0;31m:\027[1;37mY88aaaaaaaaaad8P\027[0;31m::::: \027[0;31m", + "\027[0;31m :::::::\027[1;37mY88888888888P\027[0;31m::\027[1;37m|\027[0;31m::\027[1;37mY88888888888P\027[0;31m::::::: \027[0;31m", + "\027[1;33m,~~~~~~~~~~~~~, \027[0;31m::::::::::::::::\027[1;37m888\027[0;31m:::\027[1;37m|\027[0;31m:::\027[1;37m888\027[0;31m::::::::::::::::\027[1;33m ,~~~~~~~~~~~~~,\027[1;33m", + "\027[1;33m:\027[1;34m R00T-KITS \027[1;33m : \027[0;31m`:::::::::::::::\027[1;37m8888888888888b\027[0;31m::::::::::::::' \027[1;33m :\027[0;31mHoM3-$w33t\027[1;33m :\027[1;37m", + "\027[1;33m:\027[0;31m ____ \027[1;37m __ \027[1;33m : \027[0;31m:::::::::::::::\027[1;37m88888888888888\027[0;31m:::::::::::::: \027[1;33m :\027[1;34m (I\027[1;33m :\027[1;33m", + "\027[1;33m: \027[0;31m| |\027[1;37m |\027[0;31m-_\027[1;37m| \027[1;33m:\027[0;31m :::::::::::::\027[1;37md88888888888888\027[0;31m::::::::::::: \027[1;33m :\027[1;36m^^^\027[1;34m |\027[1;36m ^^^\027[1;33m:\027[1;33m", + "\027[1;33m:\027[0;31m |____|\027[1;33m_\027[1;37m|\027[0;31m=_\027[1;37m|\027[1;33m :\027[0;31m ::::::::::::\027[1;37m88\027[0;31m::\027[1;37m88\027[0;31m::\027[1;37m88\027[0;31m:::\027[1;37m88\027[0;31m::::::::::::\027[1;33m :\027[1;34m|u|_\027[1;36m^^^^^\027[1;34m_|u|\027[1;33m:\027[1;33m", + "\027[1;33m:\027[1;37m ____\027[1;33m)\027[1;37m_\027[1;37m.\027[1;37m___\027[1;33m : \027[0;31m`::::::::::\027[1;37m88\027[0;31m::\027[1;37m88\027[0;31m::\027[1;37m88\027[0;31m:::\027[1;37m88\027[0;31m::::::::::' \027[1;33m :\027[1;34m|_ u _ u _|\027[1;33m:\027[1;33m", + "\027[1;33m: \027[1;37m/\027[1;34m:::::;\027[1;37m|\027[1;34m _\027[1;37m)\027[1;33m:\027[1;34m &\027[0;31m`:::::::::\027[1;37m88\027[0;31m::\027[1;37m88\027[0;31m::\027[1;37mP\027[0;31m::::\027[1;37m88\027[0;31m:::::::::'\027[1;34m& \027[1;33m:\027[1;34m |__|\027[1;37m;\027[1;34m|__| \027[1;33m :\027[1;33m", + "\027[1;33m:\027[1;37m `======'\027[1;34m |_|\027[1;33m: \027[1;34m+ \027[0;31m `:::::::\027[1;37m88\027[0;31m::\027[1;37m88\027[0;31m:::::::\027[1;37m88\027[0;31m:::::::' \027[1;34m + \027[1;33m :\027[1;34m /_/ \027[1;33m :\027[1;33m", + "\027[1;33m:\027[1;34mUr-Computer-\027[1;33m :\027[1;34m&&&&&&& \027[0;31m ``:::::::::::::::::::::::''\027[1;34m &&&&&&&\027[1;33m:\027[0;31mH4x0r-HoM3- \027[1;33m :\027[1;33m", + "\027[1;33m:\027[1;34mis-MY-\027[0;31mSlave \027[1;33m : \027[0;31m ``::::::::::::::''\027[1;33m :\027[0;31m *\027[1;37m127\027[0;31m.\027[1;37m0\027[0;31m.\027[1;37m0\027[0;31m.\027[1;37m1\027[0;31m* \027[1;33m:\027[1;33m", + "\027[1;33m `~~~~~~~~~~~~' `~~~~~~~~~~~~'\027[1;33m", + "\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[1;37m", + "\027[0;31m -======- \027[1;37m +\027[0;31mWARNING\027[1;37m+\027[1;33m\"\027[0;31mIllegal\027[1;37m_\027[0;31mNetwork\027[1;37m_\027[0;31mConnections\027[1;37m_\027[0;31mBeyond\027[1;37m_\027[0;31mLogin\027[1;33m\" \027[0;31m -======-\027[0;31m", + "\027[0;31m |\027[1;32mH\027[1;34m4\027[1;33mC\027[1;35mK\027[1;36m3\027[1;37mR\027[0;31m| \027[1;34m -== \027[1;37m You are at the point of \027[0;31mNO RETURN \027[1;34m ==- \027[0;31m |\027[1;32mH\027[1;34m4\027[1;33mC\027[1;35mK\027[1;36m3\027[1;37mR\027[0;31m|\027[0;31m", + "\027[0;31m |______|\027[0;31mYour Activities\027[1;37m:\027[1;33mWill\027[1;37m_\027[1;33mbe\027[1;37m_\027[1;33mKeylogged\027[1;37m_\027[1;33mand\027[1;37m_\027[1;33mTimestamped \027[1;34m\"\027[0;31mUSER_BEWARE\027[1;34m\"\027[0;31m|______|\027[0;31m", + "\027[0;31mHacking Sites\027[1;37m:\027[0;31m https\027[1;37m:\027[1;33m//\027[0;31msites\027[1;37m.\027[0;31mgoogle\027[1;37m.\027[0;31mcom\027[1;33m/\027[0;31msite\027[1;33m/\027[0;31mlazyboxx \027[1;35m*\027[0;31m http\027[1;37m:\027[1;33m//\027[0;31mwww\027[1;37m.\027[0;31mfreebsd\027[1;37m.\027[0;31morg \027[1;33m" + } + io.write("\027[1;1H") --reset cursor + for a = 7,11 do + for b = 1,24 do + if b == position then + nissue[a] = string.gsub(nissue[a],string.char(b),"\027[1;31m@\027[0;31m") + else + nissue[a] = string.gsub(nissue[a],string.char(b),":") + end + end + end + for a = 5,21 do + if bool then + nissue[a] = string.gsub(nissue[a],"&","\027[31;1m=\027[37;1m") + nissue[a] = string.gsub(nissue[a],"+","\027[31;1m|\027[37;1m") + else + nissue[a] = string.gsub(nissue[a],"&","=") + nissue[a] = string.gsub(nissue[a],"+","|") + end + end + for i = 1,28 do + print(nissue[i]) + end + bool = not bool + end + function changepos(num) + if position == 24 and num == 1 then + position = 1 + elseif position == 1 and num == -1 then + position = 24 + else + position = position + num + end + end + position = 14 + bool = true + dirs = {1,-1} + draw() + while true do + move = math.random(1,6) + dir = dirs[math.random(1,2)] + draw() + for m = 1,move do + changepos(dir) + draw() + os.execute("sleep 0.1") --Replace it with some other way to wait one tenth of a second if you're using Windows or don't have "sleep" + end --On the subject of Windows compatibility, Ansicon is a perfect way to make the Ansi escape codes work. + end diff --git a/fun/bin/colors b/fun/bin/colors new file mode 100755 index 0000000..c8d527b --- /dev/null +++ b/fun/bin/colors @@ -0,0 +1,13 @@ +#!/bin/bash + +xdef="$HOME/.Xdefaults" + +colors=( $( sed -re '/^!/d; /^$/d; /^#/d; s/(\*color)([0-9]):/\10\2:/g;' $xdef | grep 'color[01][0-9]:' | sort | sed 's/^.*: *//g' ) ) + +echo -e "\e[1;37m + Black Red Green Yellow Blue Magenta Cyan White +──────────────────────────────────────────────────────────────────────\e[0m" +for i in {0..7}; do echo -en "\e[$((30+$i))m ${colors[i]} \e[0m"; done +echo +for i in {8..15}; do echo -en "\e[1;$((22+$i))m ${colors[i]} \e[0m"; done +echo -e "\n" diff --git a/fun/bin/colorscheme b/fun/bin/colorscheme new file mode 100755 index 0000000..f2aa179 --- /dev/null +++ b/fun/bin/colorscheme @@ -0,0 +1,27 @@ +#!/bin/bash +# +# This file echoes a bunch of color codes to the +# terminal to demonstrate what's available. Each +# line is the color code of one forground color, +# out of 17 (default + 16 escapes), followed by a +# test use of that color on all nine background +# colors (default + 8 escapes). +# + +T='niX' # The test text + +echo -e "\n 40m 41m 42m 43m\ + 44m 45m 46m 47m"; + +for FGs in ' m' ' 1m' ' 30m' '1;30m' ' 31m' '1;31m' ' 32m' \ + '1;32m' ' 33m' '1;33m' ' 34m' '1;34m' ' 35m' '1;35m' \ + ' 36m' '1;36m' ' 37m' '1;37m'; + do FG=${FGs// /} + echo -en " $FGs \033[$FG $T " + for BG in 40m 41m 42m 43m 44m 45m 46m 47m; + do echo -en "$EINS \033[$FG\033[$BG $T \033[0m"; + done + echo; +done +echo + diff --git a/fun/bin/dna b/fun/bin/dna new file mode 100755 index 0000000..a049e0b --- /dev/null +++ b/fun/bin/dna @@ -0,0 +1,46 @@ +#!/bin/bash +# +# ANSI color scheme script by pfh +# +# Initializing mod by lolilolicon from Archlinux +# + +f=3 b=4 +for j in f b; do + for i in {0..7}; do + printf -v $j$i %b "\e[${!j}${i}m" + done +done +bld=$'\e[1m' +rst=$'\e[0m' +inv=$'\e[7m' + +cat << EOF + + ${f1} █-----${bld}█ ${rst}${f2} █-----${bld}█${rst} ${f3} █-----${bld}█${rst} ${f4} █-----${bld}█${rst} ${f5} █-----${bld}█${rst} ${f6} █-----${bld}█${rst} + ${f1} █---${bld}█${rst} ${f2} █---${bld}█${rst} ${f3} █---${bld}█${rst} ${f4} █---${bld}█${rst} ${f5} █---${bld}█${rst} ${f6} █---${bld}█${rst} + ${f1} █-${bld}█${rst} ${f2} █-${bld}█${rst} ${f3} █-${bld}█${rst} ${f4} █-${bld}█${rst} ${f5} █-${bld}█${rst} ${f6} █-${bld}█${rst} + ${f1} █${rst} ${f2} █${rst} ${f3} █${rst} ${f4} █${rst} ${f5} █${rst} ${f6} █${rst} + ${f1}${bld} █-${rst}${f1}█${rst} ${f2}${bld} █_${rst}${f2}█${rst} ${f3}${bld} █-${rst}${f3}█${rst} ${f4}${bld} █-${rst}${f4}█${rst} ${f5}${bld} █-${rst}${f5}█${rst} ${f6}${bld} █-${rst}${f6}█${rst} + ${f1}${bld} █---${rst}${f1}█${rst} ${f2}${bld} █---${rst}${f2}█${rst} ${f3}${bld} █---${rst}${f3}█${rst} ${f4}${bld} █---${rst}${f4}█${rst} ${f5}${bld} █---${rst}${f5}█${rst} ${f6}${bld} █---${rst}${f6}█${rst} + ${f1}${bld} █-----${rst}${f1}█${rst} ${f2}${bld} █-----${rst}${f2}█${rst} ${f3}${bld} █-----${rst}${f3}█${rst} ${f4}${bld} █-----${rst}${f4}█${rst} ${f5}${bld} █-----${rst}${f5}█${rst} ${f6}${bld} █-----${rst}${f6}█${rst} + ${f1}${bld} █---${rst}${f1}█${rst} ${f2}${bld} █---${rst}${f2}█${rst} ${f3}${bld} █---${rst}${f3}█${rst} ${f4}${bld} █---${rst}${f4}█${rst} ${f5}${bld} █---${rst}${f5}█${rst} ${f6}${bld} █---${rst}${f6}█${rst} + ${f1}${bld} █-${rst}${f1}█${rst} ${f2}${bld} █-${rst}${f2}█${rst} ${f3}${bld} █-${rst}${f3}█${rst} ${f4}${bld} █-${rst}${f4}█${rst} ${f5}${bld} █-${rst}${f5}█${rst} ${f6}${bld} █-${rst}${f6}█${rst} + ${f1}${bld} █${rst} ${f2}${bld} █${rst} ${f3}${bld}█${rst} ${f4}${bld} █${rst} ${f5}${bld} █${rst} ${f6}${bld} █${rst} + ${f1} █-${bld}█${rst} ${f2} █-${bld}█${rst} ${f3} █-${bld}█${rst} ${f4} █-${bld}█${rst} ${f5} █-${bld}█${rst} ${f6} █-${bld}█${rst} + ${f1} █---${bld}█${rst} ${f2} █---${bld}█${rst} ${f3} █---${bld}█${rst} ${f4} █---${bld}█${rst} ${f5} █---${bld}█${rst} ${f6} █---${bld}█${rst} + ${f1} █-----${bld}█ ${rst}${f2} █-----${bld}█${rst} ${f3} █-----${bld}█${rst} ${f4} █-----${bld}█${rst} ${f5} █-----${bld}█${rst} ${f6} █-----${bld}█${rst} + ${f1} █---${bld}█${rst} ${f2} █---${bld}█${rst} ${f3} █---${bld}█${rst} ${f4} █---${bld}█${rst} ${f5} █---${bld}█${rst} ${f6} █---${bld}█${rst} + ${f1} █-${bld}█${rst} ${f2} █-${bld}█${rst} ${f3} █-${bld}█${rst} ${f4} █-${bld}█${rst} ${f5} █-${bld}█${rst} ${f6} █-${bld}█${rst} + ${f1} █${rst} ${f2}█${rst} ${f3} █${rst} ${f4} █${rst} ${f5} █${rst} ${f6} █${rst} + ${f1}${bld} █-${rst}${f1}█${rst} ${f2}${bld} █_${rst}${f2}█${rst} ${f3}${bld} █-${rst}${f3}█${rst} ${f4}${bld} █-${rst}${f4}█${rst} ${f5}${bld} █-${rst}${f5}█${rst} ${f6}${bld} █-${rst}${f6}█${rst} + ${f1}${bld} █---${rst}${f1}█${rst} ${f2}${bld} █---${rst}${f2}█${rst} ${f3}${bld} █---${rst}${f3}█${rst} ${f4}${bld} █---${rst}${f4}█${rst} ${f5}${bld} █---${rst}${f5}█${rst} ${f6}${bld} █---${rst}${f6}█${rst} + ${f1}${bld} █-----${rst}${f1}█${rst} ${f2}${bld} █-----${rst}${f2}█${rst} ${f3}${bld} █-----${rst}${f3}█${rst} ${f4}${bld} █-----${rst}${f4}█${rst} ${f5}${bld} █-----${rst}${f5}█${rst} ${f6}${bld} █-----${rst}${f6}█${rst} + ${f1}${bld} █---${rst}${f1}█${rst} ${f2}${bld} █---${rst}${f2}█${rst} ${f3}${bld} █---${rst}${f3}█${rst} ${f4}${bld} █---${rst}${f4}█${rst} ${f5}${bld} █---${rst}${f5}█${rst} ${f6}${bld} █---${rst}${f6}█${rst} + ${f1}${bld} █-${rst}${f1}█${rst} ${f2}${bld} █-${rst}${f2}█${rst} ${f3}${bld} █-${rst}${f3}█${rst} ${f4}${bld} █-${rst}${f4}█${rst} ${f5}${bld} █-${rst}${f5}█${rst} ${f6}${bld} █-${rst}${f6}█${rst} + ${f1}${bld} █${rst} ${f2}${bld} █${rst} ${f3}${bld} █${rst} ${f4}${bld} █${rst} ${f5}${bld} █${rst} ${f6}${bld} █${rst} + ${f1} █-${bld}█${rst} ${f2} █-${bld}█${rst} ${f3} █-${bld}█${rst} ${f4} █-${bld}█${rst} ${f5} █-${bld}█${rst} ${f6} █-${bld}█${rst} + ${f1} █---${bld}█${rst} ${f2} █---${bld}█${rst} ${f3} █---${bld}█${rst} ${f4} █---${bld}█${rst} ${f5} █---${bld}█${rst} ${f6} █---${bld}█${rst} + ${f1} █-----${bld}█ ${rst}${f2} █-----${bld}█${rst} ${f3} █-----${bld}█${rst} ${f4} █-----${bld}█${rst} ${f5} █-----${bld}█${rst} ${f6} █-----${bld}█${rst} + +EOF \ No newline at end of file diff --git a/fun/bin/ghosts b/fun/bin/ghosts new file mode 100755 index 0000000..2cf1727 --- /dev/null +++ b/fun/bin/ghosts @@ -0,0 +1,31 @@ +#!/bin/bash +# +# ANSI color scheme script by pfh +# +# Initializing mod by lolilolicon from Archlinux +# + +f=3 b=4 +for j in f b; do + for i in {0..7}; do + printf -v $j$i %b "\e[${!j}${i}m" + done +done +bld=$'\e[1m' +rst=$'\e[0m' +inv=$'\e[7m' +cat << EOF + +$f1 ▄▄▄ $f2 ▄▄▄ $f3 ▄▄▄ $f4 ▄▄▄ $f5 ▄▄▄ $f6 ▄▄▄ +$f1 ▀█▀██ ▄ $f2 ▀█▀██ ▄ $f3 ▀█▀██ ▄ $f4 ▀█▀██ ▄ $f5 ▀█▀██ ▄ $f6 ▀█▀██ ▄ +$f1 ▀▄██████▀ $f2 ▀▄██████▀ $f3 ▀▄██████▀ $f4 ▀▄██████▀ $f5 ▀▄██████▀ $f6 ▀▄██████▀ +$f1 ▀█████ $f2 ▀█████ $f3 ▀█████ $f4 ▀█████ $f5 ▀█████ $f6 ▀█████ +$f1 ▀▀▀▀▄ $f2 ▀▀▀▀▄ $f3 ▀▀▀▀▄ $f4 ▀▀▀▀▄ $f5 ▀▀▀▀▄ $f6 ▀▀▀▀▄ +$bld +$f1 ▄▄▄ $f2 ▄▄▄ $f3 ▄▄▄ $f4 ▄▄▄ $f5 ▄▄▄ $f6 ▄▄▄ +$f1 ▀█▀██ ▄ $f2 ▀█▀██ ▄ $f3 ▀█▀██ ▄ $f4 ▀█▀██ ▄ $f5 ▀█▀██ ▄ $f6 ▀█▀██ ▄ +$f1 ▀▄██████▀ $f2 ▀▄██████▀ $f3 ▀▄██████▀ $f4 ▀▄██████▀ $f5 ▀▄██████▀ $f6 ▀▄██████▀ +$f1 ▀█████ $f2 ▀█████ $f3 ▀█████ $f4 ▀█████ $f5 ▀█████ $f6 ▀█████ +$f1 ▀▀▀▀▄ $f2 ▀▀▀▀▄ $f3 ▀▀▀▀▄ $f4 ▀▀▀▀▄ $f5 ▀▀▀▀▄ $f6 ▀▀▀▀▄ +$rst +EOF \ No newline at end of file diff --git a/fun/bin/invaders b/fun/bin/invaders new file mode 100755 index 0000000..0ca2036 --- /dev/null +++ b/fun/bin/invaders @@ -0,0 +1,54 @@ +#!/bin/sh + +# ANSI Color -- use these variables to easily have different color +# and format output. Make sure to output the reset sequence after +# colors (f = foreground, b = background), and use the 'off' +# feature for anything you turn on. + +initializeANSI() +{ + esc="" + + blackf="${esc}[30m"; redf="${esc}[31m"; greenf="${esc}[32m" + yellowf="${esc}[33m" bluef="${esc}[34m"; purplef="${esc}[35m" + cyanf="${esc}[36m"; whitef="${esc}[37m" + + blackb="${esc}[40m"; redb="${esc}[41m"; greenb="${esc}[42m" + yellowb="${esc}[43m" blueb="${esc}[44m"; purpleb="${esc}[45m" + cyanb="${esc}[46m"; whiteb="${esc}[47m" + + boldon="${esc}[1m"; boldoff="${esc}[22m" + italicson="${esc}[3m"; italicsoff="${esc}[23m" + ulon="${esc}[4m"; uloff="${esc}[24m" + invon="${esc}[7m"; invoff="${esc}[27m" + + reset="${esc}[0m" +} + +# note in this first use that switching colors doesn't require a reset +# first - the new color overrides the old one. + +initializeANSI + +cat << EOF + + ${boldon}${redf}▀▄ ▄▀ ${reset} ${boldon}${greenf}▄▄▄████▄▄▄ ${reset} ${boldon}${yellowf} ▄██▄ ${reset} ${boldon}${bluef}▀▄ ▄▀ ${reset} ${boldon}${purplef}▄▄▄████▄▄▄ ${reset} ${boldon}${cyanf} ▄██▄ ${reset} + ${boldon}${redf}▄█▀███▀█▄ ${reset} ${boldon}${greenf}███▀▀██▀▀███${reset} ${boldon}${yellowf}▄█▀██▀█▄${reset} ${boldon}${bluef}▄█▀███▀█▄ ${reset} ${boldon}${purplef}███▀▀██▀▀███${reset} ${boldon}${cyanf}▄█▀██▀█▄${reset} + ${boldon}${redf}█▀███████▀█${reset} ${boldon}${greenf}▀▀▀██▀▀██▀▀▀${reset} ${boldon}${yellowf}▀▀█▀▀█▀▀${reset} ${boldon}${bluef}█▀███████▀█${reset} ${boldon}${purplef}▀▀▀██▀▀██▀▀▀${reset} ${boldon}${cyanf}▀▀█▀▀█▀▀${reset} + ${boldon}${redf}▀ ▀▄▄ ▄▄▀ ▀${reset} ${boldon}${greenf}▄▄▀▀ ▀▀ ▀▀▄▄${reset} ${boldon}${yellowf}▄▀▄▀▀▄▀▄${reset} ${boldon}${bluef}▀ ▀▄▄ ▄▄▀ ▀${reset} ${boldon}${purplef}▄▄▀▀ ▀▀ ▀▀▄▄${reset} ${boldon}${cyanf}▄▀▄▀▀▄▀▄${reset} + + ${redf}▀▄ ▄▀ ${reset} ${greenf}▄▄▄████▄▄▄ ${reset} ${yellowf} ▄██▄ ${reset} ${bluef}▀▄ ▄▀ ${reset} ${purplef}▄▄▄████▄▄▄ ${reset} ${cyanf} ▄██▄ ${reset} + ${redf}▄█▀███▀█▄ ${reset} ${greenf}███▀▀██▀▀███${reset} ${yellowf}▄█▀██▀█▄${reset} ${bluef}▄█▀███▀█▄ ${reset} ${purplef}███▀▀██▀▀███${reset} ${cyanf}▄█▀██▀█▄${reset} + ${redf}█▀███████▀█${reset} ${greenf}▀▀▀██▀▀██▀▀▀${reset} ${yellowf}▀▀█▀▀█▀▀${reset} ${bluef}█▀███████▀█${reset} ${purplef}▀▀▀██▀▀██▀▀▀${reset} ${cyanf}▀▀█▀▀█▀▀${reset} + ${redf}▀ ▀▄▄ ▄▄▀ ▀${reset} ${greenf}▄▄▀▀ ▀▀ ▀▀▄▄${reset} ${yellowf}▄▀▄▀▀▄▀▄${reset} ${bluef}▀ ▀▄▄ ▄▄▀ ▀${reset} ${purplef}▄▄▀▀ ▀▀ ▀▀▄▄${reset} ${cyanf}▄▀▄▀▀▄▀▄${reset} + + + ${whitef}▌${reset} + + ${whitef}▌${reset} + ${whitef}${reset} + ${whitef}▄█▄${reset} + ${whitef}▄█████████▄${reset} + ${whitef}▀▀▀▀▀▀▀▀▀▀▀${reset} + +EOF \ No newline at end of file diff --git a/fun/bin/metroid b/fun/bin/metroid new file mode 100755 index 0000000..5bb5c72 --- /dev/null +++ b/fun/bin/metroid @@ -0,0 +1,27 @@ +#!/bin/sh +cat << EOF + +   +     +     +       +         +           +           +           +           +         +             +                  +              +          +            +            +            +           +         +             +           +         +     +EOF diff --git a/fun/bin/pacman b/fun/bin/pacman new file mode 100755 index 0000000..51697cc --- /dev/null +++ b/fun/bin/pacman @@ -0,0 +1,37 @@ +#!/bin/bash +# +# ANSI color scheme script featuring PACMAN +# by pfh +# +# Initializing procedure by lolilolicon +# + +f=3 b=4 +for j in f b; do + for i in {0..7}; do + printf -v $j$i %b "\e[${!j}${i}m" + done +done +bld=$'\e[1m' +rst=$'\e[0m' +inv=$'\e[7m' + + +cat << EOF + +$rst + $f3 ▄███████▄ $f1 ▄██████▄ $f2 ▄██████▄ $f4 ▄██████▄ $f5 ▄██████▄ $f6 ▄██████▄ + $f3▄█████████▀▀ $f1▄$f7█▀█$f1██$f7█▀█$f1██▄ $f2▄█$f7███$f2██$f7███$f2█▄ $f4▄█$f7███$f4██$f7███$f4█▄ $f5▄█$f7███$f5██$f7███$f5█▄ $f6▄██$f7█▀█$f6██$f7█▀█$f6▄ + $f3███████▀ $f7▄▄ ▄▄ ▄▄ $f1█$f7▄▄█$f1██$f7▄▄█$f1███ $f2██$f7█ █$f2██$f7█ █$f2██ $f4██$f7█ █$f4██$f7█ █$f4██ $f5██$f7█ █$f5██$f7█ █$f5██ $f6███$f7█▄▄$f6██$f7█▄▄$f6█ + $f3███████▄ $f7▀▀ ▀▀ ▀▀ $f1████████████ $f2████████████ $f4████████████ $f5████████████ $f6████████████ + $f3▀█████████▄▄ $f1██▀██▀▀██▀██ $f2██▀██▀▀██▀██ $f4██▀██▀▀██▀██ $f5██▀██▀▀██▀██ $f6██▀██▀▀██▀██ + $f3 ▀███████▀ $f1▀ ▀ ▀ ▀ $f2▀ ▀ ▀ ▀ $f4▀ ▀ ▀ ▀ $f5▀ ▀ ▀ ▀ $f6▀ ▀ ▀ ▀ +$bld + $f3 ▄███████▄ $f1 ▄██████▄ $f2 ▄██████▄ $f4 ▄██████▄ $f5 ▄██████▄ $f6 ▄██████▄ + $f3▄█████████▀▀ $f1▄$f7█▀█$f1██$f7█▀█$f1██▄ $f2▄█$f7█ █$f2██$f7█ █$f2█▄ $f4▄█$f7█ █$f4██$f7█ █$f4█▄ $f5▄█$f7█ █$f5██$f7█ █$f5█▄ $f6▄██$f7█▀█$f6██$f7█▀█$f6▄ + $f3███████▀ $f7▄▄ ▄▄ ▄▄ $f1█$f7▄▄█$f1██$f7▄▄█$f1███ $f2██$f7███$f2██$f7███$f2██ $f4██$f7███$f4██$f7███$f4██ $f5██$f7███$f5██$f7███$f5██ $f6███$f7█▄▄$f6██$f7█▄▄$f6█ + $f3███████▄ $f7▀▀ ▀▀ ▀▀ $f1████████████ $f2████████████ $f4████████████ $f5████████████ $f6████████████ + $f3▀█████████▄▄ $f1██▀██▀▀██▀██ $f2██▀██▀▀██▀██ $f4██▀██▀▀██▀██ $f5██▀██▀▀██▀██ $f6██▀██▀▀██▀██ + $f3 ▀███████▀ $f1▀ ▀ ▀ ▀ $f2▀ ▀ ▀ ▀ $f4▀ ▀ ▀ ▀ $f5▀ ▀ ▀ ▀ $f6▀ ▀ ▀ ▀ +$rst +EOF diff --git a/fun/bin/pipes b/fun/bin/pipes new file mode 100755 index 0000000..43e7046 --- /dev/null +++ b/fun/bin/pipes @@ -0,0 +1,122 @@ +#!/usr/bin/env bash +# pipes.sh: Animated pipes terminal screensaver. +# +# This modified version is maintained at: +# +# https://github.com/livibetter/pipes.sh + +# options: +# s = straight [5-15] +# f = rate [20-100] +# t = style [0-5] +# r = ttl + +VERSION=0.1.0 + +M=32768 +p=1 +f=75 s=13 r=2000 t=0 +w=$(tput cols) h=$(tput lines) +# ab -> idx = a*4 + b +# 0: up, 1: right, 2: down, 3: left +# 00 means going up , then going up -> ┃ +# 12 means going right, then going down -> ┓ +sets=( + "┃┏ ┓┛━┓ ┗┃┛┗ ┏━" + "│╭ ╮╯─╮ ╰│╯╰ ╭─" + "│┌ ┐┘─┐ └│┘└ ┌─" + "║╔ ╗╝═╗ ╚║╝╚ ╔═" + "|+ ++-+ +|++ +-" + "|/ \/-\ \|/\ /-" +) +v=() +RNDSTART=0 +NOCOLOR=0 + +OPTIND=1 +while getopts "p:t:f:s:r:RChv" arg; do +case $arg in + p) ((p=(OPTARG>0)?OPTARG:p));; + t) ((OPTARG>=0 && OPTARG<${#sets[@]})) && V+=($OPTARG);; + f) ((f=(OPTARG>19 && OPTARG<101)?OPTARG:f));; + s) ((s=(OPTARG>4 && OPTARG<16 )?OPTARG:s));; + r) ((r=(OPTARG>=0)?OPTARG:r));; + R) RNDSTART=1;; + C) NOCOLOR=1;; + h) echo -e "Usage: $(basename $0) [OPTION]..." + echo -e "Animated pipes terminal screensaver.\n" + echo -e " -p [1-]\tnumber of pipes (D=1)." + echo -e " -t [0-$((${#sets[@]} - 1))]\ttype of pipes, can be used more than once (D=0)." + echo -e " -f [20-100]\tframerate (D=75)." + echo -e " -s [5-15]\tprobability of a straight fitting (D=13)." + echo -e " -r LIMIT\treset after x characters, 0 if no limit (D=2000)." + echo -e " -R \t\trandom starting point." + echo -e " -C \t\tno color." + echo -e " -h\t\thelp (this screen)." + echo -e " -v\t\tprint version number.\n" + exit 0;; + v) echo "$(basename -- "$0") $VERSION" + exit 0 + esac +done + +# set default values if not by options +((${#V[@]})) || V=(0) + +# Attempt to workaround for Bash versions < 4, such as 3.2 on Mac: +# https://gist.github.com/livibetter/4689307/#comment-892368 +# Untested--in conduction of using shebang `env bash`--should fall back to +# `sleep` +printf -v SLEEP "read -t0.0$((1000/f)) -n 1" +if $SLEEP &>/dev/null; (($? != 142)); then + printf -v SLEEP "sleep 0.0$((1000/f))" +fi + +cleanup() { + # clear up standard input + read -t 0 && cat /dev/null + + tput rmcup + tput cnorm + stty echo + exit 0 +} +trap cleanup SIGHUP SIGINT SIGTERM + +for (( i=1; i<=p; i++ )); do + c[i]=$((i%8)) n[i]=0 l[i]=0 + ((x[i]=RNDSTART==1?RANDOM*w/32768:w/2)) + ((y[i]=RNDSTART==1?RANDOM*h/32768:h/2)) + v[i]=${V[${#V[@]} * RANDOM / M]} +done + +stty -echo +tput smcup +tput reset +tput civis +# any key press exits the loop and this script +while $SLEEP; (($? > 128)) || [[ $SLEEP = sleep* ]] && (($? == 0)); do + for (( i=1; i<=p; i++ )); do + # New position: + ((${l[i]}%2)) && ((x[i]+=-${l[i]}+2,1)) || ((y[i]+=${l[i]}-1)) + + # Loop on edges (change color on loop): + ((${x[i]}>w||${x[i]}<0||${y[i]}>h||${y[i]}<0)) && ((c[i]=RANDOM%8, v[i]=V[${#V[@]}*RANDOM/M])) + ((x[i]=(x[i]+w)%w)) + ((y[i]=(y[i]+h)%h)) + + # New random direction: + ((n[i]=RANDOM%s-1)) + ((n[i]=(${n[i]}>1||${n[i]}==0)?${l[i]}:${l[i]}+${n[i]})) + ((n[i]=(${n[i]}<0)?3:${n[i]}%4)) + + # Print: + tput cup ${y[i]} ${x[i]} + [[ $NOCOLOR == 0 ]] && echo -ne "\033[1;3${c[i]}m" + echo -n "${sets[v[i]]:l[i]*4+n[i]:1}" + l[i]=${n[i]} + done + ((r>0 && t*p>=r)) && tput reset && tput civis && t=0 || ((t++)) +done + +cleanup \ No newline at end of file diff --git a/fun/bin/pipesx b/fun/bin/pipesx new file mode 100755 index 0000000..a937bf8 --- /dev/null +++ b/fun/bin/pipesx @@ -0,0 +1,193 @@ +#!/bin/bash +# Animated pipes.sh terminal screensaver at an angle. +# Copyright (C) 2013, 2014 by Yu-Jie Lin +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +# +# Website: https://github.com/livibetter/pipesX.sh + +VERSION=0.1.0 + +W=$(tput cols) H=$(tput lines) +# maximal random value + 1 +M=32768 + +SETS=('╱╲' '/\') +COLORS=(31 32 33 34 35 36 37) + +# default values +N=1 +T=() +I=0.05 +P=25 +R=$((W * H / 4)) + +HELP="Usage: $(basename $0) [OPTIONS] +Animated pipes.sh terminal screensaver at an angle. + +Options: + + -n [1-] number of pipes. (Default: $N) + -t [0-$((${#SETS[@]} - 1))] types of pipes, can be used more than once. (Default: $T) + -i [float] piping interval or maze generation interval. (Default: $I) + -P [0-100] probability of a turning pipe or of \\ in maze generation. (Default: $P) + -r [LIMIT] reset after x characters, 0 if no limit. (Default: $R) + -R random starting point. + -C no color. + -X maze generation. + -h this help message. + -v print version number. +" + +while getopts "n:t:i:P:r:RCXhv" arg; do + case $arg in + n) + ((N = OPTARG > 0 ? OPTARG : N)) + ;; + t) + T+=($(((OPTARG >= 0 && OPTARG < ${#SETS[@]}) ? OPTARG : T))) + ;; + i) + I=$OPTARG + ;; + P) + ((P = (OPTARG >= 0 && OPTARG <= 100) ? OPTARG : P)) + ;; + r) + ((R = OPTARG >= 0 ? OPTARG : R)) + ;; + R) + RNDSTART=1 + ;; + C) + NOCOLOR=1 + ;; + X) + MAZE=1 + ;; + h) + echo -e "$HELP" + exit 0 + ;; + v) + echo "$(basename -- "$0") $VERSION" + exit 0 + esac +done + +# set to default values if not by options +((${#T[@]})) || T=(0) + +do_exit() { + # Show cursor and echo stdin + echo -ne "\e[?25h" + stty echo + clear + exit 0 + } +trap do_exit INT TERM + +# No echo stdin and hide the cursor +stty -echo +echo -ne "\e[?25l" + +# maze geneartion +while [[ $MAZE ]] && clear; do + [[ $NOCOLOR ]] || echo -ne "\e[1;${COLORS[${#COLORS[@]} * RANDOM / M]}m" + for ((i = 0; i < W * H; i++ )); do + echo -ne ${SETS[T]:100 * RANDOM / M < P:1} + done + read -t $I -n 1 && [[ $REPLY =~ q|Q ]] && do_exit +done + +# initialze values +for ((n = 0; n < N; n++)); do + ((X[n] = RNDSTART ? (W + 2) * RANDOM / M : W / 2)) + ((Y[n] = RNDSTART ? (H + 2) * RANDOM / M : H / 2)) + D[n]=$((4 * RANDOM / M)) + C[n]=${COLORS[${#COLORS[@]} * RANDOM / M]} + t[n]=${T[${#T[@]} * RANDOM / M]} +done + +clear +while :; do + for ((n = 0; n < N; n++, CC = 0)); do + x=${X[n]} y=${Y[n]} + d=${D[n]} c=${C[n]} + + # calculate new direction `d` + # 1 0 + # \/ 4 directions 0 to 3 + # /\ + # 2 3 + # valid directions: d: dd', d' is the new direction + # d + # 0: / 00 \ 01 03 + # / / /\ + # 1: / 10 \ 11 12 + # \ \ /\ + # 2: \/ 21 / 22 / 23 + # / \ + # 3: \/ 30 \ 32 \ 33 + # / \ + ((d = (100 * RANDOM / M) < P ? ((d + 1) + 2 * (RANDOM % 2)) % 4 : d)) + ((e = (d + 1) % 4)) + + # calculate new position + # d' x' y' + # 0: x+1 y-1 + # 1: x-1 y-1 + # 2: x-1 y+1 + # 3: x+1 y+1 + ((xn = e < 2 ? x + 1 : x - 1)) + ((yn = d < 2 ? y - 1 : y + 1)) + + # adjust position and change color? + ((d < 2 && y == 0)) && ((yn--, CC=1)) + ((e > 1 && x == 0)) && ((xn--, CC=1)) + ((d > 1 && y == H)) && ((yn++, CC=1)) + ((e < 2 && x == W)) && ((xn++, CC=1)) + ((CC)) && c=${COLORS[${#COLORS[@]} * RANDOM / M]} + ((CC)) && t[n]=${T[${#T[@]} * RANDOM / M]} + + # warp pipe + ((xn = (xn + W + 1) % (W + 1))) + ((yn = (yn + H + 1) % (H + 1))) + + # calculate position in terminal + # d' xt yt + # 0: x' y'+1 + # 1: x'+1 y'+1 + # 2: x'+1 y' + # 3: x' y' + ((xt = e < 2 ? xn : xn + 1)) + ((yt = d < 2 ? yn + 1 : yn)) + + echo -ne "\e[${yt};${xt}H" + [[ $NOCOLOR ]] || echo -ne "\e[1;${c}m" + echo -n "${SETS[t[n]]:d%2:1}" + + X[n]=$xn Y[n]=$yn + D[n]=$d C[n]=$c + done + read -t $I -n 1 && [[ $REPLY =~ q|Q ]] && do_exit + ((R)) && ((r += N, r >= R)) && r=0 && clear +done + +do_exit \ No newline at end of file diff --git a/fun/bin/rain b/fun/bin/rain new file mode 100755 index 0000000..8a8d8f6 --- /dev/null +++ b/fun/bin/rain @@ -0,0 +1,100 @@ +#!/bin/bash +RAINS=("|" "│" "┃" "┆" "┇" "┊" "┋" "╽" "╿") +COLORS=("\e[37m" "\e[37;1m") +# More from 256 color mode +for i in {244..255}; do + COLORS=("${COLORS[@]}" "\e[38;5;${i}m") +done +NRAINS=${#RAINS[@]} +NCOLORS=${#COLORS[@]} +NUM_RAIN_METADATA=5 + + +sigwinch() { + TERM_WIDTH=$(tput cols) + TERM_HEIGHT=$(tput lines) + STEP_DURATION=0.025 + ((MAX_RAINS = TERM_WIDTH * TERM_HEIGHT / 4)) + ((MAX_RAIN_LENGTH = TERM_HEIGHT < 10 ? 1 : TERM_HEIGHT / 10)) + # In percentage + ((NEW_RAIN_ODD = TERM_HEIGHT > 50 ? 100 : TERM_HEIGHT * 2)) + ((NEW_RAIN_ODD = NEW_RAIN_ODD * 75 / 100)) + ((FALLING_ODD = TERM_HEIGHT > 25 ? 100 : TERM_HEIGHT * 4)) + ((FALLING_ODD = FALLING_ODD * 90 / 100)) + } + +do_exit() { + echo -ne "\e[${TERM_HEIGHT};1H\e[0K" + + # Show cursor and echo stdin + echo -ne "\e[?25h" + stty echo + exit 0 + } + +do_render() { + # Clean screen first + for ((idx = 0; idx < num_rains * NUM_RAIN_METADATA; idx += NUM_RAIN_METADATA)); do + X=${rains[idx]} + Y=${rains[idx + 1]} + LENGTH=${rains[idx + 4]} + for ((y = Y; y < Y + LENGTH; y++)); do + (( y < 1 || y > TERM_HEIGHT )) && continue + echo -ne "\e[${y};${X}H " + done + done + + for ((idx = 0; idx < num_rains * NUM_RAIN_METADATA; idx += NUM_RAIN_METADATA)); do + if ((100 * RANDOM / 32768 < FALLING_ODD)); then + # Falling + if ((++rains[idx + 1] > TERM_HEIGHT)); then + # Out of screen, bye sweet <3 + rains=("${rains[@]:0:idx}" + "${rains[@]:idx+NUM_RAIN_METADATA:num_rains*NUM_RAIN_METADATA}") + ((num_rains--)) + continue + fi + fi + X=${rains[idx]} + Y=${rains[idx + 1]} + RAIN=${rains[idx + 2]} + COLOR=${rains[idx + 3]} + LENGTH=${rains[idx + 4]} + for ((y = Y; y < Y + LENGTH; y++)); do + (( y < 1 || y > TERM_HEIGHT )) && continue + echo -ne "\e[${y};${X}H${COLOR}${RAIN}" + done + done + } + +trap do_exit TERM INT +trap sigwinch WINCH +# No echo stdin and hide the cursor +stty -echo +echo -ne "\e[?25l" + +echo -ne "\e[2J" +rains=() +sigwinch +while :; do + read -n 1 -t $STEP_DURATION ch + case "$ch" in + q|Q) + do_exit + ;; + esac + + if ((num_rains < MAX_RAINS)) && ((100 * RANDOM / 32768 < NEW_RAIN_ODD)); then + # Need new |, 1-based + RAIN="${RAINS[NRAINS * RANDOM / 32768]}" + COLOR="${COLORS[NCOLORS * RANDOM / 32768]}" + LENGTH=$((MAX_RAIN_LENGTH * RANDOM / 32768 + 1)) + X=$((TERM_WIDTH * RANDOM / 32768 + 1)) + Y=$((1 - LENGTH)) + rains=("${rains[@]}" "$X" "$Y" "$RAIN" "$COLOR" "$LENGTH") + ((num_rains++)) + fi + + # Let rain fall! + do_render +done \ No newline at end of file diff --git a/fun/bin/ryu b/fun/bin/ryu new file mode 100755 index 0000000..070f8bb --- /dev/null +++ b/fun/bin/ryu @@ -0,0 +1,188 @@ +#!/bin/bash +# s y n t a x . s a m u r a i +# p r e s e n t s +# +# ███████ ██ ██ ██ ██ +# ░██░░░░██ ░░██ ██ ░██ ░██ +# ░██ ░██ ░░████ ░██ ░██ +# ░███████ ░░██ ░██ ░██ +# ░██░░░██ ░██ ░██ ░██ +# ░██ ░░██ ░██ ░██ ░██ +# ░██ ░░██ ░██ ░░███████ +# ░░ ░░ ░░ ░░░░░░░ +# +# ansi art of ryu hayabusa from ninja gaiden +# +# ▓▓▓▓▓▓▓▓▓▓ +# ░▓ author ▓ xero +# ░▓ code ▓ http://code.xero.nu/ryu +# ░▓ mirror ▓ http://git.io/ryu +# ░▓▓▓▓▓▓▓▓▓▓ +# ░░░░░░░░░░ + +cols=`tput cols` +pad () { + count=$1 + until [[ $count -eq 1 ]]; do + let count-=1 + echo -ne "." + done; + if [[ $2 ]]; then + echo "." + fi +} +let half=($cols-100)/2 +half=${half/.*} + +if [[ -z $1 || $1 == "--grey" || $1 == "-g" || $1 == "grey" ]]; then + pad $half; echo -en "..░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ."; pad $half true + pad $half; echo -en ".░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ."; pad $half true + pad $half; echo -en ".░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ."; pad $half true + pad $half; echo -en ".░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ."; pad $half true + pad $half; echo -en ".░░░░░░░░░░░░░░░░░░░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ."; pad $half true + pad $half; echo -en ".░░░░░░░░░░░░░░░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░░░░░░░▒▒▒▒▒▒ ."; pad $half true + pad $half; echo -en ".░░░░░░░░░░░░░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░░░░░░░▒▒▒▒▒▒▒ ."; pad $half true + pad $half; echo -en ".░░░░░░░░░░░░░░░░▒▒▒▒ ▒▒▒▒▒▒▒▒░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒▒▒▒▒ ."; pad $half true + pad $half; echo -en ".░░░░░░░░░░░░░░▒▒▒▒ ▒▒▒▒▒░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ."; pad $half true + pad $half; echo -en ".░░░░░░░░░░░░░▒▒▒ ▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ."; pad $half true + pad $half; echo -en ".░░░░░░░░░░░░▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ."; pad $half true + pad $half; echo -en ".░░░░░░░░░░░ ░░░░░░░░░░░░░ ░░░░░░░░░░░░ ▒ ."; pad $half true + pad $half; echo -en ".░░░░░░░░░░ ▒ ░░░▓▓▓▓▓▓▓▓▓▓▓▓░░ ░░░░░░░░░░░░░░░ ░ ."; pad $half true + pad $half; echo -en ".░░░░░░░░░░ ░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░ ░░░░░░░░░░░░░░░░░░░ ."; pad $half true + pad $half; echo -en ".░░░░░░░░░ ▒ ░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░ ░░▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░ ░ ▒ ."; pad $half true + pad $half; echo -en ".░░░░░░░░ ░ ░░░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░░ ░ ▒ ."; pad $half true + pad $half; echo -en ".░░░░░░░░ ░ ░░░░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░ ░ ▒ ."; pad $half true + pad $half; echo -en ".░░░░░░░░░▒ ░ ░ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░▓▓▓▓▓▓▓▓▓▓▓░ ░ ."; pad $half true + pad $half; echo -en "░░░░░░░░░░ ░░░ ░ ▓▓▓▓▓▓▓▓░▓▓▓▓░░░▓░░░░░░▓▓▓▓▓ ░ ░ ▒ "; pad $half true + pad $half; echo -en "░░░░░░░░▒▒ ░░░░░ ░ ▓▓▓▓▓▓░▓▓▓▓░░▓▓▓░░░░░░▓▓ ░ ░ ░ ▒ "; pad $half true + pad $half; echo -en "░░░░░░░░▒ ░░░░░░░░░ ░ ░▓░░▓▓▓▓▓░▓▓▓░░░░░ ░ ░░ ░░ ░ ▒ "; pad $half true + pad $half; echo -en "░░░░░░░▒▒ ░░░░░░░ ░░ ▓▓▓▓▓▓▓▓▓░░ ░░ ░ ░░ ░ ▒ "; pad $half true + pad $half; echo -en "░░░░░░░▒▒ ░░░░░░░░░░ ░▓▓▓▓▓▓▓░░░ ░░░ ░ ░ ░ ▒ "; pad $half true + pad $half; echo -en "░░░░░░░ ▒ ░░░░░░ ░░░▓▓▓░▓░░░░ ░ ░ ░░ ░ ▒ "; pad $half true + pad $half; echo -en "░░░░░░░ ▒ ░░░░░░░ ▓▓ ▓ ░░ ░░░░░░░░░░░░░ ░ ░░ ▓ █▓ ░ ░ ░ ▒▒ "; pad $half true + pad $half; echo -en ".░░░░░▒ ▒ ░░░░░░░░ ▓▓██ ▓ ██ ██▓ ▓ ░░░▓░ ░ ░ ░░░░ ▓ ██ ▓█ ▓ ██▓▓ ░░░░ ░ ░ ▒ ."; pad $half true + pad $half; echo -en ".░░░░░▒ ▒▒ ░░░░░░░░░ ▓██ ▓▓ ▓ ██▓ ▓░░░░▓▓░ ░░░░░░░░ ▓ ▓██ ▓ ▓ ██▓▓ ░░░░░░░ ░ ▒ ."; pad $half true + pad $half; echo -en ".░░░░░ ▒░ ░░░░░░░▓░░ ▓███ ▓▓▓▓ ███░ ░░░░▓▓░░░░░░░░░░ ░▓██ ▓▓▓ ███▓ ░░▓▓░░ ░ ▒ ▒ ."; pad $half true + pad $half; echo -en "..░░░░ ▒░ ░░░░▓▓▓▓▓▓░ ███ ██ ░░░░░▓▓▓▓▓░░░░░░░ ███ ████ ░░▓▓▓▓░░ ░ ▒ ▒ ."; pad $half true + pad $half; echo -en "..░░░░ ▒ ░▒ ░░▓▓▓▓▓▓▓▓▓▓ ██████ ▓▓▓░░ ░░░░▓▓▓▓▓▓░░░░░░░░░▓▓▓ █████ ▓▓▓▓▓▓▓░░░░ ▒▒ ▒ ."; pad $half true + pad $half; echo -en "..░░░░ ░ ░░ ░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█░░░░░░░▓▓▓▓▓▓▓░░░░ ░░ ░░▓░▓▓░░░░░░░▓▓▓▓▓▓░░ ▒▒ ▒ ."; pad $half true + pad $half; echo -en "..░░░░ ░ ░░ ░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██ ░░░░░░░▓▓▓▓▓▓▓░░░░ ░░░░░ ░░░░░░░░░▓▓▓▓▓░░ ░ ▒▒ ▒ ."; pad $half true + pad $half; echo -en "..░░░░▒░░▒░░ ░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░▓▓▓▓▓▓▓▓░░░ ░░░░░░░░░░░░░░░░░░▓▓░░░░ ▒▒ ▒ .."; pad $half true + pad $half; echo -en "..░░░░▒░░ ░░ ░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░▓▓▓▓▓▓▓▓▓░░░░ ░░░░░░░░░░░░░░░░░░░░░ ▒▒ ▒ .."; pad $half true + pad $half; echo -en "..░░░░░░░ ▒░▒ ░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░▓▓▓░░ ░░░░░ ░░░░░░░░░░░░░░░░░░░░ ▒ ▒ .."; pad $half true + pad $half; echo -en "..░░░░░░░░░░░ ░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ░ ░░░░░░░░░░░░░░░ ▒ ▒ .."; pad $half true + pad $half; echo -en "...░░░░░░░░░░░▒ ▒▒ ▓▓▓▓▓▓▓▓▓▓▓▓▓ ░░░░░░░░░░▒▒ ▒▒▒▒▒ ▒ ▒ ..."; pad $half true + pad $half; echo -en "...░░░░░░░░░░ ░▒ ▒▒▒░░░ ▓▓▓▓▓▓ ░░░░░░░░░░░░░▒▒▒ ▒▒▒▒▒░░░░▒▒ ▒▒▒▒▒▒▒ ▒▒ ▒ ..."; pad $half true + pad $half; echo -en "...░░░░░░░░░░ ░░░ ▒▒▒░░░░░░ ░░░░░ ░░░░░░░░░░▒░▒ ▒▒▒▒▒▒░░░░░░▒▒▒▒▒░▒▒▒▒ ▒▒ ..."; pad $half true + pad $half; echo -en "....░░░░░░░░░░ ░░░░░ ▒▒░░░░░░░░░░░░░░ ░░░░░░░░░ ▒░▒▒ ▒▒▒▒▒░░░░▒▒▒▒▒▒░░▒▒▒ ▒▒▒ ...."; pad $half true + pad $half; echo -en "....░░░░░░░░░░░░░░░░░░ ▒░░░░░░░░░░░ ░░░░░░░░░░░░░░ ▒ ▒▒▒▒▒▒▒░▒▒▒▒▒▒░░░░▒▒▒ ▒▒ ...."; pad $half true + pad $half; echo -en "....░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ▒▒▒▒▒▒▒ ▒ ░░░▒▒▒▒ ▒▒▒ ...."; pad $half true + pad $half; echo -en ".....░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ▒░▒▒▒ ▒▒▒ ▒░░░░░░░░░░▒ ▒▒▒▒ ▒ ....."; pad $half true + pad $half; echo -en ".....░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒ ░░▒▒▒▒▒▒░░░░░░░░░░░░░▒ ░▒▒▒▒ ▒ ....."; pad $half true + pad $half; echo -en ".....░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒ ▒▒░▒▒▒▒▒▒▒░░░░░░░░░░ ░░▒▒▒▒▒ ▒ ....."; pad $half true + pad $half; echo -en ".....░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒ ░▒▒▒▒▒▒▒▒▒░░▒░░░░░░ ░░▒▒▒▒▒▒ ▒ ....."; pad $half true + pad $half; echo -en "......░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒░░▒░▒▒▒ ▒▒▒▒▒░░░░░░░░░▒▒▒▒▒ ▒ ....."; pad $half true + pad $half; echo -en "......░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒▒▒░▒▒▒▒▒ ░░░░░░░░▒▒▒▒▒▒ ▒ ....."; pad $half true + pad $half; echo -en "......░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒▒░░▒░▒▒▒▒▒▒ ▒░░░░░░░▒▒▒▒▒▒ ▒ ....."; pad $half true +else + if [[ $1 == "--color" || $1 == "-c" || $1 == "color" ]]; then + pad $half; echo -en "\e[0;37m..\e[0;36m░░░░░░░░░░░░░░░░░░░░░░░░░░░░░\e[0;34m▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ \e[0;37m.."; pad $half true + pad $half; echo -en "\e[0;37m.\e[0;36m░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░\e[0;34m▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ \e[0;37m.."; pad $half true + pad $half; echo -en "\e[0;37m.\e[0;36m░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░\e[0;34m▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ \e[0;37m.."; pad $half true + pad $half; echo -en "\e[0;37m.\e[0;36m░░░░░░░░░░░░░░░░░░░░░░░░░░░\e[0;34m▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ \e[0;37m.."; pad $half true + pad $half; echo -en "\e[0;37m.\e[0;36m░░░░░░░░░░░░░░░░░░░░░░░░\e[0;34m▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ \e[0;37m.."; pad $half true + pad $half; echo -en "\e[0;37m.\e[0;36m░░░░░░░░░░░░░░░░░░░░\e[0;34m▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒\e[0;36m░░░░░░░░\e[0;34m▒▒▒▒▒▒ \e[0;37m.."; pad $half true + pad $half; echo -en "\e[0;37m.\e[0;36m░░░░░░░░░░░░░░░░░░\e[0;34m▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒\e[0;36m░░\e[0;34m▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒\e[0;36m░░░░░░░░\e[0;34m▒▒▒▒▒▒▒ \e[0;37m.."; pad $half true + pad $half; echo -en "\e[0;37m.\e[0;36m░░░░░░░░░░░░░░░░\e[0;34m▒▒▒▒ ▒▒▒▒▒▒▒▒\e[0;36m░░░░░\e[0;34m▒▒▒▒▒▒▒▒▒▒▒▒▒\e[0;36m░░░░\e[0;34m▒▒▒▒▒▒▒▒▒ \e[0;37m.."; pad $half true + pad $half; echo -en "\e[0;37m.\e[0;36m░░░░░░░░░░░░░░\e[0;34m▒▒▒▒ ▒▒▒▒▒\e[0;36m░░░░\e[0;34m▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ \e[0;37m.."; pad $half true + pad $half; echo -en "\e[0;37m.\e[0;36m░░░░░░░░░░░░░\e[0;34m▒▒▒ ▒▒▒▒\e[0;36m░░\e[0;34m▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ \e[0;37m.."; pad $half true + pad $half; echo -en "\e[0;37m.\e[0;36m░░░░░░░░░░░░\e[0;34m▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ \e[0;37m.."; pad $half true + pad $half; echo -en "\e[0;37m.\e[0;36m░░░░░░░░░░░ \e[0;33m░░░░░░░░░░░░░ ░░░░░░░░░░░░ \e[0;34m▒ \e[0;37m.."; pad $half true + pad $half; echo -en "\e[0;37m.\e[0;36m░░░░░░░░░░ \e[0;34m▒ \e[0;33m░░░▓▓▓▓▓▓▓▓▓▓▓▓░░ ░░░░░░░░░░░░░░░ ░ \e[0;37m.."; pad $half true + pad $half; echo -en "\e[0;37m.\e[0;36m░░░░░░░░░░ \e[0;33m░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░ ░░░░░░░░░░░░░░░░░░░ \e[0;37m.."; pad $half true + pad $half; echo -en "\e[0;37m.\e[0;36m░░░░░░░░░ \e[0;34m▒ \e[0;33m░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░ ░░▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░ ░ \e[0;34m▒ \e[0;37m.."; pad $half true + pad $half; echo -en "\e[0;37m.\e[0;36m░░░░░░░░ ░ \e[0;33m░░░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░░ ░ \e[0;34m▒ \e[0;37m.."; pad $half true + pad $half; echo -en "\e[0;37m.\e[0;36m░░░░░░░░ ░ \e[0;33m░░░░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░ ░ \e[0;34m▒ \e[0;37m.."; pad $half true + pad $half; echo -en "\e[0;37m.\e[0;36m░░░░░░░░░\e[0;34m▒ \e[0;33m░ ░ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░▓▓▓▓▓▓▓▓▓▓▓░ ░ \e[0;37m.."; pad $half true + pad $half; echo -en "\e[0;37m\e[0;36m░░░░░░░░░░ \e[0;33m░░░ ░ ▓▓▓▓▓▓▓▓░▓▓▓▓░░░▓░░░░░░▓▓▓▓▓ ░ ░ \e[0;34m▒ \e[0;37m."; pad $half true + pad $half; echo -en "\e[0;37m\e[0;36m░░░░░░░░\e[0;34m▒▒ \e[0;33m░░░░░ ░ ▓▓▓▓▓▓░▓▓▓▓░░▓▓▓░░░░░░▓▓ ░ ░ ░ \e[0;34m▒ \e[0;37m."; pad $half true + pad $half; echo -en "\e[0;37m\e[0;36m░░░░░░░░\e[0;34m▒ \e[0;33m░░░░░░░░░ ░ ░▓░░▓▓▓▓▓░▓▓▓░░░░░ ░ ░░ ░░ ░ \e[0;34m▒ \e[0;37m."; pad $half true + pad $half; echo -en "\e[0;37m\e[0;36m░░░░░░░\e[0;34m▒▒ \e[0;33m░░░░░░░ ░░ ▓▓▓▓▓▓▓▓▓░░ ░░ ░ ░░ ░ \e[0;34m▒ \e[0;37m."; pad $half true + pad $half; echo -en "\e[0;37m\e[0;36m░░░░░░░\e[0;34m▒▒ \e[0;33m░░░░░░░░░░ ░▓▓▓▓▓▓▓░░░ ░░░ ░ ░ ░ \e[0;34m▒ \e[0;37m."; pad $half true + pad $half; echo -en "\e[0;37m\e[0;36m░░░░░░░ \e[0;34m▒ \e[0;33m░░░░░░ ░░░▓▓▓░▓░░░░ ░ ░ ░░ ░ \e[0;34m▒ \e[0;37m."; pad $half true + pad $half; echo -en "\e[0;37m\e[0;36m░░░░░░░ \e[0;34m▒ \e[0;33m░░░░░░░ \e[0;39m▓▓ ▓ \e[0;33m░░ ░░░░░░░░░░░░░ ░ ░░ \e[0;39m▓ █▓ \e[0;33m░ ░ ░ \e[0;34m▒▒ \e[0;37m.."; pad $half true + pad $half; echo -en "\e[0;37m.\e[0;36m░░░░░\e[0;34m▒ ▒ \e[0;33m░░░░░░░░ \e[0;39m▓▓██ \e[0;36m▓ ██ \e[0;39m██▓ \e[0;33m▓ ░░░▓░ ░ ░ ░░░░ ▓ \e[0;39m██ \e[0;36m▓█ ▓\e[0;39m ██▓▓ \e[0;33m░░░░ ░ ░ \e[0;34m▒ \e[0;37m.."; pad $half true + pad $half; echo -en "\e[0;37m.\e[0;36m░░░░░\e[0;34m▒ ▒▒ \e[0;33m░░░░░░░░░ \e[0;39m▓██ \e[0;36m▓▓ ▓ \e[0;39m██▓ \e[0;33m▓░░░░▓▓░ ░░░░░░░░ ▓ \e[0;39m▓██ \e[0;36m▓ ▓\e[0;39m ██▓▓ \e[0;33m░░░░░░░ ░ \e[0;34m▒ \e[0;37m.."; pad $half true + pad $half; echo -en "\e[0;37m.\e[0;36m░░░░░ \e[0;34m▒\e[0;36m░ \e[0;33m░░░░░░░▓░░ \e[0;39m▓███ \e[0;36m▓▓▓▓ \e[0;39m███░ \e[0;33m░░░░▓▓░░░░░░░░░░ \e[0;39m░▓██ \e[0;36m▓▓▓ \e[0;39m███▓ \e[0;33m░░▓▓░░ ░ \e[0;34m▒ ▒ \e[0;37m.."; pad $half true + pad $half; echo -en "\e[0;37m..\e[0;36m░░░░ \e[0;34m▒\e[0;36m░ \e[0;33m░░░░▓▓▓▓▓▓░ \e[0;39m███ ██ \e[0;33m░░░░░▓▓▓▓▓░░░░░░░ \e[0;39m███ ████ \e[0;33m░░▓▓▓▓░░ ░ \e[0;34m▒ ▒ \e[0;37m.."; pad $half true + pad $half; echo -en "\e[0;37m..\e[0;36m░░░░ \e[0;34m▒ \e[0;36m░\e[0;34m▒ \e[0;33m░░▓▓▓▓▓▓▓▓▓▓ \e[0;39m██████ \e[0;33m▓▓▓░░ ░░░░▓▓▓▓▓▓░░░░░░░░░▓▓▓ \e[0;39m█████ \e[0;33m▓▓▓▓▓▓▓░░░░ \e[0;34m▒▒ ▒ \e[0;37m.."; pad $half true + pad $half; echo -en "\e[0;37m..\e[0;36m░░░░ ░ ░░ \e[0;33m░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█░░░░░░░▓▓▓▓▓▓▓░░░░ ░░ ░░▓░▓▓░░░░░░░▓▓▓▓▓▓░░ \e[0;34m▒▒ ▒ \e[0;37m.."; pad $half true + pad $half; echo -en "\e[0;37m..\e[0;36m░░░░ ░ ░░ \e[0;33m░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██ ░░░░░░░▓▓▓▓▓▓▓░░░░ ░░░░░ ░░░░░░░░░▓▓▓▓▓░░ ░ \e[0;34m▒▒ ▒ \e[0;37m.."; pad $half true + pad $half; echo -en "\e[0;37m..\e[0;36m░░░░\e[0;34m▒\e[0;36m░░\e[0;34m▒\e[0;36m░░ \e[0;33m░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░▓▓▓▓▓▓▓▓░░░ ░░░░░░░░░░░░░░░░░░▓▓░░░░ \e[0;34m▒▒ ▒ \e[0;37m..."; pad $half true + pad $half; echo -en "\e[0;37m..\e[0;36m░░░░\e[0;34m▒\e[0;36m░░ ░░ \e[0;33m░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░▓▓▓▓▓▓▓▓▓░░░░ ░░░░░░░░░░░░░░░░░░░░░ \e[0;34m▒▒ ▒ \e[0;37m..."; pad $half true + pad $half; echo -en "\e[0;37m..\e[0;36m░░░░░░░ \e[0;34m▒\e[0;36m░\e[0;34m▒ \e[0;33m░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░▓▓▓░░ ░░░░░ ░░░░░░░░░░░░░░░░░░░░ \e[0;34m▒ ▒ \e[0;37m..."; pad $half true + pad $half; echo -en "\e[0;37m..\e[0;36m░░░░░░░░░░░ \e[0;33m░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ░ ░░░░░░░░░░░░░░░ \e[0;34m▒ ▒ \e[0;37m..."; pad $half true + pad $half; echo -en "\e[0;37m...\e[0;36m░░░░░░░░░░░\e[0;34m▒ ▒▒ \e[0;33m▓▓▓▓▓▓▓▓▓▓▓▓▓ \e[0;36m░░░░░░░░░░\e[0;34m▒▒ ▒▒▒▒▒ \e[0;34m▒ ▒ \e[0;37m...."; pad $half true + pad $half; echo -en "\e[0;37m...\e[0;36m░░░░░░░░░░ ░\e[0;34m▒ ▒▒▒\e[0;36m░░░ \e[0;33m▓▓▓▓▓▓ \e[0;36m░░░░░░░░░░░░░\e[0;34m▒▒▒ ▒▒▒▒▒\e[0;36m░░░░\e[0;34m▒▒ ▒▒▒▒▒▒▒ ▒▒ ▒ \e[0;37m...."; pad $half true + pad $half; echo -en "\e[0;37m...\e[0;36m░░░░░░░░░░ ░░░ \e[0;34m▒▒▒\e[0;36m░░░░░░ ░░░░░ ░░░░░░░░░░\e[0;34m▒\e[0;36m░\e[0;34m▒ ▒▒▒▒▒▒\e[0;36m░░░░░░\e[0;34m▒▒▒▒▒\e[0;36m░\e[0;34m▒▒▒▒ ▒▒ \e[0;37m...."; pad $half true + pad $half; echo -en "\e[0;37m....\e[0;36m░░░░░░░░░░ ░░░░░ \e[0;34m▒▒\e[0;36m░░░░░░░░░░░░░░ ░░░░░░░░░ \e[0;34m▒\e[0;36m░\e[0;34m▒▒ ▒▒▒▒▒\e[0;36m░░░░\e[0;34m▒▒▒▒▒▒\e[0;36m░░\e[0;34m▒▒▒ ▒▒▒ \e[0;37m....."; pad $half true + pad $half; echo -en "\e[0;37m....\e[0;36m░░░░░░░░░░░░░░░░░░ \e[0;34m▒\e[0;36m░░░░░░░░░░░ ░░░░░░░░░░░░░░ \e[0;34m▒ ▒▒▒▒▒▒▒\e[0;36m░\e[0;34m▒▒▒▒▒▒\e[0;36m░░░░\e[0;34m▒▒▒ ▒▒ \e[0;37m....."; pad $half true + pad $half; echo -en "\e[0;37m....\e[0;36m░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ \e[0;34m▒▒▒▒▒▒▒ \e[0;34m▒ \e[0;36m░░░\e[0;34m▒▒▒▒ ▒▒▒ \e[0;37m....."; pad $half true + pad $half; echo -en "\e[0;37m.....\e[0;36m░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ \e[0;34m▒\e[0;36m░\e[0;34m▒▒▒ ▒▒▒ ▒\e[0;36m░░░░░░░░░░\e[0;34m▒ ▒▒▒▒ ▒ \e[0;37m......"; pad $half true + pad $half; echo -en "\e[0;37m.....\e[0;36m░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░\e[0;34m▒ \e[0;36m░░\e[0;34m▒▒▒▒▒▒\e[0;36m░░░░░░░░░░░░░\e[0;34m▒ \e[0;36m░\e[0;34m▒▒▒▒ ▒ \e[0;37m......"; pad $half true + pad $half; echo -en "\e[0;37m.....\e[0;36m░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░\e[0;34m▒ ▒▒\e[0;36m░\e[0;34m▒▒▒▒▒▒▒\e[0;36m░░░░░░░░░░ ░░\e[0;34m▒▒▒▒▒ \e[0;34m▒ \e[0;37m......"; pad $half true + pad $half; echo -en "\e[0;37m.....\e[0;36m░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░\e[0;34m▒▒ \e[0;36m░\e[0;34m▒▒▒▒▒▒▒▒▒\e[0;36m░░\e[0;34m▒\e[0;36m░░░░░░ ░░\e[0;34m▒▒▒▒▒▒ ▒ \e[0;37m......"; pad $half true + pad $half; echo -en "\e[0;37m......\e[0;36m░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░\e[0;34m▒▒\e[0;36m░░\e[0;34m▒\e[0;36m░\e[0;34m▒▒▒ ▒▒▒▒▒\e[0;36m░░░░░░░░░\e[0;34m▒▒▒▒▒ ▒ \e[0;37m......"; pad $half true + pad $half; echo -en "\e[0;37m......\e[0;36m░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░\e[0;34m▒▒▒▒\e[0;36m░\e[0;34m▒▒▒▒▒ \e[0;36m░░░░░░░░\e[0;34m▒▒▒▒▒▒ ▒ \e[0;37m......"; pad $half true + pad $half; echo -en "\e[0;37m......\e[0;36m░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░\e[0;34m▒▒▒\e[0;36m░░\e[0;34m▒\e[0;36m░\e[0;34m▒▒▒▒▒▒ ▒\e[0;36m░░░░░░░\e[0;34m▒▒▒▒▒▒ ▒ \e[0;37m......"; pad $half true + elif [[ $1 = '--version' || $1 = '-v' || $1 == "version" ]]; then + echo "ryu version 1.0.0" + echo "xero / syntax-samurai " + echo " ▟▙" + echo "▟▒░░░░░░░▜▙▜████████████████████████████████▛" + echo "▜▒░░░░░░░▟▛▟▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▛" + echo " ▜▛" + echo "this program is free software, and distributed under the Creative Commons " + echo "Attribution-ShareAlike 3.0 Unported License (CC BY-SA 3.0)" + echo "http://creativecommons.org/licenses/by-sa/3.0/" + exit + elif [[ $1 = '--help' || $1 = '-h' || $1 == "help" ]]; then + echo "" + echo " s y n t a x . s a m u r a i" + echo " p r e s e n t s" + echo "" + echo " ███████ ██ ██ ██ ██" + echo " ░██░░░░██ ░░██ ██ ░██ ░██" + echo " ░██ ░██ ░░████ ░██ ░██" + echo " ░███████ ░░██ ░██ ░██" + echo " ░██░░░██ ░██ ░██ ░██" + echo " ░██ ░░██ ░██ ░██ ░██" + echo " ░██ ░░██ ░██ ░░███████" + echo " ░░ ░░ ░░ ░░░░░░░" + echo "" + echo " usage: ryu [option]" + echo "" + echo " ansi art of ryu hayabusa from ninja gaiden" + echo "" + echo " --help, -h : display this message" + echo " --version, -v : display version and license" + echo " --grey, -g : display the art [default]" + echo " --color, -c : display the art in color" + echo "" + echo " ▟▙" + echo "▟▒░░░░░░░▜▙▜████████████████████████████████▛" + echo "▜▒░░░░░░░▟▛▟▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▛" + echo " ▜▛" + echo "" + echo " author: xero harrison > http://xero.nu" + echo " homepage: http://git.io/ryu" + echo " crew: http://github.com/syntax-samurai" + echo "" + exit + else + echo "unknown option" + echo "call 'ryu --help' for more info" + exit + fi +fi +exit \ No newline at end of file diff --git a/fun/bin/slendy b/fun/bin/slendy new file mode 100755 index 0000000..766e06c --- /dev/null +++ b/fun/bin/slendy @@ -0,0 +1,35 @@ +#!/bin/sh + +initializeANSI() +{ + esc="" + + blackf="${esc}[30m"; redf="${esc}[31m"; greenf="${esc}[32m" + yellowf="${esc}[33m" bluef="${esc}[34m"; purplef="${esc}[35m" + cyanf="${esc}[36m"; whitef="${esc}[37m" + + blackb="${esc}[40m"; redb="${esc}[41m"; greenb="${esc}[42m" + yellowb="${esc}[43m" blueb="${esc}[44m"; purpleb="${esc}[45m" + cyanb="${esc}[46m"; whiteb="${esc}[47m" + + boldon="${esc}[1m"; boldoff="${esc}[22m" + italicson="${esc}[3m"; italicsoff="${esc}[23m" + ulon="${esc}[4m"; uloff="${esc}[24m" + invon="${esc}[7m"; invoff="${esc}[27m" + + reset="${esc}[0m" +} + +initializeANSI + +cat << EOF + + ${reset}${blackf}| | | | |${reset} + ${redf}█ █${reset} ${blackf}|${reset} ${greenf}█ █${reset} ${blackf}|${reset} ${yellowf}█ █${reset} ${blackf}|${reset} ${bluef}█ █${reset} ${blackf}|${reset} ${purplef}█ █${reset} ${blackf}|${reset} ${cyanf}█ █${reset} + ${redf}███████${reset} ${blackf}|${reset} ${greenf}███████${reset} ${blackf}|${reset} ${yellowf}███████${reset} ${blackf}|${reset} ${bluef}███████${reset} ${blackf}|${reset} ${purplef}███████${reset} ${blackf}|${reset} ${cyanf}███████${reset} + ${redf}███${boldon}${redb}██${reset}${redf}█${boldon}${redb}██${reset}${redf}███${reset} ${blackf}|${reset} ${greenf}███${boldon}${greenb}██${reset}${greenf}█${boldon}${greenb}██${reset}${greenf}███${reset} ${blackf}|${reset} ${yellowf}███${boldon}${yellowb}██${reset}${yellowf}█${boldon}${yellowb}██${reset}${yellowf}███${reset} ${blackf}|${reset} ${bluef}███${boldon}${blueb}██${reset}${bluef}█${boldon}${blueb}██${reset}${bluef}███${reset} ${blackf}|${reset} ${purplef}███${boldon}${purpleb}██${reset}${purplef}█${boldon}${purpleb}██${reset}${purplef}███${reset} ${blackf}|${reset} ${cyanf}███${boldon}${cyanb}██${reset}${cyanf}█${boldon}${cyanb}██${reset}${cyanf}███${reset} + ${redf}████${boldon}${redb}█${reset}${redf}████${reset} ${blackf}|${reset} ${greenf}████${boldon}${greenb}█${reset}${greenf}████${reset} ${blackf}|${reset} ${yellowf}████${boldon}${yellowb}█${reset}${yellowf}████${reset} ${blackf}|${reset} ${bluef}████${boldon}${blueb}█${reset}${bluef}████${reset} ${blackf}|${reset} ${purplef}████${boldon}${purpleb}█${reset}${purplef}████${reset} ${blackf}|${reset} ${cyanf}████${boldon}${cyanb}█${reset}${cyanf}████${reset} + ${redf}█ █ ${boldon}█${reset} ${redf}█ █${reset} ${blackf}|${reset} ${greenf}█ █ ${boldon}█${reset} ${greenf}█ █${reset} ${blackf}|${reset} ${yellowf}█ █ ${boldon}█${reset} ${yellowf}█ █${reset} ${blackf}|${reset} ${bluef}█ █ ${boldon}█${reset} ${bluef}█ █${reset} ${blackf}|${reset} ${purplef}█ █ ${boldon}█${reset} ${purplef}█ █${reset} ${blackf}|${reset} ${cyanf}█ █ ${boldon}█${reset} ${cyanf}█ █${reset} + ${redf}█ █${reset} ${blackf}|${reset} ${greenf}█ █${reset} ${blackf}|${reset} ${yellowf}█ █${reset} ${blackf}|${reset} ${bluef}█ █${reset} ${blackf}|${reset} ${purplef}█ █${reset} ${blackf}|${reset} ${cyanf}█ █${reset} + ${blackf}| | | | |${reset} +EOF \ No newline at end of file diff --git a/fun/code/fun/2spooky.lua b/fun/code/fun/2spooky.lua deleted file mode 100755 index a0ebc5d..0000000 --- a/fun/code/fun/2spooky.lua +++ /dev/null @@ -1,79 +0,0 @@ - --Definitely not my best work, first script I've done in Lua 5.2 - function draw() - nissue = { - "\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[1;33m", - ",~~~~~~~~~~~~~, \027[0;31m..:::::::::.. \027[1;33m ,~~~~~~~~~~~~~,\027[1;33m", - "\027[1;33m:\027[1;32m .-======-,\027[1;33m : \027[0;31m ..:::\027[1;37maad8888888baa\027[0;31m:::.. \027[1;33m:\027[1;34mExploit-the \027[1;33m :\027[1;32m", - "\027[1;33m:\027[1;32m ||\027[0;31mH4CK3R\027[1;32m|# \027[1;33m : \027[0;31m .::::\027[1;37md:?88888888888?::8b\027[0;31m::::. \027[1;33m :\027[0;31m.-------,./|\027[1;33m :\027[1;32m", - "\027[1;33m:\027[1;32m ||______|| \027[1;33m :\027[1;34m&&&& \027[0;31m.:::\027[1;37md8888:?88888888??a888888b\027[0;31m:::. \027[1;34m &&&&\027[1;33m:\027[0;31m{ \027[1;33m VIRUS \027[0;31m /\027[1;33m :\027[1;33m", - "\027[1;33m:\027[1;32m | ___ | \027[1;33m : \027[1;34m + \027[0;31m.:::\027[1;37md8888888a8888888aa8888888888b\027[0;31m:::. \027[1;34m + \027[1;33m :\027[0;31m \\\027[1;33m DROPPER\027[0;31m 7\027[1;33m :\027[1;33m", - "\027[1;33m:\027[1;32m | |\027[1;35m[]\027[1;32m | | \027[1;33m : \027[1;34m &\027[0;31m::::\027[1;37mdP\027[0;31m\023\022\021\020\019\018\017\016\027[1;37m88888888888\027[0;31m\023\022\021\020\019\018\017\016\027[1;37mYb\027[0;31m::::\027[1;34m&&\027[1;33m :\027[0;31m ~. ,--.( \027[1;33m :\027[1;33m", - "\027[1;33m:\027[1;32m `-------' \027[1;33m : \027[0;31m::::\027[1;37mdP\027[0;31m\024:::::::\015\027[1;37mY888888888P\027[0;31m\024:::::::\015\027[1;37mYb\027[0;31m::::\027[1;33m : \027[0;31m '~ `;\027[1;33m :\027[1;33m", - "\027[1;33m:\027[0;31mReverse- \027[1;33m : \027[0;31m::::\027[1;37md8\027[0;31m\001:::::::::\014\027[1;37mY8888888P\027[0;31m\001:::::::::\014\027[1;37m8b\027[0;31m::::\027[1;33m :\027[1;34mNation's-\027[0;31mData\027[1;33m:\027[1;33m", - "\027[1;33m:\027[0;31mEngineering \027[1;33m: \027[0;31m.::::\027[1;37m88\027[0;31m\002\003\004\005\006\007\008\009\010\011\012\013\027[1;37mY88888P\027[0;31m\002\003\004\005\006\007\008\009\010\011\012\013\027[1;37m88\027[0;31m::::.\027[1;33m `~~~~~~~~~~~~'\027[1;33m", - "\027[1;33m `~~~~~~~~~~~~' \027[0;31m:::::\027[1;37mY8baaaaaaaaaa88P\027[0;31m:\027[1;37mT\027[0;31m:\027[1;37mY88aaaaaaaaaad8P\027[0;31m::::: \027[0;31m", - "\027[0;31m :::::::\027[1;37mY88888888888P\027[0;31m::\027[1;37m|\027[0;31m::\027[1;37mY88888888888P\027[0;31m::::::: \027[0;31m", - "\027[1;33m,~~~~~~~~~~~~~, \027[0;31m::::::::::::::::\027[1;37m888\027[0;31m:::\027[1;37m|\027[0;31m:::\027[1;37m888\027[0;31m::::::::::::::::\027[1;33m ,~~~~~~~~~~~~~,\027[1;33m", - "\027[1;33m:\027[1;34m R00T-KITS \027[1;33m : \027[0;31m`:::::::::::::::\027[1;37m8888888888888b\027[0;31m::::::::::::::' \027[1;33m :\027[0;31mHoM3-$w33t\027[1;33m :\027[1;37m", - "\027[1;33m:\027[0;31m ____ \027[1;37m __ \027[1;33m : \027[0;31m:::::::::::::::\027[1;37m88888888888888\027[0;31m:::::::::::::: \027[1;33m :\027[1;34m (I\027[1;33m :\027[1;33m", - "\027[1;33m: \027[0;31m| |\027[1;37m |\027[0;31m-_\027[1;37m| \027[1;33m:\027[0;31m :::::::::::::\027[1;37md88888888888888\027[0;31m::::::::::::: \027[1;33m :\027[1;36m^^^\027[1;34m |\027[1;36m ^^^\027[1;33m:\027[1;33m", - "\027[1;33m:\027[0;31m |____|\027[1;33m_\027[1;37m|\027[0;31m=_\027[1;37m|\027[1;33m :\027[0;31m ::::::::::::\027[1;37m88\027[0;31m::\027[1;37m88\027[0;31m::\027[1;37m88\027[0;31m:::\027[1;37m88\027[0;31m::::::::::::\027[1;33m :\027[1;34m|u|_\027[1;36m^^^^^\027[1;34m_|u|\027[1;33m:\027[1;33m", - "\027[1;33m:\027[1;37m ____\027[1;33m)\027[1;37m_\027[1;37m.\027[1;37m___\027[1;33m : \027[0;31m`::::::::::\027[1;37m88\027[0;31m::\027[1;37m88\027[0;31m::\027[1;37m88\027[0;31m:::\027[1;37m88\027[0;31m::::::::::' \027[1;33m :\027[1;34m|_ u _ u _|\027[1;33m:\027[1;33m", - "\027[1;33m: \027[1;37m/\027[1;34m:::::;\027[1;37m|\027[1;34m _\027[1;37m)\027[1;33m:\027[1;34m &\027[0;31m`:::::::::\027[1;37m88\027[0;31m::\027[1;37m88\027[0;31m::\027[1;37mP\027[0;31m::::\027[1;37m88\027[0;31m:::::::::'\027[1;34m& \027[1;33m:\027[1;34m |__|\027[1;37m;\027[1;34m|__| \027[1;33m :\027[1;33m", - "\027[1;33m:\027[1;37m `======'\027[1;34m |_|\027[1;33m: \027[1;34m+ \027[0;31m `:::::::\027[1;37m88\027[0;31m::\027[1;37m88\027[0;31m:::::::\027[1;37m88\027[0;31m:::::::' \027[1;34m + \027[1;33m :\027[1;34m /_/ \027[1;33m :\027[1;33m", - "\027[1;33m:\027[1;34mUr-Computer-\027[1;33m :\027[1;34m&&&&&&& \027[0;31m ``:::::::::::::::::::::::''\027[1;34m &&&&&&&\027[1;33m:\027[0;31mH4x0r-HoM3- \027[1;33m :\027[1;33m", - "\027[1;33m:\027[1;34mis-MY-\027[0;31mSlave \027[1;33m : \027[0;31m ``::::::::::::::''\027[1;33m :\027[0;31m *\027[1;37m127\027[0;31m.\027[1;37m0\027[0;31m.\027[1;37m0\027[0;31m.\027[1;37m1\027[0;31m* \027[1;33m:\027[1;33m", - "\027[1;33m `~~~~~~~~~~~~' `~~~~~~~~~~~~'\027[1;33m", - "\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[0;31m=\027[1;37m-\027[1;37m", - "\027[0;31m -======- \027[1;37m +\027[0;31mWARNING\027[1;37m+\027[1;33m\"\027[0;31mIllegal\027[1;37m_\027[0;31mNetwork\027[1;37m_\027[0;31mConnections\027[1;37m_\027[0;31mBeyond\027[1;37m_\027[0;31mLogin\027[1;33m\" \027[0;31m -======-\027[0;31m", - "\027[0;31m |\027[1;32mH\027[1;34m4\027[1;33mC\027[1;35mK\027[1;36m3\027[1;37mR\027[0;31m| \027[1;34m -== \027[1;37m You are at the point of \027[0;31mNO RETURN \027[1;34m ==- \027[0;31m |\027[1;32mH\027[1;34m4\027[1;33mC\027[1;35mK\027[1;36m3\027[1;37mR\027[0;31m|\027[0;31m", - "\027[0;31m |______|\027[0;31mYour Activities\027[1;37m:\027[1;33mWill\027[1;37m_\027[1;33mbe\027[1;37m_\027[1;33mKeylogged\027[1;37m_\027[1;33mand\027[1;37m_\027[1;33mTimestamped \027[1;34m\"\027[0;31mUSER_BEWARE\027[1;34m\"\027[0;31m|______|\027[0;31m", - "\027[0;31mHacking Sites\027[1;37m:\027[0;31m https\027[1;37m:\027[1;33m//\027[0;31msites\027[1;37m.\027[0;31mgoogle\027[1;37m.\027[0;31mcom\027[1;33m/\027[0;31msite\027[1;33m/\027[0;31mlazyboxx \027[1;35m*\027[0;31m http\027[1;37m:\027[1;33m//\027[0;31mwww\027[1;37m.\027[0;31mfreebsd\027[1;37m.\027[0;31morg \027[1;33m" - } - io.write("\027[1;1H") --reset cursor - for a = 7,11 do - for b = 1,24 do - if b == position then - nissue[a] = string.gsub(nissue[a],string.char(b),"\027[1;31m@\027[0;31m") - else - nissue[a] = string.gsub(nissue[a],string.char(b),":") - end - end - end - for a = 5,21 do - if bool then - nissue[a] = string.gsub(nissue[a],"&","\027[31;1m=\027[37;1m") - nissue[a] = string.gsub(nissue[a],"+","\027[31;1m|\027[37;1m") - else - nissue[a] = string.gsub(nissue[a],"&","=") - nissue[a] = string.gsub(nissue[a],"+","|") - end - end - for i = 1,28 do - print(nissue[i]) - end - bool = not bool - end - function changepos(num) - if position == 24 and num == 1 then - position = 1 - elseif position == 1 and num == -1 then - position = 24 - else - position = position + num - end - end - position = 14 - bool = true - dirs = {1,-1} - draw() - while true do - move = math.random(1,6) - dir = dirs[math.random(1,2)] - draw() - for m = 1,move do - changepos(dir) - draw() - os.execute("sleep 0.1") --Replace it with some other way to wait one tenth of a second if you're using Windows or don't have "sleep" - end --On the subject of Windows compatibility, Ansicon is a perfect way to make the Ansi escape codes work. - end diff --git a/fun/code/fun/colors b/fun/code/fun/colors deleted file mode 100755 index c8d527b..0000000 --- a/fun/code/fun/colors +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -xdef="$HOME/.Xdefaults" - -colors=( $( sed -re '/^!/d; /^$/d; /^#/d; s/(\*color)([0-9]):/\10\2:/g;' $xdef | grep 'color[01][0-9]:' | sort | sed 's/^.*: *//g' ) ) - -echo -e "\e[1;37m - Black Red Green Yellow Blue Magenta Cyan White -──────────────────────────────────────────────────────────────────────\e[0m" -for i in {0..7}; do echo -en "\e[$((30+$i))m ${colors[i]} \e[0m"; done -echo -for i in {8..15}; do echo -en "\e[1;$((22+$i))m ${colors[i]} \e[0m"; done -echo -e "\n" diff --git a/fun/code/fun/colorscheme b/fun/code/fun/colorscheme deleted file mode 100755 index f2aa179..0000000 --- a/fun/code/fun/colorscheme +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -# -# This file echoes a bunch of color codes to the -# terminal to demonstrate what's available. Each -# line is the color code of one forground color, -# out of 17 (default + 16 escapes), followed by a -# test use of that color on all nine background -# colors (default + 8 escapes). -# - -T='niX' # The test text - -echo -e "\n 40m 41m 42m 43m\ - 44m 45m 46m 47m"; - -for FGs in ' m' ' 1m' ' 30m' '1;30m' ' 31m' '1;31m' ' 32m' \ - '1;32m' ' 33m' '1;33m' ' 34m' '1;34m' ' 35m' '1;35m' \ - ' 36m' '1;36m' ' 37m' '1;37m'; - do FG=${FGs// /} - echo -en " $FGs \033[$FG $T " - for BG in 40m 41m 42m 43m 44m 45m 46m 47m; - do echo -en "$EINS \033[$FG\033[$BG $T \033[0m"; - done - echo; -done -echo - diff --git a/fun/code/fun/dna b/fun/code/fun/dna deleted file mode 100755 index a049e0b..0000000 --- a/fun/code/fun/dna +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash -# -# ANSI color scheme script by pfh -# -# Initializing mod by lolilolicon from Archlinux -# - -f=3 b=4 -for j in f b; do - for i in {0..7}; do - printf -v $j$i %b "\e[${!j}${i}m" - done -done -bld=$'\e[1m' -rst=$'\e[0m' -inv=$'\e[7m' - -cat << EOF - - ${f1} █-----${bld}█ ${rst}${f2} █-----${bld}█${rst} ${f3} █-----${bld}█${rst} ${f4} █-----${bld}█${rst} ${f5} █-----${bld}█${rst} ${f6} █-----${bld}█${rst} - ${f1} █---${bld}█${rst} ${f2} █---${bld}█${rst} ${f3} █---${bld}█${rst} ${f4} █---${bld}█${rst} ${f5} █---${bld}█${rst} ${f6} █---${bld}█${rst} - ${f1} █-${bld}█${rst} ${f2} █-${bld}█${rst} ${f3} █-${bld}█${rst} ${f4} █-${bld}█${rst} ${f5} █-${bld}█${rst} ${f6} █-${bld}█${rst} - ${f1} █${rst} ${f2} █${rst} ${f3} █${rst} ${f4} █${rst} ${f5} █${rst} ${f6} █${rst} - ${f1}${bld} █-${rst}${f1}█${rst} ${f2}${bld} █_${rst}${f2}█${rst} ${f3}${bld} █-${rst}${f3}█${rst} ${f4}${bld} █-${rst}${f4}█${rst} ${f5}${bld} █-${rst}${f5}█${rst} ${f6}${bld} █-${rst}${f6}█${rst} - ${f1}${bld} █---${rst}${f1}█${rst} ${f2}${bld} █---${rst}${f2}█${rst} ${f3}${bld} █---${rst}${f3}█${rst} ${f4}${bld} █---${rst}${f4}█${rst} ${f5}${bld} █---${rst}${f5}█${rst} ${f6}${bld} █---${rst}${f6}█${rst} - ${f1}${bld} █-----${rst}${f1}█${rst} ${f2}${bld} █-----${rst}${f2}█${rst} ${f3}${bld} █-----${rst}${f3}█${rst} ${f4}${bld} █-----${rst}${f4}█${rst} ${f5}${bld} █-----${rst}${f5}█${rst} ${f6}${bld} █-----${rst}${f6}█${rst} - ${f1}${bld} █---${rst}${f1}█${rst} ${f2}${bld} █---${rst}${f2}█${rst} ${f3}${bld} █---${rst}${f3}█${rst} ${f4}${bld} █---${rst}${f4}█${rst} ${f5}${bld} █---${rst}${f5}█${rst} ${f6}${bld} █---${rst}${f6}█${rst} - ${f1}${bld} █-${rst}${f1}█${rst} ${f2}${bld} █-${rst}${f2}█${rst} ${f3}${bld} █-${rst}${f3}█${rst} ${f4}${bld} █-${rst}${f4}█${rst} ${f5}${bld} █-${rst}${f5}█${rst} ${f6}${bld} █-${rst}${f6}█${rst} - ${f1}${bld} █${rst} ${f2}${bld} █${rst} ${f3}${bld}█${rst} ${f4}${bld} █${rst} ${f5}${bld} █${rst} ${f6}${bld} █${rst} - ${f1} █-${bld}█${rst} ${f2} █-${bld}█${rst} ${f3} █-${bld}█${rst} ${f4} █-${bld}█${rst} ${f5} █-${bld}█${rst} ${f6} █-${bld}█${rst} - ${f1} █---${bld}█${rst} ${f2} █---${bld}█${rst} ${f3} █---${bld}█${rst} ${f4} █---${bld}█${rst} ${f5} █---${bld}█${rst} ${f6} █---${bld}█${rst} - ${f1} █-----${bld}█ ${rst}${f2} █-----${bld}█${rst} ${f3} █-----${bld}█${rst} ${f4} █-----${bld}█${rst} ${f5} █-----${bld}█${rst} ${f6} █-----${bld}█${rst} - ${f1} █---${bld}█${rst} ${f2} █---${bld}█${rst} ${f3} █---${bld}█${rst} ${f4} █---${bld}█${rst} ${f5} █---${bld}█${rst} ${f6} █---${bld}█${rst} - ${f1} █-${bld}█${rst} ${f2} █-${bld}█${rst} ${f3} █-${bld}█${rst} ${f4} █-${bld}█${rst} ${f5} █-${bld}█${rst} ${f6} █-${bld}█${rst} - ${f1} █${rst} ${f2}█${rst} ${f3} █${rst} ${f4} █${rst} ${f5} █${rst} ${f6} █${rst} - ${f1}${bld} █-${rst}${f1}█${rst} ${f2}${bld} █_${rst}${f2}█${rst} ${f3}${bld} █-${rst}${f3}█${rst} ${f4}${bld} █-${rst}${f4}█${rst} ${f5}${bld} █-${rst}${f5}█${rst} ${f6}${bld} █-${rst}${f6}█${rst} - ${f1}${bld} █---${rst}${f1}█${rst} ${f2}${bld} █---${rst}${f2}█${rst} ${f3}${bld} █---${rst}${f3}█${rst} ${f4}${bld} █---${rst}${f4}█${rst} ${f5}${bld} █---${rst}${f5}█${rst} ${f6}${bld} █---${rst}${f6}█${rst} - ${f1}${bld} █-----${rst}${f1}█${rst} ${f2}${bld} █-----${rst}${f2}█${rst} ${f3}${bld} █-----${rst}${f3}█${rst} ${f4}${bld} █-----${rst}${f4}█${rst} ${f5}${bld} █-----${rst}${f5}█${rst} ${f6}${bld} █-----${rst}${f6}█${rst} - ${f1}${bld} █---${rst}${f1}█${rst} ${f2}${bld} █---${rst}${f2}█${rst} ${f3}${bld} █---${rst}${f3}█${rst} ${f4}${bld} █---${rst}${f4}█${rst} ${f5}${bld} █---${rst}${f5}█${rst} ${f6}${bld} █---${rst}${f6}█${rst} - ${f1}${bld} █-${rst}${f1}█${rst} ${f2}${bld} █-${rst}${f2}█${rst} ${f3}${bld} █-${rst}${f3}█${rst} ${f4}${bld} █-${rst}${f4}█${rst} ${f5}${bld} █-${rst}${f5}█${rst} ${f6}${bld} █-${rst}${f6}█${rst} - ${f1}${bld} █${rst} ${f2}${bld} █${rst} ${f3}${bld} █${rst} ${f4}${bld} █${rst} ${f5}${bld} █${rst} ${f6}${bld} █${rst} - ${f1} █-${bld}█${rst} ${f2} █-${bld}█${rst} ${f3} █-${bld}█${rst} ${f4} █-${bld}█${rst} ${f5} █-${bld}█${rst} ${f6} █-${bld}█${rst} - ${f1} █---${bld}█${rst} ${f2} █---${bld}█${rst} ${f3} █---${bld}█${rst} ${f4} █---${bld}█${rst} ${f5} █---${bld}█${rst} ${f6} █---${bld}█${rst} - ${f1} █-----${bld}█ ${rst}${f2} █-----${bld}█${rst} ${f3} █-----${bld}█${rst} ${f4} █-----${bld}█${rst} ${f5} █-----${bld}█${rst} ${f6} █-----${bld}█${rst} - -EOF \ No newline at end of file diff --git a/fun/code/fun/ghosts b/fun/code/fun/ghosts deleted file mode 100755 index 2cf1727..0000000 --- a/fun/code/fun/ghosts +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash -# -# ANSI color scheme script by pfh -# -# Initializing mod by lolilolicon from Archlinux -# - -f=3 b=4 -for j in f b; do - for i in {0..7}; do - printf -v $j$i %b "\e[${!j}${i}m" - done -done -bld=$'\e[1m' -rst=$'\e[0m' -inv=$'\e[7m' -cat << EOF - -$f1 ▄▄▄ $f2 ▄▄▄ $f3 ▄▄▄ $f4 ▄▄▄ $f5 ▄▄▄ $f6 ▄▄▄ -$f1 ▀█▀██ ▄ $f2 ▀█▀██ ▄ $f3 ▀█▀██ ▄ $f4 ▀█▀██ ▄ $f5 ▀█▀██ ▄ $f6 ▀█▀██ ▄ -$f1 ▀▄██████▀ $f2 ▀▄██████▀ $f3 ▀▄██████▀ $f4 ▀▄██████▀ $f5 ▀▄██████▀ $f6 ▀▄██████▀ -$f1 ▀█████ $f2 ▀█████ $f3 ▀█████ $f4 ▀█████ $f5 ▀█████ $f6 ▀█████ -$f1 ▀▀▀▀▄ $f2 ▀▀▀▀▄ $f3 ▀▀▀▀▄ $f4 ▀▀▀▀▄ $f5 ▀▀▀▀▄ $f6 ▀▀▀▀▄ -$bld -$f1 ▄▄▄ $f2 ▄▄▄ $f3 ▄▄▄ $f4 ▄▄▄ $f5 ▄▄▄ $f6 ▄▄▄ -$f1 ▀█▀██ ▄ $f2 ▀█▀██ ▄ $f3 ▀█▀██ ▄ $f4 ▀█▀██ ▄ $f5 ▀█▀██ ▄ $f6 ▀█▀██ ▄ -$f1 ▀▄██████▀ $f2 ▀▄██████▀ $f3 ▀▄██████▀ $f4 ▀▄██████▀ $f5 ▀▄██████▀ $f6 ▀▄██████▀ -$f1 ▀█████ $f2 ▀█████ $f3 ▀█████ $f4 ▀█████ $f5 ▀█████ $f6 ▀█████ -$f1 ▀▀▀▀▄ $f2 ▀▀▀▀▄ $f3 ▀▀▀▀▄ $f4 ▀▀▀▀▄ $f5 ▀▀▀▀▄ $f6 ▀▀▀▀▄ -$rst -EOF \ No newline at end of file diff --git a/fun/code/fun/invaders b/fun/code/fun/invaders deleted file mode 100755 index 0ca2036..0000000 --- a/fun/code/fun/invaders +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/sh - -# ANSI Color -- use these variables to easily have different color -# and format output. Make sure to output the reset sequence after -# colors (f = foreground, b = background), and use the 'off' -# feature for anything you turn on. - -initializeANSI() -{ - esc="" - - blackf="${esc}[30m"; redf="${esc}[31m"; greenf="${esc}[32m" - yellowf="${esc}[33m" bluef="${esc}[34m"; purplef="${esc}[35m" - cyanf="${esc}[36m"; whitef="${esc}[37m" - - blackb="${esc}[40m"; redb="${esc}[41m"; greenb="${esc}[42m" - yellowb="${esc}[43m" blueb="${esc}[44m"; purpleb="${esc}[45m" - cyanb="${esc}[46m"; whiteb="${esc}[47m" - - boldon="${esc}[1m"; boldoff="${esc}[22m" - italicson="${esc}[3m"; italicsoff="${esc}[23m" - ulon="${esc}[4m"; uloff="${esc}[24m" - invon="${esc}[7m"; invoff="${esc}[27m" - - reset="${esc}[0m" -} - -# note in this first use that switching colors doesn't require a reset -# first - the new color overrides the old one. - -initializeANSI - -cat << EOF - - ${boldon}${redf}▀▄ ▄▀ ${reset} ${boldon}${greenf}▄▄▄████▄▄▄ ${reset} ${boldon}${yellowf} ▄██▄ ${reset} ${boldon}${bluef}▀▄ ▄▀ ${reset} ${boldon}${purplef}▄▄▄████▄▄▄ ${reset} ${boldon}${cyanf} ▄██▄ ${reset} - ${boldon}${redf}▄█▀███▀█▄ ${reset} ${boldon}${greenf}███▀▀██▀▀███${reset} ${boldon}${yellowf}▄█▀██▀█▄${reset} ${boldon}${bluef}▄█▀███▀█▄ ${reset} ${boldon}${purplef}███▀▀██▀▀███${reset} ${boldon}${cyanf}▄█▀██▀█▄${reset} - ${boldon}${redf}█▀███████▀█${reset} ${boldon}${greenf}▀▀▀██▀▀██▀▀▀${reset} ${boldon}${yellowf}▀▀█▀▀█▀▀${reset} ${boldon}${bluef}█▀███████▀█${reset} ${boldon}${purplef}▀▀▀██▀▀██▀▀▀${reset} ${boldon}${cyanf}▀▀█▀▀█▀▀${reset} - ${boldon}${redf}▀ ▀▄▄ ▄▄▀ ▀${reset} ${boldon}${greenf}▄▄▀▀ ▀▀ ▀▀▄▄${reset} ${boldon}${yellowf}▄▀▄▀▀▄▀▄${reset} ${boldon}${bluef}▀ ▀▄▄ ▄▄▀ ▀${reset} ${boldon}${purplef}▄▄▀▀ ▀▀ ▀▀▄▄${reset} ${boldon}${cyanf}▄▀▄▀▀▄▀▄${reset} - - ${redf}▀▄ ▄▀ ${reset} ${greenf}▄▄▄████▄▄▄ ${reset} ${yellowf} ▄██▄ ${reset} ${bluef}▀▄ ▄▀ ${reset} ${purplef}▄▄▄████▄▄▄ ${reset} ${cyanf} ▄██▄ ${reset} - ${redf}▄█▀███▀█▄ ${reset} ${greenf}███▀▀██▀▀███${reset} ${yellowf}▄█▀██▀█▄${reset} ${bluef}▄█▀███▀█▄ ${reset} ${purplef}███▀▀██▀▀███${reset} ${cyanf}▄█▀██▀█▄${reset} - ${redf}█▀███████▀█${reset} ${greenf}▀▀▀██▀▀██▀▀▀${reset} ${yellowf}▀▀█▀▀█▀▀${reset} ${bluef}█▀███████▀█${reset} ${purplef}▀▀▀██▀▀██▀▀▀${reset} ${cyanf}▀▀█▀▀█▀▀${reset} - ${redf}▀ ▀▄▄ ▄▄▀ ▀${reset} ${greenf}▄▄▀▀ ▀▀ ▀▀▄▄${reset} ${yellowf}▄▀▄▀▀▄▀▄${reset} ${bluef}▀ ▀▄▄ ▄▄▀ ▀${reset} ${purplef}▄▄▀▀ ▀▀ ▀▀▄▄${reset} ${cyanf}▄▀▄▀▀▄▀▄${reset} - - - ${whitef}▌${reset} - - ${whitef}▌${reset} - ${whitef}${reset} - ${whitef}▄█▄${reset} - ${whitef}▄█████████▄${reset} - ${whitef}▀▀▀▀▀▀▀▀▀▀▀${reset} - -EOF \ No newline at end of file diff --git a/fun/code/fun/metroid b/fun/code/fun/metroid deleted file mode 100755 index 5bb5c72..0000000 --- a/fun/code/fun/metroid +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh -cat << EOF - -   -     -     -       -         -           -           -           -           -         -             -                  -              -          -            -            -            -           -         -             -           -         -     -EOF diff --git a/fun/code/fun/pacman b/fun/code/fun/pacman deleted file mode 100755 index 51697cc..0000000 --- a/fun/code/fun/pacman +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash -# -# ANSI color scheme script featuring PACMAN -# by pfh -# -# Initializing procedure by lolilolicon -# - -f=3 b=4 -for j in f b; do - for i in {0..7}; do - printf -v $j$i %b "\e[${!j}${i}m" - done -done -bld=$'\e[1m' -rst=$'\e[0m' -inv=$'\e[7m' - - -cat << EOF - -$rst - $f3 ▄███████▄ $f1 ▄██████▄ $f2 ▄██████▄ $f4 ▄██████▄ $f5 ▄██████▄ $f6 ▄██████▄ - $f3▄█████████▀▀ $f1▄$f7█▀█$f1██$f7█▀█$f1██▄ $f2▄█$f7███$f2██$f7███$f2█▄ $f4▄█$f7███$f4██$f7███$f4█▄ $f5▄█$f7███$f5██$f7███$f5█▄ $f6▄██$f7█▀█$f6██$f7█▀█$f6▄ - $f3███████▀ $f7▄▄ ▄▄ ▄▄ $f1█$f7▄▄█$f1██$f7▄▄█$f1███ $f2██$f7█ █$f2██$f7█ █$f2██ $f4██$f7█ █$f4██$f7█ █$f4██ $f5██$f7█ █$f5██$f7█ █$f5██ $f6███$f7█▄▄$f6██$f7█▄▄$f6█ - $f3███████▄ $f7▀▀ ▀▀ ▀▀ $f1████████████ $f2████████████ $f4████████████ $f5████████████ $f6████████████ - $f3▀█████████▄▄ $f1██▀██▀▀██▀██ $f2██▀██▀▀██▀██ $f4██▀██▀▀██▀██ $f5██▀██▀▀██▀██ $f6██▀██▀▀██▀██ - $f3 ▀███████▀ $f1▀ ▀ ▀ ▀ $f2▀ ▀ ▀ ▀ $f4▀ ▀ ▀ ▀ $f5▀ ▀ ▀ ▀ $f6▀ ▀ ▀ ▀ -$bld - $f3 ▄███████▄ $f1 ▄██████▄ $f2 ▄██████▄ $f4 ▄██████▄ $f5 ▄██████▄ $f6 ▄██████▄ - $f3▄█████████▀▀ $f1▄$f7█▀█$f1██$f7█▀█$f1██▄ $f2▄█$f7█ █$f2██$f7█ █$f2█▄ $f4▄█$f7█ █$f4██$f7█ █$f4█▄ $f5▄█$f7█ █$f5██$f7█ █$f5█▄ $f6▄██$f7█▀█$f6██$f7█▀█$f6▄ - $f3███████▀ $f7▄▄ ▄▄ ▄▄ $f1█$f7▄▄█$f1██$f7▄▄█$f1███ $f2██$f7███$f2██$f7███$f2██ $f4██$f7███$f4██$f7███$f4██ $f5██$f7███$f5██$f7███$f5██ $f6███$f7█▄▄$f6██$f7█▄▄$f6█ - $f3███████▄ $f7▀▀ ▀▀ ▀▀ $f1████████████ $f2████████████ $f4████████████ $f5████████████ $f6████████████ - $f3▀█████████▄▄ $f1██▀██▀▀██▀██ $f2██▀██▀▀██▀██ $f4██▀██▀▀██▀██ $f5██▀██▀▀██▀██ $f6██▀██▀▀██▀██ - $f3 ▀███████▀ $f1▀ ▀ ▀ ▀ $f2▀ ▀ ▀ ▀ $f4▀ ▀ ▀ ▀ $f5▀ ▀ ▀ ▀ $f6▀ ▀ ▀ ▀ -$rst -EOF diff --git a/fun/code/fun/pipes b/fun/code/fun/pipes deleted file mode 100755 index 43e7046..0000000 --- a/fun/code/fun/pipes +++ /dev/null @@ -1,122 +0,0 @@ -#!/usr/bin/env bash -# pipes.sh: Animated pipes terminal screensaver. -# -# This modified version is maintained at: -# -# https://github.com/livibetter/pipes.sh - -# options: -# s = straight [5-15] -# f = rate [20-100] -# t = style [0-5] -# r = ttl - -VERSION=0.1.0 - -M=32768 -p=1 -f=75 s=13 r=2000 t=0 -w=$(tput cols) h=$(tput lines) -# ab -> idx = a*4 + b -# 0: up, 1: right, 2: down, 3: left -# 00 means going up , then going up -> ┃ -# 12 means going right, then going down -> ┓ -sets=( - "┃┏ ┓┛━┓ ┗┃┛┗ ┏━" - "│╭ ╮╯─╮ ╰│╯╰ ╭─" - "│┌ ┐┘─┐ └│┘└ ┌─" - "║╔ ╗╝═╗ ╚║╝╚ ╔═" - "|+ ++-+ +|++ +-" - "|/ \/-\ \|/\ /-" -) -v=() -RNDSTART=0 -NOCOLOR=0 - -OPTIND=1 -while getopts "p:t:f:s:r:RChv" arg; do -case $arg in - p) ((p=(OPTARG>0)?OPTARG:p));; - t) ((OPTARG>=0 && OPTARG<${#sets[@]})) && V+=($OPTARG);; - f) ((f=(OPTARG>19 && OPTARG<101)?OPTARG:f));; - s) ((s=(OPTARG>4 && OPTARG<16 )?OPTARG:s));; - r) ((r=(OPTARG>=0)?OPTARG:r));; - R) RNDSTART=1;; - C) NOCOLOR=1;; - h) echo -e "Usage: $(basename $0) [OPTION]..." - echo -e "Animated pipes terminal screensaver.\n" - echo -e " -p [1-]\tnumber of pipes (D=1)." - echo -e " -t [0-$((${#sets[@]} - 1))]\ttype of pipes, can be used more than once (D=0)." - echo -e " -f [20-100]\tframerate (D=75)." - echo -e " -s [5-15]\tprobability of a straight fitting (D=13)." - echo -e " -r LIMIT\treset after x characters, 0 if no limit (D=2000)." - echo -e " -R \t\trandom starting point." - echo -e " -C \t\tno color." - echo -e " -h\t\thelp (this screen)." - echo -e " -v\t\tprint version number.\n" - exit 0;; - v) echo "$(basename -- "$0") $VERSION" - exit 0 - esac -done - -# set default values if not by options -((${#V[@]})) || V=(0) - -# Attempt to workaround for Bash versions < 4, such as 3.2 on Mac: -# https://gist.github.com/livibetter/4689307/#comment-892368 -# Untested--in conduction of using shebang `env bash`--should fall back to -# `sleep` -printf -v SLEEP "read -t0.0$((1000/f)) -n 1" -if $SLEEP &>/dev/null; (($? != 142)); then - printf -v SLEEP "sleep 0.0$((1000/f))" -fi - -cleanup() { - # clear up standard input - read -t 0 && cat /dev/null - - tput rmcup - tput cnorm - stty echo - exit 0 -} -trap cleanup SIGHUP SIGINT SIGTERM - -for (( i=1; i<=p; i++ )); do - c[i]=$((i%8)) n[i]=0 l[i]=0 - ((x[i]=RNDSTART==1?RANDOM*w/32768:w/2)) - ((y[i]=RNDSTART==1?RANDOM*h/32768:h/2)) - v[i]=${V[${#V[@]} * RANDOM / M]} -done - -stty -echo -tput smcup -tput reset -tput civis -# any key press exits the loop and this script -while $SLEEP; (($? > 128)) || [[ $SLEEP = sleep* ]] && (($? == 0)); do - for (( i=1; i<=p; i++ )); do - # New position: - ((${l[i]}%2)) && ((x[i]+=-${l[i]}+2,1)) || ((y[i]+=${l[i]}-1)) - - # Loop on edges (change color on loop): - ((${x[i]}>w||${x[i]}<0||${y[i]}>h||${y[i]}<0)) && ((c[i]=RANDOM%8, v[i]=V[${#V[@]}*RANDOM/M])) - ((x[i]=(x[i]+w)%w)) - ((y[i]=(y[i]+h)%h)) - - # New random direction: - ((n[i]=RANDOM%s-1)) - ((n[i]=(${n[i]}>1||${n[i]}==0)?${l[i]}:${l[i]}+${n[i]})) - ((n[i]=(${n[i]}<0)?3:${n[i]}%4)) - - # Print: - tput cup ${y[i]} ${x[i]} - [[ $NOCOLOR == 0 ]] && echo -ne "\033[1;3${c[i]}m" - echo -n "${sets[v[i]]:l[i]*4+n[i]:1}" - l[i]=${n[i]} - done - ((r>0 && t*p>=r)) && tput reset && tput civis && t=0 || ((t++)) -done - -cleanup \ No newline at end of file diff --git a/fun/code/fun/pipesx b/fun/code/fun/pipesx deleted file mode 100755 index a937bf8..0000000 --- a/fun/code/fun/pipesx +++ /dev/null @@ -1,193 +0,0 @@ -#!/bin/bash -# Animated pipes.sh terminal screensaver at an angle. -# Copyright (C) 2013, 2014 by Yu-Jie Lin -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -# -# Website: https://github.com/livibetter/pipesX.sh - -VERSION=0.1.0 - -W=$(tput cols) H=$(tput lines) -# maximal random value + 1 -M=32768 - -SETS=('╱╲' '/\') -COLORS=(31 32 33 34 35 36 37) - -# default values -N=1 -T=() -I=0.05 -P=25 -R=$((W * H / 4)) - -HELP="Usage: $(basename $0) [OPTIONS] -Animated pipes.sh terminal screensaver at an angle. - -Options: - - -n [1-] number of pipes. (Default: $N) - -t [0-$((${#SETS[@]} - 1))] types of pipes, can be used more than once. (Default: $T) - -i [float] piping interval or maze generation interval. (Default: $I) - -P [0-100] probability of a turning pipe or of \\ in maze generation. (Default: $P) - -r [LIMIT] reset after x characters, 0 if no limit. (Default: $R) - -R random starting point. - -C no color. - -X maze generation. - -h this help message. - -v print version number. -" - -while getopts "n:t:i:P:r:RCXhv" arg; do - case $arg in - n) - ((N = OPTARG > 0 ? OPTARG : N)) - ;; - t) - T+=($(((OPTARG >= 0 && OPTARG < ${#SETS[@]}) ? OPTARG : T))) - ;; - i) - I=$OPTARG - ;; - P) - ((P = (OPTARG >= 0 && OPTARG <= 100) ? OPTARG : P)) - ;; - r) - ((R = OPTARG >= 0 ? OPTARG : R)) - ;; - R) - RNDSTART=1 - ;; - C) - NOCOLOR=1 - ;; - X) - MAZE=1 - ;; - h) - echo -e "$HELP" - exit 0 - ;; - v) - echo "$(basename -- "$0") $VERSION" - exit 0 - esac -done - -# set to default values if not by options -((${#T[@]})) || T=(0) - -do_exit() { - # Show cursor and echo stdin - echo -ne "\e[?25h" - stty echo - clear - exit 0 - } -trap do_exit INT TERM - -# No echo stdin and hide the cursor -stty -echo -echo -ne "\e[?25l" - -# maze geneartion -while [[ $MAZE ]] && clear; do - [[ $NOCOLOR ]] || echo -ne "\e[1;${COLORS[${#COLORS[@]} * RANDOM / M]}m" - for ((i = 0; i < W * H; i++ )); do - echo -ne ${SETS[T]:100 * RANDOM / M < P:1} - done - read -t $I -n 1 && [[ $REPLY =~ q|Q ]] && do_exit -done - -# initialze values -for ((n = 0; n < N; n++)); do - ((X[n] = RNDSTART ? (W + 2) * RANDOM / M : W / 2)) - ((Y[n] = RNDSTART ? (H + 2) * RANDOM / M : H / 2)) - D[n]=$((4 * RANDOM / M)) - C[n]=${COLORS[${#COLORS[@]} * RANDOM / M]} - t[n]=${T[${#T[@]} * RANDOM / M]} -done - -clear -while :; do - for ((n = 0; n < N; n++, CC = 0)); do - x=${X[n]} y=${Y[n]} - d=${D[n]} c=${C[n]} - - # calculate new direction `d` - # 1 0 - # \/ 4 directions 0 to 3 - # /\ - # 2 3 - # valid directions: d: dd', d' is the new direction - # d - # 0: / 00 \ 01 03 - # / / /\ - # 1: / 10 \ 11 12 - # \ \ /\ - # 2: \/ 21 / 22 / 23 - # / \ - # 3: \/ 30 \ 32 \ 33 - # / \ - ((d = (100 * RANDOM / M) < P ? ((d + 1) + 2 * (RANDOM % 2)) % 4 : d)) - ((e = (d + 1) % 4)) - - # calculate new position - # d' x' y' - # 0: x+1 y-1 - # 1: x-1 y-1 - # 2: x-1 y+1 - # 3: x+1 y+1 - ((xn = e < 2 ? x + 1 : x - 1)) - ((yn = d < 2 ? y - 1 : y + 1)) - - # adjust position and change color? - ((d < 2 && y == 0)) && ((yn--, CC=1)) - ((e > 1 && x == 0)) && ((xn--, CC=1)) - ((d > 1 && y == H)) && ((yn++, CC=1)) - ((e < 2 && x == W)) && ((xn++, CC=1)) - ((CC)) && c=${COLORS[${#COLORS[@]} * RANDOM / M]} - ((CC)) && t[n]=${T[${#T[@]} * RANDOM / M]} - - # warp pipe - ((xn = (xn + W + 1) % (W + 1))) - ((yn = (yn + H + 1) % (H + 1))) - - # calculate position in terminal - # d' xt yt - # 0: x' y'+1 - # 1: x'+1 y'+1 - # 2: x'+1 y' - # 3: x' y' - ((xt = e < 2 ? xn : xn + 1)) - ((yt = d < 2 ? yn + 1 : yn)) - - echo -ne "\e[${yt};${xt}H" - [[ $NOCOLOR ]] || echo -ne "\e[1;${c}m" - echo -n "${SETS[t[n]]:d%2:1}" - - X[n]=$xn Y[n]=$yn - D[n]=$d C[n]=$c - done - read -t $I -n 1 && [[ $REPLY =~ q|Q ]] && do_exit - ((R)) && ((r += N, r >= R)) && r=0 && clear -done - -do_exit \ No newline at end of file diff --git a/fun/code/fun/rain b/fun/code/fun/rain deleted file mode 100755 index 8a8d8f6..0000000 --- a/fun/code/fun/rain +++ /dev/null @@ -1,100 +0,0 @@ -#!/bin/bash -RAINS=("|" "│" "┃" "┆" "┇" "┊" "┋" "╽" "╿") -COLORS=("\e[37m" "\e[37;1m") -# More from 256 color mode -for i in {244..255}; do - COLORS=("${COLORS[@]}" "\e[38;5;${i}m") -done -NRAINS=${#RAINS[@]} -NCOLORS=${#COLORS[@]} -NUM_RAIN_METADATA=5 - - -sigwinch() { - TERM_WIDTH=$(tput cols) - TERM_HEIGHT=$(tput lines) - STEP_DURATION=0.025 - ((MAX_RAINS = TERM_WIDTH * TERM_HEIGHT / 4)) - ((MAX_RAIN_LENGTH = TERM_HEIGHT < 10 ? 1 : TERM_HEIGHT / 10)) - # In percentage - ((NEW_RAIN_ODD = TERM_HEIGHT > 50 ? 100 : TERM_HEIGHT * 2)) - ((NEW_RAIN_ODD = NEW_RAIN_ODD * 75 / 100)) - ((FALLING_ODD = TERM_HEIGHT > 25 ? 100 : TERM_HEIGHT * 4)) - ((FALLING_ODD = FALLING_ODD * 90 / 100)) - } - -do_exit() { - echo -ne "\e[${TERM_HEIGHT};1H\e[0K" - - # Show cursor and echo stdin - echo -ne "\e[?25h" - stty echo - exit 0 - } - -do_render() { - # Clean screen first - for ((idx = 0; idx < num_rains * NUM_RAIN_METADATA; idx += NUM_RAIN_METADATA)); do - X=${rains[idx]} - Y=${rains[idx + 1]} - LENGTH=${rains[idx + 4]} - for ((y = Y; y < Y + LENGTH; y++)); do - (( y < 1 || y > TERM_HEIGHT )) && continue - echo -ne "\e[${y};${X}H " - done - done - - for ((idx = 0; idx < num_rains * NUM_RAIN_METADATA; idx += NUM_RAIN_METADATA)); do - if ((100 * RANDOM / 32768 < FALLING_ODD)); then - # Falling - if ((++rains[idx + 1] > TERM_HEIGHT)); then - # Out of screen, bye sweet <3 - rains=("${rains[@]:0:idx}" - "${rains[@]:idx+NUM_RAIN_METADATA:num_rains*NUM_RAIN_METADATA}") - ((num_rains--)) - continue - fi - fi - X=${rains[idx]} - Y=${rains[idx + 1]} - RAIN=${rains[idx + 2]} - COLOR=${rains[idx + 3]} - LENGTH=${rains[idx + 4]} - for ((y = Y; y < Y + LENGTH; y++)); do - (( y < 1 || y > TERM_HEIGHT )) && continue - echo -ne "\e[${y};${X}H${COLOR}${RAIN}" - done - done - } - -trap do_exit TERM INT -trap sigwinch WINCH -# No echo stdin and hide the cursor -stty -echo -echo -ne "\e[?25l" - -echo -ne "\e[2J" -rains=() -sigwinch -while :; do - read -n 1 -t $STEP_DURATION ch - case "$ch" in - q|Q) - do_exit - ;; - esac - - if ((num_rains < MAX_RAINS)) && ((100 * RANDOM / 32768 < NEW_RAIN_ODD)); then - # Need new |, 1-based - RAIN="${RAINS[NRAINS * RANDOM / 32768]}" - COLOR="${COLORS[NCOLORS * RANDOM / 32768]}" - LENGTH=$((MAX_RAIN_LENGTH * RANDOM / 32768 + 1)) - X=$((TERM_WIDTH * RANDOM / 32768 + 1)) - Y=$((1 - LENGTH)) - rains=("${rains[@]}" "$X" "$Y" "$RAIN" "$COLOR" "$LENGTH") - ((num_rains++)) - fi - - # Let rain fall! - do_render -done \ No newline at end of file diff --git a/fun/code/fun/ryu b/fun/code/fun/ryu deleted file mode 100755 index 070f8bb..0000000 --- a/fun/code/fun/ryu +++ /dev/null @@ -1,188 +0,0 @@ -#!/bin/bash -# s y n t a x . s a m u r a i -# p r e s e n t s -# -# ███████ ██ ██ ██ ██ -# ░██░░░░██ ░░██ ██ ░██ ░██ -# ░██ ░██ ░░████ ░██ ░██ -# ░███████ ░░██ ░██ ░██ -# ░██░░░██ ░██ ░██ ░██ -# ░██ ░░██ ░██ ░██ ░██ -# ░██ ░░██ ░██ ░░███████ -# ░░ ░░ ░░ ░░░░░░░ -# -# ansi art of ryu hayabusa from ninja gaiden -# -# ▓▓▓▓▓▓▓▓▓▓ -# ░▓ author ▓ xero -# ░▓ code ▓ http://code.xero.nu/ryu -# ░▓ mirror ▓ http://git.io/ryu -# ░▓▓▓▓▓▓▓▓▓▓ -# ░░░░░░░░░░ - -cols=`tput cols` -pad () { - count=$1 - until [[ $count -eq 1 ]]; do - let count-=1 - echo -ne "." - done; - if [[ $2 ]]; then - echo "." - fi -} -let half=($cols-100)/2 -half=${half/.*} - -if [[ -z $1 || $1 == "--grey" || $1 == "-g" || $1 == "grey" ]]; then - pad $half; echo -en "..░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ."; pad $half true - pad $half; echo -en ".░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ."; pad $half true - pad $half; echo -en ".░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ."; pad $half true - pad $half; echo -en ".░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ."; pad $half true - pad $half; echo -en ".░░░░░░░░░░░░░░░░░░░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ."; pad $half true - pad $half; echo -en ".░░░░░░░░░░░░░░░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░░░░░░░▒▒▒▒▒▒ ."; pad $half true - pad $half; echo -en ".░░░░░░░░░░░░░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░░░░░░░▒▒▒▒▒▒▒ ."; pad $half true - pad $half; echo -en ".░░░░░░░░░░░░░░░░▒▒▒▒ ▒▒▒▒▒▒▒▒░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒▒▒▒▒ ."; pad $half true - pad $half; echo -en ".░░░░░░░░░░░░░░▒▒▒▒ ▒▒▒▒▒░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ."; pad $half true - pad $half; echo -en ".░░░░░░░░░░░░░▒▒▒ ▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ."; pad $half true - pad $half; echo -en ".░░░░░░░░░░░░▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ."; pad $half true - pad $half; echo -en ".░░░░░░░░░░░ ░░░░░░░░░░░░░ ░░░░░░░░░░░░ ▒ ."; pad $half true - pad $half; echo -en ".░░░░░░░░░░ ▒ ░░░▓▓▓▓▓▓▓▓▓▓▓▓░░ ░░░░░░░░░░░░░░░ ░ ."; pad $half true - pad $half; echo -en ".░░░░░░░░░░ ░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░ ░░░░░░░░░░░░░░░░░░░ ."; pad $half true - pad $half; echo -en ".░░░░░░░░░ ▒ ░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░ ░░▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░ ░ ▒ ."; pad $half true - pad $half; echo -en ".░░░░░░░░ ░ ░░░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░░ ░ ▒ ."; pad $half true - pad $half; echo -en ".░░░░░░░░ ░ ░░░░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░ ░ ▒ ."; pad $half true - pad $half; echo -en ".░░░░░░░░░▒ ░ ░ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░▓▓▓▓▓▓▓▓▓▓▓░ ░ ."; pad $half true - pad $half; echo -en "░░░░░░░░░░ ░░░ ░ ▓▓▓▓▓▓▓▓░▓▓▓▓░░░▓░░░░░░▓▓▓▓▓ ░ ░ ▒ "; pad $half true - pad $half; echo -en "░░░░░░░░▒▒ ░░░░░ ░ ▓▓▓▓▓▓░▓▓▓▓░░▓▓▓░░░░░░▓▓ ░ ░ ░ ▒ "; pad $half true - pad $half; echo -en "░░░░░░░░▒ ░░░░░░░░░ ░ ░▓░░▓▓▓▓▓░▓▓▓░░░░░ ░ ░░ ░░ ░ ▒ "; pad $half true - pad $half; echo -en "░░░░░░░▒▒ ░░░░░░░ ░░ ▓▓▓▓▓▓▓▓▓░░ ░░ ░ ░░ ░ ▒ "; pad $half true - pad $half; echo -en "░░░░░░░▒▒ ░░░░░░░░░░ ░▓▓▓▓▓▓▓░░░ ░░░ ░ ░ ░ ▒ "; pad $half true - pad $half; echo -en "░░░░░░░ ▒ ░░░░░░ ░░░▓▓▓░▓░░░░ ░ ░ ░░ ░ ▒ "; pad $half true - pad $half; echo -en "░░░░░░░ ▒ ░░░░░░░ ▓▓ ▓ ░░ ░░░░░░░░░░░░░ ░ ░░ ▓ █▓ ░ ░ ░ ▒▒ "; pad $half true - pad $half; echo -en ".░░░░░▒ ▒ ░░░░░░░░ ▓▓██ ▓ ██ ██▓ ▓ ░░░▓░ ░ ░ ░░░░ ▓ ██ ▓█ ▓ ██▓▓ ░░░░ ░ ░ ▒ ."; pad $half true - pad $half; echo -en ".░░░░░▒ ▒▒ ░░░░░░░░░ ▓██ ▓▓ ▓ ██▓ ▓░░░░▓▓░ ░░░░░░░░ ▓ ▓██ ▓ ▓ ██▓▓ ░░░░░░░ ░ ▒ ."; pad $half true - pad $half; echo -en ".░░░░░ ▒░ ░░░░░░░▓░░ ▓███ ▓▓▓▓ ███░ ░░░░▓▓░░░░░░░░░░ ░▓██ ▓▓▓ ███▓ ░░▓▓░░ ░ ▒ ▒ ."; pad $half true - pad $half; echo -en "..░░░░ ▒░ ░░░░▓▓▓▓▓▓░ ███ ██ ░░░░░▓▓▓▓▓░░░░░░░ ███ ████ ░░▓▓▓▓░░ ░ ▒ ▒ ."; pad $half true - pad $half; echo -en "..░░░░ ▒ ░▒ ░░▓▓▓▓▓▓▓▓▓▓ ██████ ▓▓▓░░ ░░░░▓▓▓▓▓▓░░░░░░░░░▓▓▓ █████ ▓▓▓▓▓▓▓░░░░ ▒▒ ▒ ."; pad $half true - pad $half; echo -en "..░░░░ ░ ░░ ░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█░░░░░░░▓▓▓▓▓▓▓░░░░ ░░ ░░▓░▓▓░░░░░░░▓▓▓▓▓▓░░ ▒▒ ▒ ."; pad $half true - pad $half; echo -en "..░░░░ ░ ░░ ░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██ ░░░░░░░▓▓▓▓▓▓▓░░░░ ░░░░░ ░░░░░░░░░▓▓▓▓▓░░ ░ ▒▒ ▒ ."; pad $half true - pad $half; echo -en "..░░░░▒░░▒░░ ░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░▓▓▓▓▓▓▓▓░░░ ░░░░░░░░░░░░░░░░░░▓▓░░░░ ▒▒ ▒ .."; pad $half true - pad $half; echo -en "..░░░░▒░░ ░░ ░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░▓▓▓▓▓▓▓▓▓░░░░ ░░░░░░░░░░░░░░░░░░░░░ ▒▒ ▒ .."; pad $half true - pad $half; echo -en "..░░░░░░░ ▒░▒ ░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░▓▓▓░░ ░░░░░ ░░░░░░░░░░░░░░░░░░░░ ▒ ▒ .."; pad $half true - pad $half; echo -en "..░░░░░░░░░░░ ░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ░ ░░░░░░░░░░░░░░░ ▒ ▒ .."; pad $half true - pad $half; echo -en "...░░░░░░░░░░░▒ ▒▒ ▓▓▓▓▓▓▓▓▓▓▓▓▓ ░░░░░░░░░░▒▒ ▒▒▒▒▒ ▒ ▒ ..."; pad $half true - pad $half; echo -en "...░░░░░░░░░░ ░▒ ▒▒▒░░░ ▓▓▓▓▓▓ ░░░░░░░░░░░░░▒▒▒ ▒▒▒▒▒░░░░▒▒ ▒▒▒▒▒▒▒ ▒▒ ▒ ..."; pad $half true - pad $half; echo -en "...░░░░░░░░░░ ░░░ ▒▒▒░░░░░░ ░░░░░ ░░░░░░░░░░▒░▒ ▒▒▒▒▒▒░░░░░░▒▒▒▒▒░▒▒▒▒ ▒▒ ..."; pad $half true - pad $half; echo -en "....░░░░░░░░░░ ░░░░░ ▒▒░░░░░░░░░░░░░░ ░░░░░░░░░ ▒░▒▒ ▒▒▒▒▒░░░░▒▒▒▒▒▒░░▒▒▒ ▒▒▒ ...."; pad $half true - pad $half; echo -en "....░░░░░░░░░░░░░░░░░░ ▒░░░░░░░░░░░ ░░░░░░░░░░░░░░ ▒ ▒▒▒▒▒▒▒░▒▒▒▒▒▒░░░░▒▒▒ ▒▒ ...."; pad $half true - pad $half; echo -en "....░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ▒▒▒▒▒▒▒ ▒ ░░░▒▒▒▒ ▒▒▒ ...."; pad $half true - pad $half; echo -en ".....░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ▒░▒▒▒ ▒▒▒ ▒░░░░░░░░░░▒ ▒▒▒▒ ▒ ....."; pad $half true - pad $half; echo -en ".....░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒ ░░▒▒▒▒▒▒░░░░░░░░░░░░░▒ ░▒▒▒▒ ▒ ....."; pad $half true - pad $half; echo -en ".....░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒ ▒▒░▒▒▒▒▒▒▒░░░░░░░░░░ ░░▒▒▒▒▒ ▒ ....."; pad $half true - pad $half; echo -en ".....░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒ ░▒▒▒▒▒▒▒▒▒░░▒░░░░░░ ░░▒▒▒▒▒▒ ▒ ....."; pad $half true - pad $half; echo -en "......░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒░░▒░▒▒▒ ▒▒▒▒▒░░░░░░░░░▒▒▒▒▒ ▒ ....."; pad $half true - pad $half; echo -en "......░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒▒▒░▒▒▒▒▒ ░░░░░░░░▒▒▒▒▒▒ ▒ ....."; pad $half true - pad $half; echo -en "......░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒▒░░▒░▒▒▒▒▒▒ ▒░░░░░░░▒▒▒▒▒▒ ▒ ....."; pad $half true -else - if [[ $1 == "--color" || $1 == "-c" || $1 == "color" ]]; then - pad $half; echo -en "\e[0;37m..\e[0;36m░░░░░░░░░░░░░░░░░░░░░░░░░░░░░\e[0;34m▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ \e[0;37m.."; pad $half true - pad $half; echo -en "\e[0;37m.\e[0;36m░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░\e[0;34m▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ \e[0;37m.."; pad $half true - pad $half; echo -en "\e[0;37m.\e[0;36m░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░\e[0;34m▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ \e[0;37m.."; pad $half true - pad $half; echo -en "\e[0;37m.\e[0;36m░░░░░░░░░░░░░░░░░░░░░░░░░░░\e[0;34m▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ \e[0;37m.."; pad $half true - pad $half; echo -en "\e[0;37m.\e[0;36m░░░░░░░░░░░░░░░░░░░░░░░░\e[0;34m▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ \e[0;37m.."; pad $half true - pad $half; echo -en "\e[0;37m.\e[0;36m░░░░░░░░░░░░░░░░░░░░\e[0;34m▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒\e[0;36m░░░░░░░░\e[0;34m▒▒▒▒▒▒ \e[0;37m.."; pad $half true - pad $half; echo -en "\e[0;37m.\e[0;36m░░░░░░░░░░░░░░░░░░\e[0;34m▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒\e[0;36m░░\e[0;34m▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒\e[0;36m░░░░░░░░\e[0;34m▒▒▒▒▒▒▒ \e[0;37m.."; pad $half true - pad $half; echo -en "\e[0;37m.\e[0;36m░░░░░░░░░░░░░░░░\e[0;34m▒▒▒▒ ▒▒▒▒▒▒▒▒\e[0;36m░░░░░\e[0;34m▒▒▒▒▒▒▒▒▒▒▒▒▒\e[0;36m░░░░\e[0;34m▒▒▒▒▒▒▒▒▒ \e[0;37m.."; pad $half true - pad $half; echo -en "\e[0;37m.\e[0;36m░░░░░░░░░░░░░░\e[0;34m▒▒▒▒ ▒▒▒▒▒\e[0;36m░░░░\e[0;34m▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ \e[0;37m.."; pad $half true - pad $half; echo -en "\e[0;37m.\e[0;36m░░░░░░░░░░░░░\e[0;34m▒▒▒ ▒▒▒▒\e[0;36m░░\e[0;34m▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ \e[0;37m.."; pad $half true - pad $half; echo -en "\e[0;37m.\e[0;36m░░░░░░░░░░░░\e[0;34m▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ \e[0;37m.."; pad $half true - pad $half; echo -en "\e[0;37m.\e[0;36m░░░░░░░░░░░ \e[0;33m░░░░░░░░░░░░░ ░░░░░░░░░░░░ \e[0;34m▒ \e[0;37m.."; pad $half true - pad $half; echo -en "\e[0;37m.\e[0;36m░░░░░░░░░░ \e[0;34m▒ \e[0;33m░░░▓▓▓▓▓▓▓▓▓▓▓▓░░ ░░░░░░░░░░░░░░░ ░ \e[0;37m.."; pad $half true - pad $half; echo -en "\e[0;37m.\e[0;36m░░░░░░░░░░ \e[0;33m░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░ ░░░░░░░░░░░░░░░░░░░ \e[0;37m.."; pad $half true - pad $half; echo -en "\e[0;37m.\e[0;36m░░░░░░░░░ \e[0;34m▒ \e[0;33m░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░ ░░▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░ ░ \e[0;34m▒ \e[0;37m.."; pad $half true - pad $half; echo -en "\e[0;37m.\e[0;36m░░░░░░░░ ░ \e[0;33m░░░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░░ ░ \e[0;34m▒ \e[0;37m.."; pad $half true - pad $half; echo -en "\e[0;37m.\e[0;36m░░░░░░░░ ░ \e[0;33m░░░░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░ ░ \e[0;34m▒ \e[0;37m.."; pad $half true - pad $half; echo -en "\e[0;37m.\e[0;36m░░░░░░░░░\e[0;34m▒ \e[0;33m░ ░ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░▓▓▓▓▓▓▓▓▓▓▓░ ░ \e[0;37m.."; pad $half true - pad $half; echo -en "\e[0;37m\e[0;36m░░░░░░░░░░ \e[0;33m░░░ ░ ▓▓▓▓▓▓▓▓░▓▓▓▓░░░▓░░░░░░▓▓▓▓▓ ░ ░ \e[0;34m▒ \e[0;37m."; pad $half true - pad $half; echo -en "\e[0;37m\e[0;36m░░░░░░░░\e[0;34m▒▒ \e[0;33m░░░░░ ░ ▓▓▓▓▓▓░▓▓▓▓░░▓▓▓░░░░░░▓▓ ░ ░ ░ \e[0;34m▒ \e[0;37m."; pad $half true - pad $half; echo -en "\e[0;37m\e[0;36m░░░░░░░░\e[0;34m▒ \e[0;33m░░░░░░░░░ ░ ░▓░░▓▓▓▓▓░▓▓▓░░░░░ ░ ░░ ░░ ░ \e[0;34m▒ \e[0;37m."; pad $half true - pad $half; echo -en "\e[0;37m\e[0;36m░░░░░░░\e[0;34m▒▒ \e[0;33m░░░░░░░ ░░ ▓▓▓▓▓▓▓▓▓░░ ░░ ░ ░░ ░ \e[0;34m▒ \e[0;37m."; pad $half true - pad $half; echo -en "\e[0;37m\e[0;36m░░░░░░░\e[0;34m▒▒ \e[0;33m░░░░░░░░░░ ░▓▓▓▓▓▓▓░░░ ░░░ ░ ░ ░ \e[0;34m▒ \e[0;37m."; pad $half true - pad $half; echo -en "\e[0;37m\e[0;36m░░░░░░░ \e[0;34m▒ \e[0;33m░░░░░░ ░░░▓▓▓░▓░░░░ ░ ░ ░░ ░ \e[0;34m▒ \e[0;37m."; pad $half true - pad $half; echo -en "\e[0;37m\e[0;36m░░░░░░░ \e[0;34m▒ \e[0;33m░░░░░░░ \e[0;39m▓▓ ▓ \e[0;33m░░ ░░░░░░░░░░░░░ ░ ░░ \e[0;39m▓ █▓ \e[0;33m░ ░ ░ \e[0;34m▒▒ \e[0;37m.."; pad $half true - pad $half; echo -en "\e[0;37m.\e[0;36m░░░░░\e[0;34m▒ ▒ \e[0;33m░░░░░░░░ \e[0;39m▓▓██ \e[0;36m▓ ██ \e[0;39m██▓ \e[0;33m▓ ░░░▓░ ░ ░ ░░░░ ▓ \e[0;39m██ \e[0;36m▓█ ▓\e[0;39m ██▓▓ \e[0;33m░░░░ ░ ░ \e[0;34m▒ \e[0;37m.."; pad $half true - pad $half; echo -en "\e[0;37m.\e[0;36m░░░░░\e[0;34m▒ ▒▒ \e[0;33m░░░░░░░░░ \e[0;39m▓██ \e[0;36m▓▓ ▓ \e[0;39m██▓ \e[0;33m▓░░░░▓▓░ ░░░░░░░░ ▓ \e[0;39m▓██ \e[0;36m▓ ▓\e[0;39m ██▓▓ \e[0;33m░░░░░░░ ░ \e[0;34m▒ \e[0;37m.."; pad $half true - pad $half; echo -en "\e[0;37m.\e[0;36m░░░░░ \e[0;34m▒\e[0;36m░ \e[0;33m░░░░░░░▓░░ \e[0;39m▓███ \e[0;36m▓▓▓▓ \e[0;39m███░ \e[0;33m░░░░▓▓░░░░░░░░░░ \e[0;39m░▓██ \e[0;36m▓▓▓ \e[0;39m███▓ \e[0;33m░░▓▓░░ ░ \e[0;34m▒ ▒ \e[0;37m.."; pad $half true - pad $half; echo -en "\e[0;37m..\e[0;36m░░░░ \e[0;34m▒\e[0;36m░ \e[0;33m░░░░▓▓▓▓▓▓░ \e[0;39m███ ██ \e[0;33m░░░░░▓▓▓▓▓░░░░░░░ \e[0;39m███ ████ \e[0;33m░░▓▓▓▓░░ ░ \e[0;34m▒ ▒ \e[0;37m.."; pad $half true - pad $half; echo -en "\e[0;37m..\e[0;36m░░░░ \e[0;34m▒ \e[0;36m░\e[0;34m▒ \e[0;33m░░▓▓▓▓▓▓▓▓▓▓ \e[0;39m██████ \e[0;33m▓▓▓░░ ░░░░▓▓▓▓▓▓░░░░░░░░░▓▓▓ \e[0;39m█████ \e[0;33m▓▓▓▓▓▓▓░░░░ \e[0;34m▒▒ ▒ \e[0;37m.."; pad $half true - pad $half; echo -en "\e[0;37m..\e[0;36m░░░░ ░ ░░ \e[0;33m░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█░░░░░░░▓▓▓▓▓▓▓░░░░ ░░ ░░▓░▓▓░░░░░░░▓▓▓▓▓▓░░ \e[0;34m▒▒ ▒ \e[0;37m.."; pad $half true - pad $half; echo -en "\e[0;37m..\e[0;36m░░░░ ░ ░░ \e[0;33m░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██ ░░░░░░░▓▓▓▓▓▓▓░░░░ ░░░░░ ░░░░░░░░░▓▓▓▓▓░░ ░ \e[0;34m▒▒ ▒ \e[0;37m.."; pad $half true - pad $half; echo -en "\e[0;37m..\e[0;36m░░░░\e[0;34m▒\e[0;36m░░\e[0;34m▒\e[0;36m░░ \e[0;33m░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░▓▓▓▓▓▓▓▓░░░ ░░░░░░░░░░░░░░░░░░▓▓░░░░ \e[0;34m▒▒ ▒ \e[0;37m..."; pad $half true - pad $half; echo -en "\e[0;37m..\e[0;36m░░░░\e[0;34m▒\e[0;36m░░ ░░ \e[0;33m░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░▓▓▓▓▓▓▓▓▓░░░░ ░░░░░░░░░░░░░░░░░░░░░ \e[0;34m▒▒ ▒ \e[0;37m..."; pad $half true - pad $half; echo -en "\e[0;37m..\e[0;36m░░░░░░░ \e[0;34m▒\e[0;36m░\e[0;34m▒ \e[0;33m░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░▓▓▓░░ ░░░░░ ░░░░░░░░░░░░░░░░░░░░ \e[0;34m▒ ▒ \e[0;37m..."; pad $half true - pad $half; echo -en "\e[0;37m..\e[0;36m░░░░░░░░░░░ \e[0;33m░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ░ ░░░░░░░░░░░░░░░ \e[0;34m▒ ▒ \e[0;37m..."; pad $half true - pad $half; echo -en "\e[0;37m...\e[0;36m░░░░░░░░░░░\e[0;34m▒ ▒▒ \e[0;33m▓▓▓▓▓▓▓▓▓▓▓▓▓ \e[0;36m░░░░░░░░░░\e[0;34m▒▒ ▒▒▒▒▒ \e[0;34m▒ ▒ \e[0;37m...."; pad $half true - pad $half; echo -en "\e[0;37m...\e[0;36m░░░░░░░░░░ ░\e[0;34m▒ ▒▒▒\e[0;36m░░░ \e[0;33m▓▓▓▓▓▓ \e[0;36m░░░░░░░░░░░░░\e[0;34m▒▒▒ ▒▒▒▒▒\e[0;36m░░░░\e[0;34m▒▒ ▒▒▒▒▒▒▒ ▒▒ ▒ \e[0;37m...."; pad $half true - pad $half; echo -en "\e[0;37m...\e[0;36m░░░░░░░░░░ ░░░ \e[0;34m▒▒▒\e[0;36m░░░░░░ ░░░░░ ░░░░░░░░░░\e[0;34m▒\e[0;36m░\e[0;34m▒ ▒▒▒▒▒▒\e[0;36m░░░░░░\e[0;34m▒▒▒▒▒\e[0;36m░\e[0;34m▒▒▒▒ ▒▒ \e[0;37m...."; pad $half true - pad $half; echo -en "\e[0;37m....\e[0;36m░░░░░░░░░░ ░░░░░ \e[0;34m▒▒\e[0;36m░░░░░░░░░░░░░░ ░░░░░░░░░ \e[0;34m▒\e[0;36m░\e[0;34m▒▒ ▒▒▒▒▒\e[0;36m░░░░\e[0;34m▒▒▒▒▒▒\e[0;36m░░\e[0;34m▒▒▒ ▒▒▒ \e[0;37m....."; pad $half true - pad $half; echo -en "\e[0;37m....\e[0;36m░░░░░░░░░░░░░░░░░░ \e[0;34m▒\e[0;36m░░░░░░░░░░░ ░░░░░░░░░░░░░░ \e[0;34m▒ ▒▒▒▒▒▒▒\e[0;36m░\e[0;34m▒▒▒▒▒▒\e[0;36m░░░░\e[0;34m▒▒▒ ▒▒ \e[0;37m....."; pad $half true - pad $half; echo -en "\e[0;37m....\e[0;36m░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ \e[0;34m▒▒▒▒▒▒▒ \e[0;34m▒ \e[0;36m░░░\e[0;34m▒▒▒▒ ▒▒▒ \e[0;37m....."; pad $half true - pad $half; echo -en "\e[0;37m.....\e[0;36m░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ \e[0;34m▒\e[0;36m░\e[0;34m▒▒▒ ▒▒▒ ▒\e[0;36m░░░░░░░░░░\e[0;34m▒ ▒▒▒▒ ▒ \e[0;37m......"; pad $half true - pad $half; echo -en "\e[0;37m.....\e[0;36m░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░\e[0;34m▒ \e[0;36m░░\e[0;34m▒▒▒▒▒▒\e[0;36m░░░░░░░░░░░░░\e[0;34m▒ \e[0;36m░\e[0;34m▒▒▒▒ ▒ \e[0;37m......"; pad $half true - pad $half; echo -en "\e[0;37m.....\e[0;36m░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░\e[0;34m▒ ▒▒\e[0;36m░\e[0;34m▒▒▒▒▒▒▒\e[0;36m░░░░░░░░░░ ░░\e[0;34m▒▒▒▒▒ \e[0;34m▒ \e[0;37m......"; pad $half true - pad $half; echo -en "\e[0;37m.....\e[0;36m░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░\e[0;34m▒▒ \e[0;36m░\e[0;34m▒▒▒▒▒▒▒▒▒\e[0;36m░░\e[0;34m▒\e[0;36m░░░░░░ ░░\e[0;34m▒▒▒▒▒▒ ▒ \e[0;37m......"; pad $half true - pad $half; echo -en "\e[0;37m......\e[0;36m░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░\e[0;34m▒▒\e[0;36m░░\e[0;34m▒\e[0;36m░\e[0;34m▒▒▒ ▒▒▒▒▒\e[0;36m░░░░░░░░░\e[0;34m▒▒▒▒▒ ▒ \e[0;37m......"; pad $half true - pad $half; echo -en "\e[0;37m......\e[0;36m░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░\e[0;34m▒▒▒▒\e[0;36m░\e[0;34m▒▒▒▒▒ \e[0;36m░░░░░░░░\e[0;34m▒▒▒▒▒▒ ▒ \e[0;37m......"; pad $half true - pad $half; echo -en "\e[0;37m......\e[0;36m░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░\e[0;34m▒▒▒\e[0;36m░░\e[0;34m▒\e[0;36m░\e[0;34m▒▒▒▒▒▒ ▒\e[0;36m░░░░░░░\e[0;34m▒▒▒▒▒▒ ▒ \e[0;37m......"; pad $half true - elif [[ $1 = '--version' || $1 = '-v' || $1 == "version" ]]; then - echo "ryu version 1.0.0" - echo "xero / syntax-samurai " - echo " ▟▙" - echo "▟▒░░░░░░░▜▙▜████████████████████████████████▛" - echo "▜▒░░░░░░░▟▛▟▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▛" - echo " ▜▛" - echo "this program is free software, and distributed under the Creative Commons " - echo "Attribution-ShareAlike 3.0 Unported License (CC BY-SA 3.0)" - echo "http://creativecommons.org/licenses/by-sa/3.0/" - exit - elif [[ $1 = '--help' || $1 = '-h' || $1 == "help" ]]; then - echo "" - echo " s y n t a x . s a m u r a i" - echo " p r e s e n t s" - echo "" - echo " ███████ ██ ██ ██ ██" - echo " ░██░░░░██ ░░██ ██ ░██ ░██" - echo " ░██ ░██ ░░████ ░██ ░██" - echo " ░███████ ░░██ ░██ ░██" - echo " ░██░░░██ ░██ ░██ ░██" - echo " ░██ ░░██ ░██ ░██ ░██" - echo " ░██ ░░██ ░██ ░░███████" - echo " ░░ ░░ ░░ ░░░░░░░" - echo "" - echo " usage: ryu [option]" - echo "" - echo " ansi art of ryu hayabusa from ninja gaiden" - echo "" - echo " --help, -h : display this message" - echo " --version, -v : display version and license" - echo " --grey, -g : display the art [default]" - echo " --color, -c : display the art in color" - echo "" - echo " ▟▙" - echo "▟▒░░░░░░░▜▙▜████████████████████████████████▛" - echo "▜▒░░░░░░░▟▛▟▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▛" - echo " ▜▛" - echo "" - echo " author: xero harrison > http://xero.nu" - echo " homepage: http://git.io/ryu" - echo " crew: http://github.com/syntax-samurai" - echo "" - exit - else - echo "unknown option" - echo "call 'ryu --help' for more info" - exit - fi -fi -exit \ No newline at end of file diff --git a/fun/code/fun/screenfetch b/fun/code/fun/screenfetch deleted file mode 100755 index 70fc4d8..0000000 --- a/fun/code/fun/screenfetch +++ /dev/null @@ -1,1378 +0,0 @@ -#!/bin/bash -# -# screenFetch (v2.4.0) -# -# Script to fetch system and theme settings for screenshots in most mainstream -# Linux distributions. -# -# This script is released under the General Public License (GPL). Though it's open -# source and you are free to do with it as you please, I would appreciate if you would -# send any code modifications/additions upstream to me so that I can include them in -# the official release. Please do not claim this code as your own as I have worked -# very hard on this and am quite proud to call this script my own. -# -# 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 my IRC network, SilverIRC, at irc://kittykatt.silverirc.com:6667/meowz -# to put forth suggestions/ideas. Thank you. -# - -scriptVersion="2.4.0" - -###################### -# Settings for fetcher -###################### - -# This setting controls what ASCII logo is displayed. Available: Arch Linux (Old and Current Logos), Linux Mint, Ubuntu, Crunchbang, Debian, Gentoo, Mandrake/Mandriva, Slackware, SUSE, Fedora, BSD, and None -# 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="host distro kernel uptime shell res de wm wmtheme gtk icons font background" -display=( host distro kernel uptime pkgs shell res de wm wmtheme gtk cpu mem ) -# Display Type: ASCII or Text -display_type="ASCII" - -# 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 xmonad musca i3 ratpoison scrotwm wmfs wmii beryl subtle e16 enlightenment sawfish emerald monsterwm dminiwm" -denames="gnome-session xfce-mcs-manage xfce4-session xfconfd ksmserver lxsession gnome-settings-daemon mate-session mate-settings-daemon" - -# Export theme settings -# screenFetch has the capability (on some WM's and GTK) to export your GTK and WM settings to an archive. Specify Yes if you want this and No if you do not. -exportTheme= - -# Screenshot Settings -# This setting lets the script know if you want to take a screenshot or not. 1=Yes 0=No -screenshot= -# 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" -hostshot= -baseurl="http://www.example.com" -serveraddr="www.example.com" -scptimeout="20" -serverdir="/path/to/directory" -shotfile=$(echo "screenFetch-`date +'%Y-%m-%d_%H-%M-%S'`.png") - -# Verbose Setting - Set to 1 for verbose output. -verbosity= - -verboseOut () { - echo -e "\e[1;31m:: \e[0m$1" -} - -errorOut () { - echo -e "\e[1;37m[[ \e[1;31m! \e[1;37m]] \e[0m$1" -} - -############################################# -#### CODE No need to edit past here CODE #### -############################################# - -#################### -# Static Variables -#################### -c0="\e[0m" # Reset Text -bold="\e[1m" # Bold Text -underline="\e[4m" # Underline Text -display_index=0 - -##################### -# Begin Flags Phase -##################### - -while getopts ":hsmevVntlc:D:o:B" flags; do - case $flags in - h) - echo -e "${underline}Usage${c0}:" - echo -e " screenFetch [OPTIONAL FLAGS]" - echo "" - echo "screenFetch - a CLI Bash script to show system/theme info in screenshots." - echo "" - echo -e "${underline}Supported Distributions${c0}: Arch Linux (Old and Current Logos), Linux Mint," - echo -e " LMDE, Ubuntu, Crunchbang, Debian, Gentoo, Fedora, SolusOS," - echo -e " Mandrake/Mandriva, Slackware, Frugalware, openSUSE, Mageia," - echo -e " Peppermint, and BSD" - echo -e "${underline}Supported Desktop Managers${c0}: KDE, GNOME, XFCE, and LXDE, and Not Present" - echo -e "${underline}Supported Window Managers${c0}: PekWM, OpenBox, FluxBox, BlackBox, Xfwm4," - echo -e " Metacity, StumpWM, KWin, IceWM, FVWM," - echo -e " DWM, Awesome, XMonad, Musca, i3, WindowMaker," - echo -e " Ratpoison, wmii, WMFS, ScrotWM, subtle," - echo -e " Emerald, E17 and Beryl." - echo "" - echo -e "${underline}Options${c0}:" - echo -e " ${bold}-v${c0} Verbose output." - echo -e " ${bold}-o 'OPTIONS'${c0} Allows for setting script variables on the" - echo -e " command line. Must be in the following format..." - echo -e " 'OPTION1=\"OPTIONARG1\";OPTION2=\"OPTIONARG2\"'" - #echo -e " ${bold}-d 'ARGUMENTS'${c0} Allows for setting what information is displayed" - #echo -e " on the command line. Format must be as follows:" - #echo -e " 'OPTION OPTION OPTION OPTION'. Valid options are" - #echo -e " host, distro, Kernel, Uptime, Shell, Resolution, DE, WM," - #echo -e " Win_theme, Theme, Icons, Font, ASCII, Background." - echo -e " ${bold}-n${c0} Do no display ASCII distribution logo." - echo -e " ${bold}-t${c0} Truncate output based on terminal width (Experimental!)." - echo -e " ${bold}-s(m)${c0} Using this flag tells the script that you want it" - echo -e " to take a screenshot. Use the -m flag if you would like" - echo -e " to move it to a new location afterwards." - echo -e " ${bold}-B${c0} Enable background detection." - echo -e " ${bold}-e${c0} When this flag is specified, screenFetch will attempt" - echo -e " to export all of your theme settings and archive them" - echo -e " up for uploading." - echo -e " ${bold}-l${c0} Specify that you have a light background. This turns" - echo -e " all white text into dark gray text (in ascii logos and" - echo -e " in information output)." - echo -e " ${bold}-c 'COMMAND'${c0} Here you can specify a custom screenshot command for" - echo -e " the script to execute. Surrounding quotes are required." - echo -e " ${bold}-D 'DISTRO'${c0} Here you can specify your distribution for the script" - echo -e " to use. Surrounding quotes are required." - echo -e " ${bold}-V${c0} Display current script version." - echo -e " ${bold}-h${c0} Display this help." - exit - ;; - s) screenshot=1; continue;; - m) hostshot=1; continue;; - e) exportTheme=1; continue;; - v) verbosity=1; continue;; - V) - echo -e $underline"screenFetch"$c0" - Version $scriptVersion" - echo "Copyright (C) Brett Bohnenkamper (kittykatt@silverirc.com)" - echo "" - echo "This is free software; see the source for copying conditions. There is NO warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - exit - ;; - D) distro=$OPTARG; continue;; - t) truncateSet="Yes";; - c) screenCommand=$OPTARG; continue;; - n) display_type="Text";; - o) overrideOpts=$OPTARG; continue;; - # d) overrideDisplay=$OPTARG; continue;; - l) c1="\e[1;30m";; - # B) background_detect="1"; continue;; - :) errorOut "Error: You're missing an argument somewhere. Exiting."; exit;; - ?) errorOut "Error: Invalid flag somewhere. Exiting."; exit;; - *) errorOut "Error"; exit;; - esac -done - -################### -# End Flags Phase -################### - - -#################### -# Override Options -#################### - -if [[ "$overrideOpts" ]]; then - [[ "$verbosity" -eq "1" ]] && 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 -#if [[ "$overrideDisplay" ]]; then -# [[ "$verbosity" -eq "1" ]] && verboseOut "Found 'd' flag in syntax. Overriding some display options..." -# display="$overrideDisplay" -#fi - - -######################### -# Begin Detection Phase -######################### - - -# Host and User detection - Begin -detecthost () { - myUser=$(echo "$USER") - myHost=$(hostname) - [[ "$verbosity" -eq "1" ]] && verboseOut "Finding hostname and user...found as '$myUser@$myHost'" -} - - -######################### -# Begin Detection Phase -######################### - - -# Host and User detection - Begin -detecthost () { - myUser=$(echo "$USER") - # net-tools is becoming deprecated - # myHost=$(hostname) - myHost=$(cat /proc/sys/kernel/hostname) - [[ "$verbosity" -eq "1" ]] && verboseOut "Finding hostname and user...found as '$myUser@$myHost'" -} - -# Distro Detection - Begin -detectdistro () { - if [[ -z $distro ]]; then - distro="Unknown" - # LSB Release Check - if which lsb_release >/dev/null 2>&1; then - distro_detect=$(lsb_release -i | sed -e 's/Distributor ID://' -e 's/\t//g') - if [ "$distro_detect" == "Arch" ]; then distro="Arch Linux"; fi - if [ "$distro_detect" == "Debian" ]; then distro="CrunchBang"; fi - if [ "$distro_detect" == "SolusOS" ]; then - distro="SolusOS" - distro_codename=null - distro_release=null - fi - if [ "$distro_detect" == "LinuxMint" ]; then distro="Mint" - if [ "$(lsb_release -c | sed -e 's/Codename://' -e 's/\t//g')" == "debian" ]; then - distro="LMDE" - distro_codename=null - distro_release=null - fi - fi - if [ "$distro_detect" == "Mageia" ]; then distro="Mageia"; fi - if [ "$distro_detect" == "MandrivaLinux" ]; then distro="Mandriva" - if [ "$(lsb_release -c | sed -e 's/Codename://' -e 's/\t//g')" == "turtle" ]; then - distro="Mandriva"-lsb_release | sed -e 's/Release://' -e 's/\t//g' - distro_codename=null - fi - if [ "$(lsb_release -c | sed -e 's/Codename://' -e 's/\t//g')" == "Henry_Farman" ]; then - distro="Mandriva"-lsb_release | sed -e 's/Release://' -e 's/\t//g' - distro_codename=null - fi - if [ "$(lsb_release -c | sed -e 's/Codename://' -e 's/\t//g')" == "Farman" ]; then - distro="Mandriva"-lsb_release | sed -e 's/Release://' -e 's/\t//g' - distro_codename=null - fi - if [ "$(lsb_release -c | sed -e 's/Codename://' -e 's/\t//g')" == "Adelie" ]; then - distro="Mandriva"-lsb_release | sed -e 's/Release://' -e 's/\t//g' - distro_codename=null - fi - if [ "$(lsb_release -c | sed -e 's/Codename://' -e 's/\t//g')" == "pauillac" ]; then - distro="Mandriva"-lsb_release | sed -e 's/Release://' -e 's/\t//g' - distro_codename=null - fi - fi - if [ "$distro_detect" == "Fedora" ]; then distro="Fedora"; fi - if [ "$distro_detect" == "CrunchBang" ]; then distro="CrunchBang"; fi - if [ "$distro_detect" == "Ubuntu" ]; then distro="Ubuntu"; fi - if [ "$distro_detect" == "frugalware" ]; then - distro="Frugalware" - distro_codename=null - distro_release=null - fi - if [ "$distro_detect" == "Peppermint" ]; then - distro="Peppermint" - distro_codename=null - fi - if [ "$distro_detect" == "SUSE LINUX" ]; then distro="openSUSE"; fi - if [[ $(lsb_release -r | sed -e 's/Release://' -e 's/\t//g') != "n/a" ]] && [[ ! $distro_release ]]; then distro_release=$(lsb_release -r | sed -e 's/Release://' -e 's/\t//g') && distro_more="$distro $distro_release"; fi - if [[ $(lsb_release -c | sed -e 's/Codename://' -e 's/\t//g') != "n/a" ]] && [[ ! $distro_codename ]]; then distro_codename=$(lsb_release -c | sed -e 's/Codename://' -e 's/\t//g') && distro_more="$distro $distro_codename"; fi - # Check and Parsing for /etc/os-release - elif [ -f /etc/os-release ]; then - distrib_id=$(awk -F'=' '/^ID/{print $2}' /etc/os-release 2>/dev/null) - if [ "$distrib_id" == "frugalware" ]; then distro="Frugalware"; fi - # Existing File Check - else - if [ -f /etc/debian_version ]; then distro="CrunchBang"; fi - if grep -i ubuntu /etc/lsb-release >/dev/null 2>&1; then distro="Ubuntu"; fi - if grep -i SolusOS /etc/issue >/dev/null 2>&1; then distro="SolusOS"; fi - if grep -i mint /etc/lsb-release >/dev/null 2>&1; then - if grep -i debian /etc/lsb-release >/dev/null 2>&1; then distro="LMDE" - else distro="Mint"; fi - fi - if [ -f /etc/arch-release ]; then distro="Arch Linux"; fi - if [ -f /etc/fedora-release ]; then distro="Fedora"; fi - if [ -f /etc/redhat-release ]; then distro="Red Hat Linux"; fi - if [ -f /etc/slackware-version ]; then distro="Slackware"; fi - if [ -f /etc/SuSE-release ]; then distro="openSUSE"; fi - if [ -f /etc/mageia-release ]; then distro="Mageia"; fi - if [ -f /etc/mandrake-release ]; then distro="Mandrake"; fi - if [ -f /etc/mandriva-release ]; then distro="Mandriva"; fi - if [ -f /etc/crunchbang-lsb-release ]; then distro="CrunchBang"; fi - if [ -f /etc/gentoo-release ]; then distro="Gentoo"; fi - if [ -f /var/run/dmesg.boot ] && grep -i bsd /var/run/dmesg.boot; then distro="BSD"; fi - if [ -f /usr/share/doc/tc/release.txt ]; then distro="TinyCore"; fi - if [ -f /etc/frugalware-release ]; then distro="Frugalware"; fi - if grep -q "SolusOS" /etc/issue; then distro="SolusOS"; fi - fi - else - - declare -l lcase - lcase=$distro - - case $lcase in - - arch*linux*old) distro="Arch Linux - Old" ;; - arch*linux) distro="Arch Linux" ;; - fedora) distro="Fedora" ;; - mageia) distro="Mageia" ;; - mandriva) distro="Mandriva" ;; - mandrake) distro="Mandrake" ;; - crunchbang) distro="CrunchBang" ;; - mint) distro="Mint" ;; - lmde) distro="LMDE" ;; - opensuse) distro="openSUSE" ;; - ubuntu) distro="Ubuntu" ;; - debain) distro="CrunchBang" ;; - bsd) distro="BSD" ;; - red*hat*) distro="Red Hat Linux" ;; - crunchbang) distro="CrunchBang" ;; - gentoo) distro="Gentoo" ;; - slackware) distro="Slackware" ;; - frugalware) distro="Frugalware" ;; - peppermint) distro="Peppermint" ;; - - esac - - fi - - [[ "$verbosity" -eq "1" ]] && verboseOut "Finding distro...found as '$distro $distro_release'" -} -# Distro Detection - End - -# Find Number of Running Processes -# processnum="$(( $( ps aux | wc -l ) - 1 ))" - -# Kernel Version Detection - Begin -detectkernel () { - kernel=`uname -r` - [[ "$verbosity" -eq "1" ]] && verboseOut "Finding kernel version...found as '$kernel'" -} -# Kernel Version Detection - End - - -# Uptime Detection - Begin -detectuptime () { - uptime=`awk -F. '{print $1}' /proc/uptime` - secs=$((${uptime}%60)) - mins=$((${uptime}/60%60)) - hours=$((${uptime}/3600%24)) - days=$((${uptime}/86400)) - uptime="${mins}m" - if [ "${hours}" -ne "0" ]; then - uptime="${hours}h ${uptime}" - fi - if [ "${days}" -ne "0" ]; then - uptime="${days}d ${uptime}" - fi - [[ "$verbosity" -eq "1" ]] && verboseOut "Finding current uptime...found as '$uptime'" -} -# Uptime Detection - End - - -# Package Count - Begin -detectpkgs () { - case $distro in - 'Arch Linux') pkgs=$(pacman -Qq | wc -l) ;; - 'Frugalware') pkgs=$(pacman-g2 -Qq | wc -l) ;; - 'Ubuntu'|'Mint'|'SolusOS'|'Debian'|'LMDE'|'CrunchBang'|'Peppermint') pkgs=$(dpkg --get-selections | wc -l) ;; - 'Slackware') pkgs=$(ls -1 /var/log/packages | wc -l) ;; - 'Gentoo') pkgs=$(ls -d /var/db/pkg/*/* | wc -l) ;; - 'Fedora'|'openSUSE'|'Red Hat Linux'|'Mandriva'|'Mandrake'|'Mageia') pkgs=$(rpm -qa | wc -l) ;; - esac - [[ "$verbosity" -eq "1" ]] && verboseOut "Finding current package count...found as '$pkgs'" -} - - - - -# CPU Detection - Begin -detectcpu () { - cpu=$(awk -F':' '/model name/{ print $2 }' /proc/cpuinfo | head -n 1 | tr -s " " | sed 's/^ //') - find='(R) Core(TM)' - replace='' - cpu=${cpu/$find/$replace} - # cpu_mhz=$(awk -F':' '/cpu MHz/{ print $2 }' /proc/cpuinfo | head -n 1) - # cpu_ghz=$(echo "scale=2; ${cpu_mhz} / 1000" | bc ) - [[ "$verbosity" -eq "1" ]] && verboseOut "Finding current CPU...found as '$cpu'" -} -# CPU Detection - End - - - -# Memory Detection - Begin -detectmem () { - total_mem=$(awk '/MemTotal/ { print $2 }' /proc/meminfo) - totalmem=$((${total_mem}/1024)) - if free | grep -q '/cache'; then - used_mem=$(free | awk '/cache:/ { print $3 }') - usedmem=$((${used_mem}/1024)) - else - free_mem=$(awk '/MemFree/ { print $2 }' /proc/meminfo) - used_mem=$((${total_mem} - ${free_mem})) - usedmem=$((${used_mem}/1024)) - fi - mem="${usedmem}MB / ${totalmem}MB" - [[ "$verbosity" -eq "1" ]] && verboseOut "Finding current RAM usage...found as '$mem'" -} -# Memory Detection - End - - -# Shell Detection - Begin -detectshell () { - myShell=$(echo $SHELL | awk -F"/" '{print $NF}') - [[ "$verbosity" -eq "1" ]] && verboseOut "Finding current shell...found as '$myShell'" -} -# Shell Detection - End - - -# Resolution Detection - Begin -detectres () { - if [[ -n $DISPLAY ]]; then - xResolution=$(xdpyinfo | sed -n 's/.*dim.* \([0-9]*x[0-9]*\) .*/\1/pg' | sed ':a;N;$!ba;s/\n/ /g') - else - xResolution="No X Server" - fi - [[ "$verbosity" -eq "1" ]] && verboseOut "Finding current resolution(s)...found as '$xResolution'" -} -# Resolution Detection - End - - -# DE Detection - Begin -detectde () { - DE="Not Present" - for each in $denames; do - if [[ `ps aux` =~ "$each" ]]; then - [ "$each" == "gnome-session" -o "$each" == "gnome-settings-daemon" ] && DE="GNOME" && DEver=$(gnome-session --version | awk {'print $NF'}) - [ "$each" == "mate-session" -o "$each" == "mate-settings-daemon" ] && DE="MATE" && DEver=$(mate-session --version | awk {'print $NF'}) - [ "$each" == "xfce4-session" ] && DE="XFCE" && DEver=$(xfce4-settings-manager --version | grep -m 1 "" | awk {'print $2'}) - [ "$each" == "ksmserver" ] && DE="KDE" && DEver=$(kwin --version | awk '/^Qt/ {data="Qt v" $2};/^KDE/ {data=$2 " (" data ")"};END{print data}') - [ "$each" == "lxsession" ] && DE="LXDE" && DEver=$(lxpanel -v) - fi - done - [[ "$verbosity" -eq "1" ]] && verboseOut "Finding desktop environment...found as '$DE'" -} -### DE Detection - End - - -# WM Detection - Begin -detectwm () { -WM="Not Found" - userId="$(id -u ${USER})" - for each in $wmnames; do - PID="$(pgrep -U ${userId} $each)" - if [ "$PID" ]; then - case $each in - 'fluxbox') WM="FluxBox";; - 'openbox') WM="OpenBox";; - 'blackbox') WM="Blackbox";; - 'xfwm4') WM="Xfwm4";; - 'metacity') WM="Metacity";; - 'kwin') WM="KWin";; - 'icewm') WM="IceWM";; - 'pekwm') WM="PekWM";; - 'fvwm') WM="FVWM";; - 'dwm') WM="DWM";; - 'awesome') WM="Awesome";; - 'wmaker') WM="WindowMaker";; - 'stumpwm') WM="StumpWM";; - 'xmonad') WM="XMonad";; - 'musca') WM="Musca";; - 'i3') WM="i3";; - 'ratpoison') WM="Ratpoison";; - 'scrotwm') WM="ScrotWM";; - 'wmfs') WM="WMFS";; - 'wmii') WM="wmii";; - 'subtle') WM="subtle";; - 'e16') WM="E16";; - 'enlightenment') WM="E17";; - 'emerald') WM="Emerald";; - 'sawfish') WM="Sawfish";; - 'beryl') WM="Beryl";; - 'monsterwm') WM="monsterwm";; - 'dminiwm') WM="dminiwm";; - esac - fi - done - [[ "$verbosity" -eq "1" ]] && verboseOut "Finding window manager...found as '$WM'" -} -# WM Detection - End - - -# WM Theme Detection - BEGIN -detectwmtheme () { - Win_theme="Not Found" - case $WM in - 'PekWM') if [ -f $HOME/.pekwm/config ]; then Win_theme="$(awk -F"/" '/Theme/ {gsub(/\"/,""); print $NF}' $HOME/.pekwm/config)"; fi;; - 'OpenBox') - if [ -f ${XDG_CONFIG_HOME:-${HOME}/.config}/openbox/rc.xml ]; then - Win_theme="$(awk -F"[<,>]" '/]" '//dev/null && basename "$a"; done)"; fi;; - 'FVWM') Win_theme="Not Present";; - 'DWM') Win_theme="Not Present";; - '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)"; fi;; - 'WindowMaker') Win_theme="Not Present";; - 'XMonad') Win_theme="Not Present";; - 'Musca') Win_theme="Not Present";; - 'i3') Win_theme="Not Present";; - 'Ratpoison') Win_theme="Not Present";; - 'ScrotWM') Win_theme="Not Present";; - 'WMFS') Win_theme="Not Present";; - 'wmii') Win_theme="Not Present";; - 'subtle') Win_theme="Not Present";; - 'E16') Win_theme="$(awk -F"= " '/theme.name/ {print $2}' $HOME/.e16/e_config--0.0.cfg)";; - #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};; - 'Sawfish') Win_theme="$(awk -F")" '/\(custom-set-typed-variable/{print $2}' $HOME/.sawfish/custom | sed 's/ (quote //')";; - 'Beryl') Win_theme="Not Present";; - 'monsterwm') Win_theme="Not Present";; - 'dminiwm') Win_theme="Not Present";; - esac - [[ "$verbosity" -eq "1" ]] && verboseOut "Finding window manager theme...found as '$Win_theme'" -} -# WM Theme Detection - END - -# GTK Theme\Icon\Font Detection - BEGIN -detectgtk () { - gtkTheme="Not Found" - gtkIcons="Not Found" - gtkFont="Not Found" - case $DE in - 'KDE') # Desktop Environment found as "KDE" - if [ -a $HOME/.kde/share/config/kdeglobals ]; then - if grep -q "widgetStyle=" $HOME/.kde/share/config/kdeglobals; then - gtkTheme=$(awk -F"=" '/widgetStyle=/ {print $2}' $HOME/.kde/share/config/kdeglobals) - elif grep -q "colorScheme=" $HOME/.kde/share/config/kdeglobals; then - gtkTheme=$(awk -F"=" '/colorScheme=/ {print $2}' $HOME/.kde/share/config/kdeglobals) - fi - - if grep -q "Theme=" $HOME/.kde/share/config/kdeglobals; then - gtkIcons=$(awk -F"=" '/Theme=/ {print $2}' $HOME/.kde/share/config/kdeglobals) - fi - - if grep -q "Font=" $HOME/.kde/share/config/kdeglobals; then - gtkFont=$(awk -F"=" '/font=/ {print $2}' $HOME/.kde/share/config/kdeglobals) - fi - fi - ;; - 'GNOME'|'MATE') # Desktop Environment found as "GNOME" - if which gconftool-2 >/dev/null 2>&1; then - gtkTheme=$(gconftool-2 -g /desktop/gnome/interface/gtk_theme) - fi - - if which gconftool-2 >/dev/null 2>&1; then - gtkIcons=$(gconftool-2 -g /desktop/gnome/interface/icon_theme) - fi - - if which gconftool-2 >/dev/null 2>&1; then - gtkFont=$(gconftool-2 -g /desktop/gnome/interface/font_name) - fi - if [ "$background_detect" == "1" ]; then - if which gconftool-2 >/dev/null 2>&1; then - gtkBackgroundFull=$(gconftool-2 -g /desktop/gnome/background/picture_filename) - gtkBackground=$(echo "$gtkBackgroundFull" | awk -F"/" '{print $NF}') - fi - fi - ;; - 'XFCE') # Desktop Environment found as "XFCE" - if which xfconf-query >/dev/null 2>&1; then - gtkTheme=$(xfconf-query -c xsettings -p /Net/ThemeName) - fi - - if which xfconf-query >/dev/null 2>&1; then - gtkIcons=$(xfconf-query -c xsettings -p /Net/IconThemeName) - fi - - if which 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" - else - lxdeconf="/lxsession/LXDE/desktop.conf" - fi - # TODO: Clean me. - if grep -q "sNet\/ThemeName" ${XDG_CONFIG_HOME:-${HOME}/.config}$lxdeconf; then - gtkTheme=$(awk -F'=' '/sNet\/ThemeName/ {print $2}' ${XDG_CONFIG_HOME:-${HOME}/.config}$lxdeconf) - fi - - if grep -q IconThemeName ${XDG_CONFIG_HOME:-${HOME}/.config}$lxdeconf; 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; 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 - gtkTheme=$(awk -F'"' '/gtk-theme/ {print $2}' $HOME/.gtkrc-2.0) - fi - - if grep -q icon-theme $HOME/.gtkrc-2.0; then - gtkIcons=$(awk -F'"' '/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 - gtkTheme=$(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 - # 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} - gtkTheme="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 - ;; - esac - if [[ "$verbosity" -eq "1" ]]; then - verboseOut "Finding GTK theme...found as '$gtkTheme'" - verboseOut "Finding icon theme...found as '$gtkIcons'" - verboseOut "Finding user font...found as '$gtkFont'" - [[ $gtkBackground ]] && verboseOut "Finding background...found as '$gtkBackground'" - fi -} -# GTK Theme\Icon\Font Detection - END - - -####################### -# End Detection Phase -####################### - -takeShot () { - if [[ -z $screenCommand ]]; then - if [[ "$hostshot" == "1" ]]; then - scrot -cd3 "${shotfile}" - if [ -f "${shotfile}" ]; then - [[ "$verbosity" -eq "1" ]] && verboseOut "Screenshot saved at '${shotfile}'" - scp -qo ConnectTimeout="${scptimeout}" "${shotfile}" "${serveraddr}:${serverdir}" - echo -e "${bold}==>${c0} Your screenshot can be viewed at ${baseurl}/$shotfile" - else - verboseOut "ERROR: Problem saving screenshot to ${shotfile}" - fi - else - scrot -cd3 "${shotfile}" - if [ -f "${shotfile}" ]; then - [[ "$verbosity" -eq "1" ]] && verboseOut "Screenshot saved at '${shotfile}'" - else - verboseOut "ERROR: Problem saving screenshot to ${shotfile}" - fi - fi - else - $screenCommand - fi -} - - - -asciiText () { -# Distro logos and ASCII outputs - case $distro in - "Arch Linux - Old") - [ -z $c1 ] && c1="\e[1;37m" # White - c2="\e[1;34m" # Light Blue - 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' '!") - ;; - - "Arch Linux") - [ -z $c1 ] && c1="\e[1;36m" # Light - c2="\e[0;36m" # Dark - 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:" -"${c2} \`++:. \`-/+/" -"${c2} .\` \`/") - ;; - - "Mint") - [ -z $c1 ] && c1="\e[1;37m" # White - c2="\e[1;32m" # Bold Green - startline="0" - fulloutput=("$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") - ;; - - - "LMDE") - [ -z $c1 ] && c1="\e[1;37m" # White - c2="\e[1;32m" # Bold Green - startline="1" - fulloutput=(" "${c1}"\`.-::---.." -"${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} \`--.\`\`") - ;; - - "Ubuntu") - [ -z $c1 ] && c1="\e[1;37m" # White - c2="\e[1;31m" # Light Red - c3="\e[1;33m" # Bold Yellow - startline="1" - fulloutput=("$c2 ./+o+-" -"$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+ $mygtk" -"$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\:" -"$c3 \`oo++.") - ;; - - "Debian") - [ -z $c1 ] && c1="\e[1;37m" # White - c2="\e[1;31m" # Light Red - startline="1" - fulloutput=(" $c1 _,met\$\$\$\$\$gg." -" $c1 ,g\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$P.\t %s" -" $c1 ,g\$\$P\"\" \"\"\"Y\$\$.\".\t%s" -" $c1 ,\$\$P' \`\$\$\$.\t%s" -" $c1',\$\$P ,ggs. \`\$\$b:\t%s" -" $c1\`d\$\$' ,\$P\"\' $c2.$c1 \$\$\$\t%s" -" $c1 \$\$P d\$\' $c2,$c1 \$\$P\t%s" -" $c1 \$\$: \$\$. $c2-$c1 ,d\$\$'\t%s" -" $c1 \$\$\; Y\$b._ _,d\$P'\t%s" -" $c1 Y\$\$. $c2\`.$c1\`\"Y\$\$\$\$P\"'\t\t%s" -" $c1 \`\$\$b $c2\"-.__\t\t%s" -" $c1 \`Y\$\$\t\t\t%s" -" $c1 \`Y\$\$.\t\t\t%s" -" $c1 \`\$\$b.\t\t\t%s" -" $c1 \`Y\$\$b.\t\t\t%s" -" $c1 \`\"Y\$b._\t\t%s" -" $c1 \`\"\"\"\"") - ;; - - "CrunchBang") - [ -z $c1 ] && c1="\e[1;37m" # White - c2="\e[0;34m" # Light Blue - startline="0" - fulloutput=("$c1 ███ ███ ███ %s" -"$c2 ░$c1███ $c2░$c1███ $c2░$c1███ %s" -"$c2 ░$c1███ $c2░$c1███ $c2░$c1███ %s" -"$c1 ████████████████████████████ $c2░$c1███ %s" -"$c2░$c1████████████████████████████ $c2░$c1███ %s" -"$c2░░░░░░░░░$c1███$c2░░░░░░░░$c1███$c2░░░░░ ░$c1███ %s" -"$c2 ░$c1███ $c2░$c1███ $c2░$c1███ %s" -"$c2 ░$c1███ $c2░$c1███ $c2░$c1███ %s" -"$c2 ░$c1███ $c2░$c1███ $c2░$c1███ %s" -"$c1 ████████████████████████████ $c2░$c1███ %s" -"$c2░$c1████████████████████████████ $c2░░░ %s" -"$c2░░░░░░░░░$c1███$c2░░░░░░░░$c1███$c2░░░░░ %s" -"$c2 ░$c1███ $c2░$c1███ $c2░$c1███ %s" -"$c2 ░$c1███ $c2░$c1███ $c2░$c1███ %s" -"$c2 ░░░ ░░░ ░░░ %s") - ;; - - - "Gentoo") - [ -z $c1 ] && c1="\e[1;37m" # White - c2="\e[1;35m" # Light Purple - startline="2" - fulloutput=("$c2 -/oyddmdhs+:." -"$c2 -o"$c1"dNMMMMMMMMNNmhy+"$c2"-\`" -"$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"-\`" -"$c2\`/"$c1"ohdmmddhys+++/:"$c2".\`" -"$c2 \`-//////:--.") - ;; - - "Fedora") - [ -z $c1 ] && c1="\e[1;37m" # White - c2="\e[1;34m" # Light Blue - startline="1" - fulloutput=("$c2 :/------------://" -"$c2 :------------------:// %s" -"$c2 :-----------"$c1"/shhdhyo/"$c2"-:// %s" -"$c2 /-----------"$c1"omMMMNNNMMMd/"$c2"-:/ %s" -"$c2 :-----------"$c1"sMMMdo:/"$c2" -:/ %s" -"$c2 :-----------"$c1":MMMd"$c2"------- --:/ %s" -"$c2 /-----------"$c1":MMMy"$c2"------- ---/ %s" -"$c2 :------ --"$c1"/+MMMh/"$c2"-- ---: %s" -"$c2 :--- "$c1"oNMMMMMMMMMNho"$c2" -----: %s" -"$c2 :-- "$c1"+shhhMMMmhhy++"$c2" ------: %s" -"$c2 :- -----"$c1":MMMy"$c2"--------------/ %s" -"$c2 :- ------"$c1"/MMMy"$c2"-------------: %s" -"$c2 :- ----"$c1"/hMMM+"$c2"------------: %s" -"$c2 :--"$c1":dMMNdhhdNMMNo"$c2"-----------: %s" -"$c2 :---"$c1":sdNMMMMNds:"$c2"----------: %s" -"$c2 :------"$c1":://:"$c2"-----------:// %s" -"$c2 :--------------------://") - ;; - - "BSD") - [ -z $c1 ] && c1="\e[1;37m" # White - c2="\e[1;31m" # Light Red - startline="2" - fulloutput=("$c2 , ," -"$c2 /( )\`" -"$c2 \ \___ / | %s" -"$c2 /- "$c1"_$c2 \`-/ ' %s" -"$c2 ($c1/\/ \ $c2\ /\\ %s" -"$c1 / / |$c2 \` \\ %s" -"$c1 O O )$c2 / | %s" -"$c1 \`-^--'\`$c2< ' %s" -"$c2 (_.) _ ) / %s" -"$c2 \`.___/\` / %s" -"$c2 \`-----' / %s" -"$c1 <----. "$c2"__/ __ \\ %s" -"$c1 <----|===="$c2"O}}}$c1==$c2} \} \/$c1==== %s" -"$c1 <----' $c2\`--' \`.__,' \\ %s" -"$c2 | | %s" -"$c2 \ / /\\ %s" -"$c2 ______( (_ / \______/ %s" -"$c2 ,' ,-----' |" -"$c2 \`--{__________)") - ;; - - "Mandriva"|"Mandrake") - c1="\e[1;34m" # Light Blue - c2="\e[1;33m" # Bold Yellow - startline="0" - fulloutput=("$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") - ;; - - "openSUSE") - c1="\e[1;32m" # Bold Green - c2="\e[1;37m" # Bold White - startline="2" - fulloutput=("$c2 .;ldkO0000Okdl;." -"$c2 .;d00xl:,'....';:ok00d;." -"$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:'.") - ;; - - "Slackware") - [ -z $c1 ] && c1="\e[1;34m" # Light Blue - c2="\e[1;37m" # Bold White - startline="3" - fulloutput=("$c1 :::::::" -"$c1 :::::::::::::::::::" -"$c1 :::::::::::::::::::::::::" -"$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 ::::::::::::::::::::::::::::" -"$c1 ::::::::::::::::::::::" -"$c1 ::::::::::::") - ;; - - "Red Hat Linux") - [ -z $c1 ] && c1="\e[1;37m" # White - c2="\e[1;31m" # Light Red - startline="0" - fulloutput=("$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") - ;; - - "Frugalware") - [ -z $c1 ] && c1="\e[1;37m" # White - c2="\e[1;36m" # Light Blue - startline="5" - fulloutput=("${c2} \`++/::-.\`" -"${c2} /o+++++++++/::-.\`" -"${c2} \`o+++++++++++++++o++/::-.\`" -"${c2} /+++++++++++++++++++++++oo++/:-.\`\`" -"${c2} .o+ooooooooooooooooooosssssssso++oo++/:-\`" -"${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." -"${c2} \`-:/+osyyssssyo" -"${c2} .-:+++\`") - ;; - - - "Peppermint") - [ -z $c1 ] && c1="\e[1;37m" # White - c2="\e[1;31m" # Light Red - startline="2" - fulloutput=("${c2} 8ZZZZZZ"${c1}"MMMMM" -"${c2} .ZZZZZZZZZ"${c1}"MMMMMMM." -"${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" -"${c2} ZZZZZZZZZ"${c1}"MM") - ;; - - "SolusOS") - [ -z $c1 ] && c1="\e[1;37m" # White - c2="\e[1;30m" # Light Gray - startline="2" - fulloutput=("${c1} e e" -"${c1} eee ee" -"${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") - ;; - - - - "Mageia") - [ -z $c1 ] && c1="\e[1;34m" # Light Blue - c2="\e[0;36m" # Light Cyan - startline="2" - fulloutput=("$c2 .'' " -"$c2 '. .. " -"$c2 .,,. %s" -"$c2 ,;;. %s" -"$c2 ... ... %s" -"$c2 ',,' .:::. %s" -"$c1 .$c2,:c,$c1 .. . %s" -"$c1 :dkxc;'. ..,cxkd; %s" -"$c1 .dkkxxkkkkkkkkkkxxkkd. %s" -"$c1 .dkko. ';cloolc;. .dkkd %s" -"$c1 ckkx. .xkk; %s" -"$c1 xOO: cOOd %s" -"$c1 xOO: lOOd %s" -"$c1 lOOx. .kOO: %s" -"$c1 .k00d. .x00x %s" -"$c1 .k00O; ;k00O. %s" -"$c1 .lO0KOdc;,,;cdO0KOc. %s" -"$c1 ;d0KKKKKKKK0d; " -"$c1 .,;::;,. ") - ;; - - *) - [ -z $c1 ] && c1="\e[1;37m" # White - c2="\e[1;30m" # Light Gray - c3="\e[1;33m" # Light Yellow - startline="0" - fulloutput=(" %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" -"$c0") - ;; - esac - - # Truncate lines based on terminal width. - if [ "$truncateSet" == "Yes" ]; then - n=${#fulloutput[*]} - for ((i=0;i/dev/null - [[ "$verbosity" -eq "1" ]] && verboseOut "Found WM theme folder. Transferring to /tmp/screenfetch-export/..." - fi - fi - elif [[ "$WM" =~ "Fluxbox" ]]; then - if [[ "$Win_theme" != "Not Found" ]]; then - if [[ -d "$HOME/.fluxbox/styles/$Win_theme" ]]; then - cp -r "$HOME/.fluxbox/styles/$Win_theme" "/tmp/screenfetch-export/WM-${WM}/$Win_theme" &>/dev/null - [[ "$verbosity" -eq "1" ]] && verboseOut "Found WM theme folder. Transferring to /tmp/screenfetch-export/..." - fi - fi - elif [[ "$WM" =~ "Blackbox" ]]; then - if [[ "$Win_theme" != "Not Found" ]]; then - if [[ -d "$HOME/.blackbox/styles/$Win_theme" ]]; then - cp -r "$HOME/.blackbox/styles/$Win_theme" "/tmp/screenfetch-export/WM-${WM}/$Win_theme" &>/dev/null - [[ "$verbosity" -eq "1" ]] && verboseOut "Found WM theme folder. Transferring to /tmp/screenfetch-export/..." - elif [[ -d "/usr/share/blackbox/styles/$Win_theme" ]]; then - cp -r "/usr/share/blackbox/styles/$Win_theme" "/tmp/screenfetch-export/WM-${WM}/$Win_theme" &>/dev/null - [[ "$verbosity" -eq "1" ]] && verboseOut "Found WM theme folder. Transferring to /tmp/screenfetch-export/..." - fi - fi - elif [[ "$WM" =~ "PekWM" ]]; then - if [[ "$Win_theme" != "Not Found" ]]; then - if [[ -d "$HOME/.pekwm/themes/$Win_theme" ]]; then - cp -r "$HOME/.pekwm/themes/$Win_theme" "/tmp/screenfetch-export/WM-${WM}/$Win_theme" &>/dev/null - [[ "$verbosity" -eq "1" ]] && verboseOut "Found WM theme folder. Transferring to /tmp/screenfetch-export/..." - fi - fi - elif [[ "$WM" =~ "Metacity" ]]; then - if [[ "$Win_theme" != "Not Found" ]]; then - if [[ -d "$HOME/.themes/$Win_theme" ]]; then - cp -r "$HOME/.themes/$Win_theme" "/tmp/screenfetch-export/WM-${WM}/$Win_theme" &>/dev/null - [[ "$verbosity" -eq "1" ]] && verboseOut "Found WM theme folder. Transferring to /tmp/screenfetch-export/..." - elif [[ -d "/usr/share/themes/$Win_theme" ]]; then - cp -r "/usr/share/themes/$Win_theme" "/tmp/screenfetch-export/WM-${WM}/$Win_theme" &>/dev/null - [[ "$verbosity" -eq "1" ]] && verboseOut "Found WM theme folder. Transferring to /tmp/screenfetch-export/..." - fi - fi - elif [[ "$WM" =~ "Xfwm4" ]]; then - if [[ "$Win_theme" != "Not Found" ]]; then - WM_theme=$(echo "$Win_theme" | awk '{print $NF}') - if [[ -d "$HOME/.themes/$Win_theme" ]]; then - cp -r "$HOME/.themes/$Win_theme" "/tmp/screenfetch-export/WM-${WM}/$Win_theme" &>/dev/null - [[ "$verbosity" -eq "1" ]] && verboseOut "Found WM theme folder. Transferring to /tmp/screenfetch-export/..." - elif [[ -d "/usr/share/themes/$Win_theme" ]]; then - cp -r "/usr/share/themes/$Win_theme" "/tmp/screenfetch-export/WM-${WM}/$Win_theme" &>/dev/null - [[ "$verbosity" -eq "1" ]] && verboseOut "Found WM theme folder. Transferring to /tmp/screenfetch-export/..." - fi - fi - fi - fi - if [[ "$gtkBackgroundFull" ]]; then - cp "$gtkBackgroundFull" /tmp/screenfetch-export/ - [[ "$verbosity" -eq "1" ]] && verboseOut "Found BG file. Transferring to /tmp/screenfetch-export/..." - fi - if [[ "$mygtk" ]]; then - GTK_theme=$(echo "$mygtk" | awk '{print $NF}') - if [ -d "/usr/share/themes/$GTK_theme" ]; then - cp -r "/usr/share/themes/$GTK_theme" "/tmp/screenfetch-export/GTK/Theme/$GTK_theme" &>/dev/null - [[ "$verbosity" -eq "1" ]] && verboseOut "Found GTK theme folder. Transferring to /tmp/screenfetch-export/..." - fi - fi - if [[ "$myicons" ]]; then - GTK_icons=$(echo "$myicons" | awk '{print $NF}') - if [ -d "/usr/share/icons/$GTK_icons" ]; then - cp -r "/usr/share/icons/$GTK_icons" "/tmp/screenfetch-export/GTK/Icons/$GTK_icons" &>/dev/null - [[ "$verbosity" -eq "1" ]] && verboseOut "Found GTK icons theme folder. Transferring to /tmp/screenfetch-export/..." - fi - if [ -d "$HOME/.icons/$GTK_icons" ]; then - cp -r "$HOME/.icons/$GTK_icons" "/tmp/screenfetch-export/GTK/Icons/$GTK_icons" &>/dev/null - [[ "$verbosity" -eq "1" ]] && verboseOut "Found GTK icons theme folder. Transferring to /tmp/screenfetch-export/..." - fi - fi - if [[ "$myfont" ]]; then - GTK_font=$(echo "$myfont" | awk '{print $NF}') - if [ -d "/usr/share/fonts/$GTK_font" ]; then - cp -r "/usr/share/fonts/$GTK_font" "/tmp/screenfetch-export/GTK/$GTK_font" &>/dev/null - [[ "$verbosity" -eq "1" ]] && verboseOut "Found GTK font. Transferring to /tmp/screenfetch-export/..." - elif [ -d "$HOME/.fonts/$GTK_font" ]; then - cp -r "$HOME/.fonts/$GTK_font" "/tmp/screenfetch-export/GTK/$GTK_font" &>/dev/null - [[ "$verbosity" -eq "1" ]] && verboseOut "Found GTK font. Transferring to /tmp/screenfetch-export/..." - fi - fi - if [ "$screenshot" == "1" ]; then - if [ -f "${shotfile}" ]; then - cp "${shotfile}" "/tmp/screenfetch-export/" - [[ "$verbosity" -eq "1" ]] && verboseOut "Found screenshot. Transferring to /tmp/screenfetch-export/..." - fi - fi - cd /tmp/screenfetch-export/ - [[ "$verbosity" -eq "1" ]] && verboseOut "Creating screenfetch-export.tar.gz archive in /tmp/screenfetch-export/...." - tar -czf screenfetch-export.tar.gz ../screenfetch-export &>/dev/null - mv /tmp/screenfetch-export/screenfetch-export.tar.gz $HOME/ - echo -e "${bold}==>${c0} Archive created in /tmp/ and moved to $HOME. Removing /tmp/screenfetch-export/..." - rm -rf /tmp/screenfetch-export/ -} - - -################## -# Let's Do This! -################## - -for i in "${display[@]}"; do - - if [[ $i =~ wm ]]; then - ! [[ $WM ]] && detectwm; - ! [[ $Win_theme ]] && detectwmtheme; - else - - [[ "${display[*]}" =~ "$i" ]] && detect${i} - - fi -done -infoDisplay -[ "$screenshot" == "1" ] && takeShot -[ "$exportTheme" == "1" ] && themeExport \ No newline at end of file diff --git a/fun/code/fun/skull b/fun/code/fun/skull deleted file mode 100755 index 91deff5..0000000 --- a/fun/code/fun/skull +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/bash - -f=3 b=4 -for j in f b; do - for i in {0..7}; do - printf -v $j$i %b "\e[${!j}${i}m" - done -done -bld=$'\e[1m' -rst=$'\e[0m' -inv=$'\e[7m' - - -cat << EOF -$f4 ...----.... -$f4 ..-:"'' ''"-.. -$f4 .-' '-. -$f4 .' . . '. -$f4 .' . . . . .''. -$f4 .' . . . . . . . ..:. -$f4 .' . . . . . . .. . . ....::. -$f4 .. . . . . . . .. . ....:IA. -$f4 .: . . . . . . .. . .. .. ....:IA. -$f4 .: . . .. . . . . .. . ... ....:.:VHA. -$f4 '.. . .. . . . . .. . .. . .....:.::IHHB. -$f4 .:. . . . . . . . . . . ...:.:... .......:HIHMM. -$f4 .:.... . . ."::"'.. . . . .:.:.:II;,. .. ..:IHIMMA -$f4 ':.:.. ..::IHHHHHI::. . . ...:.::::.,,,. . ....VIMMHM -$f4 .:::I. .AHHHHHHHHHHAI::. .:...,:IIHHHHHHMMMHHL:. . VMMMM -$f4 .:.:V.:IVHHHHHHHMHMHHH::..:" .:HIHHHHHHHHHHHHHMHHA. .VMMM. -$f4 :..V.:IVHHHHHMMHHHHHHHB... . .:VPHHMHHHMMHHHHHHHHHAI.:VMMI -$f4 ::V..:VIHHHHHHMMMHHHHHH. . .I":IIMHHMMHHHHHHHHHHHAPI:WMM -$f4 ::". .:.HHHHHHHHMMHHHHHI. . .:..I:MHMMHHHHHHHHHMHV:':H:WM -$f4 :: . :.::IIHHHHHHMMHHHHV .ABA.:.:IMHMHMMMHMHHHHV:'. .IHWW -$f4 '. ..:..:.:IHHHHHMMHV" .AVMHMA.:.'VHMMMMHHHHHV:' . :IHWV -$f4 :. .:...:".:.:TPP" .AVMMHMMA.:. "VMMHHHP.:... .. :IVAI -$f4 .:. '... .:"' . ..HMMMHMMMA::. ."VHHI:::.... .:IHW' -$f4 ... . . ..:IIPPIH: ..HMMMI.MMMV:I:. .:ILLH:.. ...:I:IM -$f4 : . .'"' .:.V". .. . :HMMM:IMMMI::I. ..:HHIIPPHI::'.P:HM. -$f4 :. . . .. ..:.. . :AMMM IMMMM..:...:IV":T::I::.".:IHIMA -$f4 'V:.. .. . .. . . . 'VMMV..VMMV :....:V:.:..:....::IHHHMH -$f4 "IHH:.II:.. .:. . . . . " :HB"" . . ..PI:.::.:::..:IHHMMV" -$f4 :IP""HHII:. . . . . .'V:. . . ..:IH:.:.::IHIHHMMMMM" -$f4 :V:. VIMA:I.. . . . .. . . .:.I:I:..:IHHHHMMHHMMM -$f4 :"VI:.VWMA::. .: . .. .:. ..:.I::.:IVHHHMMMHMMMMI -$f4 :."VIIHHMMA:. . . .: .:.. . .:.II:I:AMMMMMMHMMMMMI -$f4 :..VIHIHMMMI...::.,:.,:!"I:!"I!"I!"V:AI:VAMMMMMMHMMMMMM' -$f4 ':.:HIHIMHHA:"!!"I.:AXXXVVXXXXXXXA:."HPHIMMMMHHMHMMMMMV -$f4 V:H:I:MA:W'I :AXXXIXII:IIIISSSSSSXXA.I.VMMMHMHMMMMMM -$f4 'I::IVA ASSSSXSSSSBBSBMBSSSSSSBBMMMBS.VVMMHIMM'"' -$f4 I:: VPAIMSSSSSSSSSBSSSMMBSSSBBMMMMXXI:MMHIMMI -$f4 .I::. "H:XIIXBBMMMMMMMMMMMMMMMMMBXIXXMMPHIIMM' -$f4 :::I. ':XSSXXIIIIXSSBMBSSXXXIIIXXSMMAMI:.IMM -$f4 :::I:. .VSSSSSISISISSSBII:ISSSSBMMB:MI:..:MM -$f4 ::.I:. ':"SSSSSSSISISSXIIXSSSSBMMB:AHI:..MMM. -$f4 ::.I:. . ..:"BBSSSSSSSSSSSSBBBMMMB:AHHI::.HMMI -$f4 :..::. . ..::":BBBBBSSBBBMMMB:MMMMHHII::IHHMI -$f4 ':.I:... ....:IHHHHHMMMMMMMMMMMMMMMHHIIIIHMMV" -$f4 "V:. ..:...:.IHHHMMMMMMMMMMMMMMMMHHHMHHMHP' -$f4 ':. .:::.:.::III::IHHHHMMMMMHMHMMHHHHM" -$f4 "::....::.:::..:..::IIIIIHHHHMMMHHMV" -$f4 "::.::.. .. . ...:::IIHHMMMMHMV" -$f4 "V::... . .I::IHHMMV"' -$f4 '"VHVHHHAHHHHMMV:"' - -$rst - -EOF - - diff --git a/fun/code/fun/slendy b/fun/code/fun/slendy deleted file mode 100755 index 766e06c..0000000 --- a/fun/code/fun/slendy +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -initializeANSI() -{ - esc="" - - blackf="${esc}[30m"; redf="${esc}[31m"; greenf="${esc}[32m" - yellowf="${esc}[33m" bluef="${esc}[34m"; purplef="${esc}[35m" - cyanf="${esc}[36m"; whitef="${esc}[37m" - - blackb="${esc}[40m"; redb="${esc}[41m"; greenb="${esc}[42m" - yellowb="${esc}[43m" blueb="${esc}[44m"; purpleb="${esc}[45m" - cyanb="${esc}[46m"; whiteb="${esc}[47m" - - boldon="${esc}[1m"; boldoff="${esc}[22m" - italicson="${esc}[3m"; italicsoff="${esc}[23m" - ulon="${esc}[4m"; uloff="${esc}[24m" - invon="${esc}[7m"; invoff="${esc}[27m" - - reset="${esc}[0m" -} - -initializeANSI - -cat << EOF - - ${reset}${blackf}| | | | |${reset} - ${redf}█ █${reset} ${blackf}|${reset} ${greenf}█ █${reset} ${blackf}|${reset} ${yellowf}█ █${reset} ${blackf}|${reset} ${bluef}█ █${reset} ${blackf}|${reset} ${purplef}█ █${reset} ${blackf}|${reset} ${cyanf}█ █${reset} - ${redf}███████${reset} ${blackf}|${reset} ${greenf}███████${reset} ${blackf}|${reset} ${yellowf}███████${reset} ${blackf}|${reset} ${bluef}███████${reset} ${blackf}|${reset} ${purplef}███████${reset} ${blackf}|${reset} ${cyanf}███████${reset} - ${redf}███${boldon}${redb}██${reset}${redf}█${boldon}${redb}██${reset}${redf}███${reset} ${blackf}|${reset} ${greenf}███${boldon}${greenb}██${reset}${greenf}█${boldon}${greenb}██${reset}${greenf}███${reset} ${blackf}|${reset} ${yellowf}███${boldon}${yellowb}██${reset}${yellowf}█${boldon}${yellowb}██${reset}${yellowf}███${reset} ${blackf}|${reset} ${bluef}███${boldon}${blueb}██${reset}${bluef}█${boldon}${blueb}██${reset}${bluef}███${reset} ${blackf}|${reset} ${purplef}███${boldon}${purpleb}██${reset}${purplef}█${boldon}${purpleb}██${reset}${purplef}███${reset} ${blackf}|${reset} ${cyanf}███${boldon}${cyanb}██${reset}${cyanf}█${boldon}${cyanb}██${reset}${cyanf}███${reset} - ${redf}████${boldon}${redb}█${reset}${redf}████${reset} ${blackf}|${reset} ${greenf}████${boldon}${greenb}█${reset}${greenf}████${reset} ${blackf}|${reset} ${yellowf}████${boldon}${yellowb}█${reset}${yellowf}████${reset} ${blackf}|${reset} ${bluef}████${boldon}${blueb}█${reset}${bluef}████${reset} ${blackf}|${reset} ${purplef}████${boldon}${purpleb}█${reset}${purplef}████${reset} ${blackf}|${reset} ${cyanf}████${boldon}${cyanb}█${reset}${cyanf}████${reset} - ${redf}█ █ ${boldon}█${reset} ${redf}█ █${reset} ${blackf}|${reset} ${greenf}█ █ ${boldon}█${reset} ${greenf}█ █${reset} ${blackf}|${reset} ${yellowf}█ █ ${boldon}█${reset} ${yellowf}█ █${reset} ${blackf}|${reset} ${bluef}█ █ ${boldon}█${reset} ${bluef}█ █${reset} ${blackf}|${reset} ${purplef}█ █ ${boldon}█${reset} ${purplef}█ █${reset} ${blackf}|${reset} ${cyanf}█ █ ${boldon}█${reset} ${cyanf}█ █${reset} - ${redf}█ █${reset} ${blackf}|${reset} ${greenf}█ █${reset} ${blackf}|${reset} ${yellowf}█ █${reset} ${blackf}|${reset} ${bluef}█ █${reset} ${blackf}|${reset} ${purplef}█ █${reset} ${blackf}|${reset} ${cyanf}█ █${reset} - ${blackf}| | | | |${reset} -EOF \ No newline at end of file diff --git a/sys/code/sys/gfx-intel b/sys/code/sys/gfx-intel deleted file mode 100755 index 804de12..0000000 --- a/sys/code/sys/gfx-intel +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -integrated=$(echo IGD | sudo tee /sys/kernel/debug/vgaswitcheroo/switch) - -notify-send -t 5000 \ --i "/home/xero/.config/awesome/themes/ghost/gfx.png" \ -' gfx status -░░▒▒▓▓▓████▓▓▓▒▒░░' \ -" intel powered on" \ No newline at end of file diff --git a/sys/code/sys/gfx-off b/sys/code/sys/gfx-off deleted file mode 100755 index aeb6daf..0000000 --- a/sys/code/sys/gfx-off +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -integrated=$(echo OFF | sudo tee /sys/kernel/debug/vgaswitcheroo/switch) - -notify-send -t 5000 \ --i "/home/xero/.config/awesome/themes/ghost/gfx.png" \ -' gfx status -░░▒▒▓▓▓████▓▓▓▒▒░░' \ -"unused powered off" \ No newline at end of file diff --git a/sys/code/sys/gfx-on b/sys/code/sys/gfx-on deleted file mode 100755 index 57d08d4..0000000 --- a/sys/code/sys/gfx-on +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -integrated=$(echo ON | sudo tee /sys/kernel/debug/vgaswitcheroo/switch) - -notify-send -t 5000 \ --i "/home/xero/.config/awesome/themes/ghost/gfx.png" \ -' gfx status -░░▒▒▓▓▓████▓▓▓▒▒░░' \ -" both powered on" \ No newline at end of file diff --git a/sys/code/sys/gfx-radeon b/sys/code/sys/gfx-radeon deleted file mode 100755 index a0db665..0000000 --- a/sys/code/sys/gfx-radeon +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -integrated=$(echo DIS | sudo tee /sys/kernel/debug/vgaswitcheroo/switch) - -notify-send -t 5000 \ --i "/home/xero/.config/awesome/themes/ghost/gfx.png" \ -' gfx status -░░▒▒▓▓▓████▓▓▓▒▒░░' \ -"radeon powered on" \ No newline at end of file diff --git a/sys/code/sys/gfx-status b/sys/code/sys/gfx-status deleted file mode 100755 index 93d564a..0000000 --- a/sys/code/sys/gfx-status +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash - -pci_integrated=$(lspci | grep VGA | sed -n '1p' | cut -f 1 -d " ") -pci_discrete=$(lspci | grep VGA | sed -n '2p' | cut -f 1 -d " ") - -integrated=$(cat /sys/kernel/debug/vgaswitcheroo/switch | grep $pci_integrated | grep -o -P ':.:...:') -discrete=$(cat /sys/kernel/debug/vgaswitcheroo/switch | grep $pci_discrete | grep -o -P ':.:...:') - -name_integrated=$(lspci | grep VGA | sed -n '1p' | sed -e "s/.* VGA compatible controller[ :]*//g" | sed -e "s/ Corporation//g" | sed -e "s/ Technologies Inc//g" | sed -e 's/\[[0-9]*\]: //g' | sed -e 's/\[[0-9:a-z]*\]//g' | sed -e 's/(rev [a-z0-9]*)//g' | sed -e "s/ Integrated Graphics Controller//g") -name_discrete=$(lspci | grep VGA | sed -n '2p' | sed -e "s/.* VGA compatible controller[ :]*//g" | sed -e "s/ Corporation//g" | sed -e "s/ Technologies Inc//g" | sed -e 's/\[[0-9]*\]: //g' | sed -e 's/\[[0-9:a-z]*\]//g' | sed -e 's/(rev [a-z0-9]*)//g' | sed -e "s/ Integrated Graphics Controller//g") - -if [ "$integrated" = ":+:Pwr:" ] -then -integrated_condition="on" -elif [ "$integrated" = ": :Pwr:" ] -then -integrated_condition="on" -elif [ "$integrated" = ": :Off:" ] -then -integrated_condition="off" -fi - -if [ "$discrete" = ":+:Pwr:" ] -then -discrete_condition="on" -elif [ "$discrete" = ": :Pwr:" ] -then -discrete_condition="on" -elif [ "$discrete" = ": :Off:" ] -then -discrete_condition="off" -fi - -notify-send -t 5000 \ --i "/home/xero/.config/awesome/themes/ghost/gfx.png" \ -' gfx status -░░▒▒▓▓███▓▓▒▒░░' \ -" intel = $integrated_condition - radeon = $discrete_condition" \ No newline at end of file diff --git a/sys/code/sys/gitio b/sys/code/sys/gitio deleted file mode 100755 index b6a7983..0000000 --- a/sys/code/sys/gitio +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/sh -# -# ██ ██ ██ -# █████ ░░ ░██ ░░ -# ██░░░██ ██ ██████ ██ ██████ -# ░██ ░██░██░░░██░ ░██ ██░░░░██ -# ░░██████░██ ░██ ░██░██ ░██ -# ░░░░░██░██ ░██ ░██░██ ░██ -# █████ ░██ ░░██ ██░██░░██████ -# ░░░░░ ░░ ░░ ░░ ░░ ░░░░░░ -# -# create short / vanity github urls -# ▟▙ -# ▟▒░░░░░░░▜▙▜████████████████████████████████▛ -# ▜▒░░░░░░░▟▛▟▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▛ -# ▜▛ -# xero / syntax-samurai - -usage () { - cat < - -# 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 my IRC network, SilverIRC, at irc://kittykatt.silverirc.com/me0wz -# to put forth suggestions/ideas. Thank you. - - -LANG=C -LANGUAGE=C -LC_ALL=C - -scriptVersion="3.5.0" - -###################### -# Settings for fetcher -###################### - -# This setting controls what ASCII logo is displayed. Available: Arch Linux (Old and Current Logos), Linux Mint, Ubuntu, Crunchbang, Debian, Raspbian, Gentoo, Mandrake/Mandriva, Slackware, SUSE, Fedora, BSD, OS X and None -# 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" -display=( distro host kernel uptime pkgs shell res de wm wmtheme gtk cpu gpu mem ) -# Display Type: ASCII or Text -display_type="ASCII" - -# 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 ) -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= -# 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" -hostshot= -baseurl="http://www.example.com" -serveraddr="www.example.com" -scptimeout="20" -serverdir="/path/to/directory" -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 () { - echo -ne "\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')";; - esac - [[ -n "${color_ret}" ]] && echo "${color_ret}" - else - : - fi -} - -function verboseOut { - printf "\033[1;31m:: \033[0m$1\n" -} - -function errorOut { - printf "\033[1;37m[[ \033[1;31m! \033[1;37m]] \033[0m$1\n" -} -function stderrOut { - while IFS='' read -r line; do printf "\033[1;37m[[ \033[1;31m! \033[1;37m]] \033[0m${line}\n"; done -} - - -#################### -# Color Defines -#################### - -detectColors() { - my_colors=$(printf "$OPTARG" | sed 's/^,/na,/;s/,$/,na/;s/,/ /') - my_lcolor=$(printf "$my_colors" | awk -F' ' '{print $1}') - if [[ "$my_lcolor" != "na" ]]; then - if [[ $(tput colors) -eq "256" ]]; then my_lcolor="\033[38;5;${my_lcolor}m" - else - case $my_lcolor in - 0|00) export my_lcolor=$(getColor 'black');; - 1|01) export my_lcolor=$(getColor 'red');; - 2|02) export my_lcolor=$(getColor 'green');; - 3|03) export my_lcolor=$(getColor 'brown');; - 4|04) export my_lcolor=$(getColor 'blue');; - 5|05) export my_lcolor=$(getColor 'purple');; - 6|06) export my_lcolor=$(getColor 'cyan');; - 7|07) export my_lcolor=$(getColor 'light grey');; - 8|08) export my_lcolor=$(getColor 'dark grey');; - 9|09) export my_lcolor=$(getColor 'light red');; - 10) export my_lcolor=$(getColor 'light green');; - 11) export my_lcolor=$(getColor 'yellow');; - 12) export my_lcolor=$(getColor 'light blue');; - 13) export my_lcolor=$(getColor 'light purple');; - 14) export my_lcolor=$(getColor 'light cyan');; - 15) export my_lcolor=$(getColor 'white');; - *) unset my_lcolor; continue ;; - esac - fi - else - unset my_lcolor - fi - my_hcolor=$(printf "$my_colors" | awk -F' ' '{print $2}') - if [[ "$my_hcolor" != "na" ]]; then - if [[ $(tput colors) -eq "256" ]]; then my_hcolor="\033[38;5;${my_hcolor}m" - else - case $my_hcolor in - 0|00) export my_hcolor=$(getColor 'black');; - 1|01) export my_hcolor=$(getColor 'red');; - 2|02) export my_hcolor=$(getColor 'green');; - 3|03) export my_hcolor=$(getColor 'brown');; - 4|04) export my_hcolor=$(getColor 'blue');; - 5|05) export my_hcolor=$(getColor 'purple');; - 6|06) export my_hcolor=$(getColor 'cyan');; - 7|07) export my_hcolor=$(getColor 'light grey');; - 8|08) export my_hcolor=$(getColor 'dark grey');; - 9|09) export my_hcolor=$(getColor 'light red');; - 10) export my_hcolor=$(getColor 'light green');; - 11) export my_hcolor=$(getColor 'yellow');; - 12) export my_hcolor=$(getColor 'light blue');; - 13) export my_hcolor=$(getColor 'light purple');; - 14) export my_hcolor=$(getColor 'light cyan');; - 15) export my_hcolor=$(getColor 'white');; - *) unset my_hcolor; continue ;; - esac - fi - else - unset my_hcolor - fi -} - - -displayHelp() { - printf "${underline}Usage${c0}:\n" -# printf " screenFetch [OPTIONAL FLAGS]\n\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 " Arch Linux (Old and Current Logos), Antergos, Chakra, CentOS, Debian,\n" - printf " CrunchBang, Raspbian, elementary OS, Fedora, Frugalware, Fuduntu, Gentoo,\n" - printf " Funtoo, Jiyuu Linux, LinuxDeepin, Kali Linux, Mageia, Mandriva, Manjaro,\n" - printf " Linux Mint, LMDE, openSUSE, Parabola GNU/Linux-libre, Peppermint,\n" - printf " Red Hat Enterprise Linux, Sabayon, Scientific Linux, Slackware, SolusOS,\n" - printf " TinyCore, Trisquel, Ubuntu and Viperr.\n\n" - printf "${underline}Other Supported Systems${c0}:\n" - printf " Mac OS X, FreeBSD, DragonFlyBSD, NetBSD, OpenBSD, Android and Cygwin.\n\n" - printf "${underline}Supported Desktop Managers${c0}:\n" - printf " KDE, Gnome, Unity, Xfce, LXDE, Cinnamon, MATE and RazorQt.\n\n" - printf "${underline}Supported Window Managers${c0}:\n" - printf " 2bwm, Awesome, Beryl, Blackbox, Cinnamon, Compiz, dminiwm, dwm, E16, E17,\n" - printf " echinus, Emerald, FluxBox, FVWM, herbstluftwm, IceWM, KWin, Metacity,\n" - printf " monsterwm, Musca, Gala, Mutter, Muffin, Notion, OpenBox, PekWM, Ratpoison,\n" - printf " Sawfish, ScrotWM, SpectrWM, StumpWM, subtle, WindowMaker, WMFS, wmii,\n" - printf " Xfwm4, XMonad and i3.\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" - #echo -e " ${bold}-d 'ARGUMENTS'${c0} Allows for setting what information is displayed" - #echo -e " on the command line. Format must be as follows:" - #echo -e " OPTION,OPTION,OPTION,OPTION. Valid options are" - #echo -e " host, distro, kernel, uptime, pkgs, shell, res, de, wm," - #echo -e " wmtheme, gtk, cpu, gpu, mem." - printf " ${bold}-n${c0} Do not display ASCII distribution logo.\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}-s(m)${c0} Using this flag tells the script that you want it\n" - printf " to take a screenshot. Use the -m flag if you would like\n" - printf " to move it to a new location afterwards.\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}-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" -} - -##################### -# Begin Flags Phase -##################### - -case $1 in - --help) displayHelp; exit 0;; -esac - - -while getopts ":hsmevVEnNtlS:A:D:o:Bc:d:" flags; do - case $flags in - h) displayHelp; exit 0;; - s) screenshot=1; continue;; - S) screenCommand=$OPTARG; continue;; - m) hostshot=1; continue;; - v) verbosity=1; continue;; - V) - 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 Hu6.\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" - exit 0 - ;; - E) errorSuppress="1";; - D) distro=$OPTARG; continue;; - A) asc_distro=$OPTARG; continue;; - t) truncateSet="Yes";; - n) display_type="Text";; - o) overrideOpts=$OPTARG; continue;; - c) detectColors "$OPTARGS"; continue;; - d) overrideDisplay=$OPTARG; continue;; - N) no_color='1';; - :) 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 -#################### - -if [[ "$overrideOpts" ]]; then - [[ "$verbosity" -eq "1" ]] && 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 - - if [[ "${distro_detect}" == "archlinux" || "${distro_detect}" == "Arch Linux" || "${distro_detect}" == "arch" || "${distro_detect}" == "Arch" || "${distro_detect}" == "archarm" ]]; then - distro="Arch Linux" - distro_release="n/a" - if grep -q 'antergos' /etc/os-release; then - distro="Antergos" - distro_release="n/a" - fi - elif [[ "${distro_detect}" == "Chakra" ]]; then - distro="Chakra" - distro_release=null - elif [[ "${distro_detect}" == "CentOS" ]]; then - distro="CentOS" - elif [[ "${distro_detect}" == "Debian" ]]; then - 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 - elif [[ "${distro_detect}" == "elementary" || "${distro_detect}" == "elementary OS" ]]; then - distro="elementary OS" - elif [[ "${distro_detect}" == "KaOS" || "${distro_detect}" == "kaos" ]]; then - distro="KaOS" - elif [[ "${distro_detect}" == "Fedora" ]]; then - distro="Fedora" - elif [[ "${distro_detect}" == "frugalware" ]]; then - distro="Frugalware" - distro_codename=null - distro_release=null - elif [[ "${distro_detect}" == "Fuduntu" ]]; then - distro="Fuduntu" - distro_codename=null - elif [[ "${distro_detect}" == "Gentoo" ]]; then - if [[ "$(lsb_release -sd)" =~ "Funtoo" ]]; then - distro="Funtoo" - else - distro="Gentoo" - fi - elif [[ "${distro_detect}" == "Jiyuu Linux" ]]; then - distro="Jiyuu Linux" - elif [[ "${distro_detect}" == "LinuxDeepin" ]]; then - distro="LinuxDeepin" - distro_codename=null - elif [[ "${distro_detect}" == "Debian Kali Linux" ]]; then - distro="Kali Linux" - elif [[ "${distro_detect}" == "Mageia" ]]; then - distro="Mageia" - elif [[ "$distro_detect" == "MandrivaLinux" ]]; then - distro="Mandriva" - if [[ "${distro_codename}" == "turtle" ]]; then - distro="Mandriva-${distro_release}" - distro_codename=null - elif [[ "${distro_codename}" == "Henry_Farman" ]]; then - distro="Mandriva-${distro_release}" - distro_codename=null - elif [[ "${distro_codename}" == "Farman" ]]; then - distro="Mandriva-${distro_release}" - distro_codename=null - elif [[ "${distro_codename}" == "Adelie" ]]; then - distro="Mandriva-${distro_release}" - distro_codename=null - elif [[ "${distro_codename}" == "pauillac" ]]; then - distro="Mandriva-${distro_release}" - distro_codename=null - fi - elif [[ "${distro_detect}" == "ManjaroLinux" ]]; then - distro="Manjaro" - elif [[ "${distro_detect}" == "LinuxMint" ]]; then - distro="Mint" - if [[ "${distro_codename}" == "debian" ]]; then - distro="LMDE" - distro_codename="n/a" - distro_release="n/a" - fi - elif [[ "${distro_detect}" == "SUSE LINUX" || "${distro_detect}" == "openSUSE project" ]]; then - distro="openSUSE" - elif [[ "${distro_detect}" == "Parabola GNU/Linux-libre" || "${distro_detect}" == "Parabola" ]]; then - distro="Parabola GNU/Linux-libre" - distro_codename="n/a" - distro_release="n/a" - elif [[ "${distro_detect}" == "Peppermint" ]]; then - distro="Peppermint" - distro_codename=null - elif [[ "${distro_detect}" == "CentOS" || "${distro_detect}" =~ "RedHatEnterprise" ]]; then - distro="Red Hat Enterprise Linux" - elif [[ "${distro_detect}" == "Sabayon" ]]; then - distro="Sabayon" - elif [[ "${distro_detect}" == "SolusOS" ]]; then - distro="SolusOS" - elif [[ "${distro_detect}" == "Trisquel" ]]; then - distro="Trisquel" - elif [[ "${distro_detect}" == "Ubuntu" ]]; then - distro="Ubuntu" - elif [[ "${distro_detect}" == "Viperr" ]]; then - distro="Viperr" - distro_codename=null - 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 - if [ `uname -o` == "Cygwin" ]; then distro="Cygwin"; fake_distro="${distro}"; fi - fi - 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" ]]; 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 ~ /"SolusOS"/) { - distro = "SolusOS" - exit - } - } END { - print distro - }' /etc/issue) - fi - fi - if [[ "${distro}" == "Unknown" ]] && [[ "${OSTYPE}" == "linux-gnu" || "${OSTYPE}" == "linux" ]]; then - if [[ -f /etc/system-release ]]; then - distro=$(awk 'BEGIN { - distro = "Unknown" - } - { - if ($0 ~ /"Scientific\ Linux"/) { - distro = "Scientific Linux" - exit - } - } END { - print distro - }' /etc/system-release) - fi - fi - - - - fi - fi - 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 - case $distro in - antergos) distro="Antergos" ;; - arch*linux*old) distro="Arch Linux - Old" ;; - arch*linux) distro="Arch Linux" ;; - arch) distro="Arch Linux";; - 'elementary'|'elementary os') distro="elementary OS";; - fedora) distro="Fedora" ;; - mageia) distro="Mageia" ;; - mandriva) distro="Mandriva" ;; - mandrake) distro="Mandrake" ;; - mint) distro="Mint" ;; - kali*linux) distro="Kali Linux" ;; - lmde) distro="LMDE" ;; - opensuse) distro="openSUSE" ;; - ubuntu) distro="Ubuntu" ;; - debian) distro="Debian" ;; - raspbian) distro="Raspbian" ;; - freebsd) distro="FreeBSD" ;; - 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" ;; - slackware) distro="Slackware" ;; - frugalware) distro="Frugalware" ;; - peppermint) distro="Peppermint" ;; - solusos) distro="SolusOS" ;; - parabolagnu|parabolagnu/linux-libre|'parabola gnu/linux-libre'|parabola) distro="Parabola GNU/Linux-libre" ;; - viperr) distro="Viperr" ;; - kaos) distro="KaOS";; - linuxdeepin) distro="LinuxDeepin" ;; - chakra) distro="Chakra" ;; - centos) distro="CentOS";; - mac*os*x) distro="Mac OS X" ;; - fuduntu) distro="Fuduntu" ;; - manjaro) distro="Manjaro" ;; - cygwin) distro="Cygwin" ;; - esac - [[ "$verbosity" -eq "1" ]] && 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 - [[ "$verbosity" -eq "1" ]] && 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}" - [[ "$verbosity" -eq "1" ]] && verboseOut "Finding kernel version...found as '$kernel'" -} -# Kernel Version Detection - End - - -# Uptime Detection - Begin -detectuptime () { - unset uptime - if [ "$distro" == "Mac OS X" ]; then - boot=`sysctl -n kern.boottime | cut -d "=" -f 2 | cut -d "," -f 1` - now=`date +%s` - uptime=$(($now-$boot)) - elif [[ "${distro}" == "FreeBSD" || "${distro}" == "OpenBSD" ]]; then - if [[ "${distro}" == "FreeBSD" ]]; then boot=`sysctl -n kern.boottime | cut -d "=" -f 2 | cut -d "," -f 1` - else boot=$(sysctl -n kern.boottime); fi - now=$(date +%s) - uptime=$((${now} - ${boot})) - 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)) ;; - esac - [[ "$verbosity" -eq "1" ]] && verboseOut "Finding current package count...found as '$pkgs'" -} - - - - -# CPU Detection - Begin -detectcpu () { - REGEXP="-r" - if [ "$distro" == "Mac OS X" ]; then - cpu=$(echo $(sysctl -n machdep.cpu.brand_string)) - REGEXP="-E" - elif [ "$distro" == "FreeBSD" ]; then cpu=$(sysctl -n hw.model) - elif [ "$distro" == "DragonflyBSD" ]; then cpu=$(sysctl -n hw.model) - elif [ "$distro" == "OpenBSD" ]; then cpu=$(sysctl -n hw.model | sed 's/@.*//') - else - cpu=$(awk 'BEGIN{FS=":"} /model name/ { print $2; exit }' /proc/cpuinfo | sed 's/ @/\n/' | head -1) - 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=$(cat $loc/bios_limit | awk '{print $1/1000}') - elif [ -f $loc/scaling_max_freq ];then - cpu_mhz=$(cat $loc/scaling_max_freq | awk '{print $1/1000}') - else - cpu_mhz=$(awk -F':' '/cpu MHz/{ print int($2+.5) }' /proc/cpuinfo | head -n 1) - fi - if [ -n "$cpu_mhz" ];then - if [ $cpu_mhz -gt 999 ];then - cpu_ghz=$(echo $cpu_mhz | awk '{print $1/1000}') - cpu="$cpu @ ${cpu_ghz}GHz" - else - cpu="$cpu @ ${cpu_mhz}MHz" - fi - fi - fi - cpu=$(echo "${cpu}" | sed $REGEXP 's/\([tT][mM]\)|\([Rr]\)|[pP]rocessor//g' | xargs) - [[ "$verbosity" -eq "1" ]] && 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=$(echo "${gpu_info}" | grep -E 'device.*=.*') - gpu=$(echo "${gpu_info}" | sed 's/.*device.*= //' | sed "s/'//g") - elif [[ "$distro" != "Mac OS X" ]]; then - if [ -n "$(type -p lspci)" ]; then - gpu_info=$(lspci 2> /dev/null | grep VGA) - gpu=$(echo "$gpu_info" | grep -oE '\[.*\]' | sed 's/\[//;s/\]//') - gpu=$(echo "${gpu}" | sed -n '1h;2,$H;${g;s/\n/, /g;p}') - elif [[ -n "$(type -p glxinfo)" && -z "$gpu" ]]; then - gpu_info=$(glxinfo 2>/dev/null) - gpu=$(echo "$gpu_info" | grep "OpenGL renderer string") - gpu=$(echo "$gpu" | cut -d ':' -f2) - gpu="${gpu:1}" - gpu_info=$(echo "$gpu_info" | grep "OpenGL vendor string") - 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 [ $(echo "$gpu_info" | grep -i nvidia | wc -l) -gt 0 ];then - gpu_info="NVidia " - elif [ $(echo "$gpu_info" | grep -i intel | wc -l) -gt 0 ];then - gpu_info="Intel " - elif [ $(echo "$gpu_info" | grep -i amd | wc -l) -gt 0 ];then - gpu_info="AMD " - elif [[ $(echo "$gpu_info" | grep -i ati | wc -l) -gt 0 || $(echo "$gpu_info" | grep -i radeon | wc -l) -gt 0 ]]; then - gpu_info="ATI " - else - gpu_info=$(echo "$gpu_info" | cut -d ':' -f2) - gpu_info="${gpu_info:1} " - fi - gpu="${gpu}" - else - gpu="Not Found" - fi - - [[ "$verbosity" -eq "1" ]] && 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 - [[ "$verbosity" -eq "1" ]] && 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) - usedmem=$(top -l 1 | awk '{ - if ($0 ~ /PhysMem/) { - for (x=1; x<=NF; x++) { - if ($x ~ /wired/) { - wired = $(x-1) - gsub(/[^0-9]/,"",wired) - } - - if ($x ~ /^active/) { - active = $(x-1) - gsub(/[^0-9]/,"",active) - } - - if ($x ~ /inactive/) { - inactive = $(x-1) - gsub(/[^0-9]/,"",inactive) - } - } - usedmem = wired + active + inactive - print usedmem - exit - } - }') - elif [ "$distro" == "Cygwin" ]; then - total_mem=$(awk '/MemTotal/ { print $2 }' /proc/meminfo) - totalmem=$((${total_mem}/1024)) - free_mem=$(awk '/MemFree/ { print $2 }' /proc/meminfo) - used_mem=$((${total_mem} - ${free_mem})) - usedmem=$((${used_mem}/1024)) - 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=$(top -1 1 | awk '/Real:/ {k=split($3,a,"/");print a[k] }' | tr -d 'M') - 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 - else - mem_info=$(1 {print $1}') - 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} - [[ "$verbosity" -eq "1" ]] && 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 [[ "$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 - 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 - if [[ -n ${GNOME_DESKTOP_SESSION_ID} ]]; then - DE="Gnome" - 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 - elif [[ -n ${MATE_DESKTOP_SESSION_ID} ]]; then - DE="MATE" - elif [[ -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 - - 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-properties >/dev/null 2>&1; then - DEver=$(gnome-session-properties --version) - DE="${DE} ${DEver//* }" - elif type -p gnome-session >/dev/null 2>&1; then - DEver=$(gnome-session --version) - 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} == "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" - 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 - [[ "$verbosity" -eq "1" ]] && 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";; - 'awesome') WM="Awesome";; - 'beryl') WM="Beryl";; - 'bspwm') WM="bspwm";; - 'blackbox') WM="BlackBox";; - 'cinnamon') WM="Muffin";; - 'compiz') WM="Compiz";; - 'dminiwm') WM="dminiwm";; - 'dwm') WM="dwm";; - '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";; - '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";; - '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";; - '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 [F]inder >/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 - [[ "$verbosity" -eq "1" ]] && 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 Present";; - '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 Present";; - 'bspwm') Win_theme="Not Present";; - '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 Present";; - 'dwm') Win_theme="Not Present";; - '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 Present";; - '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 Present";; - 'FluxBox'|'Fluxbox') if [ -f $HOME/.fluxbox/init ]; then Win_theme="$(awk -F"/" '/styleFile/ {print $NF}' $HOME/.fluxbox/init)"; fi;; - 'FVWM') Win_theme="Not Present";; - 'i3') Win_theme="Not Present";; - '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 - Win_theme=$(awk '/PluginLib=kwin3_/{gsub(/PluginLib=kwin3_/,"",$0); print $0; exit}' $KDE_CONFIG_DIR/share/config/kwinrc) - 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 Found" - fi - else - Win_theme="Not Found" - fi - fi - - if [[ $Win_theme != 'Not Found' ]]; 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 Present";; - 'Musca') Win_theme="Not Present";;\ - 'Notion') Win_theme="Not Present";; - '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'*) # 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="$(cat $HOME/.minttyrc | grep '^Font=.*' | grep -o '[0-9A-z ]*$')" - fi - fi - ;; - esac - fi - if [[ "$verbosity" -eq "1" ]]; then - 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'" - fi -} -# 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 [[ "$hostshot" == "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 - [[ "$verbosity" -eq "1" ]] && verboseOut "Screenshot saved at '${shotfiles[@]}'" - scp -qo ConnectTimeout="${scptimeout}" "${shotfiles[@]}" "${serveraddr}:${serverdir}" - echo -e "${bold}==>${c0} Your screenshot can be viewed at ${baseurl}/$shotfile" - else - verboseOut "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 - [[ "$verbosity" -eq "1" ]] && verboseOut "Screenshot saved at '${shotfiles[@]}'" - else - verboseOut "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}" - else myascii="${distro}"; fi - case ${myascii} in - "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="15" - fulloutput=("${c1} ▒█ " -"${c1} ▒▒██ " -"${c1} ▒▒▒███ " -"${c1} ▒▒▒▒████ " -"${c1} ▒▒▒▒▒█████ " -"${c1} ▒▒▒▒▒▒██████ " -"${c1} ▒▒▒▒▒▒▒███████ " -"${c1} ▒▒▒▒▒▒▒▒████████ " -"${c1} ▒▒▒▒▒▒▒▒▒█████████ " -"${c1} ▒▒▒▒▒▒▒▒▒▒██████████ " -"${c1} ▒▒▒▒▒▒▒▒▒▒▒███████████ " -"${c1} ▒▒▒▒▒▒▒▒▒▒▒▒████████████ " -"${c1} ▒▒▒▒▒▒▒▒▒▒▒ ███████████ " -"${c1} ▒▒▒▒▒▒▒▒▒▒ ██████████ " -"${c1} " -"${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") - - ;; - - "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-3color") - 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") - ;; - - "Ubuntu") - if [[ "$no_color" != "1" ]]; then - if [[ $(tput colors) -eq "256" ]]; then c1=$(getColor 'orange') # Orange if 256 support - else c1=$(getColor 'yellow'); fi # Bold Yellow - fi - if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c1="${my_lcolor}"; c1="${my_lcolor}"; fi - startline="0" - fulloutput=("$c1 ./+o+- %s" -"$c1 yyyyy- $c1-yyyyyy+ %s" -"$c1 $c1://+//////$c1-yyyyyyo %s" -"$c1 .++ $c1.:/++++++/-$c1.+sss/\` %s" -"$c1 .:++o: $c1/++++++++/:--:/- %s" -"$c1 o:+o+:++.$c1\`..\`\`\`.-/oo+++++/ %s" -"$c1 .:+o:+o/.$c1 \`+sssoo+/ %s" -"$c1 .++/+:$c1+oo+o:\`$c1 /sssooo. %s" -"$c1 /+++//+:$c1\`oo+o$c1 /::--:. %s" -"$c1 \+/+o+++$c1\`o++o$c1 ++////. %s" -"$c1 .++.o+$c1++oo+:\`$c1 /dddhhh. %s" -"$c1 .+.o+oo:.$c1 \`oddhhhh+ %s" -"$c1 \+.++o+o\`\`-\`\`$c1\`\`.:ohdhhhhh+ %s" -"$c1 \`:o+++ $c1\`ohhhhhhhhyo++os: %s" -"$c1 .o:$c1\`.syhhhhhhh/$c1.oo++o\` %s" -"$c1 /osyyyyyyo$c1++ooo+++/ %s" -"$c1 \`\`\`\`\` $c1+oo+++o\: %s" -"$c1 \`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") - ;; - - "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}..${c2}----"$c1"/hMMMy"$c2"------------: %s" -"$c2 :--"$c1" :dMNdhhdNMMNo"$c2"------------; %s" -"$c2 :---"$c1":sdNMMMMNds:"$c2"------------: %s" -"$c2 :------"$c1":://:"$c2"-------------:: %s" -"$c2 :---------------------:// %s" -" %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 -) - ;; - - - "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") - ;; - - "SolusOS") - 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") - ;; - - - "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") - ;; - - "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") - ;; - - "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") - ;; - - - "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+:.\`") - ;; - - *) - 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") - ;; - 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 - else - #n=${#fulloutput[*]} - for ((i=0; i<${#fulloutput[*]}; i++)); do - # echo "${out_array[@]}" - 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"|"Mandriva"|"Mandrake"|"Chakra"|"Sabayon"|"Slackware"|"Mac OS X"|"Trisquel"|"Kali Linux"|"Jiyuu Linux"|"Antergos"|"KaOS") labelcolor=$(getColor 'light blue');; - "Arch Linux"|"Frugalware"|"Mageia") labelcolor=$(getColor 'light cyan');; - "Mint"|"LMDE"|"openSUSE"|"LinuxDeepin"|"DragonflyBSD"|"Manjaro"|"Manjaro-tree"|"Android") labelcolor=$(getColor 'light green');; - "Ubuntu-3color"|"FreeBSD"|"Debian"|"Raspbian"|"BSD"|"Red Hat Enterprise Linux"|"Peppermint"|"Cygwin"|"Fuduntu"|"NetBSD"|"Scientific Linux"|"DragonFlyBSD"|"BackTrack Linux") labelcolor=$(getColor 'light red');; - "CrunchBang"|"SolusOS"|"Viperr"|"elementary"*) labelcolor=$(getColor 'dark grey');; - "Gentoo"|"Parabola GNU/Linux-libre"|"Funtoo"|"Funtoo-text") labelcolor=$(getColor 'light purple');; - "CentOS"|"Ubuntu"|*) labelcolor=$(getColor 'yellow');; - esac - [[ "$my_lcolor" ]] && labelcolor="${my_lcolor}" - if [[ "$no_color" == "1" ]]; then labelcolor=""; bold=""; c0=""; textcolor=""; fi - # Some verbosity stuff - [[ "$verbosity" == "1" ]] && [[ "$screenshot" == "1" ]] && verboseOut "Screenshot will be taken after info is displayed." - [[ "$verbosity" == "1" ]] && [[ "$hostshot" == "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 [[ "${display[@]}" =~ "res" ]]; 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 Present" ]]; 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 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 Found" ]; then - if [ -n "$gtk2Theme" ]; then - mygtk2="${gtk2Theme} [GTK2]" - fi - fi - if [ "$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 - mygtk=$(echo -e "$labelcolor GTK Theme:$textcolor ${mygtk2}${mygtk3}"); out_array=( "${out_array[@]}" "$mygtk" ); ((display_index++)) - fi - if [ "$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 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 Present" ]]; 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 Present" ]]; 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 - [[ "$verbosity" -eq "1" ]] && verboseOut "Found 'd' flag in syntax. Overriding some display options..." - overrideDisplay=${overrideDisplay//,/ } - display=( $overrideDisplay ) -fi - -# Check for android -#if type -p getprop >/dev/null 2>&1; then -# distro="Android" -# detectmem -# detectuptime -# detectkernel -# detectdroid -# infoDisplay -# exit 0 -#fi -Win_theme='greybeard' -for i in "${display[@]}"; do - 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 -done - -infoDisplay -[ "$screenshot" == "1" ] && takeShot -[ "$exportTheme" == "1" ] && themeExport - -exit 0 \ No newline at end of file diff --git a/sys/code/sys/ix b/sys/code/sys/ix deleted file mode 100755 index 2cf7fa5..0000000 --- a/sys/code/sys/ix +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env bash - -# Examples: -# ix hello.txt # paste file (name/ext will be set). -# echo Hello world. | ix # read from STDIN (won't set name/ext). -# ix -n 1 self_destruct.txt # paste will be deleted after one read. -# ix -i ID hello.txt # replace ID, if you have permission. -# ix -d ID - -ix() { - local opts - local OPTIND - [ -f "$HOME/.netrc" ] && opts='-n' - while getopts ":hd:i:n:" x; do - case $x in - h) echo "ix [-d ID] [-i ID] [-n N] [opts]"; return;; - d) $echo curl $opts -X DELETE ix.io/$OPTARG; return;; - i) opts="$opts -X PUT"; local id="$OPTARG";; - n) opts="$opts -F read:1=$OPTARG";; - esac - done - shift $(($OPTIND - 1)) - [ -t 0 ] && { - local filename="$1" - shift - [ "$filename" ] && { - curl $opts -F f:1=@"$filename" $* ix.io/$id - return - } - echo "^C to cancel, ^D to send." - } - curl $opts -F f:1='<-' $* ix.io/$id -} - -ix $* diff --git a/sys/code/sys/tmx b/sys/code/sys/tmx deleted file mode 100755 index c912561..0000000 --- a/sys/code/sys/tmx +++ /dev/null @@ -1,45 +0,0 @@ -# -# Modified TMUX start script from: -# http://forums.gentoo.org/viewtopic-t-836006-start-0.html -# -# Store it to `~/bin/tmx` and issue `chmod +x`. -# - -# Works because bash automatically trims by assigning to variables and by -# passing arguments -trim() { echo $1; } - -if [[ -z "$1" ]]; then - echo "Specify session name as the first argument" - exit -fi - -# Only because I often issue `ls` to this script by accident -if [[ "$1" == "ls" ]]; then - tmux ls - exit -fi - -base_session="$1" -# This actually works without the trim() on all systems except OSX -tmux_nb=$(trim `tmux ls | grep "^$base_session" | wc -l`) -if [[ "$tmux_nb" == "0" ]]; then - echo "Launching tmux base session $base_session ..." - tmux new-session -s $base_session -else - # Make sure we are not already in a tmux session - if [[ -z "$TMUX" ]]; then - echo "Launching copy of base session $base_session ..." - # Session is is date and time to prevent conflict - session_id=`date +%Y%m%d%H%M%S` - # Create a new session (without attaching it) and link to base session - # to share windows - tmux new-session -d -t $base_session -s $session_id - if [[ "$2" == "1" ]]; then - # Create a new window in that session - tmux new-window - fi - # Attach to the new session & kill it once orphaned - tmux attach-session -t $session_id \; set-option destroy-unattached - fi -fi diff --git a/sys/code/sys/toggle-touchpad b/sys/code/sys/toggle-touchpad deleted file mode 100755 index 2381a86..0000000 --- a/sys/code/sys/toggle-touchpad +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -# -# enable/disable touchpad -# find your touchpad name: -# egrep -i 'synap|alps|etps' /proc/bus/input/devices -PAD='SynPS/2 Synaptics TouchPad' -A=`xinput list-props "$PAD" | sed -n -e 's/.*Device Enabled ([0-9][0-9]*):\t\(.*\)/\1/p' ` -if [ $A -eq 1 ]; then -xinput set-int-prop "$PAD" "Device Enabled" 8 0 -notify-send -t 5000 \ -' touchpad -░░▒▒▓▓██▓▓▒▒░░' \ -' disabled' -else -xinput set-int-prop "$PAD" "Device Enabled" 8 1 -notify-send -t 5000 \ -' touchpad -░░▒▒▓▓██▓▓▒▒░░' \ -' enabled' -fi diff --git a/zsh/.zsh/aliases.zsh b/zsh/.zsh/aliases.zsh index f1eeda2..370d5b5 100755 --- a/zsh/.zsh/aliases.zsh +++ b/zsh/.zsh/aliases.zsh @@ -51,17 +51,8 @@ alias rock="ncmpcpp" alias mixer="alsamixer" alias genplaylist="cd ~/music;find . -name '*.mp3' -o -name '*.flac'|sed -e 's%^./%%g' > ~/.mpd/playlists/all.m3u" alias matrix="cmatrix -b" -alias pipes="bash ~/code/fun/pipes" -alias pipesx="bash ~/code/fun/pipesx" -alias rain="bash ~/code/fun/rain" -alias screenfetch="~/code/sys/info" -alias hashcompare="bash ~/code/sys/hash-compare " alias tempwatch="while :; do sensors; sleep 1 && clear; done;" alias term="urxvtc -hold -e " #used for run menu -alias img="bash ~/code/sys/img" -alias gitio="bash ~/code/sys/gitio" -alias ix="bash ~/code/sys/ix" -alias ioup="~/code/sys/ioup" alias sprunge="curl -F 'sprunge=<-' http://sprunge.us" alias clbin="curl -F 'clbin=<-' https://clbin.com" alias toiletlist='for i in ${TOILET_FONT_PATH:=/usr/share/figlet}/*.{t,f}lf; do j=${i##*/}; echo ""; echo "╓───── "$j; echo "╙────────────────────────────────────── ─ ─ "; echo ""; toilet -d "${i%/*}" -f "$j" "${j%.*}"; done' @@ -72,23 +63,24 @@ alias rustofat="toilet -t -f rustofat" alias pacman="sudo pacman" alias update="code/fun/pacman && yaourt -Syua" alias systemctl="sudo systemctl" -alias apachereload="sudo systemctl restart httpd.service" alias disks='echo "╓───── m o u n t . p o i n t s"; echo "╙────────────────────────────────────── ─ ─ "; lsblk -a; echo ""; echo "╓───── d i s k . u s a g e"; echo "╙────────────────────────────────────── ─ ─ "; df -h;' alias todo="bash ~/code/sys/todo" alias record="ffmpeg -f x11grab -s 1366x768 -an -r 16 -loglevel quiet -i :0.0 -b:v 5M -y" #pass a filename alias nexus="jmtpfs ~/nexus" tmx() { - [[ $# -eq 0 ]] && bash ~/code/sys/tmx 0 || bash ~/code/sys/tmx $# + [[ $# -eq 0 ]] && bash ~/bin/tmx 0 || bash ~/bin/tmx $# } email() { echo $3 | mutt -s $2 $1 } +# colorized cat c() { for file in "$@" do pygmentize -O style=sourcerer -f console256 -g "$file" done } +# colorized less l() { pygmentize -O style=sourcerer -f console256 -g $1 | less -r } @@ -96,6 +88,7 @@ l() { md() { pandoc -s -f markdown -t man "$*" | man -l - } +# nullpointer url shortener short() { curl -F"shorten=$*" https://0x0.st } -- cgit v1.2.1