From e268665220f7af0dff0650924f60f2d1b9136138 Mon Sep 17 00:00:00 2001 From: Smirnov Alexander Date: Sun, 11 Apr 2021 10:56:24 +0300 Subject: [PATCH] Add starship, update vscode --- bin/arch-upd | 2 +- bin/kbhl | 2 +- config/amfora/config.toml | 46 ++++++++++++------------- config/bspwm/bspwmrc | 21 +++++------ config/bspwm/polybar/scripts/weather.py | 10 ++++-- config/kitty/kitty.conf | 3 +- config/nvim/init.vim | 39 +++++++-------------- gitconfig | 1 + rcrc | 4 +-- tmux.conf | 15 +++++--- vscode/settings.json | 43 +++++++++-------------- zshrc | 13 +++---- 12 files changed, 96 insertions(+), 103 deletions(-) diff --git a/bin/arch-upd b/bin/arch-upd index e8b0edf..c518df8 100755 --- a/bin/arch-upd +++ b/bin/arch-upd @@ -1,4 +1,4 @@ #!/bin/sh sudo pacman -Syyuu --noconfirm yay -Sua --noconfirm -sudo pacman -Rs $(pacman -Qdtq) --noconfirm +sudo pacman -Rs $(pacman -Qdtq) --noconfirm \ No newline at end of file diff --git a/bin/kbhl b/bin/kbhl index 62b242d..1a6a816 100755 --- a/bin/kbhl +++ b/bin/kbhl @@ -1,5 +1,5 @@ #!/bin/sh case "$1" in - "on"|"-on"|"--on"|1) xset led on ;; + ""|"on"|"-on"|"--on"|1) xset led on ;; "of"|"off"|"-off"|"--off"|0) xset led off ;; esac diff --git a/config/amfora/config.toml b/config/amfora/config.toml index f302a75..55c03e0 100644 --- a/config/amfora/config.toml +++ b/config/amfora/config.toml @@ -1,15 +1,15 @@ [a-general] -home = "gemini://gus.guru/search" -search = "gemini://gus.guru/search" -http = "default" +home = "gemini://geminispace.info" +search = "gemini://geminispace.info/search" +http = "librewolf" color = true ansi = true bullets = true -auto_redirect = false -emoji_favicons = false +auto_redirect = true +emoji_favicons = true left_margin = 0.15 max_width = 100 -downloads = "Downloads" +downloads = "" page_max_size = 2097152 page_max_time = 10 scrollbar = "auto" @@ -17,14 +17,14 @@ scrollbar = "auto" [keybindings] bind_quit = "q" -bind_reload = "Ctrl-R" -bind_save = "Ctrl-S" +bind_bottom = ["i", ":", ";"] +bind_reload = ["Ctrl-R", "R"] +bind_save = ["Ctrl-S", "W"] bind_edit = "I" -bind_bottom = "i" # Navigation -bind_back = "H" -bind_forward = "L" +bind_back = ["H", "h"] +bind_forward = ["L", "l"] # Bookmaeks bind_bookmarks = "b" @@ -36,9 +36,19 @@ bind_close_tab = "T" bind_next_tab = "J" bind_prev_tab = "K" +[theme] +bg = "#262A2B" +fg = "#dfdfdf" +tab_num = "#797979" +bottombar_text = "#dfdfdf" +bottombar_bg = "#1F2324" +scrollbar = "#1F2324" +btn_bg = "#1F2324" +btn_text = "#dfdfdf" + [[mediatype-handlers]] -cmd = ["feh"] -types = ["image"] +cmd = "feh" +types = "image" no_prompt = true [cache] @@ -52,16 +62,6 @@ workers = 3 update_interval = 1800 entries_per_page = 20 -[theme] -bg = "#262A2B" -fg = "#dfdfdf" -tab_num = "#797979" -bottombar_text = "#dfdfdf" -bottombar_bg = "#1F2324" -scrollbar = "#1F2324" -btn_bg = "#1F2324" -btn_text = "#dfdfdf" - [auth] [auth.certs] [auth.keys] diff --git a/config/bspwm/bspwmrc b/config/bspwm/bspwmrc index b757fd0..d352f84 100755 --- a/config/bspwm/bspwmrc +++ b/config/bspwm/bspwmrc @@ -1,13 +1,13 @@ #!/bin/sh ###== Functions -A() { # AutoStart +A() { # AutoStart if ! pgrep $1 then $@& fi } -C() { # BSPWM config +C() { # BSPWM config bspc config $@ } -R() { # BSPWM rule +R() { # BSPWM rule bspc rule -a $@ } @@ -24,7 +24,7 @@ bspc monitor -d 1 2 3 4 5 6 7 8 9 # General C border_width 2 -C window_gap 8 +C window_gap 2 C split_ratio 0.50 C borderless_monocle true C gapless_monocle true @@ -41,13 +41,14 @@ C urgent_border_color "#FF6C6B" ###== BSPWM Rules R kitty desktop='^1' focus=on follow=on R Google-chrome desktop='^2' focus=on follow=on +R LibreWolf desktop='^2' focus=on follow=on R Code desktop='^3' focus=on follow=on -R '*:nvim' desktop='^3' focus=on follow=off -R Todoist desktop='^4' focus=on follow=off +R '*:nvim' desktop='^3' focus=on follow=on +R Todoist desktop='^4' focus=on follow=on R Joplin desktop='^4' focus=on follow=on R Simplenote desktop='^4' focus=on follow=on -R '*:ranger' desktop='^5' focus=on follow=off -R discord desktop='^6' focus=off follow=off +R '*:ranger' desktop='^5' focus=off follow=off +R discord desktop='^6' focus=on follow=off R TelegramDesktop desktop='^6' focus=off follow=on -R KeePassXC desktop='^7' focus=on follow=off -R Zathura desktop='^9' focus=on follow=on state=tiled +R KeePassXC desktop='^7' focus=on follow=on +R Zathura desktop='^9' focus=on follow=on state=tiled \ No newline at end of file diff --git a/config/bspwm/polybar/scripts/weather.py b/config/bspwm/polybar/scripts/weather.py index abfdb3b..ce13a02 100755 --- a/config/bspwm/polybar/scripts/weather.py +++ b/config/bspwm/polybar/scripts/weather.py @@ -1,11 +1,15 @@ -import requests, os +import requests +import 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 as e: - print(" err") +except Exception: + print(" err") \ No newline at end of file diff --git a/config/kitty/kitty.conf b/config/kitty/kitty.conf index d4d1626..b6665ce 100644 --- a/config/kitty/kitty.conf +++ b/config/kitty/kitty.conf @@ -1,4 +1,5 @@ font_family Jetbrains Mono +font_size 11 repaint_delay 10 # Cursor @@ -15,7 +16,7 @@ bell_on_tab no # Keyboard Shortcuts clear_all_shortcuts yes -open_url_modifiers alt +open_url_modifiers ctrl map ctrl+shift+c copy_to_clipboard map ctrl+shift+v paste_from_clipboard map ctrl+shift+u kitten unicode_input diff --git a/config/nvim/init.vim b/config/nvim/init.vim index 4b99c2a..ab384ae 100644 --- a/config/nvim/init.vim +++ b/config/nvim/init.vim @@ -1,4 +1,4 @@ -call plug#begin("~/.vim/plugged") +call plug#begin('~/.vim/plugged') Plug 'Smirnov-O/nten16.vim' Plug 'sheerun/vim-polyglot' Plug 'jiangmiao/auto-pairs' @@ -17,9 +17,9 @@ set nu rnu set linebreak wrap " Tabs -set tabstop=4 -set shiftwidth=4 -set softtabstop=4 +set tabstop=2 +set shiftwidth=2 +set softtabstop=2 set smarttab set expandtab set autoindent @@ -61,7 +61,7 @@ set autoread set hidden " Space/tab indicator -set list listchars=tab:\|·,trail:~,extends:>,precedes:<,space:· +set list listchars=tab:\|·,trail:~,space:· " Disable sound set visualbell t_vb= @@ -70,37 +70,28 @@ set visualbell t_vb= "== Aliases command! W :w command! Wq :wq -command! Term :vs|wincmd L|set nonu nornu|startinsert|term +command! Term :vs|wincmd L|set nonu nornu|startinsert|cd %:p:h|term command! Prettier :silent !prettier -w % -command! AutoPep8 :silent !autopep8 % --in-place command! Black :silent !black % command! Isort :silent !isort % -command! GoFmt :silent !gofmt -w % "== Settings for specific languages autocmd FileType python setlocal ex sw=4 ts=4 -autocmd FileType go setlocal noex sw=4 ts=4 -autocmd FileType javascript,javascriptreact,yaml setlocal et sw=2 ts=2 +autocmd FileType javascript,javascriptreact setlocal et sw=2 ts=2 +autocmd FileType html,css,json,yaml setlocal ex sw=2 ts=2 "== ALE let g:ale_disable_lsp = 1 -let g:ale_sign_info = "•" -let g:ale_sign_error = "•" -let g:ale_sign_warning = "•" -let g:ale_sign_style_error = "•" -let g:ale_sign_style_warning = "•" let g:ale_echo_msg_format = '%severity%: %s' let g:ale_linters = { \ 'javascript': ['eslint'], -\ 'python': ['flake8'], -\ 'go': ['golint'] +\ 'python': ['flake8'], \ } "== NERDTree -let NERDTreeIgnore = ["__pycache__", "*.pyc"] let g:NERDTreeWinPos = "right" let g:NERDTreeMinimalUI = 1 let g:NERDTreeWinSize = 24 @@ -128,7 +119,7 @@ nnoremap :wincmd k nnoremap :wincmd l " Split -nnoremap spv :vsp +nnoremap spv :vs nnoremap sph :sp nnoremap spk :wincmd K nnoremap spl :wincmd L @@ -145,12 +136,8 @@ noremap :tabn 7 noremap :tabn 8 noremap :tabn 9 -" Buffer +" Buffers nnoremap j :bnext nnoremap k :bprev -nnoremap c :bdele -nnoremap b :buffers - -" Working with system clipboard -noremap c "+y -noremap v "+p +nnoremap w :bdele +nnoremap b :buffers \ No newline at end of file diff --git a/gitconfig b/gitconfig index 577e671..59db101 100644 --- a/gitconfig +++ b/gitconfig @@ -8,3 +8,4 @@ [alias] ada = add -A cmm = commit -m + br = branch \ No newline at end of file diff --git a/rcrc b/rcrc index bde8a61..cb24812 100644 --- a/rcrc +++ b/rcrc @@ -1,2 +1,2 @@ -EXCLUDES="README.md nten.tar.gz screen.png" -UNDOTTED="bin vscode" +EXCLUDES="README.md screen.png" +UNDOTTED="bin vscode" \ No newline at end of file diff --git a/tmux.conf b/tmux.conf index de641d5..cd7bdcd 100644 --- a/tmux.conf +++ b/tmux.conf @@ -17,7 +17,6 @@ set -g default-terminal "screen-256color" set-option -sa terminal-overrides ",*:Tc" ###== Keybindongs - ## HOME/END key support bind-key -n Home send Escape "OH" bind-key -n End send Escape "OF" @@ -45,11 +44,19 @@ bind - split-window -h bind Tab last-window ###== Status bar +## Position +set-option -g status-position top + +## Items +set -g status-right ' #{?client_prefix,*,} #S ' +set -g status-left ' ' + +## Colors set -g status-bg black set -g status-fg white -set -g status-left ' ' -set -g status-right ' #{?client_prefix,*,} #S ' set -g status-style fg=colour110 + +###== Pane border colors set -g pane-border-style fg=colour240 set -g pane-active-border-style fg=colour39 -set-window-option -g window-status-current-style fg=colour39 +set-window-option -g window-status-current-style fg=colour39 \ No newline at end of file diff --git a/vscode/settings.json b/vscode/settings.json index f4fa725..037d9ba 100644 --- a/vscode/settings.json +++ b/vscode/settings.json @@ -1,32 +1,26 @@ { - "workbench.colorTheme": "Cobalt2", - "editor.wordWrap": "off", - "editor.fontSize": 14, - "editor.fontFamily": "'Jetbrains Mono', 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'", - "workbench.activityBar.visible": true, - "workbench.startupEditor": "newUntitledFile", - "editor.formatOnPaste": true, - "editor.minimap.enabled": false, - "explorer.confirmDelete": false, "explorer.confirmDragAndDrop": false, "window.menuBarVisibility": "hidden", + "editor.fontFamily": "'Jetbrains Mono', 'Droid Sans Mono', 'monospace'", + "workbench.colorTheme": "Brackets Light Pro", + "workbench.iconTheme": "vs-minimal", "workbench.sideBar.location": "right", - "workbench.panel.defaultLocation": "right", - "terminal.external.linuxExec": "kitty", - + "editor.wordWrap": "on", + "editor.fontSize": 14, + "editor.mouseWheelZoom": true, + "editor.formatOnPaste": false, + "editor.formatOnSave": false, + "editor.minimap.enabled": false, "editor.tabCompletion": "on", - "editor.tabSize": 4, - "editor.formatOnSave": true, + "editor.tabSize": 2, + "explorer.confirmDelete": false, + "explorer.confirmDragAndDrop": false, + + "window.menuBarVisibility": "hidden", + + "gitlens.codeLens.enabled": false, "git.autofetch": true, "git.confirmSync": false, "git.enableSmartCommit": true, - "gitlens.codeLens.enabled": false, - - "vim.easymotion": true, - "vim.surround": true, - "vim.useSystemClipboard": true, - "vim.normalModeKeyBindings": [{"before": ["f"], "after" : ["leader","leader","s"]}], - - "cSpell.userWords": ["getenv"], "emmet.includeLanguages": { "javascript": "javascriptreact" @@ -38,8 +32,5 @@ "[javascriptreact]": { "editor.defaultFormatter": "esbenp.prettier-vscode", "editor.tabSize": 2 - }, - "[markdown]": { - "editor.wordWrap": "on" } -} +} \ No newline at end of file diff --git a/zshrc b/zshrc index 4acb7da..557ec73 100644 --- a/zshrc +++ b/zshrc @@ -1,21 +1,22 @@ -export PATH="$HOME/.yarn/bin:$HOME/bin:$HOME/.local/bin:$HOME/go/bin:$HOME/.golang/bin:$PATH" +export PATH="$HOME/bin:$HOME/.local/bin:$PATH" export EDITOR="nvim" -export GOPATH="$HOME/go" + +### StartShip +eval "$(starship init zsh)" ### Oh my zsh export OMH="$HOME/.oh-my-zsh" -ZSH_THEME="simple" +#ZSH_THEME="simple" DISABLE_AUTO_TITLE="true" -plugins=(yarn) +plugins=(npm) source $OMH/oh-my-zsh.sh ### Aliases alias cls="clear" alias mkdir="mkdir -p" alias cp="cp -r" -alias du="du -h" alias vim="nvim" alias vi="vim" alias tmux="tmux -2" alias :q="exit" -alias ...="cd ../.." +alias ...="cd ../.." \ No newline at end of file