diff options
| author | 2015-04-25 21:11:28 +0200 | |
|---|---|---|
| committer | 2015-04-25 21:11:28 +0200 | |
| commit | 22d711a746804473f1fe40b2cb4f0ee8bfe4b864 (patch) | |
| tree | 63f96447ba0276bffe11a2df599152cd306dfa7c /bash/.bashrc | |
| parent | f1fbba3836726fc842ed84cf69264954919cbfd5 (diff) | |
| download | dotfiles-22d711a746804473f1fe40b2cb4f0ee8bfe4b864.tar.gz dotfiles-22d711a746804473f1fe40b2cb4f0ee8bfe4b864.tar.bz2 dotfiles-22d711a746804473f1fe40b2cb4f0ee8bfe4b864.zip | |
Added checks to bashrc
Diffstat (limited to 'bash/.bashrc')
| -rw-r--r-- | bash/.bashrc | 44 |
1 files changed, 35 insertions, 9 deletions
diff --git a/bash/.bashrc b/bash/.bashrc index d6c2996..21ffeed 100644 --- a/bash/.bashrc +++ b/bash/.bashrc | |||
| @@ -5,8 +5,10 @@ | |||
| 5 | # If not running interactively, don't do anything | 5 | # If not running interactively, don't do anything |
| 6 | [[ $- != *i* ]] && return | 6 | [[ $- != *i* ]] && return |
| 7 | 7 | ||
| 8 | export PS1='[\d][\t]\u on \h\n\w => ' | ||
| 9 | export TERM="xterm-256color" | ||
| 10 | |||
| 8 | alias ls='ls --color=auto' | 11 | alias ls='ls --color=auto' |
| 9 | alias jblive='mpv rtmp://videocdn-us.geocdn.scaleengine.net/jblive/live/jblive.stream 2> /dev/null &' | ||
| 10 | 12 | ||
| 11 | man() { | 13 | man() { |
| 12 | env LESS_TERMCAP_mb=$'\E[01;31m' \ | 14 | env LESS_TERMCAP_mb=$'\E[01;31m' \ |
| @@ -19,6 +21,10 @@ man() { | |||
| 19 | man "$@" | 21 | man "$@" |
| 20 | } | 22 | } |
| 21 | 23 | ||
| 24 | exists() { | ||
| 25 | hash $@ 2> /dev/null | ||
| 26 | } | ||
| 27 | |||
| 22 | vim() { | 28 | vim() { |
| 23 | if [[ -z $@ ]]; then | 29 | if [[ -z $@ ]]; then |
| 24 | /usr/bin/vim | 30 | /usr/bin/vim |
| @@ -30,14 +36,34 @@ vim() { | |||
| 30 | fi | 36 | fi |
| 31 | } | 37 | } |
| 32 | 38 | ||
| 33 | export PS1='[\d][\t]\u on \h\n\w => ' | 39 | if exists mpv; then |
| 34 | export GOPATH="$HOME/programming/go" | 40 | alias jblive='mpv rtmp://videocdn-us.geocdn.scaleengine.net/jblive/live/jblive.stream' |
| 35 | export GEM_HOME="$(ruby -e 'print Gem.user_dir')/bin" | 41 | elif exists vlc; then |
| 36 | export PATH="$PATH:$GEM_HOME:$GOPATH/bin" | 42 | alias jblive='vlc rtmp://videocdn-us.geocdn.scaleengine.net/jblive/live/jblive.stream' |
| 37 | export EDITOR="vim" | 43 | fi |
| 38 | export TERM="xterm-256color" | 44 | |
| 45 | if exists vim; then | ||
| 46 | export EDITOR="vim" | ||
| 47 | fi | ||
| 48 | |||
| 49 | if exists go; then | ||
| 50 | export GOPATH="$HOME/programming/go" | ||
| 51 | export PATH="$PATH:$GOPATH/bin" | ||
| 52 | fi | ||
| 53 | |||
| 54 | if exists gem; then | ||
| 55 | export GEM_HOME="$(ruby -e 'print Gem.user_dir')/bin" | ||
| 56 | export PATH="$PATH:$GEM_HOME" | ||
| 57 | fi | ||
| 58 | |||
| 59 | if exists liquidprompt; then | ||
| 60 | source liquidprompt | ||
| 61 | fi | ||
| 39 | 62 | ||
| 40 | source liquidprompt | 63 | if exists archey3; then |
| 41 | archey3 | 64 | archey3 |
| 65 | elif exists screenfetch; then | ||
| 66 | screenfetch | ||
| 67 | fi | ||
| 42 | 68 | ||
| 43 | # vim: set ts=8 sw=8 tw=0 noet : | 69 | # vim: set ts=8 sw=8 tw=0 noet : |
