Last active
November 23, 2015 21:54
-
-
Save maaatts/8b8f72b84ce9f836bb1e to your computer and use it in GitHub Desktop.
bashrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#vim: set ft=bash: | |
EDITOR=vim | |
# Programs | |
## Editors | |
alias e="$EDITOR" | |
alias se="sudo $EDITOR" | |
## Toys | |
alias clock="tty-clock -sSbctd 100000000" | |
alias email="mutt -f ~/mail" | |
# Files | |
## Dotfiles | |
alias bashrc="$EDITOR ~/.bashrc" | |
alias aliases="$EDITOR ~/.bash_aliases;source ~/.bashrc" | |
alias vimrc="$EDITOR ~/.vimrc" | |
# ls | |
if [ -x /usr/bin/dircolors ]; then | |
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" | |
alias ls='ls --color=auto' | |
alias dir='dir --color=auto' | |
alias vdir='vdir --color=auto' | |
alias grep='grep --color=auto' | |
alias fgrep='fgrep --color=auto' | |
alias egrep='egrep --color=auto' | |
fi | |
alias ll='ls -alF' | |
alias la='ls -A' | |
alias l='ls -CF' | |
# Moving up directories | |
alias ..="cd .." | |
alias ....="cd ../../" | |
alias ......="cd ../../../" | |
# Git | |
alias gg="git status -s" | |
# Misc. | |
alias c="source ~/.bashrc;reset" | |
alias ':q'='exit' | |
alias screensaver='for ((;;)); do echo -ne "\033[$((1+RANDOM%LINES));$((1+RANDOM%COLUMNS))H\033[$((RANDOM%2));3$((RANDOM%8))m$((RANDOM%10))"; sleep 0.1 ; done' | |
alias please='sudo $(fc -ln -1)' | |
silent(){ $@ > /dev/null 2>&1; }; alias shh=silent | |
# make class script | |
alias mkclass="bash ~/Scripts/createclass.sh" | |
# mkdir and cd | |
mkcd(){ mkdir -p ${1}; cd ${1}; } | |
# make in above directory | |
alias mk..="make -C .." | |
# terminal sizes | |
#80*24 , default | |
alias sdef="printf '\033[8;24;80t';clear" | |
#160*24 , double width | |
alias sdub="printf '\033[8;24;160t';clear" | |
# view twitch stream | |
twitch(){ livestreamer -p mpv "twitch.tv/${1}" best; } | |
# watch a youtube clip | |
youtube() { mpv --ytdl-format=bestvideo+bestaudio ${1}; } | |
# Ed, man! !man ed | |
alias ed="ed -p:" | |
# Ignore screenfetch errors | |
alias screenfetch="screenfetch 2>/dev/null" | |
export EDITOR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case $- in | |
*i*) ;; | |
*) return;; | |
esac | |
HISTCONTROL=ignoreboth | |
shopt -s histappend | |
HISTSIZE=1000 | |
HISTFILESIZE=2000 | |
shopt -s checkwinsize | |
export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' | |
if [ -f ~/.bash_aliases ]; then | |
. ~/.bash_aliases | |
fi | |
if ! shopt -oq posix; then | |
if [ -f /usr/share/bash-completion/bash_completion ]; then | |
. /usr/share/bash-completion/bash_completion | |
elif [ -f /etc/bash_completion ]; then | |
. /etc/bash_completion | |
fi | |
fi | |
export PS1="\[\e[36m\]\W\[\e[m\]\[\e[33m\] \[\e[m\]\[\e[33m\]%\[\e[m\] " | |
export JAVA_HOME=/usr/lib/jvm/java-8-oracle/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment