Compare commits

..

No commits in common. "be0dd678dcaeb716ffb54e0bf6d0eeac3814038d" and "e0ff2faeba47aff71a7e48f9ab46778cae4904e6" have entirely different histories.

10 changed files with 49 additions and 177 deletions

View File

@ -1,23 +1,14 @@
# For Rust stuff, uncomment this line # For Rust stuff, uncomment this line
#. "$HOME/.cargo/env" #. "$HOME/.cargo/env"
alias kapp-git='git config --global user.name "Shaun Reed" && git config --global user.email "shaunrd0@gmail.com"'
if [ -f /.dockerenv ]; then
export DOT_PACKAGES='git stow vim tmux ranger clang wget curl'
alias kapp-update='apt update -y && apt upgrade -y && apt upgrade --fix-broken --fix-missing --auto-remove'
alias kapp-init='apt update -y && apt install $DOT_PACKAGES -y'
alias kapp-swap='swapoff -a && swapon -a'
else
export DOT_PACKAGES='git stow vim xsel xclip tmux ranger clang yakuake wget curl'
alias kapp-update='sudo apt update -y && sudo apt upgrade -y && sudo apt upgrade --fix-broken --fix-missing --auto-remove'
alias kapp-init='sudo apt update -y && sudo apt install $DOT_PACKAGES'
# Clear kscreen cached settings # Clear kscreen cached settings
alias kapp-kscreen='rm -rf ~/.local/share/kscreen/*' alias kapp-kscreen='rm -rf ~/.local/share/kscreen/*'
# Restart plasmashell # Restart plasmashell
alias kapp-plasmashell='sudo pkill plasmashell && plasmashell --replace &> /dev/null &' alias kapp-plasmashell='sudo pkill plasmashell && plasmashell --replace &> /dev/null &'
# Clear swap
alias kapp-swap='sudo swapoff -a && sudo swapon -a' alias kapp-swap='sudo swapoff -a && sudo swapon -a'
alias kapp-vbox='ps aux www |grep 'VBoxClient --draganddrop' | awk '{print $2}' | xargs kill' alias kapp-git='git config --global user.name "Shaun Reed" && git config --global user.email "shaunrd0@gmail.com"'
fi alias kapp-update='sudo apt update -y && sudo apt upgrade -y && sudo apt upgrade --fix-broken --fix-missing --auto-remove'
# Alias / export customizations # Alias / export customizations
@ -94,12 +85,3 @@ export LESS='--mouse --wheel-lines 2'
# + -#2 to shift 2 columns horizontally when right / left arrow is pressed # + -#2 to shift 2 columns horizontally when right / left arrow is pressed
export LESS="$LESS -R -w -#2" export LESS="$LESS -R -w -#2"
if ! [ command -v conda &>/dev/null ] && [ -e ~/Code/Clones/mambaforge/bin/conda ] && ! grep -e conda ~/.bashrc &>/dev/null; then
if ! (~/Code/Clones/mambaforge/bin/conda init | awk -F "==>" '{print $1}'); then
echo "[dot] ERROR: Failed to initialize Conda."
fi
echo "[dot] WARN: Ran \`conda init\`; Conda was installed but not initialized"
source ~/.bashrc
fi

View File

@ -1,28 +0,0 @@
tmux:
symbols:
branch: "B:"
hashprefix: ':'
ahead: '->'
behind: '<-'
staged: ''
conflict: 'X'
modified: '+'
untracked: '...'
stashed: '[]'
clean: '$'
styles:
clear: '#[fg=default]'
state: '#[fg=red,bold]'
branch: '#[fg=white,bold]'
remote: '#[fg=cyan]'
staged: '#[fg=green,bold]'
conflict: '#[fg=red,bold]'
modified: '#[fg=red,bold]'
untracked: '#[fg=magenta,bold]'
stashed: '#[fg=cyan,bold]'
clean: '#[fg=green,bold]'
divergence: '#[fg=default]'
layout: ["#[bold]", branch, remote-branch, divergence, ' - ', flags]
options:
branch_max_len: 30
branch_trim: right

View File

@ -57,6 +57,9 @@ bind -n M-Right select-pane -R
bind -n M-Up select-pane -U bind -n M-Up select-pane -U
bind -n M-Down select-pane -D bind -n M-Down select-pane -D
# Can't use theme plugin without risk of repo update overwriting data?
#source-file "${HOME}/.tmux-themepack/powerline/double/green.tmuxtheme"
set-option -g status-position top set-option -g status-position top
# Status update interval # Status update interval
set -g status-interval 1 set -g status-interval 1
@ -66,15 +69,17 @@ set -g status-style fg=colour240,bg=colour233
# Left side of status bar # Left side of status bar
set -g status-left-style bg=colour233,fg=colour243 set -g status-left-style bg=colour233,fg=colour243
set -g status-left-length 40 set -g status-left-length 40
# Note: Powerline font requires alternate of bold on right side
# + Corrects gap on right of character that reveals BG color
# Note: No bold required, no BG reveal produced by symbol gaps on left side # Note: No bold required, no BG reveal produced by symbol gaps on left side
# + Font: Sauce Code Pro (NERD patch) #+ Font: Powerline Consolas
set -g status-left "#[fg=colour233,bg=colour100,bold] #S #[fg=colour100,bg=colour240,nobold]#[fg=colour233,bg=colour240] #(whoami) #[fg=colour240,bg=colour235]#[fg=colour240,bg=colour235] #(hostname) #[fg=colour235,bg=colour233]#[fg=colour240,bg=colour233]"
# Right side of status bar # Right side of status bar
set -g status-right-style bg=colour233,fg=colour243 set -g status-right-style bg=colour233,fg=colour243
set -g status-right-length 100 set -g status-right-length 100
# Note: Powerline font requires alternate of bold on right side
# Corrects gap on right of character that reveals BG color
#+ Font: Powerline Consolas
set -g status-right "#[fg=colour235,bg=colour233,bold]#[fg=colour240,bg=colour235,nobold] %H:%M:%S #[fg=colour240,bg=colour235,bold]#[fg=colour233,bg=colour240,nobold] %d-%b-%y #[fg=colour100,bg=colour240,bold]#[fg=colour233,bg=colour100,bold] #(cd #{pane_current_path}; basename `git rev-parse --show-toplevel`) "
# Set gitmux to appear in center of tmux status bar # Set gitmux to appear in center of tmux status bar
run 'bash -c "if command -v $HOME/go/bin/gitmux &>/dev/null; then test -f $HOME/.gitmux.conf || $HOME/go/bin/gitmux -printcfg > $HOME/.gitmux.conf; fi"' run 'bash -c "if command -v $HOME/go/bin/gitmux &>/dev/null; then test -f $HOME/.gitmux.conf || $HOME/go/bin/gitmux -printcfg > $HOME/.gitmux.conf; fi"'
@ -82,12 +87,6 @@ set -g window-status-current-format "#($HOME/go/bin/gitmux -cfg $HOME/.gitmux.co
# Or if you don't want gitmux # Or if you don't want gitmux
#set -g window-status-current-format "#[fg=colour255,bg=colour233]#[fg=colour100,nobold] #(whoami)@#H #[fg=colour255,bg=colour233,nobold]" #set -g window-status-current-format "#[fg=colour255,bg=colour233]#[fg=colour100,nobold] #(whoami)@#H #[fg=colour255,bg=colour233,nobold]"
run-shell "bash ~/.tmux/tmux-conf.sh"
# Check if we are running xorg
#set -g status-left "#[fg=colour233,bg=colour100,bold] #S #[fg=colour100,bg=colour240,nobold]#[fg=colour233,bg=colour240] #(whoami) #[fg=colour240,bg=colour235]#[fg=colour240,bg=colour235] #(hostname) #[fg=colour235,bg=colour233]#[fg=colour240,bg=colour233]"
#set -g status-right "#[fg=colour235,bg=colour233,bold]#[fg=colour240,bg=colour235,nobold] %H:%M:%S #[fg=colour240,bg=colour235,bold]#[fg=colour233,bg=colour240,nobold] %d-%b-%y #[fg=colour100,bg=colour240,bold]#[fg=colour233,bg=colour100,bold] #(cd #{pane_current_path}; basename `git rev-parse --show-toplevel`) "
# Current window status # Current window status
set -g window-status-current-style bg=colour233,fg=colour100 set -g window-status-current-style bg=colour233,fg=colour100
# Window with activity status # Window with activity status
@ -114,3 +113,22 @@ set -g default-terminal "screen-256color"
# Mode # Mode
set -g mode-style bg=colour100,fg=colour235 set -g mode-style bg=colour100,fg=colour235
# List of plugins and their settings
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'nhdaly/tmux-better-mouse-mode'
set -g @scroll-speed-num-lines-per-scroll 2
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @yank_action 'copy-pipe-no-clear'
bind -T copy-mode C-c send -X copy-pipe-no-clear "xsel -i --clipboard"
bind -T copy-mode-vi C-c send -X copy-pipe-no-clear "xsel -i --clipboard"
#set -g @plugin 'tmux-plugins/tmux-sensible'
#set -g @plugin 'kristijanhusak/tmux-simple-git-status'
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'git@github.com/user/plugin'
# set -g @plugin 'git@bitbucket.com/user/plugin'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'

View File

@ -1,20 +0,0 @@
set -g status-left "#[fg=colour233,bg=colour100,bold] #S #[fg=colour100,bg=colour240,nobold]#[fg=colour233,bg=colour240] #(whoami) #[fg=colour240,bg=colour235]#[fg=colour240,bg=colour235] #(hostname) #[fg=colour235,bg=colour233]#[fg=colour240,bg=colour233]"
set -g status-right "#[fg=colour235,bg=colour233,bold]#[fg=colour240,bg=colour235,nobold] %H:%M:%S #[fg=colour240,bg=colour235,bold]#[fg=colour233,bg=colour240,nobold] %d-%b-%y #[fg=colour100,bg=colour240,bold]#[fg=colour233,bg=colour100,bold] #(cd #{pane_current_path}; basename `git rev-parse --show-toplevel`) "
# List of plugins and their settings
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'nhdaly/tmux-better-mouse-mode'
set -g @scroll-speed-num-lines-per-scroll 2
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @yank_action 'copy-pipe-no-clear'
bind -T copy-mode C-c send -X copy-pipe-no-clear "xsel -i --clipboard"
bind -T copy-mode-vi C-c send -X copy-pipe-no-clear "xsel -i --clipboard"
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'git@github.com/user/plugin'
# set -g @plugin 'git@bitbucket.com/user/plugin'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'

View File

@ -1,16 +0,0 @@
set -g status-left "#[fg=colour233,bg=colour100,bold] #S #[fg=colour100,bg=colour240,nobold]#[fg=colour233,bg=colour240] #(whoami) #[fg=colour240,bg=colour235]#[fg=colour240,bg=colour235] #(hostname) #[fg=colour235,bg=colour233]#[fg=colour240,bg=colour233]"
set -g status-right "#[fg=colour235,bg=colour233,bold]#[fg=colour240,bg=colour235,nobold] %H:%M:%S #[fg=colour240,bg=colour235,bold]#[fg=colour233,bg=colour240,nobold] %d-%b-%y #[fg=colour100,bg=colour240,bold]#[fg=colour233,bg=colour100,bold] #(cd #{pane_current_path}; basename `git rev-parse --show-toplevel`) "
# List of plugins and their settings
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'nhdaly/tmux-better-mouse-mode'
set -g @scroll-speed-num-lines-per-scroll 2
set -g @plugin 'tmux-plugins/tpm'
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'git@github.com/user/plugin'
# set -g @plugin 'git@bitbucket.com/user/plugin'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'

View File

@ -1,7 +0,0 @@
#!/bin/bash
if [ -z ${DISPLAY+notset} ]; then
tmux source-file ~/.tmux/.tmux-tty.conf
else
tmux source-file ~/.tmux/.tmux-gui.conf
fi

45
.vimrc
View File

@ -2,9 +2,6 @@
" Double-quotes are commented out code and can be removed or added " Double-quotes are commented out code and can be removed or added
" General Vim Settings " General Vim Settings
let is_docker = filereadable(expand('/.dockerenv'))
let has_sauce = filereadable(expand('~/.local/share/fonts/sauce-code-pro.otf'))
let is_xorg = exists("$DISPLAY")
" Highlight the column cursor is on " Highlight the column cursor is on
" May slow screen redraw time, so off by default " May slow screen redraw time, so off by default
@ -141,13 +138,15 @@ nnoremap <C-c> :ColorToggle<CR>
set termencoding=utf-8 set termencoding=utf-8
set encoding=utf-8 set encoding=utf-8
" air-line
let g:airline_powerline_fonts = 1 let g:airline_powerline_fonts = 1
if !exists('g:airline_symbols') if !exists('g:airline_symbols')
let g:airline_symbols = {} let g:airline_symbols = {}
endif endif
" Set glyphs based on font availability and environment (xorg / docker) if (exists("$SAUCE"))
if and(and(has_sauce, is_xorg), !is_docker) " airline symbols
let g:airline_left_sep = '' let g:airline_left_sep = ''
let g:airline_left_alt_sep = '' let g:airline_left_alt_sep = ''
let g:airline_right_sep = '' let g:airline_right_sep = ''
@ -155,50 +154,20 @@ if and(and(has_sauce, is_xorg), !is_docker)
let g:airline_symbols.branch = '' let g:airline_symbols.branch = ''
let g:airline_symbols.readonly = '' let g:airline_symbols.readonly = ''
let g:airline_symbols.linenr = '' let g:airline_symbols.linenr = ''
elseif is_xorg else
" unicode symbols " unicode symbols
let g:airline_left_sep = '»' let g:airline_left_sep = '»'
let g:airline_left_sep = '▶' let g:airline_left_sep = '▶'
let g:airline_right_sep = '«' let g:airline_right_sep = '«'
let g:airline_right_sep = '◀' let g:airline_right_sep = '◀'
let g:airline_symbols.colnr = ' ㏇:' let g:airline_symbols.linenr = '␊'
let g:airline_symbols.colnr = ' ℅:' let g:airline_symbols.linenr = '␤'
let g:airline_symbols.crypt = '🔒'
let g:airline_symbols.linenr = '☰'
let g:airline_symbols.linenr = ' ␊:'
let g:airline_symbols.linenr = ' ␤:'
let g:airline_symbols.linenr = '¶' let g:airline_symbols.linenr = '¶'
let g:airline_symbols.maxlinenr = ''
let g:airline_symbols.maxlinenr = '㏑'
let g:airline_symbols.branch = '⎇' let g:airline_symbols.branch = '⎇'
let g:airline_symbols.paste = 'ρ' let g:airline_symbols.paste = 'ρ'
let g:airline_symbols.paste = 'Þ' let g:airline_symbols.paste = 'Þ'
let g:airline_symbols.paste = '∥' let g:airline_symbols.paste = '∥'
let g:airline_symbols.spell = 'Ꞩ'
let g:airline_symbols.notexists = 'Ɇ'
let g:airline_symbols.whitespace = 'Ξ' let g:airline_symbols.whitespace = 'Ξ'
else
" unicode symbols
let g:airline_left_sep = ''
let g:airline_left_sep = ''
let g:airline_right_sep = ''
let g:airline_right_sep = ''
let g:airline_symbols.colnr = ''
let g:airline_symbols.colnr = ''
let g:airline_symbols.crypt = ''
let g:airline_symbols.linenr = ''
let g:airline_symbols.linenr = ''
let g:airline_symbols.linenr = ''
let g:airline_symbols.linenr = ''
let g:airline_symbols.maxlinenr = ''
let g:airline_symbols.maxlinenr = ''
let g:airline_symbols.branch = ''
let g:airline_symbols.paste = ''
let g:airline_symbols.paste = ''
let g:airline_symbols.paste = ''
let g:airline_symbols.spell = ''
let g:airline_symbols.notexists = ''
let g:airline_symbols.whitespace = ''
endif endif
" Clang completeion settings " Clang completeion settings

View File

@ -1,13 +0,0 @@
ARG REPO='https://git.shaunreed.com/shaunrd0/dot'
FROM ubuntu:latest
COPY . /dot
ENV TERM=xterm-256color
# Install additional packages we need
RUN apt update -y && apt upgrade -y
RUN apt install -y git stow vim tmux ranger clang wget curl golang-go
RUN go install github.com/arl/gitmux@latest
# Update submodules for plugins
RUN cd /dot && git submodule update --init && cp .gitmux.conf.docker .gitmux.conf
RUN rm ~/.bashrc && rm -rf /dot/.tmux/plugins/tmux-yank
RUN cd /dot && stow -t /root .

View File

@ -11,7 +11,7 @@ Once installed, editing source code in vim supports features displayed in the sc
Easiest installation is to clone repository into home directory - Easiest installation is to clone repository into home directory -
```bash ```bash
sudo apt install git stow vim xsel xclip tmux ranger clang yakuake wget curl sudo apt install vim xsel xclip tmux ranger clang yakuake
git clone --recursive https://github.com/shaunrd0/dot ~/dot git clone --recursive https://github.com/shaunrd0/dot ~/dot
cd ~/dot/ cd ~/dot/
stow --adopt . stow --adopt .
@ -27,7 +27,7 @@ stow --adopt -t ~ .
**Warning:** `--adopt` is used to link conflicting files, but doing so could result in the loss of some configs within your local copy of the repository and on your local system. **Warning:** `--adopt` is used to link conflicting files, but doing so could result in the loss of some configs within your local copy of the repository and on your local system.
After running `stow --adopt .`, be sure to check `git status` is clean. After running `stow --adopt .`, be sure to check `git status` is clean.
If a file has been modified, discard the local changes to be up-to-date with `origin/master` and it will be restored on your system as well, since the files are now linked. **Your conflicting local system configurations will be lost** unless you back them up manually. If a file has been modified, discard the local changes to be up-to-date with `origin/master` and it will be restored on your system as well, since the files are now linked.
We could run the following commands to restore changed files We could run the following commands to restore changed files
```bash ```bash
@ -52,24 +52,6 @@ Submodule path '.vim/bundle/vim-signify': checked out '16eee41d2b267523b84bd4ac1
``` ```
### Docker
You can run these dotfiles in a docker container -
```bash
git clone git@github.com:shaunrd0/dot.git
cd dot
docker build -t dot .
docker run -it dot bash
```
This container has the following packages installed and uses `ubuntu:latest` as a base.
```
git stow vim tmux ranger clang wget curl golang-go
```
### Install Clang Completion ### Install Clang Completion
**These configurations require the installation of clang for clang completion** **These configurations require the installation of clang for clang completion**

5
fix-vbox.sh Executable file
View File

@ -0,0 +1,5 @@
# A fix for a common issue found in virtual box
# https://forums.linuxmint.com/viewtopic.php?t=247850
# https://askubuntu.com/questions/1014172/virtualbox-unresponsive-area-on-desktop
#################################################################################
ps aux www |grep 'VBoxClient --draganddrop' | awk '{print $2}' | xargs kill