From 94691be75a6e40e27bc82995eb1ec9a08fe3b2db Mon Sep 17 00:00:00 2001 From: Henrik Bakken Date: Tue, 27 Apr 2021 15:35:48 +0200 Subject: [PATCH] vim colors ++ --- HOME/locker.sh | 6 +--- hjalmar-mothership/i3/config | 2 ++ nvim/coc-settings.json | 6 ++-- nvim/init.vim | 53 ++++++++++++++++++++---------------- 4 files changed, 35 insertions(+), 32 deletions(-) diff --git a/HOME/locker.sh b/HOME/locker.sh index b3c3caa..44367d5 100644 --- a/HOME/locker.sh +++ b/HOME/locker.sh @@ -6,10 +6,6 @@ RESOLUTION=$(xrandr -q|sed -n 's/.*current[ ]\([0-9]*\) x \([0-9]*\),.*/\1x\2/p' # lock the screen import -silent -window root jpeg:- | convert - -scale 20% -blur 0x2.5 -resize 500% RGB:- | \ i3lock --raw $RESOLUTION:rgb -i /dev/stdin -e $@ - -# sleep 1 adds a small delay to prevent possible race conditions with suspend -sleep 1 - -xset dpms force off +# TODO fix - doesn't lock! exit 0 diff --git a/hjalmar-mothership/i3/config b/hjalmar-mothership/i3/config index 20616fd..83d4ceb 100644 --- a/hjalmar-mothership/i3/config +++ b/hjalmar-mothership/i3/config @@ -102,6 +102,8 @@ bindsym $mod+Shift+F6 exec i3-sensible-terminal -e 'ncspot' bindsym $mod+F9 exec --no-startup-id picom -b bindsym $mod+Shift+F9 exec --no-startup-id pkill picom bindsym $mod+Shift+F10 --release exec "killall dunst; exec notify-send 'restart dunst'" +bindsym $mod+F12 --release exec "xrandr --output DP-4 --mode 5120x1440 --primary" +bindsym $mod+Shift+F12 --release exec "xrandr --output DP-4 --mode 2560x1440 --primary" bindsym $mod+0 mode "$mode_system" bindsym $mod+z mode "resize" diff --git a/nvim/coc-settings.json b/nvim/coc-settings.json index 481ac32..4c33589 100644 --- a/nvim/coc-settings.json +++ b/nvim/coc-settings.json @@ -3,11 +3,11 @@ "suggest.autoTrigger": "always", "python.linting.enabled": true, "python.linting.flake8Enabled": true, - "python.linting.mypyEnabled": true, + "python.linting.mypyEnabled": false, "python.linting.pylintEnabled": false, "python.analysis.useLibraryCodeForTypes": false, - /* "python.linting.pylintArgs": ["--disable=all", "--enable=F,E,unreachable,duplicate-key,unnecessary-semicolon,global-variable-not-assigned,unused-variable,binary-op-exception,bad-format-string,anomalous-backslash-in-string,bad-open-mode"], */ - "python.linting.flake8Args": ["--ignore=E731,W503"], + "python.linting.flake8Args": ["--ignore=E731,W503,E501"], + "python.linting.mypyArgs": ["--disallow-any-generics","--ignore-missing-imports","--follow-imports=normal","--show-column-numbers"], "diagnostic.showUnused": false, "git.enableGutters": true, "yaml.format.enable": true, diff --git a/nvim/init.vim b/nvim/init.vim index 6c9b5a7..fcc4e73 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -47,14 +47,14 @@ Plug 'numirias/semshi', {'do': ':UpdateRemotePlugins'} " tmux Plug 'christoomey/vim-tmux-navigator' " integrate movement in tmux and vim " aesthetics -Plug 'chriskempson/base16-vim' " base16 themes Plug 'chrisbra/Colorizer' " show color codes Plug 'junegunn/rainbow_parentheses.vim' " colorize parentheses +Plug 'gillyb/stable-windows' " themes +Plug 'chriskempson/base16-vim' Plug 'vim-airline/vim-airline' Plug 'vim-airline/vim-airline-themes' Plug 'junegunn/seoul256.vim' -Plug 'sainnhe/gruvbox-material' Plug 'skbolton/embark' call plug#end() @@ -62,26 +62,19 @@ call plug#end() " SETTINGS " ----------------------------------------------------------------------------- " colors -if filereadable(expand("~/.vimrc_background")) - let base16colorspace=256 - source ~/.vimrc_background +if !&termguicolors + set termguicolors endif -if $TERM =~ '^\(rxvt\)\(-.*\)\?$' - set notermguicolors -else - set termguicolors +if !exists('g:colors_name') + " let g:seoul256_background=233 + " silent! colorscheme seoul256 + silent! colorscheme base16-monokai + " silent! colorscheme base16-tomorrow-night + " seoul256 theme config: dark 233-239, light 252-256 endif - -" Transparent Background (For i3 and compton) -" highlight Normal guibg=NONE ctermbg=NONE -" highlight LineNr guibg=NONE ctermbg=NONE -" highlight clear SignColumn " SignColumn should match background - -" seoul256 theme config (dark 233-239, light 252-256) -let g:seoul256_background=233 -colo seoul256 -" colo base16-tomorrow-night -" colo gruvbox-material +highlight Normal guibg=NONE ctermbg=NONE +highlight LineNr guibg=NONE ctermbg=NONE +highlight clear SignColumn " statusline set cmdheight=2 @@ -91,7 +84,8 @@ let g:airline_powerline_fonts=1 "let g:airline_theme='badwolf' "let g:airline_theme='silver' "let g:airline_theme='raven' -let g:airline_theme='base16_gruvbox_dark_hard' +" let g:airline_theme='laederon' +let g:airline_theme='ayu_dark' let g:airline#extensions#tabline#enabled=1 let g:airline#extensions#tabline#show_splits=0 let g:airline#extensions#tabline#show_tabs=0 @@ -109,6 +103,10 @@ set undofile " Persistent undo set undolevels=500 " Maximum number of changes that can be undone set undoreload=5000 " Maximum number lines to save for undo on a buffer reload +" line width ruler +set colorcolumn=80 +highlight ColorColumn ctermbg=0 guibg='#3a3a3a' + " search set ignorecase " Case insensitive search set smartcase " ... but case sensitive when uc present @@ -120,6 +118,7 @@ set scrolljump=1 " Line to scroll when cursor leaves screen set splitright " Puts new vsplit windows to the right of the current set splitbelow " Puts new split windows to the bottom of the current set hidden " Allow buffer switching without saving +set switchbuf=useopen " buffer set nowrap " Do not wrap long lines @@ -134,7 +133,7 @@ set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936 set fileformats=unix,dos,mac " indentation -set smartindent +set nosmartindent " folds set foldmethod=indent @@ -235,10 +234,12 @@ let g:asterisk#keeppos=1 " stay visual when indenting vnoremap >gv vnoremap >gv +vnoremap < (coc-diagnostic-prev) -nmap (coc-diagnostic-next) +nmap (coc-diagnostic-prev-error) +nmap (coc-diagnostic-next-error) " GoTo code navigation nmap (coc-git-prevchunk) nmap (coc-git-nextchunk) @@ -310,6 +311,7 @@ command! -nargs=* -bang RG call RipgrepFzf(, 0) "command! -bang -nargs=* Ag call fzf#vim#ag(, {'options': '--delimiter : --nth 4..'}, 0) let g:fzf_preview_command='bat --color=always --plain {-1}' " Installed bat let g:fzf_preview_grep_cmd='rg --smart-case --line-number --no-heading --color=never' +let g:fzf_buffers_jump = 1 " shortcuts nmap :Colors nmap :CocFzfList @@ -318,6 +320,8 @@ nmap (coc-refactor) xmap (coc-format-selected) nmap (coc-format-selected) nmap :CocDiagnostics +nmap :copen +nmap :vimgrep TODO **/*:copen nmap :Commits nmap :BCommits nmap :Buffers @@ -327,6 +331,7 @@ nmap :History nmap :Files nmap :GFiles nmap :Filetypes +nmap :Marks " ***************************** " COC CONFIGS