Inital Commit

This commit is contained in:
Leon Grünewald 2020-02-18 22:26:59 +01:00
commit d27eaf28e6
9 changed files with 162 additions and 0 deletions

1
install/.vimrc Normal file
View file

@ -0,0 +1 @@
source ~/.devconf/vimcfg.vim

10
install/.zshrc Normal file
View file

@ -0,0 +1,10 @@
# Use Oh My Zsh
export ZSH="/home/dhalucario/.oh-my-zsh"
source $ZSH/oh-my-zsh.sh
# Use zplug
source ~/.zplug/init.zsh
# Use custom config
source /home/dhalucario/.devconf/zshcfg/init.zsh

43
vimcfg.vim Normal file
View file

@ -0,0 +1,43 @@
" Specify a directory for plugins
" - For Neovim: stdpath('data') . '/plugged'
" - Avoid using standard Vim directory names like 'plugin'
call plug#begin('~/.vim/plugged')
"" Syntax Linting/Checking
" Ale: Runs fast and works well.
Plug 'dense-analysis/ale'
"" GUI
" NERDTree: Sidebar file tree
Plug 'scrooloose/nerdtree'
Plug 'Xuyuanp/nerdtree-git-plugin'
" Airline: Some file infos
Plug 'vim-airline/vim-airline'
"" Indexing
" Fuzzy Finder: Quickly find files by name without navigating
" Plug 'junegunn/fzf'
Plug 'kien/ctrlp.vim'
"" Input optimization
" Vim Surround: Quickly surround stuff
Plug 'tpope/vim-surround'
" Initialize plugin system
call plug#end()
"" NERDTree config
" Autostart NERDTree on start
autocmd vimenter * NERDTree
" Close vim if the only window left open is a NERDTree
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
" ALE config
" Enable autocomplete
let g:ale_completion_enabled = 1
set completeopt=menu,menuone,preview,noselect,noinsert

68
zshcfg/alias.zsh Normal file
View file

@ -0,0 +1,68 @@
#########################################
# Aliases #
#########################################
#alias sudo="sudo "
alias ws="cd ~/workspace"
alias open="xdg-open"
alias dc-up="docker-compose up"
alias dc-upd="docker-compose up -d"
alias dc-down="docker-compose down"
alias dss-s="docker-sync-stack start"
# Mirons docker init script
alias docker-init="bash <(curl -s https://raw.githubusercontent.com/micron/docker-setup/master/init.sh)"
# Quick install script for projects
alias krinstall="echo '###=== NodeJS ===###' && npm install && echo '###=== Bower ===###' && bower install && echo '###=== Composer ===###' && composer install && echo '###=== Finished ===###'"
# Quickly ZIP and Delete on enter press
alias quickzip='ALEXAFILE="${PWD##*/}_$(cat /dev/urandom | env LC_CTYPE=C tr -cd 'a-f0-9' | head -c 32).zip"; zip ${ALEXAFILE} -r * && echo "Press enter to delete file." && read && rm ${ALEXAFILE}'
# Laradock Lo
alias laraws="docker-compose exec workspace bash"
alias laramysql="docker-compose exec mysql bash"
alias laramaria="docker-compose exec mariadb bash"
# alias copydl='file=$(ls -tp ~/Downloads | grep -v /$ | head -1);echo "Copy: ~/Downloads/$file -> $(pwd)/$file"; cp ~/Downloads/$file ./'
copydl() {
if [ $# -eq 1 ]
then
dlFileCount=1
elif [ $# -eq 2 ]
then
dlFileCount=$1
fi
lastdlFiles=$(ls -tp ~/Downloads | grep -v /$ | head -$dlFileCount)
if [ $# -eq 1 ]
then
while read line; do
cp "$HOME/Downloads/$line" "$1"
done <<< "$lastdlFiles"
elif [ $# -eq 2 ]
then
while read line; do
cp "$HOME/Downloads/$line" "$2"
done <<< "$lastdlFiles"
fi
}
ytplaylist(){
youtube-dl --get-id "$1" | awk '{print "https://www.youtube.com/watch?v=" $0;}' | vlc -
}
alias dl-wpcli="wget https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar"
alias dl-wp="curl https://wordpress.org/latest.tar.gz | tar -xzv"
alias gitroot='cd $(git rev-parse --show-toplevel)'
alias dc-clearmysql='find $(git rev-parse --show-toplevel)/docker/lib/mysql -mindepth 1 -maxdepth 1 -not -name '.gitkeep' -exec rm -rf "{}" \;'
alias gpgcb="xsel --clipboard | sed 's/^ *//g' | gpg2 -d"

10
zshcfg/env.zsh Normal file
View file

@ -0,0 +1,10 @@
# Don't check for new mail
export MAILCHECK=1
export GOPATH=$HOME/workspace/gospace
export FONTCONFIG_PATH=/etc/fonts
export UID=$(id -u)
export GID=$(id -g)
export PATH=$PATH:~/.local/bin:~/bin

14
zshcfg/init.zsh Normal file
View file

@ -0,0 +1,14 @@
source ~/.devconf/zshcfg/packages.zsh
source ~/.devconf/zshcfg/p9k.zsh
source ~/.devconf/zshcfg/env.zsh
source ~/.devconf/zshcfg/alias.zsh
source ~/.devconf/zshcfg/motd.zsh
if ! zplug check --verbose; then
printf "Install? [y/N]: "
if read -q; then
echo; zplug install
fi
fi
zplug load --verbose

1
zshcfg/motd.zsh Normal file
View file

@ -0,0 +1 @@
neofetch

13
zshcfg/p9k.zsh Normal file
View file

@ -0,0 +1,13 @@
POWERLEVEL9K_MODE='awesome-fontconfig'
POWERLEVEL9K_CUSTOM_BRANDICON="printf '\xF0\x9F\x90\xBE'"
POWERLEVEL9K_CUSTOM_BRANDICON_BACKGROUND="blue"
POWERLEVEL9K_CUSTOM_BRANDICON_FOREGROUND="black"
POWERLEVEL9K_TIME_FOREGROUND="black"
POWERLEVEL9K_TIME_BACKGROUND="cyan"
POWERLEVEL9K_OS_ICON_FOREGROUND="white"
POWERLEVEL9K_OS_ICON_BACKGROUND="black"
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(os_icon time dir vcs newline user custom_brandicon)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status root_indicator background_jobs)

2
zshcfg/packages.zsh Normal file
View file

@ -0,0 +1,2 @@
zplug "romkatv/powerlevel10k", use:powerlevel10k.zsh-theme
zplug "rupa/z", use:z.sh