summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Chausse <benjamin@chausse.xyz>2023-10-25 17:55:27 -0400
committerBenjamin Chausse <benjamin@chausse.xyz>2023-10-25 17:55:27 -0400
commit6312ef191a9ab7466ec72bb3aba7138816062c2f (patch)
treef7b267d110190ecad3f3c28aa3b5e8143936e03c
parent1b23fd869dc468c8469517761c17d4238a8d104f (diff)
Cleanup useless/unused shell scripts
-rwxr-xr-x.local/bin/bars22
-rwxr-xr-x.local/bin/blocks3
-rwxr-xr-x.local/bin/bloks59
-rwxr-xr-x.local/bin/colorbars21
-rwxr-xr-x.local/bin/colorbars-sm35
-rwxr-xr-x.local/bin/colorscheme27
-rwxr-xr-x.local/bin/cronbat8
-rwxr-xr-x.local/bin/getbib14
-rwxr-xr-x.local/bin/pacman-colors48
-rwxr-xr-x.local/bin/pipes136
-rwxr-xr-x.local/bin/pipesx207
-rwxr-xr-x.local/bin/pod-dl30
-rwxr-xr-x.local/bin/qndl13
-rwxr-xr-x.local/bin/setbg19
-rwxr-xr-x.local/bin/surfmenu4
-rwxr-xr-x.local/bin/unix25
-rwxr-xr-x.local/bin/upsite9
17 files changed, 18 insertions, 662 deletions
diff --git a/.local/bin/bars b/.local/bin/bars
deleted file mode 100755
index 0e671b6..0000000
--- a/.local/bin/bars
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/usr/bin/bash
-
-# ANSI color scheme script by pfh
-# Source: http://crunchbang.org/forums/viewtopic.php?pid=139126#p139126
-# Initializing mod by lolilolicon from Archlinux
-#
-
-f=3 b=4
-for j in f b; do
- for i in {0..7}; do
- printf -v $j$i %b "\e[${!j}${i}m"
- done
-done
-bld=$'\e[1m'
-rst=$'\e[0m'
-inv=$'\e[7m'
-
-cat << EOF
- $f1▬▬▬▬▬ $f2▬▬▬▬▬ $f3▬▬▬▬▬ $f4▬▬▬▬▬ $f5▬▬▬▬▬ $f6▬▬▬▬▬
- $bld$f1▬▬▬▬▬ $f2▬▬▬▬▬ $f3▬▬▬▬▬ $f4▬▬▬▬▬ $f5▬▬▬▬▬ $f6▬▬▬▬▬
- $rst
-EOF
diff --git a/.local/bin/blocks b/.local/bin/blocks
deleted file mode 100755
index 4e0ce6c..0000000
--- a/.local/bin/blocks
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/sh
-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/.local/bin/bloks b/.local/bin/bloks
deleted file mode 100755
index 3f06d93..0000000
--- a/.local/bin/bloks
+++ /dev/null
@@ -1,59 +0,0 @@
-#!/usr/bin/sh
-
-# ANSI Color -- use these variables to easily have different color
-# and format output. Make sure to output the reset sequence after
-# colors (f = foreground, b = background), and use the 'off'
-# feature for anything you turn on.
-
-initializeANSI()
-{
- esc=""
-
- blackf="${esc}[30m"; redf="${esc}[31m"; greenf="${esc}[32m"
- yellowf="${esc}[33m" bluef="${esc}[34m"; purplef="${esc}[35m"
- cyanf="${esc}[36m"; whitef="${esc}[37m"
-
- blackb="${esc}[1;30m"; redb="${esc}[1;31m"; greenb="${esc}[1;32m"
- yellowb="${esc}[1;33m" blueb="${esc}[1;34m"; purpleb="${esc}[1;35m"
- cyanb="${esc}[1;36m"; whiteb="${esc}[1;37m"
-
- boldon="${esc}[1m"; boldoff="${esc}[22m"
- italicson="${esc}[3m"; italicsoff="${esc}[23m"
- ulon="${esc}[4m"; uloff="${esc}[24m"
- invon="${esc}[7m"; invoff="${esc}[27m"
-
- reset="${esc}[0m"
-}
-
-# note in this first use that switching colors doesn't require a reset
-# first - the new color overrides the old one.
-
-numbers (){
-
-initializeANSI
-
-cat << EOF
-${blackf}11111111${reset} ${redf}22222222${reset} ${greenf}33333333${reset} ${yellowf}44444444${reset} ${bluef}55555555${reset} ${purplef}66666666${reset} ${cyanf}77777777${reset} ${whitef}88888888${reset}
-${blackb}11111111${reset} ${redb}22222222${reset} ${greenb}33333333${reset} ${yellowb}44444444${reset} ${blueb}55555555${reset} ${purpleb}66666666${reset} ${cyanb}77777777${reset} ${whiteb}88888888${reset}
-EOF
-
-}
-
-blocks (){
-
-initializeANSI
-
-cat << EOF
-${blackf}████${reset}${blackb}████${reset} ${redf}████${reset}${redb}████${reset} ${greenf}████${reset}${greenb}████${reset} ${yellowf}████${reset}${yellowb}████${reset} ${bluef}████${reset}${blueb}████${reset} ${purplef}████${reset}${purpleb}████${reset} ${cyanf}████${reset}${cyanb}████${reset} ${whitef}████${reset}${whiteb}████${reset}
-${blackf}████${reset}${blackb}████${reset} ${redf}████${reset}${redb}████${reset} ${greenf}████${reset}${greenb}████${reset} ${yellowf}████${reset}${yellowb}████${reset} ${bluef}████${reset}${blueb}████${reset} ${purplef}████${reset}${purpleb}████${reset} ${cyanf}████${reset}${cyanb}████${reset} ${whitef}████${reset}${whiteb}████${reset}
-${blackf}████${reset}${blackb}████${reset} ${redf}████${reset}${redb}████${reset} ${greenf}████${reset}${greenb}████${reset} ${yellowf}████${reset}${yellowb}████${reset} ${bluef}████${reset}${blueb}████${reset} ${purplef}████${reset}${purpleb}████${reset} ${cyanf}████${reset}${cyanb}████${reset} ${whitef}████${reset}${whiteb}████${reset}
-EOF
-
-}
-
-case $1 in
- b) blocks;;
- n) numbers;;
- a) blocks && numbers;;
- *) blocks && numbers;;
-esac
diff --git a/.local/bin/colorbars b/.local/bin/colorbars
index 4e3b8f7..e8e0b9d 100755
--- a/.local/bin/colorbars
+++ b/.local/bin/colorbars
@@ -1,35 +1,32 @@
#!/bin/sh
-#
-# colorbars - smpte color bars in sh
-# http://git.io/colorbars
-
echo
-for y in $(seq 0 13); do
- printf %s ' '
+# mini smpte color bars
+for y in $(seq 0 6); do
+ printf %s ' '
for color in 7 3 6 2 5 1 4; do
tput setab ${color}
- printf %s ' '
+ printf %s ' '
done
tput sgr0
echo
done
for y in 0 1; do
- printf %s ' '
+ printf %s ' '
for color in 4 0 5 0 6 0 7; do
tput setab ${color}
- printf %s ' '
+ printf %s ' '
done
tput sgr0
echo
done
-for y in $(seq 0 4); do
- printf %s ' '
+for y in $(seq 0 2); 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 ' '
+ printf %s ' '
done
tput sgr0
echo
diff --git a/.local/bin/colorbars-sm b/.local/bin/colorbars-sm
deleted file mode 100755
index e8e0b9d..0000000
--- a/.local/bin/colorbars-sm
+++ /dev/null
@@ -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 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 2); 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/.local/bin/colorscheme b/.local/bin/colorscheme
deleted file mode 100755
index f2aa179..0000000
--- a/.local/bin/colorscheme
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/bash
-#
-# This file echoes a bunch of color codes to the
-# terminal to demonstrate what's available. Each
-# line is the color code of one forground color,
-# out of 17 (default + 16 escapes), followed by a
-# test use of that color on all nine background
-# colors (default + 8 escapes).
-#
-
-T='niX' # The test text
-
-echo -e "\n 40m 41m 42m 43m\
- 44m 45m 46m 47m";
-
-for FGs in ' m' ' 1m' ' 30m' '1;30m' ' 31m' '1;31m' ' 32m' \
- '1;32m' ' 33m' '1;33m' ' 34m' '1;34m' ' 35m' '1;35m' \
- ' 36m' '1;36m' ' 37m' '1;37m';
- do FG=${FGs// /}
- echo -en " $FGs \033[$FG $T "
- for BG in 40m 41m 42m 43m 44m 45m 46m 47m;
- do echo -en "$EINS \033[$FG\033[$BG $T \033[0m";
- done
- echo;
-done
-echo
-
diff --git a/.local/bin/cronbat b/.local/bin/cronbat
deleted file mode 100755
index c09ff42..0000000
--- a/.local/bin/cronbat
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-# Notify me with notify-send if my battery is below 25%.
-# You can set this to run via cron.
-
-[ "$(cat /sys/class/power_supply/BAT0/status)" = "Charging" ] && exit
-[ "$(cat /sys/class/power_supply/BAT0/capacity)" -lt 25 ] &&
-export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1001/bus &&
-notify-send -u critical "Battery critically low."
diff --git a/.local/bin/getbib b/.local/bin/getbib
deleted file mode 100755
index ed441c5..0000000
--- a/.local/bin/getbib
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/sh
-[ -z "$1" ] && echo "Give either a pdf file or a DOI as an argument." && exit
-
-if [ -f "$1" ]; then
- # Try to get DOI from pdfinfo or pdftotext output.
- doi=$(pdfinfo "$1" | grep -io "doi:.*") ||
- doi=$(pdftotext "$1" 2>/dev/null - | grep -io "doi:.*" -m 1) ||
- exit 1
-else
- doi="$1"
-fi
-
-# Check crossref.org for the bib citation.
-curl -s "http://api.crossref.org/works/$doi/transform/application/x-bibtex" -w "\\n"
diff --git a/.local/bin/pacman-colors b/.local/bin/pacman-colors
deleted file mode 100755
index 2b54b07..0000000
--- a/.local/bin/pacman-colors
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/bin/bash
-#
-# ANSI color scheme script featuring PACMAN
-# by pfh
-#
-# Initializing procedure by lolilolicon
-#
-
-f=3 b=4
-for j in f b; do
- for i in {0..7}; do
- printf -v $j$i %b "\e[${!j}${i}m"
- done
-done
-bld=$'\e[1m'
-rst=$'\e[0m'
-inv=$'\e[7m'
-
-
-cat << EOF
-
-$rst
- $f3 ▄███████▄ $f1 ▄██████▄ $f2 ▄██████▄ $f4 ▄██████▄ $f5 ▄██████▄ $f6 ▄██████▄
- $f3▄█████████▀▀ $f1▄$f7█▀█$f1██$f7█▀█$f1██▄ $f2▄█$f7█ █$f2██$f7█ █$f2█▄ $f4▄█$f7█ █$f4██$f7█ █$f4█▄ $f5▄█$f7█ █$f5██$f7█ █$f5█▄ $f6▄██$f7█▀█$f6██$f7█▀█$f6▄
- $f3███████▀ $f7▄▄ ▄▄ ▄▄ $f1█$f7▄▄█$f1██$f7▄▄█$f1███ $f2██$f7███$f2██$f7███$f2██ $f4██$f7███$f4██$f7███$f4██ $f5██$f7███$f5██$f7███$f5██ $f6███$f7█▄▄$f6██$f7█▄▄$f6█
- $f3███████▄ $f7▀▀ ▀▀ ▀▀ $f1████████████ $f2████████████ $f4████████████ $f5████████████ $f6████████████
- $f3▀█████████▄▄ $f1██▀██▀▀██▀██ $f2██▀██▀▀██▀██ $f4██▀██▀▀██▀██ $f5██▀██▀▀██▀██ $f6██▀██▀▀██▀██
- $f3 ▀███████▀ $f1▀ ▀ ▀ ▀ $f2▀ ▀ ▀ ▀ $f4▀ ▀ ▀ ▀ $f5▀ ▀ ▀ ▀ $f6▀ ▀ ▀ ▀
-$rst
-EOF
-
-# $rst
-# $f3 ▄███████▄ $f1 ▄██████▄ $f2 ▄██████▄ $f4 ▄██████▄ $f5 ▄██████▄ $f6 ▄██████▄
-# $f3▄█████████▀▀ $f1▄$f7█▀█$f1██$f7█▀█$f1██▄ $f2▄█$f7███$f2██$f7███$f2█▄ $f4▄█$f7███$f4██$f7███$f4█▄ $f5▄█$f7███$f5██$f7███$f5█▄ $f6▄██$f7█▀█$f6██$f7█▀█$f6▄
-# $f3███████▀ $f7▄▄ ▄▄ ▄▄ $f1█$f7▄▄█$f1██$f7▄▄█$f1███ $f2██$f7█ █$f2██$f7█ █$f2██ $f4██$f7█ █$f4██$f7█ █$f4██ $f5██$f7█ █$f5██$f7█ █$f5██ $f6███$f7█▄▄$f6██$f7█▄▄$f6█
-# $f3███████▄ $f7▀▀ ▀▀ ▀▀ $f1████████████ $f2████████████ $f4████████████ $f5████████████ $f6████████████
-# $f3▀█████████▄▄ $f1██▀██▀▀██▀██ $f2██▀██▀▀██▀██ $f4██▀██▀▀██▀██ $f5██▀██▀▀██▀██ $f6██▀██▀▀██▀██
-# $f3 ▀███████▀ $f1▀ ▀ ▀ ▀ $f2▀ ▀ ▀ ▀ $f4▀ ▀ ▀ ▀ $f5▀ ▀ ▀ ▀ $f6▀ ▀ ▀ ▀
-# $bld
-# $f3 ▄███████▄ $f1 ▄██████▄ $f2 ▄██████▄ $f4 ▄██████▄ $f5 ▄██████▄ $f6 ▄██████▄
-# $f3▄█████████▀▀ $f1▄$f7█▀█$f1██$f7█▀█$f1██▄ $f2▄█$f7█ █$f2██$f7█ █$f2█▄ $f4▄█$f7█ █$f4██$f7█ █$f4█▄ $f5▄█$f7█ █$f5██$f7█ █$f5█▄ $f6▄██$f7█▀█$f6██$f7█▀█$f6▄
-# $f3███████▀ $f7▄▄ ▄▄ ▄▄ $f1█$f7▄▄█$f1██$f7▄▄█$f1███ $f2██$f7███$f2██$f7███$f2██ $f4██$f7███$f4██$f7███$f4██ $f5██$f7███$f5██$f7███$f5██ $f6███$f7█▄▄$f6██$f7█▄▄$f6█
-# $f3███████▄ $f7▀▀ ▀▀ ▀▀ $f1████████████ $f2████████████ $f4████████████ $f5████████████ $f6████████████
-# $f3▀█████████▄▄ $f1██▀██▀▀██▀██ $f2██▀██▀▀██▀██ $f4██▀██▀▀██▀██ $f5██▀██▀▀██▀██ $f6██▀██▀▀██▀██
-# $f3 ▀███████▀ $f1▀ ▀ ▀ ▀ $f2▀ ▀ ▀ ▀ $f4▀ ▀ ▀ ▀ $f5▀ ▀ ▀ ▀ $f6▀ ▀ ▀ ▀
-# $rst
-# EOF
-
diff --git a/.local/bin/pipes b/.local/bin/pipes
deleted file mode 100755
index 4709745..0000000
--- a/.local/bin/pipes
+++ /dev/null
@@ -1,136 +0,0 @@
-#!/usr/bin/env bash
-# pipes.sh: Animated pipes terminal screensaver.
-#
-# This modified version is maintained at:
-#
-# https://github.com/pipeseroni/pipes.sh
-
-VERSION=1.2.0
-
-M=32768
-p=1
-f=75 s=13 r=2000 t=0
-w=80 h=24
-
-resize() {
- 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=(
- "┃┏ ┓┛━┓ ┗┃┛┗ ┏━"
- "│╭ ╮╯─╮ ╰│╯╰ ╭─"
- "│┌ ┐┘─┐ └│┘└ ┌─"
- "║╔ ╗╝═╗ ╚║╝╚ ╔═"
- "|+ ++-+ +|++ +-"
- "|/ \/-\ \|/\ /-"
- ".. .... .... .."
- ".o oo.o o.oo o."
- "-\ /\|/ /-\/ \|" # railway
- "╿┍ ┑┚╼┒ ┕╽┙┖ ┎╾" # knobby pipe
-)
-v=()
-RNDSTART=0
-BOLD=1
-NOCOLOR=0
-
-OPTIND=1
-while getopts "p:t:f:s:r:RBChv" arg; do
-case $arg in
- p) ((p=(OPTARG>0)?OPTARG:p));;
- t)
- if [[ "$OPTARG" = c???????????????? ]]; then
- V+=(${#sets[@]})
- sets+=("${OPTARG:1}")
- else
- ((OPTARG>=0 && OPTARG<${#sets[@]})) && V+=($OPTARG)
- fi
- ;;
- 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;;
- B) BOLD=0;;
- 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 " -t c[16 chars]\tcustom type of pipes."
- 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 " -B \t\tno bold effect."
- 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)
-
-cleanup() {
- # clear up standard input
- read -t 0.001 && cat </dev/stdin>/dev/null
-
- # terminal has no smcup and rmcup capabilities
- ((FORCE_RESET)) && reset && exit 0
-
- tput rmcup
- tput cnorm
- stty echo
- ((NOCOLOR)) && echo -ne '\x1b[0m'
- exit 0
-}
-trap resize SIGWINCH
-trap cleanup HUP TERM
-trap 'break 2' INT
-
-resize
-
-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 || FORCE_RESET=1
-tput civis
-tput clear
-# any key press exits the loop and this script
-while REPLY=; read -t 0.0$((1000/f)) -n 1 2>/dev/null; [[ -z $REPLY ]] ; 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]}
- echo -ne "\x1b[${BOLD}m"
- [[ $NOCOLOR == 0 ]] && echo -ne "\x1b[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
diff --git a/.local/bin/pipesx b/.local/bin/pipesx
deleted file mode 100755
index 2397b56..0000000
--- a/.local/bin/pipesx
+++ /dev/null
@@ -1,207 +0,0 @@
-#!/bin/bash
-# Animated pipes.sh terminal screensaver at an angle.
-# Copyright (c) 2013-2015 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/pipeseroni/pipesX.sh
-
-VERSION=1.1.0
-
-W=$(tput cols) H=$(tput lines)
-# maximal random value + 1
-M=32768
-
-SETS=('╱╲' '/\' '..' 'oo' '\/')
-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)
- -t c[2chs] custom type of pipes.
- -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)
- if [[ "$OPTARG" = c?? ]]; then
- T+=(${#SETS[@]})
- SETS+=("${OPTARG:1}")
- else
- T+=($(((OPTARG >= 0 && OPTARG < ${#SETS[@]}) ? OPTARG : T)))
- fi
- ;;
- 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() {
- # clear up standard input
- read -t 0.001 && cat </dev/stdin>/dev/null
-
- # terminal has no smcup and rmcup capabilities
- ((FORCE_RESET)) && reset && exit 0
-
- tput rmcup
- tput cnorm
- stty echo
- ((NOCOLOR)) && echo -ne '\e[0m'
- exit 0
- }
-trap do_exit HUP TERM
-trap 'break 2' INT
-
-# No echo stdin and hide the cursor
-stty -echo
-tput smcup || FORCE_RESET=1
-tput civis
-tput clear
-
-# 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 REPLY=; read -t $I -n 1; [[ -z $REPLY ]] ; 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
- ((R)) && ((r += N, r >= R)) && r=0 && clear
-done
-
-do_exit
diff --git a/.local/bin/pod-dl b/.local/bin/pod-dl
deleted file mode 100755
index ab26367..0000000
--- a/.local/bin/pod-dl
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/sh
-
-# tmux kill-session -t Podcast 2 &> /dev/null
-
-file=$(tail -n 1 $HOME/.local/share/newsboat/queue)
-url=$(echo $file | sed 's/."\/home.*$//')
-dir=$(echo $file | sed 's/^.*"\/home/\/home/; s/.$//')
-
-$TERMINAL -c dropdown -t Podcast -e ~/.local/bin/tmux-vlc "$url"
-
-# notify-send -i "$HOME/.fonts/svg/rss.svg" "Download initiated"
-# wget -LO $dir $url && \
-# notify-send -i "$HOME/.fonts/svg/rss.svg" "Download Complete" && \
-# st -e $HOME/.scripts/tools/tm-vlc $dir
-
-
-#!/bin/sh
-
-# tmux kill-session -t tm-vlc
-# killall -q vlc
-
-# file=$(cat $HOME/.local/share/newsboat/queue | sed 2q | tail -n 1)
-# url=$(echo $file | sed 's/."\/home.*$//')
-# dir=$(echo $file | sed 's/^.*"\/home/\/home/; s/.$//')
-
-# notify-send -i "$HOME/.fonts/svg/rss.svg" "Download initiated"
-# setsid wget -LO $dir $url & sleep 2s && st -e $HOME/.scripts/tools/tm-vlc "$dir" && \
-# notify-send -i "$HOME/.fonts/svg/rss.svg" "Download Complete"
-
-# echo "" > $HOME/.local/share/newsboat/queue
diff --git a/.local/bin/qndl b/.local/bin/qndl
deleted file mode 100755
index df0bedf..0000000
--- a/.local/bin/qndl
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh
-# $1 is a url; $2 is a command
-[ -z "$1" ] && exit
-base="$(basename "$1")"
-notify-send -i "$HOME/.fonts/svg/rss.svg" "Queuing $base..."
-cmd="$2"
-notify-send $cmd
-[ -z "$cmd" ] && cmd="youtube-dl --add-metadata"
-idnum="$(tsp $cmd "$1")"
-realname="$(echo "$base" | sed "s/?\(source\|dest\).*//;s/%20/ /g")"
-tsp -D "$idnum" mv "$base" "$HOME/Downloads/Podcasts/$realname"
-tsp -D "$idnum" notify-send -i "$HOME/.fonts/svg/check-circle.svg" "$realname done."
-tsp -D "$idnum" sleep 5s && st -e $HOME/.scripts/tools/tm-vlc "$HOME/Downloads/Podcasts/$realname"
diff --git a/.local/bin/setbg b/.local/bin/setbg
deleted file mode 100755
index b32783b..0000000
--- a/.local/bin/setbg
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-# This script does the following:
-# Run by itself, set the wallpaper (at X start).
-# If given a file, set that as the new wallpaper.
-# If given a directory, choose random file in it.
-
-# Location of link to wallpaper link.
-bgloc="${XDG_CACHE_HOME:-$HOME/.cache/}wall.png"
-
-[ -f "$1" ] && ln -sf "$(readlink -f "$1")" "$bgloc" && notify-send -i "$bgloc" "Changing wallpaper..."
-
-[ -d "$1" ] && ln -sf "$(find "$(readlink -f "$1")" -iregex '.*.\(jpg\|jpeg\|png\|gif\)' -type f | shuf -n 1)" "$bgloc" && notify-send -i "$bgloc" "Random Wallpaper chosen."
-
-# # If pywal is installed, use it.
-# wal -s -i "$(readlink -f "$bgloc")" -o "${XDG_CONFIG_HOME:-$HOME/.config}/wal/postrun" >/dev/null 2>&1
-
-xwallpaper --zoom "$bgloc" &
-
diff --git a/.local/bin/surfmenu b/.local/bin/surfmenu
deleted file mode 100755
index 0f046e0..0000000
--- a/.local/bin/surfmenu
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-url=$(cat ~/.surf/bookmarks | dmenu -i -p "Go: ")
-surf "$url"
diff --git a/.local/bin/unix b/.local/bin/unix
deleted file mode 100755
index 14d7ef0..0000000
--- a/.local/bin/unix
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-#original artwork by http://www.sanderfocus.nl/#/portfolio/tech-heroes
-#converted to shell by #nixers @ irc.unix.chat
-
-cat << 'eof'
- ,_ ,_==▄▂
- , ▂▃▄▄▅▅▅▂▅¾. / /
- ▄▆<´ "»▓▓▓%\ / / / /
- ,▅7" ´>▓▓▓% / / > / >/%
- ▐¶▓ ,»▓▓¾´ /> %/%// / /
- ▓▃▅▅▅▃,,▄▅▅▅Æ\// ///>// />/ /
- V║«¼.;→ ║<«.,`=// />//%/% / /
- //╠<´ -²,)(▓~"-╝/¾/ %/>/ />
- / / / ▐% -./▄▃▄▅▐, /7//;//% / /
- / ////`▌▐ %zWv xX▓▇▌//&;% / /
- / / / %//%/¾½´▌▃▄▄▄▄▃▃▐¶\/& /
- </ /</%//`▓!%▓%╣[38;5;255;╣WY<Y)y&/`\
- / / %/%//</%//\i7; ╠N>)VY>7; \_ UNIX IS VERY SIMPLE IT JUST NEEDS A
- / /</ //<///<_/%\▓ V%W%£)XY _/%‾\_, GENIUS TO UNDERSTAND ITS SIMPLICITY
- / / //%/_,=--^/%/%%\¾%¶%%} /%%%%%%;\,
- %/< /_/ %%%%%;X%%\%%;, _/%%%;, \
- / / %%%%%%;, \%%l%%;// _/%;, dmr
- / %%%;, <;\-=-/ /
- ;, l
-eof \ No newline at end of file
diff --git a/.local/bin/upsite b/.local/bin/upsite
new file mode 100755
index 0000000..fa7649a
--- /dev/null
+++ b/.local/bin/upsite
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+sitename="chausse.xyz"
+
+cd "$HOME/Workspace/$sitename"
+
+hugo
+
+rsync -auvz "$HOME/Workspace/$sitename/public/" "master@$sitename:/var/www/dev"