all repos

dotfiles @ 6400748

my dotfiles
14 files changed, 112 insertions(+), 113 deletions(-)
Update bspwm. Add CoC plug in vim
Author: Smirnov Olexandr ss2316544@gmail.com
Committed at: 2021-01-31 14:01:25 +0200
Parent: 7a0f05c
M README.md

@@ -5,7 +5,7 @@ ------------------------------

#### System configuration - `OS` Arch -- `WM` Qtile, i3 +- `WM` bspwm, i3 - `Terminal` Alacritty - `Shell` zsh - `Editor` nvim
M config/bspwm/bspwmrc

@@ -4,16 +4,16 @@ # BSPWM config file

## == Function Run() { - if ! pgrep $1 - then $@& fi + if ! pgrep $1 + then $@& fi } ## == Autostart Run setxkbmap "us,ua" ",winkeys" "grp:alt_shift_toggle" -option "ctrl:nocaps" & +Run feh --randomize --bg-scale ~/Pictures/wallp & Run sxhkd -c ./.config/bspwm/sxhkd & ~/.config/bspwm/bar.sh & -Run nitrogen --restore & -~/.script/autolock & +Run ~/.script/autolock & Run lxsession & Run picom -b &

@@ -30,7 +30,6 @@ bspc config borderless_monocle true

bspc config gapless_monocle true bspc config single_monocle true bspc config focus_follows_pointer true -bspc config borderless_monocle true # Colors bspc config normal_border_color "#262A2B"

@@ -42,13 +41,14 @@

# Rules bspc rule -a Alacritty desktop='^1' focus=on follow=on bspc rule -a kitty desktop='^1' focus=on follow=on -bspc rule -a firefox desktop='^2' focus=off -bspc rule -a VSCodium desktop='^3' focus=on follow=on +bspc rule -a firefox desktop='^2' focus=on follow=off +bspc rule -a VSCodium desktop='^3' focus=on follow=off +bspc rule -a Sublime_text desktop='^3' focus=on follow=on bspc rule -a '*:nvim' desktop='^3' focus=on follow=on -bspc rule -a '*:ranger' desktop='^4' focus=on follow=on +bspc rule -a '*:ranger' desktop='^4' focus=on follow=off bspc rule -a Thunar desktop='^4' focus=on follow=on -bspc rule -a Joplin desktop='^5' focus=off -bspc rule -a discord descord='^6' focus=on -bspc rule -a TelegramDesktop descord='^6' focus=off -bspc rule -a Spotify descord='^9' focus=on -bspc rule -a google-tasks-desktop state=floating +bspc rule -a Joplin desktop='^5' focus=on follow=off +bspc rule -a discord descord='^6' focus=off follow=off +bspc rule -a telegram-desktop descord='^6' focus=off follow=off +bspc rule -a Spotify descord='^9' focus=on follow=on +bspc rule -a google-tasks-desktop state=floating
M config/bspwm/polybar

@@ -7,8 +7,8 @@

[colors] background = #262A2B foreground = #DFDFDF -secondary = #008DCD -alert = #FF6C6B +secondary = #008DCD +alert = #FF6C6B [bar/bar] width = 100%

@@ -19,7 +19,7 @@ foreground = ${colors.foreground}

wm-restack = bspwm font-0 = Iosevka Nerd Font:style=Medium:size=8;3 font-1 = FontAwesome5Free:style=Solid:size=7.5;2.5 -modules-left = powermenu windowname +modules-left = windowname modules-center = bspwm modules-right = pulseaudio archupd wifi-signal weather memory cpu keyboard time date tray-position = right
D config/bspwm/screen.png

Not showing binary file.

M config/bspwm/sxhkd

@@ -2,52 +2,27 @@ # Smirnov-O <ss2316544@gmail.com>

# BSPWM/SXKBD config file ## == USER Applications -super + Return - kitty - -super + shift + w - firefox - -super + shift + f - kitty --class=ranger -e ranger - -super + shift + e - kitty --class=nvim -e nvim - -super + shift + c - vscodium +super + {_,shift} Return + {alacritty, \ + rofi -show drun } -super + shift + d - org.zealdocs.Zeal +super + shift + {w,f,e,c,q} + {firefox, \ + alacritty --class=ranger -e ranger, \ + alacritty --class=nvim -e nvim, \ + subl, \ + xkill } -super + shift + q - xkill +super + shift + z + betterlockscreen --off 180 -t "Computer is lokerd" -l +super + {equal, minus, shift + minus} + amixer sset Master {2%+,2%-,toggle} -## == USER volume -super + minus - amixer sset Master 2%- - -super + equal - amixer sset Master 2%+ - -super + shift + minus - amixer sset Master toggle - - -## == USER Menus -super + shift + Return - rofi -location 2 -show drun - -super + Escape - ~/.script/dmenu/dmenu-power.sh - -super + ctrl + i - ~/.script/dmenu/dmenu-pass.sh - -super + ctrl + u - ~/.script/dmenu/dmenu-config-edit.sh - +super + {Escape, ctrl + u, ctrl + i} + {./.script/dmenu/dmenu-power.sh, \ + ./.script/dmenu/dmenu-config-edit.sh, \ + ./.script/dmenu/dmenu-pass.sh } ## == BSPWM keys super + q

@@ -66,35 +41,21 @@ # Change focus & move focus window

super + {_,shift + }{h,j,k,l} bspc node -{f,s} {west,south,north,east} -# Change focus window -super + {_,shift + }c - bspc node -f {next,prev}.local.!hidden.window - # Preselect the direction super + alt + {h,j,k,l} bspc node -p {west,south,north,east} - -# Preselect the ratio super + alt + {1-9} bspc node -o 0.{1-9} - -# Cancel the preselection -super + ctrl + space +super + alt + {space,0} bspc node -p cancel ## == BSPWM workspace -## Next/Prev workspace -super + bracket{left,right} - bspc desktop -f {prev,next}.local - -# Change WP & send window to WP super + {_,shift + }{1-9} bspc {desktop -f,node -d} focused:'^{1-9}' ## == BSPWM windwo layouts -# Set window layouts for specific window -super + {t,shift + t,s,f} - bspc node -t {tiled,pseudo_tiled,floating,fullscreen} +super + ctrl + {t, s, f} + bspc node -t {tiled,floating,fullscreen} # Change windows layout super + ctrl + {m,x,y,z}
M config/i3/config

@@ -21,10 +21,9 @@ set $browser firefox

set $filemanager alacritty -e ranger set $codeeditor alacritty -e nvim set $guicode vscodium -set $documentationreader org.zealdocs.Zeal ############ Autostart ############ -exec --no-startup-id exec setxkbmap "us,ua" ",winkeys" "grp:alt_shift_toggle" -option "ctrl:nocaps" +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
A config/nvim/coc-settings.json

@@ -0,0 +1,22 @@

+{ + // Snippets + "snippets.ultisnips.directories": [ + "snips" + ], + "snippets.userSnippetsDirectory": "~/.config/nvim", + // Emmet + "emmet.includeLanguages": { + "javascript": "javascriptreact" + }, + // Autoload + "coc.preferences.hoverTarget": "float", + "coc.preferences.formatOnSaveFiletypes": [ + "css", + "html", + "markdown", + "yaml", + "json", + "javascript", + "pytnon" + ] +}
M config/nvim/init.vim

@@ -3,32 +3,28 @@ Plug 'Smirnov-O/nten16.vim' " Color scheme

Plug 'itchyny/lightline.vim' " Status line Plug 'maximbaz/lightline-ale' " ALE in status line Plug 'airblade/vim-gitgutter' " Git indicator - Plug 'ap/vim-css-color' " HEX/CSS color preview + Plug 'mbbill/undotree' " Git like history + Plug 'ap/vim-css-color' " CSS color preview Plug 'mhinz/vim-startify' " Start page - Plug 'scrooloose/nerdtree' " File manager Plug 'dense-analysis/ale' " Linter - Plug 'kassio/neoterm' " Terminal wrapper - Plug 'metakirby5/codi.vim' " Live REPL Plug 'editorconfig/editorconfig-vim' " EditorConfig support Plug 'christoomey/vim-tmux-navigator' " Jump from vim to tmux and back - Plug 'Xuyuanp/nerdtree-git-plugin' " NERDTree git status - Plug 'preservim/nerdcommenter' " Code commenter + + " NERDTree + Plug 'scrooloose/nerdtree', {'on': 'NERDTreeToggle'} + Plug 'Xuyuanp/nerdtree-git-plugin', {'on': 'NERDTreeToggle'} " Completion & snippets - Plug 'ervandew/supertab' + Plug 'neoclide/coc.nvim' Plug 'jiangmiao/auto-pairs' - Plug 'SirVer/ultisnips' - Plug 'mattn/emmet-vim', {'for': ['html', 'javascript']} " Language support + Plug 'metakirby5/codi.vim', {'on': 'Codi'} " Live REPL Plug 'othree/yajs.vim', {'for': 'javascript'} Plug 'maxmellon/vim-jsx-pretty', {'for': 'javascript'} - Plug 'vim-python/python-syntax', {'for': 'python'} - Plug 'cakebaker/scss-syntax.vim', {'for': ['scss', 'sass']} - - Plug 'plasticboy/vim-markdown', {'for': 'markdown'} + Plug 'plasticboy/vim-markdown', {'for': 'markdown'} Plug 'PotatoesMaster/i3-vim-syntax', {'for': 'i3'} Plug 'kovetskiy/sxhkd-vim', {'for': 'sxhkd'} call plug#end()

@@ -133,17 +129,22 @@ let NERDTreeMinimalUI=1

let NERDTreeShowHidden=0 let g:NERDTreeWinSize = 28 -" Emmet -"let g:user_emmet_expandabbr_key='<tab>' -let g:user_emmet_leader_key=',' -let g:user_emmet_mode='inv' - -" UltiSnipts -let g:UltiSnipsExpandTrigger = "<tab>" -let g:UltiSnipsEditSplit = "vertical" -let g:UltiSnipsJumpForwardTrigger = "<tab>" -let g:UltiSnipsJumpBackwardTrigger = "<C-tab>" -let g:UltiSnipsSnippetDirectories = ["snips"] +" Coc +inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>" +inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>" +let g:coc_global_config="$HOME/.config/nvim/coc-settings.json" +imap <C-l> <Plug>(coc-snippets-expand) +vmap <C-j> <Plug>(coc-snippets-select) +let g:coc_global_extensions = [ 'coc-snippets', +\ 'coc-emmet', +\ 'coc-html', +\ 'coc-css', +\ 'coc-yaml', +\ 'coc-json', +\ 'coc-tsserver', +\ 'coc-eslint', +\ 'coc-prettier', +\ ] " Startify let g:startify_custom_header = [

@@ -171,6 +172,10 @@ nmap <C-l> :wincmd l<CR>

nmap <A-z> :wincmd K<CR> nmap <A-x> :wincmd L<CR> nmap <A-c> :wincmd n<CR> + +" C-j/k as up/dwon in menu +inoremap <expr> <C-j> ("\<C-n>") +inoremap <expr> <C-k> ("\<C-p>") " Tab(s) noremap <C-Tab> :tabnext<CR>
M config/nvim/snips/python.snippets

@@ -2,6 +2,12 @@ priority -50

snippet #! "Shebang" #!/usr/bin/env python +${1} +endsnippet + +snippet ! "Shebang" +#!/bin/python +${1} endsnippet snippet ifmain "If __main...."
M config/qtile/config.py

@@ -164,6 +164,7 @@ for i, (name, kwargs) in enumerate(group_names, 1):

keys.append(Key([mod], str(i), lazy.group[name].toscreen())) keys.append(Key([mod, "shift"], str(i), lazy.window.togroup(name))) + # Window layout(s) layout_theme = { "border_width": 2,

@@ -187,6 +188,7 @@ # layout.TreeTab(),

# layout.VerticalTile(), # layout.Zoomy(), ] + # Panel widget_defaults = dict(

@@ -238,12 +240,19 @@ foreground=color[4]

)], 24 # Panel size ))] + # Drag floating layouts mouse = [ - Drag([mod], "Button1", lazy.window.set_position(), start=lazy.window.get_position()), - Drag([mod], "Button3", lazy.window.set_size_floating(), start=lazy.window.get_size()), - Click([mod], "Button2", lazy.window.bring_to_front()) + Drag([mod], "Button1", + lazy.window.set_position(), + start=lazy.window.get_position()), + Drag([mod], "Button3", + lazy.window.set_size_floating(), + start=lazy.window.get_size()), + Click([mod], "Button2", + lazy.window.bring_to_front()) ] + dgroups_key_binder = None dgroups_app_rules = []
D config/qtile/kblay.sh

@@ -1,6 +0,0 @@

-#/bin/sh -case "$(xkblayout)" in - "Eng") echo "us" ;; - "Rus") echo "ru" ;; - "Ukr") echo "ua" ;; -esac
M gitconfig

@@ -3,6 +3,9 @@ username = Smirnov-O

name = Smirnov Olexandr email = ss2316544@gmail.com +[init] + defaultBranch = main + [web] browser = firefox
M script/dmenu/dmenu-pass.sh

@@ -1,7 +1,7 @@

#!/bin/sh shopt -s nullglob globstar -menucmd="rofi -location 2 -dmenu" +menucmd="rofi -dmenu" prefix=${PASSWORD_STORE_DIR-~/.password-store} password_files=( "$prefix"/**/*.gpg ) password_files=( "${password_files[@]#"$prefix"/}" )
M script/dmenu/dmenu-power.sh

@@ -4,7 +4,7 @@ Lock

Logout Reboot") -menucmd="rofi -location 2 -dmenu" +menucmd="rofi -dmenu" choice=$(echo -e "${options[@]}"|${menucmd} -p "Power" $@) case "$choice" in "ShutDown")