dotfiles

My opinionated dotfiles
git clone git://git.erethon.com/dotfiles
Log | Files | Refs

commit 6571d0dc91f357bd5b08a814002d3bc7aa441a26
parent 38fb9501b48a8ca1a39126f43b40c90b3ed47bb4
Author: Dionysis Grigoropoulos <dgrig@erethon.com>
Date:   Wed,  7 Dec 2016 18:43:47 +0200

bash: Remove bash related files

Diffstat:
.bash_aliases | 97-------------------------------------------------------------------------------
.bashrc | 140-------------------------------------------------------------------------------
setup.sh | 2--
3 files changed, 0 insertions(+), 239 deletions(-)

diff --git a/.bash_aliases b/.bash_aliases @@ -1,97 +0,0 @@ -# go back x directories -b() { - str="" - count=0 - while [ "$count" -lt "$1" ]; - do - str=$str"../" - let count=count+1 - done - cd $str -} - - -alias upgrade="sudo apt-get update && sudo apt-get upgrade && sudo apt-get clean" - - -#Extract almost any archive -extract () { - if [ -f $1 ] ; then - case $1 in - *.tar.bz2) tar xjf $1 ;; - *.tar.gz) tar xzf $1 ;; - *.bz2) bunzip2 $1 ;; - *.rar) unrar e $1 ;; - *.gz) gunzip $1 ;; - *.tar) tar xf $1 ;; - *.tbz2) tar xjf $1 ;; - *.tgz) tar xzf $1 ;; - *.zip) unzip $1 ;; - *.Z) uncompress $1 ;; - *.7z) p7zip -d $1 ;; - *) echo "'$1' cannot be extracted via extract()" ;; - esac - else - echo "'$1' is not a valid file" - fi -} - - -#Instant server -servedir(){ - python -m SimpleHTTPServer $1 -} - -shutd(){ - echo $((date| cut -d' ' -f 1-5 && uptime | cut -d' ' -f 3-5 | cut -d',' -f 1 ) | tr "\n" " ") >> ~/.uptime.txt - sudo shutdown -h now -} - -wifi(){ - sudo rfkill unblock wifi - sleep 1 - sudo ifconfig wlan0 down - sudo macchanger -r wlan0 - sudo ifconfig wlan0 up - sudo service wicd start - wicd-curses -} - -coent(){ -PID=$(docker inspect --format {{.State.Pid}} $1) -sudo nsenter --target $PID --mount --uts --ipc --net --pid -} - -#Clear terminal -alias c="clear" - -alias clip="xclip -selection clipboard" -alias burn="shred -n 3 -u " -alias monitor="xrandr --output DVI-I-1 --mode 1920x1080 --left-of VGA-1" - -#Common typo -alias les="less" - -#Open stdout in vim -alias vr="| vim -R -" - -#Pretty print json -alias json="python -mjson.tool" - -#Quick apt-get install/search -alias i="sudo apt-get install" -alias s="apt-cache search" - -#Quick dpkg -l | grep X -alias dp="dpkg -l | grep" - -#Stopwatch -alias timer='echo "Timer started. Stop with Ctrl-D." && date && time cat && date' - -#Common programs alias -alias g="git" -alias v="vim" -alias h="history | grep" -alias less="less -R" #Enable color parsing by default -alias iptv="iptables -L -v -n --line-numbers" -alias iptvs="ip6tables -L -v -n --line-numbers" diff --git a/.bashrc b/.bashrc @@ -1,140 +0,0 @@ -# ~/.bashrc: executed by bash(1) for non-login shells. -# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) -# for examples - -# If not running interactively, don't do anything -if [[ -n "$PS1" ]]; then - -# don't put duplicate lines in the history. See bash(1) for more options -# ... or force ignoredups and ignorespace -HISTCONTROL=ignoredups:ignorespace - -# append to the history file, don't overwrite it -shopt -s histappend - -# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) -HISTSIZE=1000 -HISTFILESIZE=2000 - -# check the window size after each command and, if necessary, -# update the values of LINES and COLUMNS. -shopt -s checkwinsize - -# make less more friendly for non-text input files, see lesspipe(1) -[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" - -# set variable identifying the chroot you work in (used in the prompt below) -if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then - debian_chroot=$(cat /etc/debian_chroot) -fi - -# set a fancy prompt (non-color, unless we know we "want" color) -case "$TERM" in - xterm-color) color_prompt=yes;; -esac - -# uncomment for a colored prompt, if the terminal has the capability; turned -# off by default to not distract the user: the focus in a terminal window -# should be on the output of commands, not on the prompt -force_color_prompt=yes - -if [ -n "$force_color_prompt" ]; then - if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then - # We have color support; assume it's compliant with Ecma-48 - # (ISO/IEC-6429). (Lack of such support is extremely rare, and such - # a case would tend to support setf rather than setaf.) - color_prompt=yes - else - color_prompt= - fi -fi - -if [ "$color_prompt" = yes ]; then - PS1='${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\u@\h\[\033[00m\]:\[\033[01;32m\]\w\[\033[00m\]\$ ' -else - PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' -fi -unset color_prompt force_color_prompt - -# If this is an xterm set the title to user@host:dir -case "$TERM" in -xterm*|rxvt*) - PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" - ;; -*) - ;; -esac - -# enable color support of ls and also add handy aliases -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 - -# some more ls aliases -alias ll='ls -alF' -alias la='ls -A' -alias l='ls -CF' - -# Alias definitions. -# You may want to put all your additions into a separate file like -# ~/.bash_aliases, instead of adding them here directly. -# See /usr/share/doc/bash-doc/examples in the bash-doc package. - -if [ -f ~/.bash_aliases ]; then - . ~/.bash_aliases -fi - -# enable programmable completion features (you don't need to enable -# this, if it's already enabled in /etc/bash.bashrc and /etc/profile -# sources /etc/bash.bashrc). -#if [ -f /etc/bash_completion ] && ! shopt -oq posix; then -# . /etc/bash_completion -#fi - export HISTCONTROL=ignoreboth -fi - -export PATH=$PATH:/etc/alternatives/gem-bin - - -. ~/.config/ls_col - - -parse_git_branch() { - git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \[\1\]/' -} - -if [ $(id -u) == 0 ]; then - prompt_color="\[\033[35m\]" -else - prompt_color="\[\033[32m\]" -fi - -export PS1=$prompt_color'\u@\h\[\033[00m\]:\[\033[01;32m\]\w\[\033[00m\]\[\033[36m\]$(parse_git_branch)\[\033[00m\]\$ ' - -if [ -f /etc/bash_completion ]; then - . /etc/bash_completion -fi - -# Needed for virtualenvwrapper -export WORKON_HOME=~/venvs -# source /usr/local/bin/virtualenvwrapper.sh - -####Adding stuff to path#### -PATH=$PATH:/sbin/ -PATH=$PATH:/usr/sbin/ -PATH=$PATH:/usr/bin/ -PATH=$PATH:/usr/local/sbin/ -export PATH - -export MANPAGER="/bin/sh -c \"col -b | vim -c 'set ft=man ts=8 nomod nolist nonu noma' -c 'map q ZZ' -\"" - -export GPG_TTY=$(tty) - -set -o vi diff --git a/setup.sh b/setup.sh @@ -6,8 +6,6 @@ mkdir -p ~/.vim/colors cp .gitconfig ~ cp .tmux.conf ~ cp .vimrc ~ -cp .bashrc ~ -cp .bash_aliases ~ cp .config/ls_col ~/.config cp .vim/colors/* ~/.vim/colors cp .Xdefaults ~/.Xdefaults