Browse Source

Update

master
pannekge-admin 3 months ago
parent
commit
1250cbd2ef
  1. 2
      .gitignore
  2. 4
      bashrc
  3. 1
      config/powerline-shell/config.json
  4. 1
      config/powerline-shell/powerline-shell
  5. BIN
      config/powerline-shell/themes/__pycache__/default.cpython-34.pyc
  6. 1
      config/powerline/powerline
  7. 0
      dotfiles/dircolors
  8. 0
      dotfiles/gitconfig
  9. 11
      dotfiles/tmux.conf
  10. 127
      dotfiles/vimrc
  11. 42
      setup.sh

2
.gitignore

@ -0,0 +1,2 @@
*.swp
*.pyc

4
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

1
config/powerline-shell/config.json

@ -7,6 +7,7 @@
"root"
],
"cwd": {
"mode": "plain",
"max_depth": 8,
"max_dir_size": 20
},

1
config/powerline-shell/powerline-shell

@ -0,0 +1 @@
/home/.autofs/lunixpf001/home-TI16/pannekge-admin/git/homedir-config/config/config/powerline-shell

BIN
config/powerline-shell/themes/__pycache__/default.cpython-34.pyc

1
config/powerline/powerline

@ -0,0 +1 @@
/home/.autofs/lunixpf001/home-TI16/pannekge-admin/git/homedir-config/config/config/powerline

0
dircolors → dotfiles/dircolors

0
gitconfig → dotfiles/gitconfig

11
tmux.conf → 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'

127
vimrc → 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 <silent> <Space> :nohlsearch<Bar>:echo<CR>
" ------------------------------------ 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 <C-V> <C-W><C-V>
" ------------------------------------ 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! <SID>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! <SID>MatchExtraWhitespacesNowInsert()
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
"" Extra Whitespace Stripping
function! <SID>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 <SID>MatchExtraWhitespacesNow()
autocmd InsertEnter * :call <SID>MatchExtraWhitespacesNowInsert()
@ -200,6 +207,7 @@ command Sewbnow let b:sewb=1 | let b:sew=0 | :call <SID>StripExtraWhitespaces()
command Sewnow let b:sewb=1 | let b:sew=1 | :call <SID>StripExtraWhitespaces() | :call <SID>MatchExtraWhitespacesNow()
command Nosewb let b:sewb=0 | let b:sew=0 | :call <SID>MatchExtraWhitespacesNow()
command Nosew let b:sew=0 | :call <SID>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

42
setup.sh

@ -1,23 +1,27 @@
#!/bin/bash
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
# 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
set -u
mkdir -p ~/.config/homedir-backup 2>/dev/null
function linkfiles {
for file in $@; do
name=$(basename $file)
dir=$(dirname $file)
if [ "$dir" == "dotfiles" ] ; then
targetdir=""
else
targetdir="$dir/"
fi
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

Loading…
Cancel
Save