Update few files

I'm to lazy to describe it... fuck me
This commit is contained in:
Wiktor Zykubek 2020-08-16 20:37:29 +02:00
parent 01a554e356
commit 0e831ebd9f
13 changed files with 58 additions and 129 deletions

View File

@ -6,17 +6,17 @@ let mapleader = "\<Space>"
let g:move_key_modifier = 'A' let g:move_key_modifier = 'A'
" Enable/disable autopairs " Enable/disable autopairs
nmap <Leader>ap :CloseTagToggleBuffer<CR>:call AutoPairsToggle()<CR>:echo "Auto closing tags toggled."<CR> nmap <Leader>ap :CloseTagToggleBuffer<CR>:echo "Auto closing HTML tags toggled."<CR>
" Enable/disable deoplete " Enable/disable deoplete
map <Leader>d :call deoplete#toggle()<CR>:echo "Deoplete toggled."<CR> nmap <Leader>d :call deoplete#toggle()<CR>:echo "Deoplete toggled."<CR>
"~~~~~~~~~~~~~~~~~ "~~~~~~~~~~~~~~~~~
" File Management " File Management
"~~~~~~~~~~~~~~~~~ "~~~~~~~~~~~~~~~~~
" fzf " fzf
nmap <silent> <Leader>f :Files<CR> nnoremap <silent> <Leader>f :Files<CR>
nmap <silent> <Leader>F :Files ~<CR> nnoremap <silent> <Leader>F :Files ~<CR>
"~~~~~~~~~ "~~~~~~~~~
" Linters " Linters

View File

@ -1,4 +1,4 @@
" Plugins " Install vim-plug if is not installed yet.
if ! filereadable(expand('~/.config/nvim/autoload/plug.vim')) if ! filereadable(expand('~/.config/nvim/autoload/plug.vim'))
echo "Downloading junegunn/vim-plug to manage plugins..." echo "Downloading junegunn/vim-plug to manage plugins..."
silent !mkdir -p ~/.config/nvim/autoload/ silent !mkdir -p ~/.config/nvim/autoload/
@ -6,34 +6,24 @@ if ! filereadable(expand('~/.config/nvim/autoload/plug.vim'))
autocmd VimEnter * PlugInstall autocmd VimEnter * PlugInstall
endif endif
" Initialize plugins
call plug#begin('~/.config/nvim/bundle') call plug#begin('~/.config/nvim/bundle')
" fzf
Plug '~/.fzf' Plug '~/.fzf'
Plug 'junegunn/fzf.vim' Plug 'junegunn/fzf.vim'
" linters/deoplete
Plug 'dense-analysis/ale' Plug 'dense-analysis/ale'
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
Plug 'tbodt/deoplete-tabnine', { 'do': './install.sh' }
Plug 'Shougo/deoplete-clangx' Plug 'Shougo/deoplete-clangx'
Plug 'deoplete-plugins/deoplete-jedi' Plug 'deoplete-plugins/deoplete-jedi'
Plug 'deoplete-plugins/deoplete-zsh' Plug 'deoplete-plugins/deoplete-zsh'
Plug 'prabirshrestha/async.vim'
Plug 'prabirshrestha/asyncomplete.vim'
Plug 'prabirshrestha/vim-lsp'
Plug 'prabirshrestha/asyncomplete-lsp.vim'
Plug 'lighttiger2505/deoplete-vim-lsp'
Plug 'ryanolsonx/vim-lsp-javascript'
Plug 'ervandew/supertab' Plug 'ervandew/supertab'
" Snippets
Plug 'Shougo/neosnippet.vim' Plug 'Shougo/neosnippet.vim'
Plug 'samedamci/snippets' Plug 'samedamci/snippets'
Plug 'mattn/emmet-vim'
Plug 'tpope/vim-surround' Plug 'tpope/vim-surround'
Plug 'tpope/vim-commentary' Plug 'tpope/vim-commentary'
Plug 'alvan/vim-closetag' Plug 'alvan/vim-closetag'
@ -41,13 +31,10 @@ call plug#begin('~/.config/nvim/bundle')
Plug 'sheerun/vim-polyglot' Plug 'sheerun/vim-polyglot'
Plug 'luochen1990/rainbow' Plug 'luochen1990/rainbow'
Plug 'matze/vim-move'
Plug 'reedes/vim-pencil' Plug 'reedes/vim-pencil'
Plug 'christoomey/vim-tmux-navigator'
Plug 'xuhdev/vim-latex-live-preview', { 'for': 'tex' }
Plug 'chaoren/vim-wordmotion' Plug 'chaoren/vim-wordmotion'
Plug 'matze/vim-move'
" git
Plug 'airblade/vim-gitgutter' Plug 'airblade/vim-gitgutter'
" syntax " syntax
@ -61,10 +48,7 @@ call plug#end()
"======== "========
" ALE " ALE
let g:ale_sign_error = '' let g:ale_sign_error = ''
let g:lsp_signs_error = {'text': ''}
let g:ale_sign_warning = '' let g:ale_sign_warning = ''
let g:lsp_signs_warning = {'text': ''}
let g:lsp_signs_hint = {'text': ''} " icons require GUI
let g:ale_linters = { let g:ale_linters = {
\ 'c': ['ccls'], \ 'c': ['ccls'],
@ -111,59 +95,14 @@ let g:fzf_preview_window = 'right:55%'
" gitgutter " gitgutter
set updatetime=1000 set updatetime=1000
" emmet-vim
let g:user_emmet_mode='a'
let g:user_emmet_leader_key=','
let g:user_emmet_install_global = 0
autocmd FileType html,css EmmetInstall
" deoplete " deoplete
let g:deoplete#enable_at_startup = 0 let g:deoplete#enable_at_startup = 1
let g:deoplete#enable_ignore_case = 1 let g:deoplete#enable_ignore_case = 1
set completeopt-=preview
call deoplete#custom#source('ultisnips', 'rank', 1000) call deoplete#custom#source('ultisnips', 'rank', 1000)
call deoplete#custom#source('zsh', 'filetypes', ['sh', 'zsh']) call deoplete#custom#source('zsh', 'filetypes', ['sh', 'zsh'])
call deoplete#custom#option('smart_case', v:false) call deoplete#custom#option('smart_case', v:false)
set completeopt-=preview
" for JS language server
if (executable('typescript-language-server'))
augroup LspJavaScript
autocmd!
autocmd User lsp_setup call lsp#register_server({
\ 'name': 'js-ls',
\ 'cmd': {server_info->[&shell, &shellcmdflag, 'typescript-language-server --stdio']},
\ 'whitelist': ['javascript', 'javascript.jsx', 'javascriptreact']
\ })
augroup END
endif
" for Go language server
if executable('gopls')
au User lsp_setup call lsp#register_server({
\ 'name': 'gopls',
\ 'cmd': {server_info->['gopls']},
\ 'whitelist': ['go'],
\ })
autocmd BufWritePre *.go LspDocumentFormatSync
endif
if executable('go-langserver')
au User lsp_setup call lsp#register_server({
\ 'name': 'go-langserver',
\ 'cmd': {server_info->['go-langserver', '-gocodecompletion']},
\ 'whitelist': ['go'],
\ })
autocmd BufWritePre *.go LspDocumentFormatSync
endif
let g:lsp_diagnostics_enabled = 1
let g:lsp_signs_enabled = 1
let g:lsp_diagnostics_echo_cursor = 1
let g:lsp_highlights_enabled = 0
let g:lsp_textprop_enabled = 0
let g:lsp_virtual_text_enabled = 0
let g:lsp_highlight_references_enabled = 1
" vim-closetag " vim-closetag
let g:closetag_filenames = '*.html,*.xhtml,*.phtml' let g:closetag_filenames = '*.html,*.xhtml,*.phtml'
@ -172,10 +111,6 @@ let g:closetag_filetypes = 'html,xhtml,phtml'
let g:closetag_xhtml_filetypes = 'xhtml,jsx' let g:closetag_xhtml_filetypes = 'xhtml,jsx'
let g:closetag_emptyTags_caseSensitive = 1 let g:closetag_emptyTags_caseSensitive = 1
let g:closetag_shortcut = '>' let g:closetag_shortcut = '>'
let g:closetag_close_shortcut = '<leader>>'
" LaTeX
let g:livepreview_previewer = 'zathura'
" Enable "Rainbow Parentheses Improved" " Enable "Rainbow Parentheses Improved"
let g:rainbow_active = 1 let g:rainbow_active = 1

View File

@ -1,37 +1,27 @@
"============ " Mode icon
" Statusline function! Mode(mode)
"============ if a:mode == 'n' " Normal
function! Mode(mode) " {{{
" normal mode
if a:mode == 'n'
return '  ' return '  '
" insert mode elseif a:mode == 'i' " Insert
elseif a:mode == 'i'
return '  ' return '  '
" replace mode elseif a:mode == 'R' " Replace
elseif a:mode == 'R'
return '  ' return '  '
" visual mode elseif a:mode == 'v' " Visual
elseif a:mode == 'v'
return '  ' return '  '
" visual block mode elseif a:mode == '' " Visual Block
elseif a:mode == ''
return '  ' return '  '
" command mode elseif a:mode == 'c' " Command
elseif a:mode == 'c'
return '  ' return '  '
" terminal mode elseif a:mode == 't' " Terminal
elseif a:mode == 't'
return '  ' return '  '
endif endif
" Return empty string so as not to display anything in the statusline
return ' ' return ' '
endfunction endfunction
" }}}
" modification mark
function! SetModifiedSymbol(modified) " {{{ " Modification mark
function! SetModifiedSymbol(modified)
if a:modified == 1 if a:modified == 1
hi MyStatuslineModifiedBody ctermbg=NONE cterm=NONE ctermfg=3 hi MyStatuslineModifiedBody ctermbg=NONE cterm=NONE ctermfg=3
else else
@ -39,18 +29,19 @@ function! SetModifiedSymbol(modified) " {{{
endif endif
return ' ' return ' '
endfunction endfunction
" }}}
" filetype
function! SetFiletype(filetype) " {{{ " Filetype
function! SetFiletype(filetype)
if a:filetype == '' if a:filetype == ''
return '-' return 'unknown'
else else
return a:filetype return a:filetype
endif endif
endfunction endfunction
" }}}
" Set elements and decorators
set statusline=%#MyStatuslineSeparator#\ " set statusline=%#MyStatuslineSeparator#\ "
set statusline+=%{Mode(mode())} set statusline+=%{Mode(mode())}

View File

@ -26,7 +26,7 @@ alias \
ga='git add' \ ga='git add' \
gc='git commit -S' \ gc='git commit -S' \
gp='git push' \ gp='git push' \
gpom='git push origin master' \ gpom='git push origin master --tags' \
gch='git checkout' \ gch='git checkout' \
gl='git log' \ gl='git log' \
gpu='git pull' \ gpu='git pull' \
@ -62,7 +62,9 @@ alias \
cd..='cd ..' \ cd..='cd ..' \
,='cd ~' ,='cd ~'
alias copy='xclip -sel clip' alias \
copy='xclip -sel clip' \
rssu='vi ~/.config/newsboat/urls'
# Commands Colors # Commands Colors
alias ls='ls --color=auto' \ alias ls='ls --color=auto' \

View File

@ -1,7 +1,7 @@
super + Return super + Return
$TERMINAL $($TERMINAL)
super + {_,ctrl,alt +} b super + {_,ctrl,alt +} b
{search,$BROWSER,tor-browser} {search,firefox,tor-browser}
super + {_,shift +} d super + {_,shift +} d
rofi -show {run,drun} rofi -show {run,drun}
super + shift + s super + shift + s
@ -9,8 +9,8 @@ super + shift + s
super + c super + c
compos compos
super + s; {t,m,n,v,c} super + s; {t,m,n,v,c,p}
{tuirent,mails,rss,fm,ncmp} {tuirent,mails,rss,fm,ncmp,pods}
super + a; {g,k,l,i,m} super + a; {g,k,l,i,m}
{gimp,keepassxc,libreoffice,inkscape,minecraft-launcher} {gimp,keepassxc,libreoffice,inkscape,minecraft-launcher}
@ -42,7 +42,7 @@ super + w
{_,shift +} F11 {_,shift +} F11
blaze {_,-s} blaze {_,-s}
End End
slock & systemctl suspend sh -c "slock & systemctl suspend"
Pause Pause
syncnow syncnow

View File

@ -198,9 +198,9 @@ filetype *.sha512
\ sha512sum -c %f %S, \ sha512sum -c %f %S,
" GPG signature " GPG signature
filetype *.asc " filetype *.asc
\ {Check signature} " \ {Check signature}
\ !!gpg --verify %c, " \ !!gpg --verify %c,
" Torrent " Torrent
filetype *.torrent torradd %f & filetype *.torrent torradd %f &
@ -286,7 +286,7 @@ fileviewer * highlight -O ansi -s dante %c
" uncommenting one of lines below will result in ignoring 'vi[x]cmd' option " uncommenting one of lines below will result in ignoring 'vi[x]cmd' option
" for unknown file types. " for unknown file types.
" For *nix: " For *nix:
" filetype * xdg-open filetype * xdg-open
" For OS X: " For OS X:
" filetype * open " filetype * open
" For Windows: " For Windows:

View File

@ -9,13 +9,13 @@ cd "$HOME/.local/bin/scripts/dwmbar/" || exit 1
status() { status() {
cat << EOF cat << EOF
$(./minexmr) $sym
$(./crypto) $sym
$(./torrent) $sym $(./torrent) $sym
$(./disk) $sym $(./disk) $sym
$(./internet) $sym $(./internet) $sym
$(./lamp) $sym
$(./music) $sym $(./music) $sym
$(./alsa) $sym $(./alsa) $sym
$(./news) $sym
$(./mails) $sym $(./mails) $sym
$(./packages) $sym $(./packages) $sym
$(./date) $sym $(./date) $sym

View File

@ -6,7 +6,7 @@
[ -z "$1" ] && { "$BROWSER"; exit; } [ -z "$1" ] && { "$BROWSER"; exit; }
case "$1" in case "$1" in
*mkv|*webm|*mp4|*youtube.com/watch*|*youtube.com/playlist*|*youtu.be*|*hooktube.com*|*bitchute.com*) *mkv|*webm|*mp4|*youtube.com/watch*|*youtube.com/playlist*|*youtu.be*|*hooktube.com*|*bitchute.com*|*/videos/watch/*)
setsid mpv -quiet "$1" >/dev/null 2>&1 & ;; setsid mpv -quiet "$1" >/dev/null 2>&1 & ;;
*png|*jpg|*jpe|*jpeg|*gif) *png|*jpg|*jpe|*jpeg|*gif)
curl -sL "$1" > "/tmp/$(echo "$1" | sed "s/.*\///")" && sxiv -a "/tmp/$(echo "$1" | sed "s/.*\///")" >/dev/null 2>&1 & ;; curl -sL "$1" > "/tmp/$(echo "$1" | sed "s/.*\///")" && sxiv -a "/tmp/$(echo "$1" | sed "s/.*\///")" >/dev/null 2>&1 & ;;

View File

@ -3,5 +3,5 @@
# Initialize git repo and add remotes. # Initialize git repo and add remotes.
git init git init
git remote add origin "ssh://git@git.samedamci.me:8953/samedamci/${PWD##*/}.git" git remote add origin "ssh://git@git.samedamci.com:8953/samedamci/${PWD##*/}.git"
git remote set-url --add origin "git@github.com:samedamci/${PWD##*/}.git" git remote set-url --add origin "git@github.com:samedamci/${PWD##*/}.git"

View File

@ -5,7 +5,7 @@
bmfile="$HOME/.config/bookmarks" bmfile="$HOME/.config/bookmarks"
m() { m() {
rofi -dmenu -width 600 -i -p "Search" -l "$(wc -l "$bmfile")" \ rofi -dmenu -width 600 -i -p "" -l "$(wc -l "$bmfile")" \
-matching fuzzy -matching fuzzy
} }
@ -17,7 +17,7 @@ chosen="$(
url="$(grep -m 1 "$chosen" "$bmfile" | awk '{ print $1 }')" url="$(grep -m 1 "$chosen" "$bmfile" | awk '{ print $1 }')"
[ ! "$url" ] && { [ ! "$url" ] && {
[ "$(echo "$chosen" | grep "[a-z|0-9]\.[a-z|0-9]")" ] && [ "$(echo "$chosen" | grep "[a-z|0-9]\.[a-z|0-9]")" ] &&
url="$chosen" || url="http://searx.samedamci.me/?=&q=$chosen" url="$chosen" || url="http://searx.samedamci.com/?=&q=$chosen"
} }
"$BROWSER" "$url" "$BROWSER" "$url"

View File

@ -10,4 +10,4 @@ elif [ "$(cat /etc/hostname)" = "laptop" ]; then
res="1366x768" res="1366x768"
fi fi
xwallpaper --maximize /home/samedamci/.config/wallpapers/"$res"/wall1.png & xwallpaper --maximize /home/samedamci/.config/wallpapers/"$res"/wall15.png &

View File

@ -18,8 +18,8 @@ export LESSHISTFILE="-"
# PATH # PATH
export GOPATH=$HOME/.local/go export GOPATH=$HOME/.local/go
export NPM_PACKAGES="$HOME/.yarn/bin/" export NPM_PACKAGES="$HOME/.local/bin/npm/bin"
export PATH="$PATH:$HOME/.local/bin/:$HOME/.local/bin/scripts/:$NPM_PACKAGES:$GOROOT/bin:$GOPATH/bin" export PATH="$PATH:.:$HOME/.local/bin/:$HOME/.local/bin/scripts/:$NPM_PACKAGES:$GOROOT/bin:$GOPATH/bin"
# Colors # Colors
export LS_COLORS="no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=00;93:do=00;93:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=1;34:st=37;44:ex=01;32:*.tar=01;36:*.tgz=01;36:*.svgz=00;93:*.arj=01;36:*.taz=01;36:*.lzh=01;36:*.lzma=01;36:*.zip=01;36:*.z=01;36:*.Z=01;36:*.dz=01;36:*.gz=01;36:*.bz2=01;36:*.tbz2=01;36:*.bz=01;36:*.tz=01;36:*.deb=01;36:*.rpm=01;36:*.jar=01;36:*.rar=01;36:*.ace=01;36:*.zoo=01;36:*.cpio=01;36:*.7z=01;36:*.rz=01;36:*.jpg=00;93:*.jpeg=00;93:*.gif=00;93:*.bmp=00;93:*.pbm=00;93:*.pgm=00;93:*.ppm=00;93:*.tga=00;93:*.xbm=00;93:*.xpm=00;93:*.tif=00;93:*.tiff=00;93:*.png=00;93:*.mng=00;93:*.pcx=00;93:*.mov=00;93:*.mpg=00;93:*.mpeg=00;93:*.m2v=00;93:*.mkv=00;93:*.ogm=00;93:*.mp4=00;93:*.m4v=00;93:*.mp4v=00;93:*.vob=00;93:*.qt=00;93:*.nuv=00;93:*.wmv=00;93:*.asf=00;93:*.rm=00;93:*.rmvb=00;93:*.flc=00;93:*.avi=00;93:*.fli=00;93:*.gl=00;93:*.dl=00;93:*.xcf=00;93:*.xwd=00;93:*.yuv=00;93:*.svg=00;93:*.aac=00;36:*.au=00;36:*.flac=00;35:*.mid=00;35:*.midi=00;35:*.mka=00;35:*.mp3=00;35:*.mpc=00;35:*.ogg=00;35:*.ra=00;35:*.wav=00;35:*.opus=00;35:" export LS_COLORS="no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=00;93:do=00;93:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=1;34:st=37;44:ex=01;32:*.tar=01;36:*.tgz=01;36:*.svgz=00;93:*.arj=01;36:*.taz=01;36:*.lzh=01;36:*.lzma=01;36:*.zip=01;36:*.z=01;36:*.Z=01;36:*.dz=01;36:*.gz=01;36:*.bz2=01;36:*.tbz2=01;36:*.bz=01;36:*.tz=01;36:*.deb=01;36:*.rpm=01;36:*.jar=01;36:*.rar=01;36:*.ace=01;36:*.zoo=01;36:*.cpio=01;36:*.7z=01;36:*.rz=01;36:*.jpg=00;93:*.jpeg=00;93:*.gif=00;93:*.bmp=00;93:*.pbm=00;93:*.pgm=00;93:*.ppm=00;93:*.tga=00;93:*.xbm=00;93:*.xpm=00;93:*.tif=00;93:*.tiff=00;93:*.png=00;93:*.mng=00;93:*.pcx=00;93:*.mov=00;93:*.mpg=00;93:*.mpeg=00;93:*.m2v=00;93:*.mkv=00;93:*.ogm=00;93:*.mp4=00;93:*.m4v=00;93:*.mp4v=00;93:*.vob=00;93:*.qt=00;93:*.nuv=00;93:*.wmv=00;93:*.asf=00;93:*.rm=00;93:*.rmvb=00;93:*.flc=00;93:*.avi=00;93:*.fli=00;93:*.gl=00;93:*.dl=00;93:*.xcf=00;93:*.xwd=00;93:*.yuv=00;93:*.svg=00;93:*.aac=00;36:*.au=00;36:*.flac=00;35:*.mid=00;35:*.midi=00;35:*.mka=00;35:*.mp3=00;35:*.mpc=00;35:*.ogg=00;35:*.ra=00;35:*.wav=00;35:*.opus=00;35:"
@ -46,3 +46,4 @@ export FZF_DEFAULT_OPTS='
# Other # Other
export _JAVA_AWT_WM_NONREPARENTING=1 export _JAVA_AWT_WM_NONREPARENTING=1
export GPG_TTY=$(tty) export GPG_TTY=$(tty)
if [ -e /home/samedamci/.nix-profile/etc/profile.d/nix.sh ]; then . /home/samedamci/.nix-profile/etc/profile.d/nix.sh; fi # added by Nix installer

View File

@ -1,21 +1,21 @@
#!/bin/sh #!/bin/sh
eval `ssh-agent`
sxhkd & sxhkd &
dunst & dunst &
picom & picom &
mpd & mpd &
dunst &
syncthing --no-browser &
syncthing -no-browser &
telegram-desktop & telegram-desktop &
xrdb ~/.config/Xresources & xrdb ~/.config/Xresources
setwall & setwall &
dbar & dbar &
setxkbmap -layout 'pl' -option caps:swapescape & setxkbmap -layout 'pl' -option caps:swapescape &
xset r rate 300 50 & xset r rate 300 50
xsetroot -cursor_name left_ptr & xsetroot -cursor_name left_ptr &
xmodmap -e "keycode 135 = Super_L" & xmodmap -e "keycode 135 = Super_L" &
unclutter -idle 2 & unclutter -idle 2 &