diff options
author | Dan McGee <dpmcgee@gmail.com> | 2011-04-20 14:14:04 -0500 |
---|---|---|
committer | Dan McGee <dpmcgee@gmail.com> | 2011-04-20 14:14:04 -0500 |
commit | b29163ecb75a672d55900f931165a241e5d5a645 (patch) | |
tree | 01d05e9e75fd17cbb5db7b55d676382108723e7e | |
parent | 75f17a6534670dfb04b223045549b61d480955dc (diff) | |
download | configfiles-b29163ecb75a672d55900f931165a241e5d5a645.tar.gz configfiles-b29163ecb75a672d55900f931165a241e5d5a645.zip |
Update old config files to reflect current ones
Signed-off-by: Dan McGee <dpmcgee@gmail.com>
-rw-r--r-- | bashrc | 53 | ||||
-rw-r--r-- | htoprc | 12 |
2 files changed, 45 insertions, 20 deletions
@@ -4,10 +4,13 @@ # # Set environment variables export EDITOR='vim' +export LESS='R' export CVS_RSH='ssh' -if [ -x /opt/mozilla/bin/firefox ]; then - export BROWSER='/opt/mozilla/bin/firefox' -else +export GPG_TTY=$(tty) +# Set a browser +if [ -x /usr/bin/firefox -a "x$DISPLAY" != "x" ]; then + export BROWSER='/usr/bin/firefox' +elif [ -x /usr/bin/links ]; then export BROWSER='/usr/bin/links' fi @@ -18,32 +21,49 @@ shopt -s nocaseglob shopt -s cdspell #no duplicates in history export HISTCONTROL=erasedups:ignorespace -export HISTSIZE=1000 +export HISTSIZE=5000 # Enable bash completion in interactive shells -if [ -f /etc/bash_completion ]; then - source /etc/bash_completion +if [ -z "$BASH_COMPLETION" -a -f /etc/bash_completion ]; then + . /etc/bash_completion fi -# Custom Prompt -function bash_prompt { - local BLUE="\[\e[1;34m\]" +# Custom Prompt Setup +bash_prompt() { local RED="\[\e[1;31m\]" local GREEN="\[\e[0;32m\]" + local YELLOW="\[\e[0;33m\]" + local BLUE="\[\e[1;34m\]" + local PURPLE="\[\e[0;35m\]" + local CYAN="\[\e[1;36m\]" local NONE="\[\e[0;0m\]" - if [ $TERM != "linux" ]; then - local TITLEBAR="\[\e]0;\w\a\]"; + if [ "$TERM" != "linux" ]; then + local TITLEBAR="\[\e]0;\w\a\]" + else + local TITLEBAR="" + fi + + # use a different color for the host if we are SSH'ed + if [ "x$SSH_TTY" != "x" ]; then + local ATHOST="$NONE@$CYAN" + else + local ATHOST="$NONE@$BLUE" + fi + + # if git is installed and git bash completion exists, show current branch + if [ -n "$(type -p git)" -a "$(type -t __git_ps1)" = "function" ]; then + local GITPS1="$PURPLE"'$(__git_ps1)' else - local TITLEBAR=""; + local GITPS1='' fi - export PS1="$TITLEBAR\n$RED\u$NONE@$BLUE\h $GREEN\w$NONE\n\$ " + export PS1="$TITLEBAR\n$RED\u$ATHOST\h $GREEN\w$GITPS1$NONE\n\$ " } bash_prompt; unset -f bash_prompt +# pacman aliases- don't bother defining if pacman doesn't exist if [ -x /usr/bin/pacman ]; then - # pacman aliases alias pac='pacman' alias pacQ='pacman -Q' alias pacQs='pacman -Qs' @@ -51,6 +71,7 @@ if [ -x /usr/bin/pacman ]; then alias pacQm='pacman -Qm' alias pacS='sudo pacman -S' alias pacSy='sudo pacman -Sy' + alias pacSu='sudo pacman -Su' alias pacSyu='sudo pacman -Syu' alias pacSs='/usr/bin/pacsearch' alias pacSi='pacman -Si' @@ -61,7 +82,7 @@ if [ -x /usr/bin/pacman ]; then alias pacO='sudo pacman-optimize' # helpful makepkg shortcuts - alias makepkgclean='rm -r src/ pkg/ *~' + alias makepkgclean='rm -rf src/ pkg/ *~' fi # sanitize - set file/directory owner and permissions to normal values (644/755) @@ -95,6 +116,8 @@ alias r='reset' alias pdw='pwd' alias mroe='more' alias csv='cvs' +alias snv='svn' +alias gti='git' # source the local config [ -f ~/.bashrclocal ] && source ~/.bashrclocal @@ -5,17 +5,19 @@ fields=0 48 17 18 38 39 40 2 46 47 49 1 sort_key=46 sort_direction=1 hide_threads=0 -hide_kernel_threads=1 +hide_kernel_threads=0 hide_userland_threads=0 shadow_other_users=0 -highlight_base_name=1 -highlight_megabytes=1 +show_thread_names=0 +highlight_base_name=0 +highlight_megabytes=0 +highlight_threads=0 tree_view=0 header_margin=1 -expand_system_time=1 +detailed_cpu_time=1 color_scheme=0 delay=15 left_meters=AllCPUs Memory Swap left_meter_modes=1 1 1 right_meters=Tasks LoadAverage Uptime -right_meter_modes=2 2 2
\ No newline at end of file +right_meter_modes=2 2 2 |