今天更新了一下.bashrc

$ cat ~/.bashrc
#
# ~/.bashrc
#

# If not running interactively, don't do anything
[[ $- != *i* ]] && return
function online(){
    echo "online..."
    read -p "what are you doing?" where
    case "$where" in
    1)
        echo "now conacting to xxx"
        sudo netctl xxx;;
    2)
        echo "now conacting to xxx"
        sudo netcfg xxx;;
    *)
        echo "Invalid option, choose again...";;
    esac

    echo "online [Done]"
}
function mkcd(){
    dir="$1"
    mkdir -p "$dir" && cd "$dir"
}
alias online=online
alias pcu='sudo pacman -Syu'
alias ls='ls --color=auto'
alias diff='colordiff' # requires colordiff package
alias grep='grep --color=auto'
alias dmidecode='sudo dmidecode'
alias df='pydf -h'
alias ll='ls -l'
alias la='ll -A'
alias ..="cd .."
alias du='du -c -h'
alias mkdir='mkdir -p -v'
alias ping='ping -c 5'
alias ..='cd ..'
alias devtemp='sudo hddtemp /dev/sda /dev/sdb'
alias go='startx'
alias mkSystemd-analyzePng='sudo systemd-analyze plot > /tmp/plot.svg && rsvg-convert -o /tmp/plot.png /tmp/plot.svg && rm /tmp/plot.svg'
alias sambaStart='sudo systemctl start smbd.service nmbd.service'
alias libvirtdStart='sudo systemctl start libvirtd.service'
alias conkyStart='sh /home/codewalker/conky/conkyStart.sh'
alias todolist='/home/codewalker/conky/todolist'
alias goagentStart='sudo systemctl start goagent.service'
alias sc='scrot -s /tmp/1.png'
alias pdf='zathura&'
alias aria2c='aria2c -c -s 5 '
alias remote_kvm='rdesktop 192.168.122.203 -u codewalker -p codewalker -g 1280x768 -D -clipboard -r sound:local -r disk:cdrom=/dev/shm -r lspci'
#PS1='[u@h W]$ '
PS1="[e[36;1m]u[e[0m]@[e[33;1m]h[e[0m]:[e[31;1m]w[e[0m]n$ "
export EDITOR="vim"
extract() {
    local c e i

    (($#)) || return

    for i; do
        c=''
        e=1

        if [[ ! -r $i ]]; then
            echo "$0: file is unreadable: `$i'" >&2
            continue
        fi

        case $i in
        *.tar.bz2)   tar xvjf $1     ;;
        *.tar.gz)    tar xvzf $1     ;;
        *.rar)       unrar x $1      ;;
        *.tar)       tar xvf $1      ;;
        *.tbz2)      tar xvjf $1     ;;
        *.tgz)       tar xvzf $1     ;;
        *.zip)       unzip $1        ;;
            *.7z)  c='7z x';;
        *.Z)   c='uncompress';;
        *.bz2) c='bunzip2';;
        *.exe) c='cabextract';;
        *.gz)  c='gunzip';;
        *.rar) c='unrar x';;
        *.xz)  c='unxz';;
        *.zip) c='unzip';;
        *)     echo "$0: unrecognized file extension: `$i'" >&2
        *)     echo "$0: unrecognized file extension: `$i'" >&2
               continue;;
        esac
    done

    return $e
}

export LC_ALL=en_US.UTF-8
export LC_CTYPE=zh_CN
export LANG=en_US.UTF-8
#export GTK_IM_MODULE=ibus
#export XMODIFIERS=@im=ibus
#export QT_IM_MODULE=ibus
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"
export XIM=fcitx

发表评论

电子邮件地址不会被公开。 必填项已用*标注