all repos

dotfiles @ 5c2b55f13c6bb7812793bac979727cc7bcc4e4f3

i use rach linux btw
8 files changed, 31 insertions(+), 81 deletions(-)
Add vim-suround in nvim config
Author: Smirnov Alexandr ss2316544@gmail.com
Committed at: 2021-03-02 21:01:44 +0200
Parent: d50fc73
M bin/catfetch
···
                15
                15
                 manager=$(which apt pacman yay apk xbps-query 2>/dev/null)

              
                16
                16
                 manager=${manager##*/}

              
                17
                17
                 case "$manager" in

              
                18
                
                -    apt)        packages="$(dpkg-query -f '${binary:Package}\n' -W | wc -l)";;

              
                19
                
                -    pacman)     packages="$(pacman -Q | wc -l)";;

              
                20
                
                -    yay)        packages="$(yay -Q | wc -l)";;

              
                21
                
                -    apk)        packages="$(apk list --installed | wc -l)";;

              
                22
                
                -    xbps-query) packages="$(xbps-query -l | wc -l)";;

              
                
                18
                +    apt) packages="$(dpkg-query -f '${binary:Package}\n' -W | wc -l)";;

              
                
                19
                +    yay) packages="$(yay -Q | wc -l)";;

              
                
                20
                +    pacman) packages="$(pacman -Q | wc -l)";;

              
                23
                21
                 esac 

              
                24
                22
                 

              
                25
                23
                 

              
M config/bspwm/bspwmrc
···
                6
                6
                 }

              
                7
                7
                 

              
                8
                8
                 ###== Autostart

              
                9
                
                -Run setxkbmap "us,ua" ",winkeys" "grp:alt_shift_toggle" -option "ctrl:nocaps" &

              
                10
                9
                 Run feh --randomize --bg-scale ~/Pictures/wallp &

              
                11
                10
                 Run sxhkd -c ~/.config/bspwm/sxhkd &

              
                12
                11
                 ~/.config/bspwm/bar.sh &

              
                13
                
                -Run ~/.script/autolock &

              
                14
                12
                 Run lxsession &

              
                15
                13
                 Run picom -b &

              
                16
                14
                 

              
M config/nvim/init.vim
···
                1
                1
                 call plug#begin('~/.vim/plugged')

              
                2
                2
                   Plug 'Smirnov-O/nten16.vim'

              
                3
                
                -  Plug 'itchyny/lightline.vim'

              
                4
                3
                   Plug 'jiangmiao/auto-pairs'

              
                5
                4
                   Plug 'maxboisvert/vim-simple-complete'

              
                6
                5
                   Plug 'sheerun/vim-polyglot'

              
                7
                
                -  Plug 'ap/vim-css-color'

              
                
                6
                +  Plug 'tpope/vim-surround'

              
                8
                7
                 call plug#end()

              
                9
                8
                 

              
                10
                9
                 "== General

              ···
                27
                26
                 set autoindent

              
                28
                27
                 

              
                29
                28
                 " Status line

              
                30
                
                -set noshowmode showcmd

              
                
                29
                +set laststatus=0

              
                
                30
                +set showmode showcmd

              
                31
                31
                 set ruler

              
                32
                32
                 

              
                
                33
                +" Scroll

              
                
                34
                +set scrolloff=3

              
                
                35
                +

              
                33
                36
                 " Mouse

              
                34
                37
                 set mouse=a

              
                35
                38
                 set mousehide

              ···
                41
                44
                 

              
                42
                45
                 " Backup file & history

              
                43
                46
                 set nobackup noswapfile

              
                44
                
                -set history=100

              
                
                47
                +set history=500

              
                45
                48
                 

              
                46
                49
                 " Search

              
                47
                50
                 set incsearch

              ···
                51
                54
                 " Enable mode line

              
                52
                55
                 set modeline

              
                53
                56
                 

              
                54
                
                -" File explorer

              
                55
                
                -let g:netrw_banner = 0

              
                56
                
                -let g:netrw_browse_split = 2

              
                57
                
                -let g:netrw_winsize = 15

              
                58
                
                -

              
                59
                57
                 " Auto reload file

              
                60
                58
                 set autoread

              
                61
                59
                 

              
                62
                60
                 " Buffer

              
                63
                61
                 set hidden

              
                64
                62
                 

              
                65
                
                -" Spell checker

              
                66
                
                -set nospell spelllang=en_us

              
                67
                
                -

              
                68
                63
                 " Space/tab indicator

              
                69
                64
                 set list listchars=tab:\|·,trail:~,extends:>,precedes:<,space:·

              
                70
                65
                 

              ···
                72
                67
                 set visualbell t_vb=

              
                73
                68
                 

              
                74
                69
                 "== Settings for specific files

              
                75
                
                -autocmd BufWritePre *.py normal m`:%s/\s\+$//e ``

              
                
                70
                +autocmd BufWritePre *.py normal m`:%s/\s\+$//e `

              
                76
                71
                 autocmd FileType python,go,json setlocal expandtab shiftwidth=4 tabstop=4

              
                77
                72
                 autocmd FileType html,css,javascript,javascriptreact,yaml setlocal expandtab shiftwidth=2 tabstop=2

              
                78
                73
                 

              
                
                74
                +

              
                79
                75
                 "== Aliases

              
                80
                76
                 command! W :w

              
                81
                
                -command! Q :q

              
                
                77
                +command! WQ :wq

              
                82
                78
                 command! Wq :wq

              
                83
                
                -command! WQ :wq

              
                84
                
                -command! Term :vsplit | vertical resize 45 | terminal

              
                85
                79
                 command! Wiki :e ~/doc/index.md

              
                86
                80
                 command! Prettier :!prettier --write %

              
                87
                81
                 command! ESlint :!eslint %

              ···
                90
                84
                 command! AutoPep8 :!autopep8 --in-place %

              
                91
                85
                 

              
                92
                86
                 

              
                93
                
                -"== Plug in configuration

              
                94
                
                -let g:lightline = {

              
                95
                
                -\ 'colorscheme': 'nten16',

              
                96
                
                -\ 'active': {

              
                97
                
                -\  'left':  [ [ 'mode', 'paste' ],

              
                98
                
                -\             [ 'readonly', 'modified' ] ],

              
                99
                
                -\  'right': [ [ 'lineinfo' ],

              
                100
                
                -\             [ 'percent'  ],

              
                101
                
                -\             [ 'filename', 'filetype' ] ] }

              
                102
                
                -\ }

              
                103
                
                -

              
                104
                87
                 "== Mapping

              
                105
                88
                 let mapleader="'"

              
                106
                89
                 

              
                107
                90
                 " Alternative keys

              
                108
                91
                 noremap <C-s> :w<CR>

              
                109
                92
                 noremap <C-n> :tabnew<CR>

              
                110
                
                -noremap <C-t> :tabnew<CR>

              
                111
                
                -noremap <leader>ww :Wiki<CR>

              
                112
                
                -noremap <leader>e :Ve<CR>

              
                113
                93
                 

              
                114
                94
                 " Window

              
                115
                95
                 noremap <C-h> :wincmd h<CR>

              ···
                122
                102
                 noremap sph :sp<CR>

              
                123
                103
                 noremap spk :wincmd K<CR>

              
                124
                104
                 noremap spl :wincmd L<CR>

              
                125
                
                -noremap spn :wincmd n<CR>

              
                126
                105
                 

              
                127
                106
                 " Tab

              
                128
                107
                 noremap tn :tabnew<CR>

              ···
                138
                117
                 noremap <A-9> :tabn 9<CR>

              
                139
                118
                 

              
                140
                119
                 " Buffer

              
                141
                
                -noremap Bn :bnext<CR>

              
                142
                
                -noremap Bp :bprev<CR>

              
                
                120
                +noremap <leader>j :bnext<CR>

              
                
                121
                +noremap <leader>k :bprev<CR>

              
                143
                122
                 

              
                144
                123
                 " Work with system clipboard

              
                145
                124
                 noremap <leader>y "*yy<CR>

              
M config/openbox/menu.xml
···
                70
                70
                       <command>kitty -e ranger</command>

              
                71
                71
                     </action>

              
                72
                72
                   </item>

              
                73
                
                -  <item label="Thunar">

              
                
                73
                +  <item label="PCManFM">

              
                74
                74
                     <action name="Execute">

              
                75
                
                -      <command>Thunar</command>

              
                
                75
                +      <command>pcmanfm</command>

              
                76
                76
                     </action>

              
                77
                77
                   </item>

              
                78
                78
                 </menu>

              
M rcrc
···
                1
                
                -EXCLUDES="README.md screen.png"

              
                2
                
                -UNDOTTED="bin"

              
                
                1
                +EXCLUDES="README.md nten.tar.gz screen.png"

              
                
                2
                +UNDOTTED="bin vscode"

              
M tmux.conf
···
                29
                29
                 

              
                30
                30
                 

              
                31
                31
                 ## Reload config

              
                32
                
                -bind r source-file ~/.tmux.conf \; display 'Reloaded tmux config'

              
                
                32
                +bind r source-file ~/.tmux.conf \;

              
                
                33
                +       display 'Reloaded tmux config'

              
                33
                34
                 

              
                34
                35
                 ## Vim keys for change/resize window

              
                35
                36
                 bind -r h select-pane -L

              
M vscode/settings.json
···
                10
                10
                     "editor.tabCompletion": "on",

              
                11
                11
                     "editor.tabSize": 4,

              
                12
                12
                     "editor.formatOnSave": false,

              
                13
                
                -    "files.autoSave": "afterDelay",

              
                14
                13
                     "workbench.startupEditor": "newUntitledFile",

              
                15
                14
                 

              
                16
                15
                     // Vim

              ···
                19
                18
                     "vim.useSystemClipboard": true,

              
                20
                19
                     "vim.insertModeKeyBindings": [

              
                21
                20
                         {"before": ["j", "j"],

              
                22
                
                -         "after" : ["<Esc>"]},

              
                
                21
                +        "after" : ["<Esc>"]},

              
                23
                22
                         {"before": ["Ctrl", "Shift", "e"],

              
                24
                
                -         "commands": ["workbench.view.explorer"]},

              
                
                23
                +        "commands": ["workbench.view.explorer"]},

              
                25
                24
                     ],

              
                26
                25
                     "vim.normalModeKeyBindings": [

              
                27
                26
                         {"before": ["f"],

              
                28
                
                -         "after" : ["leader","leader","s"]}

              
                
                27
                +        "after" : ["leader","leader","s"]}

              
                29
                28
                     ],

              
                30
                29
                     

              
                31
                30
                     // Terminal

              
M zshrc
···
                1
                
                -export PATH="$HOME/.yarn/bin:$HOME/bin:$HOME/.application:$HOME/.local/bin:$PATH"

              
                
                1
                +export PATH="$HOME/.yarn/bin:$HOME/bin:$HOME/.applications:$HOME/.local/bin:$PATH"

              
                2
                2
                 

              
                3
                
                -### Oh my zsh ###

              
                
                3
                +### Oh my zsh

              
                4
                4
                 export ZSH="$HOME/.oh-my-zsh"

              
                5
                
                -ZSH_THEME="simple"              # Set theme.

              
                6
                
                -#CASE_SENSITIVE="true"          # Use case-sensitive completion.

              
                7
                
                -#HYPHEN_INSENSITIVE="true"      # Case-sensitive completion must be off.

              
                8
                
                -#DISABLE_AUTO_UPDATE="true"     # Disable bi-weekly auto-update checks.

              
                9
                
                -DISABLE_UPDATE_PROMPT="true"    # Automatically update without prompting.

              
                10
                
                -#DISABLE_MAGIC_FUNCTIONS="true" # If pasting URL and other text is messed up.

              
                11
                
                -#DISABLE_LS_COLORS="true"       # Disable colors in ls.

              
                12
                
                -DISABLE_AUTO_TITLE="true"       # Disable auto-setting terminal title.

              
                13
                
                -#ENABLE_CORRECTION="true"       # Enable command auto-correction.

              
                14
                
                -#COMPLETION_WAITING_DOTS="true" # Display red dots whilst waiting for completion.

              
                15
                
                -export UPDATE_ZSH_DAYS=7        # Change how often to auto-update.

              
                16
                
                -

              
                
                5
                +ZSH_THEME="simple"

              
                
                6
                +DISABLE_UPDATE_PROMPT="true"

              
                
                7
                +DISABLE_AUTO_TITLE="true"

              
                17
                8
                 plugins=(yarn nvm)

              
                18
                9
                 source $ZSH/oh-my-zsh.sh

              
                19
                10
                 

              
                20
                
                -### Variables

              
                21
                
                -export EDITOR="nvim"

              
                22
                
                -export VISUAL="nvim"

              
                23
                
                -

              
                24
                
                -### Functions

              
                25
                
                -bgcolor() {

              
                26
                
                -    convert -size 1x1 xc:"#$1" /tmp/bgc.png

              
                27
                
                -    feh --bg-tile /tmp/bgc.png

              
                28
                
                -}

              
                29
                
                -backup() {

              
                30
                
                -    cp $1 $1.bak

              
                31
                
                -}

              
                32
                
                -

              
                33
                11
                 ### Aliases

              
                34
                12
                 alias cls="clear"

              
                35
                13
                 alias mkdir="mkdir -p"

              
                36
                14
                 alias cp="cp -r"

              
                37
                
                -alias du="du -sh"

              
                
                15
                +alias du="du -h"

              
                38
                16
                 alias vim="nvim"

              
                39
                17
                 alias vi="vim"

              
                40
                
                -alias tl="tmuxp load"

              
                41
                
                -alias d="docker"

              
                42
                
                -alias wiki="vi +Wiki"

              
                
                18
                +alias rgf="rg --files|rg"

              
                43
                19
                 alias tmux="tmux -2"

              
                44
                20
                 alias :q="exit"

              
                45
                
                -alias ..="cd .."

              
                46
                21
                 alias ...="cd ../.."