diff --git a/.bash_aliases b/.bash_aliases index 928f38d..be7bf26 100644 --- a/.bash_aliases +++ b/.bash_aliases @@ -30,10 +30,10 @@ export PATH=$PATH:/opt/:$HOME/.local/bin/:$HOME/.dotnet:$HOME/go/bin/ export DOTNET_ROOT=$HOME/.dotnet # Example path for autocompletion using libclang-9-dev package, obtained by the following command -command -v clang &>/dev/null && export LIBCLANG="$(find /usr/ -name libclang.so.1 2>/dev/null)" +export LIBCLANG="$(command -v clang &>/dev/null && ldconfig -p | sort | grep libclang-[0-9]. | awk -F "> " '{print$2}' | tail -n 1)" # Source a top-secret alias file -if [ -f ~/.bash_secrets ]; then +if [ -e ~/.bash_secrets ]; then . ~/.bash_secrets fi @@ -41,9 +41,20 @@ if command -v tmux &> /dev/null && [ -n "$PS1" ] && [[ ! "$TERM" =~ screen ]] && exec tmux fi -# Set the default terminal to use konsole, with Kapper profile +# Set the default terminal to use konsole, with kapper profile # + Execute tmux on start -#export TERMINAL='konsole --profile Kapper -e tmux' +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 diff --git a/.config/ranger/rc.conf b/.config/ranger/rc.conf index 789a2ba..0802759 100644 --- a/.config/ranger/rc.conf +++ b/.config/ranger/rc.conf @@ -764,3 +764,6 @@ tmap eval -q fm.ui.taskview.task_remove() tmap redraw_window tmap taskview_close copytmap q Q w + +default_linemode devicons + diff --git a/.local/share/fonts/sauce-code-pro.otf b/.local/share/fonts/sauce-code-pro.otf new file mode 100644 index 0000000..d2ad2b6 Binary files /dev/null and b/.local/share/fonts/sauce-code-pro.otf differ diff --git a/.local/share/kapper.profile b/.local/share/kapper.profile new file mode 100644 index 0000000..2e017b6 --- /dev/null +++ b/.local/share/kapper.profile @@ -0,0 +1,7 @@ +[Appearance] +ColorScheme=Breeze +Font=SauceCodePro Nerd Font Mono,10,-1,5,50,0,0,0,0,0 + +[General] +Name=kapper +Parent=FALLBACK/ diff --git a/.vimrc b/.vimrc index a28265d..490ee24 100644 --- a/.vimrc +++ b/.vimrc @@ -26,7 +26,7 @@ set clipboard+=unnamedplus "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 @@ -48,13 +48,13 @@ autocmd BufWritePre *.cpp,*.h,*.c,*.php,*.cs,*.yml,*.txt,*.md :call TrimWhitespa "" 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 @@ -140,37 +140,35 @@ 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 = '' +if (exists("$SAUCE")) + " 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 = '' +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.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 = 'Ξ' +endif " Clang completeion settings diff --git a/README.md b/README.md index f592d2a..4d152cc 100644 --- a/README.md +++ b/README.md @@ -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 - ```bash -sudo apt install vim xsel xclip tmux ranger clang +sudo apt install vim xsel xclip tmux ranger clang yakuake git clone --recursive https://github.com/shaunrd0/dot ~/dot cd ~/dot/ stow --adopt . @@ -25,7 +25,9 @@ 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. 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. +**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. We could run the following commands to restore changed files ```bash @@ -58,8 +60,6 @@ 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 source ~/.bashrc @@ -74,3 +74,4 @@ To enable the gitmux status bar in tmux sessions sudo apt install golang-go go install github.com/arl/gitmux@latest ``` +