dotfiles

configuration files for different softwares
git clone git://z3bra.org/dotfiles
Log | Files | Refs

commit 10a64a7c1699e756f52dac2bc1214e88c6067053
parent 54d26868f7a03d3c45e4a0855c8ac176ec11383d
Author: z3bra <willy@mailoo.org>
Date:   Sun May 17 15:58:23 2015

trying out a new shell: mksh

Diffstat:
 mkshrc | 116 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 116 insertions(+), 0 deletions(-)

diff --git a/mkshrc b/mkshrc @@ -0,0 +1,116 @@ +# INIT {{{ + +# If not running interactively, don't do anything +[[ $- != *i* ]] && return + +test -n "$SSH_CLIENT" && PS1="$(hostname|cut -b 1-3)" || PS1= + +fd="$(tput sgr0)" +ff="$(tput bold)" +PS1="${PS1}${ff}% ${fd}" +HISTFILE=~/.history + +export PS1 HISTFILE + +# }}} +# FUNCTIONS {{{ + +:h () { vim +"h $1" +only +'map q ZQ'; } + +up() { + test -z "$1" && cd .. && pwd && return 0 + for i in $(seq 1 $1); do up=../$up; done + cd $up + pwd +} + +sprunge() { + test -z $1 && FILE='-' || FILE=$1 + curl -sF "sprunge=<${FILE}" http://sprunge.us +} + +# my computer is talking +say () { + TL=${TL:-en} + uri="http://translate.google.com/translate_tts?tl=${TL}&q=" + mplayer -really-quiet "${uri}$*" +} + +upthemall() { + for p in ~/usr/ports/*; do + cd $p + prtup && + fakeroot pkgmk -d && + git add . + done +} +# }}} +# ALIASES {{{ + +# Terminal +alias quit="exit" +alias c="clear" +alias so="source ~/.bashrc" + +# Add a 'proctection' on rm | mv | cp +alias cp="cp -rvi" +alias mv="mv -i" + +# Alias to avoid some "RAAAAAAAAAH !!" +alias :q="quit" +alias cd..="cd .." +alias fu='sup `fc -n -l -1`' +alias fuck='sup `fc -n -l -1`' +alias sv="sup vim" + +# Make some output colorfull +alias ls="ls -1 --color=auto" +#alias grep="grep --color=auto" + +# some more ls aliases +alias ll="ls -alhF --color=auto" +alias l="ls -CF --color=auto" + +# job control +alias mtop="ps --no-header -eo pmem,size,vsize,comm | sort -nr | sed 10q" +alias ctop="ps --no-header -eo pcpu,comm | sort -nr | sed 10q" + +# command shortner +alias g='grep' +alias v="vim" +alias t='tmux' +alias btc="btcli -d ~/var/btp" +alias csv='column -t -s\;' +alias vol="alsamixer" +alias yg="youtube-dl -q -x -o '%(title).%(ext)'" + +# reattach IRC session +alias d='dtach -A ~/tmp/irssi.sk -e  irssi' + +# crux specific +alias deptree='prt-get deptree' +alias update='prt-get update' +alias pkgup='pkgadd -u' + +# desktop stuff +alias xreload="xrdb -load ~/etc/Xresources" +alias rec="ffmpeg -f x11grab -s 1440x900 -an -i :0.0 -c:v libvpx -b:v 5M -crf 10 -quality realtime -y -loglevel quiet" +alias fastrec="ffmpeg -f x11grab -s 1440x900 -an -r 25 -i :0.0 -c:v libvpx -b:v 5M -crf 10 -quality realtime -y -loglevel quiet" +alias cam="mplayer -tv driver=v4l2:width=320:height=240: -vo xv tv:// -geometry '99%:90%' -ontop" + +# HANDY RICKY SCRIPT +alias rick="echo 'curl -L http://bit.ly/10hA8iC | bash'" +alias rcommit="curl -s 'http://whatthecommit.com/index.txt'" +# }}} +# BINDINGS {{{ +bind ^L=clear-screen +# }}} +# TWEAKS {{{ +# change tty colors +set -o vi +which ttycolors >/dev/null 2>&1 && ttycolors +# }}} + +todo + +# vim: fdm=marker: