Lots of changes

This commit is contained in:
samedamci 2020-03-21 20:13:21 +01:00
parent c1da8cb145
commit 10df8e3d94
12 changed files with 125 additions and 115 deletions

View File

@ -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 &

5
botfiles/.config/flake8 Normal file
View File

@ -0,0 +1,5 @@
[flake8]
ignore = E501
max-line-length = 160
exclude = tests/*
max-complexity = 20

View File

@ -4,66 +4,41 @@
" Leader key
let mapleader = ' '
"~~~~~
" Git
"~~~~~
" Show git commit list
map <Leader>gv :GV<CR>
" enable/disable deoplete
map <Leader>d :call deoplete#toggle()<CR>
" Show status
nnoremap <Leader>gs :Git<CR>
" gitgutter maping
map <Leader>gt :GitGutterToggle<CR>
nmap gn <Plug>(GitGutterNextHunk)
nmap gN <Plug>(GitGutterPrevHunk)
nmap gs <Plug>(GitGutterStageHunk)
nmap gu <Plug>(GitGutterUndoHunk)
nmap gp <Plug>(GitGutterPreviewHunk)
" Pull
nnoremap <Leader>gpu :Gpull<CR>
" Disable hlsearch
map <C-s> :noh<CR>
" Go to last change
map <Leader>l :'.<CR>
" Complete with <TAB>
" inoremap <expr> <silent> <Tab> pumvisible()?"\<C-n>":"\<TAB>"
" inoremap <expr> <silent> <S-TAB> pumvisible()?"\<C-p>":"\<S-TAB>"
" When line overflows, it will go
" one _visual_ line and not actual
map j gj
map k gk
" fzf, fuzzy finder
map <Leader>f :Files<CR>
map <Leader>fg :GFiles<CR>
let g:fzf_action = {
\ 'ctrl-t': 'tab split',
\ 'ctrl-x': 'split',
\ 'ctrl-v': 'vsplit' }
"~~~~~~~~~~~~~~~~~
" File Management
"~~~~~~~~~~~~~~~~~
" fzf
nmap <silent> <Leader>f :Files<CR>
nmap <silent> <Leader>fg :GFiles<CR>
" vifm
map <Leader>r :Vifm<CR>
nmap <silent> <Leader>r :Vifm<CR>
" deletes all trailing whitespace
" NERDTree
map <silent> <Leader>n :NERDTreeToggle<CR>
"~~~~~~~~~
" Linters
"~~~~~~~~~
" Deletes all trailing whitespaces
noremap <leader>c :%s/\s\+$//e<cr>
" imap <c-x><c-k> <plug>(fzf-complete-word)
" imap <c-x><c-f> <plug>(fzf-complete-path)
" imap <c-x><c-j> <plug>(fzf-complete-file-ag)
" imap <c-x><c-l> <plug>(fzf-complete-line)
" Enable/disable deoplete
map <Leader>d :call deoplete#toggle()<CR>
map <C-n> :NERDTreeToggle<CR>
" SuperTab
let g:SuperTabMappingTabLiteral = '<a-tab>'
let g:SuperTabDefaultCompletionType = 'context'
let g:SuperTabContextDefaultCompletionType = '<c-n>'
" LaTeX
map <Leader>l :LLPStartPreview<CR>
" ALE - Asynchronous Lint Engine
" ALE
map fw :FixWhitespace<CR>
map <Leader>af :ALEFix<CR>
map <Leader>an :ALENext<CR>
@ -72,6 +47,17 @@ map <Leader>ad :ALEDetail<CR>
map <Leader>ag :ALEGoToDefinitionInSplit<CR>
map <Leader>aG :ALEGoToDefinition<CR>
" LSP
nnoremap <silent> <C-]> :LspNextDiagnostic<CR>
nnoremap <silent> <C-[> :LspPreviousDiagnostic<CR>
" Spell-check (English US and Polish)
map <F6> :setlocal spell! spelllang=en_us<CR>
map <F7> :setlocal spell! spelllang=pl<CR>
"~~~~~~~~~~~~~~~~~~
" Window Managment
"~~~~~~~~~~~~~~~~~~
" Tab Managment
map <S-o> :tabnew<CR>
map <S-d> :tabclose<CR>
@ -84,22 +70,25 @@ nnoremap <C-A-k> <C-w><C-k>
nnoremap <C-A-l> <C-w><C-l>
nnoremap <C-A-h> <C-w><C-h>
" Spell-check (English US and Polish)
map <F6> :setlocal spell! spelllang=en_us<CR>
map <F7> :setlocal spell! spelllang=pl<CR>
" Sudo read-only file
cnoremap sudow w !sudo tee % >/dev/null
" Open terminal
noremap <C-A-t> :split term://zsh<cr>:resize 10<cr>
" Exit from terminal mode
tnoremap <C-e> <C-\><C-n>
" UltiSnips
let g:UltiSnipsExpandTrigger='<C-z>'
let g:UltiSnipsJumpForwardTrigger='<C-s>'
let g:UltiSnipsJumpBackwardTrigger='<C-g>'
let g:UltiSnipsListSnippets='<C-p>'
"~~~~~~~
" Other
"~~~~~~~
" Sudo read-only file
cnoremap sudow w !sudo tee % >/dev/null
" Disable hlsearch
map <silent> <C-s> :noh<CR>
" Go to last change
map <Leader>l :'.<CR>
map j gj
map k gk

View File

@ -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

View File

@ -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
@ -53,10 +52,7 @@ augroup END
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

View File

@ -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={'(':')', '[':']', '{':'}', "'":"'", '"':'"', "`":"`", '```':'```', '"""':'"""', "'''":"'''"} "'<':'>',

View File

@ -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'"
];
#################################

View File

@ -19,7 +19,7 @@ super + b
qutebrowser
# st
super + Return
tabbed -r 2 st -w ''
st
# vifm
super + r
st -e vifm

View File

@ -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

View File

@ -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'

2
dotman
View File

@ -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

4
updot
View File

@ -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