dotfiles

*nix config files
git clone git://git.pyratebeard.net/dotfiles.git
Log | Files | Refs | README

commit 9d6d946325f2127fba6a93a4f8a95d73581fa71c
parent b509e75381b4db0bf3c180de5f87bf6ec038cf9b
Author: dudley <root@pyratebeard.net>
Date:   Fri, 14 Jul 2017 20:27:13 +0100

new fun scripts

Diffstat:
Abin/bin/colorbars | 38++++++++++++++++++++++++++++++++++++++
Abin/bin/colorscheme | 27+++++++++++++++++++++++++++
Abin/bin/emote | 125+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Abin/bin/food | 337+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Abin/bin/ghosts | 32++++++++++++++++++++++++++++++++
Abin/bin/pipes | 123+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Abin/bin/pipesx | 194+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Abin/bin/sysinfo | 132+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
8 files changed, 1008 insertions(+), 0 deletions(-)

diff --git a/bin/bin/colorbars b/bin/bin/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 diff --git a/bin/bin/colorscheme b/bin/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/bin/bin/emote b/bin/bin/emote @@ -0,0 +1,125 @@ +#!/bin/sh +# +# created from https://redd.it/2skqh9 +# in case kori REALLY registered the "emote" name... DID YOU DO THAT ? +# emoth - 2015 (c) wtfpl z3bra.org + +usage() { + echo "$(basename $0) <name>" + exit 1 +} + +case $1 in + shrug) + printf "┐('-')┌" + ;; + shrug2) + printf "┐('~'; )┌" + ;; + rage) + printf "(╯°□°)╯︵ ┻━┻" + ;; + bear) + printf "ʕ •ᴥ•ʔ" + ;; + dissaprove) + printf "(ಠ_ಠ)" + ;; + thatguy) + printf "(¬_¬)" + ;; + lenny) + printf "( ͡° ͜ʖ ͡°)" + ;; + satan) + printf "ψ(`∇´)ψ" + ;; + yuno) + printf "ლ(ಠ益ಠლ)" + ;; + whistle) + printf "♪(´ε` )" + ;; + dance) + printf "~(^3^)~" + ;; + party) + printf "└[∵]┐└[∵]┘┌[∵]┘└[∵]┐└[∵]┘┌[∵]┘" + ;; + stare) + printf "( ´_⊃`)" + ;; + kiss) + printf "( ˘ ³˘)♥" + ;; + shades) + printf "(•_•) ( •_•)>⌐■-■ (⌐■_■)" + ;; + magic) + printf "(∩`-´)⊃━☆゚.*・。゚" + ;; + magic2) + printf "▒▒▓█▇▅▂∩( ✧Д✧)∩▂▅▇█▓▒▒" + ;; + shame) + printf "(◞‸◟;)" + ;; + fu) + printf "┌∩┐(◣_◢)┌∩┐" + ;; + mad) + printf "(⇀‸↼‶)" + ;; + flex) + printf "ᕙ(⇀‸↼‶)ᕗ" + ;; + trip) + printf "。.*:・’゚:。'(((+_+)))。.*:゚・’゚゚:。’・゚" + ;; + drown) + printf "︵‿︵‿︵‿︵‿︵‿︵‿︵‿ヽ(゜□゜ )ノ︵‿︵‿︵‿︵‿︵‿" + ;; + squid) + printf "<コ:彡" + ;; + walrus) + printf "(:3 っ)っ" + ;; + fish) + printf "<º)))><" + ;; + psp) + printf "(+[__]∙:∙)" + ;; + nes) + printf "[+=••]" + ;; + sad) + printf "(╥﹏╥)" + ;; + cry) + printf "( -̥̥̥̥̥̥̥̥̥̥̥̥̥̥̥̥̥̥̥̥̥̥̥̥̥᷄◞ω◟-̥̥̥̥̥̥̥̥̥̥̥̥̥̥̥̥̥̥̥̥̥̥̥̥̥᷅ )" + ;; + lol) + printf "┐(^0^)┌" + ;; + smoke) + printf "(_̅_̅_̅_̅_̅м̅a̅я̅i̅j̅u̅a̅n̅a̅_̅_̅_̅ () ด้้้้้็็็็็้้้้้็็็็็้้้้้้้้็็็็็้้้้้็็็็็้้้้้้้้็็็็็้้้้้็็็็็้้้้้้้้็็็็็้้้้้็็็็็" + ;; + loot) + printf "[̲̅$̲̅(̲̅ ͡° ͜ʖ ͡°̲̅)̲̅$̲̅]" + ;; + infinitesadness) + printf "Ỏ̷͖͈̞̩͎̻̫̫̜͉̠̫͕̭̭̫̫̹̗̹͈̼̠̖͍͚̥͈̮̼͕̠̤̯̻̥̬̗̼̳̤̳̬̪̹͚̞̼̠͕̼̠̦͚̫͔̯̹͉͉̘͎͕̼̣̝͙̱̟̹̩̟̳̦̭͉̮̖̭̣̣̞̙̗̜̺̭̻̥͚͙̝̦̲̱͉͖͉̰̦͎̫̣̼͎͍̠̮͓̹̹͉̤̰̗̙͕͇͔̱͕̭͈̳̗̭͔̘̖̺̮̜̠͖̘͓̳͕̟̠̱̫̤͓͔̘̰̲͙͍͇̙͎̣̼̗̖͙̯͉̠̟͈͍͕̪͓̝̩̦̖̹̼̠̘̮͚̟͉̺̜͍͓̯̳̱̻͕̣̳͉̻̭̭̱͍̪̩̭̺͕̺̼̥̪͖̦̟͎̻̰_Ỏ̷͖͈̞̩͎̻̫̫̜͉̠̫͕̭̭̫̫̹̗̹͈̼̠̖͍͚̥͈̮̼͕̠̤̯̻̥̬̗̼̳̤̳̬̪̹͚̞̼̠͕̼̠̦͚̫͔̯̹͉͉̘͎͕̼̣̝͙̱̟̹̩̟̳̦̭͉̮̖̭̣̣̞̙̗̜̺̭̻̥͚͙̝̦̲̱͉͖͉̰̦͎̫̣̼͎͍̠̮͓̹̹͉̤̰̗̙͕͇͔̱͕̭͈̳̗̭͔̘̖̺̮̜̠͖̘͓̳͕̟̠̱̫̤͓͔̘̰̲͙͍͇̙͎̣̼̗̖͙̯͉̠̟͈͍͕̪͓̝̩̦̖̹̼̠̘̮͚̟͉̺̜͍͓̯̳̱̻͕̣̳͉̻̭̭̱͍̪̩̭̺͕̺̼̥̪͖̦̟͎̻̰" + ;; + shit) + printf "▄█▀ █▬█ █ ▀█▀" + ;; + iotek) + printf "⇌" + ;; + # add more as you please + *) + usage + ;; +esac diff --git a/bin/bin/food b/bin/bin/food @@ -0,0 +1,337 @@ +#!/bin/sh +# food: {ascii/ansi} art food in your terminal +# +# ████ ██ +# ░██░ ░██ +# ██████ ██████ ██████ ░██ +# ░░░██░ ██░░░░██ ██░░░░██ ██████ +# ░██ ░██ ░██░██ ░██ ██░░░██ +# ░██ ░██ ░██░██ ░██░██ ░██ +# ░██ ░░██████ ░░██████ ░░██████ +# ░░ ░░░░░░ ░░░░░░ ░░░░░░ +# +# ▓▓▓▓▓▓▓▓▓▓ +# ░▓ author ▓ xero <x@xero.nu> +# ░▓ code ▓ http://code.xero.nu/dotfiles +# ░▓ mirror ▓ http://git.io/.files +# ░▓▓▓▓▓▓▓▓▓▓ +# ░░░░░░░░░░ + +usage() { +printf "usage: `basename $0` \n\ + [--burger burger] curl -L git.io/burger\n\ + [--coffee coffee] curl -L git.io/coffee\n\ + [--hotcoffee hotcoffee] curl -Ls git.io/hotcoffee | sh\n\ + [--pancakes pancakes] curl -L git.io/pancakes\n\ + [--pizza pizza] curl -L git.io/pizzza\n\ + [--pizza2 pizza2] curl -L git.io/pizzza\n\ + [--poptart poptart] curl -L git.io/poptart\n\ + [--rice rice] curl -L git.io/rice\n\ + [--vburger vburger] curl -L git.io/vburger\n\ + [--waffles waffles] curl -L git.io/waffles\n\ + [--help help]\n" +} + +taco() { +cat << TACO + + ▄▄▄▄ ▄▄ ▄▄▄▄▄▄ + ▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄▄  + ▄▄▄▄ ▄ ▄▄▄▄▄ ▄ ▄ ▄  ▄▄▄ + ▄▄▄▄▄ ▄▄▄▄▄ ▄ ▄ ▄ ▄▄▄ + ▀▄▄▄▄▄▄▄▄▄ ▄ ▄ ▄ ▄    + ▄▄▄ ▄ ▄▄   ▄ ▄ ▄ ▄ ▄ ▄▄  +  ▄▄▄▄▄▄  ▄ ▄ ▄ ▄▄▄▄▄   +▄▄▄▄▄▄▄▄▄   ▄▄ ▄ ▄▄▄▄ ▄▄▄▄ ▄ +  ▄▄ ▄▄▄   ▄▄ ▄▄▄▄ ▄▄▄▄ ▄▄▀▀ + ▀▄ ▄  ▄   ▄▄▄▄ ▄▄▄▄ ▄▄▀▀ +  ▄▄ ▄▄▄▄▄ ▄▄▄▄ ▄▄▀▀ + ▄▄▄▄ ▄▄▄▄▄ ▄▄▀▀ + ▀▀▀▄▄▄▄▄▄▀▀▀ +  +TACO +} + +pizza() { +cat << PIZZA + ▄▄▀▀▀▀▀▄ + ▄▄▀ ▀▀▀▀▀▀▀  + ▄▀▀   ▀▀▀▀▀▀▀▀ ▀▄ + ▄▀▀▀  ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄ + ▄▀▀ ▀▀ ▀▀▀▀▀  ▀▀▀▀ ▀▀▀▀▀▄ +  ▀▀▀▀▀ ▀ ▀▀▀▀▀▀▀  ▀▀ ▀▀▀▀  +  ▀▀ ▀▀▀ ▀▀▀▀▀▀▀▀  ▀▀▀  ▀▀   + ▀▀▀▀   ▀▀ ▀▀▀   ▀▀▀▀▀   ▀ ▀▀▄ + ▀▀▀▀▀▀▀▀ ▀▀ ▀▀  ▀    ▀▀ ▀▀▀▀▄ + ▀▀▀▀ ▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀    + ▀▀▀▀▀    ▀▀▀▀▀  ▀▀▀▀▀▀▄ +    ▀▀   ▀▀▀▀▀▀▀▀▀▀▀▄ +  ▀▀▄ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀  +      ▀▀   ▀▀▀▀▀▀▀▀▀ + ▀▀     + ▄▀▀  +      + ▀▀ +PIZZA +} + +pizza2() { +cat << PIZZA + ▄▄▄▄▄▄▄▄▄▄ + ▄▄▄▄▄ ▄▄ ▄▄   + ▄▄ ▄▄ ▄▄ ▄▄▄▄ ▄  + ▄▄  ▄ ▄▄ ▄ ▄▄▄▄▄▄  +▄▄▄ ▄ ▄ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ +   ▄ ▄ ▄▄▄▄ ▄ ▄▄ ▄▄   +▀▄   ▄▄▄▄▄▄▄▄ ▄▄▄ ▄ ▄ ▄  + ▀▄▄▄▄▄▄▄▄▄▄▄▄ ▄ ▄ ▄▄▄ + ▀▀▄▄▄▄ ▄ ▄ ▄▄▄ ▄▄▄▄   + ▀▄▄ ▄▄▄ ▄▄▄  ▄▄▄ + ▀▀▄▄▄▄▄▄  ▄▄ ▄ ▄ + ▀▄▄▄▄▄▄▄ ▄     + ▀▀▄▄▄▄▄▄ ▄▄▄ + ▀▄▄▄▄    + ▀▄▄▄▄▄▄ + ▀▀▄  +PIZZA +} + +pancakes() { +cat << PANCAKES + ▄▄▄▄▄▄▀▄▄▄▄▄▄▄ + ▄▄▄▄▀▀▀▀        ▀▀▀▀▀▀▄▄▄ + ▄▄ ▀ ▀   ▀  ▀▀▀▀▀▀▀     ▀  ▀▄ +▄▀▀     ▀▀   ▀▀▀▀▀▀▀   ▀▀ ▀   ▄ +       ▀      ▀▀ ▀ ▀▀▀▀▀▀▀▀▀ ▀  +▀▀ ▀▀▀▀  ▀▀    ▀▀ ▀▀▀▀   ▀▀▀▀ ▀▄ + ▀    ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀   ▀▀    +   ▀▀▀▀              ▀▀▀▀  ▀     +   ▀▀  ▀▀▀ ▀▀▀▀ ▀▀▀▀▀  ▀▀▀ ▀▀▀   + ▀  ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀  ▀  +   ▀▀▀                   ▀▀▀     +  ▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀   ▀▀▀   + ▀ ▀    ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀   ▀▀▀▀ + ▀▀▀▀  ▀▀▀▀▀▀▀▀▀▀▀▀▀▀  ▀▀▀▀ + ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ +PANCAKES +} + +poptart() { +cat << POPTART + ▄▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄ +  ▀ ▀▀ ▀  ▀▀▀▀▀▀▀▀▀▀▀▀▀  ▀ ▀▀▄ + ▀   ▀▀▀      ▀▀       ▀▀▀▀▀ ▀▀▀▄ + ▀▀ ▀▀▀                  ▀▀▀▀▀  ▀▄ +  ▀      ▀▀          ▀     ▀▀▀ ▀▀   +         ▀▀                     ▀▀  + ▀▀     ▀                 ▀▀▀▀▀ ▀   + ▀▀                       ▀  ▀▀▀▀   + ▀                          ▀▀▀▀ ▀  + ▀▀  ▀▀        ▀ ▀       ▀▀ ▀▀▀▀▀▀  + ▀                       ▀▀         +             ▀       ▀          ▀▀  + ▀▀      ▀▀                    ▀▀▀  + ▀▀   ▀ ▀▀▀             ▀▀▀         +      ▀          ▀      ▀▀          + ▀▀   ▀▀▀▀      ▀▀▀                 +     ▀▀▀▀▀▀  ▀                      +  ▀ ▀▀ ▀▀▀ ▀▀▀▀▀▀▀ ▀▀   ▀▀▀▀ ▀▀▀    +  ▀   ▀▀                    ▀       +   ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀     + ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ +POPTART +} + +waffles() { +cat << WAFFLES + ▄▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄ + ▄▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀   ▀▀ ▀▀▀  ▀▀▄ +▄▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀   ▀▀▀▀▀▀▀ ▀▄ +   ▀    ▀ ▀ ▀▀      ▀   ▀    ▀▀▀   + ▀ ▀▀  ▀▀ ▀▀  ▀ ▀ ▀▀▀ ▀  ▀  ▀▀▀▀   + ▀▀▀▀▀▀ ▀▀▀ ▀   ▀▀▀▀▀▀▀▀ ▀▀▀▀▀ ▀   +  ▀▀▀   ▀   ▀   ▀▀▀     ▀▀    ▀▀   + ▀     ▀▀  ▀▀  ▀ ▀▀ ▀   ▀  ▀▀▀ ▀   + ▀ ▀    ▀    ▀ ▀▀       ▀    ▀     + ▀▀ ▀  ▀▀▀▀▀▀▀    ▀▀▀    ▀  ▀▀▀▀   +    ▀▀▀▀▀  ▀ ▀ ▀ ▀▀ ▀    ▀▀▀▀▀     + ▀ ▀▀▀▀▀▀▀ ▀▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀   + ▀     ▀▀        ▀▀ ▀      ▀▀▀     +   ▀   ▀▀    ▀    ▀     ▀   ▀▀     +▀▀ ▀▀▀▀▀▀▀  ▀ ▀▀▀▀▀▀▀ ▀  ▀▀▀▀▀▀▀▀▀ + ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ + ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ +WAFFLES +} + +burger() { +cat << BURGER + ▄▄▄▄▀▀▀▀▀▀▄▄▄▄ + ▄▄▀▀▀▀▀ ▀  ▀▀▀▀▀▀▀▀▀▄▄ + ▄▀  ▀  ▀  ▀▀▀ ▀ ▀▀▀ ▀▀ ▀▀▄ + ▄▀▀  ▀▀   ▀▀▀▀ ▀  ▀▀ ▀▀  ▀▀▀▄ + ▄▀  ▀ ▀   ▀  ▀▀▀ ▀   ▀▀▀ ▀▀▀▀ ▄ + ▄▀▀▀▀▀▀▀▀▀  ▀  ▀   ▀▀  ▀▀▀▀▀     +  ▀▀▀▀ ▀▀ ▀▀ ▀  ▀ ▀  ▀ ▀▀▀▀ ▀▀▀ ▀ +  ▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄▄ +▄▀▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ ▀▀ +▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ ▀ ▀▀▀▀▀▀▀ ▀▀▀ +  ▀▀▀▀▀▀▀▀         ▀▀▀ ▀ ▀▀▀▀▀▀▄ + ▄▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ +▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ ▀▀  +  ▀▀▀▀▀▀▀ ▀▀▀▀▀▀ ▀  ▀   ▀▀▀▀▀  +  ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀  +  ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀  + ▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ + ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ +BURGER +} + +vburger() { +cat << VBURGER + ▄▄▄▄▄▄▄▄▄▄ + ▄▄▄▄▄▄ ▄▄ ▄▄▄▄ ▄▄▄▄▄ + ▄▄▄▄▄ ▄▄ ▄▄▄ ▄▄▄ ▄ ▄▄ + ▄▄▄▄  ▄▄ ▄  ▄  ▄▄▄ ▄▄ +▄▄▄ ▄ ▄ ▄▄ ▄ ▄ ▄▄▄   +   ▄▄ ▄ ▄ ▄▄▄ ▄ ▄ ▄▄▄▄ ▄▄ ▄▀ +▀▄ ▄ ▄▄▄  ▄ ▄ ▄▄▄ ▄▄ ▄▄▄▄▄▄▄▄ +▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄ ▄▄▀ +▀▄ ▄▄ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄  ▄▄ ▄▄  +▀▄▄▄ ▄▄ ▄▄▄▄▄▄ ▄ ▄ ▄▄▄▄▄▄▄  + ▀▄ ▄  ▄▄ ▄▄▄▄ ▄ ▄▄ ▄ ▄ ▄ ▄    +  ▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄ ▄▄▄▄▄     +   ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▀ +   ▄▄ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ▄ ▄▄▄▄ ▀ + ▀▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▀▀ + ▀▀▀▀▄▄▄▄▄▄▄▄▄▄▀▀▀ +VBURGER +} + +rice() { +cat << RICE + ▄▄▄▄▄▄ + ▄▄▄▄ ▄ ▄ ▄▄▄▄ + ▄▄▄▄▄ ▄▄ ▄ ▄ ▄▄▄▄▄▄ + ▄▄▄ ▄▄ ▄ ▄ ▄ ▄ ▄ ▄▄ ▄▄▄ +  ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ▄ + ▀▄ ▄▄ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ▄▄ ▄▀ + ▀▄  ▄▄▄▄▄▄ ▄▄▄▄▄▄  ▄▀ + ▀▄ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ▄▀ + ▀▄ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ▄▀ + ▀▀▄▄▄ ▄ ▄▄▄▀▀ + ▀▀▀▀▀▀▀▀ +RICE +} + +coffee() { +cat << COFFEE + ▄▄▄▄▄▄▄▄▄▄ +   ▀▀▀ ▀  ▀▀▀  ▄ +  ▀▀  ▀▀▀▀      ▀▀  +   ▀▀▀▀▀    ▀▀▀▀▀▀  +      ▀▀▀▀▀▀▀▀▀        ▄ +                   ▀ ▀ ▀ +   ▀            ▀▀   ▀ +      ▀▀▀▀▀▀▀▀▀      ▀ +  ▀                     +  ▀                 ▀▀▀▀ +  ▀                ▀▀ + ▀                ▀   ▄▄ + ▀▀▀▀        ▀▀▀▀  ▀▀▀ + ▀▀▀▀▀▀▀▀▀▀▀▀▀ +COFFEE +} + +steam(){ +case "$1" in +"0") +cat << X0 + : : : : : + : : : : : + : : : : : + : : : : : +X0 +;; +"1") +cat << X0 + : : : : : + : : : : : + : : : : : + : : : : : +X0 +;; +"2") +cat << X0 + : : : : : + : : : : : + : : : : : + : : : : : +X0 +;; +"3") +cat << X0 + : : : : : + : : : : : + : : : : : + : : : : : +X0 +;; +esac +} + +hotcoffee() { + steam 1 + coffee + + x=0 + while :; do +cat << X0 + +X0 + steam $x + coffee + [ "$x" -le "2" ] && x=$((x+1)) || x=0 + sleep 0.25 + done +} + +case "$1" in + *--burger|burger) + burger + ;; + *--vburger|vburger) + vburger + ;; + *--poptart|poptart) + poptart + ;; + *--rice|rice) + rice + ;; + *--waffles|waffles) + waffles + ;; + *--pancakes|pancakes) + pancakes + ;; + *--pizza2|pizza2) + pizza2 + ;; + *--pizza|pizza) + pizza + ;; + *--taco|taco) + taco + ;; + *--coffee|coffee) + coffee + ;; + *--hotcoffee|hotcoffee) + hotcoffee + ;; + *) + taco + usage + ;; +esac diff --git a/bin/bin/ghosts b/bin/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/bin/bin/pipes b/bin/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/stdin>/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/bin/bin/pipesx b/bin/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/bin/bin/sysinfo b/bin/bin/sysinfo @@ -0,0 +1,132 @@ +#!/bin/sh +# ██ ████ +# ░░ ░██░ +# ██████ ██ ██ ██████ ██ ███████ ██████ ██████ +# ██░░░░ ░░██ ██ ██░░░░ ░██░░██░░░██░░░██░ ██░░░░██ +# ░░█████ ░░███ ░░█████ ░██ ░██ ░██ ░██ ░██ ░██ +# ░░░░░██ ░██ ░░░░░██░██ ░██ ░██ ░██ ░██ ░██ +# ██████ ██ ██████ ░██ ███ ░██ ░██ ░░██████ +# ░░░░░░ ██ ░░░░░░ ░░ ░░░ ░░ ░░ ░░░░░░ +# ░░ +# +# ▓▓▓▓▓▓▓▓▓▓ +# ░▓ author ▓ xero <x@xero.nu> +# ░▓ code ▓ http://code.xero.nu/dotfiles +# ░▓ mirror ▓ http://git.io/.files +# ░▓▓▓▓▓▓▓▓▓▓ +# ░░░░░░░░░░ +# +#█▓▒░ vars +#FULL=▓ +#EMPTY=░ +FULL=━ +#EMPTY=━ +#EMPTY=─ +#FULL=┅ +EMPTY=┄ + +name=$USER +host=`hostname` +battery=/sys/class/power_supply/BAT1 +distro="arch linux" +kernel=`uname -r` +pkgs=`pacman -Qqs | wc -l` +colors='miasma' +font='gohufont 11' +wm='2bwm' + +#█▓▒░ progress bar +draw() +{ + perc=$1 + size=$2 + inc=$(( perc * size / 100 )) + out= + if [ -z $3 ] + then + color="36" + else + color="$3" + fi + for v in `seq 0 $(( size - 1 ))`; do + test "$v" -le "$inc" \ + && out="${out}\e[1;${color}m${FULL}" \ + || out="${out}\e[0;${color}m${EMPTY}" + done + printf $out +} + +#█▓▒░ colors +printf "\n" +i=0 +while [ $i -le 6 ] +do + printf "\e[$((i+41))m\e[$((i+30))m█▓▒░" + i=$(($i+1)) +done +printf "\e[37m█\e[0m▒░\n\n" + + +#█▓▒░ greets +printf " \e[0m hello \e[36m$name\033[0m, i'm \e[34m$host\n" +printf " \e[0m\n" + +#█▓▒░ environment +printf " \e[1;33m distro \e[0m$distro\n" +printf " \e[1;33m kernel \e[0m$kernel\n" +printf " \e[1;33m packages \e[0m$pkgs\n" +printf " \e[1;33m wm \e[0m$wm\n" +printf " \e[1;33m font \e[0m$font\n" +printf " \e[1;33m colors \e[0m$colors\n" +printf " \e[0m\n" + +#█▓▒░ cpu +cpu=$(grep 'cpu ' /proc/stat | awk '{usage=($2+$4)*100/($2+$4+$5)} END {print usage}') +c_lvl=`printf "%.0f" $cpu` +printf " \e[0;36m%-4s \e[1;36m%-5s %-25s \n" " cpu" "$c_lvl%" `draw $c_lvl 15` + +#█▓▒░ ram +ram=`free | awk '/Mem:/ {print int($3/$2 * 100.0)}'` +printf " \e[0;36m%-4s \e[1;36m%-5s %-25s \n" " ram" "$ram%" `draw $ram 15` + +#█▓▒░ battery +b_full=$battery/charge_full +b_now=$battery/charge_now +bf=`cat $b_full` +bn=`cat $b_now` +charge=`printf $(( 100 * $bn / $bf ))` + +case 1 in + $(($charge <= 15))) + color='31' + ;; + *) + color='36' + ;; +esac +printf " \e[0;${color}m%-4s \e[1;${color}m%-5s %-25s \n" " bat" "$charge%" `draw $charge 15 $color` + +#█▓▒░ volume +vol=`amixer get Master | awk '$0~/%/{print $4}' | tr -d '[]%'` +if amixer get Master | grep -q '\[off\]' +then + color='31' +else + color='36' +fi +printf " \e[0;${color}m%-4s \e[1;${color}m%-5s %-25s \n" " vol" "$vol%" `draw $vol 15 $color` + +#█▓▒░ temperature +temp=`sensors | awk '/Core\ 0/ {gsub(/\+/,"",$3); gsub(/\..+/,"",$3) ; print $3}'` +case 1 in + $(($temp <= 50))) + color='34' + ;; + $(($temp >= 75))) + color='31' + ;; + *) + color='36' + ;; +esac +printf " \e[0;${color}m%-4s \e[1;${color}m%-5s %-25s \n\n" "temp" "$temp°c " `draw $temp 15 $color`