all repos

dotfiles @ a9d8ac743286f014a130dfb71ea132d32ed395f0

i use rach linux btw
5 files changed, 47 insertions(+), 63 deletions(-)
Update nvim, zsh
Author: Smirnov Alexandr ss2316544@gmail.com
Committed at: 2021-03-09 12:32:35 +0200
Parent: 4400d0a
M bin/catfetch
···
                24
                24
                 # Colors ####

              
                25
                25
                 bold="\e[1m"

              
                26
                26
                 reset="\e[0m"

              
                27
                
                -

              
                28
                27
                 blue="\e[36m"

              
                29
                
                -grey="\e[90m"

              
                30
                
                -black='\e[30m'

              
                31
                
                -red='\e[31m'

              
                32
                
                -green='\e[32m'

              
                33
                
                -yellow='\e[33m'

              
                34
                
                -blue='\e[34m'

              
                35
                
                -magenta='\e[35m'

              
                36
                
                -cyan='\e[36m'

              
                37
                
                -white='\e[37m'

              
                38
                28
                 

              
                
                29
                +# Fetch ####

              
                39
                30
                 echo -e "            ${blue}${bold}    WM ${reset}${wmname}"

              
                40
                31
                 echo -e "   /\_/\    ${blue}${bold} SHELL ${reset}${shell}"

              
                41
                32
                 echo -e "  (=^.^=)   ${blue}${bold}KERNEL ${reset}${kernel}"

              
                42
                33
                 echo -e "  (\") (\")_/ ${blue}${bold}   PKG ${reset}${packages}"

              
                43
                
                -echo -e "  ${black} ${red} ${green} ${yellow} ${blue} ${magenta} ${cyan} ${reset} "

              
                44
                
                -exit 0

              
M config/bspwm/bspwmrc
···
                19
                19
                 

              
                20
                20
                 # General

              
                21
                21
                 bspc config border_width           2

              
                22
                
                -bspc config window_gap             6

              
                
                22
                +bspc config window_gap             4

              
                23
                23
                 bspc config split_ratio            0.50

              
                24
                24
                 bspc config borderless_monocle     true

              
                25
                25
                 bspc config gapless_monocle        true

              ···
                39
                39
                 bspc rule -a firefox              desktop='^2' focus=on  follow=on

              
                40
                40
                 bspc rule -a Google-chrome        desktop='^2' focus=on  follow=on

              
                41
                41
                 bspc rule -a Code                 desktop='^3' focus=on  follow=on

              
                
                42
                +bspc rule -a Emacs                desktop='^3' focus=on  follow=on state='tiled'

              
                42
                43
                 bspc rule -a '*:nvim'             desktop='^3' focus=on  follow=on

              
                43
                44
                 bspc rule -a '*:ranger'           desktop='^4' focus=on  follow=off

              
                44
                45
                 bspc rule -a Thunar               desktop='^4' focus=on  follow=off

              
M config/bspwm/polybar/scripts/weather.py
···
                1
                
                -"""For working this script set in ~/.profile 2 variable:

              
                2
                
                -OWM_POLYBAR: API key

              
                3
                
                -OWM_CITY: Your city

              
                4
                
                -"""

              
                5
                1
                 import requests, os

              
                6
                
                -

              
                7
                
                -

              
                8
                2
                 API_KEY = os.getenv("OWM_POLYBAR")

              
                9
                3
                 CITY = os.getenv("OWM_CITY")

              
                10
                
                -

              
                11
                4
                 try:

              
                12
                5
                     JSON = requests.get(f"http://api.openweathermap.org/data/2.5/weather?q={CITY}&lang=EN&&units=metric&appid={API_KEY}").json()

              
                13
                6
                     print("", int(JSON["main"]["temp"]), "°С")

              
                14
                
                -except Exception:

              
                15
                
                -    print(" err °С")

              
                
                7
                +except Exception as e:

              
                
                8
                +    print(" err")

              
M config/nvim/init.vim
···
                13
                13
                 set relativenumber

              
                14
                14
                 

              
                15
                15
                 " Line wrap

              
                16
                
                -set nolinebreak

              
                17
                
                -set nowrap

              
                
                16
                +set linebreak wrap

              
                18
                17
                 

              
                19
                18
                 " Tabs

              
                20
                19
                 set tabstop=4

              ···
                35
                34
                 set pumheight=9

              
                36
                35
                 

              
                37
                36
                 " Scroll

              
                38
                
                -set scrolloff=4

              
                
                37
                +set scrolloff=3

              
                39
                38
                 

              
                40
                39
                 " Mouse

              
                41
                40
                 set mouse=a

              ···
                65
                64
                 set hidden

              
                66
                65
                 

              
                67
                66
                 " Space/tab indicator

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

              
                
                67
                +set list listchars=tab:\|·,trail:~,extends:>,precedes:<,space:·,eol:\

              
                69
                68
                 

              
                70
                69
                 " Disable sound

              
                71
                70
                 set visualbell t_vb=

              
                72
                
                -

              
                73
                71
                 

              
                74
                72
                 "== Settings for specific files

              
                75
                73
                 autocmd FileType python,go,json setlocal et sw=4 ts=4

              
                76
                
                -autocmd FileType html,css,javascript,javascriptreact,yaml setlocal et sw=2 ts=2

              
                77
                
                -

              
                
                74
                +autocmd FileType css,javascript,javascriptreact,yaml setlocal noet sw=2 ts=2

              
                78
                75
                 

              
                79
                76
                 "== Aliases

              
                80
                
                -command! W :w

              
                
                77
                +command! W  :w

              
                81
                78
                 command! WQ :wq

              
                82
                79
                 command! Wq :wq

              
                83
                80
                 command! Wiki :e ~/doc/index.md

              
                84
                
                -command! Prettier :!prettier % --write

              
                85
                
                -command! ESlint :!eslint %

              
                86
                
                -command! Flake8 :!flake8 %

              
                87
                
                -command! Black :!black %

              
                88
                
                -command! AutoPep8 :!autopep8 % --in-place

              
                
                81
                +command! Prettier :silent !prettier % --write

              
                
                82
                +command! ESlint   :!eslint %

              
                
                83
                +command! Flake8   :!flake8 %

              
                
                84
                +command! Black    :silent !black %

              
                
                85
                +command! AutoPep8 :silent !autopep8 % --in-place

              
                89
                86
                 

              
                90
                87
                 

              
                91
                88
                 "== Mapping

              
                92
                89
                 let mapleader=";"

              
                
                90
                +

              
                
                91
                +inoremap ii <esc>

              
                93
                92
                 

              
                94
                93
                 " Alternative keys

              
                95
                
                -noremap <C-s>     :w<CR>

              
                96
                
                -noremap <C-n>     :tabnew<CR>

              
                97
                
                -noremap <space>   :nohl<CR>

              
                98
                
                -noremap <C-space> zc

              
                
                94
                +nnoremap <C-s>      :w<CR>

              
                
                95
                +nnoremap <C-n>      :tabnew<CR>

              
                
                96
                +nnoremap <space>    :nohl<CR>

              
                
                97
                +nnoremap <leader>rr :so ~/.config/nvim/init.vim<CR>

              
                99
                98
                 

              
                100
                99
                 " Window

              
                101
                
                -noremap <C-h> :wincmd h<CR>

              
                102
                
                -noremap <C-j> :wincmd j<CR>

              
                103
                
                -noremap <C-k> :wincmd k<CR>

              
                104
                
                -noremap <C-l> :wincmd l<CR>

              
                
                100
                +nnoremap <C-h> :wincmd h<CR>

              
                
                101
                +nnoremap <C-j> :wincmd j<CR>

              
                
                102
                +nnoremap <C-k> :wincmd k<CR>

              
                
                103
                +nnoremap <C-l> :wincmd l<CR>

              
                105
                104
                 

              
                106
                105
                 " Split

              
                107
                
                -noremap spv :vsp<CR>

              
                108
                
                -noremap sph :sp<CR>

              
                109
                
                -noremap spk :wincmd K<CR>

              
                110
                
                -noremap spl :wincmd L<CR>

              
                
                106
                +nnoremap spv :vsp<CR>

              
                
                107
                +nnoremap sph :sp<CR>

              
                
                108
                +nnoremap spk :wincmd K<CR>

              
                
                109
                +nnoremap spl :wincmd L<CR>

              
                111
                110
                 

              
                112
                111
                 " Tab

              
                113
                
                -noremap tn :tabnew<CR>

              
                114
                
                -noremap tc :tabclose<CR>

              
                115
                
                -noremap <A-1> :tabn 1<CR>

              
                116
                
                -noremap <A-2> :tabn 2<CR>

              
                117
                
                -noremap <A-3> :tabn 3<CR>

              
                118
                
                -noremap <A-4> :tabn 4<CR>

              
                119
                
                -noremap <A-5> :tabn 5<CR>

              
                120
                
                -noremap <A-6> :tabn 6<CR>

              
                121
                
                -noremap <A-7> :tabn 7<CR>

              
                122
                
                -noremap <A-8> :tabn 8<CR>

              
                123
                
                -noremap <A-9> :tabn 9<CR>

              
                
                112
                +nnoremap tn :tabnew<CR>

              
                
                113
                +nnoremap tc :tabclose<CR>

              
                
                114
                +nnoremap <A-1> :tabn 1<CR>

              
                
                115
                +nnoremap <A-2> :tabn 2<CR>

              
                
                116
                +nnoremap <A-3> :tabn 3<CR>

              
                
                117
                +nnoremap <A-4> :tabn 4<CR>

              
                
                118
                +nnoremap <A-5> :tabn 5<CR>

              
                
                119
                +nnoremap <A-6> :tabn 6<CR>

              
                
                120
                +nnoremap <A-7> :tabn 7<CR>

              
                
                121
                +nnoremap <A-8> :tabn 8<CR>

              
                
                122
                +nnoremap <A-9> :tabn 9<CR>

              
                124
                123
                 

              
                125
                124
                 " Buffer

              
                126
                
                -noremap <leader>j :bnext<CR>

              
                127
                
                -noremap <leader>k :bprev<CR>

              
                
                125
                +nnoremap <leader>j :bnext<CR>

              
                
                126
                +nnoremap <leader>k :bprev<CR>

              
                128
                127
                 

              
                129
                128
                 " Work with system clipboard

              
                130
                129
                 noremap <leader>c "*yy<CR>

              
                131
                130
                 noremap <leader>v "+p<CR>

              
                132
                131
                 

              
                133
                
                -" Kill terminal

              
                134
                
                -tnoremap <Esc> <C-\><C-n> :q<CR>

              
                
                132
                +" Terminal

              
                
                133
                +nnoremap <leader>t :vsp<CR>:term<CR>:startinsert<CR>

              
                
                134
                +tnoremap <Esc> <C-\><C-n>

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

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

              
                2
                2
                 export EDITOR="nvim"

              
                3
                3
                 

              
                4
                4
                 ### Oh my zsh

              ···
                19
                19
                 alias tmux="tmux -2"

              
                20
                20
                 alias :q="exit"

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

              
                
                22
                +alias icat="kitty +kitten icat"