From 274372ef35481ccaac2dc6a4eb087f98bcd9fbeb Mon Sep 17 00:00:00 2001 From: Bill Niblock Date: Thu, 1 Aug 2019 15:50:41 +0000 Subject: [PATCH 1/8] Update bash config --- bash/bashrc | 81 +++++++++++++++++++---------------------------------- 1 file changed, 29 insertions(+), 52 deletions(-) diff --git a/bash/bashrc b/bash/bashrc index d7247bf..ab83b43 100644 --- a/bash/bashrc +++ b/bash/bashrc @@ -6,8 +6,34 @@ if [ -f /etc/bashrc ]; then . /etc/bashrc fi +#=============================================================================== +# Path +#=============================================================================== +# Custom stuff +PATH="$HOME/bin:$PATH" +# Add Python to path +PYTHONPATH="${PYTHONPATH}" +export PYTHONPATH +PATH="$PATH:/opt/python/bin" +# Add Rust cargo bin +PATH="$PATH:$HOME/.cargo/bin" +# RVM. Make sure this is the last PATH variable change. +PATH="$PATH:$HOME/.rvm/bin" +# Set it. +export PATH +#=============================================================================== +# Defaults +#=============================================================================== # Disable CTRL+S flow control stty -ixon +# Set editor, if Vim is available +type vim >/dev/null 2>&1 +if [[ $? == 0 ]]; then + export EDITOR=vim +fi +# History size and time-format +export HISTSIZE=10000 +export HISTTIMEFORMAT="%s " #=============================================================================== # Prompt #=============================================================================== @@ -23,24 +49,9 @@ fi #=============================================================================== # Aliases #=============================================================================== -alias tssh="source ~/.ssh/auth_ssh; ssh -A" -complete -F _ssh tssh #=============================================================================== # Functions #=============================================================================== -#If redshift wasn't automatically started, this will do it -function tint(){ - type redshift >/dev/null 2>&1 - if [[ $? == 0 ]]; then - redshift -l 42.8864500:-78.8783700 -t 5000:4000 & - else - echo "Redshift not installed" - fi -} -# Function for keeping ssh-agent happy -function yssh(){ - echo "export SSH_AUTH_SOCK=$SSH_AUTH_SOCK" > ~/.ssh/auth_ssh -} # Determine git branch and index status function show_git_info(){ local results="" @@ -66,47 +77,13 @@ function sojourner_tmux(){ # If there is no session named Sojourner if [ $? != 0 ] ; then # Create a new session named Sojourner - tmux new-session -s Sojourner -d -c ~/ + tmux new-session -s Sojourner -d fi + # Get our SSH socket documented + echo "export SSH_AUTH_SOCK=$SSH_AUTH_SOCK" > ~/.ssh/auth_ssh # Attack to the Sojourner session tmux attach -t Sojourner else echo "Tmux not installed." fi } -#=============================================================================== -# Path -#=============================================================================== -# Ruby Gems -if which ruby >/dev/null && which gem >/dev/null; then - PATH="$(ruby -rubygems -e 'puts Gem.user_dir')/bin:$PATH" -fi -# Custom stuff -PATH="$HOME/bin:$PATH" -# Add Python to path -PYTHONPATH="${PYTHONPATH}" -export PYTHONPATH -# RVM. Make sure this is the last PATH variable change. -PATH="$PATH:$HOME/.rvm/bin" -# Set it. -export PATH -#=============================================================================== -# Defaults -#=============================================================================== -# Set editor, if Vim is available -type vim >/dev/null 2>&1 -if [[ $? == 0 ]]; then - export EDITOR=vim -fi -# History size and time-format -export HISTSIZE=10000 -export HISTTIMEFORMAT="%s " -#=============================================================================== -# Random Shit often auto-added -#=============================================================================== -# Hook for desk activation -[ -n "$DESK_ENV" ] && source "$DESK_ENV" || true - -# Yubikey support -# eval "$(ssh-agent -s)" &> /dev/null -export SSH_AUTH_SOCK=$HOME/.yubiagent/sock From 403007942908dddab4f7fa0050b95bd58fea0c51 Mon Sep 17 00:00:00 2001 From: Bill Niblock Date: Thu, 1 Aug 2019 15:50:53 +0000 Subject: [PATCH 2/8] Fix makefile --- makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makefile b/makefile index 53db370..4053a17 100644 --- a/makefile +++ b/makefile @@ -54,7 +54,7 @@ install-vim-config: ## Create vimrc file and vim directory in Home directory ln -s -- "$(CURDIR)"/vim/vimrc "$(HOME)"/.vimrc ; \ fi @if [ ! -d "$(HOME)"/.vim ] ; then \ - mkdir "$(HOME)"/.vim \ + mkdir "$(HOME)"/.vim ; \ fi @cp -uir -- "$(CURDIR)"/vim/vim/ "$(HOME)"/.vim/ From f6a3a1781a5d81f5ce6342117e648b07c88df93c Mon Sep 17 00:00:00 2001 From: Bill Niblock Date: Thu, 1 Aug 2019 16:18:43 +0000 Subject: [PATCH 3/8] Organize vim config and colors --- .../colors/start}/minimalist.vim | 0 .../colors/start}/solarized.vim | 0 vim/vimrc | 29 ++++++++++++------- 3 files changed, 18 insertions(+), 11 deletions(-) rename vim/vim/{colors => pack/colors/start}/minimalist.vim (100%) rename vim/vim/{colors => pack/colors/start}/solarized.vim (100%) diff --git a/vim/vim/colors/minimalist.vim b/vim/vim/pack/colors/start/minimalist.vim similarity index 100% rename from vim/vim/colors/minimalist.vim rename to vim/vim/pack/colors/start/minimalist.vim diff --git a/vim/vim/colors/solarized.vim b/vim/vim/pack/colors/start/solarized.vim similarity index 100% rename from vim/vim/colors/solarized.vim rename to vim/vim/pack/colors/start/solarized.vim diff --git a/vim/vimrc b/vim/vimrc index da8f059..11624a7 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -18,10 +18,12 @@ set autoread " Auto-reload modified files set hidden " Allow for un-saved buffers set autochdir " Change directory automatically +set clipboard+=unnamed " Include the global buffer + set autoindent " Enable auto-indentation set expandtab " Spaces for tab -set shiftwidth=4 " Spaces per shift -set softtabstop=4 " Spaces to use when editing +set shiftwidth=2 " Spaces per shift +set softtabstop=2 " Spaces to use when editing set listchars=tab:>-,trail:ยท " Show me tabs and spaces set number " Enable line numbers @@ -47,9 +49,20 @@ let g:netrw_banner=0 " Disable the netrw banner augroup ruby_settings " Custom settings: Ruby{-like} autocmd! autocmd FileType ruby,eruby,yaml - \ setlocal shiftwidth=2 - \ softtabstop=2 - \ makeprg=rubocop + \ setlocal makeprg=rubocop +augroup END + +augroup python_settings " Custom settings: Python-like + autocmd! + autocmd FileType py + \ setlocal shiftwidth=4 + \ softtabstop=4 +augroup END + +augroup shell_settings " Custom settings: Shell-like + autocmd! + autocmd FileType sh + \ setlocal makeprg=shellcheck augroup END augroup spellcheckr " Spelling, for some files... @@ -197,9 +210,3 @@ function! TmuxWrite(pane, line1, line2) abort return 'echoerr '.string(v:exception) endtry endfunction -" ============================================================================== -" Plugins -" ============================================================================== -if filereadable(expand('~/.vimrc-plugins')) - source ~/.vimrc-plugins -endif From 25c4e4a3c7b8754148ce3c9d5a7818969a3c22e8 Mon Sep 17 00:00:00 2001 From: Bill Niblock Date: Thu, 1 Aug 2019 16:22:52 +0000 Subject: [PATCH 4/8] Vim: Use native plugin system --- .gitmodules | 12 ++++++++++++ vim/vim/pack/plugins/start/vim-commentary | 1 + vim/vim/pack/plugins/start/vim-fugitive | 1 + vim/vim/pack/plugins/start/vim-polyglot | 1 + vim/vim/pack/plugins/start/vim-unimpaired | 1 + vim/vimrc-plugins | 20 -------------------- 6 files changed, 16 insertions(+), 20 deletions(-) create mode 100644 .gitmodules create mode 160000 vim/vim/pack/plugins/start/vim-commentary create mode 160000 vim/vim/pack/plugins/start/vim-fugitive create mode 160000 vim/vim/pack/plugins/start/vim-polyglot create mode 160000 vim/vim/pack/plugins/start/vim-unimpaired delete mode 100644 vim/vimrc-plugins diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..a914742 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,12 @@ +[submodule "vim/vim/pack/plugins/start/vim-fugitive"] + path = vim/vim/pack/plugins/start/vim-fugitive + url = https://github.com/tpope/vim-fugitive.git +[submodule "vim/vim/pack/plugins/start/vim-unimpaired"] + path = vim/vim/pack/plugins/start/vim-unimpaired + url = https://github.com/tpope/vim-unimpaired.git +[submodule "vim/vim/pack/plugins/start/vim-commentary"] + path = vim/vim/pack/plugins/start/vim-commentary + url = https://github.com/tpope/vim-commentary.git +[submodule "vim/vim/pack/plugins/start/vim-polyglot"] + path = vim/vim/pack/plugins/start/vim-polyglot + url = https://github.com/sheerun/vim-polyglot.git diff --git a/vim/vim/pack/plugins/start/vim-commentary b/vim/vim/pack/plugins/start/vim-commentary new file mode 160000 index 0000000..141d9d3 --- /dev/null +++ b/vim/vim/pack/plugins/start/vim-commentary @@ -0,0 +1 @@ +Subproject commit 141d9d32a9fb58fe474fcc89cd7221eb2dd57b3a diff --git a/vim/vim/pack/plugins/start/vim-fugitive b/vim/vim/pack/plugins/start/vim-fugitive new file mode 160000 index 0000000..44ade58 --- /dev/null +++ b/vim/vim/pack/plugins/start/vim-fugitive @@ -0,0 +1 @@ +Subproject commit 44ade58ed509f7b21608ae061223d4ffef1e19d8 diff --git a/vim/vim/pack/plugins/start/vim-polyglot b/vim/vim/pack/plugins/start/vim-polyglot new file mode 160000 index 0000000..3ddca5d --- /dev/null +++ b/vim/vim/pack/plugins/start/vim-polyglot @@ -0,0 +1 @@ +Subproject commit 3ddca5da461ebfaa82104f82e3cbf19d1c326ade diff --git a/vim/vim/pack/plugins/start/vim-unimpaired b/vim/vim/pack/plugins/start/vim-unimpaired new file mode 160000 index 0000000..a49c4f2 --- /dev/null +++ b/vim/vim/pack/plugins/start/vim-unimpaired @@ -0,0 +1 @@ +Subproject commit a49c4f2bf05f18a6e4f6572a19763ba7abba52b1 diff --git a/vim/vimrc-plugins b/vim/vimrc-plugins deleted file mode 100644 index d0e9dcb..0000000 --- a/vim/vimrc-plugins +++ /dev/null @@ -1,20 +0,0 @@ -" ============================================================================== -" vimrc-plugins: Plug-in configuration. Using vim-plug. -" ============================================================================== -" Fetch & Install Self -if empty(glob('~/.vim/autoload/plug.vim')) - silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs - \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim - autocmd VimEnter * PlugInstall | source $MYVIMRC -endif - -call plug#begin('~/.vim/bundle') - Plug 'tpope/vim-fugitive' - Plug 'tpope/vim-unimpaired' - Plug 'tpope/vim-commentary' - - "Plug 'ludovicchabant/vim-gutentags' - Plug 'sheerun/vim-polyglot' - - Plug 'junegunn/goyo.vim' -call plug#end() From ae603b42f13454402bd771df29b93049d7991bb1 Mon Sep 17 00:00:00 2001 From: Bill Niblock Date: Thu, 1 Aug 2019 20:48:45 +0000 Subject: [PATCH 5/8] Gitignore: Pare down rules --- .gitignore | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.gitignore b/.gitignore index d22ca31..2a06305 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,5 @@ #Local Gitignore for Repo# ########################## -# Ignore Plug-related directories -vim/vim/autoload -vim/vim/bundle - # Ignore undo files *.un~ From 09817ac8d4a17001baf9f10365dc618b4c250fda Mon Sep 17 00:00:00 2001 From: Bill Niblock Date: Thu, 1 Aug 2019 21:08:13 +0000 Subject: [PATCH 6/8] Makefile: Add functionality for submodule plugins --- makefile | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/makefile b/makefile index 4053a17..70d3435 100644 --- a/makefile +++ b/makefile @@ -7,13 +7,11 @@ build-simple \ clean-all \ install-vim-config \ - install-vim-dir \ - install-vim-plugin \ + install-vim-plugins \ install-git \ install-tmux \ install-bash-config \ install-bash-profile \ - install-irssi .DEFAULT-GOAL := help #=============================================================================== @@ -31,8 +29,7 @@ link-dotfiles: ## Create dotfiles link in Home directory build-default: ## Create default environment, using all dotfiles build-default: link-dotfiles \ install-vim-config \ - install-vim-dir \ - install-vim-plugin \ + install-vim-plugins \ install-git \ install-tmux \ install-bash-config @@ -56,16 +53,15 @@ install-vim-config: ## Create vimrc file and vim directory in Home directory @if [ ! -d "$(HOME)"/.vim ] ; then \ mkdir "$(HOME)"/.vim ; \ fi - @cp -uir -- "$(CURDIR)"/vim/vim/ "$(HOME)"/.vim/ + @echo "Copying Vim directory into ~/.vim" + @cp -uir -- "$(CURDIR)"/vim/vim/* "$(HOME)"/.vim/ -install-vim-plugin: ## Create vimrc-plugins (Plugin file) in Home directory -install-vim-plugin: install-vim-config - @if [ -L "$(HOME)"/.vimrc-plugins ] ; then \ - echo "File vimrc-plugins already linked; skipping." ; \ - else \ - echo "Linking vimrc-plugins to ~/.vimrc-plugins" ; \ - ln -s -- "$(CURDIR)"/vim/vimrc-plugins "$(HOME)"/.vimrc-plugins ; \ - fi +install-vim-plugins: ## Install configure Vim plugin submodules +install-vim-plugins: install-vim-config + @echo "Updating all submodules" + @git submodule foreach git pull origin master + @echo "Updating Vim helptags" + @vim -u NONE -c "helptags ALL" -c q install-git: ## Create git config and ignore files in Home directory @cp -i -- "$(CURDIR)"/git/gitconfig "$(HOME)"/.gitconfig From a0aedf8f69b4a30f230eccc8efdbefcccb76bb00 Mon Sep 17 00:00:00 2001 From: Bill Niblock Date: Thu, 1 Aug 2019 21:09:51 +0000 Subject: [PATCH 7/8] Update submodules --- vim/vim/pack/plugins/start/vim-fugitive | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vim/vim/pack/plugins/start/vim-fugitive b/vim/vim/pack/plugins/start/vim-fugitive index 44ade58..7df9f07 160000 --- a/vim/vim/pack/plugins/start/vim-fugitive +++ b/vim/vim/pack/plugins/start/vim-fugitive @@ -1 +1 @@ -Subproject commit 44ade58ed509f7b21608ae061223d4ffef1e19d8 +Subproject commit 7df9f07e1fd53d560f2e352d5faa3eba92cd1582 From 2c3d92f674f222077c3b8230554688ddfd462651 Mon Sep 17 00:00:00 2001 From: Bill Niblock Date: Thu, 1 Aug 2019 22:08:49 +0000 Subject: [PATCH 8/8] Firefox: Remove unused configs --- firefox/ffz-settings.json | 60 --------------------- firefox/mytab.html | 109 -------------------------------------- 2 files changed, 169 deletions(-) delete mode 100644 firefox/ffz-settings.json delete mode 100644 firefox/mytab.html diff --git a/firefox/ffz-settings.json b/firefox/ffz-settings.json deleted file mode 100644 index 9aa94da..0000000 --- a/firefox/ffz-settings.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "version": 1, - "script_version": "3.5.318", - "aliases": {}, - "settings": { - "advanced_settings": true, - "favorite_settings": [ - "auto_theater", - "dark_twitch", - "channel_views", - "srl_races", - "stream_title", - "parse_emoticons", - "replace_bad_emotes", - "room_status", - "emoji_in_menu", - "global_emotes_in_menu", - "replace_twitch_menu", - "input_emoticons_case_sensitive", - "input_complete_name_at", - "input_complete_name_require_at", - "emote_image_hover", - "player_volume_bar", - "sidebar_hide_more_at_twitch", - "sidebar_hide_promoted_games", - "sidebar_hide_recommended_channels", - "sidebar_directly_to_followed_channels", - "hide_conversations_in_theatre", - "minimize_conversations" - ], - "twenty_four_timestamps": 2, - "auto_theater": true, - "player_volume_bar": true, - "emote_image_hover": true, - "chat_rows": true, - "chat_padding": true, - "minimal_chat": 3, - "top_conversations": false, - "hide_conversations_in_theatre": true, - "minimize_conversations": true, - "input_complete_name_require_at": true, - "sidebar_hide_recommended_channels": true, - "sidebar_hide_promoted_games": true, - "sidebar_hide_more_at_twitch": true, - "sidebar_directly_to_followed_channels": true, - "twitch_chat_dark": false, - "dark_twitch": true, - "dark_no_blue": true, - "replace_twitch_menu": true, - "global_emotes_in_menu": true, - "emoji_in_menu": true, - "emote_menu_collapsed": [ - "twitch-2237", - "twitch-11261", - "ffz-3", - "twitch-0" - ], - "warp_world": false - } -} \ No newline at end of file diff --git a/firefox/mytab.html b/firefox/mytab.html deleted file mode 100644 index 5333dc3..0000000 --- a/firefox/mytab.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - ++ H O M E ++ - - - - -
-
    -
      -
    • Mail
    • -
    • G
    • -
    • Y
    • -
    -
      -
    • Cloud
    • -
    • D
    • -
    • L
    • -
    • GH
    • -
    -
-
- -
- - - - -
- - -