diff --git a/bin/catfetch b/bin/catfetch index 57d072e..b067b21 100755 --- a/bin/catfetch +++ b/bin/catfetch @@ -24,21 +24,10 @@ esac # Colors #### bold="\e[1m" reset="\e[0m" - blue="\e[36m" -grey="\e[90m" -black='\e[30m' -red='\e[31m' -green='\e[32m' -yellow='\e[33m' -blue='\e[34m' -magenta='\e[35m' -cyan='\e[36m' -white='\e[37m' +# Fetch #### echo -e " ${blue}${bold} WM ${reset}${wmname}" echo -e " /\_/\ ${blue}${bold} SHELL ${reset}${shell}" echo -e " (=^.^=) ${blue}${bold}KERNEL ${reset}${kernel}" echo -e " (\") (\")_/ ${blue}${bold} PKG ${reset}${packages}" -echo -e " ${black} ${red} ${green} ${yellow} ${blue} ${magenta} ${cyan} ${reset} " -exit 0 diff --git a/config/bspwm/bspwmrc b/config/bspwm/bspwmrc index 03f27d5..608bbd6 100755 --- a/config/bspwm/bspwmrc +++ b/config/bspwm/bspwmrc @@ -19,7 +19,7 @@ bspc monitor -d 1 2 3 4 5 6 7 8 9 # General bspc config border_width 2 -bspc config window_gap 6 +bspc config window_gap 4 bspc config split_ratio 0.50 bspc config borderless_monocle true bspc config gapless_monocle true @@ -39,6 +39,7 @@ bspc rule -a kitty desktop='^1' focus=on follow=on bspc rule -a firefox desktop='^2' focus=on follow=on bspc rule -a Google-chrome desktop='^2' focus=on follow=on bspc rule -a Code desktop='^3' focus=on follow=on +bspc rule -a Emacs desktop='^3' focus=on follow=on state='tiled' bspc rule -a '*:nvim' desktop='^3' focus=on follow=on bspc rule -a '*:ranger' desktop='^4' focus=on follow=off bspc rule -a Thunar desktop='^4' focus=on follow=off diff --git a/config/bspwm/polybar/scripts/weather.py b/config/bspwm/polybar/scripts/weather.py index dba3512..36bd4e6 100755 --- a/config/bspwm/polybar/scripts/weather.py +++ b/config/bspwm/polybar/scripts/weather.py @@ -1,15 +1,8 @@ -"""For working this script set in ~/.profile 2 variable: -OWM_POLYBAR: API key -OWM_CITY: Your city -""" import requests, os - - API_KEY = os.getenv("OWM_POLYBAR") CITY = os.getenv("OWM_CITY") - try: JSON = requests.get(f"http://api.openweathermap.org/data/2.5/weather?q={CITY}&lang=EN&&units=metric&appid={API_KEY}").json() print("", int(JSON["main"]["temp"]), "°С") -except Exception: - print(" err °С") +except Exception as e: + print(" err") diff --git a/config/nvim/init.vim b/config/nvim/init.vim index 83b14cd..e0d0f5e 100644 --- a/config/nvim/init.vim +++ b/config/nvim/init.vim @@ -13,8 +13,7 @@ set number set relativenumber " Line wrap -set nolinebreak -set nowrap +set linebreak wrap " Tabs set tabstop=4 @@ -35,7 +34,7 @@ set foldmethod=manual set pumheight=9 " Scroll -set scrolloff=4 +set scrolloff=3 " Mouse set mouse=a @@ -65,70 +64,71 @@ set autoread set hidden " Space/tab indicator -set list listchars=tab:\|·,trail:~,extends:>,precedes:<,space:· +set list listchars=tab:\|·,trail:~,extends:>,precedes:<,space:·,eol:\ " Disable sound set visualbell t_vb= - "== Settings for specific files autocmd FileType python,go,json setlocal et sw=4 ts=4 -autocmd FileType html,css,javascript,javascriptreact,yaml setlocal et sw=2 ts=2 - +autocmd FileType css,javascript,javascriptreact,yaml setlocal noet sw=2 ts=2 "== Aliases -command! W :w +command! W :w command! WQ :wq command! Wq :wq command! Wiki :e ~/doc/index.md -command! Prettier :!prettier % --write -command! ESlint :!eslint % -command! Flake8 :!flake8 % -command! Black :!black % -command! AutoPep8 :!autopep8 % --in-place +command! Prettier :silent !prettier % --write +command! ESlint :!eslint % +command! Flake8 :!flake8 % +command! Black :silent !black % +command! AutoPep8 :silent !autopep8 % --in-place "== Mapping let mapleader=";" +inoremap ii + " Alternative keys -noremap :w -noremap :tabnew -noremap :nohl -noremap zc +nnoremap :w +nnoremap :tabnew +nnoremap :nohl +nnoremap rr :so ~/.config/nvim/init.vim " Window -noremap :wincmd h -noremap :wincmd j -noremap :wincmd k -noremap :wincmd l +nnoremap :wincmd h +nnoremap :wincmd j +nnoremap :wincmd k +nnoremap :wincmd l " Split -noremap spv :vsp -noremap sph :sp -noremap spk :wincmd K -noremap spl :wincmd L +nnoremap spv :vsp +nnoremap sph :sp +nnoremap spk :wincmd K +nnoremap spl :wincmd L " Tab -noremap tn :tabnew -noremap tc :tabclose -noremap :tabn 1 -noremap :tabn 2 -noremap :tabn 3 -noremap :tabn 4 -noremap :tabn 5 -noremap :tabn 6 -noremap :tabn 7 -noremap :tabn 8 -noremap :tabn 9 +nnoremap tn :tabnew +nnoremap tc :tabclose +nnoremap :tabn 1 +nnoremap :tabn 2 +nnoremap :tabn 3 +nnoremap :tabn 4 +nnoremap :tabn 5 +nnoremap :tabn 6 +nnoremap :tabn 7 +nnoremap :tabn 8 +nnoremap :tabn 9 " Buffer -noremap j :bnext -noremap k :bprev +nnoremap j :bnext +nnoremap k :bprev " Work with system clipboard noremap c "*yy noremap v "+p -" Kill terminal -tnoremap :q +" Terminal +nnoremap t :vsp:term:startinsert +tnoremap diff --git a/zshrc b/zshrc index f2fdb85..83990c4 100644 --- a/zshrc +++ b/zshrc @@ -1,4 +1,4 @@ -export PATH="$HOME/.yarn/bin:$HOME/bin:$HOME/.applications:$HOME/.local/bin:$PATH" +export PATH="$HOME/.yarn/bin:$HOME/bin:$HOME/.applications:$HOME/.local/bin:$HOME/go/bin:$PATH" export EDITOR="nvim" ### Oh my zsh @@ -19,3 +19,4 @@ alias rgf="rg --files|rg" alias tmux="tmux -2" alias :q="exit" alias ...="cd ../.." +alias icat="kitty +kitten icat"