dot

packages and services management
Log | Files | Refs | README

commit fbe546cc2e981029e84ac1f33b210199add7c3d0
parent 20686171d8bb1cc782f54f8f254e1488a7183774
Author: josuah <mail@josuah.net>
Date:   Sat,  8 Oct 2016 00:15:05 -0400

Updated all headers

Diffstat:
Rbin/.cache/agenda -> agenda/.cache/agenda | 0
Aagenda/.local/bin/agenda | 287+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mbin/adagio | 11+++++------
Dbin/agenda | 288-------------------------------------------------------------------------------
Dbin/bkm | 57---------------------------------------------------------
Mbin/blawk | 11+++++------
Mbin/buffers | 11+++++------
Mbin/complete | 11+++++------
Mbin/dna | 25+++++++++++++++----------
Mbin/drawk | 11+++++------
Mbin/feeds | 11+++++------
Mbin/fig | 1149++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------------------
Mbin/irc | 11+++++------
Mbin/lsync | 11+++++------
Mbin/lsync2 | 35+++++++++++++++++++++++------------
Mbin/music | 11+++++------
Mbin/peax | 9++++-----
Mbin/piano | 11+++++------
Mbin/piped | 11+++++------
Mbin/src | 9++++-----
Mbin/swiper | 11+++++------
Dbin/todo | 26--------------------------
Mbin/updd | 12++++++------
Mbin/version | 11+++++------
Mbin/www | 9++++-----
Rbin/.cache/bkm -> bkm/.cache/bkm | 0
Abkm/.local/bin/bkm | 56++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Memacs/.emacs.d/init.el | 16+++++++---------
Rbin/.config/feeds/read -> feeds/.config/feeds/read | 0
Rbin/.config/feeds/urls -> feeds/.config/feeds/urls | 0
Mgit/.config/git/config | 11+++++------
Ms-nail/.mailrc | 11+++++------
Mshell/.pam_environment | 10+++++-----
Mshell/.profile | 11+++++------
Mtmux/.config/tmux/new-session | 11+++++------
Mtmux/.config/tmux/status | 13++++++-------
Mtmux/.tmux.conf | 12+++++-------
Rbin/.cache/todo -> todo/.cache/todo | 0
Atodo/.local/bin/todo | 26++++++++++++++++++++++++++
Mvim/.vim/vimrc | 23+++++++++++------------
Mzathura/.config/zathura/zathurarc | 11+++++------
41 files changed, 1368 insertions(+), 892 deletions(-)

diff --git a/bin/.cache/agenda b/agenda/.cache/agenda diff --git a/agenda/.local/bin/agenda b/agenda/.local/bin/agenda @@ -0,0 +1,287 @@ +#!/bin/sh +# | +# ,--. ,--, ,--. ---. .--| ,--. +# ,--| | | |--' | | | | ,--| +# `--` `--| `--' ' ' `--` `--` 2016-10-08 +#------`--'--------------------------------------------------------------------- +# Agenda from the command line + +AGENDA="${AGENDA-$HOME/.cache/agenda}" +COLUMNS="$(stty size | cut -d ' ' -f 2)" + +help="NAME + agenda - Agenda from the command line. + +SYNTAX + agenda COMMAND [-d DATE] [-i ICAL] + +DESCRIPTION + -d Set date to use + -i Import an ICAL to $AGENDA + a, agenda + for next event starting from DATE or today. + c, calendar + for current week and next events highlihted. + + +FILES + \$AGENDA: $AGENDA + File storing the agenda, with each entry on a line, and each + field separated by a tab, in this order: + + 1. Start date (yyyy-mm-dd HH:MM:SS) + 2. End date (yyyy-mm-dd HH:MM:SS) + 3. Name + 4. Location + 5. Description +" + + +# AWK SCRIPTS +# ------------------------------------------------------------------------------ + +awk_ical=' +BEGIN { + FS = ":"; +} + +/BEGIN:VEVENT/,/END:VEVENT/ { + if (substr($0, 1, 1) != " ") { + type = $1; + vevent[type] = $2; + } else + vevent[type] = vevent[type] substr($0, 2, length($0) - 1); + + if ($0 == "BEGIN:VEVENT") { + date = vevent["DTSTART"] + printf("%s-%s-%s %s:%s:%s\t", + substr(date, 1, 4), # Year + substr(date, 5, 2), # Month + substr(date, 7, 2), # Day + substr(date, 10, 2), # Hour + substr(date, 12, 2), # Minute + substr(date, 14, 2)); # Second + + date = vevent["DTEND"] + printf("%s-%s-%s %s:%s:%s\t", + substr(date, 1, 4), # Year + substr(date, 5, 2), # Month + substr(date, 7, 2), # Day + substr(date, 10, 2), # Hour + substr(date, 12, 2), # Minute + substr(date, 14, 2)); # Second + + printf("%s\t", vevent["SUMMARY"]); + printf("%s\t", vevent["LOCATION"]); + printf("%s\n", vevent["DESCRIPTION"]); + } +}' + +awk_agenda=' +BEGIN { + FS = "\t"; +} + +{ + "date +%s -d '\''"$1"'\''" | getline event_date; +} + +(now <= event_date) { + beg = $1; end = $2; sum = $3; loc = $4; des = $5; + + beg_Y = substr(beg, 1, 4); sub(/^0/, " ", beg_Y); + beg_m = substr(beg, 6, 2); sub(/^0/, " ", beg_m); + beg_d = substr(beg, 9, 2); sub(/^0/, " ", beg_d); + beg_R = substr(beg, 12, 5); sub(/^0/, " ", beg_R); + end_Y = substr(end, 1, 4); sub(/^0/, " ", end_Y); + end_m = substr(end, 6, 2); sub(/^0/, " ", end_m); + end_d = substr(end, 9, 2); sub(/^0/, " ", end_d); + end_R = substr(end, 12, 5); sub(/^0/, " ", end_R); + + sub(/^\\n/, "", des); + gsub(/\\n/, " - ", des); + gsub(/\\/, "", sum); gsub(/\\/, "", loc); gsub(/\\/, "", des); + + # Header line + if (last_beg_Y != beg_Y) { + printf("_%4s_________Summary__________________________________"\ + "Location____________________________________________" \ + "____________________________________________________" \ + "\n |\n", + beg_Y); + } + + # First line + if (last_beg_m != beg_m) {printf("%2s ", beg_m);} else {printf(" ");} + if (last_beg_d != beg_d) {printf("%2s ", beg_d);} else {printf(" ");} + + printf("%5s | %-40s %s\n", beg_R, sum, loc); + + # Second line + if (beg_m != end_m) {printf("%2s ", end_m);} else {printf(" ");} + if (beg_d != end_d) {printf("%2s ", end_d);} else {printf(" ");} + if (beg_R != end_R) {printf("%5s ", end_R);} else {printf(" ");} + + printf("|\033[30;1m %s", des); + + printf("\n\033[0m |\n"); + + last_beg_Y = beg_Y; + last_beg_m = beg_m; + last_beg_d = beg_d; +}' + +awk_calendar=' +BEGIN { + FS = "\t"; + + header = " "; + row[0] = " Mon "; + row[1] = " Tue "; + row[2] = " Wed "; + row[3] = " Thu "; + row[4] = " Fri "; + row[5] = " Sat "; + row[6] = " Sun "; + + # fill the empty days with spaces + for (i = 0; i < w; i++) + row[i] = row[i] " "; + + # month name offset + if (w == 0) offset = 0; + else offset = 1; + + # increase date for every day + for (j = 0; j <= range; j++) { + + # day of week + if ((j + w) % 7 == 0) { + offset++; + } + + if (d < 28 \ + || (d == 28 && m == 2 && Y % 4 == 0) \ + || (d < 30 && ((m <= 7 && m % 2 == 0) \ + || (m >= 8 && m % 2 == 1)) && m != 2) \ + || (d < 31 && ((m <= 7 && m % 2 == 1) \ + || (m >= 8 && m % 2 == 0)) && m != 2)) { + d++; + } else { + d = 1; + + if (m < 12) { + m++; + } else { + m = 1; Y++; + } + + if (m == 1) month = "Jan"; + else if (m == 2) month = "Feb"; + else if (m == 3) month = "Mar"; + else if (m == 4) month = "Apr"; + else if (m == 5) month = "May"; + else if (m == 6) month = "Jun"; + else if (m == 7) month = "Jul"; + else if (m == 8) month = "Aug"; + else if (m == 9) month = "Sep"; + else if (m == 10) month = "Oct"; + else if (m == 11) month = "Nov"; + else if (m == 12) month = "Dec"; + + header = sprintf("%s%" offset * 3 - 3 "s%s", \ + header, "", month); + offset = 0; + } + + date = sprintf("%04d-%02d-%02d", Y, m, d); + + # while event end is in the past, get next event if any + while (substr($2, 0, 10) < date) + if (! getline) break; + + # add a leading space + row[(j + w) % 7] = row[(j + w) % 7] " "; + + # if it begins in the past and ends in the future + if (substr($1, 0, 10) <= date && date <= substr($2, 0, 10)) + row[(j + w) % 7] = row[(j + w) % 7] "\033[7m"; + + # current day + if (date == today) + row[(j + w) % 7] = row[(j + w) % 7] "\033[31;1m"; + + # day number + row[(j + w) % 7] = row[(j + w) % 7] sprintf("%2s\033[0m", d); + } + + print header; + for (i = 0; i <= 6; i++) { + print row[i]; + } +}' + + +# FUNCTIONS +# ------------------------------------------------------------------------------ + +import_ical() +{ + local ical="$1" + + sed -i 's/\r//; s/\t/ /g' "$ical" + awk "$awk_ical" "$ical" | cat - "$AGENDA" | sort | uniq > "$AGENDA" +} + +agenda() +{ + awk -v now="$SEC" "$awk_agenda" "$AGENDA" | cut -c 1-"$COLUMNS" +} + +calendar() +{ + awk \ + -v Y="$(date +'%Y' -d "@$SEC")" \ + -v m="$(date +'%m' -d "@$SEC")" \ + -v d="$(date +'%d' -d "@$SEC")" \ + -v w="$(date +'%w' -d "@$SEC")" \ + -v now="$(date +'%Y-%m-%d' -d "@$SEC")" \ + -v range="$(($COLUMNS * 7 / 3 - 26))" \ + "$awk_calendar" "$AGENDA" +} + + +# ALGORYTHM +# ------------------------------------------------------------------------------ + +[ $# = 0 ] && set -- help +while [ $# -gt 0 ] +do + case $1 in + a | agenda) + action="agenda" + shift + ;; + c | calendar) + action="calendar" + shift + ;; + -i ) + action="import_ical $2" + shift 2 + ;; + -d ) + DATE="$2" + + shift 2 + ;; + * ) + printf '%s\n' "$help" + exit 0 + ;; + esac + + [ "$DATE" ] && SEC="$(date +%s -d "$DATE")" || SEC="$(date +%s)" +done + +$action diff --git a/bin/adagio b/bin/adagio @@ -1,10 +1,9 @@ #!/bin/sh -# /\ -# / /_ ___ ___ ____ -# / __ \ .'__ \ .'__ \ / __ \ -# / /_/ // ____// ____// /_/ / -# \____/ \___\ \___\ / ____/ -#=====================\/======================================================== +# | * +# ,--. .--| ,--. ,--, , ,--. +# ,--| | | ,--| | | | | | +# `--` `--` `--` `--| ' `--' 2016-10-07 +#----------------`--'----------------------------------------------------------- # Albinoni, Adagio fog G minor adapted to 'beep' # # diff --git a/bin/agenda b/bin/agenda @@ -1,288 +0,0 @@ -#!/bin/sh -# /\ -# _____ _____ ___ ____ ___/ / _____ -# .'__ /.'__ /.'__ \ / __ \ .'__ /.'__ / -# / /_/ // /_/ // ____// / / // /_/ // /_/ / -# \____/_\__ / \___\ \/ \/ \____/ \____/ -#=======\__,-'================================================================= -# Agenda from the command line - -AGENDA="${AGENDA-$HOME/.cache/agenda}" -COLUMNS="$(stty size | cut -d ' ' -f 2)" - -help="NAME - agenda - Agenda from the command line. - -SYNTAX - agenda COMMAND [-d DATE] [-i ICAL] - -DESCRIPTION - -d Set date to use - -i Import an ICAL to $AGENDA - a, agenda - for next event starting from DATE or today. - c, calendar - for current week and next events highlihted. - - -FILES - \$AGENDA: $AGENDA - File storing the agenda, with each entry on a line, and each - field separated by a tab, in this order: - - 1. Start date (yyyy-mm-dd HH:MM:SS) - 2. End date (yyyy-mm-dd HH:MM:SS) - 3. Name - 4. Location - 5. Description -" - - -# AWK SCRIPTS -# ------------------------------------------------------------------------------ - -awk_ical=' -BEGIN { - FS = ":"; -} - -/BEGIN:VEVENT/,/END:VEVENT/ { - if (substr($0, 1, 1) != " ") { - type = $1; - vevent[type] = $2; - } else - vevent[type] = vevent[type] substr($0, 2, length($0) - 1); - - if ($0 == "BEGIN:VEVENT") { - date = vevent["DTSTART"] - printf("%s-%s-%s %s:%s:%s\t", - substr(date, 1, 4), # Year - substr(date, 5, 2), # Month - substr(date, 7, 2), # Day - substr(date, 10, 2), # Hour - substr(date, 12, 2), # Minute - substr(date, 14, 2)); # Second - - date = vevent["DTEND"] - printf("%s-%s-%s %s:%s:%s\t", - substr(date, 1, 4), # Year - substr(date, 5, 2), # Month - substr(date, 7, 2), # Day - substr(date, 10, 2), # Hour - substr(date, 12, 2), # Minute - substr(date, 14, 2)); # Second - - printf("%s\t", vevent["SUMMARY"]); - printf("%s\t", vevent["LOCATION"]); - printf("%s\n", vevent["DESCRIPTION"]); - } -}' - -awk_agenda=' -BEGIN { - FS = "\t"; -} - -{ - "date +%s -d '\''"$1"'\''" | getline event_date; -} - -(now <= event_date) { - beg = $1; end = $2; sum = $3; loc = $4; des = $5; - - beg_Y = substr(beg, 1, 4); sub(/^0/, " ", beg_Y); - beg_m = substr(beg, 6, 2); sub(/^0/, " ", beg_m); - beg_d = substr(beg, 9, 2); sub(/^0/, " ", beg_d); - beg_R = substr(beg, 12, 5); sub(/^0/, " ", beg_R); - end_Y = substr(end, 1, 4); sub(/^0/, " ", end_Y); - end_m = substr(end, 6, 2); sub(/^0/, " ", end_m); - end_d = substr(end, 9, 2); sub(/^0/, " ", end_d); - end_R = substr(end, 12, 5); sub(/^0/, " ", end_R); - - sub(/^\\n/, "", des); - gsub(/\\n/, " - ", des); - gsub(/\\/, "", sum); gsub(/\\/, "", loc); gsub(/\\/, "", des); - - # Header line - if (last_beg_Y != beg_Y) { - printf("_%4s_________Summary__________________________________"\ - "Location____________________________________________" \ - "____________________________________________________" \ - "\n |\n", - beg_Y); - } - - # First line - if (last_beg_m != beg_m) {printf("%2s ", beg_m);} else {printf(" ");} - if (last_beg_d != beg_d) {printf("%2s ", beg_d);} else {printf(" ");} - - printf("%5s | %-40s %s\n", beg_R, sum, loc); - - # Second line - if (beg_m != end_m) {printf("%2s ", end_m);} else {printf(" ");} - if (beg_d != end_d) {printf("%2s ", end_d);} else {printf(" ");} - if (beg_R != end_R) {printf("%5s ", end_R);} else {printf(" ");} - - printf("|\033[30;1m %s", des); - - printf("\n\033[0m |\n"); - - last_beg_Y = beg_Y; - last_beg_m = beg_m; - last_beg_d = beg_d; -}' - -awk_calendar=' -BEGIN { - FS = "\t"; - - header = " "; - row[0] = " Mon "; - row[1] = " Tue "; - row[2] = " Wed "; - row[3] = " Thu "; - row[4] = " Fri "; - row[5] = " Sat "; - row[6] = " Sun "; - - # fill the empty days with spaces - for (i = 0; i < w; i++) - row[i] = row[i] " "; - - # month name offset - if (w == 0) offset = 0; - else offset = 1; - - # increase date for every day - for (j = 0; j <= range; j++) { - - # day of week - if ((j + w) % 7 == 0) { - offset++; - } - - if (d < 28 \ - || (d == 28 && m == 2 && Y % 4 == 0) \ - || (d < 30 && ((m <= 7 && m % 2 == 0) \ - || (m >= 8 && m % 2 == 1)) && m != 2) \ - || (d < 31 && ((m <= 7 && m % 2 == 1) \ - || (m >= 8 && m % 2 == 0)) && m != 2)) { - d++; - } else { - d = 1; - - if (m < 12) { - m++; - } else { - m = 1; Y++; - } - - if (m == 1) month = "Jan"; - else if (m == 2) month = "Feb"; - else if (m == 3) month = "Mar"; - else if (m == 4) month = "Apr"; - else if (m == 5) month = "May"; - else if (m == 6) month = "Jun"; - else if (m == 7) month = "Jul"; - else if (m == 8) month = "Aug"; - else if (m == 9) month = "Sep"; - else if (m == 10) month = "Oct"; - else if (m == 11) month = "Nov"; - else if (m == 12) month = "Dec"; - - header = sprintf("%s%" offset * 3 - 3 "s%s", \ - header, "", month); - offset = 0; - } - - date = sprintf("%04d-%02d-%02d", Y, m, d); - - # while event end is in the past, get next event if any - while (substr($2, 0, 10) < date) - if (! getline) break; - - # add a leading space - row[(j + w) % 7] = row[(j + w) % 7] " "; - - # if it begins in the past and ends in the future - if (substr($1, 0, 10) <= date && date <= substr($2, 0, 10)) - row[(j + w) % 7] = row[(j + w) % 7] "\033[7m"; - - # current day - if (date == today) - row[(j + w) % 7] = row[(j + w) % 7] "\033[31;1m"; - - # day number - row[(j + w) % 7] = row[(j + w) % 7] sprintf("%2s\033[0m", d); - } - - print header; - for (i = 0; i <= 6; i++) { - print row[i]; - } -}' - - -# FUNCTIONS -# ------------------------------------------------------------------------------ - -import_ical() -{ - local ical="$1" - - sed -i 's/\r//; s/\t/ /g' "$ical" - awk "$awk_ical" "$ical" | cat - "$AGENDA" | sort | uniq > "$AGENDA" -} - -agenda() -{ - awk -v now="$SEC" "$awk_agenda" "$AGENDA" | cut -c 1-"$COLUMNS" -} - -calendar() -{ - awk \ - -v Y="$(date +'%Y' -d "@$SEC")" \ - -v m="$(date +'%m' -d "@$SEC")" \ - -v d="$(date +'%d' -d "@$SEC")" \ - -v w="$(date +'%w' -d "@$SEC")" \ - -v now="$(date +'%Y-%m-%d' -d "@$SEC")" \ - -v range="$(($COLUMNS * 7 / 3 - 26))" \ - "$awk_calendar" "$AGENDA" -} - - -# ALGORYTHM -# ------------------------------------------------------------------------------ - -[ $# = 0 ] && set -- help -while [ $# -gt 0 ] -do - case $1 in - a | agenda) - action="agenda" - shift - ;; - c | calendar) - action="calendar" - shift - ;; - -i ) - action="import_ical $2" - shift 2 - ;; - -d ) - DATE="$2" - - shift 2 - ;; - * ) - printf '%s\n' "$help" - exit 0 - ;; - esac - - [ "$DATE" ] && SEC="$(date +%s -d "$DATE")" || SEC="$(date +%s)" -done - -$action diff --git a/bin/bkm b/bin/bkm @@ -1,57 +0,0 @@ -#!/bin/sh -# /\ /\ -# / /_ / / __ ________ -# / __ \ / /,','/ __ __ \ -# / /_/ // ,' / / / / / / -# \____/ \/\_\ \/ \/ \/ -#=============================================================================== -# Tiny shell bookmark manager - -BOOKMARKS="${BKM:-$HOME/.cache/bkm}" - -if [ "$#" -eq 0 ] -then - url="$(fzf < $BOOKMARKS)" - [ "${url##* }" ] && TERM=screen $BROWSER "${url##* }" - - printf '\n\n\n\n\n\n\n' - exit 0 -fi - -printf 'url: '; read url -printf 'description: '; read description -tag="$( - sed -r 's/^([^ ]*).*/\1/' "$BOOKMARKS" | uniq | fzf | tr '[a-z]' '[A-Z]' -)" - -printf '%s %s %s\n' "$tag" "$description" "$url" >> "$BOOKMARKS" - -bookmarks="$( - awk 'BEGIN{ - max1=0; - max2=0; - } - - { - l++; - - c1[l] = $1; # First column - - for (i=2; i < NF; i++) { # Middle column - c2[l] = c2[l]$(i)(i<NF?OFS:""); - } - - c3[l] = $NF; # Last column - - max1 = ((length(c1[l]) > max1) ? length(c1[l]) : max1); - max2 = ((length(c2[l]) > max2) ? length(c2[l]) : max2); - } - - END { - for (i = 1; i <= l; i++) { - printf("%-"max1"s %-"max2"s %s\n", c1[i], c2[i], c3[i]); - } - }' "$BOOKMARKS" | sort -)" - -[ "$bookmarks" ] && printf '%s\n' "$bookmarks" > "$BOOKMARKS" diff --git a/bin/blawk b/bin/blawk @@ -1,10 +1,9 @@ #!/usr/bin/awk -f -# /\ /\ -# / /_ /\ _____.__ /\ / / __ -# / __ \ / /.'__ // /\/ // /,',' -# / /_/ // // /_/ // / / // ,' -# \____/ \/ \____/ \____/ \/\_\ -#=============================================================================== +# | | | +# |--. | ,--. , , , | / +# | | | ,--| | | | |-< +# '--' ' `--` `-'-' ' ` 2016-10-07 +#------------------------------------------------------------------------------- # Draw an image using block characters # USAGE: diff --git a/bin/buffers b/bin/buffers @@ -1,10 +1,9 @@ #/bin/sh -# /\ ____ ____ -# / /_ __ /\ .' ___\.' ___\ ___ _____ -# / __ \ / / / // .'_ / .'_ .'__ \ / ____\ -# / /_/ // /_/ // ___/ / ___/ / ____// / -# \____/ \____/ \/ \/ \___\ \/ -#=============================================================================== +# | ,-- ,-- +# |--. , , |- |- ,--. .,-- ,--- +# | | | | | | |--' | `--. +# '--' `--` ' ' `--' ' ---' 2016-10-07 +#------------------------------------------------------------------------------- # Run commands in detachable buffers # # External: stest (dmenu), fzf, abduco diff --git a/bin/complete b/bin/complete @@ -1,10 +1,9 @@ #!/bin/sh -# /\ /\ -# ____ ____ ________ ____ / / ___ / /_ ___ -# / ___\ / __ \ / __ __ \ / __ \ / /.'__ \ / ___\.'__ \ -# / /__ / /_/ // / / / / // /_/ // // ____// / / ____/ -# \____\ \____/ \/ \/ \// ____/ \/ \___\ \/ \___\ -#=========================\/==================================================== +# | | +# ,--. ,--. --.-. ---. | ,--. |-- ,--. +# | | | | | | | | | |--' | |--' +# `--' `--' ' ' ' |--' ' `--' ' `--' 2016-10-08 +#-----------------|------------------------------------------------------------- # Complete string with a word from a file. help=' diff --git a/bin/dna b/bin/dna @@ -1,16 +1,19 @@ #!/bin/sh -# /\ -# ___/ /____ _____ -# .'__ // __ \ .'__ / -# / /_/ // / / // /_/ / -# \____/ \/ \/ \____/ -#=============================================================================== +# | +# .--| ---. ,--. +# | | | | ,--| +# `--` ' ' `--` 2016-10-07 +#------------------------------------------------------------------------------- # Prints $dna with full structure, sequentially +# +# USAGE: +# dna [ATCG] +# +# with ATCG a string of one of these characters -# Usage: -# dna [ATCG] with ATCG a string of one of these characters -#===[ COLOR CODES ]============================================================= +# COLOR CODES +#------------------------------------------------------------------------------- # Reset # Bold R='' B='' @@ -18,7 +21,9 @@ R='' B='' # Red Green Yellow Blue Magenta Cyan Grey f1=''; f2=''; f3=''; f4=''; f5=''; f6=''; f7='' -#===[ DNA BASES ]=============================================================== + +# DNA BASES +#------------------------------------------------------------------------------- A="\ ${f1}O${R} ${f1}O${R} *---* diff --git a/bin/drawk b/bin/drawk @@ -1,10 +1,9 @@ #!/usr/bin/awk -f -# /\ /\ -# ___/ /_____ _____ __ /\ / / __ -# .'__ // ____\.'__ // /\/ // /,',' -# / /_/ // / / /_/ // / / // ,' -# \____/ \/ \____/ \____/ \/\_\ -#=============================================================================== +# | | +# .--| .,-- ,--. , , , | / +# | | | ,--| | | | |-< +# `--` ' `--` `-'-' ' ` 2016-10-07 +#------------------------------------------------------------------------------- # Drawille implementation in awk # # USAGE: diff --git a/bin/feeds b/bin/feeds @@ -1,10 +1,9 @@ #!/bin/sh -# ____ /\ -# .' ___\ ___ ___ ___/ / ____ -# / .'_ .'__ \ .'__ \ .'__ / / __/ -# / ___/ / ____// ____// /_/ /__\ \ -# \/ \___\ \___\ \____/ \___/ -#=============================================================================== +# ,-- | +# |- ,--. ,--. .--| ,--- +# | |--' |--' | | `--. +# ' `--' `--' `--` ---' 2016-10-07 +#------------------------------------------------------------------------------- # Simple RSS/ATOM feed reader FEEDS="${FEEDS-$HOME/.config/feeds}" diff --git a/bin/fig b/bin/fig @@ -1,336 +1,825 @@ #!/bin/sh -# ____ __ -# .' ___\ \/ _____ -# / .'_ /\ .'__ / -# / ___/ / // /_/ / -# \/ \/_\__ / -#===========\__,-"============================================================== +# ,-- ' +# | | ,--, +# |- | | | +# | | `--| 2016-10-07 +#-------`--'-------------------------------------------------------------------- # Figlet without all the bells and fanciness. -[ $# = 0 ] && read -r line || for word in $@ -do line="$line $word" -done +if [ "$1" = -f ] || [ "$1" = --font ] +then + font="$2" + shift 2 +fi -line="$(printf '%s\n' "$line" | tr [A-Z] [a-z])" +if [ $# = 0 ] +then tee +else printf '%s\n' "$*" +fi | fold -w 1 | { + while IFS= read -r c + do + case "$font" in + bold ) + case "$c" in + a | A) + l1="$l1"' ' + l2="$l2"' _____ ' + l3="$l3"".'__ /" + l4="$l4"'/ /_/ /' + l5="$l5"' \____/' + l6="$l6"' ' + ;; + b | B) + l1="$l1"'/\ ' + l2="$l2"'/ /_ ' + l3="$l3"'/ __ \ ' + l4="$l4"'/ /_/ /' + l5="$l5"' \____/' + l6="$l6"' ' + ;; + c | C) + l1="$l1"' ' + l2="$l2"'____ ' + l3="$l3"'/ ___\ ' + l4="$l4"'/ /__ ' + l5="$l5"' \____\' + l6="$l6"' ' + ;; + d | D) + l1="$l1"' /\ ' + l2="$l2"' ___/ /' + l3="$l3"".'__ /" + l4="$l4"'/ /_/ /' + l5="$l5"' \____/' + l6="$l6"' ' + ;; + e | E) + l1="$l1"' ' + l2="$l2"' ___ ' + l3="$l3"".'__ \\ " + l4="$l4"'/ ____/' + l5="$l5"' \___\ ' + l6="$l6"' ' + ;; + f | F) + l1="$l1"' ____ ' + l2="$l2"".' ___\\" + l3="$l3""/ .'_ " + l4="$l4"'/ ___/ ' + l5="$l5"' \/ ' + l6="$l6"' ' + ;; + g | G) + l1="$l1"' ' + l2="$l2"' _____ ' + l3="$l3"".'__ /" + l4="$l4"'/ /_/ /' + l5="$l5"'_\__ /' + l6="$l6"" \\__,-'" + ;; + h | H) + l1="$l1"'/\ ' + l2="$l2"'/ /_ ' + l3="$l3"'/ __ \ ' + l4="$l4"'/ / / /' + l5="$l5"' \/ \/' + l6="$l6"' ' + ;; + i | I) + l1="$l1"'__ ' + l2="$l2"' \/ ' + l3="$l3"' /\ ' + l4="$l4"' / /' + l5="$l5"' \/' + l6="$l6"' ' + ;; + j | J) + l1="$l1"' __ ' + l2="$l2"' \/ ' + l3="$l3"' /\ ' + l4="$l4"' / /' + l5="$l5"'_,-" /' + l6="$l6"' \_,-"' + ;; + k | K) + l1="$l1"'/\ ' + l2="$l2"'/ / __ ' + l3="$l3""/ /,','" + l4="$l4""/ ,' " + l5="$l5"' \/\_\ ' + l6="$l6"' ' + ;; + l | L) + l1="$l1"'/\ ' + l2="$l2"'/ /' + l3="$l3"'/ /' + l4="$l4"'/ /' + l5="$l5"' \/' + l6="$l6"' ' + ;; + m | M) + l1="$l1"' ' + l2="$l2"'________ ' + l3="$l3"'/ __ __ \ ' + l4="$l4"'/ / / / / /' + l5="$l5"' \/ \/ \/' + l6="$l6"' ' + ;; + n | N) + l1="$l1"' ' + l2="$l2"'____ ' + l3="$l3"'/ __ \ ' + l4="$l4"'/ / / /' + l5="$l5"' \/ \/' + l6="$l6"' ' + ;; + o | O) + l1="$l1"' ' + l2="$l2"'____ ' + l3="$l3"'/ __ \ ' + l4="$l4"'/ /_/ /' + l5="$l5"' \____/' + l6="$l6"' ' + ;; + p | P) + l1="$l1"' ' + l2="$l2"'____ ' + l3="$l3"'/ __ \ ' + l4="$l4"'/ /_/ /' + l5="$l5"'/ ____/' + l6="$l6"' \/ ' + ;; + q | Q) + l1="$l1"' ' + l2="$l2"' _____ ' + l3="$l3"".'__ /" + l4="$l4"'/ /_/ /' + l5="$l5"' \__ /' + l6="$l6"' \/' + ;; + r | R) + l1="$l1"' ' + l2="$l2"'_____ ' + l3="$l3"'/ ____\' + l4="$l4"'/ / ' + l5="$l5"' \/ ' + l6="$l6"' ' + ;; + s | S) + l1="$l1"' ' + l2="$l2"' ____ ' + l3="$l3"' / __/' + l4="$l4"'__\ \ ' + l5="$l5"' \___/' + l6="$l6"' ' + ;; + t | T) + l1="$l1"'/\ ' + l2="$l2"'/ /_ ' + l3="$l3"'/ ___\' + l4="$l4"'/ / ' + l5="$l5"' \/ ' + l6="$l6"' ' + ;; + u | U) + l1="$l1"' ' + l2="$l2"'__ /\ ' + l3="$l3"'/ / / /' + l4="$l4"'/ /_/ /' + l5="$l5"' \____/' + l6="$l6"' ' + ;; + v | V) + l1="$l1"' ' + l2="$l2"'__ /\ ' + l3="$l3"'/ / / /' + l4="$l4"' \ \/ /' + l5="$l5"" \\_,'" + l6="$l6"' ' + ;; + w | W) + l1="$l1"' ' + l2="$l2"'__ /\ ' + l3="$l3"'/ /\/ /' + l4="$l4"'/ / / /' + l5="$l5"' \____/' + l6="$l6"' ' + ;; + x | X) + l1="$l1"' ' + l2="$l2"'__ __ ' + l3="$l3"" \\ \\' /" + l4="$l4"" ,' ,'" + l5="$l5"" /_,\\_\\" + l6="$l6"' ' + ;; + y | Y) + l1="$l1"' ' + l2="$l2"'__ /\ ' + l3="$l3"'/ / / /' + l4="$l4"' \ \/ /' + l5="$l5"' __\ /' + l6="$l6"" \\_,-'" + ;; + z | Z) + l1="$l1"' ' + l2="$l2"'______ ' + l3="$l3"'/__ /' + l4="$l4"",-' _-'" + l5="$l5"'/_____\' + l6="$l6"' ' + ;; + 0 | 0) + l1="$l1"' ___ ' + l2="$l2"".'__ \ " + l3="$l3"'/ / / /' + l4="$l4"'/ /_/ /' + l5="$l5"" \\___,'" + l6="$l6"' ' + ;; + 1) + l1="$l1"' __ ' + l2="$l2"".-' / " + l3="$l3"' / / ' + l4="$l4"' _/ / ' + l5="$l5"' /___/' + l6="$l6"' ' + ;; + 2) + l1="$l1"'____ ' + l2="$l2"'/___ \ ' + l3="$l3"" .-' /" + l4="$l4"".-' _-'" + l5="$l5"'/_____\' + l6="$l6"' ' + ;; + 3) + l1="$l1"'____ ' + l2="$l2"'/___ \ ' + l3="$l3"" .'.-'" + l4="$l4"'___\ \ ' + l5="$l5""/___,-'" + l6="$l6"' ' + ;; + 4) + l1="$l1"'__ ' + l2="$l2"'/ /__ ' + l3="$l3"'/ // / ' + l4="$l4"'/__ _/' + l5="$l5"' /_/ ' + l6="$l6"' ' + ;; + 5) + l1="$l1"'______ ' + l2="$l2"'/ ____/' + l3="$l3"' `-.`. ' + l4="$l4"'____/ /' + l5="$l5""/____,'" + l6="$l6"' ' + ;; + 6) + l1="$l1"' ____ ' + l2="$l2"".'___/ " + l3="$l3"'/ /_ ' + l4="$l4"'/ __ \ ' + l5="$l5"" \\___,'" + l6="$l6"' ' + ;; + 7) + l1="$l1"'______ ' + l2="$l2"'/___ /' + l3="$l3"' / /' + l4="$l4"' / /' + l5="$l5"' /_/' + l6="$l6"' ' + ;; + 8) + l1="$l1"' ___ ' + l2="$l2"".'__ \\ " + l3="$l3"'/ /_/ /' + l4="$l4"'/ /_/ /' + l5="$l5"" \___,'" + l6="$l6"' ' + ;; + 9) + l1="$l1"' ___ ' + l2="$l2"".'__ \\ " + l3="$l3"' \__ /' + l4="$l4"' ___/ /' + l5="$l5"" \\___,'" + l6="$l6"' ' + ;; + ' ') + l1="$l1"' ' + l2="$l2"' ' + l3="$l3"' ' + l4="$l4"' ' + l5="$l5"' ' + l6="$l6"' ' + ;; + .) + l1="$l1"' ' + l2="$l2"' ' + l3="$l3"' ' + l4="$l4"'__ ' + l5="$l5"' \/' + l6="$l6"' ' + ;; + esac + ;; + '' | * ) + case "$c" in + a) + l1="$l1"' ' + l2="$l2"' ,--.' + l3="$l3"' ,--|' + l4="$l4"' `--`' + l5="$l5"' ' + ;; + b) + l1="$l1"' | ' + l2="$l2"' |--.' + l3="$l3"' | |' + l4="$l4"" '--'" + l5="$l5"' ' + ;; + c) + l1="$l1"' ' + l2="$l2"' ,--.' + l3="$l3"' | ' + l4="$l4"" \`--'" + l5="$l5"' ' + ;; + d) + l1="$l1"' |' + l2="$l2"' .--|' + l3="$l3"' | |' + l4="$l4"' `--`' + l5="$l5"' ' + ;; + e) + l1="$l1"' ' + l2="$l2"' ,--.' + l3="$l3"" |--'" + l4="$l4"" \`--'" + l5="$l5"' ' + ;; + f) + l1="$l1"' ,--' + l2="$l2"' |- ' + l3="$l3"' | ' + l4="$l4"" ' " + l5="$l5"' ' + ;; + g) + l1="$l1"' ' + l2="$l2"' ,--,' + l3="$l3"' | |' + l4="$l4"' `--|' + l5="$l5"" \`--'" + ;; + h) + l1="$l1"' | ' + l2="$l2"' |--.' + l3="$l3"' | |' + l4="$l4"" ' '" + l5="$l5"' ' + ;; + i) + l1="$l1"" *" + l2="$l2"' ,' + l3="$l3"' |' + l4="$l4"" '" + l5="$l5"' ' + ;; + j) + l1="$l1"" *" + l2="$l2"' ,' + l3="$l3"' |' + l4="$l4"' |' + l5="$l5"" \`-'" + ;; + k) + l1="$l1"' | ' + l2="$l2"' | /' + l3="$l3"' |-< ' + l4="$l4"" ' \`" + l5="$l5"' ' + ;; + l) + l1="$l1"' |' + l2="$l2"' |' + l3="$l3"' |' + l4="$l4"" '" + l5="$l5"' ' + ;; + m) + l1="$l1"' ' + l2="$l2"' --.-.' + l3="$l3"' | | |' + l4="$l4"" ' ' '" + l5="$l5"' ' + ;; + n) + l1="$l1"' ' + l2="$l2"' ---.' + l3="$l3"' | |' + l4="$l4"" ' '" + l5="$l5"' ' + ;; + o) + l1="$l1"' ' + l2="$l2"' ,--.' + l3="$l3"' | |' + l4="$l4"" \`--'" + l5="$l5"' ' + ;; + p) + l1="$l1"' ' + l2="$l2"' ---.' + l3="$l3"' | |' + l4="$l4"" |--'" + l5="$l5"' | ' + ;; + q) + l1="$l1"' ' + l2="$l2"' ,---' + l3="$l3"' | |' + l4="$l4"' `--|' + l5="$l5"' |' + ;; + r) + l1="$l1"' ' + l2="$l2"' .,--' + l3="$l3"' | ' + l4="$l4"" ' " + l5="$l5"' ' + ;; + s) + l1="$l1"' ' + l2="$l2"' ,---' + l3="$l3"' `--.' + l4="$l4"" ---'" + l5="$l5"' ' + ;; + t) + l1="$l1"' | ' + l2="$l2"' |--' + l3="$l3"' | ' + l4="$l4"" ' " + l5="$l5"' ' + ;; + u) + l1="$l1"' ' + l2="$l2"' , ,' + l3="$l3"' | |' + l4="$l4"' `--`' + l5="$l5"' ' + ;; + v) + l1="$l1"' ' + l2="$l2"' . ,' + l3="$l3"' \ / ' + l4="$l4"" ' " + l5="$l5"' ' + ;; + w) + l1="$l1"' ' + l2="$l2"' , , ,' + l3="$l3"' | | |' + l4="$l4"" \`-'-'" + l5="$l5"' ' + ;; + x) + l1="$l1"' ' + l2="$l2"' . ,' + l3="$l3"' >< ' + l4="$l4"" ' \`" + l5="$l5"' ' + ;; + y) + l1="$l1"' ' + l2="$l2"' , ,' + l3="$l3"' | |' + l4="$l4"' `--|' + l5="$l5"" \`--'" + ;; + z) + l1="$l1"' ' + l2="$l2"' ---,' + l3="$l3"" ,' " + l4="$l4"" '---" + l5="$l5"' ' + ;; + A) + l1="$l1"' ,--.' + l2="$l2"' | |' + l3="$l3"' |--|' + l4="$l4"' | |' + l5="$l5"" ' '" + ;; + B) + l1="$l1"' ---.' + l2="$l2"' | |' + l3="$l3"' |--:' + l4="$l4"' | |' + l5="$l5"" ---'" + ;; + C) + l1="$l1"' ,--.' + l2="$l2"' | ' + l3="$l3"' | ' + l4="$l4"' | ' + l5="$l5"" \`--'" + ;; + D) + l1="$l1"' ---.' + l2="$l2"' | |' + l3="$l3"' | |' + l4="$l4"' | |' + l5="$l5"" ---'" + ;; + E) + l1="$l1"' ----' + l2="$l2"' | ' + l3="$l3"' |-- ' + l4="$l4"' | ' + l5="$l5"' ----' + ;; + F) + l1="$l1"' ----' + l2="$l2"' | ' + l3="$l3"' |-- ' + l4="$l4"' | ' + l5="$l5"" ' " + ;; + G) + l1="$l1"' ,--.' + l2="$l2"' | ' + l3="$l3"' | __' + l4="$l4"' | |' + l5="$l5"" \`--'" + ;; + H) + l1="$l1"' , ,' + l2="$l2"' | |' + l3="$l3"' |--|' + l4="$l4"' | |' + l5="$l5"" ' '" + ;; + I) + l1="$l1"' ---' + l2="$l2"' | ' + l3="$l3"' | ' + l4="$l4"' | ' + l5="$l5"' ---' + ;; + J) + l1="$l1"' ---' + l2="$l2"' | ' + l3="$l3"' | ' + l4="$l4"' | ' + l5="$l5"" \`-' " + ;; + K) + l1="$l1"' . ,' + l2="$l2"' | / ' + l3="$l3"' |< ' + l4="$l4"' | \ ' + l5="$l5"" ' \`" + ;; + L) + l1="$l1"' , ' + l2="$l2"' | ' + l3="$l3"' | ' + l4="$l4"' | ' + l5="$l5"" '---" + ;; + M) + l1="$l1"' . .' + l2="$l2"' |\ /|' + l3="$l3"' | | |' + l4="$l4"' | |' + l5="$l5"" ' '" + ;; + N) + l1="$l1"' . .' + l2="$l2"' |\ |' + l3="$l3"' | \ |' + l4="$l4"' | \|' + l5="$l5"" ' '" + ;; + O) + l1="$l1"' ,--.' + l2="$l2"' | |' + l3="$l3"' | |' + l4="$l4"' | |' + l5="$l5"" \`--'" + ;; + P) + l1="$l1"' ---.' + l2="$l2"' | |' + l3="$l3"" |--'" + l4="$l4"' | ' + l5="$l5"" ' " + ;; + R) + l1="$l1"' ---.' + l2="$l2"' | |' + l3="$l3"" |--'" + l4="$l4"' | \ ' + l5="$l5"" ' \`" + ;; + S) + l1="$l1"' ,--.' + l2="$l2"' | ' + l3="$l3"' `--.' + l4="$l4"' |' + l5="$l5"" \`--'" + ;; + T) + l1="$l1"' ----' + l2="$l2"' | ' + l3="$l3"' | ' + l4="$l4"' | ' + l5="$l5"" ' " + ;; + U) + l1="$l1"' , ,' + l2="$l2"' | |' + l3="$l3"' | |' + l4="$l4"' | |' + l5="$l5"" \`--'" + ;; + V) + l1="$l1"' , ,' + l2="$l2"' | |' + l3="$l3"' | |' + l4="$l4"' | |' + l5="$l5"' \/ ' + ;; + W) + l1="$l1"' , ,' + l2="$l2"' | | |' + l3="$l3"' | | |' + l4="$l4"' | | |' + l5="$l5"' |/ \|' + ;; + X) + l1="$l1"' . ,' + l2="$l2"' \ / ' + l3="$l3"' X ' + l4="$l4"' / \ ' + l5="$l5"" ' \`" + ;; + Y) + l1="$l1"' , ,' + l2="$l2"' | |' + l3="$l3"" \`---'" + l4="$l4"' | ' + l5="$l5"" ' " + ;; + Z) + l1="$l1"' ----' + l2="$l2"' / ' + l3="$l3"' / ' + l4="$l4"' / ' + l5="$l5"' ----' + ;; + 0) + l1="$l1"' ,--.' + l2="$l2"' |\ |' + l3="$l3"' | |' + l4="$l4"' | \|' + l5="$l5"" \`--'" + ;; + 1) + l1="$l1"' , ' + l2="$l2"" '| " + l3="$l3"' | ' + l4="$l4"' | ' + l5="$l5"" -'-" + ;; + 2) + l1="$l1"' ,--.' + l2="$l2"' |' + l3="$l3"' / ' + l4="$l4"' / ' + l5="$l5"' ----' + ;; + 3) + l1="$l1"' ,--.' + l2="$l2"' |' + l3="$l3"' -< ' + l4="$l4"' |' + l5="$l5"" \`--'" + ;; + 4) + l1="$l1"' / ' + l2="$l2"' / ' + l3="$l3"" '-+-" + l4="$l4"' | ' + l5="$l5"" ' " + ;; + 5) + l1="$l1"' .---' + l2="$l2"' | ' + l3="$l3"" '--." + l4="$l4"' |' + l5="$l5"" \`--'" + ;; + 6) + l1="$l1"' ,--.' + l2="$l2"' | ' + l3="$l3"' |--.' + l4="$l4"' | |' + l5="$l5"" \`--'" + ;; + 7) + l1="$l1"' ----' + l2="$l2"' /' + l3="$l3"' -/ ' + l4="$l4"' / ' + l5="$l5"" ' " + ;; + 8) + l1="$l1"' ,--.' + l2="$l2"' | |' + l3="$l3"' :--:' + l4="$l4"' | |' + l5="$l5"" \`--'" + ;; + 9) + l1="$l1"' ,--.' + l2="$l2"' | |' + l3="$l3"' `--:' + l4="$l4"' |' + l5="$l5"" \`--'" + ;; + .) + l1="$l1"' ' + l2="$l2"' ' + l3="$l3"' ' + l4="$l4"' *' + l5="$l5"' ' + ;; + ' ') + l1="$l1"' ' + l2="$l2"' ' + l3="$l3"' ' + l4="$l4"' ' + l5="$l5"' ' + ;; + :) + l1="$l1"' ' + l2="$l2"' * ' + l3="$l3"' ' + l4="$l4"' * ' + l5="$l5"' ' + ;; + /) + l1="$l1"' ' + l2="$l2"' /' + l3="$l3"' / ' + l4="$l4"'/ ' + l5="$l5"' ' + ;; + !) + l1="$l1"' |' + l2="$l2"' |' + l3="$l3"' |' + l4="$l4"' *' + l5="$l5"' ' + ;; + -) + l1="$l1"' ' + l2="$l2"' ' + l3="$l3"' ---' + l4="$l4"' ' + l5="$l5"' ' + ;; + esac + ;; + esac + + if [ "$font" = bold ] + then + l1="$l1 " + l2="$l2 " + l3="$l3 " + l4="$l4 " + l5="$l5 " + l6="$l6" + fi + done -IFS=' -' -for char in $(printf %s "${line# }" | fold -w 1) -do - case "$char" in - a) - l1="$l1"' ' - l2="$l2"' _____ ' - l3="$l3"".'__ /" - l4="$l4"'/ /_/ /' - l5="$l5"' \____/' - l6="$l6"' ' - ;; - b) - l1="$l1"'/\ ' - l2="$l2"'/ /_ ' - l3="$l3"'/ __ \ ' - l4="$l4"'/ /_/ /' - l5="$l5"' \____/' - l6="$l6"' ' - ;; - c) - l1="$l1"' ' - l2="$l2"'____ ' - l3="$l3"'/ ___\ ' - l4="$l4"'/ /__ ' - l5="$l5"' \____\' - l6="$l6"' ' - ;; - d) - l1="$l1"' /\ ' - l2="$l2"' ___/ /' - l3="$l3"".'__ /" - l4="$l4"'/ /_/ /' - l5="$l5"' \____/' - l6="$l6"' ' - ;; - e) - l1="$l1"' ' - l2="$l2"' ___ ' - l3="$l3"".'__ \\ " - l4="$l4"'/ ____/' - l5="$l5"' \___\ ' - l6="$l6"' ' - ;; - f) - l1="$l1"' ____ ' - l2="$l2"".' ___\\" - l3="$l3""/ .'_ " - l4="$l4"'/ ___/ ' - l5="$l5"' \/ ' - l6="$l6"' ' - ;; - g) - l1="$l1"' ' - l2="$l2"' _____ ' - l3="$l3"".'__ /" - l4="$l4"'/ /_/ /' - l5="$l5"'_\__ /' - l6="$l6"" \\__,-'" - ;; - h) - l1="$l1"'/\ ' - l2="$l2"'/ /_ ' - l3="$l3"'/ __ \ ' - l4="$l4"'/ / / /' - l5="$l5"' \/ \/' - l6="$l6"' ' - ;; - i) - l1="$l1"'__ ' - l2="$l2"' \/ ' - l3="$l3"' /\ ' - l4="$l4"' / /' - l5="$l5"' \/' - l6="$l6"' ' - ;; - j) - l1="$l1"' __ ' - l2="$l2"' \/ ' - l3="$l3"' /\ ' - l4="$l4"' / /' - l5="$l5"'_,-" /' - l6="$l6"' \_,-"' - ;; - k) - l1="$l1"'/\ ' - l2="$l2"'/ / __ ' - l3="$l3""/ /,','" - l4="$l4""/ ,' " - l5="$l5"' \/\_\ ' - l6="$l6"' ' - ;; - l) - l1="$l1"'/\ ' - l2="$l2"'/ /' - l3="$l3"'/ /' - l4="$l4"'/ /' - l5="$l5"' \/' - l6="$l6"' ' - ;; - m) - l1="$l1"' ' - l2="$l2"'________ ' - l3="$l3"'/ __ __ \ ' - l4="$l4"'/ / / / / /' - l5="$l5"' \/ \/ \/' - l6="$l6"' ' - ;; - n) - l1="$l1"' ' - l2="$l2"'____ ' - l3="$l3"'/ __ \ ' - l4="$l4"'/ / / /' - l5="$l5"' \/ \/' - l6="$l6"' ' - ;; - o) - l1="$l1"' ' - l2="$l2"'____ ' - l3="$l3"'/ __ \ ' - l4="$l4"'/ /_/ /' - l5="$l5"' \____/' - l6="$l6"' ' - ;; - p) - l1="$l1"' ' - l2="$l2"'____ ' - l3="$l3"'/ __ \ ' - l4="$l4"'/ /_/ /' - l5="$l5"'/ ____/' - l6="$l6"' \/ ' - ;; - q) - l1="$l1"' ' - l2="$l2"' _____ ' - l3="$l3"".'__ /" - l4="$l4"'/ /_/ /' - l5="$l5"' \__ /' - l6="$l6"' \/' - ;; - r) - l1="$l1"' ' - l2="$l2"'_____ ' - l3="$l3"'/ ____\' - l4="$l4"'/ / ' - l5="$l5"' \/ ' - l6="$l6"' ' - ;; - s) - l1="$l1"' ' - l2="$l2"' ____ ' - l3="$l3"' / __/' - l4="$l4"'__\ \ ' - l5="$l5"' \___/' - l6="$l6"' ' - ;; - t) - l1="$l1"'/\ ' - l2="$l2"'/ /_ ' - l3="$l3"'/ ___\' - l4="$l4"'/ / ' - l5="$l5"' \/ ' - l6="$l6"' ' - ;; - u) - l1="$l1"' ' - l2="$l2"'__ /\ ' - l3="$l3"'/ / / /' - l4="$l4"'/ /_/ /' - l5="$l5"' \____/' - l6="$l6"' ' - ;; - v) - l1="$l1"' ' - l2="$l2"'__ /\ ' - l3="$l3"'/ / / /' - l4="$l4"' \ \/ /' - l5="$l5"" \\_,'" - l6="$l6"' ' - ;; - w) - l1="$l1"' ' - l2="$l2"'__ /\ ' - l3="$l3"'/ /\/ /' - l4="$l4"'/ / / /' - l5="$l5"' \____/' - l6="$l6"' ' - ;; - x) - l1="$l1"' ' - l2="$l2"'__ __ ' - l3="$l3"" \\ \\' /" - l4="$l4"" ,' ,'" - l5="$l5"" /_,\\_\\" - l6="$l6"' ' - ;; - y) - l1="$l1"' ' - l2="$l2"'__ /\ ' - l3="$l3"'/ / / /' - l4="$l4"' \ \/ /' - l5="$l5"' __\ /' - l6="$l6"" \\_,-'" - ;; - z) - l1="$l1"' ' - l2="$l2"'______ ' - l3="$l3"'/__ /' - l4="$l4"",-' _-'" - l5="$l5"'/_____\' - l6="$l6"' ' - ;; - ' ') - l1="$l1"' ' - l2="$l2"' ' - l3="$l3"' ' - l4="$l4"' ' - l5="$l5"' ' - l6="$l6"' ' - ;; - .) - l1="$l1"' ' - l2="$l2"' ' - l3="$l3"' ' - l4="$l4"'__ ' - l5="$l5"' \/' - l6="$l6"' ' - ;; - 0) - l1="$l1"' ___ ' - l2="$l2"".'__ \ " - l3="$l3"'/ / / /' - l4="$l4"'/ /_/ /' - l5="$l5"" \\___,'" - l6="$l6"' ' - ;; - 1) - l1="$l1"' __ ' - l2="$l2"".-' / " - l3="$l3"' / / ' - l4="$l4"' _/ / ' - l5="$l5"' /___/' - l6="$l6"' ' - ;; - 2) - l1="$l1"'____ ' - l2="$l2"'/___ \ ' - l3="$l3"" .-' /" - l4="$l4"".-' _-'" - l5="$l5"'/_____\' - l6="$l6"' ' - ;; - 3) - l1="$l1"'____ ' - l2="$l2"'/___ \ ' - l3="$l3"" .'.-'" - l4="$l4"'___\ \ ' - l5="$l5""/___,-'" - l6="$l6"' ' - ;; - 4) - l1="$l1"'__ ' - l2="$l2"'/ /__ ' - l3="$l3"'/ // / ' - l4="$l4"'/__ _/' - l5="$l5"' /_/ ' - l6="$l6"' ' - ;; - 5) - l1="$l1"'______ ' - l2="$l2"'/ ____/' - l3="$l3"' `-.`. ' - l4="$l4"'____/ /' - l5="$l5""/____,'" - l6="$l6"' ' - ;; - 6) - l1="$l1"' ____ ' - l2="$l2"".'___/ " - l3="$l3"'/ /_ ' - l4="$l4"'/ __ \ ' - l5="$l5"" \\___,'" - l6="$l6"' ' - ;; - 7) - l1="$l1"'______ ' - l2="$l2"'/___ /' - l3="$l3"' / /' - l4="$l4"' / /' - l5="$l5"' /_/' - l6="$l6"' ' - ;; - 8) - l1="$l1"' ___ ' - l2="$l2"".'__ \\ " - l3="$l3"'/ /_/ /' - l4="$l4"'/ /_/ /' - l5="$l5"" \___,'" - l6="$l6"' ' - ;; - 9) - l1="$l1"' ___ ' - l2="$l2"".'__ \\ " - l3="$l3"' \__ /' - l4="$l4"' ___/ /' - l5="$l5"" \\___,'" - l6="$l6"' ' - ;; - esac -done -unset IFS - -{ - printf ' %s\n' "$l1" - printf ' %s\n' "$l2" - printf ' %s\n' "$l3" - printf ' %s\n' "$l4" - printf ' %s\n' "$l5" - printf '%s\n' "$l6" | tr ' ' '=' + [ "$l1" ] && printf '%s\n' "$l1" + [ "$l2" ] && printf '%s\n' "$l2" + [ "$l3" ] && printf '%s\n' "$l3" + [ "$l4" ] && printf '%s\n' "$l4" + [ "$l5" ] && printf '%s\n' "$l5" + [ "$l6" ] && printf '%s\n' "$l6" + [ "$l7" ] && printf '%s\n' "$l7" + [ "$l8" ] && printf '%s\n' "$l8" + [ "$l9" ] && printf '%s\n' "$l9" } | sed 's/ *$//' diff --git a/bin/irc b/bin/irc @@ -1,10 +1,9 @@ #!/bin/sh -# __ -# \/ _____ ____ -# /\ / ____\/ ___\ -# / // / / /__ -# \/ \/ \____\ 2016-09-18 -#=============================================================================== +# * +# , .,-- ,--. +# | | | +# ' ' `--' 2016-10-07 +#------------------------------------------------------------------------------- # Irc client in 300 lines of shell script # # With help of http://xero.nu, inspired by http://tools.suckless.org/ii diff --git a/bin/lsync b/bin/lsync @@ -1,10 +1,9 @@ #!/bin/sh -# /\ -# / / ____ __ /\ ____ ____ -# / / / __// / / // __ \ / ___\ -# / /__\ \ \ \/ // / / // /__ -# \/ \___/ __\ / \/ \/ \____\ -#==========\__,'================================================================ +# | +# | ,--- , , ---. ,--. +# | `--. | | | | | +# ' ---' `--| ' ' `--' 2016-10-07 +#--------`--'------------------------------------------------------------------- # Sync two local directories. help=' diff --git a/bin/lsync2 b/bin/lsync2 @@ -1,5 +1,9 @@ #!/bin/sh - +# | ,--. +# | ,--- , , ---. ,--. | +# | `--. | | | | | / +# ' ---' `--| ' ' `--' / 2016-10-07 +#--------`--'---------- '--- --------------------------------------------------- # Case 1: files identical on same drive with different names # Case 2: files identical across drives with different names # Case 3: files identical across drives with same name @@ -35,28 +39,34 @@ # To check if they are identical, do uniq -d -w 32 (duplicate hash in the list) # To check if they have the same file name across drives, do sort -u on whole list, then split the hash and filename with read hash path, then remove the prefix of each file, then finally print the hash-file combo then uniq -u to check either the duplicate files or the files that are only on one drive. From this list, if there is a version on both drive, delete the older file, and then for both, copy the file to the other drive, -tmp="$(mktemp lsync.XXXXXX)" +#tmp="$(mktemp lsync.XXXXXX)" -trap "rm -f '$tmp'" KILL INT EXIT +#trap "rm -f '$tmp'" KILL INT EXIT # # Generate md5 sums for all files of both drives. # -find "$1" "$2" -type f -exec md5sum {} \; > "$tmp" +pwd="$PWD" +for dir in "$1" "$2" +do + cd "$pwd/$dir" + find . -type f -exec md5sum {} \; +done | sort -t ' ' -k 1 -u > "$tmp" +wait # # Find the duplicates files, delete all but the latest, and copy it to the # other drive if missing. # printf '\n\nDuplicate files:\n\n' -sort -t ' ' -k 1 "$tmp" \ -| uniq -d -w 32 \ -| sed 's/[^ ]* */' \ -| xargs -n 1 -I '{}' grep '{}' "$tmp" \ -| sed 's/[^ ]* */' \ -| xargs stat -c '%Y %n' \ -| sort \ -| sed 's/[^ ]* */' \ +sort -t ' ' -k 1 "$tmp" \ +| uniq -d -w 32 \ +| sed 's/[^ ]* *//' \ +| xargs -n 1 -I '{}' grep -F '{}' "$tmp" \ +| sed 's/[^ ]* *//' \ +| xargs stat -c '%Y %n' \ +| sort \ +| sed 's/[^ ]* */' \ | { IFS= read -r latest while IFS= read -r other @@ -71,3 +81,4 @@ sort -t ' ' -k 1 "$tmp" \ then printf 'cp %s %s\n' "$2/$latest" "$1/$latest" fi } +' diff --git a/bin/music b/bin/music @@ -1,10 +1,9 @@ #!/bin/sh -# __ -# ________ __ /\ ____ \/ ____ -# / __ __ \ / / / / / __/ /\ / ___\ -# / / / / / // /_/ /__\ \ / // /__ -# \/ \/ \/ \____/ \___/ \/ \____\ -#=============================================================================== +# * +# --.-. , , ,--- , ,--. +# | | | | | `--. | | +# ' ' ' `--` ---' ' `--' 2016-10-07 +#------------------------------------------------------------------------------- # Prompt for a music to play with ffplay cd "$HOME/Music" diff --git a/bin/peax b/bin/peax @@ -1,10 +1,9 @@ #!/usr/bin/awk -f # -# ____ ___ _____ __ __ -# / __ \ .'__ \ .'__ / \ \' / -# / /_/ // ____// /_/ / ,' ,' -# / ____/ \___\ \____/ /_,\_\ -#=\/============================================================================ +# ---. ,--. ,--. . , +# | | |--' ,--| >< +# |--' `--' `--` ' ` 2016-10-07 +#-|----------------------------------------------------------------------------- # Pick a line from stdin # Read the file from stdin diff --git a/bin/piano b/bin/piano @@ -1,10 +1,9 @@ #!/usr/bin/awk -f -# __ -# ____ \/ _____ ____ ____ -# / __ \ /\ .'__ // __ \ / __ \ -# / /_/ / / // /_/ // / / // /_/ / -# / ____/ \/ \____/ \/ \/ \____/ -#=\/============================================================================ +# * +# ---. , ,--. ---. ,--. +# | | | ,--| | | | | +# |--' ' `--` ' ' `--' 2016-10-07 +#-|----------------------------------------------------------------------------- # Console beep piano! BEGIN { diff --git a/bin/piped b/bin/piped @@ -1,10 +1,9 @@ #!/bin/sh -# __ /\ -# ____ \/ ____ ___ ___/ / -# / __ \ /\ / __ \ .'__ \ .'__ / -# / /_/ / / // /_/ // ____// /_/ / -# / ____/ \// ____/ \___\ \____/ -#=\/=========\/================================================================= +# * | +# ---. , ---. ,--. .--| +# | | | | | |--' | | +# |--' ' |--' `--' `--` 2016-10-07 +#-|------|---------------------------------------------------------------------- # Put stdin to a file, open PAGER on it, and then print the file out. tmp="$(mktemp)" diff --git a/bin/src b/bin/src @@ -1,9 +1,8 @@ #!/bin/sh -# ____ _____ ____ -# / __// ____\/ ___\ -# __\ \ / / / /__ -# \___/ \/ \____\ -#=============================================================================== +# ,--- .,-- ,--. +# `--. | | +# ---' ' `--' 2016-10-07 +#------------------------------------------------------------------------------- # Install sources using crux-like package declaration. PROGRAMS="${PROGRAMS:-$HOME/Programs}" diff --git a/bin/swiper b/bin/swiper @@ -1,10 +1,9 @@ #!/bin/sh -# __ -# ____ __ /\ \/ ____ ___ _____ -# / __// /\/ / /\ / __ \ .'__ \ / ____\ -# __\ \ / / / / / // /_/ // ____// / -# \___/ \____/ \// ____/ \___\ \/ -#=================\/================================================ +# * +# ,--- , , , , ---. ,--. .,-- +# `--. | | | | | | |--' | +# ---' `-'-' ' |--' `--' ' 2016-10-08 +#--------------|---------------------------------------------------------------- # A search with an overview. Oh, man! FILTER=fzf-tmux diff --git a/bin/todo b/bin/todo @@ -1,26 +0,0 @@ -# /\ /\ -# / /_ ____ ___/ /____ -# / ___\/ __ \ .'__ // __ \ -# / / / /_/ // /_/ // /_/ / -# \/ \____/ \____/ \____/ -#=============================================================================== -# Small todo list implementation - -todo="$HOME/.cache/todo" t='' cmd='' - -if [ "$1" = e ]; then $EDITOR "$todo"; return 0; fi - -case "$1" in --d ) shift - for n in $@; do cmd="$n d; $cmd"; done - sed "$cmd" -i "$todo" - ;; -'' ) - ;; -* ) - for w in $@; do t="$t $w"; done - printf '%s\n' "${t# }" >> "$todo" - ;; -esac - -sed '=' "$todo" | sed 'N; s/\n/\t/' diff --git a/bin/updd b/bin/updd @@ -1,9 +1,9 @@ -# /\ /\ -# __ /\ ____ ___/ / ___/ / -# / / / // __ \ .'__ /.'__ / -# / /_/ // /_/ // /_/ // /_/ / -# \____// ____/ \____/ \____/ 2016-09-27 -#=======\/====================================================================== +#!/bin/sh +# | | +# , , ---. .--| .--| +# | | | | | | | | +# `--` |--' `--` `--` 2016-10-07 +#------|------------------------------------------------------------------------ # UPDate Date at the end of sime line or add one to it. IFS=' diff --git a/bin/version b/bin/version @@ -1,10 +1,9 @@ #!/bin/sh -# __ -# __ /\ ___ _____ ____ \/ ____ ____ -# / / / /.'__ \ / ____\ / __/ /\ / __ \ / __ \ -# \ \/ // ____// / __\ \ / // /_/ // / / / -# \_,' \___\ \/ \___/ \/ \____/ \/ \/ -#=============================================================================== +# * +# . , ,--. .,-- ,--- , ,--. ---. +# \ / |--' | `--. | | | | | +# ' `--' ' ---' ' `--' ' ' 2016-10-08 +#------------------------------------------------------------------------------- # A very very simple version control system and tool. # # / The top directory of the project. diff --git a/bin/www b/bin/www @@ -1,9 +1,8 @@ #!/bin/sh -# __ /\ __ /\ __ /\ -# / /\/ // /\/ // /\/ / -# / / / // / / // / / / -# \____/ \____/ \____/ -#=============================================================================== +# , , , , , , , , , +# | | | | | | | | | +# `-'-' `-'-' `-'-' 2016-10-07 +#------------------------------------------------------------------------------- # Static website generator LAYOUT="layout.html" OUT="$(pwd)/.site" NL=' diff --git a/bin/.cache/bkm b/bkm/.cache/bkm diff --git a/bkm/.local/bin/bkm b/bkm/.local/bin/bkm @@ -0,0 +1,56 @@ +#!/bin/sh +# | | +# |--. | / --.-. +# | | |-< | | | +# '--' ' ` ' ' ' 2016-10-08 +#------------------------------------------------------------------------------- +# Tiny shell bookmark manager + +BOOKMARKS="${BKM:-$HOME/.cache/bkm}" + +if [ "$#" -eq 0 ] +then + url="$(fzf < $BOOKMARKS)" + [ "${url##* }" ] && TERM=screen $BROWSER "${url##* }" + + printf '\n\n\n\n\n\n\n' + exit 0 +fi + +printf 'url: '; read url +printf 'description: '; read description +tag="$( + sed -r 's/^([^ ]*).*/\1/' "$BOOKMARKS" | uniq | fzf | tr '[a-z]' '[A-Z]' +)" + +printf '%s %s %s\n' "$tag" "$description" "$url" >> "$BOOKMARKS" + +bookmarks="$( + awk 'BEGIN{ + max1=0; + max2=0; + } + + { + l++; + + c1[l] = $1; # First column + + for (i=2; i < NF; i++) { # Middle column + c2[l] = c2[l]$(i)(i<NF?OFS:""); + } + + c3[l] = $NF; # Last column + + max1 = ((length(c1[l]) > max1) ? length(c1[l]) : max1); + max2 = ((length(c2[l]) > max2) ? length(c2[l]) : max2); + } + + END { + for (i = 1; i <= l; i++) { + printf("%-"max1"s %-"max2"s %s\n", c1[i], c2[i], c3[i]); + } + }' "$BOOKMARKS" | sort +)" + +[ "$bookmarks" ] && printf '%s\n' "$bookmarks" > "$BOOKMARKS" diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el @@ -1,12 +1,10 @@ -;; init --- I used to have my .emacs.d as my unique dotfile repo. -;;; Commentary: /\ -; ___ ________ _____ ____ ____ ___/ / -; .'__ \ / __ __ \ .'__ // ___\ / __/ .'__ / -; / ____// / / / / // /_/ // /__ __\ \ __ / /_/ / -; \___\ \/ \/ \/ \____/ \____\ \___/ \/ \____/ 2016-10-05 -;=============================================================================== -;; Code: -;;------------------------------------------------------------------------------ +; | * * | | +; ,--. --.-. ,--. ,--. ,--- .--| / , ---. , |-- ,--. | +; |--' | | | ,--| | `--. | | / | | | | | |--' | +; `--' ' ' ' `--` `--' ---' * `--`/ ' ' ' ' ' * `--' ' 2016-10-08 +;------------------------------------------------------------------------------- +; I used to have my .emacs.d as my unique dotfile repo. + (setq user-full-name "Josuah Demangeon" user-mail-address "mail@josuah.net" diff --git a/bin/.config/feeds/read b/feeds/.config/feeds/read diff --git a/bin/.config/feeds/urls b/feeds/.config/feeds/urls diff --git a/git/.config/git/config b/git/.config/git/config @@ -1,9 +1,8 @@ -# __ /\ ____ __ -# _____ \/ / /_ ____ ____ ____ .' ___\ \/ _____ -# .'__ / /\ / ___\/ ___\ / __ \ / __ \ / .'_ /\ .'__ / -# / /_/ / / // / / /__ / /_/ // / / // ___/ / // /_/ / -# _\__ / \/ \/ \____\ \____/ \/ \/ \/ \/_\__ / -#=\__.-'===========================================\__.-'======================= +# * | ,-- * +# ,--, , |-- ,--. ,--. ---. |- , ,--, +# | | | | | | | | | | | | | +# `--| ' ' `--' `--' ' ' ' ' `--| 2016-10-08 +#-`--'----------------------------`--'------------------------------------------ [user] email = mail@josuah.net diff --git a/s-nail/.mailrc b/s-nail/.mailrc @@ -1,9 +1,8 @@ -# __ /\ -# ____ ____ _____ \/ / / -# / __/___ / __ \ .'__ / /\ / / -# __\ \//__// / / // /_/ / / // / -# \___/ \/ \/ \____/ \/ \/ 2016-09-26 -#=============================================================================== +# * | +# --.-. ,--. , | .,-- ,--. +# | | | ,--| | | | | +# ' ' ' `--` ' ' ' `--' 2016-10-08 +#------------------------------------------------------------------------------- # s-nail configuration file set sendmail="~/.local/bin/msmtp" diff --git a/shell/.pam_environment b/shell/.pam_environment @@ -1,8 +1,8 @@ -# ___ ____ __ /\ __ /\ _____ _____ ____ -# .'__ \ / __ \ / / / / / / / /.'__ // ____\ / __/ -# / ____// / / / \ \/ / \ \/ // /_/ // / __\ \ -# \___\ \/ \/ \_,' \_,' \____/ \/ \___/ 2016-09-21 -#=============================================================================== +# * | +# ---. ,--. --.-. ,--. ---. . , , .,-- ,--. ---. --.-. ,--. ---. |-- +# | | ,--| | | | |--' | | \ / | | | | | | | | | |--' | | | +# |--' `--` ' ' ' `--' ' ' ' ' ' `--' ' ' ' ' ' `--' ' ' ' 2016-10-08 +#-|----------------------------------------------------------------------------- # Environment variables diff --git a/shell/.profile b/shell/.profile @@ -1,10 +1,9 @@ #!/bin/sh -# ____ __ -# ____ _____ ____ .' ___\ \/ /\ ___ -# / __ \ / ____\/ __ \ / .'_ /\ / /.'__ \ -# / /_/ // / / /_/ // ___/ / // // ____/ -#/ ____/ \/ \____/ \/ \/ \/ \___\ 2016-10-05 -#\/============================================================================= +# ,-- * | +# ---. .,-- ,--. |- , | ,--. +# | | | | | | | | |--' +# |--' ' `--' ' ' ' `--' 2016-10-08 +#-|----------------------------------------------------------------------------- # Shell configuration, for any shell (dash, zsh, mksh, bash, busybox's ash...) diff --git a/tmux/.config/tmux/new-session b/tmux/.config/tmux/new-session @@ -1,10 +1,9 @@ #!/bin/sh -# __ /\ -# ____ _____ ____ \/ ___ ____ / /_ -# / __ \ / ____\/ __ \ /\ .'__ \ / ___\ / ___\ -# / /_/ // / / /_/ / / // ____// /__ / / -#/ ____/ \/ \____/_,-" / \___\ \____\ \/ 2016-10-05 -#\/===================\_,-"===================================================== +# * +# ---. ,--. , , , ,--- ,--. ,--- ,--- , ,--. ---. +# | | |--' | | | --- `--. |--' `--. `--. | | | | | +# ' ' `--' `-'-' ---' `--' ---' ---' ' `--' ' ' 2016-10-08 +#------------------------------------------------------------------------------- dir="$( find "$HOME/" -maxdepth 3 ! -path '*/.*' -type d | while read line diff --git a/tmux/.config/tmux/status b/tmux/.config/tmux/status @@ -1,10 +1,9 @@ #!/bin/sh -# /\ /\ -# ____ / /_ _____ / /_ __ /\ ____ -# / __// ___\.'__ // ___\/ / / / / __/ -# __\ \ / / / /_/ // / / /_/ /__\ \ -# \___/ \/ \____/ \/ \____/ \___/ 2016-10-05 -#=============================================================================== +# | | +# ,--- |-- ,--. |-- , , ,--- +# `--. | ,--| | | | `--. +# ---' ' `--` ' `--` ---' 2016-10-08 +#------------------------------------------------------------------------------- # Status line, with tmux color escape sequence @@ -39,7 +38,7 @@ segment_mail() count="$(find "$MAIL/new" -type f 2>/dev/null | wc -l)" [ "$count" -le 0 ] && count='' || mail='mail' - printf '%s\n' red "$mail" "$count" + printf '%s\n' cyan "$mail" "$count" } segment_dir() diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf @@ -1,11 +1,9 @@ # /usr/bin/env tmux -f -# /\ ____ -# / /_ ________ __ /\ __ __ ____ ____ ____ .' ___\ -# / ___\/ __ __ \ / / / / \ \' / / ___\ / __ \ / __ \ / .'_ -# / / / / / / / // /_/ / ,' ,'__ / /__ / /_/ // / / // ___/ -# \/ \/ \/ \/ \____/ /_,\_\ \/ \____\ \____/ \/ \/ \/ 2016-10-05 -#=============================================================================== - +# | ,-- +# |-- --.-. , , . , ,--. ,--. ---. |- +# | | | | | | >< | | | | | | +# ' ' ' ' `--` ' ` * `--' `--' ' ' ' 2016-10-08 +#------------------------------------------------------------------------------- # Editing mode set -g status-keys vi diff --git a/bin/.cache/todo b/todo/.cache/todo diff --git a/todo/.local/bin/todo b/todo/.local/bin/todo @@ -0,0 +1,26 @@ +#!/bin/sh +# | | +# |-- ,--. .--| ,--. +# | | | | | | | +# ' `--' `--` `--' 2016-10-08 +#------------------------------------------------------------------------------- +# Small todo list implementation + +todo="$HOME/.cache/todo" t='' cmd='' + +if [ "$1" = e ]; then $EDITOR "$todo"; return 0; fi + +case "$1" in +-d ) shift + for n in $@; do cmd="$n d; $cmd"; done + sed "$cmd" -i "$todo" + ;; +'' ) + ;; +* ) + for w in $@; do t="$t $w"; done + printf '%s\n' "${t# }" >> "$todo" + ;; +esac + +sed '=' "$todo" | sed 'N; s/\n/\t/' diff --git a/vim/.vim/vimrc b/vim/.vim/vimrc @@ -1,13 +1,12 @@ -" __ -" __ /\ \/ ________ _____ ____ -" / / / / /\ / __ __ \ / ____\/ ___\ -" \ \/ / / // / / / / // / / /__ -" \_,' \/ \/ \/ \/ \/ \____\ 2016-09-23 -"=============================================================================== +" * +" . , , --.-. .,-- ,--. +" \ / | | | | | | +" ' ' ' ' ' ' `--' 2016-10-08 +"------------------------------------------------------------------------------- " Config for vim using vim's features rather than a lot of plugins -" OPTIONS 2016-09-23 +" OPTIONS "------------------------------------------------------------------------------- syntax enable | filetype plugin on | set nocompatible @@ -28,7 +27,7 @@ set showfulltag " Compilation let &colorcolumn=join(range(81,120),",") -" MAPPINGS 2016-09-23 +" MAPPINGS "------------------------------------------------------------------------------- let mapleader = ' ' @@ -85,14 +84,14 @@ nmap ]<Leader> mzo<Esc>k`z vmap <Leader>p myomzr\|`zlhr\`ylhr/ -" ABBREVIATIONS 2016-09-14 +" ABBREVIATIONS "------------------------------------------------------------------------------- iabbrev -_ <Esc>a-<Esc>:set ve=all<CR>v080lhr-:set ve=block<CR>A iabbrev =_ <Esc>a=<Esc>:set ve=all<CR>v080lhr=:set ve=block<CR>A -" HIGHLIGHTS 2016-09-23 +" HIGHLIGHTS "------------------------------------------------------------------------------- " Interface @@ -122,13 +121,13 @@ highlight Identifier cterm=none ctermfg=7 highlight Number cterm=bold ctermfg=7 -" AUTOCOMMANDS 2016-09-10 +" AUTOCOMMANDS " ------------------------------------------------------------------------------ autocmd VimEnter * :silent !mkdir -p ~/.cache/vim/ -" PLUGINS 2016-09-06 +" PLUGINS "------------------------------------------------------------------------------- execute pathogen#infect() diff --git a/zathura/.config/zathura/zathurarc b/zathura/.config/zathura/zathurarc @@ -1,9 +1,8 @@ -# /\ /\ -# ______ _____ / /_ / /_ __ /\ _____ _____ -# /__ /.'__ // ___\/ __ \ / / / // ____\.'__ / -# ,-' _-'/ /_/ // / / / / // /_/ // / / /_/ / -# /_____\ \____/ \/ \/ \/ \____/ \/ \____/ 2016-09-20 -#=============================================================================== +# | | +# ---, ,--. |-- |--. , , .,-- ,--. .,-- ,--. +# ,' ,--| | | | | | | ,--| | | +# '--- `--` ' ' ' `--` ' `--` ' `--' 2016-10-08 +#------------------------------------------------------------------------------- set recolor true set recolor-keephue true