# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
-# vcprompt & other things
-export PATH=$PATH:$HOME/bin
+# python setup.py --command-packages=stdeb.command sdist_dsc
+
+# dns servers 80.67.169.12 || 2001:910:800::12
+# 31.14.133.188 (ns5.it) -- 99.30% uptime
+# 87.98.242.252 (ns11.fr) -- 99.58% uptime
+# 87.98.175.85 (ns10.fr) -- 99.61% uptime
+# 193.183.98.154 (ns1.it) -- 99.84% uptime
+
+# freenom
+# 80.80.80.80
+# 80.80.81.81
+
+# unicode characters https://en.wikipedia.org/wiki/List_of_Unicode_characters
+
+# make less more friendly for non-text input files, see lesspipe(1)
+#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
-# nim lang
-export PATH=$PATH:$HOME/bin/nim-0.10.2/bin
# If not running interactively, don't do anything
case $- in
*) return;;
esac
-
# make less more friendly for non-text input files, see lesspipe(1)
-#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
+[ -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
-
-# export command for coloring
-# '\e[x;ym $PS1 \e[m' or [\033[x;ym\] $PS1 [\033[00m\] x;y being the color pair to use
-
-if [ "$color_prompt" = yes ]; then
- #PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\] $(__git_ps1 "[%s]") \$ '
- #PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\] $(vcprompt -f %b%a%m%u) > '
- if [ $USER='nsukami' ]; then
- #PS1='${debian_chroot:+($debian_chroot)}5@\[\033[31m\]\h\[\033[00m\]:\w \[\033[1;33m\]$(vcprompt -f %b%a%m%u)\[\033[0m\] > '
- PS1='${debian_chroot:+($debian_chroot)}5@\[\033[31m\]k\[\033[00m\]:\w \[\033[1;33m\]$(vcprompt -f %b%a%m%u)\[\033[0m\] \n > '
- else
- PS1='${debian_chroot:+($debian_chroot)}\u@\[\033[31m\]\h\[\033[00m\]:\w \[\033[1;33m\]$(vcprompt -f %b%a%m%u)\[\033[0m\] \n > '
- fi
-else
- #PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w $(__git_ps1 "[%s]") \$ '
- if [ $USER='nsukami']; then
- #PS1='${debian_chroot:+($debian_chroot)}5@\[\033[31m\]\h\[\033[00m\]:\w $(vcprompt -f %b%a%m%u) > '
- PS1='${debian_chroot:+($debian_chroot)}5@\[\033[31m\]k\[\033[00m\]:\w $(vcprompt -f %b%a%m%u) \n > '
- else
- PS1='${debian_chroot:+($debian_chroot)}\u@\[\033[31m\]\h\[\033[00m\]:\w $(vcprompt -f %b%a%m%u) \n > '
- fi
-
-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 $(vcprompt -f %b%a%m%u) \a\]$PS1"
- ;;
-*)
- ;;
-esac
-
-# enable color support of ls
+# 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
+# colored GCC warnings and errors
+#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
+
+# some more ls aliases
+alias ll='ls -alF'
+alias la='ls -A'
+alias l='ls -CF'
+# Add an "alert" alias for long running commands. Use like so:
+# sleep 10; alert
+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$//'\'')"'
+
+# 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
# start gpg agent
# be sure to have done apt install gpg-agent pinentry-curses first
-eval `gpg-agent --daemon`
+if ! ps -U "$USER" -o pid,ucomm | grep -i "gpg-agent" > /dev/null; then
+ echo "gpg agent not running, starting new one";
+ eval `gpg-agent --daemon`
+fi
+
+# just for being able to source easily
+CURRENT_WORKING_DIR="$HOME/mydotfiles"
+
+# print available tmux sessions if available
+tmux list-sessions 2> /dev/null
# 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.
-[[ -f ~/.bash_aliases ]] && . ~/.bash_aliases
+[[ -f "$CURRENT_WORKING_DIR"/.bash_aliases ]] && . "$CURRENT_WORKING_DIR"/.bash_aliases
# git completion
-[[ -f ~/.git_completion ]] && . ~/.git_completion
+[[ -f "$CURRENT_WORKING_DIR"/.git_completion ]] && . "$CURRENT_WORKING_DIR"/.git_completion
+
+# prompt
+[[ -f "$CURRENT_WORKING_DIR"/.bash_prompts ]] && . "$CURRENT_WORKING_DIR"/.bash_prompts
# personal customization
-[[ -f ~/.bash_customization ]] && . ~/.bash_customization
+[[ -f "$CURRENT_WORKING_DIR"/.bash_customization ]] && . "$CURRENT_WORKING_DIR"/.bash_customization
# personal functions
-[[ -f ~/.bash_function ]] && . ~/.bash_function
+[[ -f "$CURRENT_WORKING_DIR"/.bash_function ]] && . "$CURRENT_WORKING_DIR"/.bash_function
# personal export
-[[ -f ~/.bash_export ]] && . ~/.bash_export
+[[ -f "$CURRENT_WORKING_DIR"/.bash_export ]] && . "$CURRENT_WORKING_DIR"/.bash_export
# personal color
-[[ -f ~/.bash_color ]] && . ~/.bash_color
+[[ -f "$CURRENT_WORKING_DIR"/.bash_color ]] && . "$CURRENT_WORKING_DIR"/.bash_color
# personal shopt
-[[ -f ~/.bash_shopt ]] && . ~/.bash_shopt
+[[ -f "$CURRENT_WORKING_DIR"/.bash_shopt ]] && . "$CURRENT_WORKING_DIR"/.bash_shopt
# git completion
-[[ -f ~/.git_completion ]] && . ~/.git_completion
+[[ -f "$CURRENT_WORKING_DIR"/.git_completion ]] && . "$CURRENT_WORKING_DIR"/.git_completion
# is or is not
-[[ -f ~/.bash_is ]] && . ~/.bash_is
+[[ -f "$CURRENT_WORKING_DIR"/.bash_is ]] && . "$CURRENT_WORKING_DIR"/.bash_is
# jump to directories
-[[ -f ~/.bash_marks ]] && . ~/.bash_marks
+[[ -f "$CURRENT_WORKING_DIR"/.bash_marks ]] && . "$CURRENT_WORKING_DIR"/.bash_marks
# tmux completion script
-[[ -f ~/.bash_tmux ]] && . ~/.bash_tmux
+[[ -f "$CURRENT_WORKING_DIR"/.bash_tmux ]] && . "$CURRENT_WORKING_DIR"/.bash_tmux
# jump completion script
-[[ -f ~/.bash_compl ]] && . ~/.bash_compl
+[[ -f "$CURRENT_WORKING_DIR"/.bash_compl ]] && . "$CURRENT_WORKING_DIR"/.bash_compl
# jump completion script
-[[ -f ~/.bash_base64 ]] && . ~/.bash_base64
+[[ -f "$CURRENT_WORKING_DIR"/.bash_base64 ]] && . "$CURRENT_WORKING_DIR"/.bash_base64
# emacs launcher script
-[[ -f ~/.bash_emacs ]] && . ~/.bash_emacs
+[[ -f "$CURRENT_WORKING_DIR"/.bash_emacs ]] && . "$CURRENT_WORKING_DIR"/.bash_emacs
# memo
-[[ -f ~/.bash_memo ]] && . ~/.bash_memo
+[[ -f "$CURRENT_WORKING_DIR"/.bash_memo ]] && . "$CURRENT_WORKING_DIR"/.bash_memo
# custom bindings
-
-[[ -f ~/.bash_bind ]] && . ~/.bash_bind
+[[ -f "$CURRENT_WORKING_DIR"/.bash_bind ]] && . "$CURRENT_WORKING_DIR"/.bash_bind
# custom filters
+[[ -f "$CURRENT_WORKING_DIR"/.bash_filters ]] && . "$CURRENT_WORKING_DIR"/.bash_filters
-[[ -f ~/.bash_filters ]] && . ~/.bash_filters
+# openssl
+[[ -f "$CURRENT_WORKING_DIR"/.bash_openssl ]] && . "$CURRENT_WORKING_DIR"/.bash_openssl
-# print available tmux sessions if available
-tmux list-sessions 2> /dev/null
+# pomodoro
+[[ -f "$CURRENT_WORKING_DIR"/.bash_pomodoro ]] && . "$CURRENT_WORKING_DIR"/.bash_pomodoro
+
+# django
+[[ -f "$CURRENT_WORKING_DIR"/.bash_django ]] && . "$CURRENT_WORKING_DIR"/.bash_django
+
+# nginx
+[[ -f "$CURRENT_WORKING_DIR"/.bash_nginx ]] && . "$CURRENT_WORKING_DIR"/.bash_nginx
+
+# docker
+[[ -f "$CURRENT_WORKING_DIR"/.bash_docker ]] && . "$CURRENT_WORKING_DIR"/.bash_docker
+
+# fzf, fuzzy finder
+[[ -f "$CURRENT_WORKING_DIR"/.fzf.bash ]] && source "$CURRENT_WORKING_DIR"/.fzf.bash