From 1c4005ae3468d32c1f6b0e3d4b5173304e5e7db0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20La=C3=ADn?= Date: Mon, 11 Dec 2023 21:07:07 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(system):=20shell-color-scripts?= =?UTF-8?q?=20are=20now=20local=20instead=20of=20beign=20from=20a=20pacman?= =?UTF-8?q?=20package?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../arch/packages/tasks/modules/base.yml | 1 - .config/fish/variables.fish | 1 + .config/pacman/aur-packages.txt | 1 - .local/bin/color-scripts/alpha | 46 +++++ .local/bin/color-scripts/arch | 40 +++++ .local/bin/color-scripts/bars | 26 +++ .../color-scripts/blacklisted/awk-rgb-test | 16 ++ .local/bin/color-scripts/blacklisted/hex | 15 ++ .local/bin/color-scripts/blacklisted/print256 | 97 +++++++++++ .../bin/color-scripts/blacklisted/pukeskull | 74 ++++++++ .local/bin/color-scripts/blacklisted/suckless | 27 +++ .local/bin/color-scripts/blacklisted/tux | 103 +++++++++++ .local/bin/color-scripts/blacklisted/xmonad | 64 +++++++ .local/bin/color-scripts/blocks1 | 5 + .local/bin/color-scripts/blocks2 | 54 ++++++ .local/bin/color-scripts/bloks | 63 +++++++ .local/bin/color-scripts/colorbars | 38 +++++ .local/bin/color-scripts/colortest | 30 ++++ .local/bin/color-scripts/colortest-slim | 21 +++ .local/bin/color-scripts/colorview | 34 ++++ .local/bin/color-scripts/colorwheel | 13 ++ .local/bin/color-scripts/crowns | 19 +++ .local/bin/color-scripts/crunch | 47 +++++ .local/bin/color-scripts/crunchbang | 46 +++++ .local/bin/color-scripts/crunchbang-mini | 44 +++++ .local/bin/color-scripts/darthvader | 56 ++++++ .local/bin/color-scripts/debian | 39 +++++ .local/bin/color-scripts/dna | 48 ++++++ .local/bin/color-scripts/doom-original | 58 +++++++ .local/bin/color-scripts/doom-outlined | 58 +++++++ .local/bin/color-scripts/elfman | 50 ++++++ .local/bin/color-scripts/faces | 48 ++++++ .local/bin/color-scripts/fade | 45 +++++ .local/bin/color-scripts/ghosts | 33 ++++ .local/bin/color-scripts/guns | 34 ++++ .local/bin/color-scripts/illumina | 23 +++ .local/bin/color-scripts/jangofett | 55 ++++++ .local/bin/color-scripts/kaisen | 63 +++++++ .local/bin/color-scripts/manjaro | 38 +++++ .local/bin/color-scripts/monster | 42 +++++ .local/bin/color-scripts/mouseface | 50 ++++++ .local/bin/color-scripts/mouseface2 | 49 ++++++ .local/bin/color-scripts/pacman-colors | 39 +++++ .local/bin/color-scripts/panes | 26 +++ .local/bin/color-scripts/pinguco | 40 +++++ .local/bin/color-scripts/rails | 48 ++++++ .local/bin/color-scripts/rally-x | 38 +++++ .local/bin/color-scripts/rupees | 49 ++++++ .local/bin/color-scripts/six | 41 +++++ .local/bin/color-scripts/space-invaders | 41 +++++ .local/bin/color-scripts/spectrum | 21 +++ .local/bin/color-scripts/square | 44 +++++ .local/bin/color-scripts/tanks | 54 ++++++ .local/bin/color-scripts/thebat | 32 ++++ .local/bin/color-scripts/thebat2 | 52 ++++++ .local/bin/color-scripts/tiefighter1 | 58 +++++++ .local/bin/color-scripts/tiefighter1-no-invo | 62 +++++++ .local/bin/color-scripts/tiefighter1row | 46 +++++ .local/bin/color-scripts/tiefighter2 | 57 +++++++ .local/bin/color-scripts/zwaves | 26 +++ .local/bin/colorscript | 160 ++++++++++++++++++ 61 files changed, 2646 insertions(+), 2 deletions(-) create mode 100755 .local/bin/color-scripts/alpha create mode 100755 .local/bin/color-scripts/arch create mode 100755 .local/bin/color-scripts/bars create mode 100755 .local/bin/color-scripts/blacklisted/awk-rgb-test create mode 100755 .local/bin/color-scripts/blacklisted/hex create mode 100755 .local/bin/color-scripts/blacklisted/print256 create mode 100755 .local/bin/color-scripts/blacklisted/pukeskull create mode 100755 .local/bin/color-scripts/blacklisted/suckless create mode 100755 .local/bin/color-scripts/blacklisted/tux create mode 100755 .local/bin/color-scripts/blacklisted/xmonad create mode 100755 .local/bin/color-scripts/blocks1 create mode 100755 .local/bin/color-scripts/blocks2 create mode 100755 .local/bin/color-scripts/bloks create mode 100755 .local/bin/color-scripts/colorbars create mode 100755 .local/bin/color-scripts/colortest create mode 100755 .local/bin/color-scripts/colortest-slim create mode 100755 .local/bin/color-scripts/colorview create mode 100755 .local/bin/color-scripts/colorwheel create mode 100755 .local/bin/color-scripts/crowns create mode 100755 .local/bin/color-scripts/crunch create mode 100755 .local/bin/color-scripts/crunchbang create mode 100755 .local/bin/color-scripts/crunchbang-mini create mode 100755 .local/bin/color-scripts/darthvader create mode 100755 .local/bin/color-scripts/debian create mode 100755 .local/bin/color-scripts/dna create mode 100755 .local/bin/color-scripts/doom-original create mode 100755 .local/bin/color-scripts/doom-outlined create mode 100755 .local/bin/color-scripts/elfman create mode 100755 .local/bin/color-scripts/faces create mode 100755 .local/bin/color-scripts/fade create mode 100755 .local/bin/color-scripts/ghosts create mode 100755 .local/bin/color-scripts/guns create mode 100755 .local/bin/color-scripts/illumina create mode 100755 .local/bin/color-scripts/jangofett create mode 100755 .local/bin/color-scripts/kaisen create mode 100755 .local/bin/color-scripts/manjaro create mode 100755 .local/bin/color-scripts/monster create mode 100755 .local/bin/color-scripts/mouseface create mode 100755 .local/bin/color-scripts/mouseface2 create mode 100755 .local/bin/color-scripts/pacman-colors create mode 100755 .local/bin/color-scripts/panes create mode 100755 .local/bin/color-scripts/pinguco create mode 100755 .local/bin/color-scripts/rails create mode 100755 .local/bin/color-scripts/rally-x create mode 100755 .local/bin/color-scripts/rupees create mode 100755 .local/bin/color-scripts/six create mode 100755 .local/bin/color-scripts/space-invaders create mode 100755 .local/bin/color-scripts/spectrum create mode 100755 .local/bin/color-scripts/square create mode 100755 .local/bin/color-scripts/tanks create mode 100755 .local/bin/color-scripts/thebat create mode 100755 .local/bin/color-scripts/thebat2 create mode 100755 .local/bin/color-scripts/tiefighter1 create mode 100755 .local/bin/color-scripts/tiefighter1-no-invo create mode 100755 .local/bin/color-scripts/tiefighter1row create mode 100755 .local/bin/color-scripts/tiefighter2 create mode 100755 .local/bin/color-scripts/zwaves create mode 100755 .local/bin/colorscript diff --git a/.config/ansible/roles/arch/packages/tasks/modules/base.yml b/.config/ansible/roles/arch/packages/tasks/modules/base.yml index 57a1e1bc..9d0c9bcc 100644 --- a/.config/ansible/roles/arch/packages/tasks/modules/base.yml +++ b/.config/ansible/roles/arch/packages/tasks/modules/base.yml @@ -150,7 +150,6 @@ - pacseek - sysz - tgpt-bin - - shell-color-scripts # Tools - devify diff --git a/.config/fish/variables.fish b/.config/fish/variables.fish index 782ae90d..c1e18a70 100644 --- a/.config/fish/variables.fish +++ b/.config/fish/variables.fish @@ -21,6 +21,7 @@ set -xg BUN_INSTALL $HOME/.bun # Path set -x fish_user_paths fish_add_path $XDG_BIN_HOME +fish_add_path $XDG_BIN_HOME/color-scripts/ fish_add_path $GOPATH/bin fish_add_path $CARGO_HOME/bin fish_add_path $XDG_SCRIPT_HOME diff --git a/.config/pacman/aur-packages.txt b/.config/pacman/aur-packages.txt index cec13c48..400bf164 100644 --- a/.config/pacman/aur-packages.txt +++ b/.config/pacman/aur-packages.txt @@ -44,7 +44,6 @@ rpcs3-bin 0.0.29-1 ryujinx-bin 1.1.1098-1 scc-bin 3.1.0-1 sddm-git 0.19.0.205.g572b128-1 -shell-color-scripts 1.1.r113.576735c-1 spicetify-cli 2.28.1-1 spotify 1:1.2.26.1187-1 swaylock-effects-improved-git r469.0554651-1 diff --git a/.local/bin/color-scripts/alpha b/.local/bin/color-scripts/alpha new file mode 100755 index 00000000..94dd2c1b --- /dev/null +++ b/.local/bin/color-scripts/alpha @@ -0,0 +1,46 @@ +#!/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. +# Author: Ivo +# Source: http://crunchbang.org/forums/viewtopic.php?pid=134749#p134749 + +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" whitef="${esc}[37m" + + blackfbright="${esc}[90m"; redfbright="${esc}[91m"; greenfbright="${esc}[92m" + yellowfbright="${esc}[93m" bluefbright="${esc}[94m"; purplefbright="${esc}[95m" + cyanfbright="${esc}[96m"; whitefbright="${esc}[97m" whitefbright="${esc}[97m" + + 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}${redfbright} ██████ ${reset} ${boldon}${greenfbright}██████ ${reset}${boldon}${yellowfbright} ██████${reset} ${boldon}${bluefbright}██████ ${reset} ${boldon}${purplefbright} ██████${reset} ${boldon}${cyanfbright} ███████${reset} +${boldon}${redfbright} ████████${reset} ${boldon}${greenfbright}██ ██ ${reset}${boldon}${yellowfbright}██ ${reset} ${boldon}${bluefbright}██ ██${reset} ${boldon}${purplefbright}██████ ${reset} ${boldon}${cyanfbright}█████████${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} + +EOF diff --git a/.local/bin/color-scripts/arch b/.local/bin/color-scripts/arch new file mode 100755 index 00000000..26509349 --- /dev/null +++ b/.local/bin/color-scripts/arch @@ -0,0 +1,40 @@ +#!/bin/sh + +# Author: Ivo +# Source: http://crunchbang.org/forums/viewtopic.php?pid=237794#p237794 +# 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="" + + redf="${esc}[31m"; greenf="${esc}[32m" + yellowf="${esc}[33m" bluef="${esc}[34m"; + cyanf="${esc}[36m"; purplef="${esc}[35m" + + redfbright="${esc}[91m"; greenfbright="${esc}[92m" + yellowfbright="${esc}[93m" bluefbright="${esc}[94m"; + cyanfbright="${esc}[96m"; purplefbright="${esc}[95m" + + boldon="${esc}[1m"; + 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}${redfbright} ■ ${boldon}${greenfbright} ■ ${boldon}${yellowfbright} ■ ${boldon}${bluefbright} ■ ${boldon}${purplefbright} ■ ${boldon}${cyanfbright} ■ ${reset} +${boldon}${redfbright} ■■■ ${boldon}${greenfbright} ■■■ ${boldon}${yellowfbright} ■■■ ${boldon}${bluefbright} ■■■ ${boldon}${purplefbright} ■■■ ${boldon}${cyanfbright} ■■■ ${reset} +${boldon}${redfbright} ■■■■■ ${boldon}${greenfbright} ■■■■■ ${boldon}${yellowfbright} ■■■■■ ${boldon}${bluefbright} ■■■■■ ${boldon}${purplefbright} ■■■■■ ${boldon}${cyanfbright} ■■■■■ ${reset} +${redf} ■( )■ ${greenf} ■( )■ ${yellowf} ■( )■ ${bluef} ■( )■ ${purplef} ■( )■ ${cyanf} ■( )■ ${reset} +${redf} ■■■■ ■■■■ ${greenf} ■■■■ ■■■■ ${yellowf} ■■■■ ■■■■ ${bluef} ■■■■ ■■■■ ${purplef} ■■■■ ■■■■ ${cyanf} ■■■■ ■■■■ ${reset} +${redf} ■■ ■■ ${greenf} ■■ ■■ ${yellowf} ■■ ■■ ${bluef} ■■ ■■ ${purplef} ■■ ■■ ${cyanf} ■■ ■■ ${reset} + +EOF diff --git a/.local/bin/color-scripts/bars b/.local/bin/color-scripts/bars new file mode 100755 index 00000000..92750f6b --- /dev/null +++ b/.local/bin/color-scripts/bars @@ -0,0 +1,26 @@ +#!/usr/bin/env bash + +# ANSI color scheme script by pfh +# Source: http://crunchbang.org/forums/viewtopic.php?pid=139126#p139126 +# 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 +for i in {0..7}; do + printf -v fbright$i %b "\e[9${i}m" +done +bld=$'\e[1m' +rst=$'\e[0m' +inv=$'\e[7m' + +cat << EOF + + $f1▬▬▬▬▬ $f2▬▬▬▬▬ $f3▬▬▬▬▬ $f4▬▬▬▬▬ $f5▬▬▬▬▬ $f6▬▬▬▬▬ + $bld$fbright1▬▬▬▬▬ $fbright2▬▬▬▬▬ $fbright3▬▬▬▬▬ $fbright4▬▬▬▬▬ $fbright5▬▬▬▬▬ $fbright6▬▬▬▬▬ + $rst +EOF diff --git a/.local/bin/color-scripts/blacklisted/awk-rgb-test b/.local/bin/color-scripts/blacklisted/awk-rgb-test new file mode 100755 index 00000000..5853e6bc --- /dev/null +++ b/.local/bin/color-scripts/blacklisted/awk-rgb-test @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +echo "This should be a smooth gradient" +echo "" +awk 'BEGIN{ + s="/\\/\\/\\/\\/\\"; s=s s s s s s s s; + for (colnum = 0; colnum<77; colnum++) { + r = 255-(colnum*255/76); + g = (colnum*510/76); + b = (colnum*255/76); + if (g>255) g = 510-g; + printf "\033[48;2;%d;%d;%dm", r,g,b; + printf "\033[38;2;%d;%d;%dm", 255-r,255-g,255-b; + printf "%s\033[0m", substr(s,colnum+1,1); + } + printf "\n"; +}' diff --git a/.local/bin/color-scripts/blacklisted/hex b/.local/bin/color-scripts/blacklisted/hex new file mode 100755 index 00000000..a8dcb23b --- /dev/null +++ b/.local/bin/color-scripts/blacklisted/hex @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +# Author: SuNjACk +# Source: http://crunchbang.org/forums/viewtopic.php?pid=135226#p135226 + +xdef="${XRESOURCES:-$HOME/.Xresources}" +colors=( $( sed -re '/^!/d; /^$/d; /^#/d; s/(\*color)([0-9]):/\10\2:/g;' $xdef | grep -E 'color[0-9]+:' | sort | sed 's/^.*: *//g' ) ) + +echo -e "\e[1;97m + 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;$((82+$i))m ${colors[i]} \e[0m"; done +echo -e "\n" diff --git a/.local/bin/color-scripts/blacklisted/print256 b/.local/bin/color-scripts/blacklisted/print256 new file mode 100755 index 00000000..9e2c0aef --- /dev/null +++ b/.local/bin/color-scripts/blacklisted/print256 @@ -0,0 +1,97 @@ +#!/usr/bin/env bash + +# Tom Hale, 2016. MIT Licence. +# Print out 256 colours, with each number printed in its corresponding colour +# See http://askubuntu.com/questions/821157/print-a-256-color-test-pattern-in-the-terminal/821163#821163 + +set -eu # Fail on errors or undeclared variables + +printable_colours=256 + +# Return a colour that contrasts with the given colour +# Bash only does integer division, so keep it integral +function contrast_colour { + local r g b luminance + colour="$1" + + if (( colour < 16 )); then # Initial 16 ANSI colours + (( colour == 0 )) && printf "15" || printf "0" + return + fi + + # Greyscale # rgb_R = rgb_G = rgb_B = (number - 232) * 10 + 8 + if (( colour > 231 )); then # Greyscale ramp + (( colour < 244 )) && printf "15" || printf "0" + return + fi + + # All other colours: + # 6x6x6 colour cube = 16 + 36*R + 6*G + B # Where RGB are [0..5] + # See http://stackoverflow.com/a/27165165/5353461 + + # r=$(( (colour-16) / 36 )) + g=$(( ((colour-16) % 36) / 6 )) + # b=$(( (colour-16) % 6 )) + + # If luminance is bright, print number in black, white otherwise. + # Green contributes 587/1000 to human perceived luminance - ITU R-REC-BT.601 + (( g > 2)) && printf "0" || printf "15" + return + + # Uncomment the below for more precise luminance calculations + + # # Calculate percieved brightness + # # See https://www.w3.org/TR/AERT#color-contrast + # # and http://www.itu.int/rec/R-REC-BT.601 + # # Luminance is in range 0..5000 as each value is 0..5 + # luminance=$(( (r * 299) + (g * 587) + (b * 114) )) + # (( $luminance > 2500 )) && printf "0" || printf "15" +} + +# Print a coloured block with the number of that colour +function print_colour { + local colour="$1" contrast + contrast=$(contrast_colour "$1") + printf "\e[48;5;%sm" "$colour" # Start block of colour + printf "\e[38;5;%sm%3d" "$contrast" "$colour" # In contrast, print number + printf "\e[0m " # Reset colour +} + +# Starting at $1, print a run of $2 colours +function print_run { + local i + for (( i = "$1"; i < "$1" + "$2" && i < printable_colours; i++ )) do + print_colour "$i" + done + printf " " +} + +# Print blocks of colours +function print_blocks { + local start="$1" i + local end="$2" # inclusive + local block_cols="$3" + local block_rows="$4" + local blocks_per_line="$5" + local block_length=$((block_cols * block_rows)) + + # Print sets of blocks + for (( i = start; i <= end; i += (blocks_per_line-1) * block_length )) do + printf "\n" # Space before each set of blocks + # For each block row + for (( row = 0; row < block_rows; row++ )) do + # Print block columns for all blocks on the line + for (( block = 0; block < blocks_per_line; block++ )) do + print_run $(( i + (block * block_length) )) "$block_cols" + done + (( i += block_cols )) # Prepare to print the next row + printf "\n" + done + done +} + +print_run 0 16 # The first 16 colours are spread over the whole spectrum +printf "\n" +print_blocks 16 231 6 6 3 # 6x6x6 colour cube between 16 and 231 inclusive +print_blocks 232 255 12 2 1 # Not 50, but 24 Shades of Grey + diff --git a/.local/bin/color-scripts/blacklisted/pukeskull b/.local/bin/color-scripts/blacklisted/pukeskull new file mode 100755 index 00000000..3877b837 --- /dev/null +++ b/.local/bin/color-scripts/blacklisted/pukeskull @@ -0,0 +1,74 @@ +#!/bin/sh +# +# ┳━┓┳━┓0┏┓┓┳━┓┏━┓┓ ┳ +# ┃┳┛┃━┫┃┃┃┃┃━┃┃ ┃┃┃┃ +# ┃┗┛┛ ┃┃┃┗┛┻━┛┛━┛┗┻┛ +# ┳━┓┳ ┓┳┏ ┳━┓ +# ┃━┛┃ ┃┣┻┓┣━ +# ┇ ┗━┛┃ ┛┻━┛ +# ┓━┓┳┏ ┳ ┓┳ ┳ +# ┗━┓┣┻┓┃ ┃┃ ┃ +# ━━┛┇ ┛┗━┛┗━┛┗━┛ +# +# the worst color script +# by xero + +cat << 'EOF' + ................. + .syhhso++++++++/++osyyhys+. + -oddyo+o+++++++++++++++o+oo+osdms: + :dmyo++oosssssssssssssssooooooo+/+ymm+` + hmyo++ossyyhhddddddddddddhyyyssss+//+ymd- + -mho+oosyhhhddmmmmmmmmmmmmmmddhhyyyso+//+hN+ + my+++syhhhhdmmNNNNNNNNNNNNmmmmmdhhyyyyo//+sd: + hs//+oyhhhhdmNNNNNNNNNNNNNNNNNNmmdhyhhhyo//++y + s+++shddhhdmmNNNNNNNNNNNNNNNNNNNNmdhhhdhyo/++/ + 'hs+shmmmddmNNNNNNNNNNNNNNNNNNNNNmddddddhs+oh/ + shsshdmmmmmNNMMMMMMMMMMMNNNNNNNNmmmmmmdhssdh- + +ssohdmmmmNNNNNMMMMMMMMNNNNNNmmmmmNNmdhhhs:` + -+oo++////++sydmNNNNNNNNNNNNNNNNNNNdyyys/--://+//: + d/+hmNNNmmdddhhhdmNNNNNNNNNNNNNNNmdhyyyhhhddmmNmdyd- + ++--+ymNMMNNNNNNmmmmNNNNNNNNNNNmdhddmNNMMMMMMNmhyss + /d+` -+ydmNMMMMMMNNmNMMMMMMMmmmmNNMMMMMNNmh- :sdo + sNo ` /ohdmNNMMMMNNMMMMMNNNMMMMMNmdyo/ ` hNh + M+' ``-/oyhmNNMNhNMNhNMMMMNmho/ ` 'MN/ + d+' `-+osydh0w.nzmNNmho: 'mN: + +o/ ` :oo+:s :+o/-` -dds + :hdo x `-/ooss:':+ooo: ` 0 :sdm+ + +dNNNh+ :ydmNNm' `sddmyo +hmNmds + dhNMMNNNNmddhsyhdmmNNNM: NNmNmhyo+oyyyhmNMMNmysd + ydNNNNNh+/++ohmMMMMNMNh oNNNNNNNmho++++yddhyssy + `:sNMMMMN' `mNMNNNd/` + XXXXXXXXX y/hMMNm/ .dXb. -hdmdy: ` XXXXXXXXXXX + XXXXXXXX `o+hNNds. -ymNNy- .yhys+/`` XXXXXXXXXX + XXXXXXXX +-+//o/+odMNMMMNdmh++////-/s XXXXXXXXXX + XXXXXXX mhNd -+d/+myo++ysy/hs -mNsdh/ XXXXXXXXXX + XXXXXXXX mhMN+ dMm-/-smy-::dMN/sMMmdo XXXXXXXXXX + XXXXXXXXXX NMy+NMMh oMMMs yMMMyNMMs+ XXXXXXXXXXX + XXXXXXXXXXX dy-hMMm+dMMMdoNMMh ydo XXXXXXXXXXXXX + XXXXXXXXXXXXX  smm 'NMMy dms sm XXXXXXXXXXXXXX + XXXXXXXXXXXXXX XXXXXXXXXXXXXXX + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +EOF + diff --git a/.local/bin/color-scripts/blacklisted/suckless b/.local/bin/color-scripts/blacklisted/suckless new file mode 100755 index 00000000..dbc59be8 --- /dev/null +++ b/.local/bin/color-scripts/blacklisted/suckless @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +# Author: HostGrady +# Font used: https://patorjk.com/software/taag/#p=display&f=Cricket&t=suckless + + +if [ -x "$(command -v tput)" ]; then + bold="$(tput bold)" + blue="$(tput setaf 4)" + cyan="$(tput setaf 6)" + reset="$(tput sgr0)" +fi + +art="${bold}${blue} __ __ +.-----.--.--.----| |--| .-----.-----.-----. +|__ --| | | __| <| | -__|__ --|__ --| +|_____|_____|____|__|__|__|_____|_____|_____| +${reset}${cyan} software that sucks less${reset} " + +# use this as a base if you want to redo this one +#art=" __ __ +#.-----.--.--.----| |--| .-----.-----.-----. +#|__ --| | | __| <| | -__|__ --|__ --| +#|_____|_____|____|__|__|__|_____|_____|_____| +# software that sucks less " + +echo "$art" diff --git a/.local/bin/color-scripts/blacklisted/tux b/.local/bin/color-scripts/blacklisted/tux new file mode 100755 index 00000000..df027acb --- /dev/null +++ b/.local/bin/color-scripts/blacklisted/tux @@ -0,0 +1,103 @@ +#!/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 + +# ▄█████▄ +# █████████ +# ████████▀██ +# ██████████▄██ +# ██▀▀███▀▀████ +# ████ █ ██ ███ +# █ ████ +# █ ▄ ████ +# ███▀▀▀▀▀▄▀████ +# ██▀▀▀▀▀▀ ███▄ +# ▄█▀ █████ +# ███ ██████ +# ███ ██████ +# █▀██ ██████ +# █ █ █ ████ +# █ █ ██ ███ +# ██ ▀ █▀ ████ +# ███ ████ +# █████ ███ ███ +# █▀▀███ █████████ +# ▄█ ███ █▀ ████ ▀█ +# ▄█▀ ████ █ ▀ █ +# █ ████ █ █ ██ +# █ ██ █ █ ▀█ +# █ █ █ █ █ +# █ ███████████ ▄▀ +# █▄ █ ▀▀▀▀▀▀▀ █ ▄▀ +# ▀▀▀▀▀▄▄▄█▀ ▀▄ █ +# ▀▀▀▀ + +# play with these to change: +tuxbg=${cyanb} # color behind tux +tuxfg=${blackf} # tux line color + +# tip: auto update your drawings to see changes real-time +# while true; do (sleep 3s && clear && sh script); done + +cat << EOF +${tuxfg}${tuxbg} + + ▄█████▄ + █████████ + ${whiteb}████████▀██${tuxbg} + ${whiteb}██████████▄██${tuxbg} + ${whiteb}██▀▀███▀▀████${tuxbg} + ${whiteb}████ █ ██ ███${tuxbg} + ${yellowb}█ ████${tuxbg} + ${yellowb}█ ▄ ████${tuxbg} + ${yellowb}███▀▀▀▀▀▄${whiteb}▀████${tuxbg} + ${whiteb}██▀▀▀▀▀▀ ███${tuxbg}▄ + ▄█${whiteb}▀ █████${tuxbg} + ${whiteb}███ ██████${tuxbg} + ${whiteb}███ ██████${tuxbg} + ${whiteb}█▀██ ██████${tuxbg} + ${whiteb}█ █ █ ████${tuxbg} + ${whiteb}█ █ ██ ███${tuxbg} + ${whiteb}██ ▀ █▀ ████${tuxbg} + ${whiteb}███ ████${tuxbg} + ${whiteb}█████ ███ ███${tuxbg} + ${yellowb}█▀▀███${whiteb} █████████${tuxbg} + ▄${yellowb}█ ███${whiteb} █${yellowb}▀ ████ ▀█${tuxbg} + ▄█${yellowb}▀ ████${whiteb} █${yellowb} ▀ █${tuxbg} + █${yellowb} ████${whiteb} █ █${yellowb} ██${tuxbg} + █${yellowb} ██${whiteb} █ █${yellowb} ▀█${tuxbg} + █${yellowb} █${whiteb} █ █${yellowb} █${tuxbg} + █${yellowb} ███████████${yellowb} ▄${tuxbg}▀ + █${yellowb}▄ █${tuxbg} ▀▀▀▀▀▀▀ █${yellowb} ▄${tuxbg}▀ + ▀▀▀▀▀${yellowb}▄▄▄█${tuxbg}▀ ▀${yellowb}▄ █${tuxbg} + ▀▀▀▀${tuxbg} +${reset} +EOF \ No newline at end of file diff --git a/.local/bin/color-scripts/blacklisted/xmonad b/.local/bin/color-scripts/blacklisted/xmonad new file mode 100755 index 00000000..7949268a --- /dev/null +++ b/.local/bin/color-scripts/blacklisted/xmonad @@ -0,0 +1,64 @@ +#!/bin/sh + +# Author: Ivo +# Source: http://crunchbang.org/forums/viewtopic.php?pid=237794#p237794 +# 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="" + + redf="${esc}[31m"; greenf="${esc}[32m" + yellowf="${esc}[33m" bluef="${esc}[34m"; + cyanf="${esc}[36m"; purplef="${esc}[35m" + + redfbright="${esc}[91m"; greenfbright="${esc}[92m" + yellowfbright="${esc}[93m" bluefbright="${esc}[94m"; + cyanfbright="${esc}[96m"; purplefbright="${esc}[95m" + + boldon="${esc}[1m"; + 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 + +▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ +▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ + ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▒▓▓▓▓▓▓▓▓▓▓▓ + ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▒▓▓▓▓▓▓▓▓▓▓▓ + ░▓▓▓▓▓▓▓▓▓▓▓ ▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░ + ░▓▓▓▓▓▓▓▓▓▓▓ ▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░ + ░▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒ + ░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ + ▓▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓░░░▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ + ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒ ▓▓▓▓▓▓▓▓▓▓▓▓▓ ░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ + ▓▓▓▓▓▓▓▓▓▓▓▓▒ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ + ▓▓▓▓▓▓▓▓▓▓▓▓▒ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ + ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ + ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ + ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ + ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ + ▓▓▓▓▓▓▓▓▓▓▓▓░▓▓▓▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ + ▓▓▓▓▓▓▓▓▓▓▓▓▒ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ + ░░░░▓▓▓▓▓▓▓▓▓▓▓▓▒ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ + ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ + ░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ░▓▓▓▓▓▓▓▓▓▓▓░ + ░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ░▓▓▓▓▓▓▓▓▓▓▓░ + ░▓▓▓▓▓▓▓▓▓▓▓ ▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░ ░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ + ░▓▓▓▓▓▓▓▓▓▓▓ ▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░ ░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ + ▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▒▓▓▓▓▓▓▓▓▓▓▓░░░░ ░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒ + ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▒▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒ +▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒ +▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▒ +▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▓ + +EOF + diff --git a/.local/bin/color-scripts/blocks1 b/.local/bin/color-scripts/blocks1 new file mode 100755 index 00000000..785fe0ce --- /dev/null +++ b/.local/bin/color-scripts/blocks1 @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +pcs() { for i in {0..7}; do echo -en "\e[${1}$((30+$i))m \u2588\u2588 \e[0m"; done; } +pcsbright() { for i in {0..7}; do echo -en "\e[${1}$((90+$i))m \u2588\u2588 \e[0m"; done; } +printf "\n%s\n%s\n\n" "$(pcs)" "$(pcsbright '1;')" + diff --git a/.local/bin/color-scripts/blocks2 b/.local/bin/color-scripts/blocks2 new file mode 100755 index 00000000..8a48f653 --- /dev/null +++ b/.local/bin/color-scripts/blocks2 @@ -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. +# Author: ed209 +# Source: http://crunchbang.org/forums/viewtopic.php?pid=295676#p295676 +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" + + blackfbright="${esc}[90m"; redfbright="${esc}[91m"; greenfbright="${esc}[92m" + yellowfbright="${esc}[93m" bluefbright="${esc}[94m"; purplefbright="${esc}[95m" + cyanfbright="${esc}[96m"; whitefbright="${esc}[97m" + + 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 + + ${redf}■■■■${reset}${boldon}${redfbright}■■${reset} ${greenf}■■■■${reset}${boldon}${greenfbright}■■${reset} ${yellowf}■■■■${reset}${boldon}${yellowfbright}■■${reset} ${bluef}■■■■${reset}${boldon}${purplefbright}■■${reset} ${purplef}■■■■${reset}${boldon}${bluefbright}■■${reset} ${cyanf}■■■■${reset}${boldon}${cyanfbright}■■${reset} + ${redf}■■${reset}${boldon}${greenfbright}■■${reset}${boldon}${redfbright}■■${reset} ${greenf}■■${reset}${boldon}${yellowfbright}■■${reset}${boldon}${greenfbright}■■${reset} ${yellowf}■■${reset}${boldon}${bluefbright}■■${reset}${boldon}${yellowfbright}■■${reset} ${bluef}■■${reset}${purplef}■■${reset}${boldon}${purplefbright}■■${reset} ${purplef}■■${reset}${boldon}${cyanfbright}■■${reset}${boldon}${bluefbright}■■${reset} ${cyanf}■■${reset}${boldon}${purplefbright}■■${reset}${boldon}${cyanfbright}■■${reset} + ${greenf}■■${reset}${boldon}${greenfbright}■■${reset}${boldon}${redfbright}■■${reset} ${yellowf}■■${reset}${boldon}${yellowfbright}■■${reset}${boldon}${greenfbright}■■${reset} ${bluef}■■${reset}${boldon}${bluefbright}■■${reset}${boldon}${yellowfbright}■■${reset} ${boldon}${cyanfbright}■■${reset}${purplef}■■${reset}${boldon}${purplefbright}■■${reset} ${boldon}${purplefbright}■■${reset}${boldon}${cyanfbright}■■${reset}${boldon}${bluefbright}■■${reset} ${bluef}■■${reset}${boldon}${purplefbright}■■${reset}${boldon}${cyanfbright}■■${reset} + ${greenf}■■${reset}${boldon}${greenfbright}■■${reset}${boldon}${redfbright}■■${reset} ${yellowf}■■${reset}${boldon}${yellowfbright}■■${reset}${boldon}${greenfbright}■■${reset} ${bluef}■■${reset}${boldon}${bluefbright}■■${reset}${boldon}${yellowfbright}■■${reset} ${boldon}${cyanfbright}■■${reset}${purplef}■■${reset}${boldon}${purplefbright}■■${reset} ${boldon}${purplefbright}■■${reset}${boldon}${cyanfbright}■■${reset}${boldon}${bluefbright}■■${reset} ${bluef}■■${reset}${boldon}${purplefbright}■■${reset}${boldon}${cyanfbright}■■${reset} + ${redf}■■■■${reset}${boldon}${redfbright}■■${reset} ${greenf}■■■■${reset}${boldon}${greenfbright}■■${reset} ${yellowf}■■■■${reset}${boldon}${yellowfbright}■■${reset} ${bluef}■■■■${reset}${boldon}${purplefbright}■■${reset} ${purplef}■■■■${reset}${boldon}${bluefbright}■■${reset} ${cyanf}■■■■${reset}${boldon}${cyanfbright}■■${reset} + ${redf}■■${reset}${boldon}${greenfbright}■■${reset}${boldon}${redfbright}■■${reset} ${greenf}■■${reset}${boldon}${yellowfbright}■■${reset}${boldon}${greenfbright}■■${reset} ${yellowf}■■${reset}${boldon}${bluefbright}■■${reset}${boldon}${yellowfbright}■■${reset} ${bluef}■■${reset}${purplef}■■${reset}${boldon}${purplefbright}■■${reset} ${purplef}■■${reset}${boldon}${cyanfbright}■■${reset}${boldon}${bluefbright}■■${reset} ${cyanf}■■${reset}${boldon}${purplefbright}■■${reset}${boldon}${cyanfbright}■■${reset} + ${greenf}■■${reset}${boldon}${greenfbright}■■${reset}${boldon}${redfbright}■■${reset} ${yellowf}■■${reset}${boldon}${yellowfbright}■■${reset}${boldon}${greenf}■■${reset} ${bluef}■■${reset}${boldon}${bluef}■■${reset}${boldon}${yellowf}■■${reset} ${boldon}${cyanf}■■${reset}${purplef}■■${reset}${boldon}${purplef}■■${reset} ${boldon}${purplef}■■${reset}${boldon}${cyanf}■■${reset}${boldon}${bluef}■■${reset} ${bluef}■■${reset}${boldon}${purplef}■■${reset}${boldon}${cyanf}■■${reset} + ${greenf}■■${reset}${boldon}${greenfbright}■■${reset}${boldon}${redfbright}■■${reset} ${yellowf}■■${reset}${boldon}${yellowfbright}■■${reset}${boldon}${greenfbright}■■${reset} ${bluef}■■${reset}${boldon}${bluefbright}■■${reset}${boldon}${yellowfbright}■■${reset} ${boldon}${cyanfbright}■■${reset}${purplef}■■${reset}${boldon}${purplefbright}■■${reset} ${boldon}${purplefbright}■■${reset}${boldon}${cyanfbright}■■${reset}${boldon}${bluefbright}■■${reset} ${bluef}■■${reset}${boldon}${purplefbright}■■${reset}${boldon}${cyanfbright}■■${reset} + ${redf}■■■■${reset}${boldon}${redfbright}■■${reset} ${greenf}■■■■${reset}${boldon}${greenfbright}■■${reset} ${yellowf}■■■■${reset}${boldon}${yellowfbright}■■${reset} ${bluef}■■■■${reset}${boldon}${purplefbright}■■${reset} ${purplef}■■■■${reset}${boldon}${bluefbright}■■${reset} ${cyanf}■■■■${reset}${boldon}${cyanfbright}■■${reset} + ${redf}■■${reset}${boldon}${greenfbright}■■${reset}${boldon}${redfbright}■■${reset} ${greenf}■■${reset}${boldon}${yellowfbright}■■${reset}${boldon}${greenfbright}■■${reset} ${yellowf}■■${reset}${boldon}${bluefbright}■■${reset}${boldon}${yellowfbright}■■${reset} ${bluef}■■${reset}${purplef}■■${reset}${boldon}${purplefbright}■■${reset} ${purplef}■■${reset}${boldon}${cyanfbright}■■${reset}${boldon}${bluefbright}■■${reset} ${cyanf}■■${reset}${boldon}${purplefbright}■■${reset}${boldon}${cyanfbright}■■${reset} + ${greenf}■■${reset}${boldon}${greenfbright}■■${reset}${boldon}${redfbright}■■${reset} ${yellowf}■■${reset}${boldon}${yellowfbright}■■${reset}${boldon}${greenfbright}■■${reset} ${bluef}■■${reset}${boldon}${bluefbright}■■${reset}${boldon}${yellowfbright}■■${reset} ${boldon}${cyanfbright}■■${reset}${purplef}■■${reset}${boldon}${purplefbright}■■${reset} ${boldon}${purplefbright}■■${reset}${boldon}${cyanfbright}■■${reset}${boldon}${bluefbright}■■${reset} ${bluef}■■${reset}${boldon}${purplefbright}■■${reset}${boldon}${cyanfbright}■■${reset} + ${greenf}■■${reset}${boldon}${greenf}■■${reset}${boldon}${redf}■■${reset} ${yellowf}■■${reset}${boldon}${yellowf}■■${reset}${boldon}${greenf}■■${reset} ${bluef}■■${reset}${boldon}${bluef}■■${reset}${boldon}${yellowf}■■${reset} ${boldon}${cyanf}■■${reset}${purplef}■■${reset}${boldon}${purplef}■■${reset} ${boldon}${purplef}■■${reset}${boldon}${cyanf}■■${reset}${boldon}${bluef}■■${reset} ${bluef}■■${reset}${boldon}${purplef}■■${reset}${boldon}${cyanf}■■${reset} + +EOF diff --git a/.local/bin/color-scripts/bloks b/.local/bin/color-scripts/bloks new file mode 100755 index 00000000..1c379531 --- /dev/null +++ b/.local/bin/color-scripts/bloks @@ -0,0 +1,63 @@ +#!/usr/bin/env bash + +# 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}[1;90m"; redb="${esc}[1;91m"; greenb="${esc}[1;92m" + yellowb="${esc}[1;93m" blueb="${esc}[1;94m"; purpleb="${esc}[1;95m" + cyanb="${esc}[1;96m"; whiteb="${esc}[1;97m" + + 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. + +numbers (){ + +initializeANSI + +cat << EOF + +${blackf}11111111${reset} ${redf}22222222${reset} ${greenf}33333333${reset} ${yellowf}44444444${reset} ${bluef}55555555${reset} ${purplef}66666666${reset} ${cyanf}77777777${reset} ${whitef}88888888${reset} +${blackb}11111111${reset} ${redb}22222222${reset} ${greenb}33333333${reset} ${yellowb}44444444${reset} ${blueb}55555555${reset} ${purpleb}66666666${reset} ${cyanb}77777777${reset} ${whiteb}88888888${reset} + +EOF + +} + +blocks (){ + +initializeANSI + +cat << EOF + +${blackf}████${reset}${blackb}████${reset} ${redf}████${reset}${redb}████${reset} ${greenf}████${reset}${greenb}████${reset} ${yellowf}████${reset}${yellowb}████${reset} ${bluef}████${reset}${blueb}████${reset} ${purplef}████${reset}${purpleb}████${reset} ${cyanf}████${reset}${cyanb}████${reset} ${whitef}████${reset}${whiteb}████${reset} +${blackf}████${reset}${blackb}████${reset} ${redf}████${reset}${redb}████${reset} ${greenf}████${reset}${greenb}████${reset} ${yellowf}████${reset}${yellowb}████${reset} ${bluef}████${reset}${blueb}████${reset} ${purplef}████${reset}${purpleb}████${reset} ${cyanf}████${reset}${cyanb}████${reset} ${whitef}████${reset}${whiteb}████${reset} +${blackf}████${reset}${blackb}████${reset} ${redf}████${reset}${redb}████${reset} ${greenf}████${reset}${greenb}████${reset} ${yellowf}████${reset}${yellowb}████${reset} ${bluef}████${reset}${blueb}████${reset} ${purplef}████${reset}${purpleb}████${reset} ${cyanf}████${reset}${cyanb}████${reset} ${whitef}████${reset}${whiteb}████${reset} + +EOF + +} + +case $1 in + b) blocks;; + n) numbers;; + a) blocks && numbers;; + *) blocks && numbers;; +esac diff --git a/.local/bin/color-scripts/colorbars b/.local/bin/color-scripts/colorbars new file mode 100755 index 00000000..0ca9aaf1 --- /dev/null +++ b/.local/bin/color-scripts/colorbars @@ -0,0 +1,38 @@ +#!/bin/sh +# +# colorbars - smpte color bars in sh +# http://git.io/colorbars + +echo + +for y in $(seq 0 13); do + printf %s ' ' + for color in 7 3 6 2 5 1 4; do + tput setab ${color} + printf %s ' ' + done + tput sgr0 + echo +done + +for y in 0 1; do + printf %s ' ' + for color in 4 0 5 0 6 0 7; do + tput setab ${color} + printf %s ' ' + done + tput sgr0 + echo +done + +for y in $(seq 0 4); do + printf %s ' ' + for color in 4 4 4 4 4 7 7 7 7 7 5 5 5 5 5 0 0 0 0 0 0 0 0 0 0 0 0 0; do + tput setab ${color} + printf %s ' ' + done + tput sgr0 + echo +done + +echo \ No newline at end of file diff --git a/.local/bin/color-scripts/colortest b/.local/bin/color-scripts/colortest new file mode 100755 index 00000000..2c89f9a6 --- /dev/null +++ b/.local/bin/color-scripts/colortest @@ -0,0 +1,30 @@ +#!/usr/bin/env bash + +# Daniel Crisman's ANSI color chart script from +# The Bash Prompt HOWTO: 6.1. Colours +# http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/x329.html +# +# This function 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='•••' # The text for the color test + + echo -e "\n def 40m 41m 42m 43m 44m 45m 46m 47m"; + + for FGs in ' m' ' 1m' ' 30m' '1;90m' ' 31m' '1;91m' ' 32m' \ + '1;92m' ' 33m' '1;93m' ' 34m' '1;94m' ' 35m' '1;95m' \ + ' 36m' '1;96m' ' 37m' '1;97m'; + + 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/.local/bin/color-scripts/colortest-slim b/.local/bin/color-scripts/colortest-slim new file mode 100755 index 00000000..965beb6a --- /dev/null +++ b/.local/bin/color-scripts/colortest-slim @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +# Author: machinebacon +# Source: http://linuxbbq.org/bbs/viewtopic.php?f=4&t=1656#p33237 + +T='*' # The test text + +echo -e "\n 40m 41m 42m 43m\ + 44m 45m 46m 47m"; + +for FGs in ' m' ' 1m' ' 30m' '1;90m' ' 31m' '1;91m' ' 32m' \ + '1;92m' ' 33m' '1;93m' ' 34m' '1;94m' ' 35m' '1;95m' \ + ' 36m' '1;96m' ' 37m' '1;97m'; + 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/.local/bin/color-scripts/colorview b/.local/bin/color-scripts/colorview new file mode 100755 index 00000000..5a2c20e9 --- /dev/null +++ b/.local/bin/color-scripts/colorview @@ -0,0 +1,34 @@ +#!/usr/bin/env bash + +# Original: http://frexx.de/xterm-256-notes/ +# http://frexx.de/xterm-256-notes/data/colortable16.sh +# Modified by Aaron Griffin +# and further by Kazuo Teramoto + +FGNAMES=(' black ' ' red ' ' green ' ' yellow' ' blue ' 'magenta' ' cyan ' ' white ') +BGNAMES=('DFT' 'BLK' 'RED' 'GRN' 'YEL' 'BLU' 'MAG' 'CYN' 'WHT') + +echo " ┌──────────────────────────────────────────────────────────────────────────┐" +for b in {0..8}; do + ((b>0)) && bg=$((b+39)) + + echo -en "\033[0m ${BGNAMES[b]} │ " + + for f in {0..7}; do + echo -en "\033[${bg}m\033[$((f+30))m ${FGNAMES[f]} " + done + + echo -en "\033[0m │" + echo -en "\033[0m\n\033[0m │ " + + for f in {0..7}; do + echo -en "\033[${bg}m\033[1;$((f+90))m ${FGNAMES[f]} " + done + + echo -en "\033[0m │" + echo -e "\033[0m" + + ((b<8)) && + echo " ├──────────────────────────────────────────────────────────────────────────┤" +done +echo " └──────────────────────────────────────────────────────────────────────────┘" diff --git a/.local/bin/color-scripts/colorwheel b/.local/bin/color-scripts/colorwheel new file mode 100755 index 00000000..80caaad6 --- /dev/null +++ b/.local/bin/color-scripts/colorwheel @@ -0,0 +1,13 @@ +#!/bin/sh + +# Author: baskerville +# Source: http://crunchbang.org/forums/viewtopic.php?pid=288344#p288344 + +printf "\033[0m + \033[49;35m|\033[49;31m|\033[101;31m|\033[41;97m|\033[49;91m|\033[49;93m|\033[0m + \033[105;35m|\033[45;97m|\033[49;97m||\033[100;97m||\033[49;37m||\033[103;33m|\033[43;97m|\033[0m + \033[49;95m|\033[49;94m|\033[100;37m||\033[40;97m||\033[40;37m||\033[49;33m|\033[49;32m|\033[0m + \033[104;34m|\033[44;97m|\033[49;90m||\033[40;39m||\033[49;39m||\033[102;32m|\033[42;97m|\033[0m + \033[49;34m|\033[49;36m|\033[106;36m|\033[46;97m|\033[49;96m|\033[49;92m|\033[0m + +" \ No newline at end of file diff --git a/.local/bin/color-scripts/crowns b/.local/bin/color-scripts/crowns new file mode 100755 index 00000000..848ba746 --- /dev/null +++ b/.local/bin/color-scripts/crowns @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +# Author: venam + +cat << EOF + +              +                                  +              +                                                          +                                                  +                                                  +                                                         +                     +                     +   +   + +EOF diff --git a/.local/bin/color-scripts/crunch b/.local/bin/color-scripts/crunch new file mode 100755 index 00000000..b22c886b --- /dev/null +++ b/.local/bin/color-scripts/crunch @@ -0,0 +1,47 @@ +#!/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. +# Author: gutterslob +# Source: http://crunchbang.org/forums/viewtopic.php?pid=148022#p148022 + +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" + + blackfbrightbright="${esc}[90m"; redfbright="${esc}[91m"; greenfbright="${esc}[92m" + yellowfbright="${esc}[93m" bluefbright="${esc}[94m"; purplefbright="${esc}[95m" + cyanfbright="${esc}[96m"; whitefbright="${esc}[97m" + + 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 + + ${reset}${redf} ██ ██ ${reset}${greenf} ██ ██ ${reset}${yellowf} ██ ██ ${reset}${bluef} ██ ██ ${reset}${purplef} ██ ██ ${reset}${cyanf} ██ ██ ${reset} + ${reset}${redf}██████████ ${reset}${greenf} ██████████ ${reset}${yellowf} ██████████ ${reset}${bluef} ██████████ ${reset}${purplef} ██████████ ${reset} ${cyanf}██████████ ${reset} + ${reset}${redf} ██${boldon}${redfbright}██${boldoff}${redf}██ ${reset}${greenf} ██${boldon}${greenfbright}██${boldoff}${greenf}██ ${reset}${yellowf} ██${boldon}${yellowfbright}██${boldoff}${yellowf}██ ${reset}${bluef} ██${boldon}${bluefbright}██${boldoff}${bluef}██ ${reset}${purplef} ██${boldon}${purplefbright}██${boldoff}${purplef}██ ${reset}${cyanf} ██${boldon}${cyanfbright}██${boldoff}${cyanf}██ ${reset} + ${reset}${redf}██████████ ${reset}${greenf} ██████████ ${reset}${yellowf} ██████████ ${bluef} ██████████ ${purplef} ██████████ ${reset}${cyanf} ██████████${reset} + ${reset}${redf} ██ ██ ${reset}${greenf} ██ ██ ${reset}${yellowf} ██ ██ ${reset}${bluef} ██ ██ ${reset}${purplef} ██ ██ ${reset}${cyanf} ██ ██ ${reset} + ${reset} +EOF diff --git a/.local/bin/color-scripts/crunchbang b/.local/bin/color-scripts/crunchbang new file mode 100755 index 00000000..d1790257 --- /dev/null +++ b/.local/bin/color-scripts/crunchbang @@ -0,0 +1,46 @@ +#!/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. +# Author: steampunknyanja +# Source: http://crunchbang.org/forums/viewtopic.php?pid=146715#p146715 +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" + + blackfbright="${esc}[90m"; redfbright="${esc}[91m"; greenfbright="${esc}[92m" + yellowfbright="${esc}[93m" bluefbright="${esc}[94m"; purplefbright="${esc}[95m" + cyanfbright="${esc}[96m"; whitefbright="${esc}[97m" + + 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 + + ${reset}${redf} ██ ██ ${reset}${boldon}${redfbright}██ ${reset}${greenf} ██ ██ ${reset}${boldon}${greenfbright}██ ${reset}${yellowf} ██ ██ ${reset}${boldon}${yellowfbright}██ ${reset}${bluef} ██ ██ ${reset}${boldon}${bluefbright}██ ${reset}${purplef} ██ ██ ${reset}${boldon}${purplefbright}██ ${reset}${cyanf} ██ ██ ${reset}${boldon}${cyanfbright}██ + ${reset}${redf}██████████ ${reset}${boldon}${redfbright}██ ${reset}${greenf}██████████ ${reset}${boldon}${greenfbright}██ ${reset}${yellowf}██████████ ${reset}${boldon}${yellowfbright}██ ${reset}${bluef}██████████ ${reset}${boldon}${bluefbright}██ ${reset}${purplef}██████████ ${reset}${boldon}${purplefbright}██ ${reset}${cyanf}██████████ ${reset}${boldon}${cyanfbright}██ + ${reset}${redf} ██ ██ ${reset}${boldon}${redfbright}██ ${reset}${greenf} ██ ██ ${reset}${boldon}${greenfbright}██ ${reset}${yellowf} ██ ██ ${reset}${boldon}${yellowfbright}██ ${reset}${bluef} ██ ██ ${reset}${boldon}${bluefbright}██ ${reset}${purplef} ██ ██ ${reset}${boldon}${purplefbright}██ ${reset}${cyanf} ██ ██ ${reset}${boldon}${cyanfbright}██ + ${reset}${redf}██████████ ${reset}${greenf}██████████ ${reset}${yellowf}██████████ ${reset}${bluef}██████████ ${reset}${purplef}██████████ ${reset}${cyanf}██████████ + ${reset}${redf} ██ ██ ${reset}${boldon}${redfbright}██ ${reset}${greenf} ██ ██ ${reset}${boldon}${greenfbright}██ ${reset}${yellowf} ██ ██ ${reset}${boldon}${yellowfbright}██ ${reset}${bluef} ██ ██ ${reset}${boldon}${bluefbright}██ ${reset}${purplef} ██ ██ ${reset}${boldon}${purplefbright}██ ${reset}${cyanf} ██ ██ ${reset}${boldon}${cyanfbright}██ + ${reset} +EOF diff --git a/.local/bin/color-scripts/crunchbang-mini b/.local/bin/color-scripts/crunchbang-mini new file mode 100755 index 00000000..3337cd19 --- /dev/null +++ b/.local/bin/color-scripts/crunchbang-mini @@ -0,0 +1,44 @@ +#!/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. +# Author: thevdude +# Source: http://crunchbang.org/forums/viewtopic.php?pid=147530#p147530 + +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" + + blackfbright="${esc}[90m"; redfbright="${esc}[91m"; greenfbright="${esc}[92m" + yellowfbright="${esc}[93m" bluefbright="${esc}[94m"; purplefbright="${esc}[95m" + cyanfbright="${esc}[96m"; whitefbright="${esc}[97m" + + 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 + + ${reset}${redf}▄█▄█▄ ${reset}${boldon}${redfbright}█ ${reset}${greenf}▄█▄█▄ ${reset}${boldon}${greenfbright}█ ${reset}${yellowf}▄█▄█▄ ${reset}${boldon}${yellowfbright}█ ${reset}${bluef}▄█▄█▄ ${reset}${boldon}${bluefbright}█ ${reset}${purplef}▄█▄█▄ ${reset}${boldon}${purplefbright}█ ${reset}${cyanf}▄█▄█▄ ${reset}${boldon}${cyanfbright}█${reset} + ${reset}${redf}▄█▄█▄ ${reset}${boldon}${redfbright}▀ ${reset}${greenf}▄█▄█▄ ${reset}${boldon}${greenfbright}▀ ${reset}${yellowf}▄█▄█▄ ${reset}${boldon}${yellowfbright}▀ ${reset}${bluef}▄█▄█▄ ${reset}${boldon}${bluefbright}▀ ${reset}${purplef}▄█▄█▄ ${reset}${boldon}${purplefbright}▀ ${reset}${cyanf}▄█▄█▄ ${reset}${boldon}${cyanfbright}▀${reset} + ${reset}${redf} ▀ ▀ ${reset}${boldon}${redfbright}▀ ${reset}${greenf} ▀ ▀ ${reset}${boldon}${greenfbright}▀ ${reset}${yellowf} ▀ ▀ ${reset}${boldon}${yellowfbright}▀ ${reset}${bluef} ▀ ▀ ${reset}${boldon}${bluefbright}▀ ${reset}${purplef} ▀ ▀ ${reset}${boldon}${purplefbright}▀ ${reset}${cyanf} ▀ ▀ ${reset}${boldon}${cyanfbright}▀${reset} +EOF diff --git a/.local/bin/color-scripts/darthvader b/.local/bin/color-scripts/darthvader new file mode 100755 index 00000000..91949006 --- /dev/null +++ b/.local/bin/color-scripts/darthvader @@ -0,0 +1,56 @@ +#!/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. +# Author: pfh +# Source: http://crunchbang.org/forums/viewtopic.php?pid=129265#p129265 + +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" + + blackfbright="${esc}[90m"; redfbright="${esc}[91m"; greenfbright="${esc}[92m" + yellowfbright="${esc}[93m" bluefbright="${esc}[94m"; purplefbright="${esc}[95m" + cyanfbright="${esc}[96m"; whitefbright="${esc}[97m" + + 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. +# ****************************** Building blocks: █ ▓ ▒ ░ ▄ ▀ ▐ ▌ ● ═ ║ ╔ ╦ ╗ ╚ ╩ ╝ ■ ▬ ▲ ▼ ◄ ► + +initializeANSI + +cat << EOF + +${redf} ▄████▄ ${greenf} ▄████▄ ${yellowf} ▄████▄ ${bluef} ▄████▄ ${purplef} ▄████▄ ${cyanf} ▄████▄ +${redf} ██▀▀▀▀██ ${greenf} ██▀▀▀▀██ ${yellowf} ██▀▀▀▀██ ${bluef} ██▀▀▀▀██ ${purplef} ██▀▀▀▀██ ${cyanf} ██▀▀▀▀██ +${redf} █ █ ${greenf} █ █ ${yellowf} █ █ ${bluef} █ █ ${purplef} █ █ ${cyanf} █ █ +${redf} █ ▄▀▀▄ █ ${greenf} █ ▄▀▀▄ █ ${yellowf} █ ▄▀▀▄ █ ${bluef} █ ▄▀▀▄ █ ${purplef} █ ▄▀▀▄ █ ${cyanf} █ ▄▀▀▄ █ +${redf} █ ▄█▬▄▄▬█▄ █ ${greenf}█ ▄█▬▄▄▬█▄ █ ${yellowf}█ ▄█▬▄▄▬█▄ █ ${bluef}█ ▄█▬▄▄▬█▄ █ ${purplef}█ ▄█▬▄▄▬█▄ █ ${cyanf}█ ▄█▬▄▄▬█▄ █ + +${boldon} +${redfbright} ▄████▄ ${greenfbright} ▄████▄ ${yellowfbright} ▄████▄ ${bluefbright} ▄████▄ ${purplefbright} ▄████▄ ${cyanfbright} ▄████▄ +${redfbright} ██▀▀▀▀██ ${greenfbright} ██▀▀▀▀██ ${yellowfbright} ██▀▀▀▀██ ${bluefbright} ██▀▀▀▀██ ${purplefbright} ██▀▀▀▀██ ${cyanfbright} ██▀▀▀▀██ +${redfbright} █ █ ${greenfbright} █ █ ${yellowfbright} █ █ ${bluefbright} █ █ ${purplefbright} █ █ ${cyanfbright} █ █ +${redfbright} █ ▄▀▀▄ █ ${greenfbright} █ ▄▀▀▄ █ ${yellowfbright} █ ▄▀▀▄ █ ${bluefbright} █ ▄▀▀▄ █ ${purplefbright} █ ▄▀▀▄ █ ${cyanfbright} █ ▄▀▀▄ █ +${redfbright} █ ▄█▬▄▄▬█▄ █ ${greenfbright}█ ▄█▬▄▄▬█▄ █ ${yellowfbright}█ ▄█▬▄▄▬█▄ █ ${bluefbright}█ ▄█▬▄▄▬█▄ █ ${purplefbright}█ ▄█▬▄▄▬█▄ █ ${cyanfbright}█ ▄█▬▄▄▬█▄ █ +${reset} + +EOF diff --git a/.local/bin/color-scripts/debian b/.local/bin/color-scripts/debian new file mode 100755 index 00000000..ceaf5ead --- /dev/null +++ b/.local/bin/color-scripts/debian @@ -0,0 +1,39 @@ +#!/bin/sh +# Based on ufetch-debian +# https://gitlab.com/jschx/ufetch/-/blob/master/ufetch-debian + +if [ -x "$(command -v tput)" ]; then + bold="$(tput bold)" + black="$(tput setaf 0)" + red="$(tput setaf 1)" + green="$(tput setaf 2)" + yellow="$(tput setaf 3)" + blue="$(tput setaf 4)" + magenta="$(tput setaf 5)" + cyan="$(tput setaf 6)" + white="$(tput setaf 7)" + reset="$(tput sgr0)" +fi + +# you can change these +ic="${reset}" # info +c0="${reset}${red}" +c1="${reset}${green}" +c2="${reset}${yellow}" +c3="${reset}${blue}" +c4="${reset}${magenta}" +c5="${reset}${cyan}" + +## OUTPUT + +cat </dev/null; then + LS_CMD="$(command -v find) ${DIR_COLORSCRIPTS} -maxdepth 1 -type f" + LS_CMD_B="$(command -v find) ${DIR_COLORSCRIPTS}/blacklisted -maxdepth 1 -type f" +else + LS_CMD="$(command -v ls) ${DIR_COLORSCRIPTS}" + LS_CMD_B="$(command -v ls) ${DIR_COLORSCRIPTS}/blacklisted" +fi + +list_colorscripts="$($LS_CMD | xargs -I $ basename $ | cut -d ' ' -f 1 | nl)" +length_colorscripts="$($LS_CMD | wc -l)" +list_blacklist="$($LS_CMD_B 2>/dev/null | xargs -I $ basename $ | cut -d ' ' -f 1 | nl || "")" +length_blacklist="$($LS_CMD_B 2>/dev/null | wc -l || 0)" + +fmt_help=" %-20s\t%-54s\n" +function _help() { + echo "Description: A collection of terminal color scripts." + echo "" + echo "Usage: colorscript [OPTION] [SCRIPT NAME/INDEX]" + printf "${fmt_help}" \ + "-h, --help, help" "Print this help." \ + "-l, --list, list" "List all installed color scripts." \ + "-r, --random, random" "Run a random color script." \ + "-e, --exec, exec" "Run a specified color script by SCRIPT NAME or INDEX." \ + "-b, --blacklist, blacklist" "Blacklist a color script by SCRIPT NAME or INDEX." \ + "-u, --unblacklist, unblacklist" "Unblacklist a color script by SCRIPT NAME or INDEX." \ + "-a, --all, all" "List the outputs of all colorscripts with their SCRIPT NAME" +} + +function _list() { + echo "There are "$($LS_CMD | wc -l)" installed color scripts:" + echo "${list_colorscripts}" +} + +function _list_blacklist() { + echo "There are $length_blacklist blacklisted color scripts:" + echo "${list_blacklist}" +} + +function _random() { + declare -i random_index=$RANDOM%$length_colorscripts + [[ $random_index -eq 0 ]] && random_index=1 + + random_colorscript="$(echo "${list_colorscripts}" | sed -n ${random_index}p | + tr -d ' ' | tr '\t' ' ' | cut -d ' ' -f 2)" + # echo "${random_colorscript}" + exec "${DIR_COLORSCRIPTS}/${random_colorscript}" +} + +function ifhascolorscipt() { + [[ -e "${DIR_COLORSCRIPTS}/$1" ]] && echo "Has this color script." +} + +function _run_by_name() { + if [[ "$1" == "random" ]]; then + _random + elif [[ -n "$(ifhascolorscipt "$1")" ]]; then + exec "${DIR_COLORSCRIPTS}/$1" + else + echo "Input error, Don't have color script named $1." + exit 1 + fi +} + +function _run_by_index() { + if [[ "$1" -gt 0 && "$1" -le "${length_colorscripts}" ]]; then + + colorscript="$(echo "${list_colorscripts}" | sed -n ${1}p | + tr -d ' ' | tr '\t' ' ' | cut -d ' ' -f 2)" + exec "${DIR_COLORSCRIPTS}/${colorscript}" + else + echo "Input error, Don't have color script indexed $1." + exit 1 + fi +} + +function _run_colorscript() { + if [[ "$1" =~ ^[0-9]+$ ]]; then + _run_by_index "$1" + else + _run_by_name "$1" + fi +} + +function _run_all() { + for s in $DIR_COLORSCRIPTS/*; do + echo "$(echo $s | awk -F '/' '{print $NF}'):" + echo "$($s)" + echo + done +} + +function _blacklist_colorscript() { # by name only + if [ ! -d "${DIR_COLORSCRIPTS}/blacklisted" ]; then + sudo mkdir "${DIR_COLORSCRIPTS}/blacklisted" + fi + sudo mv "${DIR_COLORSCRIPTS}/$1" "${DIR_COLORSCRIPTS}/blacklisted" +} + +function _unblacklist_colorscript() { # by name only + if [ -f "${DIR_COLORSCRIPTS}/blacklisted/$1" ]; then + sudo mv "${DIR_COLORSCRIPTS}/blacklisted/$1" "${DIR_COLORSCRIPTS}" + else + echo "Input error. Script $1 is not blacklisted!" + fi +} + +case "$#" in +0) + _help + ;; +1) + case "$1" in + -h | --help | help) + _help + ;; + -l | --list | list) + _list + ;; + -b | --blacklist | blacklist) + _list_blacklist + ;; + -r | --random | random) + _random + ;; + -a | --all | all) + _run_all + ;; + *) + echo "Input error." + exit 1 + ;; + esac + ;; +2) + if [[ "$1" == "-e" || "$1" == "--exec" || "$1" == "exec" ]]; then + _run_colorscript "$2" + elif [[ "$1" == "-b" || "$1" == "--blacklist" || "$1" == "blacklist" ]]; then + _blacklist_colorscript "$2" + elif [[ "$1" == "-u" || "$1" == "--unblacklist" || "$1" == "unblacklist" ]]; then + _unblacklist_colorscript "$2" + else + echo "Input error." + exit 1 + fi + ;; +*) + echo "Input error, too many arguments." + exit 1 + ;; +esac