diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b948985 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.swp +*.pyc diff --git a/bashrc b/bashrc index a7962f9..9112987 100644 --- a/bashrc +++ b/bashrc @@ -123,7 +123,3 @@ alias kgp="kubectl get pods -o wide" for bin in kubectl helm talosctl ; do type $bin &>/dev/null && source <($bin completion bash) done - -if type dpkg &>/dev/null && ! dpkg -l fonts-powerline &>/dev/null; then - echo "Notice: Please install fonts-powerline" -fi diff --git a/config/powerline-shell/config.json b/config/powerline-shell/config.json index 48faea7..7f9dde2 100644 --- a/config/powerline-shell/config.json +++ b/config/powerline-shell/config.json @@ -7,6 +7,7 @@ "root" ], "cwd": { + "mode": "plain", "max_depth": 8, "max_dir_size": 20 }, diff --git a/config/powerline-shell/powerline-shell b/config/powerline-shell/powerline-shell new file mode 120000 index 0000000..726da8c --- /dev/null +++ b/config/powerline-shell/powerline-shell @@ -0,0 +1 @@ +/home/.autofs/lunixpf001/home-TI16/pannekge-admin/git/homedir-config/config/config/powerline-shell \ No newline at end of file diff --git a/config/powerline-shell/themes/__pycache__/default.cpython-34.pyc b/config/powerline-shell/themes/__pycache__/default.cpython-34.pyc deleted file mode 100644 index 566b3bc..0000000 Binary files a/config/powerline-shell/themes/__pycache__/default.cpython-34.pyc and /dev/null differ diff --git a/config/powerline/powerline b/config/powerline/powerline new file mode 120000 index 0000000..c59d9bf --- /dev/null +++ b/config/powerline/powerline @@ -0,0 +1 @@ +/home/.autofs/lunixpf001/home-TI16/pannekge-admin/git/homedir-config/config/config/powerline \ No newline at end of file diff --git a/dircolors b/dotfiles/dircolors similarity index 100% rename from dircolors rename to dotfiles/dircolors diff --git a/gitconfig b/dotfiles/gitconfig similarity index 100% rename from gitconfig rename to dotfiles/gitconfig diff --git a/tmux.conf b/dotfiles/tmux.conf similarity index 95% rename from tmux.conf rename to dotfiles/tmux.conf index 94fcd6a..8bb8e69 100644 --- a/tmux.conf +++ b/dotfiles/tmux.conf @@ -64,6 +64,9 @@ bind -n 'S-Up' resize-pane -U 1 bind -n 'S-Left' resize-pane -L 1 bind -n 'S-Right' resize-pane -R 1 +bind -n End send-key C-e +bind -n Home send-key C-a + # copypaste #bind-key -n -t emacs-copy C-x copy-pipe "xclip -i -sel p -f | xclip -i -sel c " #bind-key -n C-y run "xclip -o | tmux load-buffer - ; tmux paste-buffer" @@ -87,8 +90,8 @@ bind -n C-left swap-window -t -1 bind -n C-right swap-window -t +1 ## Splitting panes -bind 'v' split-window -v -bind 'h' split-window -h +bind 'h' split-window -v +bind 'v' split-window -h ## Mouse toggling bind m \ @@ -99,6 +102,8 @@ bind k \ set -g mouse off \;\ display 'Mouse: OFF' +set-window-option -g xterm-keys on + #### COLOUR (Solarized 256) # default statusbar colors @@ -138,7 +143,7 @@ set -g @plugin 'tmux-plugins/tmux-sidebar' set -g @plugin 'nhdaly/tmux-better-mouse-mode' set -g @tmux_power_theme 'forest' +#set -g @tmux_power_theme '#483D8B' # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) run '~/.tmux/plugins/tpm/tpm' - diff --git a/vimrc b/dotfiles/vimrc similarity index 71% rename from vimrc rename to dotfiles/vimrc index 0eea29c..11c551e 100644 --- a/vimrc +++ b/dotfiles/vimrc @@ -10,7 +10,8 @@ Plugin 'altercation/vim-colors-solarized' Plugin 'scrooloose/nerdtree' Plugin 'vim-syntastic/syntastic' Plugin 'farmergreg/vim-lastplace.git' -Plugin 'yggdroot/indentline' +Plugin 'dense-analysis/ale' +Plugin 'fatih/vim-go' call vundle#end() " required filetype plugin indent on " required " @@ -51,13 +52,15 @@ set incsearch "Just to searchresult while typing set hlsearch " Highlight search results hi Search guibg=lightRed +set cursorcolumn " Show vertical cursorline +set cursorline + " Press Space to turn off highlighting and clear any message already displayed. :nnoremap :nohlsearch:echo " ------------------------------------ Colors / Theme ------------------------------------------- "let g:solarized_visibility = "high" "let g:solarized_contrast = "low" "let g:solarized_termcolors = 256 -let g:airline_solarized_bg='dark' colorscheme solarized augroup CursorLine @@ -77,6 +80,7 @@ nnoremap " ------------------------------------ AirLine ------------------------------------------- let g:airline_theme='solarized' +let g:airline_solarized_bg='dark' let g:airline#extensions#tabline#enabled = 1 "let g:airline#extensions#tabline#left_sep = ' ' "let g:airline#extensions#tabline#left_alt_sep = '|' @@ -112,22 +116,23 @@ let g:NERDTreeDirArrowCollapsible = 'v' autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif " ------------------------------------ GitGutter ------------------------------------------- -"" GitGutter Setup set updatetime=250 let g:gitgutter_enabled = 1 let g:gitgutter_signs = 1 let g:gitgutter_highlight_lines = 0 if executable('/usr/bin/git') == 0 - let g:gitgutter_git_executable = "/bin/true" - let g:gitgutter_enabled = 1 + let g:gitgutter_git_executable = "/bin/true" + let g:gitgutter_enabled = 1 endif let g:gitgutter_max_signs = 500 " default value let g:gitgutter_realtime = 1 let g:gitgutter_eager = 1 -" ------------------------------------ Indent Line ------------------------------------------- -let g:indentLine_color_term = 0 -"let g:indentLine_char_list = ['|', '¦', '┆', '┊'] +" ------------------------------------ ALE ------------------------------------------- +let g:ale_echo_msg_format = '[%linter%] %s [%severity%]' +let g:ale_sign_error = '✘' +let g:ale_sign_warning = '⚠' +let g:ale_lint_on_text_changed = 'never' " ------------------------------------ Whitespace Highlighting ------------------------------------------- autocmd ColorScheme * highlight ExtraWhitespaces ctermbg=red guibg=red @@ -137,56 +142,58 @@ highlight ExtraWhitespaces ctermbg=red guibg=red "Show trailing whitespace only after some text (ignores blank lines) "Show tabs that are not at the start of a line (and all spaces after too) function! MatchExtraWhitespacesNow() - if exists("b:sew") - if b:sew == 1 - match ExtraWhitespaces /^\t* \+\zs\(\t\+ *\)\+\|\S\zs\(\s\+$\| *\zs\(\t\+ *\)\+\)/ - else - if exists("b:sewb") - if b:sewb == 1 - match ExtraWhitespaces /\S\zs\s\+$/ - else - :call clearmatches() - endif - endif - endif + if exists("b:sew") + if b:sew == 1 + match ExtraWhitespaces /^\t* \+\zs\(\t\+ *\)\+\|\S\zs\(\s\+$\| *\zs\(\t\+ *\)\+\)/ + else + if exists("b:sewb") + if b:sewb == 1 + match ExtraWhitespaces /\S\zs\s\+$/ + else + :call clearmatches() endif + endif + endif + endif endfunction + function! MatchExtraWhitespacesNowInsert() - if exists("b:sew") - if b:sew == 1 - match ExtraWhitespaces /^\t* \+\zs\(\t\+ *\)\+\|\S\zs\(\s\+\%#\@StripExtraWhitespaces() - if exists("b:sewb") - if b:sewb == 1 - let l = line(".") - let c = col(".") - "Remove trailing whitespace only after some text (ignores blank lines) - %s/\S\zs\s\+$//ge - if exists("b:sew") - if b:sew == 1 - "Remove tabs and spaces after the inital (tabs and) spaces - %s/^\t* \+\zs\(\t\+ *\)\+//ge - "Replace tabs that are not at the start of a line - "(and all spaces after too) with a single space to keep - "tokens apart - %s/\S *\zs\(\t\+ *\)\+/ /ge - endif - endif - call cursor(l, c) - endif + if exists("b:sewb") + if b:sewb == 1 + let l = line(".") + let c = col(".") + "Remove trailing whitespace only after some text (ignores blank lines) + %s/\S\zs\s\+$//ge + if exists("b:sew") + if b:sew == 1 + "Remove tabs and spaces after the inital (tabs and) spaces + %s/^\t* \+\zs\(\t\+ *\)\+//ge + "Replace tabs that are not at the start of a line + "(and all spaces after too) with a single space to keep + "tokens apart + %s/\S *\zs\(\t\+ *\)\+/ /ge endif + endif + call cursor(l, c) + endif + endif endfunction autocmd BufWinEnter * :call MatchExtraWhitespacesNow() autocmd InsertEnter * :call MatchExtraWhitespacesNowInsert() @@ -200,6 +207,7 @@ command Sewbnow let b:sewb=1 | let b:sew=0 | :call StripExtraWhitespaces() command Sewnow let b:sewb=1 | let b:sew=1 | :call StripExtraWhitespaces() | :call MatchExtraWhitespacesNow() command Nosewb let b:sewb=0 | let b:sew=0 | :call MatchExtraWhitespacesNow() command Nosew let b:sew=0 | :call MatchExtraWhitespacesNow() + ""------------------------------------ Vimdiff Setup ---------------------------------------------------- highlight DiffAdd cterm=bold ctermfg=10 ctermbg=17 gui=none guifg=bg guibg=Red highlight DiffDelete cterm=bold ctermfg=10 ctermbg=17 gui=none guifg=bg guibg=Red @@ -207,16 +215,19 @@ highlight DiffChange cterm=bold ctermfg=10 ctermbg=17 gui=none guifg=bg guibg=Re highlight DiffText cterm=bold ctermfg=10 ctermbg=88 gui=none guifg=bg guibg=Red "" Disable syntax highlighting in diff mode only if &diff - syntax off + syntax off endif " ------------------------------------ More Cool Stuff ------------------------------------------- "" UTF-8 Setup if has("multi_byte") - if &termencoding == "" - let &termencoding = &encoding - endif - set encoding=utf-8 - setglobal fileencoding=utf-8 - "setglobal bomb - set fileencodings=ucs-bom,utf-8,latin1 + if &termencoding == "" + let &termencoding = &encoding + endif + set encoding=utf-8 + setglobal fileencoding=utf-8 + "setglobal bomb + set fileencodings=ucs-bom,utf-8,latin1 endif + +"------------- AutoCMD / Fixes +autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab diff --git a/setup.sh b/setup.sh index ba8c3dd..fbc8762 100755 --- a/setup.sh +++ b/setup.sh @@ -1,23 +1,27 @@ #!/bin/bash +set -u +mkdir -p ~/.config/homedir-backup 2>/dev/null -LINK_FILES=(vimrc tmux.conf gitconfig dircolors) -mkdir -p ~/.config/home-git-back/config 2>/dev/null -for file in ${LINK_FILES[@]}; do - if [ ! -L ~/.${file} ] ; then - mv -v ~/.${file} ~/.config/home-git-back - ln -s $(pwd)/${file} ~/.${file} - fi -done +function linkfiles { + for file in $@; do + name=$(basename $file) + dir=$(dirname $file) + if [ "$dir" == "dotfiles" ] ; then + targetdir="" + else + targetdir="$dir/" + fi -# Link .config dirs -for file in config/*; do - dir=$(basename $file) - if [ ! -L ~/.config/${dir} ] ; then - mv -v ~/.config/${dir} ~/.config/home-git-back/config - ln -s $(pwd)/${file} ~/.config/${dir} - fi -done + if [ ! -L ~/.${targetdir}${name} ] ; then + mv -v ~/.${targetdir}${name} ~/.config/homedir-backup + ln -s $(pwd)/$dir/${name} ~/.${targetdir}${name} + fi + done +} +linkfiles 'dotfiles/*' +linkfiles 'config/*' +exit # Install powerline if possible if which pip3 ; then pip3 install --user -U -r requirements.txt