From 3089a7eaa479a0cb5349a9a294e215b48bba03b7 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sat, 1 Dec 2018 17:47:43 -0500 Subject: [PATCH] bashrc cleanout and color for diff and less/man --- .bashrc | 17 ++++------------- .profile | 12 +++++++++++- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/.bashrc b/.bashrc index ff09632..cb33499 100644 --- a/.bashrc +++ b/.bashrc @@ -33,28 +33,19 @@ alias ka="killall" alias g="git" alias trem="transmission-remote" alias mkd="mkdir -pv" -alias ref="shortcuts.sh && source ~/.bashrc" # Refresh shortcuts manually and reload bashrc +alias ref="shortcuts && source ~/.bashrc" # Refresh shortcuts manually and reload bashrc alias bw="wal -i ~/.config/wall.png" # Rerun pywal -alias pi="bash ~/.larbs/wizard/wizard.sh" # Adding color alias ls='ls -hN --color=auto --group-directories-first' -alias grep="grep --color=auto" # Color grep - highlight desired sequence. +alias grep="grep --color=auto" +alias diff="diff --color=auto" alias ccat="highlight --out-format=ansi" # Color cat - print file with syntax highlighting. # Internet alias yt="youtube-dl --add-metadata -ic" # Download video link alias yta="yt -x -f bestaudio/best" # Download only audio alias YT="youtube-viewer" -alias ethspeed="speedometer -r enp0s25" -alias wifispeed="speedometer -r wlp3s0" -alias starwars="telnet towel.blinkenlights.nl" - -# TeX -alias Txa="cp ~/Documents/LaTeX/article.tex" -alias Txs="cp ~/Documents/LaTeX/beamer.tex" -alias Txh="cp ~/Documents/LaTeX/handout.tex" - -source ~/.shortcuts shdl() { curl -O $(curl -s http://sci-hub.tw/"$@" | grep location.href | grep -o http.*pdf) ;} +vf() { $EDITOR $(fzf) ;} diff --git a/.profile b/.profile index 4e051f7..4f63d45 100644 --- a/.profile +++ b/.profile @@ -17,6 +17,16 @@ export REFER="$HOME/.referbib" # PIX is here I have LARBS keep icons. Subject to change, hence a variable. export PIX="$HOME/.scripts/pix" +# less/man colors +export LESS=-R +export LESS_TERMCAP_mb=$'\E[1;31m' # begin bold +export LESS_TERMCAP_md=$'\E[1;36m' # begin blink +export LESS_TERMCAP_me=$'\E[0m' # reset bold/blink +export LESS_TERMCAP_so=$'\E[01;44;33m' # begin reverse video +export LESS_TERMCAP_se=$'\E[0m' # reset reverse video +export LESS_TERMCAP_us=$'\E[1;32m' # begin underline +export LESS_TERMCAP_ue=$'\E[0m' # reset underline + [ ! -f ~/.shortcuts ] && shortcuts >/dev/null 2>&1 [ -f ~/.bashrc ] && source ~/.bashrc @@ -28,4 +38,4 @@ fi # Switch escape and caps and use wal colors if tty: sudo -n loadkeys ~/.scripts/ttymaps.kmap 2>/dev/null -tty | grep tty >/dev/null && wal -Rns >/dev/null 2>&1 +tty | grep tty >/dev/null && wal -Rns