cleanup
This commit is contained in:
parent
2e686faca1
commit
2dc3dcdc5a
3 changed files with 55 additions and 105 deletions
|
@ -1,25 +1,13 @@
|
|||
alias sudo='sudo '
|
||||
|
||||
if [ "$OS_TYPE" == "freebsd" ]; then
|
||||
alias ls='ls -G'
|
||||
else
|
||||
alias ls='ls --color=auto'
|
||||
fi
|
||||
alias ll='ls -lih'
|
||||
[ "$(uname -s | tr '[:upper:]' '[:lower:]')" = 'linux' ] && alias ls='ls --color=auto'
|
||||
alias ll='ls -lihF'
|
||||
alias la='ls -A'
|
||||
alias l='ls -lihA'
|
||||
alias l='ll -A'
|
||||
|
||||
alias sudo='sudo '
|
||||
alias grep='grep -n --color=auto'
|
||||
alias j='jobs'
|
||||
alias ne='emacs'
|
||||
alias df='df -h'
|
||||
alias top='TERM=screen-256color htop'
|
||||
alias weechat='TERM=screen-256color weechat'
|
||||
|
||||
alias lock='xscreensaver-command --lock'
|
||||
|
||||
alias meteo='curl -s --user-agent "USER FUCKING AGENT" "http://thefuckingweather.com/?where=Paris" | grep "<p class=\"remark\">" | sed -r "s/.*>(.*)<.*/\1 OUTSIDE\!/g"'
|
||||
|
||||
alias ryzom_season_change='date --date $(wget -q -O - "http://api.ryzom.com/time.php?format=xml" | sed "s/></>\n</g" | /bin/grep -e "day_of_season" -e "time_of_day" | sed "s/<day_of_season>/\(89-/" | sed "s/<time_of_day>/\(23-/g" | sed "s/<\/day_of_season>/\)\*72/" | sed "s/<\/time_of_day>/\)\*3/" | bc | tr "\n" "+" | sed "s/\+$/\n\"min\"\n/" | bc | tr -d "\n")'
|
||||
|
||||
fliptable() { echo "(╯°□°)╯ ┻━┻"; }
|
||||
hash htop 2>/dev/null && alias top='TERM=screen-256color htop'
|
||||
|
|
115
.bashrc
115
.bashrc
|
@ -5,87 +5,37 @@
|
|||
# If not running interactively, don't do anything
|
||||
[ -z "$PS1" ] && return
|
||||
|
||||
# Instead of this, copy:
|
||||
# /usr/share/terminfo/r/rxvt-unicode into ~/.terminfo/r/rxvt-unicode
|
||||
# /usr/share/terminfo/r/rxvt-unicode-256color into ~/.terminfo/r/rxvt-unicode-256color
|
||||
#export TERM=xterm
|
||||
|
||||
# Exporting nickname
|
||||
export USER_NICKNAME="Rodolphe Breard"
|
||||
|
||||
# Exporting DEB settings
|
||||
export DEBEMAIL="rodolphe.breard@uraniborg.net"
|
||||
export DEBFULLNAME="$USER_NICKNAME"
|
||||
|
||||
# Ruby bin directory
|
||||
if [ -d "$HOME/.gem/ruby" ]; then
|
||||
for file in $HOME/.gem/ruby/*; do
|
||||
if [ -d "$file" -a -d "$file/bin" ]; then
|
||||
export PATH="$PATH:$file/bin"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# Custom bin directory
|
||||
if [ -d "$HOME/bin" ]; then
|
||||
[[ ":$PATH:" == *":$HOME/bin:"* ]] || export PATH="$PATH:$HOME/bin"
|
||||
fi
|
||||
|
||||
# OS
|
||||
OS_TYPE=$(echo "$OSTYPE" | sed 's/\([a-zA-Z_\-]*\).*/\1/g')
|
||||
|
||||
# Colors
|
||||
if [ "$OS_TYPE" != "freebsd" ]; then
|
||||
eval $(dircolors -b)
|
||||
fi
|
||||
|
||||
# append to the history file, don't overwrite it
|
||||
shopt -s histappend
|
||||
|
||||
# don't save lines matching the previous history entry
|
||||
export HISTCONTROL=ignoredups
|
||||
|
||||
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
|
||||
|
||||
# check the window size after each command and, if necessary,
|
||||
# update the values of LINES and COLUMNS.
|
||||
shopt -s checkwinsize
|
||||
|
||||
# Set the prompt
|
||||
if [ -f /usr/bin/liquidprompt ]; then
|
||||
unset PROMPT_COMMAND
|
||||
source /usr/bin/liquidprompt
|
||||
elif [ -f "$HOME/liquidprompt/liquidprompt" ]; then
|
||||
unset PROMPT_COMMAND
|
||||
source "$HOME/liquidprompt/liquidprompt"
|
||||
else
|
||||
PS1="\[\033[01;31m\]\u\[\033[01;37m\]@\[\033[01;33m\]\h\[\033[01;31m\]->\[\033[00m\] "
|
||||
#PS1='\u@\h-> '
|
||||
fi
|
||||
|
||||
# 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 ]; then
|
||||
. /etc/bash_completion
|
||||
fi
|
||||
complete -cf sudo
|
||||
|
||||
# exporting editor and pager
|
||||
shopt -s histappend
|
||||
export HISTCONTROL=ignoredups
|
||||
export CLICOLOR=1
|
||||
export EDITOR='emacs'
|
||||
export PAGER='less'
|
||||
export USER_NICKNAME="Rodolphe Breard"
|
||||
export DEBEMAIL="packages+deb@what.tf"
|
||||
export DEBFULLNAME="$USER_NICKNAME"
|
||||
[[ ":$PATH:" == *":$HOME/bin:"* ]] || export PATH="$PATH:$HOME/bin"
|
||||
|
||||
# rbenv
|
||||
hash rbenv 2>/dev/null && eval "$(rbenv init -)"
|
||||
# Colors
|
||||
[ "$CLICOLOR" -ne 0 ] && hash dircolors 2>/dev/null && eval $(dircolors -b)
|
||||
|
||||
# Command completion
|
||||
[ -f /etc/bash_completion ] && . /etc/bash_completion
|
||||
|
||||
# Prompt
|
||||
if [ -f /usr/bin/liquidprompt ]; then
|
||||
unset PROMPT_COMMAND
|
||||
. /usr/bin/liquidprompt
|
||||
elif [ -f "$HOME/liquidprompt/liquidprompt" ]; then
|
||||
unset PROMPT_COMMAND
|
||||
. "$HOME/liquidprompt/liquidprompt"
|
||||
else
|
||||
if [ "$CLICOLOR" -ne 0 ]; then
|
||||
PS1="\[\033[01;31m\]\u\[\033[01;37m\]@\[\033[01;33m\]\h\[\033[01;31m\]->\[\033[00m\] "
|
||||
else
|
||||
PS1='\u@\h-> '
|
||||
fi
|
||||
fi
|
||||
|
||||
# GPG Agent
|
||||
if [ -f "${HOME}/.gpg-agent-info" ]; then
|
||||
|
@ -94,3 +44,14 @@ if [ -f "${HOME}/.gpg-agent-info" ]; then
|
|||
export SSH_AUTH_SOCK
|
||||
fi
|
||||
export GPG_TTY=$(tty)
|
||||
|
||||
# rbenv
|
||||
hash rbenv 2>/dev/null && eval "$(rbenv init -)"
|
||||
if [ -d "$HOME/.gem/ruby" ]; then
|
||||
for file in $HOME/.gem/ruby/*; do
|
||||
[ -d "$file" -a -d "$file/bin" ] && export PATH="$PATH:$file/bin"
|
||||
done
|
||||
fi
|
||||
|
||||
# Aliases
|
||||
[ -f "$HOME/.bash_aliases" ] && . ~/.bash_aliases
|
||||
|
|
23
.zshrc
23
.zshrc
|
@ -1,3 +1,7 @@
|
|||
setopt nobeep appendhistory histignoredups histignorespace autocd extendedglob nomatch notify correct_all
|
||||
bindkey -e
|
||||
bindkey "^[[3~" delete-char
|
||||
bindkey "^[3;5~" delete-char
|
||||
export HISTFILE=~/.zsh_history
|
||||
export HISTSIZE=1000
|
||||
export SAVEHIST=1000
|
||||
|
@ -5,13 +9,12 @@ export CLICOLOR=1
|
|||
export EDITOR='emacs'
|
||||
export PAGER='less'
|
||||
export USER_NICKNAME="Rodolphe Breard"
|
||||
export DEBEMAIL="packages+deb@what.tf"
|
||||
export DEBFULLNAME="$USER_NICKNAME"
|
||||
[[ ":$PATH:" == *":$HOME/bin:"* ]] || export PATH="$PATH:$HOME/bin"
|
||||
|
||||
|
||||
setopt nobeep appendhistory histignoredups histignorespace autocd extendedglob nomatch notify correct_all
|
||||
bindkey -e
|
||||
bindkey "^[[3~" delete-char
|
||||
bindkey "^[3;5~" delete-char
|
||||
# Colors
|
||||
[ "$CLICOLOR" -ne 0 ] && hash dircolors 2>/dev/null && eval $(dircolors -b)
|
||||
|
||||
# Command completion
|
||||
autoload -U compinit
|
||||
|
@ -20,10 +23,10 @@ compinit
|
|||
# Prompt
|
||||
if [ -f /usr/bin/liquidprompt ]; then
|
||||
unset PROMPT_COMMAND
|
||||
source /usr/bin/liquidprompt
|
||||
. /usr/bin/liquidprompt
|
||||
elif [ -f "$HOME/liquidprompt/liquidprompt" ]; then
|
||||
unset PROMPT_COMMAND
|
||||
source "$HOME/liquidprompt/liquidprompt"
|
||||
. "$HOME/liquidprompt/liquidprompt"
|
||||
else
|
||||
if [ "$CLICOLOR" -ne 0 ]; then
|
||||
autoload -U colors && colors
|
||||
|
@ -35,7 +38,7 @@ fi
|
|||
|
||||
# Syntax-highlighting
|
||||
if [ -f "/usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" ]; then
|
||||
source "/usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
|
||||
. "/usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
|
||||
fi
|
||||
|
||||
# GPG Agent
|
||||
|
@ -50,9 +53,7 @@ export GPG_TTY=$(tty)
|
|||
[[ ! ":$PATH:" == *":$HOME/.rbenv/shims:"* ]] && hash rbenv 2>/dev/null && eval "$(rbenv init -)"
|
||||
|
||||
# Aliases
|
||||
if [ "$(uname -s | tr '[:upper:]' '[:lower:]')" = 'linux' ]; then
|
||||
alias ls='ls --color=auto'
|
||||
fi
|
||||
[ "$(uname -s | tr '[:upper:]' '[:lower:]')" = 'linux' ] && alias ls='ls --color=auto'
|
||||
alias ll='ls -lihF'
|
||||
alias la='ls -A'
|
||||
alias l='ll -A'
|
||||
|
|
Loading…
Reference in a new issue