Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #-----------------------------------------------------------------------------------------#
- #-----------------System-wide .bashrc file for interactive bash(1) shells.----------------#
- #-----------------------------------------------------------------------------------------#
- #-------To enable the settings / commands in this file for login shells as well,----------#
- #------------------this file has to be sourced in /etc/profile.---------------------------#
- #-----------------------------------------------------------------------------------------#
- #--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--#
- # If not running interactively, don't do anything.
- #--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--#
- if [ -z "$PS1" ]; then
- return
- fi
- #--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--#
- # Update the values of LINES and COLUMNS when resizing
- #--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--#
- shopt -s checkwinsize
- #--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--#
- # The history list is appended to the file named by the value of the
- # HISTFILE variable when shell exits, no overwriting the file.
- #--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--#
- shopt -s histappend
- #--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--#
- #
- # HISTCONTROL = If set to a value of ignorespace, lines which begin with a space
- # character are not entered on the history list.
- # If set to a value of ignoredups, lines matching the last history line are not entered.
- # A value of ignoreboth combines the two options.
- #
- # HISTFILE = The name of the file in which command history is saved.
- # The default value is ~/.bash_history.
- #
- # HISTFILESIZE = The maximum number of lines contained in the history file.
- # The default value is 500.
- #
- # HISTIGNORE = A colon-separated list of patterns used to decide which command lines
- # should be saved on the history list.
- #
- # HISTSIZE = The number of commands to remember in the command history.
- # The default value is 500.
- #
- #--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--#
- HISTSIZE=2048
- HISTFILESIZE=${HISTSIZE}
- HISTCONTROL=ignoredups
- HISTCONTROL=ignoreboth
- HISTCONTROL=erasedups
- HISTIGNORE="pwd:ls:ls -la:bash:clear:exit:du -sh:cp -av:mv -v:./configure:make:sudo make install:su -:su:sudo su:su - edps:history:screenfetch:tar -zxvf:tar -jxvf:tar -Jxvf:tar xf:unzip:"
- export PROMPT_COMMAND="history -a ; ${PROMPT_COMMAND:-:}"
- #--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--#
- # 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
- #--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--#
- # Standard Bash Prompt.
- #--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--#
- #PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
- case "$TERM" in
- xterm-color) color_prompt=yes;;
- esac
- force_color_prompt=yes
- if [ -n "$force_color_prompt" ]; then
- if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
- color_prompt=yes
- else
- color_prompt=yes
- fi
- fi
- PS1="\n\[\033[1;33m\]\342\224\214($(if [[ ${EUID} == 0 ]]; then echo '\[\033[01;31m\]\h'; else echo '\[\033[01;31m\]\u@\h'; fi)\[\033[1;33m\])\342\224\200(\$(if [[ \$? == 0 ]]; then echo \"\[\033[01;34m\]\342\234\223\"; else echo \"\[\033[01;31m\]\342\234\227\"; fi)\[\033[1;33m\])\342\224\200(\[\033[1;32m\]\t, \d\[\033[1;33m\])\[\033[1;33m\]\n\342\224\224\342\224\200(\[\033[1;34m\]\w\[\033[1;33m\])\342\224\200(\[\033[1;34m\]\$(ls -1 | wc -l | sed 's: ::g') files, \$(ls -lah | grep -m 1 total | sed 's/total //')b\[\033[1;33m\])\342\224\200> \[\033[0m\]"
- FGNAMES=('▐▐▐' '▐▐▐' '▐▐▐' '▐▐▐' '▐▐▐' '▐▐▐' '▐▐▐' '▐▐▐')
- BGNAMES=(' ')
- for b in $(seq 0 0); do
- if [ "$b" -gt 0 ]; then
- bg=$(($b+39))
- fi
- echo
- for f in $(seq 0 7); do
- echo -en "\033[${bg}m\033[$(($f+30))m ${FGNAMES[$f]} "
- echo -en "\033[${bg}m\033[1;$(($f+30))m ${FGNAMES[$f]} "
- done
- echo
- echo -e "\033[0m"
- done
- unset color_prompt force_color_prompt
- #--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--#
- # Xterm|rxvt|urxvt title.
- #--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--#
- case "$TERM" in
- xterm*|rxvt*)
- PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"'
- ;;
- *)
- ;;
- esac
- #--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--#
- # Grep options (color).
- #--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--#
- export GREP_OPTIONS='--color=auto'
- #--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--#
- # Editor de Texto padrão (nano).
- #--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--#
- export EDITOR=nano
- alias editor=nano
- alias vi=nano
- #--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--#
- # 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 ! 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
- #--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--#
- # Alias definitions.
- # Put all your aliases into a separate file called ~/.bash_aliases.
- #--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--#
- if [ -f ~/.bash_aliases ]; then
- . ~/.bash_aliases
- fi
- #--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--#
- # Functions definitions.
- # Put all your additions into a separate file called ~/.bash_functions.
- #--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--#
- if [ -f ~/.bash_functions ]; then
- . ~/.bash_functions
- fi
- #--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--#
- # Standard PS1.
- #--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--#
- if [ -f "$HOME/.bash_ps1" ] && [[ $- == *i* ]]; then
- . "$HOME/.bash_ps1"
- fi
- #--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--#
- # Teclado abnt-2 e Ctrl+Alt+Backspace.
- #--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--#
- setxkbmap -model abnt2 -layout br -variant abnt2
- setxkbmap -option terminate:ctrl_alt_bksp
- #--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--#
- # PATH do usuário.
- #--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--#
- export PATH="$PATH:$HOME/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement