dot

packages and services management
Log | Files | Refs | README

commit 093a15de2d3690f80b4d31e3a695ffb5e87f02b3
parent b3b3f3ea1db87d0ce5ebebe86b845ef1e65791c4
Author: Josuah Demangeon <mail@josuah.net>
Date:   Tue, 25 Apr 2017 14:19:01 +0200

pulled psf font

Diffstat:
M.profile | 10+++++-----
Mbin/io-abduco | 6++----
Abin/io-jobs | 1+
Dbin/io-man | 6------
Abin/io-mandoc | 6++++++
Mbin/madown | 4++--
Mbin/version | 20+++++++-------------
Aconsolefonts/yui_base.psfu | 0
Aconsolefonts/yui_brail.psfu | 0
Aconsolefonts/yui_rl.psfu | 0
10 files changed, 23 insertions(+), 30 deletions(-)

diff --git a/.profile b/.profile @@ -18,13 +18,13 @@ export NAME='Josuah Demangeon' EMAIL='mail@josuah.net' TZ='Europe/Paris' # default commands export EDITOR='vis' VISUAL='vis' export PAGER='less' MANPAGER='less -R' DVTM_PAGER='less -R' -export BROWSER='firefox' +export BROWSER='surf' # prompts -export PS3='❯ ' PS2='❯ ' PS1=' +export PS3=' ❯ ' PS2=' ❯ ' PS1=' $(date +"[%H:%M]" ) $PWD/$(git-status)${SSH_TTY:+ $(hostname)}${ABDUCO:+ $ABDUCO} ${?#0} -❯❯ ' +$(jobs | wc -l | sed s/0/❯/)❯ ' # core @@ -32,12 +32,12 @@ alias l='ls -lhp' alias la='ls -lhpA' alias cl='printf "\033[H\033[2J"' alias ..='cd ..' -alias j='jobs' # iomenu alias v='io-edit' alias a='io-abduco' alias r='io-run' +alias j='fg "%$(jobs | iomenu | sed -r "s/.([0-9]*).*/\1/")"' alias f='find . ! -path "*/.git/*" -type f | iomenu -p file' alias d='find . ! -path "*/.git/*" -type d | iomenu -p directory' alias c='cd "$(find "$HOME" -type d | iomenu -p cd)"' @@ -58,5 +58,5 @@ alias count='echo "$(( case "$(tty)" in ( /dev/tty* ) setfont "$CONFIG/consolefonts/lode-16.psf" - tty-theme 3 + printf '\033]P0000000\033]P7ffddaa\033[J' # color theme ;; esac diff --git a/bin/io-abduco b/bin/io-abduco @@ -11,8 +11,6 @@ name="$( sed -r 's/[^\t]*\t[^\t]*\t//' )" -printf '\033[H\033[J' +printf '\033[H\033[J' # clear the screen -[ "$SSH_CLIENT$SSH_TTY$SSH_CONNECTION" ] && e='^\' || e='^Z' - -[ "$name" ] && ABDUCO="$name" exec abduco -e "$e" -A "$name" "$SHELL" +[ "$name" ] && ABDUCO="$name" exec abduco -A "$name" "$SHELL" diff --git a/bin/io-jobs b/bin/io-jobs @@ -0,0 +1 @@ +alias j='fg $(jobs | iomenu | sed -r "s/\[(0-9)\].*/\1/")' diff --git a/bin/io-man b/bin/io-man @@ -1,6 +0,0 @@ -# prompt a man page to open - -mandoc -a "$( - IFS=':' - find $MANPATH ! -type d -name '*.[0-9]' | sort -u | iomenu -p man -l 255 -)" diff --git a/bin/io-mandoc b/bin/io-mandoc @@ -0,0 +1,6 @@ +# prompt a man page to open + +mandoc -a "$( + IFS=':' + find $MANPATH ! -type d -name '*.[0-9]' | sort -u | iomenu -p mandoc -l 255 +)" diff --git a/bin/madown b/bin/madown @@ -55,11 +55,11 @@ pre { } -# div - tags +# h4 - tags !tag && /^\{.*\}$/ { sub(/^\{ */, ""); sub(/ *\}$/, ""); - tag = "div style=\"font-weight: bold;\""; + tag = "h4"; } diff --git a/bin/version b/bin/version @@ -1,10 +1,11 @@ +#!/bin/sh + # simple version control system to store data using hashs # dependencies: # mkdir find sort xargs sha256sum rm test mv chmod comm sed printf tac tail -SUM='md5sum' NL=' ' @@ -18,8 +19,7 @@ die() usage() { - printf 'version [-i] [-n msg] [-d rev1 rev2] [-r rev] [-p dir]\n' - exit 1 + die 'version [-i] [-n msg] [-d rev1 rev2] [-r rev] [-p dir]\n' } @@ -41,18 +41,17 @@ new() { printf 'new revision\n' - find . -type f ! -path './v/*' | sort | xargs $SUM | tee v/tmp | + find . -type f ! -path './v/*' | sort | xargs md5sum | tee v/tmp | while read -r hash path do [ -f "v/obj/$hash" ] || cp "$path" "v/obj/$hash" done - old="$([ -f v/log ] && tail -n 1 v/log | cut -d ' ' -f 1)" - new="$($SUM v/tmp | cut -d ' ' -f 1)" - + new="$(md5sum v/tmp | cut -d ' ' -f 1)" mv -f v/tmp "v/rev/$new" - [ "$old" = "$new" ] || printf '%s %s\n' "$new" "$1" | tee -a v/log + [ ! -f v/log ] || [ "$(tail -n 1 v/log | cut -d ' ' -f 1)" = "$new" ] && + printf '%s %s\n' "$new" "$1" | tee -a v/log chmod -w v/obj/* v/rev/* } @@ -136,23 +135,18 @@ main() ( -i ) [ $# = 1 ] || usage init ;; - ( -n ) [ $# = 2 ] || usage new "$2" ;; - ( -d ) [ $# = 3 ] && [ -f "v/rev/$2" ] && [ -f "v/rev/$3" ] || usage difftree "$2" "$3" ;; - ( -r ) [ $# = 2 ] || [ -f "v/rev/$2" ] || usage revision "$2" ;; - ( -p ) [ $# = 2 ] && [ -d "$2/v" ] && [ -f "$2/v/log" ] || usage pull "$(cd "$2" && pwd)" ;; - ( * | '' ) usage ;; esac diff --git a/consolefonts/yui_base.psfu b/consolefonts/yui_base.psfu Binary files differ. diff --git a/consolefonts/yui_brail.psfu b/consolefonts/yui_brail.psfu Binary files differ. diff --git a/consolefonts/yui_rl.psfu b/consolefonts/yui_rl.psfu Binary files differ.