Compare commits
88 Commits
Author | SHA1 | Date | |
---|---|---|---|
91682d9992 | |||
bae580c72a | |||
be412ae489 | |||
c8cf2c98da | |||
ae4ce36eb4 | |||
c7bc5d1f60 | |||
ed811bbae2 | |||
a756072b69 | |||
c6f5a7f87d | |||
a71abc3962 | |||
cb1a72d78d | |||
579bf63c92 | |||
8b9f8233f9 | |||
d133d0eb6d | |||
4f711d1f3c | |||
e4d9373f1f | |||
4e9e21aa93 | |||
7cb2318610 | |||
85d31b4e87 | |||
7fcf02f968 | |||
fc4bfa54bf | |||
cbd00dd044 | |||
680ea33e1c | |||
03b8cc0f51 | |||
b56ff1d67f | |||
9bf8ff35a7 | |||
f990d4cd91 | |||
94c6854b3f | |||
b7c644bcca | |||
c76363a2ec | |||
7e1380cee3 | |||
064ef8cdb2 | |||
7d0528f634 | |||
ead0f980cc | |||
fe863dd3ec | |||
a64d47468d | |||
1f69c5ae8c | |||
f13e6c0788 | |||
6ffa44ddf2 | |||
c508d8b4ea | |||
c9440c40ed | |||
33276ce8e9 | |||
fa3bf6ff37 | |||
d3842431cc | |||
16cb1b0983 | |||
95bcbd543b | |||
78876b1fe9 | |||
04ee4dc97c | |||
fd493e8e49 | |||
ecda413f11 | |||
9b6d07193d | |||
e45b822767 | |||
fe34917fb5 | |||
98faeb58c9 | |||
8d02d2e6f7 | |||
66fcf702d4 | |||
1429d228e5 | |||
cb6dfa4ec3 | |||
8f48bd0aec | |||
55251c87d5 | |||
b279da9951 | |||
fb31622c31 | |||
08d1b789d3 | |||
376a0f099b | |||
bef3880e68 | |||
f8a52a1308 | |||
168e40d440 | |||
946a694d6e | |||
59996a56c8 | |||
a6e3542ef2 | |||
99a7e580e7 | |||
7e29a16a96 | |||
337119fa02 | |||
5c6ddd41cb | |||
d21d617af9 | |||
804f6800d2 | |||
6488d20fcc | |||
ef8a6d4906 | |||
25900dc6c7 | |||
87eb242cf0 | |||
874faedf0b | |||
ce4e16917c | |||
5f25cd020c | |||
de074893b1 | |||
64f25e862f | |||
05f8f35da4 | |||
2569f31f87 | |||
001b176294 |
54
.bashrc
54
.bashrc
@ -87,10 +87,41 @@ fi
|
|||||||
# colored GCC warnings and errors
|
# colored GCC warnings and errors
|
||||||
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
|
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
|
||||||
|
|
||||||
|
vc() {
|
||||||
|
git add .
|
||||||
|
git commit -m "commit: $(date "+%Y-%m-%d %H:%M:%S")"
|
||||||
|
git push
|
||||||
|
}
|
||||||
# some more ls aliases
|
# some more ls aliases
|
||||||
alias ll='ls -alFh'
|
alias ll='ls -alFh'
|
||||||
alias la='ls -A'
|
alias la='ls -A'
|
||||||
alias l='ls -CF'
|
alias l='ls -CF'
|
||||||
|
#alias lb='lsblk -o+FSAVAIL,FSUSED,FSUSE%,MODEL,PARTTYPENAME,STATE'
|
||||||
|
alias lb='lsblk -o+FSTYPE,FSAVAIL,FSUSED,FSUSE%,MODEL'
|
||||||
|
alias opg="lsof 2>/dev/null +D . | grep 'pg.*swp$' | awk '{print \$9}' | sed 's/\.swp//g' | sed 's/\/\./\//g'"
|
||||||
|
alias osw="lsof 2>/dev/null +D . | awk '\$NF ~ /swp$/ {print \$9}' | sed 's/\.swp//g' | sed 's/\/\./\//g'"
|
||||||
|
alias xpg="lsof 2>/dev/null +D . | grep 'pg.*swp$' | awk '{print \$9}' | sed 's/\.swp//g' | sed 's/\/\./\//g' | xargs -r $PG -f"
|
||||||
|
alias xsw="lsof 2>/dev/null +D . | grep '.*swp$' | awk '{print \$9}' | sed 's/\.swp//g' | sed 's/\/\./\//g' | xargs -r $PG -f"
|
||||||
|
alias ons='lsof +D ~/.local/state/nvim/swap/ | grep -o "/swap/.*" | cut -c 7- | tr "%" "/" | sed "s/\\.swp$//" | grep "$(pwd)"'
|
||||||
|
alias xns='lsof +D ~/.local/state/nvim/swap/ | grep -o "/swap/.*" | cut -c 7- | tr "%" "/" | sed "s/\\.swp$//" | sed "s/\\.swo$//" | grep "$(pwd | sed "s|^//|/|")" | fzf | xargs -I % $PG -f %'
|
||||||
|
alias xnsp='lsof +D ~/.local/state/nvim/swap/ | grep -o "/swap/.*" | cut -c 7- | tr "%" "/" | sed "s/\\.swp$//" | sed "s/\\.swo$//" | grep "$(pwd | sed "s|^//|/|")" | fzf | xargs -I % $PG -f % | pspg'
|
||||||
|
#alias xnsp='lsof +D ~/.local/state/nvim/swap/ | grep -o "/swap/.*" | cut -c 7- | tr "%" "/" | sed "s/\\.swp$//" | grep "$(pwd)" | fzf | xargs -I % $PG -f % | pspg'
|
||||||
|
alias mns='fzf | xargs -I {} sqlcmd -U Pricing -S mid-sql02 -C -i {} | pspg'
|
||||||
|
alias xmsp='lsof +D ~/.local/state/nvim/swap/ | grep -o "/swap/.*" | cut -c 7- | tr "%" "/" | sed "s/\\.swp$//" | grep "$(pwd | sed "s|^//|/|")" | fzf | xargs -I % $MS -i % | pspg'
|
||||||
|
alias nv='~/nvim-linux64/bin/nvim'
|
||||||
|
alias gs='git status -s'
|
||||||
|
alias ga='git status --untracked-files=all -s | fzf -m | awk "{print \$2}" | xargs git add '
|
||||||
|
alias gx='git status --untracked-files=all -s | fzf -m | awk "{print \$2}" | xargs git checkout '
|
||||||
|
alias td='rg "\- \[[^x]\]"'
|
||||||
|
# alias tdo='rg "\- \[[^x]\]" | fzf | xargs nvim'
|
||||||
|
alias tdo='rg "\- \[ \]" --line-number | fzf | awk -F: "{print \$1, \"+\"\$2}" | xargs -r nvim'
|
||||||
|
alias gr='git reset HEAD'
|
||||||
|
alias gc='git commit -v'
|
||||||
|
alias gd='git difftool'
|
||||||
|
alias gl='git log --graph --oneline --format="%C(yellow)%h %C(green)%an%Creset %C(blue)%ad%Creset %s"'
|
||||||
|
alias cj='cd ~/storage/shared/Documents/journal/'
|
||||||
|
alias jr='cd ~/storage/shared/Documents/journal/ && git pull && vc && cd -'
|
||||||
|
alias hc='cd ~/storage/shared/Documents/hc_notes/ && git pull && git push && cd -'
|
||||||
|
|
||||||
# Add an "alert" alias for long running commands. Use like so:
|
# Add an "alert" alias for long running commands. Use like so:
|
||||||
# sleep 10; alert
|
# sleep 10; alert
|
||||||
@ -116,20 +147,19 @@ if ! shopt -oq posix; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
EDITOR=/usr/bin/vim.basic
|
#EDITOR=/usr/bin/vim.basic
|
||||||
|
export EDITOR=vim
|
||||||
|
export VISUAL=vim
|
||||||
PAGER="less"
|
PAGER="less"
|
||||||
LESS="-S"
|
LESS="-S"
|
||||||
export IPTOKEN="6ac0a563fc06ab"
|
export PSQL_PAGER="pspg"
|
||||||
export PG="psql -U ptrowbridge -d ubm -p 5432 -h 192.168.1.110"
|
|
||||||
export NVM_DIR="/home/pt/.nvm"
|
|
||||||
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
|
|
||||||
|
|
||||||
|
if [ -f "$HOME/.bash-git-prompt/gitprompt.sh" ]; then
|
||||||
GOPATH=$HOME/go
|
GIT_PROMPT_ONLY_IN_REPO=1
|
||||||
function _update_ps1() {
|
source $HOME/.bash-git-prompt/gitprompt.sh
|
||||||
PS1="$($GOPATH/bin/powerline-go -error $?)"
|
|
||||||
}
|
|
||||||
if [ "$TERM" != "linux" ] && [ -f "$GOPATH/bin/powerline-go" ]; then
|
|
||||||
PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
bind 'set bell-style none'
|
||||||
|
|
||||||
|
[ -f ~/dot_config/.bashrc_local ] && source ~/dot_config/.bashrc_local
|
||||||
|
export PATH=$PATH:~/lua-language-server/bin
|
||||||
|
9
.bashrc_local_example
Normal file
9
.bashrc_local_example
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#export IPTOKEN=
|
||||||
|
#export PG="psql -U ptrowbridge -d ubm -p 5432 -h usmidsap01"
|
||||||
|
#export MS="sqlcmd.exe -S mid-sql02 -i"
|
||||||
|
#export JAVA_HOME=/opt/jdk-19.0.1
|
||||||
|
#export PATH=$PATH:$JAVA_HOME/bin
|
||||||
|
#export PATH=$PATH:/opt/gradle/gradle-7.6/bin
|
||||||
|
#export RUNNER_PATH=/opt/runner/
|
||||||
|
#export DB2PW=
|
||||||
|
#export PGPW=
|
22
.gitconfig
22
.gitconfig
@ -2,13 +2,27 @@
|
|||||||
email = paul@hptrow.me
|
email = paul@hptrow.me
|
||||||
name = Paul Trowbridge
|
name = Paul Trowbridge
|
||||||
[core]
|
[core]
|
||||||
autocrlf = false
|
autocrlf = input
|
||||||
editor = vim
|
editor = vim
|
||||||
[push]
|
[push]
|
||||||
default = simple
|
default = simple
|
||||||
[alias]
|
[alias]
|
||||||
quick-stats = ! /usr/local/bin/git-quick-stats
|
pushall = !git remote | xargs -L1 git push --all
|
||||||
[log]
|
[log]
|
||||||
date = format:%Y-%m-%d %H:%M:%S
|
date = format:%Y-%m-%d %H:%M:%S
|
||||||
[format]
|
[format]
|
||||||
pretty = format:'%C(yellow)%h %Cred%ad %Cblue%an %Cgreen%d %Creset%s'
|
pretty = format:'%C(yellow)%h %Cred%ad %Cblue%an %Cgreen%d %Creset%s'
|
||||||
|
[diff]
|
||||||
|
tool = vimdiff
|
||||||
|
[safe]
|
||||||
|
directory = /var/www/kimai2
|
||||||
|
directory = /var/www/html/resume/
|
||||||
|
directory = /var/www/html/resume
|
||||||
|
directory = /opt/forecast_api/
|
||||||
|
directory = /opt/forecast_api
|
||||||
|
directory = /etc/postgresql/15/main/
|
||||||
|
directory = /etc/postgresql/15/main
|
||||||
|
directory = /storage/emulated/0/Documents/journal
|
||||||
|
directory = /storage/emulated/0/Documents/hc_notes
|
||||||
|
[pull]
|
||||||
|
rebase = false
|
||||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
*.swp
|
*.swp
|
||||||
|
.bashrc_local
|
||||||
|
40
.pspgconf
Normal file
40
.pspgconf
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
ascii_menu = false
|
||||||
|
bold_labels = false
|
||||||
|
bold_cursor = false
|
||||||
|
ignore_case = false
|
||||||
|
ignore_lower_case = false
|
||||||
|
no_cursor = false
|
||||||
|
no_sound = false
|
||||||
|
no_mouse = false
|
||||||
|
less_status_bar = false
|
||||||
|
no_highlight_search = false
|
||||||
|
no_highlight_lines = false
|
||||||
|
force_uniborder = false
|
||||||
|
show_rownum = false
|
||||||
|
without_commandbar = false
|
||||||
|
without_topbar = false
|
||||||
|
vertical_cursor = true
|
||||||
|
on_sigint_exit = false
|
||||||
|
no_sigint_search_reset = false
|
||||||
|
double_header = false
|
||||||
|
quit_on_f3 = false
|
||||||
|
pgcli_fix = false
|
||||||
|
xterm_mouse_mode = true
|
||||||
|
show_scrollbar = true
|
||||||
|
menu_always = false
|
||||||
|
empty_string_is_null = true
|
||||||
|
last_row_search = true
|
||||||
|
progressive_load_mode = true
|
||||||
|
highlight_odd_rec = true
|
||||||
|
hide_header_line = false
|
||||||
|
on_exit_reset = false
|
||||||
|
on_exit_clean = false
|
||||||
|
on_exit_erase_line = false
|
||||||
|
on_exit_sgr0 = false
|
||||||
|
direct_color = false
|
||||||
|
theme = 18
|
||||||
|
border_type = 2
|
||||||
|
default_clipboard_format = 0
|
||||||
|
clipboard_app = 0
|
||||||
|
hist_size = 500
|
||||||
|
esc_delay = -1
|
6
.psqlrc
6
.psqlrc
@ -1,3 +1,9 @@
|
|||||||
-- Switch pagers with :x and :xx commands
|
-- Switch pagers with :x and :xx commands
|
||||||
\set x '\\setenv PAGER ''less -S'''
|
\set x '\\setenv PAGER ''less -S'''
|
||||||
\set xx '\\setenv PAGER \'pspg -bX --no-mouse\''
|
\set xx '\\setenv PAGER \'pspg -bX --no-mouse\''
|
||||||
|
\timing on
|
||||||
|
\set QUIET 1
|
||||||
|
\pset linestyle unicode
|
||||||
|
-- \pset border 2
|
||||||
|
\pset null ∅
|
||||||
|
\unset QUIET
|
||||||
|
26
.tmux.conf
26
.tmux.conf
@ -4,3 +4,29 @@ bind -r h select-pane -L # move left
|
|||||||
bind -r j select-pane -D # move down
|
bind -r j select-pane -D # move down
|
||||||
bind -r k select-pane -U # move up
|
bind -r k select-pane -U # move up
|
||||||
bind -r l select-pane -R # move right
|
bind -r l select-pane -R # move right
|
||||||
|
set -g mouse on
|
||||||
|
bind -n C-PgDn next-window
|
||||||
|
bind -n C-PgUp previous-window
|
||||||
|
|
||||||
|
#plugin manager for install tmux-resurrect
|
||||||
|
set -g @plugin 'tmux-plugins/tpm'
|
||||||
|
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
||||||
|
set -g @plugin 'jimeh/tmux-themepack'
|
||||||
|
set -g @themepack 'powerline/default/cyan'
|
||||||
|
#-----------------------nova---------------------------------------------
|
||||||
|
#set -g @plugin 'o0th/tmux-nova'
|
||||||
|
#set -g @nova-nerdfonts true
|
||||||
|
#set -g @nova-nerdfonts-left
|
||||||
|
#set -g @nova-nerdfonts-right
|
||||||
|
#set -g @nova-segment-mode "#{?client_prefix,Ω,ω}"
|
||||||
|
#set -g @nova-segment-mode-colors "#50fa7b #282a36"
|
||||||
|
#set -g @nova-segment-whoami "#(whoami)@#h"
|
||||||
|
#set -g @nova-segment-whoami-colors "#50fa7b #282a36"
|
||||||
|
#set -g @nova-pane "#I#{?pane_in_mode, #{pane_mode},} #W"
|
||||||
|
#set -g @nova-rows 0
|
||||||
|
#set -g @nova-segments-0-left "mode"
|
||||||
|
#set -g @nova-segments-0-right "whoami"
|
||||||
|
|
||||||
|
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
|
||||||
|
run '~/.tmux/plugins/tpm/tpm'
|
||||||
|
|
||||||
|
39
.vimrc
39
.vimrc
@ -7,11 +7,12 @@ call vundle#begin()
|
|||||||
" let Vundle manage Vundle, required
|
" let Vundle manage Vundle, required
|
||||||
Plugin 'gmarik/Vundle.vim'
|
Plugin 'gmarik/Vundle.vim'
|
||||||
Plugin 'vim-airline/vim-airline'
|
Plugin 'vim-airline/vim-airline'
|
||||||
|
Plugin 'kien/ctrlp.vim'
|
||||||
Plugin 'scrooloose/nerdtree'
|
Plugin 'scrooloose/nerdtree'
|
||||||
Plugin 'tpope/vim-fugitive'
|
"Plugin 'edkolev/tmuxline.vim'
|
||||||
Plugin 'edkolev/tmuxline.vim'
|
|
||||||
Plugin 'vim-airline/vim-airline-themes'
|
Plugin 'vim-airline/vim-airline-themes'
|
||||||
Plugin 'chrisbra/csv.vim'
|
Plugin 'leafgarland/typescript-vim'
|
||||||
|
Plugin 'peitalin/vim-jsx-typescript'
|
||||||
"Plugin 'Lokaltog/powerline', {'rtp': 'powerline/bindings/vim/'}
|
"Plugin 'Lokaltog/powerline', {'rtp': 'powerline/bindings/vim/'}
|
||||||
" All of your Plugins must be added before the following line
|
" All of your Plugins must be added before the following line
|
||||||
call vundle#end() " required
|
call vundle#end() " required
|
||||||
@ -22,7 +23,9 @@ map <C-k> <C-W>k
|
|||||||
map <C-h> <C-W>h
|
map <C-h> <C-W>h
|
||||||
map <C-l> <C-W>l
|
map <C-l> <C-W>l
|
||||||
let NERDTreeShowHidden=1
|
let NERDTreeShowHidden=1
|
||||||
set tabstop=8 softtabstop=0 expandtab shiftwidth=4 smarttab
|
set tabstop=4 softtabstop=0 expandtab shiftwidth=4 smarttab
|
||||||
|
set mouse=a
|
||||||
|
set nowrap
|
||||||
colorscheme desert
|
colorscheme desert
|
||||||
syntax on
|
syntax on
|
||||||
set splitright
|
set splitright
|
||||||
@ -36,13 +39,37 @@ let g:netrw_altv = 1
|
|||||||
let g:netrw_winsize = 25
|
let g:netrw_winsize = 25
|
||||||
"----airline tabs for buffers-------
|
"----airline tabs for buffers-------
|
||||||
let g:airline#extensions#tabline#enabled = 1
|
let g:airline#extensions#tabline#enabled = 1
|
||||||
let g:airline_theme = 'dark'
|
let g:airline_theme = 'violet'
|
||||||
"let g:tmuxline_powerline_separators = 0
|
let g:airline_solarized_bg='dark'
|
||||||
|
let g:tmuxline_powerline_separators = 1
|
||||||
let g:airline_powerline_fonts = 1
|
let g:airline_powerline_fonts = 1
|
||||||
|
"----markdown folding------------
|
||||||
|
"let g:vim_markdown_folding_disabled = 1
|
||||||
|
set nofoldenable " disable folding
|
||||||
|
"---general--------------------
|
||||||
let mapleader = ";"
|
let mapleader = ";"
|
||||||
set showcmd
|
set showcmd
|
||||||
map <Leader>a :bn<cr>
|
map <Leader>a :bn<cr>
|
||||||
map <Leader>f :bp<cr>
|
map <Leader>f :bp<cr>
|
||||||
map <Leader>d :bp<cr>:bd #<cr>
|
map <Leader>d :bp<cr>:bd #<cr>
|
||||||
|
"---move the whole page without moving the cursor---
|
||||||
|
nnoremap J <C-E>
|
||||||
|
nnoremap K <C-Y>
|
||||||
"-----nerdtree--------------------
|
"-----nerdtree--------------------
|
||||||
nmap <Leader>e :NERDTreeToggle<CR>
|
nmap <Leader>e :NERDTreeToggle<CR>
|
||||||
|
" Search as you type, highlight results
|
||||||
|
set incsearch
|
||||||
|
set showmatch
|
||||||
|
set hlsearch
|
||||||
|
set mouse=a
|
||||||
|
"----disable the bell; t_vb is required to be set to nothing
|
||||||
|
set visualbell
|
||||||
|
set t_vb=
|
||||||
|
nnoremap \\ :noh<cr> " Clear higlighting
|
||||||
|
set nowrap
|
||||||
|
"nnoremap <esc> :noh<return><esc>
|
||||||
|
" Resize windows
|
||||||
|
nnoremap <silent> <Up> 5<C-W>+
|
||||||
|
nnoremap <silent> <Down> 5<C-W>-
|
||||||
|
nnoremap <silent> <Right> 10<C-W>>
|
||||||
|
nnoremap <silent> <Left> 10<C-W><
|
||||||
|
12
install_postgres.sh
Executable file
12
install_postgres.sh
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
# Create the file repository configuration:
|
||||||
|
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
|
||||||
|
|
||||||
|
# Import the repository signing key:
|
||||||
|
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
|
||||||
|
|
||||||
|
# Update the package lists:
|
||||||
|
sudo apt-get update
|
||||||
|
|
||||||
|
# Install the latest version of PostgreSQL.
|
||||||
|
# If you want a specific version, use 'postgresql-12' or similar instead of 'postgresql':
|
||||||
|
sudo apt-get -y install postgresql
|
24
install_python3.sh
Executable file
24
install_python3.sh
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Update the package list
|
||||||
|
sudo apt-get update
|
||||||
|
|
||||||
|
# Install the software-properties-common package
|
||||||
|
sudo apt-get install software-properties-common
|
||||||
|
|
||||||
|
# Add the deadsnakes PPA to the sources list
|
||||||
|
sudo add-apt-repository ppa:deadsnakes/ppa
|
||||||
|
|
||||||
|
# Update the package list again
|
||||||
|
sudo apt-get update
|
||||||
|
|
||||||
|
# Check the latest version of Python 3 available
|
||||||
|
latest_version=$(apt-cache madison python3 | awk '{print $3}' | grep "^3\." | sort -V | tail -1)
|
||||||
|
|
||||||
|
# Install the latest version of Python 3
|
||||||
|
sudo apt-get install -y python3=$latest_version
|
||||||
|
|
||||||
|
# Verify the installation
|
||||||
|
python3 --version
|
||||||
|
which python3
|
||||||
|
|
1
nvchad.sh
Executable file
1
nvchad.sh
Executable file
@ -0,0 +1 @@
|
|||||||
|
git clone git@gitea.hptrow.me:pt/nvchad ~/.config/nvim
|
20
nvim_build.sh
Executable file
20
nvim_build.sh
Executable file
@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Install dependencies
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y ninja-build gettext libtool libtool-bin autoconf automake cmake g++ pkg-config unzip
|
||||||
|
|
||||||
|
# Clone the Neovim repository
|
||||||
|
git clone https://github.com/neovim/neovim.git ~/neovim
|
||||||
|
|
||||||
|
# Navigate into the Neovim directory
|
||||||
|
cd ~/neovim
|
||||||
|
|
||||||
|
# Checkout the latest release tag
|
||||||
|
git checkout $(git describe --tags --abbrev=0)
|
||||||
|
|
||||||
|
# Build and install Neovim
|
||||||
|
make CMAKE_BUILD_TYPE=Release
|
||||||
|
sudo make install
|
||||||
|
|
||||||
|
cd -
|
166
setup.sh
166
setup.sh
@ -5,7 +5,49 @@
|
|||||||
|
|
||||||
dir=~/dot_config
|
dir=~/dot_config
|
||||||
backup=~/dot_config_backup
|
backup=~/dot_config_backup
|
||||||
files=".bashrc .vimrc .tmux.conf .psqlrc .gitconfig"
|
files=".bashrc .vimrc .tmux.conf .psqlrc .gitconfig .inputrc .pspgconf"
|
||||||
|
|
||||||
|
#-------------------------------------------------install debian tooling-----------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#----------curl-----------
|
||||||
|
if [ "$(dpkg-query -W -f='${Status}' "curl" 2>/dev/null | grep -c "ok installed")" == "1" ]
|
||||||
|
then
|
||||||
|
echo "curl already installed"
|
||||||
|
else
|
||||||
|
echo "installing curl..."
|
||||||
|
apt update -q4
|
||||||
|
sudo apt install curl -y
|
||||||
|
fi
|
||||||
|
|
||||||
|
#----------vim-----------
|
||||||
|
if [ "$(dpkg-query -W -f='${Status}' "vim" 2>/dev/null | grep -c "ok installed")" == "1" ]
|
||||||
|
then
|
||||||
|
echo "vim already installed"
|
||||||
|
else
|
||||||
|
echo "installing vim..."
|
||||||
|
apt update -q4
|
||||||
|
sudo apt install vim -y
|
||||||
|
fi
|
||||||
|
|
||||||
|
#----------tmux-----------
|
||||||
|
if [ "$(dpkg-query -W -f='${Status}' "tmux" 2>/dev/null | grep -c "ok installed")" == "1" ]
|
||||||
|
then
|
||||||
|
echo "tmux already installed"
|
||||||
|
else
|
||||||
|
echo "installing tmux..."
|
||||||
|
apt update -q4
|
||||||
|
sudo apt install tmux -y
|
||||||
|
fi
|
||||||
|
|
||||||
|
#----------pspg-----------
|
||||||
|
if [ "$(dpkg-query -W -f='${Status}' "pspg" 2>/dev/null | grep -c "ok installed")" == "1" ]
|
||||||
|
then
|
||||||
|
echo "pspg already installed"
|
||||||
|
else
|
||||||
|
echo "installing pspg..."
|
||||||
|
apt update -q4
|
||||||
|
sudo apt install pspg -y
|
||||||
|
fi
|
||||||
|
|
||||||
#------------------------------------------------ create the resore directory if it doesn't already exist--------------------------------------------------
|
#------------------------------------------------ create the resore directory if it doesn't already exist--------------------------------------------------
|
||||||
|
|
||||||
@ -30,18 +72,126 @@ do
|
|||||||
ln -s $dir/$file ~/$file
|
ln -s $dir/$file ~/$file
|
||||||
done
|
done
|
||||||
|
|
||||||
#----------------------------------------------------------see if Vundle has been cloned yet and do so-----------------------------------------------------
|
#----------------------------------------------------------install go and go-powerline--------------------------------------------------------------------
|
||||||
|
|
||||||
if [ ! -d ~/.vim ]
|
# if $GOPATH is null the prompt for golang install
|
||||||
|
if [ -z "$GOPATH" ]
|
||||||
then
|
then
|
||||||
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
|
|
||||||
while true; do
|
while true; do
|
||||||
read -p "Do you want to install the vim plugins now?" yn
|
read -p "do you want to install golang (needed for go-powerline)?" yn
|
||||||
case $yn in
|
case $yn in
|
||||||
[Yy]* ) vim +PluginInstall +qall; break;;
|
[Yy]* )
|
||||||
[Nn]* ) exit;;
|
sudo apt-get install golang -y;
|
||||||
|
break;;
|
||||||
|
[Nn]* )
|
||||||
|
break;;
|
||||||
* ) echo "Please answer yes or no.";;
|
* ) echo "Please answer yes or no.";;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
echo "you may need to run vim and execute :PluginInstall to sync packages with the new .vimrc, or \"vim +PluginInstall +qall\" from the command line"
|
|
||||||
|
#----------------------------------------------------------install go-powerline---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# see if this file exists, if not prompt for install
|
||||||
|
if [ ! -f ~/go/bin/powerline-go ]
|
||||||
|
then
|
||||||
|
while true; do
|
||||||
|
read -p "do you want to install go-powerline?" yn
|
||||||
|
case $yn in
|
||||||
|
[Yy]* )
|
||||||
|
go get -u github.com/justjanne/powerline-go;
|
||||||
|
break;;
|
||||||
|
[Nn]* )
|
||||||
|
break;;
|
||||||
|
* ) echo "Please answer yes or no.";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
#----------------------------------------------------------install power line fonts------------------------------------------------------------------------
|
||||||
|
|
||||||
|
if [ ! -d ~/fonts ]
|
||||||
|
then
|
||||||
|
while true; do
|
||||||
|
read -p "do you want to install powerline fonts from 'https://github.com/powerline/fonts' ?" yn
|
||||||
|
case $yn in
|
||||||
|
[Yy]* )
|
||||||
|
git clone https://github.com/powerline/fonts ~/fonts;
|
||||||
|
cd fonts;
|
||||||
|
./install.sh;
|
||||||
|
break;;
|
||||||
|
[Nn]* )
|
||||||
|
break;;
|
||||||
|
* ) echo "Please answer yes or no.";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
#----------------------------------------------------------install tmux plugin manager and tmux resurrect--------------------------------------------------
|
||||||
|
|
||||||
|
if [ ! -d ~/.tmux/plugins/tpm ]
|
||||||
|
then
|
||||||
|
while true; do
|
||||||
|
read -p "do you want to install the tmux plugin manager from 'https://github.com/tmux-plugins/tpm' ?" yn
|
||||||
|
case $yn in
|
||||||
|
[Yy]* )
|
||||||
|
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm;
|
||||||
|
break;;
|
||||||
|
[Nn]* )
|
||||||
|
break;;
|
||||||
|
* ) echo "Please answer yes or no.";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
#----------------------------------------------------------see if Vundle has been cloned yet and do so-----------------------------------------------------
|
||||||
|
|
||||||
|
if [ ! -d ~/.vim/bundle ]
|
||||||
|
then
|
||||||
|
while true; do
|
||||||
|
read -p "do you want to install the Vundle plugin manager for vim from https://github.com/VundleVim/Vundle.vim.git?" yn
|
||||||
|
case $yn in
|
||||||
|
[Yy]* )
|
||||||
|
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
|
||||||
|
# ask to install plugins after vundle installed
|
||||||
|
while true; do
|
||||||
|
read -p "Do you want to install the vim plugins now?" yn
|
||||||
|
case $yn in
|
||||||
|
[Yy]* ) vim +PluginInstall +qall; break;;
|
||||||
|
[Nn]* ) break;;
|
||||||
|
* ) echo "Please answer yes or no.";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
break;;
|
||||||
|
[Nn]* )
|
||||||
|
break;;
|
||||||
|
* ) echo "Please answer yes or no.";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
read -p "do you want to install git-bash-prompt?" yn
|
||||||
|
case $yn in
|
||||||
|
[Yy]* )
|
||||||
|
git clone https://github.com/magicmonty/bash-git-prompt.git ~/.bash-git-prompt --depth=1
|
||||||
|
break;;
|
||||||
|
[Nn]* )
|
||||||
|
break;;
|
||||||
|
* ) echo "Please answer yes or no.";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
read -p "do you want to install fzf, ripgrep?" yn
|
||||||
|
case $yn in
|
||||||
|
[Yy]* )
|
||||||
|
sudo apt-get install fzf ripgrep
|
||||||
|
break;;
|
||||||
|
[Nn]* )
|
||||||
|
break;;
|
||||||
|
* ) echo "Please answer yes or no.";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user