dot

packages and services management
Log | Files | Refs | README

commit d89d707fdfef145497f755843bd17f6b607a1db5
parent fcf3229537827e5c50b254f3c0a7638b29bdeefb
Author: Josuah Demangeon <josuah.demangeon@gandi.net>
Date:   Tue, 27 Jun 2017 13:39:37 +0200

colors are back

Diffstat:
Mbin/git-status | 14+++++++-------
Dbin/prompt | 4----
Aquark/url | 1+
Tshell/.bashrc | 0
Tshell/.mkshrc | 0
Mshell/.profile | 17-----------------
Tshell/.zshrc | 0
Dshell/alias | 26--------------------------
Ashell/rc | 37+++++++++++++++++++++++++++++++++++++
9 files changed, 45 insertions(+), 54 deletions(-)

diff --git a/bin/git-status b/bin/git-status @@ -30,12 +30,12 @@ git rev-parse 2> /dev/null && git status --porcelain -b | awk ' /^[^ ]. / { staged++; } END { - printf("%s", branch); + printf("\033[1;30m%s\033[m", branch); - if (untracked) printf(" ?%d", untracked); - if (conflicts) printf(" ¤%d", conflicts); - if (changed ) printf(" +%d", changed); - if (staged ) printf(" •%d", staged); - if (behind ) printf(" ↓%d", behind); - if (ahead ) printf(" ↑%d", ahead); + if (untracked) printf(" \033[33m?\033[m%d", untracked); + if (conflicts) printf(" \033[31mx\033[m%d", conflicts); + if (changed ) printf(" \033[32m+\033[m%d", changed); + if (staged ) printf(" \033[34m#\033[m%d", staged); + if (behind ) printf(" \033[35mv\033[m%d", behind); + if (ahead ) printf(" \033[36m^\033[m%d", ahead); }' diff --git a/bin/prompt b/bin/prompt @@ -1,4 +0,0 @@ -echo -echo "${PWD%/}/" $(hostname) ${ABDUCO} $(git-status) ${1#0} -date +'[%H:%M] ' - diff --git a/quark/url b/quark/url @@ -0,0 +1 @@ +http://git.suckless.org/quark/snapshot/quark-master.tar.gz diff --git a/shell/.bashrc b/shell/.bashrc diff --git a/shell/.mkshrc b/shell/.mkshrc diff --git a/shell/.profile b/shell/.profile @@ -1,5 +1,3 @@ -# FreeBSD pkg's plan9port -export PLAN9="/usr/local/plan9" . "$HOME/etc/profile" @@ -15,18 +13,3 @@ export VISUAL='vi' export PAGER='less' export MANPAGER='less' export BROWSER='firefox' - -export PS1='$(prompt $?)' -export PS2=' ' -export PS3=' ' - -case "$-" in ( *i* ) - case "$(tty)" in ( /dev/tty* ) - setfont "$ETC/consolefonts/lode-16.psf" - printf '\033]P0000000\033]P7ffddaa\033[J' # color theme - ;; - esac - - . "$ETC/shell/alias" - ;; -esac diff --git a/shell/.zshrc b/shell/.zshrc diff --git a/shell/alias b/shell/alias @@ -1,26 +0,0 @@ -# core - -alias cl='printf "\033[H\033[2J"' -alias la='l -A' - - -# iomenu - -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 | sort | iomenu -p cd)"' -alias p='p=`io-ps`' - - -# utilities - -alias myip='curl icanhazip.com' -alias ix='curl -F "f:1=<-" ix.io' -alias w1r3='curl -F upload=@- https://w1r3.net' -alias wttr='wget -qO- wttr.in' -alias lines='find . -name "*.[ch]" | xargs wc -l | sort -n' -alias count='echo "$(( - $(git diff | grep "^+" | wc -l) - - $(git diff | grep "^-" | wc -l) -))"' diff --git a/shell/rc b/shell/rc @@ -0,0 +1,37 @@ +PS1=' +$( + [ "$?" = 0 ] && printf "█" || printf "\033[31;1m█\033[m" +) $(hostname) $(pwd) $(git-status) +█ ' +PS2='... ' +PS3='... ' + +export TERM=xterm-256color + + +# core + +alias cl='printf "\033[H\033[2J"' +alias la='l -A' + + +# iomenu + +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 | sort | iomenu -p cd)"' +alias p='p=$(io-ps)' + + +# utilities + +alias myip='curl icanhazip.com' +alias ix='curl -F "f:1=<-" ix.io' +alias w1r3='curl -F upload=@- https://w1r3.net' +alias wttr='wget -qO- wttr.in' +alias lines='find . -name "*.[ch]" | xargs wc -l | sort -n' +alias count='echo "$(( + $(git diff | grep "^+" | wc -l) - + $(git diff | grep "^-" | wc -l) +))"'