Compare commits

..

1 Commits

Author SHA1 Message Date
Shaun Reed c08214e16e Initial commit for Kubuntu branch
+ Migrate yakuake settings from master
2021-12-18 21:47:53 -05:00
24 changed files with 173 additions and 461 deletions

View File

@ -1,23 +1,10 @@
# For Rust stuff, uncomment this line
#. "$HOME/.cargo/env"
# Aliases to use the correct python version
# + Because python doesn't know how to update.. :')
alias python3='python3.9'
alias pip3='python3.9 -m pip'
alias ,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 ,update='apt update -y && apt upgrade -y && apt upgrade --fix-broken --fix-missing --auto-remove'
alias ,init='apt update -y && apt install $DOT_PACKAGES -y'
alias ,swap='swapoff -a && swapon -a'
else
export DOT_PACKAGES='git stow vim xsel xclip tmux ranger clang yakuake wget curl'
alias ,update='sudo apt update -y && sudo apt upgrade -y && sudo apt upgrade --fix-broken --fix-missing --auto-remove'
alias ,init='sudo apt update -y && sudo apt install $DOT_PACKAGES'
# Clear kscreen cached settings
alias ,kscreen='rm -rf ~/.local/share/kscreen/*'
# Restart plasmashell
alias ,plasmashell='sudo pkill plasmashell && plasmashell --replace &> /dev/null &'
alias ,swap='sudo swapoff -a && sudo swapon -a'
alias ,vbox="ps aux www |grep 'VBoxClient --draganddrop' | awk '{print $2}' | xargs kill"
fi
alias kapp-git='git config --global user.name "Shaun Reed" && git config --global user.email "shaunrd0@gmail.com"'
alias kapp-update='sudo apt update -y && sudo apt upgrade -y && sudo apt upgrade --fix-broken --fix-missing --auto-remove'
# Alias / export customizations
@ -35,71 +22,15 @@ alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo
export EDITOR="vim"
export VISUAL="vim"
export LS_COLORS="di=1;34:ln=31;47:so=32:pi=33:ex=1;32:bd=34;46:cd=34;43:su=30;41:sg=30;46:tw=30;42:ow=30;43"
export PATH=$PATH:/opt/:$HOME/.local/bin/:$HOME/.dotnet:$HOME/go/bin/
export DOTNET_ROOT=$HOME/.dotnet
export PATH=$PATH:/opt/:/home/kapper/.local/bin/
# Example path for autocompletion using libclang-9-dev package, obtained by the following command
export LIBCLANG="$(command -v clang &>/dev/null && ldconfig -p | sort | grep libclang-[0-9]. | awk -F "> " '{print$2}' | tail -n 1)"
# find /usr/ -name libclang.so.1 2>/dev/null
export LIBCLANG="/usr/lib/llvm-10/lib/libclang.so.1"
# Source a top-secret alias file
if [ -e ~/.bash_secrets ]; then
if [ -f ~/.bash_secrets ]; then
. ~/.bash_secrets
fi
if command -v tmux &> /dev/null && [ -n "$PS1" ] && [[ ! "$TERM" =~ screen ]] && [[ ! "$TERM" =~ tmux ]] && [ -z "$TMUX" ]; then
exec tmux
fi
# Set the default terminal to use konsole, with kapper profile
# + Execute tmux on start
if [ -e ~/.local/share/konsole/kapper.profile ]; then
if command -v tmux &>/dev/null; then
export TERMINAL='konsole --profile kapper -e tmux'
else
export TERMINAL='konsole --profile kapper'
fi
fi
# Conditionally enables font glyphs in .vimrc if available
if [ -e ~/.local/share/fonts/sauce-code-pro.otf ]; then
export SAUCE=1
fi
# Less colors for man pages
export PAGER=less
default=$(tput sgr0)
red=$(tput setaf 1)
green=$(tput setaf 2)
purple=$(tput setaf 5)
orange=$(tput setaf 9)
# Begin blinking
export LESS_TERMCAP_mb=$red
# Begin bold
export LESS_TERMCAP_md=$orange
# End mode
export LESS_TERMCAP_me=$default
# End standout-mode
export LESS_TERMCAP_se=$default
# Begin standout-mode - info box
export LESS_TERMCAP_so=$purple
# End underline
export LESS_TERMCAP_ue=$default
# Begin underline
export LESS_TERMCAP_us=$green
# Allow mouse wheel movement for less output (manpages, diffs)
export LESS='--mouse --wheel-lines 2'
# Set additional flags for less
# + -R for raw control characters
# + -w to highlight first unread line when jumping N>1 lines down
# + -#2 to shift 2 columns horizontally when right / left arrow is pressed
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

@ -115,3 +115,4 @@ if ! shopt -oq posix; then
. /etc/bash_completion
fi
fi
. "$HOME/.cargo/env"

@ -1 +0,0 @@
Subproject commit 1fa1d0f29047979b9ffd541eb330756ac4b348ab

View File

@ -764,6 +764,3 @@ tmap <delete> eval -q fm.ui.taskview.task_remove()
tmap <C-l> redraw_window
tmap <ESC> taskview_close
copytmap <ESC> q Q w <C-c>
default_linemode devicons

54
.config/yakuake.shortcuts Normal file
View File

@ -0,0 +1,54 @@
[Global Shortcuts]
toggle-window-state=Meta+`
[Shortcuts]
close-active-terminal=Ctrl+Shift+R
close-session=none
decrease-window-height=Alt+Shift+Up
decrease-window-width=Alt+Shift+Left
edit-profile=none
file_quit=Ctrl+Shift+Q
grow-terminal-bottom=Ctrl+Alt+Down
grow-terminal-left=Ctrl+Alt+Left
grow-terminal-right=Ctrl+Alt+Right
grow-terminal-top=Ctrl+Alt+Up
help_about_app=none
help_about_kde=none
help_report_bug=none
help_whats_this=Shift+F1
increase-window-height=Alt+Shift+Down
increase-window-width=Alt+Shift+Right
keep-open=none
manage-profiles=none
move-session-left=Ctrl+Shift+Left
move-session-right=Ctrl+Shift+Right
new-session=Ctrl+Shift+T
new-session-quad=none
new-session-two-horizontal=none
new-session-two-vertical=none
next-session=Shift+Right
next-terminal=Ctrl+Tab; Shift+Tab
options_configure=Ctrl+Shift+,
options_configure_keybinding=none
options_configure_notifications=none
previous-session=Shift+Left
previous-terminal=Ctrl+Shift+Tab
rename-session=none
split-left-right=Ctrl+(
split-top-bottom=Ctrl+)
switch-to-session-1=none
switch-to-session-12=none
switch-to-session-2=none
switch-to-session-3=none
switch-to-session-4=none
switch-to-session-5=none
switch-to-session-6=none
switch-to-session-7=none
switch-to-session-8=none
switch-to-session-9=none
toggle-session-keyboard-input=none
toggle-session-monitor-activity=Ctrl+Shift+A
toggle-session-monitor-silence=Ctrl+Shift+I
toggle-session-prevent-closing=none
toggle-window-state=none
view-full-screen=Ctrl+Shift+F11

52
.config/yakuakerc Normal file
View File

@ -0,0 +1,52 @@
[Animation]
AutoOpen=false
Frames=17
PollInterval=500
UseVMAssist=true
[Appearance]
BackgroundColor=#000000
BackgroundColorOpacity=0.4
Blur=false
KeyboardInputBlockIndicatorColor=#FF0000
KeyboardInputBlockIndicatorDuration=250
Skin=default
SkinInstallWithKns=false
TerminalHighlightDuration=250
Translucency=false
[Behavior]
FocusFollowMouse=false
OpenAfterStart=false
RememberFullscreen=false
[Desktop Entry]
DefaultProfile=
[Dialogs]
ConfirmQuit=true
FirstRun=false
[Favorite Profiles]
Favorites=
[KFileDialog Settings]
detailViewIconSize=0
[PrintOptions]
PrinterFriendly=true
ScaleOutput=true
[Window]
DynamicTabTitles=false
Height=60
KeepAbove=true
KeepOpen=true
KeepOpenAfterLastSessionCloses=false
Position=50
Screen=0
ShowOnAllDesktops=true
ShowSystrayIcon=true
ShowTabBar=true
ShowTitleBar=true
ToggleToFocus=false

2
.gitignore vendored
View File

@ -1,5 +1,3 @@
.bash_secrets
.idea/
.config/Code/Backups/*
.config/Code/*Cache*/*
.config/Code/Coo*

12
.gitmodules vendored
View File

@ -23,15 +23,3 @@
[submodule ".vim/bundle/ale"]
path = .vim/bundle/ale
url = https://github.com/dense-analysis/ale
[submodule ".tmux/plugins/tpm"]
path = .tmux/plugins/tpm
url = https://github.com/tmux-plugins/tpm.git
[submodule ".tmux/plugins/tmux-yank"]
path = .tmux/plugins/tmux-yank
url = https://github.com/tmux-plugins/tmux-yank
[submodule ".tmux/plugins/tmux-better-mouse-mode"]
path = .tmux/plugins/tmux-better-mouse-mode
url = https://github.com/NHDaly/tmux-better-mouse-mode
[submodule ".config/ranger/plugins/ranger_devicons"]
path = .config/ranger/plugins/ranger_devicons
url = https://github.com/alexanderjeurissen/ranger_devicons

View File

@ -1,28 +0,0 @@
tmux:
symbols:
branch: ""
hashprefix: ':'
ahead: ↑·
behind: ↓·
staged: '● '
conflict: '✖ '
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

@ -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

@ -1,7 +0,0 @@
[Appearance]
ColorScheme=Breeze
Font=SauceCodePro Nerd Font Mono,10,-1,5,50,0,0,0,0,0
[General]
Name=kapper
Parent=FALLBACK/

View File

@ -1,121 +0,0 @@
###############################################################################
## Author: Shaun Reed | Contact: shaunrd0@gmail.com | URL: www.shaunreed.com ##
## ##
## A custom tmux multiplexer config / layout created for Manjaro i3 ##
##+ Inspired by vim-powerline: https://github.com/Lokaltog/powerline ##
## ##
## This config created and tested with Powerline Consolas ##
##+ https://github.com/Lokaltog/powerline-fonts ##
##+ Some symbols may require Font Awesome 5 Free Solid ##
## ##
###############################################################################
# .tmux.conf
#
# If symbols or powerline layout fail to appear...
#+ Check your terminal emulator font settings include these fonts
#+ Check that required fonts are installed
#
# Note: The use of 256colours in this file allows for portable color definitions between platforms and applications
#+ Changing to a different color interpretation may result in some apps displaying colors differently than others
#+ Vim plugin 'Colorizer' does not reflect the actual 256colour values
#+ See https://jonasjacek.github.io/colors/ for a full list of 256colours
# Settings for terminal text selection / copy options
# + Source: https://www.seanh.cc/2020/12/27/copy-and-paste-in-tmux/
# + Depends: https://github.com/tmux-plugins/tmux-yank#linux
set -g mouse on
# These bindings are for X Windows only. If you're using a different
# window system you have to replace the `xsel` commands with something
# else. See https://github.com/tmux/tmux/wiki/Clipboard#available-tools
bind -T copy-mode DoubleClick1Pane select-pane \; send -X select-word \; send -X copy-pipe-no-clear "xsel -i"
bind -T copy-mode-vi DoubleClick1Pane select-pane \; send -X select-word \; send -X copy-pipe-no-clear "xsel -i"
bind -n DoubleClick1Pane select-pane \; copy-mode -M \; send -X select-word \; send -X copy-pipe-no-clear "xsel -i"
bind -T copy-mode TripleClick1Pane select-pane \; send -X select-line \; send -X copy-pipe-no-clear "xsel -i"
bind -T copy-mode-vi TripleClick1Pane select-pane \; send -X select-line \; send -X copy-pipe-no-clear "xsel -i"
bind -n TripleClick1Pane select-pane \; copy-mode -M \; send -X select-line \; send -X copy-pipe-no-clear "xsel -i"
bind -n MouseDown2Pane run "tmux set-buffer -b primary_selection \"$(xsel -o)\"; tmux paste-buffer -b primary_selection; tmux delete-buffer -b primary_selection"
#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-option -s set-clipboard external
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -selection clipboard -i"
# Remap shortcut prefix from 'C-b' to 'C-z'
#unbind C-b
#set-option -g prefix C-z
#bind-key C-z send-prefix
set-option -g prefix C-b
bind-key C-b send-prefix
# Reload tmux.conf in this session
bind r source-file ~/.tmux.conf
bind h split-window -h
bind v split-window -v
# switch panes using Alt-arrow without prefix
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
set-option -g status-position top
# Status update interval
set -g status-interval 1
# Basic status bar colors
set -g status-style fg=colour240,bg=colour233
# Left side of status bar
set -g status-left-style bg=colour233,fg=colour243
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
# + Font: Sauce Code Pro (NERD patch)
# Right side of status bar
set -g status-right-style bg=colour233,fg=colour243
set -g status-right-length 100
# 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"'
set -g window-status-current-format "#($HOME/go/bin/gitmux -cfg $HOME/.gitmux.conf \"#{pane_current_path}\")"
# 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]"
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
set -g window-status-current-style bg=colour233,fg=colour100
# Window with activity status
set -g window-status-activity-style bg=colour233,fg=colour245
# Window separator
set -g window-status-separator ""
# Window status alignment
set -g status-justify centre
# Pane border
set -g pane-border-style bg=default,fg=colour238
# Active pane border
set -g pane-active-border-style bg=default,fg=colour100
# Pane number indicator
set -g display-panes-colour colour233
set -g display-panes-active-colour colour245
# Clock mode
set -g clock-mode-colour colour100
set -g clock-mode-style 24
# Message
set -g message-style bg=colour100,fg=black
# Command message
set -g message-command-style bg=colour233,fg=black
set -g default-terminal "screen-256color"
# Mode
set -g mode-style bg=colour100,fg=colour235

View File

@ -1,35 +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] #(git -C #{pane_current_path} remote get-url origin | sed 's/.*[/]//' | sed 's/\.git//') "
# Settings for terminal text selection / copy options
# + Source: https://www.seanh.cc/2020/12/27/copy-and-paste-in-tmux/
# + Depends: https://github.com/tmux-plugins/tmux-yank#linux
set -g mouse on
# These bindings are for X Windows only. If you're using a different
# window system you have to replace the `xsel` commands with something
# else. See https://github.com/tmux/tmux/wiki/Clipboard#available-tools
bind -T copy-mode DoubleClick1Pane select-pane \; send -X select-word \; send -X copy-pipe-no-clear "xsel -i"
bind -T copy-mode-vi DoubleClick1Pane select-pane \; send -X select-word \; send -X copy-pipe-no-clear "xsel -i"
bind -n DoubleClick1Pane select-pane \; copy-mode -M \; send -X select-word \; send -X copy-pipe-no-clear "xsel -i"
bind -T copy-mode TripleClick1Pane select-pane \; send -X select-line \; send -X copy-pipe-no-clear "xsel -i"
bind -T copy-mode-vi TripleClick1Pane select-pane \; send -X select-line \; send -X copy-pipe-no-clear "xsel -i"
bind -n TripleClick1Pane select-pane \; copy-mode -M \; send -X select-line \; send -X copy-pipe-no-clear "xsel -i"
bind -n MouseDown2Pane run "tmux set-buffer -b primary_selection \"$(xsel -o)\"; tmux paste-buffer -b primary_selection; tmux delete-buffer -b primary_selection"
# 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] #(git -C #{pane_current_path} remote get-url origin | sed 's/.*[/]//' | sed 's/\.git//') "
# 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'

@ -1 +0,0 @@
Subproject commit aa59077c635ab21b251bd8cb4dc24c415e64a58e

@ -1 +0,0 @@
Subproject commit 1b1a436e19f095ae8f825243dbe29800a8acd25c

@ -1 +0,0 @@
Subproject commit 26d9ace1b47f4591b2afdf333442a498311b6ace

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

110
.vimrc
View File

@ -2,9 +2,6 @@
" Double-quotes are commented out code and can be removed or added
" 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
" May slow screen redraw time, so off by default
@ -21,20 +18,18 @@ set undofile
" Combine vim clipboard with global clipboard buffer
" Allows using y and p to copy into CTRL-C buffer, vice versa
" :help 'clipboard'
set clipboard=unnamed
set clipboard+=unnamedplus
set clipboard+=unnamed
" Allows true colors in vim (> 8 bit colors)
" :help termguicolors
"set termguicolors
set termguicolors
" Custom formatting based on filetype
" :help autocmd
" :help autocmd
"" autocmd FileType yaml set tabstop=2 shiftwidth=2
" Highlight characters past column N in source files based on file type
autocmd FileType cpp,c match ErrorMsg '\%>80v.\+'
autocmd FileType cs match ErrorMsg '\%>120v.\+'
" Highlight column 80 in c and cpp files
autocmd FileType cpp,c set colorcolumn=80
" Define function in vim to remove whitespace
fun! TrimWhitespace()
@ -43,21 +38,20 @@ fun! TrimWhitespace()
call winrestview(l:save)
endfun
"Call this on every attempt to save a file of types defined below..
autocmd BufWritePre *.cpp,*.h,*.c,*.php,*.cs,*.yml,*.txt,*.md :call TrimWhitespace()
autocmd BufWritePre *.cpp,*.h,*.c,*.php :call TrimWhitespace()
""autocmd BufWritePre *.cpp,*.h,*.c,*.php :%s/\s\+$//ge
" Set terminal title when opening file
"" autocmd BufEnter * let &titlestring = ' ' . expand("%:t")
"" set title
" Set tabwidth=2, adjust Vim shiftwidth to the same
set tabstop=2 shiftwidth=2
set tabstop=2 shiftwidth=2
" expandtab inserts spaces instead of tabs
set expandtab
set expandtab
" autindent inserts the next line at your current depth
set autoindent
set autoindent
" mouse=a allows for mouse interaction with vim when supported
set mouse=a
@ -92,8 +86,8 @@ nnoremap <C-e> <C-w>
" Build and run keybinds
"" nnoremap <C-b> :!make -C build/
"nnoremap <C-b> :!cmake -S . -B ./build/ && cmake --build ./build
"nnoremap <C-d> :!./build/scrap
nnoremap <C-b> :!cmake -S . -B ./build/ && cmake --build ./build
nnoremap <C-d> :!./build/scrap
" Vim Plugin Settings
@ -141,65 +135,39 @@ nnoremap <C-c> :ColorToggle<CR>
set termencoding=utf-8
set encoding=utf-8
" air-line
let g:airline_powerline_fonts = 1
if !exists('g:airline_symbols')
let g:airline_symbols = {}
endif
" 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.linenr = '␊'
let g:airline_symbols.linenr = '␤'
let g:airline_symbols.linenr = '¶'
let g:airline_symbols.branch = '⎇'
let g:airline_symbols.paste = 'ρ'
let g:airline_symbols.paste = 'Þ'
let g:airline_symbols.paste = '∥'
let g:airline_symbols.whitespace = 'Ξ'
" TODO: Add condition to toggle unicode / airline symbols
" By default use unicode for compatability on all systems
" airline symbols
""let g:airline_left_sep = ''
""let g:airline_left_alt_sep = ''
""let g:airline_right_sep = ''
""let g:airline_right_alt_sep = ''
""let g:airline_symbols.branch = ''
""let g:airline_symbols.readonly = ''
""let g:airline_symbols.linenr = ''
" Set glyphs based on font availability and environment (xorg / docker)
if and(and(has_sauce, is_xorg), !is_docker)
let g:airline_left_sep = ''
let g:airline_left_alt_sep = ''
let g:airline_right_sep = ''
let g:airline_right_alt_sep = ''
let g:airline_symbols.branch = ''
let g:airline_symbols.readonly = ''
let g:airline_symbols.linenr = ''
elseif is_xorg
" 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 = 'Ξ'
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
" 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

@ -1,21 +1,23 @@
Dotfiles configurations for headless Ubuntu 22.04 linux environments. Be sure to clone recursively if you want to grab updated plugins / submodules included. For example, using Pathogen with Vim to manage plugins requires that the plugin to be installed are cloned to the `~/.vim/bundle/` directory. Cloning recursively allows git to clone these same nested repositories/submodules within this directory so Pathogen can handle running the Vim plugins.
# dot
A place for backing up my dotfiles. Be sure to clone recursively if you want to grab updated plugins / submodules included. For example, using Pathogen with Vim to manage plugins requires that the plugin to be installed are cloned to the `~/.vim/bundle/` directory. Cloning recursively allows git to clone these same nested repositories/submodules within this directory so Pathogen can handle running the Vim plugins.
Once installed, editing source code in vim supports features displayed in the screenshot below
![Vim screenshot](VimScreenshot.png)
### Install Dotfiles
Easiest installation is to clone repository into home directory -
Easiest installation is to clone repository into home directory -
```bash
sudo apt install git stow vim xsel xclip tmux ranger clang yakuake wget curl
git clone --recursive https://github.com/shaunrd0/dot ~/dot
cd ~/dot/
stow --adopt .
```
If you'd rather clone elsewhere -
If you'd rather clone elsewhere -
```bash
git clone --recursive https://github.com/shaunrd0/dot /path/to/dot
@ -23,9 +25,7 @@ cd /path/to/dot/
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.
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.
**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. 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.
We could run the following commands to restore changed files
```bash
@ -38,7 +38,7 @@ git restore .
If you forget to clone recursively
```bash
git submodule update --init
git submodule update
Submodule path '.vim/bundle/Colorizer': checked out '53ada285f0acc171acda4280b6144e468dded89f'
Submodule path '.vim/bundle/ale': checked out '7265ceb6d050d1a4642741d248f11e4f2abd37e1'
Submodule path '.vim/bundle/clang_complete': checked out '0b98d7533ad967aac3fc4c1a5b0508dafa8a676f'
@ -50,24 +50,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
**These configurations require the installation of clang for clang completion**
@ -76,18 +58,13 @@ If you don't want clang completion, just remove the plugin directory from `~/.vi
If you don't remove clang completion and skip the following steps, vim will show errors when opening source code files. This is because these configurations use clang completion for source code auto completion and drop-down menus within vim.
Note that the `printf` command may take some time to finish, since it is searching your system for a needed file.
```bash
sudo apt install clang
printf "export LIBCLANG=\""$(find /usr/ -name libclang.so.1 2>/dev/null)"\"\n\n" >> .bash_aliases
echo "let g:clang_library_path=\$LIBCLANG" >> ~/.vimrc
source ~/.bashrc
```
### Gitmux
To enable the gitmux status bar in tmux sessions
```bash
sudo apt install golang-go
go install github.com/arl/gitmux@latest
```

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