config_files/bash/.bashrc

90 lines
2.4 KiB
Bash
Raw Normal View History

2013-09-09 13:30:23 +02:00
source /etc/profile
# Check for an interactive session
[ -z "$PS1" ] && return
2019-03-28 15:21:05 +01:00
##SSH Agent
eval $(keychain --eval --quiet id_ed25519)
2013-09-09 13:30:23 +02:00
alias ls='ls --color=auto'
alias ll='ls -l'
alias grep='grep -n --color'
alias bc='bc -l'
2019-03-28 15:21:05 +01:00
alias ip='ip --color=auto'
2013-09-09 13:30:23 +02:00
alias 1x='~/1x.sh'
alias xmlvalidator='rxp -s'
alias pdftojpg='convert -units PixelsPerInch -density 150x150 -antialias'
alias dual='xrandr --auto --output LVDS1 --primary --mode 1366x768 --left-of VGA1 --output VGA1 --mode 1280x1024'
export EDITOR=vim
export PAGER=less
2014-12-02 16:41:22 +01:00
export XDG_CONFIG_HOME="/home/cgirard/.config"
2019-03-28 15:21:05 +01:00
export AURDEST=/var/lib/pacaurbuild
2013-09-09 13:30:23 +02:00
archmirrorupdate(){
cp /etc/pacman.d/mirrorlist /tmp/mirrorlist_`date +%s`
wget -q 'https://www.archlinux.org/mirrorlist/?country=FR&protocol=http&protocol=https&ip_version=4&use_mirror_status=on' -O - | sed 's!^#!!' > /tmp/mirrorlist.new
2019-03-28 15:21:05 +01:00
echo 'Server=https://archive.archlinux.org/packages/.all' >> /tmp/mirrorlist.new
2013-09-09 13:30:23 +02:00
sudo cp /tmp/mirrorlist.new /etc/pacman.d/mirrorlist
sudo pacman -Syy
}
2019-03-28 15:21:05 +01:00
#alias ssh='TERM=rxvt ssh'
2013-09-09 13:30:23 +02:00
svnlog(){
svn log -v -r {`date -d "$1 days ago" +%F`}:HEAD
}
svncommiterstats(){
svn log | perl -MData::Dumper -n -e'if (/^r\d+\s*\|\s*(\w+)\s*\|/) {$c{$1}++} END {print Dumper \%c}'
}
2019-03-28 15:21:05 +01:00
export ARCH_HASKELL='Cedric Girard <girard.cedric@gmail.com>'
2013-09-09 13:30:23 +02:00
deploy_terminfo(){
if [[ -n $1 ]] ; then
cat /usr/share/terminfo/x/xterm-termite | ssh $1 "mkdir -p .terminfo/x/ ; cat > .terminfo/x/xterm-termite" \
&& echo "Terminfo deployed to $1"
fi
}
2014-12-02 16:41:22 +01:00
eval $(dircolors ~/.dircolors)
2019-03-28 15:21:05 +01:00
#export PATH=$PATH:/home/cgirard/.gem/ruby/1.9.1/bin
#export GEM_HOME="~/.gem/ruby/1.9.1"
eval "$(rbenv init -)"
#export PYTHONPATH=/usr/lib/python3.3/site-packages
2013-09-09 13:30:23 +02:00
if [[ $TERM == xterm-termite ]]; then
. /etc/profile.d/vte.sh
#PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'__vte_osc7'
2019-03-28 15:21:05 +01:00
powerline-daemon -q
export POWERLINE_BASH_CONTINUATION=1
export POWERLINE_BASH_SELECT=1
source /usr/lib/python3.7/site-packages/powerline/bindings/bash/powerline.sh
2013-09-09 13:30:23 +02:00
fi
#Bash history
export HISTSIZE=5000
2019-03-28 15:21:05 +01:00
export HISTCONTROL=ignoredups:erasedups
2013-09-09 13:30:23 +02:00
shopt -s histappend
#local perl libs
perl_local_perl5lib(){
unset PERL5LIB
for dir in `find . -type d -name lib` ; do
PERL5LIB=${PERL5LIB:+$PERL5LIB:}$dir
done
export PERL5LIB
}
#tmuxinator
source /usr/lib/ruby/gems/*/gems/tmuxinator-*/completion/tmuxinator.bash
2019-03-28 15:21:05 +01:00
#fzf
source /usr/share/fzf/completion.bash
2019-05-09 16:16:16 +02:00
#the-fuck
eval $(thefuck --alias)