Topic: My .bashrc configuration
May be someone there who want to do this in the terminal configuration.
I found it on my friend's account on youtube ![]()
this is the code :
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
#by yur4kh4.net | contact me yur4kh4atgmaildotcom
# Indonesian coder | malang cyber crew | kill -9
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
export HISTCONTROL=ignoredups
# ... and ignore same sucessive entries.
export HISTCONTROL=ignoreboth
# 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 "$(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)
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
;;
*)
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
;;
esac
# Comment in the above and uncomment this below for a color prompt
#PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"'
;;
*)
;;
esac
# 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 color support of ls and also add handy aliases
if [ "$TERM" != "dumb" ]; then
eval "`dircolors -b`"
alias ls='ls --color=auto'
#alias dir='ls --color=auto --format=vertical'
#alias vdir='ls --color=auto --format=long'
fi
# list website
alias yur4kh4=' firefox http://yur4kh4.net/ '
alias reza=' firefox http://tanyarezaervani.wordpress.com/ '
alias hok00age=' firefox http://tahutek.net/ '
alias exploit=' firefox http://exploit-id.com/ '
alias forum=' firefox http://ubuntu-indonesia.com/ '
alias mc-crew=' firefox http://mc-crew.info/ '
function encode() { echo -n $@ | perl -pe's/([^-_.~A-Za-z0-9])/sprintf("%%%02X", ord($1))/seg'; }
function google() { firefox http://www.google.com/search?hl=id#q="`encode $@`" ;}
# Fungsi extract file
extract () {
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xjf $1 ;;
*.tar.gz) tar xzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) rar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xf $1 ;;
*.tbz2) tar xjf $1 ;;
*.tgz) tar xzf $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1 ;;
*) echo "'$1' tidak bisa di extract dengan command extract()" ;;
esac
else
echo "'$1' file tidak terdaftar"
fi
}
# Basic command
alias home='cd ~/'
alias web='cd /var/www'
alias install='sudo apt-get install'
alias debinstall='sudo dpkg -i'
alias update='sudo apt-get update'
alias smartfren='wvdial smart'
alias semua='ls -la'
alias lsl='ls -l'
# tambahkan sesuai kebutuhan
# 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
# Warna tput command
Black="$(tput setaf 0)"
BlackBG="$(tput setab 0)"
DarkGrey="$(tput bold ; tput setaf 0)"
LightGrey="$(tput setaf 7)"
LightGreyBG="$(tput setab 7)"
White="$(tput bold ; tput setaf 7)"
Red="$(tput setaf 1)"
RedBG="$(tput setab 1)"
LightRed="$(tput bold ; tput setaf 1)"
Green="$(tput setaf 2)"
GreenBG="$(tput setab 2)"
LightGreen="$(tput bold ; tput setaf 2)"
Brown="$(tput setaf 3)"
BrownBG="$(tput setab 3)"
Yellow="$(tput bold ; tput setaf 3)"
Blue="$(tput setaf 4)"
BlueBG="$(tput setab 4)"
LightBlue="$(tput bold ; tput setaf 4)"
Purple="$(tput setaf 5)"
PurpleBG="$(tput setab 5)"
Pink="$(tput bold ; tput setaf 5)"
Cyan="$(tput setaf 6)"
CyanBG="$(tput setab 6)"
LightCyan="$(tput bold ; tput setaf 6)"
NC="$(tput sgr0)" # No Color
# Functions
spin ()
{
echo -ne "$White-"
echo -ne "$LightGray\b|"
echo -ne "$LightGreen\bo"
sleep .02
echo -ne "$LightBlue\b-$RC"
}
teks1 ()
{
sleep .02
echo -ne "$White W"
sleep .02
echo -ne e
sleep .02
echo -ne l
sleep .02
echo -ne c
sleep .02
echo -ne o
sleep .02
echo -ne m
sleep .02
echo -ne e
sleep .02
echo -ne " "
sleep .02
echo -ne t
sleep .02
echo -ne o
sleep .02
echo -ne " "
sleep .02
echo -ne "$HOSTNAME $NC"
sleep .02
}
teks2 ()
{
sleep .02
echo -ne "$LightGreen L"
sleep .02
echo -ne i
sleep .02
echo -ne n
sleep .02
echo -ne u
sleep .02
echo -ne x
sleep .02
echo -ne " "
sleep .02
echo -ne U
sleep .02
echo -ne n
sleep .02
echo -ne t
sleep .02
echo -ne u
sleep .02
echo -ne k
sleep .02
echo -ne " "
echo -ne R
sleep .02
echo -ne a
sleep .02
echo -ne k
sleep .02
echo -ne y
sleep .02
echo -ne a
sleep .02
echo -ne t
sleep .02
echo -ne !
sleep .02
echo -ne "! "
sleep .02
}
yur4 ()
{
sleep .5
echo -ne "$LightGreen ."
sleep .5
echo -ne .
sleep .5
echo -ne .
echo -ne .
sleep .5
echo -ne .
sleep .8
echo -ne "$LightBlue done"
}
INTERFACE=eth0
# Welcome screen
clear;
echo -e "";
for i in `seq 1 20` ; do spin; done; teks1; for i in `seq 1 23` ; do spin; done ;echo "";
echo "";
echo -ne "$LightBlue Selamat Datang $White$USER $LightBlue!";
echo ""; sleep .3;
echo "";
echo -ne "$LightBlue Hari & tanggal: $White `date "+%b %d, %Y"`";
echo ""; sleep .3;
echo "";
echo -ne "$Red Please Wait"; yur4;
echo ""; sleep .3;
echo "";
echo -ne "$LightBlue Distro: $White `cat /etc/issue`";
echo "";
echo -ne "$LightBlue Kernel: $White `uname -smr`";
echo "";
echo -ne "$LightBlue IP: $White `/sbin/ip addr show $INTERFACE | grep 'inet ' | cut -d t -f2 | cut -d / -f1 | cut -b 2-`";
echo "";
echo -ne "$LightBlue Uptime: $White `uptime | awk {'print $3" "$4" "$5'} | sed 's/:/ hours, /' | sed -r 's/,$/ minutes/'`";
echo ""; sleep .3;
echo "";
for i in `seq 1 20` ; do spin; done; teks2; for i in `seq 1 25` ; do spin; done ;echo "";
echo "" $NC;
# Simple bash
PS1="\[\e[01;37m\]┌─[\t]──[\[\e[01;37m\u\e[01;37m\]]──[\[\e[00;37m\]${HOSTNAME%%.*}\[\e[01;37m\]]:\w$\[\e[01;37m\]\n\[\e[01;37m\]└──\[\e[01;37m\](\[\e[32;1m\]\$(/bin/ls -1 | /usr/bin/wc -l | /bin/sed 's: ::g') files, \$(/bin/ls -lah | /bin/grep -m 1 total | /bin/sed 's/total //')b\[\e[01;37m\])>>\[\e[0m\]"and this is the video : http://www.youtube.com/watch?v=8h8WkimNm0M
sorry if wrong place ![]()