dotfiles

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

commit e12553a7105dc2b8d21ba0e18736e9aea2f3bced
parent 0a6b747c26f2479f3dba1d9a62db59cca051fb6f
Author: pyratebeard <root@pyratebeard.net>
Date:   Fri,  8 Dec 2023 12:09:56 +0000

moved scripts to new repo

https://git.pyratebeard.net/scripts

Diffstat:
Dbin/bin/ahoy | 219-------------------------------------------------------------------------------
Dbin/bin/az | 2--
Dbin/bin/bgchange | 10----------
Dbin/bin/blocks | 3---
Dbin/bin/blocks1 | 3---
Dbin/bin/bombs | 32--------------------------------
Dbin/bin/capture | 5-----
Dbin/bin/checkip | 15---------------
Dbin/bin/colorbars | 38--------------------------------------
Dbin/bin/colorbars-sm | 35-----------------------------------
Dbin/bin/colorcodes.sh | 6------
Dbin/bin/colorer | 22----------------------
Dbin/bin/colorscheme | 27---------------------------
Dbin/bin/connect | 66------------------------------------------------------------------
Dbin/bin/disconnect | 16----------------
Dbin/bin/emote | 125-------------------------------------------------------------------------------
Dbin/bin/fontpreview.sh | 12------------
Dbin/bin/food | 337-------------------------------------------------------------------------------
Dbin/bin/ghosts | 31-------------------------------
Dbin/bin/gotty | 0
Dbin/bin/hashwall | 82-------------------------------------------------------------------------------
Dbin/bin/hexcodes | 43-------------------------------------------
Dbin/bin/hsetroot | 0
Dbin/bin/htmldump | 21---------------------
Dbin/bin/lines | 3---
Dbin/bin/linez | 3---
Dbin/bin/lock | 3---
Dbin/bin/mario | 39---------------------------------------
Dbin/bin/mdpdf | 41-----------------------------------------
Dbin/bin/newstuir | 5-----
Dbin/bin/panes | 23-----------------------
Dbin/bin/pb | 142-------------------------------------------------------------------------------
Dbin/bin/pipes | 123-------------------------------------------------------------------------------
Dbin/bin/pipesx | 194-------------------------------------------------------------------------------
Dbin/bin/powerdl | 29-----------------------------
Dbin/bin/ptt | 19-------------------
Dbin/bin/sdd | 168-------------------------------------------------------------------------------
Dbin/bin/shellz | 50--------------------------------------------------
Dbin/bin/shortner | 2--
Dbin/bin/sitrep | 68--------------------------------------------------------------------
Dbin/bin/skull | 59-----------------------------------------------------------
Dbin/bin/skulls | 40----------------------------------------
Dbin/bin/skully | 44--------------------------------------------
Dbin/bin/skullz | 42------------------------------------------
Dbin/bin/src_fetch | 15---------------
Dbin/bin/switchkb | 20--------------------
Dbin/bin/syscat | 105-------------------------------------------------------------------------------
Dbin/bin/sysinfo | 128-------------------------------------------------------------------------------
Dbin/bin/todo | 37-------------------------------------
Dbin/bin/todosync | 13-------------
Dbin/bin/tvshuf | 14--------------
Dbin/bin/wacom | 6------
Dbin/bin/weather | 13-------------
Dbin/bin/webimg | 46----------------------------------------------
Dbin/bin/windowcast | 13-------------
55 files changed, 0 insertions(+), 2657 deletions(-)

diff --git a/bin/bin/ahoy b/bin/bin/ahoy @@ -1,219 +0,0 @@ -#!/usr/bin/env bash -# ██ -# ░██ ██ ██ -# ██████ ░██ ██████ ░░██ ██ -# ░░░░░░██ ░██████ ██░░░░██ ░░███ -# ███████ ░██░░░██░██ ░██ ░██ -# ██░░░░██ ░██ ░██░██ ░██ ██ -# ░░████████░██ ░██░░██████ ██ -# ░░░░░░░░ ░░ ░░ ░░░░░░ ░░ -# -# author ▓▒ pyratebeard -# code ▓▒ https://git.pyratebeard.net/ -# -# TODO -# * add rkhunter check -# * add clamav check -# * server details - -basename="${0##*/}" - -# colours -black="\e[30m" -red="\e[31m" -green="\e[32m" -yellow="\e[33m" -blue="\e[34m" -magenta="\e[35m" -cyan="\e[36m" -white="\e[37m" -light_black="\e[1;30m" -light_red="\e[1;31m" -light_green="\e[1;32m" -light_yellow="\e[1;33m" -light_blue="\e[1;34m" -light_magenta="\e[1;35m" -light_cyan="\e[1;36m" -light_white="\e[1;37m" -lighter_black="\e[38;5;241m" -reset="\e[0m" - -display_tasks=0 - -usage() { - echo "Usage: ${basename} [-b] [-h] [-m] [-t] [-r] [-s <hostname>] [-w] - - -b: backups - -h: help (this page) - -m: mail - -t: tasking - -r: rss - -s: show <hostname> details, use 'all' to show all - -w: weather -" -} - -heading() { - header="$(echo ${1} | sed -e 's/\(.\)/\1 /g')" - echo -e "${lighter_black}├┄ ${light_white}${header}${reset}" -} - -tasking() { - heading ${FUNCNAME[0]} - total_tasks=$(cat $HOME/.todo | wc -l) - - echo -e "${lighter_black}│${reset}you have ${light_green}${total_tasks}${reset} task(s)" -} - -# check nightly backups -backups() { - heading ${FUNCNAME[0]} - local backup_success=0 - local failed="" - _repos=$(find /var/dedup/* -maxdepth 1 -type d -prune -printf '%f\n') - for r in ${_repos} ; do - _latest=$(find /var/dedup/${r}/archive -type f \ - -exec stat -c '%X %n' {} \; | \ - sort -nr | \ - awk -F\/ 'NR==1 {print $NF}') - if [[ "${_latest}" -lt $(date +%Y%m%d) ]] ; then - backup_success=$(( backup_success + 1 )) - failed+="${r} " - fi - done - [[ ${backup_success} -gt 0 ]] \ - && echo -e "${lighter_black}│${reset}frak! ${failed}${red}failed${reset}" \ - || echo -e "${lighter_black}│${reset}schway! backup ${light_green}successful${reset}" -} - -# weather in current location -weather() { - heading ${FUNCNAME[0]} - if [ -f /tmp/weather ] ; then - wttr=$(cat /tmp/weather | awk -F\: '{print $2}' | cut -c 2-) - echo -e "${lighter_black}│${reset}${wttr}" - else - $HOME/bin/weather - fi -} - -# you've got mail -mail() { - heading ${FUNCNAME[0]} - local -r mail_dir="$HOME/var/mbox" - - local -r pyratebeard_mail=$(find "${mail_dir}"/pyratebeard/INBOX/new/ -type f | wc -l) - local -r unread_mail=$(find "${mail_dir}"/pyratebeard/INBOX/cur/ -type f ! -name "*S" | wc -l) - echo -e "${lighter_black}│${reset}you have ${light_green}${pyratebeard_mail}${reset} new mail(s)" - echo -e "${lighter_black}│${reset}you have ${light_green}${unread_mail}${reset} unread mail(s)" -} - -# not currently used but keeping for future reference -getnews() { - local -r api_key=$(pass websites/newsapi/key) - curl 'https://newsapi.org/v2/top-headlines' -s -G \ - -d sources="$1" \ - -d pageSize=5 \ - -d apiKey="${api_key}" | jq -r 'def default: "\u001b[0m"; def grey: "\u001b[1;30m"; .articles[] | .title, grey + .url, "" + default' | tr -d '\t' -} - -rss() { - heading ${FUNCNAME[0]} - if [ -f ~/.newsboat/cache.db.lock ] ; then - echo -e "${lighter_black}│${reset}${light_black}waiting for newsboat refresh...${reset}" - sleep 10 - fi - local unread_count - unread_count=$(sqlite3 ~/.newsboat/cache.db "select count(unread) from rss_item where unread = 1;") - local queued_pods - queued_pods=$(wc -l ~/.newsboat/queue | awk '{print $1}') - echo -e "${lighter_black}│${reset}there are ${light_green}${unread_count}${reset} unread items" - echo -e "${lighter_black}│${reset}you have ${light_green}${queued_pods}${reset} queued podcasts" -} - -servers() { - echo -e "${cyan} - ┐─┐┬─┐┬─┐┐ ┬┬─┐┬─┐┐─┐ - └─┐├─ │┬┘│┌┘├─ │┬┘└─┐ - ──┘┴─┘┆└┘└┘ ┴─┘┆└┘──┘ -${reset}" - local server="$1" - if [ "${server}" == "all" ] ; then - for node in blacksun grimoire pyratetube mordhaus ; do - heading "${node}" - uptime=$(ssh -q "${node}" "uptime -p | cut -b4- | sed 's/\(,\|ear\|eek\(s\)\|ay\(s\)\|our\(s\)\|inute\(s\)\)//g'") - echo -e "uptime is ${uptime}" - echo - done - else - heading "${server}" - uptime=$(ssh -q "${server}" "uptime -p | cut -b4- | sed 's/\(,\|ear\|eek(s)\|ay(s)\|our(s)\|inute(s)\)//g'") - - echo -e "uptime is ${uptime}" - echo - fi -} - -main() { -# echo -e "${blue}│${magenta} ┳━┓┳ ┳┏━┓┓ ┳ -#${blue}│${magenta} ┃━┫┃━┫┃ ┃┗┏┛ -#${blue}│${magenta} ┛ ┇┇ ┻┛━┛ ┇ -#${blue}└──┄┄────┄┄───┐${yellow} -# $(whoami) ${blue}│ -#┌──┄┄────┄┄───┘${reset}" -#${lighter_black}┊ ${light_blue}██ ▄ █ ████▄ ▀▄ ▄ ▄ -#${lighter_black}┊ ${light_blue}█ █ █ █ █ █ █ █ █ -#${lighter_black}│ ${light_blue}▓▄▄█ ▓▓▀▀█ ▓ █ ▀█ █ -#${lighter_black}┊ ${light_blue}▓ ▒ ▓ ▓ ▀▓▓▒▒ ▓ ▒ -#${lighter_black}│ ${light_blue} ▒ ▒ ▄▀ -#${lighter_black}├───${light_blue}▒${lighter_black}────${light_blue}▀${lighter_black}┄┄ ${light_yellow}$(whoami)${light_blue} ▀ -#${lighter_black}│ ${light_blue} ▀${reset}" - echo -e " -${lighter_black}┊ ${light_blue} ██ █ █ ██ █ █ ${reset}${light_black} ▄█████▄ -${lighter_black}┊ ${light_blue} █ █ █ █ █ █ █ █ ${reset}${light_black} ▄███████▄ -${lighter_black}│ ${light_blue} ▓ █ ▓ █ ▓ █ ▓ █ ${reset}${light_black} ░██ ░█ ░██ -${lighter_black}┊ ${light_blue} ▓▓▓ ▓▓▓ ▓ ▓ ▓ ${reset}${light_black} ░░███████ -${lighter_black}│ ${light_blue} ▒ ▒ ▒ ▒ ▒▒▒ ▒ ${reset}${light_black} ░░█░█░█ -${lighter_black}├────${light_blue}▒${lighter_black}─${light_blue}▒${lighter_black}┄ ${light_yellow}$(whoami) ${reset}${light_black}░ ░ ░ -${lighter_black}│ ${light_blue}▒ ▒${reset}" -# ┳━┓┳ ┳┏━┓┓ ┳ -# ┃━┫┃━┫┃ ┃┗┏┛ -# ┛ ┇┇ ┻┛━┛ ┇ -# ┳━┓┳ ┳┏━┓o -# ┃━┫┃━┫┃ ┃┃ -# ┛ ┇┇ ┻┛━┛┇ -# かいぞく -# ░█▀█░█░█░█▀█░█░█░ -# ░█▀█░█▀█░█░█░░█░░ -# ░▀░▀░▀░▀░▀▀▀░░▀░░ -# - #echo -e " greetings, ${white}\033[7m $(whoami) ${reset}\n" - - tasking - echo -e "${lighter_black}│${reset}" - backups - echo -e "${lighter_black}│${reset}" - weather - echo -e "${lighter_black}│${reset}" - mail - echo -e "${lighter_black}│${reset}" - rss - echo -e "${lighter_black}└──┄┄────┄┄${reset}" -} - -if [ $# -eq 0 ] ; then - main -else - while getopts ":bhmtrws:" opt ; do - case ${opt} in - b) backups ;; - h) usage ;; - m) mail ;; - t) display_tasks=1 ; tasking ;; - r) rss ;; - w) weather ;; - s) servers "${OPTARG}" ;; - *) usage ;; - esac - done -fi diff --git a/bin/bin/az b/bin/bin/az @@ -1,2 +0,0 @@ -#!/usr/bin/env bash -/home/pyratebeard/src/warez/azure-cli/bin/python -m azure.cli "$@" diff --git a/bin/bin/bgchange b/bin/bin/bgchange @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus -colours=("202f2c" "362124" "363145") - -num=${#colours[@]} -random=$(( ( RANDOM % $num ) )) -new_colour=${colours[$random]} - -xsetroot -solid "#${new_colour}" diff --git a/bin/bin/blocks b/bin/bin/blocks @@ -1,3 +0,0 @@ -#!/usr/bin/env bash -pcs() { for i in {0..7}; do echo -en "\e[${1}$((30+$i))m █▓▒\e[0m"; done; } -printf "\n%s\n%s\n\n" "$(pcs)" "$(pcs '1;')" diff --git a/bin/bin/blocks1 b/bin/bin/blocks1 @@ -1,3 +0,0 @@ -#!/usr/bin/env bash -pcs() { for i in {0..7}; do echo -en "\e[${1}$((30+$i))m \u2588\u2588 \e[0m"; done; } -printf "\n%s\n%s\n\n" "$(pcs)" "$(pcs '1;')" diff --git a/bin/bin/bombs b/bin/bin/bombs @@ -1,32 +0,0 @@ -#!/usr/bin/env bash -# -# ANSI color scheme script by pfh -# modified by pyratebeard -# -# 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 diff --git a/bin/bin/capture b/bin/bin/capture @@ -1,5 +0,0 @@ -#!/usr/bin/env bash - -[ -z $1 ] && filename="capture" || filename=$1 - -/usr/bin/scrot -s $HOME/tmp/$(date +%Y%m%d)-${filename}.png diff --git a/bin/bin/checkip b/bin/bin/checkip @@ -1,15 +0,0 @@ -#!/usr/bin/zsh - -ipCmd=$(dig +short myip.opendns.com @resolver1.opendns.com) -ipFile="$HOME/tmp/current_ip" -pager="https://pager.pyratebeard.net/vpn" - -if [ ! -f $ipFile ] ; then - echo "$ipCmd" > $ipFile -fi - -if [[ $ipCmd != $(cat $ipFile) ]] && [[ $ipCmd != "" ]] ; then - curl -d "ip changed to ${ipCmd}" ${pager} - echo "$ipCmd" > $ipFile -fi -echo "$ipCmd" diff --git a/bin/bin/colorbars b/bin/bin/colorbars @@ -1,38 +0,0 @@ -#!/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/colorbars-sm b/bin/bin/colorbars-sm @@ -1,35 +0,0 @@ -#!/bin/sh -echo - -# mini smpte color bars -for y in $(seq 0 6); do - printf %s ' ' - for color in 7 3 12 14 5 9 4; do - tput setab ${color} - printf %s ' ' - done - tput sgr0 - echo -done - -for y in 0 1; do - printf %s ' ' - for color in 2 0 5 0 6 0 7; do - tput setab ${color} - printf %s ' ' - done - tput sgr0 - echo -done - -for y in $(seq 0 2); do - printf %s ' ' - for color in 4 4 4 4 4 7 7 7 7 7 6 6 6 6 6 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/colorcodes.sh b/bin/bin/colorcodes.sh @@ -1,6 +0,0 @@ -for i in {0..255} ; do - printf "\x1b[48;5;%sm%3d\e[0m " "$i" "$i" - if (( i == 15 )) || (( i > 15 )) && (( (i-15) % 6 == 0 )); then - printf "\n"; - fi -done diff --git a/bin/bin/colorer b/bin/bin/colorer @@ -1,22 +0,0 @@ -#!/bin/sh -# https://github.com/rxw/bin/blob/master/colorer.sh -echo -e " - \033[0;30m▒░ \033[0;31m▒░ \033[0;32m▒░ \033[0;33m▒░ \033[0;34m▒░ \033[0;35m▒░ \033[0;36m▒░ \033[0;37m▒░ - \033[0;30m▒░ \033[0;31m▒░ \033[0;32m▒░ \033[0;33m▒░ \033[0;34m▒░ \033[0;35m▒░ \033[0;36m▒░ \033[0;37m▒░ - \033[1;30m▒░ \033[1;31m▒░ \033[1;32m▒░ \033[1;33m▒░ \033[1;34m▒░ \033[1;35m▒░ \033[1;36m▒░ \033[1;37m▒░ - \033[1;30m▒░ \033[1;31m▒░ \033[1;32m▒░ \033[1;33m▒░ \033[1;34m▒░ \033[1;35m▒░ \033[1;36m▒░ \033[1;37m▒░ - \033[0;39m" - -#echo -e "\0033[0;36m -# ██████ -# ██████ -# ▓▓▓▓▓▓ -# ▓▓▓▓▓ -# ▒▒▒▒▒ -# ▒▒▒▒ -# ▒▒▒▒ -# ▒▒▒ -# ░░ -# ░ -#\033[0;39m -#" diff --git a/bin/bin/colorscheme b/bin/bin/colorscheme @@ -1,27 +0,0 @@ -#!/usr/bin/env 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='πr8' # 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/connect b/bin/bin/connect @@ -1,66 +0,0 @@ -#!/usr/bin/env zsh - -# vars -WIFI_DEV=$(iw dev | awk '$1=="Interface"{print $2}') -CONNECTION_FILE_PATH="$HOME/lib/documents/wifi/" -CONNECTION_FILE="${CONNECTION_FILE_PATH}${1}" -CONNECTION=$(echo ${CONNECTION_FILE} | awk -F\/ '{print $NF}') -VPN_KEY_PATH="$HOME/lib/key" -VPN_KEY="${VPN_KEY_PATH}/$(hostname -s).ovpn" - -if [ ! $1 ] ; then - echo "specify a connection file" - exit 1 -elif [ ! -f ${CONNECTION_FILE} ] ; then - echo "${CONNECTION_FILE} does not exist" - exit 1 -fi - -# disconnect -echo "disconnecting any running connection" -$HOME/bin/disconnect - -# bring dev up -if $(ip link show up | grep ${WIFI_DEV} >/dev/null) ; then - echo "${WIFI_DEV} is already up" -else - echo "bringing ${WIFI_DEV} up" - sudo ip link set ${WIFI_DEV} up >/dev/null -fi - -# connect using specified config -if [ -f ${CONNECTION_FILE} ] ; then - echo "connecting to ${CONNECTION}" - sudo wpa_supplicant -B -q -i ${WIFI_DEV} -c ${CONNECTION_FILE} >/dev/null 2>&1 -fi - -# get an ip -echo "starting dhcpcd" -sudo dhcpcd -b -4 ${WIFI_DEV} >/dev/null 2>&1 - -function use_vpn() { - echo "not at home, starting vpn" - sleep 20 - sudo openvpn --config ${VPN_KEY} --daemon >/dev/null 2>&1 - sudo systemd-tty-ask-password-agent - echo "waiting for vpn..." - sleep 60 - echo "nameserver 208.67.222.222 - nameserver 208.67.220.220" | sudo resolvconf -a ${WIFI_DEV}.inet - sudo ip route add 192.168.0.0/24 via 10.8.0.13 dev tun0 - while : - ping -q -c1 fortkickass >/dev/null - if [ $? -eq 0 ] ; then - echo "vpn is up" - break - else - echo "still waiting..." - sleep 2 - fi -} -# when remote bring ip vpn -case "${CONNECTION}" in - home) ;; |work) ;; - *) use_vpn ;; -esac - diff --git a/bin/bin/disconnect b/bin/bin/disconnect @@ -1,16 +0,0 @@ -#!/usr/bin/env bash - -WIFI_DEV=$(iw dev | awk '$1=="Interface"{print $2}') - -killit() { - if $(pidof ${1} >/dev/null) ; then - echo "killing $1" - sudo kill -9 $(pidof ${1}) - fi -} - -sudo umount -a --types nfs,nfs4 -sudo ip link set ${WIFI_DEV} down -killit wpa_supplicant -killit dhcpcd -killit openvpn diff --git a/bin/bin/emote b/bin/bin/emote @@ -1,125 +0,0 @@ -#!/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/fontpreview.sh b/bin/bin/fontpreview.sh @@ -1,12 +0,0 @@ -#!/bin/sh - -echo " - - 0 1 2 3 4 5 6 7 8 9 - A B C D E F G H I J K L M N O P Q R S T U V W X Y Z - a b c d e f g h i j k l m n o p q r s t u v w x y z - ! @ # \$ % ^ & * ( ) _ + = - - , . / ; ' [ ] - < > ? : \" { } - -" diff --git a/bin/bin/food b/bin/bin/food @@ -1,337 +0,0 @@ -#!/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 @@ -1,31 +0,0 @@ -#!/usr/bin/env 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 diff --git a/bin/bin/gotty b/bin/bin/gotty Binary files differ. diff --git a/bin/bin/hashwall b/bin/bin/hashwall @@ -1,82 +0,0 @@ -#!/bin/sh -# -# ██ ██ ██ ██ -# ░██ ░██ ░██ ░██ -# ░██ ██████ ██████░██ ███ ██ ██████ ░██ ░██ -# ░██████ ░░░░░░██ ██░░░░ ░██████ ░░██ █ ░██ ░░░░░░██ ░██ ░██ -# ░██░░░██ ███████ ░░█████ ░██░░░██ ░██ ███░██ ███████ ░██ ░██ -# ░██ ░██ ██░░░░██ ░░░░░██░██ ░██ ░████░████ ██░░░░██ ░██ ░██ -# ░██ ░██░░████████ ██████ ░██ ░██ ███░ ░░░██░░████████ ███ ███ -# ░░ ░░ ░░░░░░░░ ░░░░░░ ░░ ░░ ░░░ ░░░ ░░░░░░░░ ░░░ ░░░ -# -# ▓▓▓▓▓▓▓▓▓▓ -# ░▓ author ▓ xero <x@xero.nu> -# ░▓ code ▓ http://code.xero.nu/dotfiles -# ░▓ mirror ▓ http://git.io/.files -# ░▓▓▓▓▓▓▓▓▓▓ -# ░░░░░░░░░░ -# -#█▓▒░ requires: imagemagick + hsetroot - -usage() { - echo "usage: `basename $0` [-bfsr] - -b background color (#222222) - -f foreground color (#3e3e3e) - -s step (2) - -r resolution (24)" - exit 1 -} - -#args -res=24 -step=4 -bg="#222222" -fg="#3e3e3e" - -# evaluate -while [ $# -gt 0 ] -do - case "$1" in - -b) - bg="$2" - shift - ;; - -f) - fg="$2" - shift - ;; - -s) - step="$2" - shift - ;; - -r) - res="$2" - shift - ;; - --) - shift - break - ;; - -*) - usage - ;; - *) - break - ;; - esac - shift -done - -# calculate -max=$((res*2+2)) -i=0 -lines="" -while - lines="$lines line $i,-1 -1,$i" - i="$((i+step))" - [ "$i" -lt "$max" ] -do :; done - -# generate -convert -size ${res}x${res} xc:${bg} -stroke ${fg} -draw "${lines}" /tmp/wall.png -hsetroot -tile /tmp/wall.png diff --git a/bin/bin/hexcodes b/bin/bin/hexcodes @@ -1,43 +0,0 @@ -#!/bin/sh - -c00=$'\e[0;30m' -c01=$'\e[0;31m' -c02=$'\e[0;32m' -c03=$'\e[0;33m' -c04=$'\e[0;34m' -c05=$'\e[0;35m' -c06=$'\e[0;36m' -c07=$'\e[0;37m' -c08=$'\e[1;30m' -c09=$'\e[1;31m' -c10=$'\e[1;32m' -c11=$'\e[1;33m' -c12=$'\e[1;34m' -c13=$'\e[1;35m' -c14=$'\e[1;36m' -c15=$'\e[1;37m' - -f0=$'\e[1;30m' -f1=$'\e[1;37m' -f2=$'\e[0;37m' - -hexs=( $(xrdb -query | grep -P '^.*color[0-9]*:' | tr -d '\t' | cut -d: -f2) ) - -cat << EOF -${c00} ░░▓▓██ ${hexs[0]} -${c08} ░░▓▓██ ${hexs[1]} -${c01} ░░▓▓██ ${hexs[2]} -${c09} ░░▓▓██ ${hexs[3]} -${c02} ░░▓▓██ ${hexs[4]} -${c10} ░░▓▓██ ${hexs[5]} -${c03} ░░▓▓██ ${hexs[6]} -${c11} ░░▓▓██ ${hexs[7]} -${c04} ░░▓▓██ ${hexs[8]} -${c12} ░░▓▓██ ${hexs[9]} -${c05} ░░▓▓██ ${hexs[10]} -${c13} ░░▓▓██ ${hexs[11]} -${c06} ░░▓▓██ ${hexs[12]} -${c14} ░░▓▓██ ${hexs[13]} -${c07} ░░▓▓██ ${hexs[14]} -${c15} ░░▓▓██ ${hexs[15]} -EOF diff --git a/bin/bin/hsetroot b/bin/bin/hsetroot Binary files differ. diff --git a/bin/bin/htmldump b/bin/bin/htmldump @@ -1,21 +0,0 @@ -#!/bin/sh - -usage() { - echo "usage: $(basename $0) [-c charset] file" >&2 -} - -while getopts 'c:h' OPT; do - case $OPT in - c) charset=$OPTARG ;; - h) usage; exit 0 ;; - *) usage; exit 1 ;; - esac -done - -shift $((OPTIND -1)) - -[ -z "$charset" ] && charset="$(file -i $1 | sed 's/.* charset=//')" -iconv -f $charset -t utf-8 $1 \ - | webdump -al \ - | sed 'y/ / /;s/^\s*$//' \ - | cat -s diff --git a/bin/bin/lines b/bin/bin/lines @@ -1,3 +0,0 @@ -#!/usr/bin/env bash -pcs() { for i in {0..7}; do echo -en "\e[${1}$((30+$i))m ── \e[0m"; done; } -printf "\n%s\n%s\n\n" "$(pcs)" "$(pcs '1;')" diff --git a/bin/bin/linez b/bin/bin/linez @@ -1,3 +0,0 @@ -#!/usr/bin/env bash -pcs() { for i in {0..7}; do echo -en "\e[${1}$((30+$i))m ┅━┅\e[0m"; done; } -printf "\n%s\n%s\n\n" "$(pcs)" "$(pcs '1;')" diff --git a/bin/bin/lock b/bin/bin/lock @@ -1,3 +0,0 @@ -#pkill ssh-agent ; pkill gpg-agent -i3lock -u -c \#1e1b1c -#i3lock -u -i /home/pyratebeard/dchs3.png -c \#2b2f2e diff --git a/bin/bin/mario b/bin/bin/mario @@ -1,39 +0,0 @@ -#!/bin/sh -# ┏┏┓┳━┓┳━┓o┏━┓ -# ┃┃┃┃━┫┃┳┛┃┃ ┃ -# ┛ ┇┛ ┇┇┗┛┇┛━┛ -# p l u m b e r - -url="$1" -filetype=$(curl -Ls "${url}" | file - | awk '{print $2}') - -iso_type() { - _iso=$(curl -Ls "${url}" | file - | awk '{print $4}') - case ${_iso} in - MP4) /usr/bin/mpv "${url}" ;; - *) /usr/bin/notify-send -u 'normal' "mario: unknown iso type ${_iso}" ;; - esac -} - -vimify() { - timestamp=$(date +%s) - curl -L -o /tmp/mario-${timestamp} "${1}" - LANG=en_US.UTF-8 urxvt -cd /home/pyratebeard -hold -e vim /tmp/mario-${timestamp} - rm -f /tmp/mario-${timestamp} -} - -plumbit() { - case ${filetype} in - JPEG|PNG|GIF) /home/pyratebeard/bin/webimg "${url}" ;; - Audio|WebM) /usr/bin/mpv "${url}" ;; - POSIX) LANG=en_US.UTF-8 urxvt -hold -e curl -s ${url} ;; - ISO) iso_type ;; - HTML|XML) qutebrowser "${url}" ;; - Unicode|Bourne-Again|ASCII|C|Python) vimify "${url}" ;; - PDF) curl -L -o /tmp/mario.pdf "${url}" ; zathura /tmp/mario.pdf ; rm -f /tmp/mario.pdf ;; - *) /usr/bin/notify-send -u 'normal' "mario: unknown filetype ${filetype}" ;; - esac -} - -vidreg="(youtu|watch?v=)" -(([[ "${url}" =~ $vidreg ]] && mpv "${url}") || ([[ "${url}" == *"gallery"* ]] && qutebrowser "${url}")) || plumbit diff --git a/bin/bin/mdpdf b/bin/bin/mdpdf @@ -1,41 +0,0 @@ -#!/bin/sh -# ┌┌┐┬─┐┬─┐┬─┐┬─┐ -# ││││ ││─┘│ │├─ -# ┘ ┆┆─┘┆ ┆─┘┆ -# a simple(?) markdown to -# pdf creator with live view -# -# author: pyratebeard <root@pyratebeard.net> -# -# license: kopimi <https://kopimi.com> -# -# dependencies: -# - pandoc -# - wkhtmltopdf engine -# - zathura -# - vim -# usage: -# `mdpdf <filename>.md` - -[ -z "$1" ] && echo "no file" && exit 1 - -md="${1}" -pdf=$( basename "${md}" .md)".pdf" - -[ ! -f "${md}" ] && touch "${md}" - -[ ! -f "${pdf}" ] && \ - pandoc "${md}" \ - -f markdown \ - -t html5 \ - -o "${pdf}" 2>/dev/null - -zathura "${pdf}" & -zpid=$! - -vim -c "autocmd BufWritePost *.md silent! \ -!pandoc % -o %:r.pdf \ ---pdf-engine=wkhtmltopdf \ -2>/dev/null" "${md}" - -kill ${zpid} diff --git a/bin/bin/newstuir b/bin/bin/newstuir @@ -1,5 +0,0 @@ -#!/usr/bin/env bash - -source ~/src/warez/social_media/tuir/bin/activate -screen=TERM tuir $1 - diff --git a/bin/bin/panes b/bin/bin/panes @@ -1,23 +0,0 @@ -#!/usr/bin/env bash - -# Author: GekkoP -# Source: http://linuxbbq.org/bbs/viewtopic.php?f=4&t=1656#p33189 - -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 -d=$'\e[1m' -t=$'\e[0m' -v=$'\e[7m' - - -cat << EOF - - $f1███$d▄$t $f2███$d▄$t $f3███$d▄$t $f4███$d▄$t $f5███$d▄$t $f6███$d▄$t $f7███$d▄$t - $f1███$d█$t $f2███$d█$t $f3███$d█$t $f4███$d█$t $f5███$d█$t $f6███$d█$t $f7███$d█$t - $f1███$d█$t $f2███$d█$t $f3███$d█$t $f4███$d█$t $f5███$d█$t $f6███$d█$t $f7███$d█$t - $d$f1 ▀▀▀ $f2▀▀▀ $f3▀▀▀ $f4▀▀▀ $f5▀▀▀ $f6▀▀▀ $f7▀▀▀ -EOF diff --git a/bin/bin/pb b/bin/bin/pb @@ -1,142 +0,0 @@ -#!/bin/sh -# -# pb; a command line pastebin service helper -# {kopimi,CC0} MMXVIII . syntax samurai -# ▟▙ -# ▟▒░░░░░░░▜▙▜████████████████████████████████▛ -# ▜▒░░░░░░░▟▛▟▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▛ -# ▜▛ -# authors: -# xero <https://xero.nu> -# stark <https://git.io/stark> -# code: -# https://code.xero.nu/pb -# https://git.io/pb.sh -# greets: -# all the ops of these great free services <3 -# -usage () { - cat <<EOF - - █ - ▄▀▀▄ █▐▀▄ -░ ░ ░█▐░█░█▐░█░ ░ ░ - █▐▄▀ ▀▄▄▀ - █ - -pb; a command line pastebin service helper - -usage: - pb <service> [file|stream] - -services: - ix.io, 0x0.st, sprunge.us, p.iotek.org, - clbin.com, uguu.se, lewd.se, fiery.me, - doko.me, mixtape.moe, pomf.cat, catbox.moe, - asis.io, dmca.gripe, ptpb.pw, rokket.space, - dumpz.org, n33r.tk, w1r3.net, pastebin.com - -environment variables for pastebin.com: - PB_API_DEV: developer api key [required] https://pastebin.com/api#1 - PB_API_USR: user api key [optional] https://pastebin.com/api#8 - PRIVACY: paste visibility [optional] valid values: public|0, unlisted|1, private|2 - ANON: paste w/o a user key even if defined [optional] - -examples: - pb ix ~/.vimrc - pb 0x0 <(ps aux) - dmesg | pb iop - PB_API_DEV=XXXX PRIVACY=0 pb pb /tmp/leak.txt - -EOF - exit 0 -} - -ARG="${2:-/dev/stdin}" - -case $1 in - ix|ix.io) - curl -sF 'f:1=<-' http://ix.io < $ARG - ;; - 0x0|null|nullbyte|0*) - curl -sF 'file=@-' https://0x0.st < $ARG - ;; - sprunge|sprunge.us|s*) - curl -sF 'sprunge=<-' http://sprunge.us < $ARG - ;; - iotek|iopaste|p.iotek.org|iop*) - curl -sT- https://p.iotek.org < $ARG - ;; - w1r3|wire|w1r3.net|w*) - curl -sF 'upload=@-' https://w1r3.net < $ARG - ;; - clbin|clbin.com|cl*) - curl -sF 'clbin=<-' https://clbin.com < $ARG - ;; - uguu|uguu.se|u*) - curl -sF 'file=@-' https://uguu.se/api.php?d=upload-tool < $ARG - ;; - lewd|lewd.se|l*) - curl -sF 'file=@-' https://lewd.se/api.php?d=upload-tool < $ARG - ;; - fiery|fiery.me|f*) - curl -sF 'files[]=@-' https://safe.fiery.me/api/upload < $ARG | grep -Po '"url":"[A-Za-z0-9]+.*?"' | sed 's/"url":"//;s/"//' - ;; - doko|doko.me|do*) - curl -sF 'files[]=@-' https://doko.moe/upload.php < $ARG | grep -Po '"url":"[A-Za-z0-9]+.*?"' | sed 's/"url":"//;s/"//;s/[\]//g' - ;; - mixtape|mixtape.moe|m*) - curl -sF 'files[]=@-' https://mixtape.moe/upload.php < $ARG | grep -Po '"url":"[A-Za-z0-9]+.*?"' | sed 's/"url":"//;s/"//;s/[\]//g' - ;; - pomf|pomf.cat|po*) - curl -sF 'files[]=@-' https://pomf.cat/upload.php < $ARG | grep -Po '"url":"[A-Za-z0-9]+.*?"' | sed 's!"url":"!https://a.pomf.cat/!;s/"//' - ;; - catbox|catbox.moe|cat*) - curl -sF 'reqtype=fileupload' -F 'fileToUpload=@-' https://catbox.moe/user/api.php < $ARG - ;; - asis|asis.io|a*) - curl -sF 'files[]=@-' https://up.asis.io/upload.php < $ARG | grep -Po '"url":"[A-Za-z0-9]+.*?"' | sed 's!"url":"!https://dl.asis.io/!;s/"//' - ;; - dmca|dmca.gripe|gripe|dm*) - curl -sF 'files[]=@-' http://dmca.gripe/api/upload < $ARG | grep -Po '"url":"[A-Za-z0-9]+.*?"' | sed 's/"url":"//;s/"//;s/[\]//g' - ;; - ptpb|ptpb.pw|pt*) - curl -sF 'c=@-' https://ptpb.pw/ < $ARG | grep "url:" | sed 's/url: //' - ;; - rokket|rokket.space|r*) - curl -sF 'files[]=@-' https://rokket.space/upload < $ARG | grep 'url' | sed 's/"url": "//;s/",//;s/ //g' - ;; - dumpz|dumpz.org|du*) - curl -s --data-binary @- https://dumpz.org < $ARG | sed 's/http/&s/;s!$!/text/!' - ;; - n33r|n33r.tk|n*) - curl -sF 'files[]=@-' https://n33r.tk/upload.php < $ARG | grep 'url' | sed 's/.*"url": "//;s/"//;s/[\]//g;s/[",]//;s/http/&s/' - ;; - pb|pastebin|pastebin.com) - [ -z ${PB_API_DEV} ] && usage - PRIVACY="${PRIVACY:-1}" - if [ -n "${PRIVACY}" ]; then - case ${PRIVACY} in - public|0) - PRIVACY=0 - ;; - unlisted|1) - PRIVACY=1 - ;; - private|2) - PRIVACY=2 - ;; - *) - usage - ;; - esac - fi - qs="api_option=paste&api_dev_key=${PB_API_DEV}&api_paste_expire_date=N&api_paste_private=${PRIVACY}&api_paste_name=`basename ${ARG}`" - [ -n ${PB_API_USR} ] && [ -z ${ANON} ] && qs="${qs}&api_user_key=${PB_API_USR}" - curl -d "${qs}" --data-urlencode "api_paste_code=`<$ARG`" http://pastebin.com/api/api_post.php - ;; - *) - usage - ;; -esac -# vi:syntax=sh diff --git a/bin/bin/pipes b/bin/bin/pipes @@ -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/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 @@ -1,193 +0,0 @@ -#!/usr/bin/env 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/powerdl b/bin/bin/powerdl @@ -1,29 +0,0 @@ -#!/usr/bin/env bash - -mixcloud_url="https://www.mixcloud.com/Gentlemanofmetal/" -mixcloud_show_prefix="powerzone-show-" -powerzone_url="https://powerzonemetal.uk/" -powerzone_show_prefix="" -powerzone_dir="$HOME/lib/music/powerzone" - -#latest_show=$(curl -s ${powerzone_url} | grep "/shows/" | head -n1 | sed -n 's/.*href="\([^"]*\).*/\1/p' | awk -F/ '{print $3}') - -latest_show=$(curl -s "${powerzone_url}shows/" | grep "/shows/" | head -n1 | tail -n1 | sed -n 's/.*href="\([^"]*\).*/\1/p' | awk -F/ '{print $3}') -#show_num=$(curl -s ${powerzone_url} | grep "<h4>Show #" | head -n1 | awk -F\# '$2>0 {print substr($2,1,3)}') - -if [[ ! $(find ${powerzone_dir} -name "powerzone-*${latest_show}-*.mp3" | wc -l) -eq 0 ]] ; then - echo "file exists" - exit 0 -fi - -#if [[ ${show_num} =~ ^[0-9]+([.][0-9]+)?$ ]] ; then -# powerzone_show_prefix="shows/show-" -#else -# powerzone_show_prefix="shows/" -#fi -mixcloud_show_url=$(curl -Ls "${powerzone_url}shows/${latest_show}/" | grep mixcloud | grep feed | awk -F\= '{print $5}' | awk -F\& '{print $1}' | sed 's/%3A/\:/' | sed 's&%2F&/&g') -download_filename=$(echo ${mixcloud_show_url} | awk -F\/ '{print $5}') - -youtube-dl -q -o "${powerzone_dir}/${download_filename}" "${mixcloud_show_url}" -ffmpeg -loglevel quiet -i ${powerzone_dir}/${download_filename} -metadata title="${download_filename}" -metadata artist="powerzone" -metadata album="powerzone" -metadata track="${latest_show}" -metadata genre="metal" "${powerzone_dir}/${download_filename}.mp3" -rm -f "${powerzone_dir}/${download_filename}" diff --git a/bin/bin/ptt b/bin/bin/ptt @@ -1,19 +0,0 @@ -#!/bin/sh - -ptt_cmd=$(amixer set Capture toggle >/dev/null) - -set_nocap() { - /usr/bin/dunstctl close - /usr/bin/notify-send -u 'normal' 'muted' - /usr/bin/amixer set Capture nocap >/dev/null -} - -set_cap() { - /usr/bin/notify-send -u 'critical' 'unmuted' - /usr/bin/amixer set Capture cap >/dev/null -} - -case $(amixer get Capture | tail -n1 | awk '{print $NF}' | tr -d '[]') in - off) set_nocap ;; - on) set_cap ;; -esac diff --git a/bin/bin/sdd b/bin/bin/sdd @@ -1,168 +0,0 @@ -#!/bin/sh -# ██ ██ -# ░██ ░██ -# ██████ ░██ ░██ -# ██░░░░ ██████ ██████ -# ░░█████ ██░░░██ ██░░░██ -# ░░░░░██░██ ░██░██ ░██ -# ██████ ░░██████░░██████ -# ░░░░░░ ░░░░░░ ░░░░░░ -# s e c u r e d e d u p -# -# author ▓▒ pyratebeard -# code ▓▒ https://git.pyratebeard.net/dotfiles/file/bin/bin/sdd.html - -BASENAME="${0##*/}" -DEDUP_PATH="$HOME/src/warez/dedup" -DEDUP_DIR="/var/dedup" -DEDUP_KEY="$HOME/lib/keys/dedup.key" -ARCHIVE_NAME="$(date +%Y%m%d)" - -usage() { - echo "Usage: ${BASENAME} [-p <file|dir>] [-u <file|dir>] - - -d: (daily) run daily via cron to backup important items - -f: (full) packs \$HOME to external drive (/mnt/dedup) - -h: (help) prints this page - -l: (list) print all backup repos and latest archive - -p: (pack) backup file or directory - -r: (rclone) upload all repos to cloud storage - -u: (unpack) restore file or directory -" -} - -pager() { - # notify in irc channel - # https://serverfault.com/a/259877 - msg="${1}" - irc_serv="irc.local" - irc_port="6667" - irc_nick="pager" - irc_chan="#pager" - - echo -e "USER ${irc_nick} guest tolmoon tolsun\nNICK ${irc_nick}\nJOIN ${irc_chan}\nPRIVMSG ${irc_chan} :$(date +%T) ${BASENAME} : ${msg}\nQUIT\n" | \ - nc ${irc_serv} ${irc_port} - - # notify using ntfy - curl -d "${msg}" https://pager.pyratebeard.net/sdd -} - -fnd_latest() { - item="${1}" - latest=$(find ${DEDUP_DIR}/${item}/archive -type f \ - -exec stat -c '%X %n' {} \; | \ - sort -nr | \ - awk -F\/ 'NR==1 {print $NF}') - return ${latest} -} - -list() { - local repos=$(find ${DEDUP_DIR}/* -maxdepth 1 -type d -prune -printf '%f\n') - for r in ${repos} ; do - fnd_latest ${r} - echo "${r}: ${latest}" - done -} - -pack() { - pack_path="$(readlink -f ${1})" - pack_item="$(echo $pack_path | awk -F\/ '{print $NF}')" - # trim period from hidden {file,dir} - pack_item="${pack_item#.*}" - # trim file extension - pack_item="${pack_item%.*}" - - [ -d ${DEDUP_DIR}/${pack_item} ] || \ - ${DEDUP_PATH}/dup-init \ - -k ${DEDUP_KEY} \ - -E XChaCha20-Poly1305 \ - ${DEDUP_DIR}/${pack_item} - - fnd_latest ${pack_item} - [[ ${latest} == ${ARCHIVE_NAME} ]] && exit 0 - - sudo tar -pcf - ${pack_path} | \ - ${DEDUP_PATH}/dup-pack \ - -k ${DEDUP_KEY} \ - -r ${DEDUP_DIR}/${pack_item} \ - ${ARCHIVE_NAME} -} - -unpack(){ - unpack_item=${1} - fnd_latest ${unpack_item} - ${DEDUP_PATH}/dup-unpack \ - -k ${DEDUP_KEY} \ - -r ${DEDUP_DIR}/${unpack_item} \ - ${latest} | \ - sudo tar -C / -pxf - -} - -upload() { - storage=${1} - echo "$(date +%Y%m%dT%T) : starting sync" >> $HOME/var/log/sdd - rclone sync ${DEDUP_DIR}/ ${storage}:securededup - echo "$(date +%Y%m%dT%T) : finished sync" >> $HOME/var/log/sdd - echo "$(date +%Y%m%dT%T) : starting cleanup" >> $HOME/var/log/sdd - rclone cleanup ${storage}:securededup - echo "$(date +%Y%m%dT%T) : finished cleanup" >> $HOME/var/log/sdd -} - -daily() { - buku_dir="$HOME/var/bkmrks" - backup_list=( - "$HOME/var/mbox" - "${buku_dir}/buku.db" - "$HOME/lib/documents/work/octotech" - "$HOME/lib/keys" - "$HOME/.password-store" - "$HOME/dot" - "$HOME/.zhistory" - "$HOME/.todo" - "$HOME/lib/documents/grimoire" - "$HOME/lib/images/pictures" - ) - storage_list=( - "backblaze" - ) - - if [ -f "${buku_dir}/buku.db" ] ; then - rm -f ${buku_dir}/buku.db - fi - buku -e ${buku_dir}/buku.db >/dev/null - - for item in ${backup_list[@]} ; do - pack ${item} || pager "packing of ${item} failed" - done - - for storage in ${storage_list[@]} ; do - upload ${storage} || pager "upload to ${storage} failed" - done -} - -full_bak() { - DEDUP_DIR="/mnt/dedup" - - sudo tar -pcf - ${HOME} | \ - ${DEDUP_PATH}/dup-pack \ - -k ${DEDUP_KEY} \ - -r ${DEDUP_DIR}/$(hostname -s)-home \ - $(date +%Y%m%d) -} - -if [ $# -eq 0 ] ; then - usage -else - while getopts ":dflp:r:u:" opt ; do - case ${opt} in - d) daily ;; - f) full_bak ;; - h) usage ;; - l) list ;; - p) pack "${OPTARG}" ;; - r) upload ${OPTARG} ;; - u) unpack "${OPTARG}" ;; - *) usage ;; - esac - done -fi diff --git a/bin/bin/shellz b/bin/bin/shellz @@ -1,50 +0,0 @@ -#!/usr/bin/env bash -# ██ ██ ██ -# ░██ ░██ ░██ -# ██████░██ █████ ░██ ░██ ██████ -# ██░░░░ ░██████ ██░░░██ ░██ ░██░░░░██ -#░░█████ ░██░░░██░███████ ░██ ░██ ██ -# ░░░░░██░██ ░██░██░░░░ ░██ ░██ ██ -# ██████ ░██ ░██░░██████ ███ ███ ██████ -#░░░░░░ ░░ ░░ ░░░░░░ ░░░ ░░░ ░░░░░░ -# -# ANSI color scheme script by pyratebeard -# original `ghosts` 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' -bk=$'\e[1;30m' -cat << EOF - -$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 ▀▀█▄▄▄▀▄▄▄█▀▀ -$rst -EOF -#$bk ▄█████▄ $bk ▄█████▄ $bk ▄█████▄ $bk ▄█████▄ $bk ▄█████▄ $bk ▄█████▄ -#$bk ▄███████▄ $bk ▄███████▄ $bk ▄███████▄ $bk ▄███████▄ $bk ▄███████▄ $bk ▄███████▄ -#$f1 ░░░░░░░░░ $f2 ░░░░░░░░░ $f3 ░░░░░░░░░ $f4 ░░░░░░░░░ $f5 ░░░░░░░░░ $f6 ░░░░░░░░░ -#$bk ▀███████▀ $bk ▀███████▀ $bk ▀███████▀ $bk ▀███████▀ $bk ▀███████▀ $bk ▀███████▀ -#$bk ▀█████▀ $bk ▀█████▀ $bk ▀█████▀ $bk ▀█████▀ $bk ▀█████▀ $bk ▀█████▀ -#$bk ▀▀▀ $bk ▀▀▀ $bk ▀▀▀ $bk ▀▀▀ $bk ▀▀▀ $bk ▀▀▀ -#$bld -#$bk ▄█████▄ $bk ▄█████▄ $bk ▄█████▄ $bk ▄█████▄ $bk ▄█████▄ $bk ▄█████▄ -#$bk ▄███████▄ $bk ▄███████▄ $bk ▄███████▄ $bk ▄███████▄ $bk ▄███████▄ $bk ▄███████▄ -#$f1 ░░░░░░░░░ $f2 ░░░░░░░░░ $f3 ░░░░░░░░░ $f4 ░░░░░░░░░ $f5 ░░░░░░░░░ $f6 ░░░░░░░░░ -#$bk ▀███████▀ $bk ▀███████▀ $bk ▀███████▀ $bk ▀███████▀ $bk ▀███████▀ $bk ▀███████▀ -#$bk ▀█████▀ $bk ▀█████▀ $bk ▀█████▀ $bk ▀█████▀ $bk ▀█████▀ $bk ▀█████▀ -#$bk ▀▀▀ $bk ▀▀▀ $bk ▀▀▀ $bk ▀▀▀ $bk ▀▀▀ $bk ▀▀▀ -#$rst - diff --git a/bin/bin/shortner b/bin/bin/shortner @@ -1,2 +0,0 @@ -#!/bin/sh -curl -X PUT -d "${1}" s.rum.sh diff --git a/bin/bin/sitrep b/bin/bin/sitrep @@ -1,68 +0,0 @@ -#!/bin/sh - -# colours -RCol='\e[0m' # Text Reset - -# Regular Bold Underline High Intensity BoldHigh Intens Background High Intensity Backgrounds -Bla='\e[0;30m'; BBla='\e[1;30m'; UBla='\e[4;30m'; IBla='\e[0;90m'; BIBla='\e[1;90m'; On_Bla='\e[40m'; On_IBla='\e[0;100m'; -Red='\e[0;31m'; BRed='\e[1;31m'; URed='\e[4;31m'; IRed='\e[0;91m'; BIRed='\e[1;91m'; On_Red='\e[41m'; On_IRed='\e[0;101m'; -Gre='\e[0;32m'; BGre='\e[1;32m'; UGre='\e[4;32m'; IGre='\e[0;92m'; BIGre='\e[1;92m'; On_Gre='\e[42m'; On_IGre='\e[0;102m'; -Yel='\e[0;33m'; BYel='\e[1;33m'; UYel='\e[4;33m'; IYel='\e[0;93m'; BIYel='\e[1;93m'; On_Yel='\e[43m'; On_IYel='\e[0;103m'; -Blu='\e[0;34m'; BBlu='\e[1;34m'; UBlu='\e[4;34m'; IBlu='\e[0;94m'; BIBlu='\e[1;94m'; On_Blu='\e[44m'; On_IBlu='\e[0;104m'; -Pur='\e[0;35m'; BPur='\e[1;35m'; UPur='\e[4;35m'; IPur='\e[0;95m'; BIPur='\e[1;95m'; On_Pur='\e[45m'; On_IPur='\e[0;105m'; -Cya='\e[0;36m'; BCya='\e[1;36m'; UCya='\e[4;36m'; ICya='\e[0;96m'; BICya='\e[1;96m'; On_Cya='\e[46m'; On_ICya='\e[0;106m'; -Whi='\e[0;37m'; BWhi='\e[1;37m'; UWhi='\e[4;37m'; IWhi='\e[0;97m'; BIWhi='\e[1;97m'; On_Whi='\e[47m'; On_IWhi='\e[0;107m'; - -ONLINE="${Bla}${On_Gre} online ${RCol}" -OFFLINE="${Bla}${On_Red} offline ${RCol}" - -[ -f /tmp/sitrep ] && rm -f /tmp/sitrep - -[ "${1}" == full ] && \ - servers=( - "greyskull" - "nublar" - "blacksun" - "mainframe" - "laundry" - "mordhaus" - ) || \ - servers=( - "greyskull" - "nublar" - "laundry" - ) - -for server in ${servers[@]} ; do - ssh ${server} "echo > /dev/null" && \ - echo -e "${RCol}${server}|${ONLINE}" >> /tmp/sitrep || \ - echo -e "${RCol}${server}|${OFFLINE}" >> /tmp/sitrep -done - -[ "${1}" == full ] && \ - urls=( - "pyratebeard.net" - "log.pyratebeard.net" - "git.pyratebeard.net" - "pager.pyratebeard.net" - "tube.pyratebeard.net" - "rum.sh" - "s.rum.sh" - "harbour.cafe" - "grimoire.wiki" - "2d4cinema.club" - ) || \ - urls=( - "pyratebeard.net" - "log.pyratebeard.net" - "git.pyratebeard.net" - "harbour.cafe" - ) - -for url in ${urls[@]} ; do - curl -sL -o /dev/null -w "%{http_code}\n" ${url} > /dev/null && \ - echo -e "${RCol}${url}|${ONLINE}" >> /tmp/sitrep || \ - echo -e "${RCol}${url}|${OFFLINE}" >> /tmp/sitrep -done - -cat /tmp/sitrep | column -t -s "|" diff --git a/bin/bin/skull b/bin/bin/skull @@ -1,59 +0,0 @@ -#!/usr/bin/env bash -# ██ ██ ██ ████ -# ░██ ░██ ░██ █░░░ █ -# ██████░██ ██ ██ ██ ░██ ░██ ██████░ ░█ -# ██░░░░ ░██ ██ ░██ ░██ ░██ ░██ ██░░░░ ███ -# ░░█████ ░████ ░██ ░██ ░██ ░██░░█████ █░░ -# ░░░░░██░██░██ ░██ ░██ ░██ ░██ ░░░░░██ █ -# ██████ ░██░░██░░██████ ███ ███ ██████ ░██████ -# ░░░░░░ ░░ ░░ ░░░░░░ ░░░ ░░░ ░░░░░░ ░░░░░░ -# -# ANSI color scheme script by pyratebeard -# original `ghosts` script by pfh -# -# Initializing mod by lolilolicon from Archlinux -# - -black=$'\e[30m' -red=$'\e[31m' -green=$'\e[32m' -yellow=$'\e[33m' -blue=$'\e[34m' -magenta=$'\e[35m' -cyan=$'\e[36m' -white=$'\e[37m' -reset=$'\e[0m' - -if [ $# -eq 0 ] ; then - COLOUR="${white}" -else - case $1 in - black) COLOUR="${black}" ;; - red) COLOUR="${red}" ;; - green) COLOUR="${green}" ;; - yellow) COLOUR="${yellow}" ;; - blue) COLOUR="${blue}" ;; - magenta) COLOUR="${magenta}" ;; - cyan) COLOUR="${cyan}" ;; - *) COLOUR="${white}" ;; - esac -fi - -cat << EOF -${COLOUR} - ▄█████▄ - ▄███████▄ - ░██ ░█ ░██ - ░░███████ - ░░█░█░█ - ░ ░ ░ - - - ▄▀▀▀▀▀▀▀▄ - █ █ - █ █ █ █ - █ █ - ▀█▄▄▄▄▄█▀ - ▀ ▀ ▀ -${reset} -EOF diff --git a/bin/bin/skulls b/bin/bin/skulls @@ -1,40 +0,0 @@ -#!/usr/bin/env bash -# ██ ██ ██ -# ░██ ░██ ░██ -# ██████░██ ██ ██ ██ ░██ ░██ ██████ -# ██░░░░ ░██ ██ ░██ ░██ ░██ ░██ ██░░░░ -# ░░█████ ░████ ░██ ░██ ░██ ░██░░█████ -# ░░░░░██░██░██ ░██ ░██ ░██ ░██ ░░░░░██ -# ██████ ░██░░██░░██████ ███ ███ ██████ -# ░░░░░░ ░░ ░░ ░░░░░░ ░░░ ░░░ ░░░░░░ -# -# ANSI color scheme script by pyratebeard -# original `ghosts` 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 diff --git a/bin/bin/skully b/bin/bin/skully @@ -1,44 +0,0 @@ -#!/usr/bin/env bash -# ██ ██ ██ -# ░██ ░██ ░██ ██ ██ -# ██████░██ ██ ██ ██ ░██ ░██ ░░██ ██ -# ██░░░░ ░██ ██ ░██ ░██ ░██ ░██ ░░███ -# ░░█████ ░████ ░██ ░██ ░██ ░██ ░██ -# ░░░░░██░██░██ ░██ ░██ ░██ ░██ ██ -# ██████ ░██░░██░░██████ ███ ███ ██ -# ░░░░░░ ░░ ░░ ░░░░░░ ░░░ ░░░ ░░ -# -# ANSI color scheme script by pyratebeard -# original `slendy` script by xero -# -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 - -$redf ▄█████▄ $greenf ▄█████▄ $yellowf ▄█████▄ $bluef ▄█████▄ $purplef ▄█████▄ $cyanf ▄█████▄ -$redf ▄███████▄ $greenf ▄███████▄ $yellowf ▄███████▄ $bluef ▄███████▄ $purplef ▄███████▄ $cyanf ▄███████▄ -$redf ██${boldon}${redb}██${reset}${redf}█${boldon}${redb}██${reset}${redf}██ $greenf ██${boldon}${greenb}██${reset}${greenf}█${boldon}${greenb}██${reset}${greenf}██ $yellowf ██${boldon}${yellowb}██${reset}${yellowf}█${boldon}${yellowb}██${reset}${yellowf}██ $bluef ██${boldon}${blueb}██${reset}${bluef}█${boldon}${blueb}██${reset}${bluef}██ $purplef ██${boldon}${purpleb}██${reset}${purplef}█${boldon}${purpleb}██${reset}${purplef}██ $cyanf ██${boldon}${cyanb}██${reset}${cyanf}█${boldon}${cyanb}██${reset}${cyanf}██ -$redf ███████ $greenf ███████ $yellowf ███████ $bluef ███████ $purplef ███████ $cyanf ███████ -$redf █${boldon}${redb}█${reset}${redf}█${boldon}${redb}█${reset}${redf}█ $greenf █${boldon}${greenb}█${reset}${greenf}█${boldon}${greenb}█${reset}${greenf}█ $yellowf █${boldon}${yellowb}█${reset}${yellowf}█${boldon}${yellowb}█${reset}${yellowf}█ $bluef █${boldon}${blueb}█${reset}${bluef}█${boldon}${blueb}█${reset}${bluef}█ $purplef █${boldon}${purpleb}█${reset}${purplef}█${boldon}${purpleb}█${reset}${purplef}█ $cyanf █${boldon}${cyanb}█${reset}${cyanf}█${boldon}${cyanb}█${reset}${cyanf}█ -$reset -EOF diff --git a/bin/bin/skullz b/bin/bin/skullz @@ -1,42 +0,0 @@ -#!/usr/bin/env bash -# ██ ██ ██ -# ░██ ░██ ░██ -# ██████░██ ██ ██ ██ ░██ ░██ ██████ -# ██░░░░ ░██ ██ ░██ ░██ ░██ ░██░░░░██ -# ░░█████ ░████ ░██ ░██ ░██ ░██ ██ -# ░░░░░██░██░██ ░██ ░██ ░██ ░██ ██ -# ██████ ░██░░██░░██████ ███ ███ ██████ -# ░░░░░░ ░░ ░░ ░░░░░░ ░░░ ░░░ ░░░░░░ -# -# ANSI color scheme script by pyratebeard -# original `ghosts` 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 ░░█░█░█ -$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 ░░█░█░█ -$f1 ░ ░ ░ $f2 ░ ░ ░ $f3 ░ ░ ░ $f4 ░ ░ ░ $f5 ░ ░ ░ $f6 ░ ░ ░ -$rst -EOF diff --git a/bin/bin/src_fetch b/bin/bin/src_fetch @@ -1,15 +0,0 @@ -#!/bin/sh - -find $HOME/src \ - -mindepth 1 \ - -maxdepth 2 \ - -type d \ - -not -path '*/warez/*' \ - -not -path '*/suit/*' \ - -not -path '*/node_modules/*' \ - -not -path '*/perl5/*' \ - -not -path '*/\.git' \ - -exec zsh -c "cd '{}' ; pwd ; \ - [ -d .git ] \ - && grep '\[remote ' .git/config >/dev/null \ - && git fetch -q 2>&1" \; diff --git a/bin/bin/switchkb b/bin/bin/switchkb @@ -1,20 +0,0 @@ -#!/usr/bin/zsh - -if [ "$1" = "" ] ; then - echo "which language, gb or us?" - exit 0 -else - lang=$1 -fi - -kill $(pidof xcape) -setxkbmap -option -if [[ "$lang" == "colemak" ]] ; then - setxkbmap -option ctrl:nocaps colemak-ctrl - xmodmap ~/.xmodmap -else - setxkbmap -option ctrl:nocaps $lang -fi -xcape -e 'Control_L=Escape' - -echo "keyboard is switched to $lang" diff --git a/bin/bin/syscat b/bin/bin/syscat @@ -1,105 +0,0 @@ -#!/bin/sh -# ┐─┐┐ ┬┐─┐┌─┐┬─┐┌┐┐ -# └─┐└┌┘└─┐│ │─┤ │ -# ──┘ ┆ ──┘└─┘┘ ┆ ┆ -# syscat by pyratebeard (https://git.pyratebeard.net/dotfiles/file/bin/bin/syscat.html) -# └─ forked from info.sh by z3bra (https://pub.z3bra.org/monochromatic/misc/info.sh) - -gitdir=https://git.pyratebeard.net -myblog=https://log.pyratebeard.net -homepage=https://pyratebeard.net - -c00=$'\e[0;30m' -c01=$'\e[0;31m' -c02=$'\e[0;32m' -c03=$'\e[0;33m' -c04=$'\e[0;34m' -c05=$'\e[0;35m' -c06=$'\e[0;36m' -c07=$'\e[0;37m' -c08=$'\e[1;30m' -c09=$'\e[1;31m' -c10=$'\e[1;32m' -c11=$'\e[1;33m' -c12=$'\e[1;34m' -c13=$'\e[1;35m' -c14=$'\e[1;36m' -c15=$'\e[1;37m' - -f0=$'\e[1;30m' -f1=$'\e[1;37m' -f2=$'\e[0;37m' - -host=$(hostname -s) -up=$(uptime -p | cut -b4- | tr -d ',|eeks|ay|our|inute') -kernel=`uname -r | tr '[:upper:]' '[:lower:]'` -#kernel=`uname -rmo | tr '[:upper:]' '[:lower:]'` -cpuspe="`sed -n '/model\ name/s/^.*:\ //p' /proc/cpuinfo | uniq | rev | cut -d' ' -f 3- | rev | tr '[:upper:]' '[:lower:]'` (x`nproc`)" -cpu=$(grep 'cpu ' /proc/stat | awk '{usage=($2+$4)*100/($2+$4+$5)} END {print usage}') -load=`printf "%.0f" $cpu`% -system=`sed 's/\s*[\(\\]\+.*$//' /etc/issue | tr '[:upper:]' '[:lower:]'` -ram=`free | awk '/Mem:/ {print int($3/$2 * 100.0)}'`% - -if [ -n "$DISPLAY" ]; then - wmname=`xprop -root _NET_WM_NAME|cut -d\" -f2` - #termfn=`sed -n 's/^.*\*font:\s* -\*-\([^-]*\)-.*/\1/p' ~/.Xdefaults|sed 1q` - termfn=$(grep -Ei "^urxvt\*font" ~/.Xdefaults | awk -F: '{print $3}') - fnsize=$(grep -Ei "^urxvt\*font" ~/.Xdefaults | grep -Eo '[0-9]{1,2}' | head -n1) - #systfn=`sed -n 's/^.*font.*"\(.*\)".*$/\1/p' ~/.gtkrc-2.0` - termco=$(awk -F/ '/colors/{print $NF}' ~/.Xdefaults | tr -d '"') - #termco=$(sed -n '/color/s/^.*\///p' ~/.Xdefaults | tr -d '"') -else - wmname="none" - termfn="none" - #systfn="none" -fi - -pkgnum=`pacman -Q|wc -l` -birthd=`sed -n '1s/^\[\([0-9-]*\).*$/\1/p' /var/log/pacman.log | tr - .` - -main() { -cat << EOF -${c00}▓▒ ${f0}│ ${f1}host ${f0}......... $f2$host -${c08} ▒░${f0}│ ${f1}up ${f0}........... $f2$up -${c01}▓▒ ${f0}│ -${c09} ▒░${f0}│ ${f1}os ${f0}........... $f2$system -${c02}▓▒ ${f0}│ ${f1}birth ${f0}........ $f2$birthd -${c10} ▒░${f0}│ -${c03}▓▒ ${f0}│ ${f1}wm ${f0}........... $f2$wmname -${c11} ▒░${f0}│ ${f1}shell ${f0}........ $f2$SHELL -${c04}▓▒ ${f0}│ ${f1}term ${f0}......... $f2$TERM -${c12} ▒░${f0}│ ${f1}font ${f0}......... $f2$termfn $fnsize -${c05}▓▒ ${f0}│ ${f1}colors ${f0}....... $f2$termco -${c13} ▒░${f0}│ -${c06}▓▒ ${f0}│ ${f1}kernel ${f0}....... $f2$kernel -${c14} ▒░${f0}│ ${f1}processor ${f0}.... $f2$cpuspe -${c07}▓▒ ${f0}│ ${f1}memory ${f0}....... $f2$ram -${c15} ▒░${f0}│ ${f1}homepage ${f0}..... $f2$homepage -EOF -} - -mini() { -cat << EOF -${f1}host ${f0}...... $f2$host -${f1}sys ${f0}....... $f2$system -${f1}wm ${f0}........ $f2$wmname -${f1}shell ${f0}..... $f2$SHELL -${f1}term ${f0}...... $f2$TERM -${f1}font ${f0}...... $f2$termfn $fnsize -${f1}colours ${f0}... $f2$termco -${f1}kernel ${f0}.... $f2$kernel -${f1}load ${f0}...... $f2$load -EOF -} - - -if [ $# -eq 0 ] ; then - mini -else - opt="$1" - case ${opt} in - mini) mini ;; - main) main ;; - *) mini ;; - esac -fi diff --git a/bin/bin/sysinfo b/bin/bin/sysinfo @@ -1,128 +0,0 @@ -#!/bin/sh -## author: pyratebeard <root@pyratebeard.net> -## original author: xero <x@xero.nu> -#\\ vars -#FULL=▓ -#EMPTY=░ -#FULL=━ -#EMPTY=┄ - -#EMPTY=━ -EMPTY=─ -FULL=┅ - -name=$USER -host=$(hostname -s) -uptime=$(uptime -p | cut -b4- | tr -d ',|eeks|ay|our|inute') -battery=/sys/class/power_supply/BAT1 -distro=$(grep -E "^ID=" /etc/os-release | awk -F= '{print $2}') -pkgs=$(pacman -Qqs | wc -l) -#upgrade=$(sudo pacman -Sy >/dev/null ; pacman -Qu | wc -l) -kernel=$(uname -r) -shell=$(echo $SHELL | awk -F/ '{print $NF}') -#term=$TERM -term="urxvt" -colors=$(grep urxvt-colors ~/.Xdefaults | awk -F\/ '{print $NF}' | tr -d '"') -font=$(grep -Ei "^urxvt\*font" ~/.Xdefaults | awk -F: '{print $3}') -font_size=$(grep -Ei "^urxvt\*font" ~/.Xdefaults | grep -Eo '[0-9]{1,2}' | head -n1) -#wm=$XDG_SESSION_DESKTOP -wm=`xprop -root _NET_WM_NAME|cut -d\" -f2` - -#\\ 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[0;34m${FULL}" \ - || out="${out}\e[38;5;236m${EMPTY}" - done - printf $out -} - -#\\ colors -~/bin/blocks - - -#\\ greets -printf " \e[1;37m user \e[0;33m┄┬┄ \e[1;33m$name\n" -printf " \e[1;37m host \e[0;33m┄┼┄ \e[1;34m$host\e[0m\n" -printf " \e[1;37m up \e[0;33m┄┴┄ \e[0;37m$uptime\n" -printf " \e[0m\n" - -#\\ environment -printf " \e[1;37m distro \e[0;33m┄┬┄ \e[0m$distro\n" -printf " \e[1;37m kernel \e[0;33m┄┼┄ \e[0m$kernel\n" -printf " \e[1;37mpackages \e[0;33m┄┼┄ \e[0m$pkgs\n" -printf " \e[1;37m wm \e[0;33m┄┼┄ \e[0m$wm\n" -printf " \e[1;37m shell \e[0;33m┄┼┄ \e[0m$shell\n" -printf " \e[1;37m term \e[0;33m┄┼┄ \e[0m$term\n" -printf " \e[1;37m font \e[0;33m┄┼┄ \e[0m$font $font_size\n" -printf " \e[1;37m colors \e[0;33m┄┴┄ \e[0m$colors\n" -printf " \e[0m\n" -#printf " \e[1;35m upgrade \e[38;5;236m▓▒ \e[0m$upgrade\n" - -#\\ cpu -cpu=$(grep 'cpu ' /proc/stat | awk '{usage=($2+$4)*100/($2+$4+$5)} END {print usage}') -proc=$(grep ^processor /proc/cpuinfo | wc -l) -c_lvl=`printf "%.0f" $cpu` -printf " \e[1;35m%-4s \e[1;37m%-5s %-25s \n" " cpu" "$c_lvl%" " "`draw $c_lvl 15` - -#\\ ram -ram=`free | awk '/Mem:/ {print int($3/$2 * 100.0)}'` -mem=$(free -hg --si | grep ^Mem | awk '{print $2}' | tr '[:upper:]' '[:lower:]') -printf " \e[1;35m%-4s \e[1;37m%-5s %-25s \n" " ram" "$ram%" " "`draw $ram 15` - -#\\ battery -if [ -f $battery/charge_full ] ; then - 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='34' - ;; - esac - printf " \e[0;${color}m%-4s \e[1;${color}m%-5s %-25s \n" " bat" "$charge%" `draw $charge 15 $color` -fi - -#\\ volume -vol=`amixer get Master | awk '$0~/%/{print $5}' | head -n1 | tr -d '[]%'` -if amixer get Master | grep -q '\[off\]' -then - color='31' -else - color='34' -fi -printf " \e[1;35m%-4s \e[1;37m%-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` -printf " \e[0m\n" diff --git a/bin/bin/todo b/bin/bin/todo @@ -1,37 +0,0 @@ -#!/usr/bin/env bash -# -# z3bra - (c) wtfpl 2014 -# Manage a todo list -# The file is just plain text, with one line per task -# This script just provide "shorter" commands to append to the file and display -# its content. For more complex tasks, use other tools like `sed`. - -#Where's the file ? -TODO=${TODO:-$HOME/.todo} - -list() { - # WHOA MUCH CLEVER!! - test -f $TODO && nl $TODO -} - -append() { - # append all arguments "as-is" to the file - echo "$*" >> ${TODO} -} - -delete() { - test -n "$1" || exit 1 - ed $TODO << EOF >/dev/null -${1}d -w -q -EOF -} - -# delete line "$2" (see delete() function) -test "$1" = '-d' && delete "$2" && exit 0 - -# append arguments to the file, or print it otherwise -test -n "$*" && append $* || list - -exit 0 diff --git a/bin/bin/todosync b/bin/bin/todosync @@ -1,13 +0,0 @@ -#!/bin/sh - -LOCAL_TODO="$HOME/.todo" -REMOTE_TODO="storage/documents/markor/todo.txt" -REMOTE_HOST="artoo" -DAEMON_RESTART="SVDIR=/data/data/com.termux/files/usr/var/service sv restart todod" - -exec inotifywait -e close_write -m $LOCAL_TODO|while read TODOFILE; do - echo rsyncing - rsync -e "ssh -i $HOME/.ssh/todod" $LOCAL_TODO $REMOTE_HOST:$REMOTE_TODO - ssh -i $HOME/.ssh/todod $REMOTE_HOST "${DAEMON_RESTART}" - echo finished rsync -done diff --git a/bin/bin/tvshuf b/bin/bin/tvshuf @@ -1,14 +0,0 @@ -#!/bin/sh - -[ $# -eq 0 ] && exit 1 - -tvdir="/media/tv" -series="${tvdir}/$1" -repeat="$2" - -grep ${tvdir} /proc/mounts >/dev/null || exit 1 -[ -d ${series} ] || exit 1 - -for num in $(seq 1 ${repeat}) ; do - mpv $(find ${series} -type f -exec file -N -i -- {} + | sed -n 's!: video/[^:]*$!!p' | shuf -n 1) -done diff --git a/bin/bin/wacom b/bin/bin/wacom @@ -1,6 +0,0 @@ -#!/usr/bin/env bash -monitor=$(xrandr | awk '/primary/ {print $1}') - -for dev in $(xsetwacom --list devices | awk -F"id:" '{print $2}' | awk '{print $1}') ; do - xsetwacom --set "${dev}" MapToOutput "${monitor}" -done diff --git a/bin/bin/weather b/bin/bin/weather @@ -1,13 +0,0 @@ -#!/bin/sh - -weather() { - local -r location="$(curl -s "https://ipvigilante.com/" | jq -r '.data.city_name')" - wttr=$(curl -s "wttr.in/${location}?format=%l:+%f+%C\n" | tr '[:upper:]' '[:lower:]') - if [[ ${wttr} == "unknown location"* ]] ; then - echo -e "weather is ${light_red}unavailable${reset}" > /tmp/weather - else - echo -e "${wttr}" > /tmp/weather - fi -} - -weather diff --git a/bin/bin/webimg b/bin/bin/webimg @@ -1,46 +0,0 @@ -#!/bin/sh -# ┓ ┳┳━┓┳━┓o┏┏┓┏━┓ -# ┃┃┃┣━ ┃━┃┃┃┃┃┃ ┳ -# ┗┻┇┻━┛┇━┛┇┛ ┇┇━┛ -# -# requires `identify` from imagemagick - -img="/tmp/webimg" -image=$(xsel -b) - -if [ -f ${img} ] ; then - rm -f ${img} -fi - -function notify() { - msg=$1 - notify-send -u 'normal' "webimg: ${msg}" -} - -function show_img() { - if [[ ${image} = *w3mtmp* ]] ; then - img=${image} - elif [[ ${image} =~ .*gif$ ]] ; then - img="${img}.gif" - curl -s "${image}" --output ${img} - else - image="${image/http\:/https\:}" - image="${image/\/imgur/\/i\.imgur}" - curl -s "${image}" --output ${img} - fi - - if identify ${img} 2>&1 1>/dev/null ; then - if identify ${img} | grep GIF 2>&1 1>/dev/null ; then - mv "${img}" $(echo "${img}".gif) - img="${img}.gif" - fi - sxiv -ba "${img}" 2>/dev/null - else - notify "not an image file" - exit 1 - fi -} - -[ $# -eq 1 ] && image="$1" ; show_img || show_img - -rm -f ${img} diff --git a/bin/bin/windowcast b/bin/bin/windowcast @@ -1,13 +0,0 @@ -#!/bin/sh - -IFS=$'\n' -array=($(xwininfo | grep -E "Absolute upper-left X|Absolute upper-left Y|Width|Height" | awk -F: '{print $2}' | tr -d ' ')) - -pos_x=$(( array[0] + 10 )) -pos_y=$(( array[1] + 10 )) -width=${array[2]} -height=${array[3]} - -ffmpeg -f x11grab -framerate 25 \ - -video_size ${width}x${height} -i +${pos_x},${pos_y} \ - $HOME/lib/videos/recordings/screencasts/$(date +%Y%m%d)-window-${1}.mp4