From 733e3a2d6ee71d6e1eb23a4a6fb6efaa87cba1d3 Mon Sep 17 00:00:00 2001 From: paul-loedige Date: Mon, 7 Dec 2020 19:38:38 +0100 Subject: [PATCH] modified bashrc --- .gitignore | 3 +- bash/.bashrc | 88 ++++++++++++++++++++++++++++++++++++++++++-- git/.git-credentials | 1 + 3 files changed, 88 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index fe06ad5..eeb2512 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .vscode -*__pycache__ \ No newline at end of file +*__pycache__ +.vim/plugged/* \ No newline at end of file diff --git a/bash/.bashrc b/bash/.bashrc index a0fa985..938a95b 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -8,21 +8,72 @@ alias ls='ls --color=auto' PS1='[\u@\h \W]\$ ' +### ALIAS' ### +#jokes alias dog='cat' +alias rr='curl -s -L https://raw.githubusercontent.com/keroserene/rickrollrc/master/roll.sh | bash' #rickroll + +# navigation alias ..='cd ..' +alias ...='cd ../..' +alias .3='cd ../../..' +alias .4='cd ../../../..' +alias .5='cd ../../../../..' + +#libreoffice alias writer='libreoffice --writer' +alias calc='libreoffice --calc' +alias impress='libreoffice --impress' -#neofetch +# pacman and pikaur +alias update='sudo pacman -Syyu' # update only standard pkgs +alias update-all="pikaur -Syu" # update standard pkgs and AUR pkgs +alias cleanup='sudo pacman -Rns $(pacman -Qtdq)' # remove orphaned packages + +# Changing "ls" to "exa" +alias ls='exa -l --color=always --group-directories-first' # my preferred listing +alias la='exa -a --color=always --group-directories-first' # all files and dirs +alias ll='exa -al --color=always --group-directories-first' # long format +alias lt='exa -aT --color=always --group-directories-first' # tree listing +alias l.='exa -a | egrep "^\."' + +# Colorize grep output (good for log files) +alias grep='grep --color=auto' +alias egrep='egrep --color=auto' +alias fgrep='fgrep --color=auto' + +# confirm before overwriting something +alias cp="cp -i" +alias mv='mv -i' +alias rm='rm -i' + +# git +alias add='git add' +alias addup='git add -u' +alias addall='git add .' +alias branch='git branch' +alias checkout='git checkout' +alias clone='git clone' +alias commit='git commit -m' +alias fetch='git fetch' +alias pull='git pull origin' +alias push='git push origin' +alias status='git status' + + +### AUTOSTART ### +# >>> neofetch >>> neofetch +# <<< neofetch <<< -#powerline +# >>> powerline >>> function _update_ps1() { PS1=$(powerline-shell $?) } if [[ $TERM != linux && ! $PROMPT_COMMAND =~ _update_ps1 ]]; then PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND" fi - +# <<< powerline <<< # >>> conda initialize >>> # !! Contents within this block are managed by 'conda init' !! @@ -39,3 +90,34 @@ fi unset __conda_setup # <<< conda initialize <<< + +### FUNCTIONS ### +# >>> Archive extraction >>> +# usage: ex +ex () +{ + if [ -f $1 ] ; then + case $1 in + *.tar.bz2) tar xjf $1 ;; + *.tar.gz) tar xzf $1 ;; + *.bz2) bunzip2 $1 ;; + *.rar) unrar x $1 ;; + *.gz) gunzip $1 ;; + *.tar) tar xf $1 ;; + *.tbz2) tar xjf $1 ;; + *.tgz) tar xzf $1 ;; + *.zip) unzip $1 ;; + *.Z) uncompress $1;; + *.7z) 7z x $1 ;; + *.deb) ar x $1 ;; + *.tar.xz) tar xf $1 ;; + *.tar.zst) unzstd $1 ;; + *) echo "'$1' cannot be extracted via ex()" ;; + esac + else + echo "'$1' is not a valid file" + fi +} +# <<< Archive extraction <<< + + diff --git a/git/.git-credentials b/git/.git-credentials index a4a2a4f..d4e18dd 100644 --- a/git/.git-credentials +++ b/git/.git-credentials @@ -1,2 +1,3 @@ https://paul-loedige:VhD%40R46%2ai9k%24tumJgD3T@git.ploedige.com +https://paul-loedige:5SC%24%5e%5eonvuD5Ze@git.owl-racing-team.de https://paul-loedige:yP4vs9rTriqP4b8mK4ohyNHSH@its-gitlab.init.hs-owl.de