diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 55c3cef..eb30413 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -5,13 +5,25 @@ if ! filereadable(system('echo -n "$HOME/.config/nvim/autoload/plug.vim"')) autocmd VimEnter * PlugInstall endif -let mapleader = "," +let mapleader = " " +let g:python3_host_prog = expand('/usr/src/python') set laststatus=2 set shiftwidth=4 set softtabstop=4 set tabstop=4 +set nocompatible +set nohlsearch +set incsearch +set noshowmode +set cmdheight=1 +set encoding=utf-8 +set guicursor= +set undofile +set incsearch +set scrolloff=8 au BufWritePre * let &bex = '@' . strftime("%F.%H:%M") -let g:python3_host_prog = expand('/usr/src/python') +filetype plugin indent on +syntax on " plugins call plug#begin('~/.config/nvim/plugged') @@ -60,6 +72,8 @@ call plug#begin('~/.config/nvim/plugged') " coc for prettier Plug 'neoclide/coc-prettier', {'do': 'yarn install --frozen-lockfile'} + " Enable gentoo-syntax in vim + Plug 'gentoo/gentoo-syntax' Plug 'tpope/vim-commentary' Plug 'tpope/vim-surround' call plug#end() @@ -76,23 +90,16 @@ set statusline+=%#Search# set statusline+=\ %l/%L set statusline+=\ [%c] -set nocompatible -set hlsearch -set incsearch -set noshowmode -set cmdheight=1 -syntax on -filetype plugin indent on -set encoding=utf-8 - " fzf command! -bang -nargs=* Find call fzf#vim#grep('rg --column --line-number --no-heading --fixed-strings --ignore-case --hidden --follow --color "always" '.shellescape(), 1, 0) command! -bang -nargs=* FindCurrentWord call fzf#vim#grep('rg --column --line-number --no-heading --fixed-strings --ignore-case --hidden --follow --color "always" '.shellescape(expand('')), 1, 0) set grepprg=rg\ --vimgrep -nmap f :FZF -nmap b :Buffers -nmap s :Files -nmap / :Rg +nmap a :Buffers +nmap s :Rg +nmap d :Files + +nnoremap = :vertical resize +5 +nnoremap - :vertical resize -5 " livepreviewer let g:livepreview_previewer = 'mupdf' diff --git a/.local/bin/Update b/.local/bin/Update index 2281fbd..8213f1c 100755 --- a/.local/bin/Update +++ b/.local/bin/Update @@ -4,13 +4,10 @@ echo echo -e $(date) echo echo +sudo emerge --sync sudo $HOME/.local/bin/eix-repos-sync -sudo eix-sync -a -sudo eix-update -#sudo emerge-webrsync -#sudo emerge --sync -#sudo emaint sync -a sudo emerge -auDN @world +#sudo eix-update echo echo echo -e $(date) diff --git a/.local/bin/eix-repos-sync b/.local/bin/eix-repos-sync index 185d16b..8375592 100755 --- a/.local/bin/eix-repos-sync +++ b/.local/bin/eix-repos-sync @@ -1,2 +1,9 @@ #!/bin/bash -for i in /usr/repos/*/.git; do ( echo $i; cd $i/..; sudo git pull; ); done + +if [ -e /etc/portage/make.conf ]; then + . /etc/portage/make.conf + if [ ! -d $PORTDIR/metadata/md5-cache -o -d $PORTDIR/.git ]; then + echo "updating metadata cache ..." + egencache --repo=gentoo --update + fi +fi diff --git a/.local/bin/twitch b/.local/bin/twitch index 688f3b8..fc01a3f 100755 --- a/.local/bin/twitch +++ b/.local/bin/twitch @@ -18,5 +18,5 @@ if [ -z "$1" ]; then '-> if is-empty(it) then "No one you are following is streaming right now." else it' \ -o table else - streamlink -p mpv twitch.tv/$1 ${2:-best} + __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0 __GLX_VENDOR_LIBRARY_NAME=nvidia __GL_SYNC_TO_VBLANK=0 streamlink -p mpv twitch.tv/$1 ${2:-best} fi