From 5f7dc00c2ec6e84688a02b11969adfa1325393ca Mon Sep 17 00:00:00 2001 From: Joshua Stone Date: Wed, 11 Jan 2023 21:09:39 -0500 Subject: [PATCH] added basic configuration --- .bash_profile | 30 +++++++++++ .bashrc | 39 +++++++++++++++ .ideavimrc | 116 ++++++++++++++++++++++++++++++++++++++++++ .vimrc | 113 +++++++++++++++++++++++++++++++++++++++++ .zshrc | 136 ++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 434 insertions(+) create mode 100644 .bash_profile create mode 100644 .bashrc create mode 100644 .ideavimrc create mode 100644 .vimrc create mode 100644 .zshrc diff --git a/.bash_profile b/.bash_profile new file mode 100644 index 0000000..30007ee --- /dev/null +++ b/.bash_profile @@ -0,0 +1,30 @@ +export GOPATH=/Users/joshstone/go +export PATH=$PATH:$GOPATH/bin +export STORM_HOME=~/.storm +export PATH=$PATH:$STORM_HOME/bin +export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home +# The next line updates PATH for the Google Cloud SDK. +if [ -f '/Users/josh/Downloads/google-cloud-sdk/path.bash.inc' ]; then source '/Users/josh/Downloads/google-cloud-sdk/path.bash.inc'; fi + +# The next line enables shell command completion for gcloud. +if [ -f '/Users/josh/Downloads/google-cloud-sdk/completion.bash.inc' ]; then source '/Users/josh/Downloads/google-cloud-sdk/completion.bash.inc'; fi + +# append to the history file, don't overwrite it +shopt -s histappend +# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) +export HISTCONTROL=ignoredups:erasedups # no duplicate entries +export HISTSIZE=100000 +export HISTFILESIZE=200000 +export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND" +export HISTIGNORE="history*" + +#search history easily +alias h="tac ~/.bash_history | grep -m10" + + [[ -s $(brew --prefix)/etc/profile.d/autojump.sh ]] && . $(brew --prefix)/etc/profile.d/autojump.sh + +source ~/.bashrc +export SLUGIFY_USES_TEXT_UNIDECODE=yes + +export PKG_CONFIG_PATH=/usr/local/Cellar/libffi/3.2.1/lib/pkgconfig +export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/opt/openssl/lib/pkgconfig diff --git a/.bashrc b/.bashrc new file mode 100644 index 0000000..d4e7f55 --- /dev/null +++ b/.bashrc @@ -0,0 +1,39 @@ + +# don't put duplicate lines or lines starting with space in the history. +# See bash(1) for more options +HISTCONTROL=ignoreboth + +# append to the history file, don't overwrite it +shopt -s histappend +# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) +export HISTCONTROL=ignoredups:erasedups # no duplicate entries +export HISTSIZE=100000 +export HISTFILESIZE=200000 +export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND" +export HISTIGNORE="history*" + +#search history easily +alias h="tac ~/.bash_history | grep -m10" + + [[ -s $(brew --prefix)/etc/profile.d/autojump.sh ]] && . $(brew --prefix)/etc/profile.d/autojump.sh + +[ -f ~/.fzf.bash ] && source ~/.fzf.bash + +export NVM_DIR="$HOME/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm +[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion +alias tmux="tmux -2" + +source /Users/josh/Library/Preferences/org.dystroy.broot/launcher/bash/br + +eval "$(thefuck --alias)" + +alias wb="gradle build" +alias wf="gradle goJF" +alias wn="gradle clean" +alias ws="gradle spotlessApply" +alias wu="gradle composeUp" +alias wd="gradle composeDown" +alias wl="gradle --write-locks" + +export PATH=$HOME/bin:/usr/local/bin:/opt/homebrew/bin:$PATH diff --git a/.ideavimrc b/.ideavimrc new file mode 100644 index 0000000..488c52e --- /dev/null +++ b/.ideavimrc @@ -0,0 +1,116 @@ +set nocompatible " be iMproved, required +filetype off " required + +" set the runtime path to include Vundle and initialize +set rtp+=~/.vim/bundle/Vundle.vim +call vundle#begin() + +" let Vundle manage Vundle, required +Plugin 'VundleVim/Vundle.vim' +Plugin 'octol/vim-cpp-enhanced-highlight' +Plugin 'tomasiser/vim-code-dark' +Plugin 'scrooloose/nerdtree' +Plugin 'scrooloose/syntastic' +Plugin 'altercation/vim-colors-solarized' +Plugin 'scrooloose/nerdcommenter' +Plugin 'nanotech/jellybeans.vim' +Plugin 'ConradIrwin/vim-bracketed-paste' +Plugin 'fatih/vim-go' +Plugin 'tpope/vim-abolish' +call vundle#end() + + +""spacing/indenting +set backspace=2 "This makes the backspace key function like it does in other programs. +set tabstop=2 "How much space Vim gives to a tab +set shiftwidth=2 +set softtabstop=2 +set expandtab +set smartindent +set autoindent +set backspace=indent,eol,start +filetype indent on +filetype plugin indent on + + +"" visuals +set number +set showmatch +set background=dark +colorscheme jellybeans +syntax on +set mouse=a +set clipboard=unnamed +set ruler +set cursorline +set scrolloff=25 + +filetype on +set encoding=utf-8 +set ttyfast + +"" Disable the blinking cursor. +set gcr=a:blinkon0 +set scrolloff=3 + +"" Status bar +set laststatus=2 + +"" Use modeline overrides +set modeline +set modelines=10 + +set title +set titleold="Terminal" +set titlestring=%F + +set statusline=%F%m%r%h%w%=(%{&ff}/%Y)\ (line\ %l\/%L,\ col\ %c)\ + +"" Directories for swp files +set nobackup +set noswapfile + +"" enable hidden buffers +set hidden + +"" search +set incsearch +set hlsearch +set ignorecase +set smartcase + +" Use Unix as the standard file type +set ffs=unix,dos,mac + +"" plugin settings +set splitright + +"" custom mappings +let mapleader = '\' +inoremap jj +nnoremap , i_r +let g:cpp_class_scope_highlight = 1 +let g:cpp_member_variable_highlight = 1 +map :tabn +map :tabp +"" open NERDTree when no value specified +autocmd StdinReadPre * let s:std_in=1 +autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif +map :NERDTreeToggle +map j +map k +map h +map l +"au BufNewFile,BufRead *.cpp set syntax=cpp11 +"au BufNewFile,BufRead *.cc set syntax=cpp11 +"au BufNewFile,BufRead *.h set syntax=cpp11 +" Copy whole file +noremap myggvG$"*y`y +inoremap myggvG$"*y`ya +" Copy paste from clipboard +" set clipboard=unnamed +vnoremap "*y +map crt +let &t_SI = "\]50;CursorShape=1\x7" +let &t_SR = "\]50;CursorShape=2\x7" +let &t_EI = "\]50;CursorShape=0\x7" diff --git a/.vimrc b/.vimrc new file mode 100644 index 0000000..84ca66b --- /dev/null +++ b/.vimrc @@ -0,0 +1,113 @@ +set nocompatible " be iMproved, required +filetype off " required + +" set the runtime path to include Vundle and initialize +set rtp+=~/.vim/bundle/Vundle.vim +call vundle#begin() + +" let Vundle manage Vundle, required +Plugin 'VundleVim/Vundle.vim' +Plugin 'octol/vim-cpp-enhanced-highlight' +Plugin 'tomasiser/vim-code-dark' +Plugin 'scrooloose/nerdtree' +Plugin 'scrooloose/syntastic' +Plugin 'altercation/vim-colors-solarized' +Plugin 'scrooloose/nerdcommenter' +Plugin 'nanotech/jellybeans.vim' +Plugin 'ConradIrwin/vim-bracketed-paste' +Plugin 'fatih/vim-go' +Plugin 'tpope/vim-abolish' +call vundle#end() + + +""spacing/indenting +set backspace=2 "This makes the backspace key function like it does in other programs. +set tabstop=2 "How much space Vim gives to a tab +set shiftwidth=2 +set softtabstop=2 +set expandtab +set smartindent +set autoindent +set backspace=indent,eol,start +filetype indent on +filetype plugin indent on + + +"" visuals +set number +set showmatch +set background=dark +colorscheme jellybeans +syntax on +set mouse=a +set clipboard=unnamed +set ruler +set cursorline +set scrolloff=25 + +filetype on +set encoding=utf-8 +set ttyfast + +"" Disable the blinking cursor. +set gcr=a:blinkon0 +set scrolloff=3 + +"" Status bar +set laststatus=2 + +"" Use modeline overrides +set modeline +set modelines=10 + +set title +set titleold="Terminal" +set titlestring=%F + +set statusline=%F%m%r%h%w%=(%{&ff}/%Y)\ (line\ %l\/%L,\ col\ %c)\ + +"" Directories for swp files +set nobackup +set noswapfile + +"" enable hidden buffers +set hidden + +"" search +set incsearch +set hlsearch +set ignorecase +set smartcase + +" Use Unix as the standard file type +set ffs=unix,dos,mac + +"" plugin settings +set splitright + +"" custom mappings +let mapleader = '\' +inoremap jj +nnoremap , i_r +let g:cpp_class_scope_highlight = 1 +let g:cpp_member_variable_highlight = 1 +map :tabn +map :tabp +"" open NERDTree when no value specified +autocmd StdinReadPre * let s:std_in=1 +autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif +map :NERDTreeToggle +map j +map k +map h +map l +"au BufNewFile,BufRead *.cpp set syntax=cpp11 +"au BufNewFile,BufRead *.cc set syntax=cpp11 +"au BufNewFile,BufRead *.h set syntax=cpp11 +" Copy whole file +noremap myggvG$"*y`y +inoremap myggvG$"*y`ya +" Copy paste from clipboard +" set clipboard=unnamed +vnoremap "*y +map crt diff --git a/.zshrc b/.zshrc new file mode 100644 index 0000000..699684a --- /dev/null +++ b/.zshrc @@ -0,0 +1,136 @@ +# 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:/opt/homebrew/bin:$PATH + +# Path to your oh-my-zsh installation. +export ZSH="$HOME/.oh-my-zsh" + +# Set name of the theme to load --- if set to "random", it will +# load a random theme each time oh-my-zsh is loaded, in which case, +# to know which specific one was loaded, run: echo $RANDOM_THEME +# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes + ZSH_THEME="powerlevel10k/powerlevel10k" +# ZSH_THEME="robbyrussell" + prompt_context(){} + +# Set list of themes to pick from when loading at random +# Setting this variable when ZSH_THEME=random will cause zsh to load +# a theme from this variable instead of looking in $ZSH/themes/ +# If set to an empty array, this variable will have no effect. +# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) + +# Uncomment the following line to use case-sensitive completion. +# CASE_SENSITIVE="true" + +# Uncomment the following line to use hyphen-insensitive completion. +# Case-sensitive completion must be off. _ and - will be interchangeable. +# HYPHEN_INSENSITIVE="true" + +# Uncomment the following line to disable bi-weekly auto-update checks. +# DISABLE_AUTO_UPDATE="true" + +# Uncomment the following line to automatically update without prompting. +# DISABLE_UPDATE_PROMPT="true" + +# Uncomment the following line to change how often to auto-update (in days). +# export UPDATE_ZSH_DAYS=13 + +# Uncomment the following line if pasting URLs and other text is messed up. +# DISABLE_MAGIC_FUNCTIONS="true" + +# Uncomment the following line to disable colors in ls. +# DISABLE_LS_COLORS="true" + +# Uncomment the following line to disable auto-setting terminal title. +# DISABLE_AUTO_TITLE="true" + +# Uncomment the following line to enable command auto-correction. +# ENABLE_CORRECTION="true" + +# Uncomment the following line to display red dots whilst waiting for completion. +# COMPLETION_WAITING_DOTS="true" + +# Uncomment the following line if you want to disable marking untracked files +# under VCS as dirty. This makes repository status check for large repositories +# much, much faster. +# DISABLE_UNTRACKED_FILES_DIRTY="true" + +# Uncomment the following line if you want to change the command execution time +# stamp shown in the history command output. +# You can set one of the optional three formats: +# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" +# or set a custom format using the strftime function format specifications, +# see 'man strftime' for details. +# HIST_STAMPS="mm/dd/yyyy" + +# Would you like to use another custom folder than $ZSH/custom? +# ZSH_CUSTOM=/path/to/new-custom-folder + +# Which plugins would you like to load? +# Standard plugins can be found in $ZSH/plugins/ +# Custom plugins may be added to $ZSH_CUSTOM/plugins/ +# Example format: plugins=(rails git textmate ruby lighthouse) +# Add wisely, as too many plugins slow down shell startup. +plugins=(git autojump) + +source $ZSH/oh-my-zsh.sh + +# User configuration + +# export MANPATH="/usr/local/man:$MANPATH" + +# You may need to manually set your language environment +# export LANG=en_US.UTF-8 + +# Preferred editor for local and remote sessions +# if [[ -n $SSH_CONNECTION ]]; then +# export EDITOR='vim' +# else +# export EDITOR='mvim' +# fi + +# Compilation flags +# export ARCHFLAGS="-arch x86_64" + +# Set personal aliases, overriding those provided by oh-my-zsh libs, +# plugins, and themes. Aliases can be placed here, though oh-my-zsh +# users are encouraged to define aliases within the ZSH_CUSTOM folder. +# For a full list of active aliases, run `alias`. +# +# Example aliases +# alias zshconfig="mate ~/.zshrc" +# alias ohmyzsh="mate ~/.oh-my-zsh" +alias gfix="git commit -a --fixup=HEAD" +[[ -s /Users/joshstone/.autojump/etc/profile.d/autojump.sh ]] && source /Users/joshstone/.autojump/etc/profile.d/autojump.sh +autoload -U compinit && compinit -u +[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh + +alias wn="gradle clean" +alias wb="gradle build" +alias wf="gradle goJF" +alias ws="gradle spotlessApply" +alias wu="gradle composeUp" +alias wd="gradle composeDown" +alias wl="gradle --write-locks" +alias wi="gradle integrationTest" + +export PATH="/usr/local/opt/libpq/bin:$PATH" +export PATH="/usr/local/opt/gradle@6/bin:$PATH" + +alias python="python3" + +# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. +[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh + +jwtd() { + if [[ -x $(command -v jq) ]]; then + jq -R 'split(".") | .[0],.[1] | @base64d | fromjson' <<< "${1}" + echo "Signature: $(echo "${1}" | awk -F'.' '{print $3}')" + fi +}