diff --git a/botfiles/.config/bspwm/bspwmrc b/botfiles/.config/bspwm/bspwmrc index f8a3f73..9e126fe 100755 --- a/botfiles/.config/bspwm/bspwmrc +++ b/botfiles/.config/bspwm/bspwmrc @@ -12,10 +12,13 @@ bspc monitor -d one two three four five six seven eight nine ten bspc desktop -f 1 +BOR_UF=$(echo $(xrdb -query | awk '/\*.border_unfocused/ { printf $2 } ')) +BOR_F=$(echo $(xrdb -query | awk '/\*.border_focused/ { printf $2 } ')) + bspc config border_width 1 bspc config window_gap 3 -bspc config normal_border_color "#353234" -bspc config focused_border_color "#144949" +bspc config normal_border_color "$BOR_UF" +bspc config focused_border_color "$BOR_F" bspc config split_ratio 0.52 bspc config borderless_monocle true bspc config gapless_monocle true @@ -30,6 +33,6 @@ bspc rule -a TelegramDesktop desktop='^4' #~~~~~~~~~~~ # AUTOSTART #~~~~~~~~~~~ -${HOME}/.config/autostart/autostart.sh & +$SCRD/autostart & diff --git a/botfiles/.config/flake8 b/botfiles/.config/flake8 new file mode 100644 index 0000000..71bc72f --- /dev/null +++ b/botfiles/.config/flake8 @@ -0,0 +1,5 @@ +[flake8] +ignore = E501 +max-line-length = 160 +exclude = tests/* +max-complexity = 20 diff --git a/botfiles/.config/nvim/bindings.vim b/botfiles/.config/nvim/bindings.vim index c99718f..84ee270 100644 --- a/botfiles/.config/nvim/bindings.vim +++ b/botfiles/.config/nvim/bindings.vim @@ -4,66 +4,41 @@ " Leader key let mapleader = ' ' +"~~~~~ +" Git +"~~~~~ " Show git commit list map gv :GV -" enable/disable deoplete -map d :call deoplete#toggle() +" Show status +nnoremap gs :Git -" gitgutter maping -map gt :GitGutterToggle -nmap gn (GitGutterNextHunk) -nmap gN (GitGutterPrevHunk) -nmap gs (GitGutterStageHunk) -nmap gu (GitGutterUndoHunk) -nmap gp (GitGutterPreviewHunk) +" Pull +nnoremap gpu :Gpull -" Disable hlsearch -map :noh - -" Go to last change -map l :'. - -" Complete with -" inoremap pumvisible()?"\":"\" -" inoremap pumvisible()?"\":"\" - -" When line overflows, it will go -" one _visual_ line and not actual -map j gj -map k gk - -" fzf, fuzzy finder -map f :Files -map fg :GFiles - -let g:fzf_action = { - \ 'ctrl-t': 'tab split', - \ 'ctrl-x': 'split', - \ 'ctrl-v': 'vsplit' } +"~~~~~~~~~~~~~~~~~ +" File Management +"~~~~~~~~~~~~~~~~~ +" fzf +nmap f :Files +nmap fg :GFiles " vifm -map r :Vifm +nmap r :Vifm -" deletes all trailing whitespace +" NERDTree +map n :NERDTreeToggle + +"~~~~~~~~~ +" Linters +"~~~~~~~~~ +" Deletes all trailing whitespaces noremap c :%s/\s\+$//e -" imap (fzf-complete-word) -" imap (fzf-complete-path) -" imap (fzf-complete-file-ag) -" imap (fzf-complete-line) +" Enable/disable deoplete +map d :call deoplete#toggle() -map :NERDTreeToggle - -" SuperTab -let g:SuperTabMappingTabLiteral = '' -let g:SuperTabDefaultCompletionType = 'context' -let g:SuperTabContextDefaultCompletionType = '' - -" LaTeX -map l :LLPStartPreview - -" ALE - Asynchronous Lint Engine +" ALE map fw :FixWhitespace map af :ALEFix map an :ALENext @@ -72,6 +47,17 @@ map ad :ALEDetail map ag :ALEGoToDefinitionInSplit map aG :ALEGoToDefinition +" LSP +nnoremap :LspNextDiagnostic +nnoremap :LspPreviousDiagnostic + +" Spell-check (English US and Polish) +map :setlocal spell! spelllang=en_us +map :setlocal spell! spelllang=pl + +"~~~~~~~~~~~~~~~~~~ +" Window Managment +"~~~~~~~~~~~~~~~~~~ " Tab Managment map :tabnew map :tabclose @@ -84,22 +70,25 @@ nnoremap nnoremap nnoremap -" Spell-check (English US and Polish) -map :setlocal spell! spelllang=en_us -map :setlocal spell! spelllang=pl - -" Sudo read-only file -cnoremap sudow w !sudo tee % >/dev/null - " Open terminal noremap :split term://zsh:resize 10 " Exit from terminal mode tnoremap -" UltiSnips -let g:UltiSnipsExpandTrigger='' -let g:UltiSnipsJumpForwardTrigger='' -let g:UltiSnipsJumpBackwardTrigger='' -let g:UltiSnipsListSnippets='' + +"~~~~~~~ +" Other +"~~~~~~~ +" Sudo read-only file +cnoremap sudow w !sudo tee % >/dev/null + +" Disable hlsearch +map :noh + +" Go to last change +map l :'. + +map j gj +map k gk diff --git a/botfiles/.config/nvim/colors/biual.vim b/botfiles/.config/nvim/colors/biual.vim index cc82978..48785e7 100644 --- a/botfiles/.config/nvim/colors/biual.vim +++ b/botfiles/.config/nvim/colors/biual.vim @@ -38,7 +38,7 @@ hi Error ctermfg=0 ctermbg=1 cterm=undercurl hi SpellBad ctermfg=0 ctermbg=1 cterm=undercurl hi SpellCap ctermfg=0 ctermbg=2 cterm=undercurl -hi SpellRare ctermfg=0 ctermbg=3 cterm=undercurl +hi SpellRare ctermfg=0 ctermbg=none cterm=undercurl hi SpellLocal ctermfg=0 ctermbg=5 cterm=undercurl hi DiffAdd ctermfg=0 ctermbg=2 @@ -63,6 +63,17 @@ hi MyStatuslineLinePerc ctermfg=2 ctermbg=none cterm=none hi CursorLine ctermbg=8 cterm=NONE hi CursorColumn ctermbg=8 cterm=NONE +" ALE +hi ALEWarning cterm=undercurl +hi ALEError cterm=undercurl +hi ALEWarningSign ctermbg=none ctermfg=3 cterm=bold +hi ALEErrorSign ctermbg=none ctermfg=1 cterm=bold + +" LSP +hi LspWarningText ctermfg=3 ctermbg=none cterm=bold +hi LspHintText ctermfg=3 ctermbg=none cterm=none +hi LspErrorLine ctermfg=red cterm=undercurl +hi LspErrorText ctermfg=red ctermbg=none " Cursorline highlight augroup CursorLine @@ -98,9 +109,3 @@ hi GitGutterAdd ctermbg=none ctermfg=2 cterm=bold hi GitGutterDelete ctermbg=none ctermfg=1 cterm=bold hi GitGutterChangeDelete ctermbg=none ctermfg=5 cterm=bold -" ALE -hi ALEWarning cterm=undercurl -hi ALEError cterm=undercurl -hi ALEWarningSign ctermbg=none ctermfg=3 cterm=bold -hi ALEErrorSign ctermbg=none ctermfg=1 cterm=bold - diff --git a/botfiles/.config/nvim/init.vim b/botfiles/.config/nvim/init.vim index b13bbea..e7f1148 100644 --- a/botfiles/.config/nvim/init.vim +++ b/botfiles/.config/nvim/init.vim @@ -9,13 +9,12 @@ " ░░░ ░░ ░░░░░░ ░░░░░░ ░░ ░░ ░░░ ░░ ░░ +" Load other modules source $HOME/.config/nvim/statusline.vim source $HOME/.config/nvim/plugins.vim source $HOME/.config/nvim/bindings.vim -"============= " Basic stuff -"============= syntax on filetype plugin indent on set scrolloff=5 @@ -49,14 +48,11 @@ augroup resCur autocmd BufWinEnter * call ResCur() augroup END -"Python paths, needed for virtualenvs +" Python paths, needed for virtualenvs let g:python3_host_prog = '/usr/bin/python3' let g:python_host_prog = '/usr/bin/python2' - -"=================== " Language-specific -"=================== augroup langindentation autocmd Filetype c setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2 autocmd Filetype cpp setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2 @@ -69,5 +65,5 @@ augroup langindentation autocmd Filetype yaml setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2 augroup END -"==Encoding== +" Encoding scriptencoding utf-8 diff --git a/botfiles/.config/nvim/plugins.vim b/botfiles/.config/nvim/plugins.vim index f03f6f6..be82e22 100644 --- a/botfiles/.config/nvim/plugins.vim +++ b/botfiles/.config/nvim/plugins.vim @@ -26,9 +26,6 @@ call plug#begin('~/.config/nvim/bundle') " Plug 'deoplete-plugins/deoplete-jedi' Plug 'deoplete-plugins/deoplete-zsh' Plug 'deoplete-plugins/deoplete-go', { 'do': 'make'} - " Plug 'wokalski/autocomplete-flow' - " Plug 'Shougo/neosnippet' - " Plug 'Shougo/neosnippet-snippets' Plug 'prabirshrestha/async.vim' Plug 'prabirshrestha/asyncomplete.vim' Plug 'prabirshrestha/vim-lsp' @@ -43,7 +40,6 @@ call plug#begin('~/.config/nvim/bundle') Plug 'mattn/emmet-vim' - Plug 'tpope/vim-surround' Plug 'tpope/vim-commentary' Plug 'jiangmiao/auto-pairs' @@ -71,16 +67,20 @@ call plug#end() "======== " Config "======== -" vim-move -let g:move_key_modifier = 'C' - " ALE +let g:ale_sign_error = '' +let g:lsp_signs_error = {'text': ''} +let g:ale_sign_warning = '' +let g:lsp_signs_warning = {'text': ''} +" let g:lsp_signs_error = {'', 'icon': '/path/to/some/icon'} " icons require GUI +let g:lsp_signs_hint = {'text': ''} " icons require GUI + let g:ale_linters = { \ 'c': ['ccls', 'clang'], \ 'cpp': ['ccls', 'clang'], \ 'javascript': ['eslint'], \ 'php': ['php'], -\ 'python': ['pyls', 'flake8'], +\ 'python': ['flake8'], \ 'sh': ['language_server', 'shellcheck', 'shell'], \ 'zsh': ['language_server', 'shellcheck', 'shell'], \ 'go': ['gofmt'], @@ -96,11 +96,14 @@ let g:ale_fixers = { \ 'javascript': ['prettier'], \ 'json': ['prettier'], \ 'php': ['prettier'], -\ 'python': ['black'], +\ 'python': ['autopep8', 'isort', 'black', 'add_blank_lines_for_python_control_statements'], \ 'scss': ['prettier'], \ 'yaml': ['prettier'], \} +let g:ale_python_autopep8_use_global = 1 +let g:ale_python_black_use_global = 1 + " fzf let g:fzf_colors = \ { 'fg': ['fg', 'Normal'], @@ -119,7 +122,6 @@ let g:fzf_colors = let g:fzf_layout = { 'down': '~20%' } - " gitgutter set updatetime=1000 @@ -135,23 +137,19 @@ autocmd FileType html,css EmmetInstall " deoplete let g:deoplete#enable_at_startup = 1 +let deoplete#tag#cache_limit_size = 5000000 +autocmd InsertLeave,CompleteDone * if pumvisible() == 0 | pclose | endif let g:deoplete#enable_ignore_case = 1 set completeopt-=preview 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#source('ale', 'rank', 1000) -" call deoplete#custom#source('autocomplete-flow', 'rank', 1000) -" call deoplete#custom#source('autocomplete-flow') -" call deoplete#custom#option('auto_complete_delay', 100) call deoplete#custom#option('smart_case', v:false) let g:deoplete#sources#go#gocode_binary = "$HOME/go/bin/gocode" " For python language server if (executable('pyls')) - " let s:pyls_path = fnamemodify(g:python_host_prog, ':h') . '/'. 'pyls' augroup LspPython autocmd! autocmd User lsp_setup call lsp#register_server({ @@ -175,7 +173,7 @@ if (executable('typescript-language-server')) endif if (executable('ccls')) - augroup LspC* + augroup LspCpp autocmd! autocmd User lsp_setup call lsp#register_server({ \ 'name': 'ccls', @@ -187,6 +185,13 @@ if (executable('ccls')) augroup END 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 " autopairs let g:AutoPairs={'(':')', '[':']', '{':'}', "'":"'", '"':'"', "`":"`", '```':'```', '"""':'"""', "'''":"'''"} "'<':'>', diff --git a/botfiles/.config/picom/picom.conf b/botfiles/.config/picom/picom.conf index 7b2bb3c..20e8516 100644 --- a/botfiles/.config/picom/picom.conf +++ b/botfiles/.config/picom/picom.conf @@ -46,7 +46,7 @@ glx-copy-from-front = false; # Enabled client-side shadows on windows. shadow = true; # The blur radius for shadows. (default 12) -shadow-radius = 20; +shadow-radius = 10; # The left offset for shadows. (default -15) shadow-offset-x = -10; # The top offset for shadows. (default -15) @@ -101,7 +101,9 @@ inactive-opacity-override = false; opacity-rule = [ "95:class_g = 'St' && focused", + "95:class_g = 'Tabbed' && focused", "93:class_g = 'St' && !focused", + "93:class_g = 'Tabbed' && !focused", "93:class_g = 'Polybar'", "93:class_g = 'Rofi'" ]; @@ -116,10 +118,10 @@ blur-kern = "7x7box" # Blur background of opaque windows with transparent frames as well. # blur-background-frame = true; # Do not let blur radius adjust based on window opacity. -blur-background-fixed = true; +blur-background-fixed = false; blur-background-exclude = [ - "window_type = 'desktop'", - "maim" + "class_g = 'slop'", + "window_type = 'desktop'" ]; ################################# diff --git a/botfiles/.config/sxhkd/sxhkdrc.pc b/botfiles/.config/sxhkd/sxhkdrc.pc index 1d4dd89..0c41726 100644 --- a/botfiles/.config/sxhkd/sxhkdrc.pc +++ b/botfiles/.config/sxhkd/sxhkdrc.pc @@ -19,7 +19,7 @@ super + b qutebrowser # st super + Return - tabbed -r 2 st -w '' + st # vifm super + r st -e vifm @@ -30,9 +30,9 @@ super + f super + d rofi -show drun # neomutt - XF86Mail +XF86Mail st -e neomutt - super + g +super + g st -e neomutt diff --git a/botfiles/.config/vlc/vlc-qt-interface.conf b/botfiles/.config/vlc/vlc-qt-interface.conf index 2a9c224..9d0c2d4 100644 --- a/botfiles/.config/vlc/vlc-qt-interface.conf +++ b/botfiles/.config/vlc/vlc-qt-interface.conf @@ -1,6 +1,6 @@ [General] filedialog-path=@Variant(\0\0\0\x11\0\0\0)file:///mnt/HDD/samedamci/Videos/mc1.webm) -geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\x3\xe7\0\0\x2?\0\0\a|\0\0\x4\x34\0\0\x3\xe8\0\0\x2@\0\0\a{\0\0\x4\x33\0\0\0\0\0\0\0\0\a\x80\0\0\x3\xe8\0\0\x2@\0\0\a{\0\0\x4\x33) +geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\x3\0\0\0\x1c\0\0\a|\0\0\x4\x34\0\0\0\x4\0\0\0\x1d\0\0\a{\0\0\x4\x33\0\0\0\0\0\0\0\0\a\x80\0\0\0\x4\0\0\0\x1d\0\0\a{\0\0\x4\x33) [FullScreen] pos=@Point(0 0) @@ -15,6 +15,10 @@ playlist-visible=false playlistSize=@Size(-1 -1) status-bar-visible=false +[OpenDialog] +advanced=false +size=@Size(526 405) + [RecentsMRL] list=file:///home/samedamci/Python%20Tutorial%20-%20Working%20with%20JSON%20Data%20using%20the%20json%20Module.m4a, file:///home/samedamci/Documents/PythonCurses/Learn%20Python%20-%20Full%20Course%20for%20Beginners%20[Tutorial]-rfscVS0vtbw.mp4, file:///home/samedamci/Downloads/Iron_pudzian/assets/minecraft/sounds/mob/irongolem/throw.ogg, file:///home/samedamci/Downloads/Iron_pudzian/assets/minecraft/sounds/mob/irongolem/no3.ogg, file:///home/samedamci/Downloads/Iron_pudzian/assets/minecraft/sounds/mob/irongolem/hit4.ogg, file:///home/samedamci/Downloads/Iron_pudzian/assets/minecraft/sounds/mob/irongolem/hit3.ogg, file:///home/samedamci/Downloads/Iron_pudzian/assets/minecraft/sounds/mob/irongolem/hit2.ogg, file:///home/samedamci/Downloads/Iron_pudzian/assets/minecraft/sounds/mob/irongolem/hit1.ogg, file:///home/samedamci/Downloads/Iron_pudzian/assets/minecraft/sounds/mob/irongolem/death.ogg, file:///mnt/HDD/samedamci/Videos/mc1.webm, file:///mnt/HDD/samedamci/Videos/brovar.webm, file:///mnt/HDD/samedamci/Videos/2020-02-14_13-27-59.flv, file:///mnt/HDD/samedamci/Videos/2020-02-14_13-26-07.flv, file:///mnt/HDD/samedamci/Videos/2020-02-14_13-23-22.flv, file:///mnt/HDD/samedamci/Videos/2020-02-14_13-22-36.flv, file:///mnt/HDD/samedamci/Videos/2020-02-14_13-18-04.flv, file:///mnt/HDD/samedamci/Videos/2020-02-14_13-04-07.flv, file:///home/samedamci/2020-03-01%2013-24-25.flv, file:///home/samedamci/SD/Music/Ki.flac, file:///home/samedamci/SD/Music/001%20%20Cantate%20Tutti.flac, directory:///home/samedamci/SD/Music times=0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33408, 0 diff --git a/botfiles/.shellrc b/botfiles/.shellrc index 18016f5..1bb9121 100644 --- a/botfiles/.shellrc +++ b/botfiles/.shellrc @@ -1,12 +1,12 @@ -# -# ██ ██ ██ -# ░██ ░██ ░██ -# ██████░██ █████ ░██ ░██ ██████ █████ +# +# ██ ██ ██ +# ░██ ░██ ░██ +# ██████░██ █████ ░██ ░██ ██████ █████ # ██░░░░ ░██████ ██░░░██ ░██ ░██░░██░░█ ██░░░██ -# ░░█████ ░██░░░██░███████ ░██ ░██ ░██ ░ ░██ ░░ +# ░░█████ ░██░░░██░███████ ░██ ░██ ░██ ░ ░██ ░░ # ░░░░░██░██ ░██░██░░░░ ░██ ░██ ░██ ░██ ██ -# ██████ ░██ ░██░░██████ ███ ███░███ ░░█████ -# ░░░░░░ ░░ ░░ ░░░░░░ ░░░ ░░░ ░░░ ░░░░░ +# ██████ ░██ ░██░░██████ ███ ███░███ ░░█████ +# ░░░░░░ ░░ ░░ ░░░░░░ ░░░ ░░░ ░░░ ░░░░░ #~~~~~~~~~ # General @@ -50,12 +50,13 @@ alias grm='git rm -f' alias gi='git init' # github-cli -alias gh-rcp='gh repo create --public' +alias gh-rc='gh repo create --public' +alias gh-rcp='gh repo create' alias gh-rv='gh repo view' # fzf ff() { find ./* -type f | fzf | xargs -r $EDITOR ;} -fd() { vifm "$(find ./* -type d | fzf)" ; clear } +fd() { vifm "$(find ./* -type d | fzf)" ; clear ; } fhd() { find . -type d | fzf | xargs -r $EDITOR ; } fhf() { find . -type f | fzf | xargs -r $EDITOR ; } alias f='ff' diff --git a/dotman b/dotman index 13b7413..5ed4e9f 100755 --- a/dotman +++ b/dotman @@ -155,7 +155,7 @@ copy_configs() { cp .zshrc .bash_profile .bashrc .profile .shellrc .zprofile .Xresources .xinitrc ~/ - cp -r .scripts ~/ + cp -r .scripts ~/scripts cd ~/.scripts/ rm -rf rofi-keepassxc git clone https://github.com/samedamci/rofi-keepassxc diff --git a/updot b/updot index 2f57d26..6fd2098 100755 --- a/updot +++ b/updot @@ -5,7 +5,7 @@ echo "Adding configs to dotfiles repo..." cd ~ cp .zshrc .Xresources .profile .shellrc .bashrc .zprofile .bash_profile .local/share/TelegramDesktop/tdata/shortcuts-custom.json ~/Dotfiles/botfiles/ &>/dev/null cd ~/.scripts/ -cp lockscreen powermenu screenshot update-check updater websearch ~/Dotfiles/botfiles/.scripts/ &>/dev/null +cp autostart lockscreen powermenu screenshot update-check updater websearch ~/Dotfiles/botfiles/.scripts/ &>/dev/null cd ~/.config if [ "$HOSTNAME" = "pc" ]; then @@ -16,7 +16,7 @@ elif [ "$HOSTNAME" = "laptop" ]; then cat polybar/config > polybar/config.laptop fi -cp -r autostart bspwm dconf dunst gtk-3.0 gtk-2.0 homepage mpd ncmpcpp neofetch nvim picom polybar qutebrowser ranger rofi sxhkd vifm vis vlc wallpapers yay zsh ~/Dotfiles/botfiles/.config/ &>/dev/null +cp -r autostart flake8 bspwm dconf dunst gtk-3.0 gtk-2.0 homepage mpd ncmpcpp neofetch nvim picom polybar qutebrowser ranger rofi sxhkd vifm vis vlc wallpapers yay zsh ~/Dotfiles/botfiles/.config/ &>/dev/null cd ~/Dotfiles/botfiles/.config/ rm -rf nvim/bundle zsh/plugins mpd/database zsh/history mpd/mpd.log mpd/pid mpd/state mpd/sticker.sql vis/vis.log ncmpcpp/lyrics sxhkd/sxhkdrc polybar/config vifm/vifminfo