From d0f5528ec11c9957dd9b62688771eb62acb0c47f Mon Sep 17 00:00:00 2001 From: jakobst1n Date: Sun, 17 Jan 2021 15:55:40 +0100 Subject: Do things with zsh and tmux --- Common/vim/plugged/arm-syntax-vim | 1 + Common/vim/plugged/ctrlp.vim | 2 +- Common/vim/plugged/nerdTree | 2 +- Common/vim/plugged/vim-airline | 2 +- Common/vim/plugged/vim-airline-themes | 2 +- Common/vim/plugged/vim-fugitive | 2 +- Common/vim/vim | 2 +- Common/vimrc | 3 ++ Common/zshrc | 81 +++++++++++++++++++++++++++++++++++ 9 files changed, 91 insertions(+), 6 deletions(-) create mode 160000 Common/vim/plugged/arm-syntax-vim create mode 100644 Common/zshrc (limited to 'Common') diff --git a/Common/vim/plugged/arm-syntax-vim b/Common/vim/plugged/arm-syntax-vim new file mode 160000 index 0000000..caf5355 --- /dev/null +++ b/Common/vim/plugged/arm-syntax-vim @@ -0,0 +1 @@ +Subproject commit caf53551a063a6b7d56ce8bc873bb75c066c6b32 diff --git a/Common/vim/plugged/ctrlp.vim b/Common/vim/plugged/ctrlp.vim index 44c8e24..971c4d4 160000 --- a/Common/vim/plugged/ctrlp.vim +++ b/Common/vim/plugged/ctrlp.vim @@ -1 +1 @@ -Subproject commit 44c8e24956d7dcfee3ee6083a0573fed31d136ed +Subproject commit 971c4d41880b72dbbf1620b3ad91418a6a6f6b9c diff --git a/Common/vim/plugged/nerdTree b/Common/vim/plugged/nerdTree index 82b1649..aaa946f 160000 --- a/Common/vim/plugged/nerdTree +++ b/Common/vim/plugged/nerdTree @@ -1 +1 @@ -Subproject commit 82b1649f2e1c79ff17730fe0a3750bbec203dd29 +Subproject commit aaa946fb6bd79b9af86fbaf4b6b63fd81d839bd9 diff --git a/Common/vim/plugged/vim-airline b/Common/vim/plugged/vim-airline index ce932f3..c7a633c 160000 --- a/Common/vim/plugged/vim-airline +++ b/Common/vim/plugged/vim-airline @@ -1 +1 @@ -Subproject commit ce932f3825f59258f814d4b66174283875348a95 +Subproject commit c7a633ce8f4547e680377efe8ea70493fcce1349 diff --git a/Common/vim/plugged/vim-airline-themes b/Common/vim/plugged/vim-airline-themes index f4ba787..8f1aa2c 160000 --- a/Common/vim/plugged/vim-airline-themes +++ b/Common/vim/plugged/vim-airline-themes @@ -1 +1 @@ -Subproject commit f4ba787e9c5455a6a88c6d04e61b189826375763 +Subproject commit 8f1aa2c7fa44bf33b1fd4678f9c7b40c126b0e2b diff --git a/Common/vim/plugged/vim-fugitive b/Common/vim/plugged/vim-fugitive index 67efbf6..bebe504 160000 --- a/Common/vim/plugged/vim-fugitive +++ b/Common/vim/plugged/vim-fugitive @@ -1 +1 @@ -Subproject commit 67efbf66e0fcfd25e617d22892a7e9768bfd0f92 +Subproject commit bebe504e38d0a20c30d6dd666c4c793b3cc66104 diff --git a/Common/vim/vim b/Common/vim/vim index f81b69e..1353f12 120000 --- a/Common/vim/vim +++ b/Common/vim/vim @@ -1 +1 @@ -/Users/jakobstendahl/_code/Personal projects/dotfiles/Common/vim \ No newline at end of file +/home/jakob/_code/dotfiles/Common/vim \ No newline at end of file diff --git a/Common/vimrc b/Common/vimrc index 274370a..4769511 100644 --- a/Common/vimrc +++ b/Common/vimrc @@ -258,6 +258,9 @@ endtry " Return to last edit position when opening files (You want this!) au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif +" Make mouse work nice with tmux +set mouse=a + """""""""""""""""""""""""""""" " => Status line diff --git a/Common/zshrc b/Common/zshrc new file mode 100644 index 0000000..7f8b902 --- /dev/null +++ b/Common/zshrc @@ -0,0 +1,81 @@ +# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. +# Initialization code that may require console input (password prompts, [y/n] +# confirmations, etc.) must go above this block; everything else may go below. +if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then + source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" +fi + +# If you come from bash you might have to change your $PATH. +# export PATH=$HOME/bin:/usr/local/bin:$PATH + +# Check if env setup file exists +if [ ! -f ~/.zsh_env_setup ]; then + echo "export ZSH=$HOME/.oh-my-zsh" > ~/.zsh_env_setup + echo "DEFAULT_USER=$USER" >> ~/.zsh_env_setup +fi + +# Source env setup file +source ~/.zsh_env_setup + +# Source powerlevel10k theme +case "$OSTYPE" in + darwin*) + source /usr/local/opt/powerlevel10k/powerlevel10k.zsh-theme;; + linux*) + ZSH_THEME="powerlevel10k/powerlevel10k";; +esac + +COMPLETION_WAITING_DOTS="true" + +# Setup plugins +plugins=( + git + zsh-autosuggestions + zsh-syntax-highlighting +) + +# Setup oh-my-zsh +source $ZSH/oh-my-zsh.sh + +# Modify locale and path +export LC_ALL=en_US.UTF-8 +export LANG=en_US.UTF-8 + +# Add aliases +alias lsp="ps -ax | grep" +alias lsa="ls -la" +alias lsg="ls | grep" +alias lsag="ls -la | grep" +alias ls="tput setaf 3 && echo \"'lsa' for 'ls -la', \n'lsg' for 'ls | grep',\n'lsag' for 'ls -la | grep',\n'lsp' for 'ps -ax |grep'\" && tput sgr0 && ls" + +# man pages in colors +man() { + LESS_TERMCAP_md=$'\e[01;31m' \ + LESS_TERMCAP_me=$'\e[0m' \ + LESS_TERMCAP_se=$'\e[0m' \ + LESS_TERMCAP_so=$'\e[01;44;33m' \ + LESS_TERMCAP_ue=$'\e[0m' \ + LESS_TERMCAP_us=$'\e[01;32m' \ + command man "$@" +} + +[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh + +case "$OSTYPE" in + darwin*) + path+=("$(readlink /Users/$DEFAULT_USER/bin)") + path+=("/Library/TeX/texbin") + path+=("/usr/local/share/dotnet") + export PATH + + alias krak='/Applications/GitKraken.app/Contents/MacOS/GitKraken -p "$(PWD)" &>> /dev/null &' + + #THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!! + export SDKMAN_DIR="/Users/jakobstendahl/.sdkman" + [[ -s "/Users/jakobstendahl/.sdkman/bin/sdkman-init.sh" ]] && source "/Users/jakobstendahl/.sdkman/bin/sdkman-init.sh" + ;; + linux*) + alias pbcopy='xsel --clipboard --input' + alias pbpaste='xsel --clipboard --output' + ;; +esac -- cgit v1.2.3