dotfiles/modules/shell/files/base.sh

38 lines
1 KiB
Bash
Raw Normal View History

2017-02-26 20:36:31 +00:00
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
2016-11-19 22:04:40 +00:00
# Export some variables
export ANDROID_HOME=/opt/android-sdk
export EDITOR=/bin/nano
2017-02-26 20:36:31 +00:00
export TIMEFMT=$'\nreal\t%E\nuser\t%U\nsys\t%S'
2017-08-21 13:09:26 +01:00
export DOTFILES=~/.dotfiles
2017-11-10 08:53:48 +00:00
export QT_QPA_PLATFORMTHEME=gtk2
2017-02-26 20:36:31 +00:00
2016-11-19 22:04:40 +00:00
# Extend path
export PATH=${PATH}:${ANDROID_HOME}/tools
export PATH=${PATH}:${ANDROID_HOME}/platform-tools
export PATH=${PATH}:/opt/genymobile/genymotion
2017-08-12 18:18:18 +01:00
export PATH=${PATH}:${HOME}/.bin
2016-11-19 22:04:40 +00:00
# bash aliases
alias refresh="cd $PWD > /dev/null"
alias c="clear"
alias e="exit"
alias no="yes n"
2017-06-10 12:00:17 +01:00
alias open="xdg-open"
alias browse "xdg-open ."
2016-11-19 22:04:40 +00:00
2016-11-19 22:10:01 +00:00
# colourify things!
2016-11-19 22:04:40 +00:00
alias ls='ls --color=auto'
alias grep='grep --color=auto'
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
2017-02-26 20:36:31 +00:00
# don't put duplicate lines or lines starting with space in the history.
HISTCONTROL=ignoreboth