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
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

View file

@ -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]

View file

@ -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 KeePassXC desktop='^7' focus=on follow=on
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")
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:
except Exception:
print(" err")

View file

@ -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

View file

@ -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 <C-k> :wincmd k<CR>
nnoremap <C-l> :wincmd l<CR>
" Split
nnoremap spv :vsp<CR>
nnoremap spv :vs<CR>
nnoremap sph :sp<CR>
nnoremap spk :wincmd K<CR>
nnoremap spl :wincmd L<CR>
@ -145,12 +136,8 @@ noremap <A-7> :tabn 7<CR>
noremap <A-8> :tabn 8<CR>
noremap <A-9> :tabn 9<CR>
" Buffer
" Buffers
nnoremap <leader>j :bnext<CR>
nnoremap <leader>k :bprev<CR>
nnoremap <leader>c :bdele<CR>
nnoremap <leader>w :bdele<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]
ada = add -A
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"

View file

@ -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

View file

@ -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"
}
}

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 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"