diff options
author | xengineering <me@xengineering.eu> | 2022-04-26 21:44:19 +0200 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2022-04-26 21:44:19 +0200 |
commit | d3d2a42058a1be13f35a7c4aad0b832fcff38cf0 (patch) | |
tree | 74bfcdf1ba474373cf44c1fad67af5bfdf42ef14 | |
parent | 24d46e98c62f6e3d232887a1f4770fe6677ca889 (diff) | |
download | dotfiles-d3d2a42058a1be13f35a7c4aad0b832fcff38cf0.tar dotfiles-d3d2a42058a1be13f35a7c4aad0b832fcff38cf0.tar.zst dotfiles-d3d2a42058a1be13f35a7c4aad0b832fcff38cf0.zip |
Clean up .bashrc
-rw-r--r-- | .bashrc | 28 |
1 files changed, 12 insertions, 16 deletions
@@ -1,41 +1,35 @@ -# -# ~/.bashrc -# - -# vim: shiftwidth=4 tabstop=4 expandtab +# vim: shiftwidth=4 tabstop=4 noexpandtab # If not running interactively, don't do anything [[ $- != *i* ]] && return + +# variables +GOPATH=$HOME/go +export EDITOR=vim + + +# alias definitions alias ls='ls --color=auto' alias ll='ls -alF' alias la='ls -A' alias l='ls -CF' +alias ip='ip --color=auto' alias dotfiles='/usr/bin/git --git-dir=$HOME/dotfiles.git/ --work-tree=$HOME' -alias scripts='/usr/bin/git --git-dir=$HOME/scripts.git/ --work-tree=$HOME/bin/' -alias commit='git commit' alias gitstat='git status' -alias ip='ip --color=auto' -function my_xdg_open() { nohup xdg-open "$1" > /dev/null 2>&1 & } -alias open=my_xdg_open -alias jupy='jupyter notebook' -alias mygpg='gpg --list-secret-keys --fingerprint --fingerprint' +alias igit='git log --all --oneline --decorate --graph' alias horizons='telnet horizons.jpl.nasa.gov 6775' # a NASA server providing data about planet positions and velocities -alias today='date +"%Y-%m-%d"' alias wlrecord='wf-recorder -a -g "$(slurp)"' -alias igit='git log --all --oneline --decorate --graph' alias ranger='ranger --choosedir=$HOME/.local/share/ranger/lastdir && cd "$(cat $HOME/.local/share/ranger/lastdir)"' alias music="cd ~/Musik && ranger || echo '~/Musik does not exist'" -GOPATH=$HOME/go # extend PATH with my personal and public scripts (location based on XDG) # https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html PATH=$PATH:~/.local/bin/personal PATH=$PATH:~/.local/bin/public -export EDITOR=vim parse_git_branch() { git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' @@ -57,6 +51,8 @@ rand_util() { pacman -Ql coreutils | grep bin | awk '{print $2}' | sed '/^.*\/$/d' | shuf -n 1 - | xargs man } + +# set prompt PS1='[\e[31m$(get_nonzero_retcode)\e[0m\e[32;1m$(date +"%H:%M:%S")\e[0m \e[35;1m\u@\h\e[0m\e[33;1m$(parse_git_branch)\e[0m \e[36;1m\W\e[0m] $ ' |