diff --git a/README.md b/README.md index f06f716..dac20b0 100644 --- a/README.md +++ b/README.md @@ -5,33 +5,30 @@ #### System configuration - `OS` Arch -- `WM` bspwm, i3 -- `Terminal` Alacritty +- `WM` bspwm, qtile +- `Terminal` alacritty - `Shell` zsh -- `Editor` nvim -- `File manager` ranger, mc -- `Browser` firefox +- `Editor` nvim, vscode +- `File manager` ranger +- `Browser` firefox, - `Font` Jatbrains Mono -- `Icon font` FontAwesome5 -- `Launcher` dmenu, rofi +- `Icon font` FontAwesome +- `Launcher` rofi -#### Install configs +#### Install config Since i use **[rcm](https://github.com/thoughtbot/rcm)** set it: ~~~bash yay -S rcm ~~~ -Install deps: -~~~bash -sudo pacman -S neovim tmux git i3wm bspwm sxhkd qtile alacritty picom dunst ranger firefox ttf-font-awesome ttf-jetbrains-mono rofi zsh zathura redshift -yay -S polybar -pip install -U castero -~~~ +Install dependency: +```bash +sudo pacman -S neovim tmux git bspwm sxhkd alacritty picom dunst zsh rofi ranger firefox ttf-font-awesome ttf-jetbrains +yay -S polybar xkblayout +``` - -And install configs: +And install config: ~~~bash git clone https://github.com/Smirnov-O/dotfiles .dotfiles rcup -mv ~/.bin ~/bin -~~~ \ No newline at end of file +~~~ diff --git a/bashrc b/bashrc deleted file mode 100644 index e3900f7..0000000 --- a/bashrc +++ /dev/null @@ -1,27 +0,0 @@ -export PATH="$HOME/bin:$HOME/.local/bin:$PATH" -source ~/.profile -#source ~/.env - -# Prompt generator - ezprompt.net -export PS1="\[\e[36m\]\u\[\e[m\]@\[\e[32m\]\w\[\e[m\] \\$ " - -### Variables ### -export EDITOR='nvim' -export VISUAL='nvim' - -### Aliases ### -alias cls='clear' -alias ls='ls --color=auto' -alias sl="ls" -alias tmux="tmux -2" -alias mkdir="mkdir -p" -alias du="du -sh" -alias df="df -h" -alias cp="cp -r" -alias :q="exit" -alias ..='cd ..' -alias ...='cd ../..' -alias .3='cd ../../..' -alias .4='cd ../../../..' -alias .5='cd ../../../../..' -alias .6='cd ../../../../../..' diff --git a/config/bspwm/sxhkd b/config/bspwm/sxhkd index 8062a3d..d81991b 100644 --- a/config/bspwm/sxhkd +++ b/config/bspwm/sxhkd @@ -11,7 +11,7 @@ super + shift + {w,f,e,c,q} alacritty --class=ranger -e ranger, \ alacritty --class=nvim -e nvim, \ code, \ - xkill } + xkill } super + shift + z betterlockscreen --off 180 -t "Computer is lokerd" -l @@ -20,43 +20,42 @@ super + {equal, minus, shift+minus} amixer sset Master {2%+,2%-,toggle} super + {Escape, ctrl + u, ctrl + i} - {./.script/dmenu/dmenu-power.sh, \ + {./.script/dmenu/dmenu-power.sh, \ ./.script/dmenu/dmenu-config-edit.sh, \ ./.script/dmenu/dmenu-pass.sh } -## == BSPWM keys +### == BSPWM keys super + q bspc node -{c,k} super + control + r bspc wm -r && pkill -USR1 -x sxhkd -## == BSPWM windows - +### == BSPWM windows ## Resize window super + ctrl + {h,j,k,l} - bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0} + bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0} # Change focus & move focus window super + {_,shift + }{h,j,k,l} - bspc node -{f,s} {west,south,north,east} + bspc node -{f,s} {west,south,north,east} # Preselect the direction super + alt + {h,j,k,l} - bspc node -p {west,south,north,east} + bspc node -p {west,south,north,east} super + alt + {1-9} - bspc node -o 0.{1-9} + bspc node -o 0.{1-9} super + alt + {space,0} - bspc node -p cancel + bspc node -p cancel ## == BSPWM workspace super + {_,shift + }{1-9} - bspc {desktop -f,node -d} focused:'^{1-9}' + bspc {desktop -f,node -d} focused:'^{1-9}' ## == BSPWM windwo layouts super + ctrl + {t, s, f} - bspc node -t {tiled,floating,fullscreen} + bspc node -t {tiled,floating,fullscreen} # Change windows layout super + ctrl + {m,x,y,z} - bspc node -g {marked,locked,sticky,private} + bspc node -g {marked,locked,sticky,private} diff --git a/config/i3/config b/config/i3/config index 45ef9ec..04a3430 100644 --- a/config/i3/config +++ b/config/i3/config @@ -17,7 +17,7 @@ hide_edge_borders smart ############ Variables ########### set $terminal alacritty -set $browser firefox +set $browser firefox set $filemanager alacritty --title=ranger -e ranger set $codeeditor alacritty --title=nvim -e nvim set $guicode code @@ -25,14 +25,13 @@ set $guicode code ############ Autostart ############ exec_always --no-startup-id exec setxkbmap "us,ua" ",winkeys" "grp:alt_shift_toggle" -option "ctrl:nocaps" exec_always --no-startup-id exec picom --experimental-backends -b -#exec_always --no-startup-id exec $HOME/.config/i3/bar.sh exec --no-startup-id exec nitrogen --restore exec --no-startup-id exec lxsession #exec --no-startup-id exec $HOME/.script/autolock #exec --no-startup-id exec org.telegram.desktop #exec --no-startup-id exec discord -#exec --no-startup-id exec conky #exec --no-startup-id exec redshift-gtk +#exec_always --no-startup-id exec $HOME/.config/i3/bar.sh ############## WM keys ############ @@ -66,11 +65,11 @@ bindsym $mod+grave scratchpad show, floating disable bindsym $mod+Shift+Return exec rofi -show drun bindsym $mod+Escape exec ~/.script/dmenu/dmenu-power.sh bindsym $mod+Control+u exec ~/.script/dmenu/dmenu-config-edit.sh -bindsym $mod+Control+i exec ~/.script/dmenu/dmenu-pass.sh +bindsym $mod+Control+i exec ~/.script/dmenu/dmenu-pass.sh # Apps bindsym $mod+Return exec $terminal -bindsym $mod+Shift+w exec $browser +bindsym $mod+Shift+w exec $browser bindsym $mod+Shift+f exec $filemanager bindsym $mod+Shift+e exec $codeeditor bindsym $mod+Shift+c exec $guicode diff --git a/config/kitty/kitty.conf b/config/kitty/kitty.conf deleted file mode 100644 index b84e71c..0000000 --- a/config/kitty/kitty.conf +++ /dev/null @@ -1,116 +0,0 @@ -# Font -font_family Jetbrains Mono -bold_font auto -italic_font auto -bold_italic_font auto -font_size 12.0 -adjust_line_height 0 -adjust_column_width 0 -disable_ligatures never -font_features none -box_drawing_scale 0.001, 1, 1.5, 2 - -# Cursor -cursor #dfdfdf -cursor_text_color #7d7d7d -cursor_shape beam -cursor_beam_thickness 1.5 -cursor_underline_thickness 2.0 -cursor_blink_interval 0 -cursor_stop_blinking_after 15.0 - -# Bell -enable_audio_bell no -visual_bell_duration 0.0 -window_alert_on_bell no -command_on_bell none -bell_on_tab no - -# Scrollback (History) -scrollback_lines 500 -scrollback_pager less --chop-long-lines --RAW-CONTROL-CHARS +INPUT_LINE_NUMBER -scrollback_pager_history_size 0 -wheel_scroll_multiplier 5.0 -touch_scroll_multiplier 1.0 - -# Mouse -mouse_hide_wait 2.5 -url_color #4ecdc4 -url_style curly -open_url_modifiers kitty_mod -open_url_with default -url_prefixes http https file ftp -copy_on_select yes -strip_trailing_spaces never -rectangle_select_modifiers ctrl+alt -terminal_select_modifiers shift -select_by_word_characters :@-./_~?&=%+# -click_interval -1.0 -focus_follows_mouse yes -pointer_shape_when_grabbed arrow - -# Perfomance -repaint_delay 10 -input_delay 3 -sync_to_monitor yes -command_on_bell none - -# Window -remember_window_size yes -initial_window_width 640 -initial_window_height 480 -enabled_layouts * - -# Keyboard Shortcuts -clear_all_shortcuts yes -map ctrl+shift+c copy_to_clipboard -map ctrl+shift+v paste_from_clipboard -map shift+insert paste_from_selection -map ctrl+shift+u kitten unicode_input -map shift+up scroll_line_up -map alt+k scroll_line_up -map shift+down scroll_line_down -map alt+j scroll_line_down -map shift+page_up scroll_page_up -map shift+page_down scroll_page_down -map shift+home scroll_home -map shift+end scroll_end -map ctrl+shift+h show_scrollback -map ctrl+shift+. set_tab_title -map alt+equal change_font_size all +2.0 -map alt+minus change_font_size all -2.0 -map alt+ctrl+backspace change_font_size all 0 - - -# Theming -foreground #dfdfdf -background_opacity 0.85 -dynamic_background_opacity yes -background_image none -background_image_layout tiled -background_image_linear no -background_tint 0.0 -dim_opacity 0.75 -selection_foreground #edebd7 -selection_background #073642 -background #262a2b -foreground #ffffff -cursorColor #d2dae2 -selection_background #262a3b -selection_foreground #edebd7 -color0 #002731 -color8 #001e26 -color1 #d01b24 -color9 #bd3612 -color2 #728905 -color10 #465a61 -color3 #a57705 -color11 #52676f -color4 #2075c7 -color12 #708183 -color5 #c61b6e -color13 #5856b9 -color6 #0fbcf9 -color14 #4bcffa -color7 #e9e2cb -color15 #fcf4dc diff --git a/config/nvim/coc-settings.json b/config/nvim/coc-settings.json deleted file mode 100644 index 38a2489..0000000 --- a/config/nvim/coc-settings.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - //Snippets - "snippets.ultisnips.directories": ["snips"], - "snippets.userSnippetsDirectory": "~/.config/nvim/snips", - - //Emmet - "emmet.includeLanguages": { - "javascript": ["javascript.jsx", "javascriptreact"] - }, - - // Prettier - "prettier.disableSuccessMessage": true, - - // JS/x - "tsserver.formatOnType": true, - - // List - "list.indicator": ">", - "list.selectedSignText": " ", - - // Auto format - "coc.preferences.hoverTarget": "float", - "coc.preferences.formatOnSaveFiletypes": [ - "javascript", - "javascript.jsx", - "javascriptreact", - "css", - "html", - "yaml", - "json", - "pytnon" - ] -} diff --git a/config/nvim/init.vim b/config/nvim/init.vim index 52af522..c4f6f65 100644 --- a/config/nvim/init.vim +++ b/config/nvim/init.vim @@ -1,66 +1,60 @@ call plug#begin('~/.vim/plugged') - Plug 'Smirnov-O/nten16.vim' " Color scheme - Plug 'itchyny/lightline.vim' " Status bar - Plug 'maximbaz/lightline-ale' " Linter info in bar - Plug 'dense-analysis/ale' " Linter - Plug 'airblade/vim-gitgutter' " Git indicator - Plug 'ap/vim-css-color' " Preview CSS colors - Plug 'jiangmiao/auto-pairs' " Auto close brackets - Plug 'editorconfig/editorconfig-vim' " Editor Config support - Plug 'christoomey/vim-tmux-navigator' " Jump from vim in tmux - Plug 'maxboisvert/vim-simple-complete' " Sublime like completion - - " Language support - Plug 'pangloss/vim-javascript', {'for': 'javascript'} - Plug 'mxw/vim-jsx', {'for': ['javascript.jsx', 'javascript']} - Plug 'plasticboy/vim-markdown', {'for': 'markdown'} - Plug 'PotatoesMaster/i3-vim-syntax', {'for': 'i3'} - Plug 'cespare/vim-toml', {'for': 'toml'} - Plug 'zah/nim.vim', {'for': 'nim'} + Plug 'Smirnov-O/nten16.vim' + Plug 'itchyny/lightline.vim' + Plug 'jiangmiao/auto-pairs' + Plug 'maxboisvert/vim-simple-complete' + Plug 'pangloss/vim-javascript' + Plug 'airblade/vim-gitgutter' + Plug 'dense-analysis/ale' + "Plug 'editorconfig/editorconfig-vim' call plug#end() -syntax on -" Theme +"== General +" Appearance set termguicolors colorscheme nten16 -set t_Co=256 -" number line +" Line numbers set nu rnu +" Line wrap +set nowrap nolinebreak + +" Tabs +set tabstop=4 +set shiftwidth=4 +set softtabstop=4 +set smarttab +set expandtab +set autoindent + " Status line +"set laststatus=0 set noshowmode showcmd set ruler " Mouse -set mouse=a mousehide +set mouse=a +set mousehide set cursorline " Encoding -set encoding=utf-8 fileencodings=utf-8 - -" Line wrap -set nowrap nolinebreak +set encoding=utf-8 +set fileencodings=utf-8 " Backup file & history set nobackup noswapfile set history=100 -" Auto reload file -set autoread - -" Tabs -set ts=4 sts=4 -set expandtab autoindent -set shiftwidth=4 - " Search -set incsearch ignorecase smartcase +set incsearch +set ignorecase +set smartcase -" Buffer(s) -set hidden smartindent +" Buffer +set hidden -" Spell +" Spell checker set spell spelllang=en_us " Space/tab indicator @@ -69,58 +63,61 @@ set list listchars=tab:>·,trail:~,extends:>,precedes:<,space:· " Disable sound set visualbell t_vb= -"== Language configuration -let g:jsx_ext_required = 0 -" Markdown -let g:vim_markdown_folding_disabled = 1 -let g:markdown_fenced_languages = ['javascript', 'js=javascript', 'jsx=javascript.jsx', 'python', 'bash', 'sh=bash'] +" == Settings for specific files +autocmd BufWritePre *.py normal m`:%s/\s\+$//e `` +autocmd FileType python,go setlocal expandtab shiftwidth=4 tabstop=4 +autocmd FileType html,css,javascript setlocal expandtab shiftwidth=2 tabstop=2 + + +"== Aliases +command! W :w +command! Q :q +command! Wq :wq +command! WQ :wq +command! Prettier :!prettier % +command! ESlint :!eslint % + "== Plug in configuration let g:lightline = { \ 'colorscheme': 'nten16', \ 'active': { -\ 'left': [ [ 'mode', 'paste' ], -\ [ 'readonly', 'modified' ], -\ [ 'linter_errors', 'linter_warnings', 'linter_infos' ] ], -\ 'right': [ [ 'lineinfo' ], -\ [ 'percent' ], -\ [ 'filename', 'filetype' ] ]}, -\ 'component_expand': { -\ 'linter_errors': 'lightline#ale#errors', -\ 'linter_infos': 'lightline#ale#infos', -\ 'linter_warnings': 'lightline#ale#warnings' +\ 'left': [ [ 'mode', 'paste' ], +\ [ 'readonly', 'modified' ] ], +\ 'right': [ [ 'lineinfo' ], +\ [ 'percent' ], +\ [ 'filename', 'filetype' ] ] \ }, } -" Ale let g:ale_disable_lsp = 1 let g:ale_sign_error = '> ' let g:ale_sign_warning = '- ' let g:ale_echo_msg_format = '%severity%: %s' +let g:ale_linter = { +\ 'javascript': 'eslint', +\ 'python': 'flake8' +\ } +let g:ale_fix_on_save = 1 let g:ale_fixers = { -\ 'javascript': ['prettier', 'eslint' ], -\ 'python': ['flake8', 'pylint8']} +\ 'javascript': 'prettier', +\ 'python': 'black' +\ } -" == Mapping -let mapleader="\\" -imap jj -" Window(s) -nmap :wincmd h -nmap :wincmd j -nmap :wincmd k -nmap :wincmd l -nmap :wincmd K -nmap :wincmd L -nmap :wincmd n +"== Mapping +let mapleader="'" -" C-j/k as up/down in menu -inoremap ("\") -inoremap ("\") +" Window +noremap :wincmd h +noremap :wincmd j +noremap :wincmd k +noremap :wincmd l +noremap :wincmd K +noremap :wincmd L +noremap :wincmd n -" Tab(s) -noremap :tabnext -noremap :tabprev +" Tab noremap :tabnew noremap :tabclose noremap :tabn 1 @@ -133,10 +130,10 @@ noremap :tabn 7 noremap :tabn 8 noremap :tabn 9 -" Buffer(s) -noremap b :bnext -noremap p :bprev +" Buffer +noremap :bnext +noremap :bprev -" Paste & copy from/in system clipboard -noremap c "*yy +" Work with system clipboard +noremap c "*y noremap v "+p diff --git a/config/nvim/snips/go.snippets b/config/nvim/snips/go.snippets deleted file mode 100644 index 14adba4..0000000 --- a/config/nvim/snips/go.snippets +++ /dev/null @@ -1,71 +0,0 @@ -snippet pac "Package" -package ${1:main} -$0 -endsnippet - -snippet import "Import section" -import ( - ${1} -) -endsnippet - -snippet fn "Function" -func ${1:main}(${2:arg} ${3:type}) ${4:type} ( - ${5} -) -endsnippet - -snippet for "For loop" -for ${1:i\:\=1}; ${2:i\<\=10}; ${3:\i\+\+} { - ${4} -} -endsnippet - -snippet var "Variable declaration" -var ${1:name}${2/(.+)/ /}${2:type}${3: = ${0:value}} -endsnippet - -snippet vars "Variables declaration" -var ( - ${1:name}${2/(.+)/ /}${2:type}${3: = ${0:value} } -) -endsnippet - -snippet : "Variable" -${1:v} := ${2:value} -endsnippet - -snippet append "Append function" -append(${1:slice}, ${0:value}) -endsnippet - -snippet switch "Switch" -switch ${1:var} { -case ${2:value}: -} -endsnippet - -snippet const "Constant declaration" -const ${1:name}${2/(.+)/ /}${2:type} = ${0:value} -endsnippet - -snippet consts "Constants declaration" -const ( - ${1:constant}${2/(.+)/ /}${2:type} = ${0:value} -) -endsnippet - -snippet err "Rrror handling" -if err != nil { - log.${1:Fatal}(err) -} -endsnippet - -snippet map "Map type" -map[${1:keytype}]${2:valuetupe} -$0 -endsnippet - -snippet ;= ";= to :=" -:= $0 -endsnippet diff --git a/config/nvim/snips/markdown.snippets b/config/nvim/snips/markdown.snippets deleted file mode 100644 index 23e235f..0000000 --- a/config/nvim/snips/markdown.snippets +++ /dev/null @@ -1,23 +0,0 @@ -priority -50 - -snippet `py "Python code block" -```python -${1} -``` -endsnippet - -snippet `sh "Bash code block" -```bash -${1} -``` -endsnippet - -snippet `go "GO code block" -```go -${1} -``` -endsnippet - -snippet // "Comment" - -endsnippet diff --git a/config/nvim/snips/python.snippets b/config/nvim/snips/python.snippets deleted file mode 100644 index 72ec25e..0000000 --- a/config/nvim/snips/python.snippets +++ /dev/null @@ -1,16 +0,0 @@ -priority -50 - -snippet #! "Shebang" -#!/usr/bin/env python -${1} -endsnippet - -snippet ! "Shebang" -#!/bin/python -${1} -endsnippet - -snippet ifmain "If __main...." -if __name__ == "__main__": - ${1:code} -endsnippet diff --git a/config/nvim/snips/sh.snippets b/config/nvim/snips/sh.snippets deleted file mode 100644 index 0f3aacb..0000000 --- a/config/nvim/snips/sh.snippets +++ /dev/null @@ -1,44 +0,0 @@ -snippet ! "SH Shebang" -#!/bin/sh -${1} -endsnippet - -snippet #! "BASH Shebang" -#!/bin/bash -${1} -endsnippet - -snippet if "If declaration" -if [ ${1} ]; then - ${2} -fi -${3} -endsnippet - -snippet for "For loop" -for (( i=0; i < ${1:10}; i++ )); do - ${2} -done -${3} -endsnippet - -snippet while "While loop" -while ${1:true}; do - ${2} -done -${3} -endsnippet - -snippet case "Case" -case "${1}" in - ${2}) ${3} ;; -esac -${4} -endsnippet - -snippet fn "Function declaration" -function ${1:name}(${2}) { - ${3} -} -${4} -endsnippet diff --git a/config/picom.conf b/config/picom.conf index 9f5dad0..982acdc 100644 --- a/config/picom.conf +++ b/config/picom.conf @@ -9,7 +9,6 @@ shadow-offset-y = -7; shadow-exclude = [ "override_redirect", "class_g = 'Firefox' && argb", - #"class_g = 'Polybar'" ]; ############ Fading ########### @@ -24,18 +23,9 @@ inactive-opacity = 1; active-opacity = 1; frame-opacity = 0.8; inactive-opacity-override = false; -focus-exclude = []; -opacity-exclude = [ "class_g = 'openbox'" ]; opacity-rule = [ "0:_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'" ]; no-fading-openclose = true -##### Background-Blurring ##### -blur = false; -#blur-method = "dual_kawase"; -#blur-strength = 5; -#blur-kern = "3x3box"; -#blur-background-exclude = []; - ####### General Settings ###### backend = "glx"; diff --git a/config/polybar/scripts/weather.py b/config/polybar/scripts/weather.py index 7277b14..dba3512 100755 --- a/config/polybar/scripts/weather.py +++ b/config/polybar/scripts/weather.py @@ -1,6 +1,6 @@ """For working this script set in ~/.profile 2 variable: -"OWM_POLYBAR": API key -"OWM_CITY": Your city +OWM_POLYBAR: API key +OWM_CITY: Your city """ import requests, os diff --git a/config/qtile/config.py b/config/qtile/config.py index 6bbfe21..fc7c12e 100644 --- a/config/qtile/config.py +++ b/config/qtile/config.py @@ -14,7 +14,7 @@ terminal = "alacritty" browser = "firefox" filemanager = f"{terminal} --title=ranger -e ranger" editor = f"{terminal} --title=NVim -e nvim" -guicodeeitor = "code" +guicodeeitor = "code --disable-gpu" # Set qtile colors color = [ diff --git a/config/qtile/kblayout.py b/config/qtile/kblayout.py index 25fbc77..8094c6d 100644 --- a/config/qtile/kblayout.py +++ b/config/qtile/kblayout.py @@ -9,7 +9,6 @@ from os import popen KBCMD = """ case "$(xkblayout)" in "Eng") echo "us" ;; - "Rus") echo "ru" ;; "Ukr") echo "ua" ;; esac """ @@ -23,6 +22,8 @@ class KBLayout(base.InLoopPollText): base.InLoopPollText.__init__(self, **config) def poll(self): - kb = popen(KBCMD).read().rstrip('\n') \ - .encode('utf-8').decode('utf-8') + kb = popen(KBCMD).read() \ + .rstrip('\n') \ + .encode('utf-8') \ + .decode('utf-8') return kb diff --git a/config/qutebrowser/config.py b/config/qutebrowser/config.py deleted file mode 100644 index c1825ec..0000000 --- a/config/qutebrowser/config.py +++ /dev/null @@ -1,95 +0,0 @@ -# general -c.url.start_pages = ["about:blank"] -config.set("colors.webpage.darkmode.enabled", True) -c.downloads.location.directory = '/home/sasha/Downloads' -c.completion.shrink = True -config.load_autoconfig() - -# tabs, download -c.tabs.show = 'multiple' -c.tabs.position = "top" -c.downloads.position = "bottom" - -# alias, binds, search -c.aliases = {'q': 'quit', 'w': 'session-save', 'wq': 'quit --save', 'e': 'open'} -config.bind('', 'open -t about:blank') -c.url.searchengines = { - 'DEFAULT': 'https://www.google.com/search?q={}', - 'ddgr': 'https://duckduckgo.com/?q={}', - 'arw': 'https://wiki.archlinux.org/?search={}', - 'rdd': 'https://www.reddit.com/r/{}' -} -# Enable cookie, image, js & user agents -config.set('content.cookies.accept', 'all', 'chrome-devtools://*') -config.set('content.cookies.accept', 'all', 'devtools://*') -config.set('content.images', True, 'chrome-devtools://*') -config.set('content.images', True, 'devtools://*') -config.set('content.javascript.enabled', True, 'chrome-devtools://*') -config.set('content.javascript.enabled', True, 'devtools://*') -config.set('content.javascript.enabled', True, 'chrome://*/*') -config.set('content.javascript.enabled', True, 'qute://*/*') -config.set('content.headers.user_agent', 'Mozilla/5.0 ({os_info}; rv:71.0) Gecko/20100101 Firefox/71.0', 'https://accounts.google.com/*') -config.set('content.headers.user_agent', 'Mozilla/5.0 ({os_info}) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99 Safari/537.36', 'https://*.slack.com/*') -config.set('content.headers.user_agent', 'Mozilla/5.0 ({os_info}; rv:71.0) Gecko/20100101 Firefox/71.0', 'https://docs.google.com/*') -config.set('content.headers.user_agent', 'Mozilla/5.0 ({os_info}; rv:71.0) Gecko/20100101 Firefox/71.0', 'https://drive.google.com/*') - -# theme -## Solarised ######### -#color01 = "#002B36" -#color02 = "#073642" -#color03 = "#619100" -#color04 = "#268BD2" -#color05 = "#6C71C4" -#color06 = "#dc322f" -#color07 = "#FFFFFF" -#color08 = "#93A1A1" -#color09 = "#2AA198" -## Ntene16 ########### -color01 = "#262A2b" -color02 = "#1F2324" -color03 = "#98BE65" -color04 = "#008DCD" -color05 = "#C678DD" -color06 = "#FF6C6B" -color07 = "#FFFFFF" -color08 = "#CED4DA" -color09 = "#ECBE7B" -###################### - -c.colors.completion.category.bg = color01 -c.colors.completion.category.border.bottom = color02 -c.colors.completion.category.border.top = color02 -c.colors.completion.even.bg = color02 -c.colors.completion.fg = color07 -c.colors.completion.item.selected.bg = color01 -c.colors.completion.item.selected.border.bottom = color01 -c.colors.completion.item.selected.border.top = color01 -c.colors.completion.item.selected.fg = color08 -c.colors.completion.odd.bg = color02 -c.colors.downloads.bar.bg = color01 -c.colors.downloads.error.bg = color06 -c.colors.downloads.start.bg = color03 -c.colors.downloads.stop.bg = color04 -c.colors.messages.info.bg = color01 -c.colors.messages.info.border = color01 -c.colors.messages.warning.border = color01 -c.colors.statusbar.caret.bg = color01 -c.colors.statusbar.command.bg = color01 -c.colors.statusbar.insert.bg = color01 -c.colors.statusbar.normal.bg = color01 -c.colors.statusbar.passthrough.bg = color01 -c.colors.statusbar.private.bg = color04 -c.colors.statusbar.url.error.fg = color06 -c.colors.statusbar.url.fg = color07 -c.colors.statusbar.url.success.http.fg = color07 -c.colors.statusbar.url.success.https.fg = color07 -c.colors.tabs.bar.bg = color02 -c.colors.tabs.even.bg = color02 -c.colors.tabs.indicator.error = color06 -c.colors.tabs.indicator.start = color01 -c.colors.tabs.indicator.stop = color01 -c.colors.tabs.odd.bg = color02 -c.colors.tabs.selected.even.bg = color01 -c.colors.tabs.selected.even.fg = color02 -c.colors.tabs.selected.odd.bg = color01 -c.colors.tabs.selected.odd.fg = color02 diff --git a/config/qutebrowser/quickmarks b/config/qutebrowser/quickmarks deleted file mode 100644 index 4962ee2..0000000 --- a/config/qutebrowser/quickmarks +++ /dev/null @@ -1,11 +0,0 @@ -Google https://google.com -Translate https://translate.google.com -Youtube https://youtube.com -Habr https://habr.com/ru -Discord https://discord.com/login -Github https://github.com -Notabug https://notabug.org -Dropbox https://dropbox.com -MEGA https://mega.nz -MediaFire https://mediafire.com -Reddit https://reddit.com diff --git a/config/zathura/zathurarc b/config/zathura/zathurarc index c3a2681..8c6ebe9 100644 --- a/config/zathura/zathurarc +++ b/config/zathura/zathurarc @@ -1,18 +1,18 @@ -set font "JetBrains Mono Nerd Font 10" -set default-fg "#DFDFDF" -set default-bg "#262A2B" +set font "JetBrains Mono 10" +set default-fg "#DFDFDF" +set default-bg "#262A2B" -set statusbar-fg "#CED4DA" -set statusbar-bg "#1F2324" -set statusbar-h-padding 10 -set statusbar-v-padding 10 +set statusbar-fg "#CED4DA" +set statusbar-bg "#1F2324" +set statusbar-h-padding 10 +set statusbar-v-padding 10 -set inputbar-fg "#FFFFFF" -set inputbar-bg "#1F2324" +set inputbar-fg "#FFFFFF" +set inputbar-bg "#1F2324" -set completion-bg "#262A2B" -set completion-fg "#FFFFFF" -set completion-highlight-bg "#262A2B" -set completion-highlight-fg "#51AFEF" -set completion-group-bg "#262A2B" -set completion-group-fg "#51AFEF" +set completion-bg "#262A2B" +set completion-fg "#FFFFFF" +set completion-highlight-bg "#262A2B" +set completion-highlight-fg "#51AFEF" +set completion-group-bg "#262A2B" +set completion-group-fg "#51AFEF" diff --git a/gitconfig b/gitconfig index c5dca33..3bb6605 100644 --- a/gitconfig +++ b/gitconfig @@ -4,7 +4,7 @@ email = ss2316544@gmail.com [init] - defaultBranch = main + defaultBranch = master [web] browser = firefox diff --git a/gitignore_global b/gitignore_global index ef189fd..17c9a95 100644 --- a/gitignore_global +++ b/gitignore_global @@ -1,30 +1,7 @@ -# IDE .idea .vscode -**~ - -# Logs and databases *.log -*.sqlite *.db -*.todo - -# Temp files *.pyc -*.swp -.*.swp -*.swp __pycache__ - -# Packages -*.7z -*.rar -*.zip -*.tar* -*.bz2 - -# Compiled siurce -*.so -*.o -*.out -*.bin +node_modules diff --git a/script/autolock b/script/autolock deleted file mode 100755 index 005a8a1..0000000 --- a/script/autolock +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -xautolock -time 3 -locker "betterlockscreen --off 180 -t 'Computer is lokerd' -l" diff --git a/script/snap-remove-old-pkg.sh b/script/snap-remove-old-pkg.sh deleted file mode 100755 index bb6cde1..0000000 --- a/script/snap-remove-old-pkg.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -LANG=en_US.UTF-8 snap list --all | awk '/disabled/{print $1, $3}' | -while read snapname revision; do - sudo snap remove "$snapname" --revision="$revision" -done diff --git a/tmux.conf b/tmux.conf index 511f7fe..fa0ab01 100644 --- a/tmux.conf +++ b/tmux.conf @@ -1,32 +1,50 @@ -set -g default-terminal "screen-256color" -set-option -sa terminal-overrides ",*:Tc" -set -g history-limit 1000 +###== General +set -sg escape-time 0 + +## Set prefix +set -g prefix C-a + +## Set base index set -g base-index 1 set -g pane-base-index 1 + +## History +set -g history-limit 1000 + +## Mouse support set -g mouse on setw -g mouse on -# Keybindongs -set -g xterm-keys no -set -g prefix C-a -bind -n End send-key C-e -bind -n Home send-key C-a +###== Keybindongs + +## HOME/END key support bind-key -n Home send Escape "OH" bind-key -n End send Escape "OF" +bind -n End send-key C-e +bind -n Home send-key C-a + +## Reload config bind r source-file ~/.tmux.conf \; display 'Reloaded tmux config' -bind - split-window -v -bind _ split-window -h -bind Tab last-window + +## Vim keys for change/resize window bind -r h select-pane -L bind -r j select-pane -D bind -r k select-pane -U bind -r l select-pane -R + bind -r H resize-pane -L 2 bind -r J resize-pane -D 2 bind -r K resize-pane -U 2 bind -r L resize-pane -R 2 -# Status bar +## Alternative keys for create window +bind _ split-window -h +bind - split-window -v + +## Change focus on last panel +bind Tab last-window + +###== Status bar set -g status-bg black set -g status-fg white set -g status-left ' ' @@ -35,11 +53,3 @@ set -g status-style fg=colour110 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 - -# VIM tmux navigation -is_vim="ps -o state= -o comm= -t '#{pane_tty}' \ - | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'" -bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L" -bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D" -bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U" -bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R" diff --git a/vscode/README.md b/vscode/README.md new file mode 100644 index 0000000..7efafc7 --- /dev/null +++ b/vscode/README.md @@ -0,0 +1,18 @@ +# VScode + +Install +```bash +mv ~/.vscode/settings.json ~/.config/Code/User +``` + +Extensions +- `Auto Import - ES6, TS` - Auto import for JS/TS, JSx/Tsx +- `Auto rename tag` - Rename tag in HTML/JSX +- `ESlint` - JavaScript linter +- `One dark pro` - Color scheme +- `Prettier` - JavaScript code formater +- `Todo Tree` - Show all TODO in code +- `Vim` - Vim mode +- `vscode-icons` - Icons +- `VScode rich presence` - Discord status +- `Python` - Better python syntax diff --git a/zshrc b/zshrc index 2d34e0f..e99021f 100644 --- a/zshrc +++ b/zshrc @@ -3,66 +3,41 @@ export PATH="$HOME/.yarn/bin:$HOME/bin:$HOME/.local/bin:$GOPATH/bin:$PATH" source ~/.profile ### Oh my zsh ### -ZSH_THEME="nten" # Set theme +ZSH_THEME="nten" # Set theme. #CASE_SENSITIVE="true" # Use case-sensitive completion. #HYPHEN_INSENSITIVE="true" # Case-sensitive completion must be off. #DISABLE_AUTO_UPDATE="true" # Disable bi-weekly auto-update checks. -#DISABLE_UPDATE_PROMPT="true" # Automatically update without prompting. +DISABLE_UPDATE_PROMPT="true" # Automatically update without prompting. #DISABLE_MAGIC_FUNCTIONS="true" # If pasting URL and other text is messed up. #DISABLE_LS_COLORS="true" # Disable colors in ls. DISABLE_AUTO_TITLE="true" # Disable auto-setting terminal title. #ENABLE_CORRECTION="true" # Enable command auto-correction. -#COMPLETION_WAITING_DOTS="true" # Display red dots whilst waiting for completion. +COMPLETION_WAITING_DOTS="true" # Display red dots whilst waiting for completion. export UPDATE_ZSH_DAYS=7 # Change how often to auto-update. export LANG=en_US.UTF-8 # Set locale -plugins=(python pip node npm yarn pass sudo git encode64) +plugins=(python pip node npm yarn pass sudo git) source $ZSH/oh-my-zsh.sh - ### Variables ### export EDITOR="nvim" export VISUAL="nvim" - -### Function ### -#function bgcolor { -# convert -size 1x1 xc:$1 /tmp/bgc.png -# feh --bg-tile /tmp/bgc.png -#} -function codi() { - local syntax="${1:-javascript}" - nvim -c "let g:startify_disable_at_vimenter = 1 |\ - set bt=nofile ls=0 noru nonu nornu |\ - Codi $syntax" "$@" -} - - ### Aliases ### alias cls="clear" alias mkdir="mkdir -p" -alias sl="ls" alias cp="cp -r" alias du="du -sh" alias df="df -h" -alias lns="ln -s" -alias uln="unlink" -alias rf="rm -rf" # Program alias vim="nvim" alias vi="nvim" alias tmux="tmux -2" -alias ipython="ipython --no-banner" -alias ran="ranger" -alias f="fuck" -alias firefox-dev="firefox-developer-edition" # Exit alias :q="exit" -alias :q!="exit" alias q="exit" -alias :qw="exit" # Navigation alias ..="cd .."