Merge branch 'master' of git.nold.in:nold/homedir-config

This commit is contained in:
nold 2020-03-13 18:05:03 +01:00
commit 6c4865092c
3 changed files with 23 additions and 17 deletions

23
bashrc
View file

@ -15,13 +15,13 @@ else
USER=$(whoami) USER=$(whoami)
fi fi
PS1='\[\033[0;32m\]${USER}@\h\[\033[0m\] [\[\033[0;33m\]\w\[\]\[\033[0;32m\]]'$PROMPT_SUFFIX PS1='\[\033[0;32m\]${USER}@\h\[\033[0m\] [\[\033[0;33m\]\w\[\]\[\033[0;32m\]]\n'$PROMPT_SUFFIX
export PATH=$PATH:~/bin:~/local/bin export PATH=$PATH:~/bin:~/local/bin
function tmux_title { function tmux_title {
printf '\033]2;%s\033\\' $@ printf '\033]2;%s\033\\' $@
} }
tmux_title $(hostname -s) #tmux_title $(hostname -s)
# Git prompt # Git prompt
GIT_PROMPT_ONLY_IN_REPO=1 GIT_PROMPT_ONLY_IN_REPO=1
@ -44,8 +44,20 @@ export LESS='-R'
export TERM=xterm-256color export TERM=xterm-256color
export MC_SKIN=$HOME/.mc/lib/solarized.ini export MC_SKIN=$HOME/.mc/lib/solarized.ini
if [ -e ~/.local/bin/virtualenvwrapper.sh ] ; then
# Python stuff
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
source ~/.local/bin/virtualenvwrapper.sh
export WORKON_HOME=/home/nold/.virtualenvs
export PIP_VIRTUALENV_BASE=/home/nold/.virtualenvs
fi
# Aliases # Aliases
alias ls="ls --color=always --time-style=long-iso -F" alias ls="ls --color=always --time-style=long-iso -F"
alias dfh="df -hT -t ext4 -t zfs"
alias lsof='lsof 2>/dev/null | grep'
# Git
alias gs="git status" alias gs="git status"
alias gc="git commit -m" alias gc="git commit -m"
alias gco="git checkout" alias gco="git checkout"
@ -54,6 +66,7 @@ alias ga="git add"
alias gpush="git push" alias gpush="git push"
alias gpull="git pull" alias gpull="git pull"
# Docker-Compose
alias dcu="docker-compose up -d --remove-orphans" alias dcu="docker-compose up -d --remove-orphans"
alias dcd="docker-compose down" alias dcd="docker-compose down"
alias dcp="docker-compose pull" alias dcp="docker-compose pull"
@ -67,7 +80,5 @@ alias kga="kubectl get all --all-namespaces -o wide"
alias kgn="kubectl get nodes -o wide" alias kgn="kubectl get nodes -o wide"
alias kgp="kubectl get pods -o wide" alias kgp="kubectl get pods -o wide"
alias dfh="df -hT -t ext4 -t zfs" type kubectl &>/dev/null && source <(kubectl completion bash)
alias lsof='lsof 2>/dev/null | grep' type helm &>/dev/null && source <(helm completion bash)
#source <(kubectl completion bash)
#source <(helm completion bash)

View file

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
LINK_FILES=(bashrc vimrc tmux.conf gitconfig dircolors) LINK_FILES=(vimrc tmux.conf gitconfig dircolors)
mkdir ~/.home-git-back 2>/dev/null mkdir ~/.home-git-back 2>/dev/null
for file in ${LINK_FILES[@]}; do for file in ${LINK_FILES[@]}; do
if [ ! -L ~/.${file} ] ; then if [ ! -L ~/.${file} ] ; then
@ -12,7 +12,9 @@ done
[ ! -d ~/.bash-git-prompt ] && git clone https://github.com/nold360/bash-git-prompt.git ~/.bash-git-prompt [ ! -d ~/.bash-git-prompt ] && git clone https://github.com/nold360/bash-git-prompt.git ~/.bash-git-prompt
mkdir ~/.vim 2>/dev/null mkdir -p ~/.vim/bundle 2>/dev/null
[ ! -d ~/.vim/bundle/Vundle.vim ] && git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim [ ! -d ~/.vim/bundle/Vundle.vim ] && git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
vim -c ":PluginInstall" -c ":q" -c ":q" vim -c ":PluginInstall" -c ":q" -c ":q"
grep -q "source $(pwd)/bashrc" ~/.bashrc || echo "source $(pwd)/bashrc" >> ~/.bashrc

11
vimrc
View file

@ -1,11 +1,3 @@
"Installation:
" $ mkdir -p ~/.vim/bundle
" $ git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
" Insert the contant of this file into ~/.vimrc
" $ vim
" Type: :PluginInstall <ENTER>
" Restart vim & be happy :)
set nocompatible " be iMproved, required set nocompatible " be iMproved, required
filetype off " required filetype off " required
set rtp+=~/.vim/bundle/Vundle.vim set rtp+=~/.vim/bundle/Vundle.vim
@ -29,7 +21,7 @@ filetype plugin indent on " required
syntax enable syntax enable
set background=dark set background=dark
"" Default Tab Setup "" Default Tab Setup
set tabstop=4 set tabstop=2
set softtabstop=0 set softtabstop=0
set shiftwidth=4 set shiftwidth=4
set expandtab set expandtab
@ -96,6 +88,7 @@ let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1 let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1 let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0 let g:syntastic_check_on_wq = 0
let g:syntastic_mode_map = { 'passive_filetypes': ['cpp', 'c'] }
" ------------------------------------ NERDTree ------------------------------------------- " ------------------------------------ NERDTree -------------------------------------------
"" NERDTree Setup "" NERDTree Setup