Add starship, update vscode

This commit is contained in:
Smirnov Alexander 2021-04-11 10:56:24 +03:00
parent a4eeb45201
commit e268665220
12 changed files with 96 additions and 103 deletions

View file

@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
case "$1" in 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 ;; "of"|"off"|"-off"|"--off"|0) xset led off ;;
esac esac

View file

@ -1,15 +1,15 @@
[a-general] [a-general]
home = "gemini://gus.guru/search" home = "gemini://geminispace.info"
search = "gemini://gus.guru/search" search = "gemini://geminispace.info/search"
http = "default" http = "librewolf"
color = true color = true
ansi = true ansi = true
bullets = true bullets = true
auto_redirect = false auto_redirect = true
emoji_favicons = false emoji_favicons = true
left_margin = 0.15 left_margin = 0.15
max_width = 100 max_width = 100
downloads = "Downloads" downloads = ""
page_max_size = 2097152 page_max_size = 2097152
page_max_time = 10 page_max_time = 10
scrollbar = "auto" scrollbar = "auto"
@ -17,14 +17,14 @@ scrollbar = "auto"
[keybindings] [keybindings]
bind_quit = "q" bind_quit = "q"
bind_reload = "Ctrl-R" bind_bottom = ["i", ":", ";"]
bind_save = "Ctrl-S" bind_reload = ["Ctrl-R", "R"]
bind_save = ["Ctrl-S", "W"]
bind_edit = "I" bind_edit = "I"
bind_bottom = "i"
# Navigation # Navigation
bind_back = "H" bind_back = ["H", "h"]
bind_forward = "L" bind_forward = ["L", "l"]
# Bookmaeks # Bookmaeks
bind_bookmarks = "b" bind_bookmarks = "b"
@ -36,9 +36,19 @@ bind_close_tab = "T"
bind_next_tab = "J" bind_next_tab = "J"
bind_prev_tab = "K" 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]] [[mediatype-handlers]]
cmd = ["feh"] cmd = "feh"
types = ["image"] types = "image"
no_prompt = true no_prompt = true
[cache] [cache]
@ -52,16 +62,6 @@ workers = 3
update_interval = 1800 update_interval = 1800
entries_per_page = 20 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]
[auth.certs] [auth.certs]
[auth.keys] [auth.keys]

View file

@ -1,13 +1,13 @@
#!/bin/sh #!/bin/sh
###== Functions ###== Functions
A() { # AutoStart A() { # AutoStart
if ! pgrep $1 if ! pgrep $1
then $@& fi then $@& fi
} }
C() { # BSPWM config C() { # BSPWM config
bspc config $@ bspc config $@
} }
R() { # BSPWM rule R() { # BSPWM rule
bspc rule -a $@ bspc rule -a $@
} }
@ -24,7 +24,7 @@ bspc monitor -d 1 2 3 4 5 6 7 8 9
# General # General
C border_width 2 C border_width 2
C window_gap 8 C window_gap 2
C split_ratio 0.50 C split_ratio 0.50
C borderless_monocle true C borderless_monocle true
C gapless_monocle true C gapless_monocle true
@ -41,13 +41,14 @@ C urgent_border_color "#FF6C6B"
###== BSPWM Rules ###== BSPWM Rules
R kitty desktop='^1' focus=on follow=on R kitty desktop='^1' focus=on follow=on
R Google-chrome desktop='^2' 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 Code desktop='^3' focus=on follow=on
R '*:nvim' desktop='^3' focus=on follow=off R '*:nvim' desktop='^3' focus=on follow=on
R Todoist desktop='^4' focus=on follow=off R Todoist desktop='^4' focus=on follow=on
R Joplin desktop='^4' focus=on follow=on R Joplin desktop='^4' focus=on follow=on
R Simplenote desktop='^4' focus=on follow=on R Simplenote desktop='^4' focus=on follow=on
R '*:ranger' desktop='^5' focus=on follow=off R '*:ranger' desktop='^5' focus=off follow=off
R discord desktop='^6' focus=off follow=off R discord desktop='^6' focus=on follow=off
R TelegramDesktop desktop='^6' focus=off follow=on R TelegramDesktop desktop='^6' focus=off follow=on
R KeePassXC desktop='^7' focus=on follow=off R KeePassXC desktop='^7' focus=on follow=on
R Zathura desktop='^9' focus=on follow=on state=tiled R Zathura desktop='^9' focus=on follow=on state=tiled

View file

@ -1,11 +1,15 @@
import requests, os import requests
import os
API_KEY = os.getenv("OWM_POLYBAR") API_KEY = os.getenv("OWM_POLYBAR")
CITY = os.getenv("OWM_CITY") CITY = os.getenv("OWM_CITY")
try: try:
JSON = requests.get( JSON = requests.get(
f"http://api.openweathermap.org/data/2.5/weather?q={CITY}&lang=EN&&units=metric&appid={API_KEY}" f"http://api.openweathermap.org/data/2.5/weather?q={CITY}&lang=EN&&units=metric&appid={API_KEY}"
).json() ).json()
print("", int(JSON["main"]["temp"]), "°С") print("", int(JSON["main"]["temp"]), "°С")
except Exception as e: except Exception:
print(" err") print(" err")

View file

@ -1,4 +1,5 @@
font_family Jetbrains Mono font_family Jetbrains Mono
font_size 11
repaint_delay 10 repaint_delay 10
# Cursor # Cursor
@ -15,7 +16,7 @@ bell_on_tab no
# Keyboard Shortcuts # Keyboard Shortcuts
clear_all_shortcuts yes clear_all_shortcuts yes
open_url_modifiers alt open_url_modifiers ctrl
map ctrl+shift+c copy_to_clipboard map ctrl+shift+c copy_to_clipboard
map ctrl+shift+v paste_from_clipboard map ctrl+shift+v paste_from_clipboard
map ctrl+shift+u kitten unicode_input map ctrl+shift+u kitten unicode_input

View file

@ -1,4 +1,4 @@
call plug#begin("~/.vim/plugged") call plug#begin('~/.vim/plugged')
Plug 'Smirnov-O/nten16.vim' Plug 'Smirnov-O/nten16.vim'
Plug 'sheerun/vim-polyglot' Plug 'sheerun/vim-polyglot'
Plug 'jiangmiao/auto-pairs' Plug 'jiangmiao/auto-pairs'
@ -17,9 +17,9 @@ set nu rnu
set linebreak wrap set linebreak wrap
" Tabs " Tabs
set tabstop=4 set tabstop=2
set shiftwidth=4 set shiftwidth=2
set softtabstop=4 set softtabstop=2
set smarttab set smarttab
set expandtab set expandtab
set autoindent set autoindent
@ -61,7 +61,7 @@ set autoread
set hidden set hidden
" Space/tab indicator " Space/tab indicator
set list listchars=tab:\|·,trail:~,extends:>,precedes:<,space:· set list listchars=tab:\|·,trail:~,space:·
" Disable sound " Disable sound
set visualbell t_vb= set visualbell t_vb=
@ -70,37 +70,28 @@ set visualbell t_vb=
"== Aliases "== Aliases
command! W :w command! W :w
command! Wq :wq 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! Prettier :silent !prettier -w %
command! AutoPep8 :silent !autopep8 % --in-place
command! Black :silent !black % command! Black :silent !black %
command! Isort :silent !isort % command! Isort :silent !isort %
command! GoFmt :silent !gofmt -w %
"== Settings for specific languages "== Settings for specific languages
autocmd FileType python setlocal ex sw=4 ts=4 autocmd FileType python setlocal ex sw=4 ts=4
autocmd FileType go setlocal noex sw=4 ts=4 autocmd FileType javascript,javascriptreact setlocal et sw=2 ts=2
autocmd FileType javascript,javascriptreact,yaml setlocal et sw=2 ts=2 autocmd FileType html,css,json,yaml setlocal ex sw=2 ts=2
"== ALE "== ALE
let g:ale_disable_lsp = 1 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_echo_msg_format = '%severity%: %s'
let g:ale_linters = { let g:ale_linters = {
\ 'javascript': ['eslint'], \ 'javascript': ['eslint'],
\ 'python': ['flake8'], \ 'python': ['flake8'],
\ 'go': ['golint']
\ } \ }
"== NERDTree "== NERDTree
let NERDTreeIgnore = ["__pycache__", "*.pyc"]
let g:NERDTreeWinPos = "right" let g:NERDTreeWinPos = "right"
let g:NERDTreeMinimalUI = 1 let g:NERDTreeMinimalUI = 1
let g:NERDTreeWinSize = 24 let g:NERDTreeWinSize = 24
@ -128,7 +119,7 @@ nnoremap <C-k> :wincmd k<CR>
nnoremap <C-l> :wincmd l<CR> nnoremap <C-l> :wincmd l<CR>
" Split " Split
nnoremap spv :vsp<CR> nnoremap spv :vs<CR>
nnoremap sph :sp<CR> nnoremap sph :sp<CR>
nnoremap spk :wincmd K<CR> nnoremap spk :wincmd K<CR>
nnoremap spl :wincmd L<CR> nnoremap spl :wincmd L<CR>
@ -145,12 +136,8 @@ noremap <A-7> :tabn 7<CR>
noremap <A-8> :tabn 8<CR> noremap <A-8> :tabn 8<CR>
noremap <A-9> :tabn 9<CR> noremap <A-9> :tabn 9<CR>
" Buffer " Buffers
nnoremap <leader>j :bnext<CR> nnoremap <leader>j :bnext<CR>
nnoremap <leader>k :bprev<CR> nnoremap <leader>k :bprev<CR>
nnoremap <leader>c :bdele<CR> nnoremap <leader>w :bdele<CR>
nnoremap <leader>b :buffers<CR> nnoremap <leader>b :buffers<CR>
" Working with system clipboard
noremap <leader>c "+y<CR>
noremap <leader>v "+p<CR>

View file

@ -8,3 +8,4 @@
[alias] [alias]
ada = add -A ada = add -A
cmm = commit -m cmm = commit -m
br = branch

2
rcrc
View file

@ -1,2 +1,2 @@
EXCLUDES="README.md nten.tar.gz screen.png" EXCLUDES="README.md screen.png"
UNDOTTED="bin vscode" UNDOTTED="bin vscode"

View file

@ -17,7 +17,6 @@ set -g default-terminal "screen-256color"
set-option -sa terminal-overrides ",*:Tc" set-option -sa terminal-overrides ",*:Tc"
###== Keybindongs ###== Keybindongs
## HOME/END key support ## HOME/END key support
bind-key -n Home send Escape "OH" bind-key -n Home send Escape "OH"
bind-key -n End send Escape "OF" bind-key -n End send Escape "OF"
@ -45,11 +44,19 @@ bind - split-window -h
bind Tab last-window bind Tab last-window
###== Status bar ###== 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-bg black
set -g status-fg white set -g status-fg white
set -g status-left ' '
set -g status-right ' #{?client_prefix,*,} #S '
set -g status-style fg=colour110 set -g status-style fg=colour110
###== Pane border colors
set -g pane-border-style fg=colour240 set -g pane-border-style fg=colour240
set -g pane-active-border-style fg=colour39 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

View file

@ -1,32 +1,26 @@
{ {
"workbench.colorTheme": "Cobalt2", "editor.fontFamily": "'Jetbrains Mono', 'Droid Sans Mono', 'monospace'",
"editor.wordWrap": "off", "workbench.colorTheme": "Brackets Light Pro",
"editor.fontSize": 14, "workbench.iconTheme": "vs-minimal",
"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",
"workbench.sideBar.location": "right", "workbench.sideBar.location": "right",
"workbench.panel.defaultLocation": "right", "editor.wordWrap": "on",
"terminal.external.linuxExec": "kitty", "editor.fontSize": 14,
"editor.mouseWheelZoom": true,
"editor.formatOnPaste": false,
"editor.formatOnSave": false,
"editor.minimap.enabled": false,
"editor.tabCompletion": "on", "editor.tabCompletion": "on",
"editor.tabSize": 4, "editor.tabSize": 2,
"editor.formatOnSave": true,
"explorer.confirmDelete": false,
"explorer.confirmDragAndDrop": false,
"window.menuBarVisibility": "hidden",
"gitlens.codeLens.enabled": false,
"git.autofetch": true, "git.autofetch": true,
"git.confirmSync": false, "git.confirmSync": false,
"git.enableSmartCommit": true, "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": { "emmet.includeLanguages": {
"javascript": "javascriptreact" "javascript": "javascriptreact"
@ -38,8 +32,5 @@
"[javascriptreact]": { "[javascriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode", "editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.tabSize": 2 "editor.tabSize": 2
},
"[markdown]": {
"editor.wordWrap": "on"
} }
} }

11
zshrc
View file

@ -1,19 +1,20 @@
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 EDITOR="nvim"
export GOPATH="$HOME/go"
### StartShip
eval "$(starship init zsh)"
### Oh my zsh ### Oh my zsh
export OMH="$HOME/.oh-my-zsh" export OMH="$HOME/.oh-my-zsh"
ZSH_THEME="simple" #ZSH_THEME="simple"
DISABLE_AUTO_TITLE="true" DISABLE_AUTO_TITLE="true"
plugins=(yarn) plugins=(npm)
source $OMH/oh-my-zsh.sh source $OMH/oh-my-zsh.sh
### Aliases ### Aliases
alias cls="clear" alias cls="clear"
alias mkdir="mkdir -p" alias mkdir="mkdir -p"
alias cp="cp -r" alias cp="cp -r"
alias du="du -h"
alias vim="nvim" alias vim="nvim"
alias vi="vim" alias vi="vim"
alias tmux="tmux -2" alias tmux="tmux -2"