10 files changed,
194 insertions(+),
46 deletions(-)
Author:
Smirnov Olexandr
ss2316544@gmail.com
Committed at:
2021-01-12 16:47:13 +0200
Parent:
f7c0cef
M
config/i3/config
··· 19 19 set $terminal alacritty 20 20 set $browser firefox 21 21 set $filemanager thunar 22 -set $guieditor emacs 22 +set $codeeditor alacritty -e nvim 23 23 24 24 ############ Autostart ############ 25 +exec --no-startup-id exec setxkbmap "us,ua" ",winkeys" "grp:alt_shift_toggle" -option "ctrl:nocaps" 25 26 exec --no-startup-id exec picom --experimental-backends -b 27 +exec_always --no-startup-id exec $HOME/.config/i3/bar.sh 26 28 exec --no-startup-id exec nitrogen --restore 27 -exec --no-startup-id exec setxkbmap "us,ua" ",winkeys" "grp:alt_shift_toggle" -option "ctrl:nocaps" 28 -exec --no-startup-id exec org.telegram.desktop 29 29 exec --no-startup-id exec lxsession 30 -exec_always --no-startup-id exec $HOME/.script/autolock 31 -exec_always --no-startup-id exec $HOME/.config/i3/bar.sh 32 -exec --no-startup-id exec discord 30 +exec --no-startup-id exec $HOME/.script/autolock 31 +#exec --no-startup-id exec org.telegram.desktop 32 +#exec --no-startup-id exec discord 33 33 #exec --no-startup-id exec conky 34 34 #exec --no-startup-id exec redshift-gtk 35 35 ··· 42 42 # Restart i3wm 43 43 bindsym $mod+Control+r restart 44 44 45 -# Reload i3wm 46 -bindsym $mod+Shift+r reload 47 - 48 45 # Floating layout 49 -bindsym $mod+Tab floating toggle 46 +bindsym $mod+Shift+Tab floating toggle 50 47 51 48 # Tab layout 52 -bindsym $mod+Shift+w layout tabbed 49 +bindsym $mod+Control+w layout tabbed 53 50 54 51 # Split layout 55 -bindsym $mod+Shift+e layout toggle split 52 +bindsym $mod+Control+e layout toggle split 56 53 57 54 # Splits 58 -bindsym $mod+b split h 59 -bindsym $mod+v split v 55 +#bindsym $mod+b split h 56 +#bindsym $mod+v split v 60 57 61 58 # Scratchpad 62 59 bindsym $mod+Shift+grave move scratchpad ··· 73 70 74 71 # Apps 75 72 bindsym $mod+Return exec $terminal 76 -bindsym $mod+F2 exec $browser 77 -bindsym $mod+f exec $filemanager 78 -bindsym $mod+d exec $guieditor 73 +bindsym $mod+Shift+w exec $browser 74 +bindsym $mod+Shift+f exec $filemanager 75 +bindsym $mod+Shift+e exec $codeeditor 76 + 77 +# Toogle polybar 78 +bindsym $mod+b exec ~/.script/polybar-toggle 79 79 80 80 # Sceenshot 81 -bindsym --release Print exec "scrot -s /home/${USER}/$(date +%Y-%m-%d-%H-%M-%S).png" 82 -bindsym --release Shift+Print exec "scrot /home/${USER}/$(date +%Y-%m-%d-%H-%M-%S).png" 81 +bindsym --release Print exec scrot -s /home/${USER}/$(date +%Y-%m-%d-%H-%M-%S).png 82 +bindsym --release Shift+Print exec scrot /home/${USER}/$(date +%Y-%m-%d-%H-%M-%S).png 83 83 84 84 # Lockscreen 85 -bindsym $mod+Shift+z exec betterlockscreen --off 180 -t \"Computer is lockerd\" -l 85 +bindsym $mod+Shift+z exec betterlockscreen --off 180 -t "Computer is lockerd" -l 86 86 87 87 # Volume 88 -bindsym $mod+plus exec "pactl set-sink-volume alsa_output.pci-0000_00_1b.0.analog-stereo +2%" 89 -bindsym $mod+minus exec "pactl set-sink-volume alsa_output.pci-0000_00_1b.0.analog-stereo -2%" 90 -bindsym $mod+Shift+minus exec "pactl set-sink-mute alsa_output.pci-0000_00_1b.0.analog-stereo toggle" 88 +bindsym $mod+plus exec "amixer sset Master 2%+" 89 +bindsym $mod+minus exec "amixer sset Master 2%-" 90 +bindsym $mod+Shift+minus exec "amixer sset Master toggle" 91 91 92 92 ######### Window preferens ######## 93 93 assign [class="(?i)telegram|discord"] $ws6 94 94 for_window [class="(?i)telegram|discord"] layout tabbed 95 -#focus_on_window_activation focus 95 +focus_on_window_activation focus 96 96 97 97 ########## Change focus ########### 98 98 bindsym $mod+h focus left
A
config/nvim/UltiSnips/go.snippets
··· 1 +snippet pkg "Package" 2 +package ${1:main} 3 +endsnippet 4 + 5 +snippet import "Import section" 6 +import ( 7 + ${1} 8 +) 9 +endsnippet 10 + 11 +snippet for "For loop" 12 +for ${1:i\:\=1}; ${2:i\<\=10}; ${3:\i\+\+} { 13 + ${4} 14 +} 15 +endsnippet 16 + 17 +snippet var "Variable declaration" 18 +var ${1:name}${2/(.+)/ /}${2:type}${3: = ${0:value}} 19 +endsnippet 20 + 21 +snippet vars "Variables declaration" 22 +var ( 23 + ${1:name}${2/(.+)/ /}${2:type}${3: = ${0:value} } 24 +) 25 +endsnippet 26 + 27 +snippet const "Constant declaration" 28 +const ${1:name}${2/(.+)/ /}${2:type} = ${0:value} 29 +endsnippet 30 + 31 +snippet consts "Constants declaration" 32 +const ( 33 + ${1:constant}${2/(.+)/ /}${2:type} = ${0:value} 34 +) 35 +endsnippet 36 + 37 +snippet err "Rrror handling" 38 +if err != nil { 39 + log.${1:Fatal}(err) 40 +} 41 +endsnippet 42 + 43 +snippet ;= ";= to :=" 44 +:= $1 45 +endsnippet
A
config/nvim/UltiSnips/markdown.snippets
··· 1 +priority -50 2 + 3 +snippet `py "Python code block" 4 +```python 5 +${1} 6 +``` 7 +endsnippet 8 + 9 +snippet `sh "Bash code block" 10 +```bash 11 +${1} 12 +``` 13 +endsnippet 14 + 15 +snippet `go "GO code block" 16 +```go 17 +${1} 18 +``` 19 +endsnippet 20 + 21 +snippet // "Comment" 22 +<!-- ${1:${VISUAL}} --> 23 +endsnippet
A
config/nvim/UltiSnips/sh.snippets
··· 1 +snippet !sh "SH Shebang" 2 +#!/bin/sh 3 +${1} 4 +endsnippet 5 + 6 +snippet !bash "BASH Shebang" 7 +#!/bin/bash 8 +${1} 9 +endsnippet 10 + 11 +snippet if "If declaration" 12 +if [ ${1} ]; then 13 + ${2} 14 +fi 15 +endsnippet 16 + 17 +snippet for "For loop" 18 +for (( i=0; i < ${1:10}; i++ )); do 19 + ${2} 20 +done 21 +endsnippet 22 + 23 +snippet while "While loop" 24 +while ${1:true}; do 25 + ${2} 26 +done 27 +endsnippet 28 + 29 +snippet case "Case" 30 +case "${1:$variable}" in 31 + "${2}") ${3} ;; 32 +esac 33 +endsnippet 34 + 35 +snippet fn "Function declaration" 36 +function ${1:name}(${2}) { 37 + ${3} 38 +} 39 +endsnippet
M
config/nvim/init.vim
··· 7 7 Plug 'ap/vim-css-color' " CSS color preview 8 8 Plug 'airblade/vim-gitgutter' " Git indicator 9 9 Plug 'preservim/nerdcommenter' " Code commenter 10 + Plug 'junegunn/goyo.vim' 11 + Plug 'voldikss/vim-floaterm' " Terminal 10 12 11 13 " Project/file navigation 12 14 Plug 'scrooloose/nerdtree', {'on': 'NERDTreeToggle'} ··· 25 27 Plug 'vim-python/python-syntax', {'for': 'python'} 26 28 Plug 'alaviss/nim.nvim', {'for': 'nim'} 27 29 Plug 'fatih/vim-go', {'for': 'go'} 28 - "Plug 'nsf/gocode', {'for': 'go'} 30 + Plug 'nsf/gocode', {'for': 'go'} 29 31 Plug 'PotatoesMaster/i3-vim-syntax', {'for': 'i3'} 30 32 Plug 'kovetskiy/sxhkd-vim', {'for': 'sxhkd'} 31 33 call plug#end() ··· 101 103 102 104 " Markdown 103 105 let g:vim_markdown_folding_disabled = 1 106 +let g:vim_markdown_frontmatter=1 104 107 let g:markdown_fenced_languages = ['go', 'python', 'bash', 'sh=bash'] 105 108 let g:ficus_dir = "~/Documents/Notes" 106 109 ··· 110 113 " Python 111 114 let g:python_higlight_all = 1 112 115 113 -" YouCompleteMe 114 -let g:ycm_key_list_previous_completion=['<Up>'] 116 +" Floaterm 117 +let g:floaterm_title = "" 118 +let g:floaterm_wintype = "floating" 119 +let g:floaterm_position = "bottomright" 120 +let g:floaterm_borderchars = "" 121 +let g:floaterm_height = 0.4 122 +let g:floaterm_width = 0.5 123 +let g:floaterm_autoclose = 2 124 +nmap <A-t> :FloatermNew<CR> 115 125 116 -" UltiSnipts 117 -let g:UltiSnipsExpandTrigger="<c-tab>" 118 -let g:UltiSnipsListSnippets="<c-s-tab>" 119 -"let g:UltiSnipsJumpForwardTrigger="<c-j>" 120 -"let g:UltiSnipsJumpBackwardTrigger="<c-k>" 121 126 127 +" UltiSnipts 128 +let g:UltiSnipsExpandTrigger="<C-a>" 129 +let g:UltiSnipsEditSplit="vertical" 130 +let g:UltiSnipsJumpForwardTrigger="<C-a>" 131 +let g:UltiSnipsJumpBackwardTrigger="<C-s>" 122 132 123 133 " Go 124 134 let g:go_template_autocreate = 0 ··· 187 197 noremap <leader>o :bprev<CR> 188 198 189 199 " Plugins 200 +map <leader>gg :Goyo 80%x95% <CR> 190 201 map <F9> :TagbarToggle<CR> 191 202 map <C-b> :NERDTreeToggle<CR>