18 files changed,
194 insertions(+),
87 deletions(-)
Author:
Smirnov Olexandr
ss2316544@gmail.com
Committed at:
2020-12-11 19:39:37 +0200
Parent:
4f3a929
jump to
M
README.md
··· 1 1 <h1 align="center">dotfiles</h1> 2 2 3 + 4 +------------------------------ 5 + 3 6 #### System configuration 4 -- `OS` Manjaro 5 -- `WM` Openbox, berry, i3-gaps, qtile, spectrwm 6 -- `Shell` zsh, fish 7 +- `OS` Arch 8 +- `WM` Qtile 9 +- `Terminal` Kitty 10 +- `Shell` zsh 7 11 - `Editor` nvim 8 -- `Browser` firefox, qutebowser, chromium 12 +- `Browser` firefox 9 13 - `Font` Jatbrains Mono 10 14 - `Icon font` FontAwesome5 11 15 - `Launcher` dmenu, rofi 12 16 13 - 14 17 #### Install configs 15 -Since i use **rcm** set it 18 +Since i use **[rcm](https://github.com/thoughtbot/rcm)** set it 16 19 ~~~bash 17 20 yay -S rcm 18 21 ~~~
A
config/nvim/README.md
··· 1 +# nvim 2 + 3 + 4 +--------------- 5 + 6 +To manage plugins, I use [vim plug](https://github.com/junegunn/vim-plug). I use the following plugins: 7 +- `nten16.vim`: Colorschemes 8 +- `lightline`: Status bar 9 +- `vim-indent-guides`: Visually displaying indent levels 10 +- `vim-easymotion`: Fast navigation 11 +- `nerdtree`: File manager 12 +- `vim-devicons`: Icons for nerdtree 13 +- `ctrlp.vim`: File saecher 14 +- `auto-pairs`: Close brackets, parens, quotes 15 +- `coc.nvim`: Instant completion 16 +- `emmet-vim`: Emmet :D 17 +- `vim-javascript`: Syntax support for JS 18 +- `i3-vim-syntax`: Syntax support for i3 19 +- `sxhkd-vim`: Syntax support for sxhkd 20 +- `vim-scheme`: Syntax support for scheme 21 +- `scss-syntax.vim`: Syntax support for scss 22 +- `vim-fist`: Syntax support for fish 23 +- `vim-css-color`: Color name highlighter 24 +- `vim-markdown`: Syntax support for fish 25 +- `markdown-preview.nvim`: Preview markdown in real-time 26 +- `vim-table-mode`: Automatic markdown table creator & formatter
M
config/nvim/init.vim
··· 1 1 call plug#begin('~/.vim/plugged') 2 - Plug 'overcache/NeoSolarized' 3 - Plug 'ericbn/vim-solarized' 4 2 Plug 'ryanoasis/vim-devicons' 5 3 Plug 'itchyny/lightline.vim' 4 + Plug 'nathanaelkane/vim-indent-guides' 5 + Plug 'Smirnov-O/nten16.vim' 6 6 Plug 'iamcco/markdown-preview.nvim' 7 7 Plug 'dhruvasagar/vim-table-mode' 8 8 Plug 'easymotion/vim-easymotion' ··· 17 17 18 18 " Language support 19 19 Plug 'pangloss/vim-javascript', { 'for': 'javascript' } 20 - Plug 'pearofducks/ansible-vim', { 'for': 'ansible' } 21 20 Plug 'PotatoesMaster/i3-vim-syntax', { 'for': 'i3' } 22 21 Plug 'kovetskiy/sxhkd-vim', { 'for': 'sxhkd' } 23 22 Plug 'mattn/emmet-vim', { 'on': 'Emmet' } 23 + Plug 'Olical/vim-scheme', { 'for': 'scheme' } 24 24 Plug 'cakebaker/scss-syntax.vim', { 'for': 'scss' } 25 25 Plug 'dag/vim-fish', { 'for': 'fish' } 26 26 Plug 'plasticboy/vim-markdown', { 'for': 'markdown' } ··· 70 70 71 71 set termguicolors 72 72 set background=dark 73 -colorscheme NeoSolarized 73 +colorscheme nten16 74 74 75 75 76 76 " == Plugins configure 77 77 " Lightline 78 78 set noshowmode 79 79 let g:lightline = { 80 -\ 'colorscheme': 'selenized_dark', 80 +\ 'colorscheme': 'nten16', 81 81 \ 'active': { 82 82 \ 'left': [ [ 'mode', 'paste' ], 83 83 \ [ 'readonly', 'modified' ] ], ··· 113 113 imap <C-p> :CtrlP<CR> 114 114 nmap <C-p> :CtrlP<CR> 115 115 116 +" Indent guides 117 +let g:indent_guides_enable_on_vim_startup = 1 118 + 116 119 " == Maping 117 -imap fd <Esc> 120 +"imap fd <Esc> 118 121 let mapleader="," 119 122 120 123 " Change window
M
config/qtile/README.md
··· 1 1 # Qtile config 2 2 3 - 4 ------------------------- 3 + 4 +--------------- 5 5 6 6 ### Install 7 7 ----------- 8 8 ~~~shell 9 9 sudo pacman -S qtile 10 -yay -S kbdd-git 10 +yay -S xkblayout 11 11 ~~~ 12 12 13 13 ### Autostart ··· 17 17 /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 18 18 nitrogen --restore 19 19 picom -b 20 -kbdd 21 20 ~~~~ 22 21 23 22 ### Keybindings 24 23 | Hotkey | Action | 25 -| -------------- | --------------- | 24 +| --- | --- | 26 25 | MOD + RETURN | Open termianl | 27 26 | MOD + SHIFT + RETURN | Open program launcher(rofi) | 28 27 | MOD + r | Open qtile spawn menu |
M
config/qtile/config.py
··· 2 2 from libqtile.config import Click, Drag, Group, Key, Screen 3 3 from libqtile.lazy import lazy 4 4 from typing import List 5 +import kblayout 5 6 import os 6 7 7 8 ··· 28 29 29 30 @hook.subscribe.startup_once 30 31 def autostart(): os.system("~/.config/qtile/autostart.sh") 31 - 32 32 33 33 keys = [ 34 34 # Applications ··· 88 88 ), 89 89 Key([mod, "control"], "h", 90 90 lazy.layout.grow_left(), 91 - #lazy.layout.grow()), 92 91 desc="Resize focus window(left)" 93 92 ), 94 93 Key([mod, "control"], "j", ··· 101 100 ), 102 101 Key([mod, "control"], "l", 103 102 lazy.layout.grow_right(), 104 - #lazy.layout.shrink() 105 103 desc="Resize focus window(right)" 106 104 ), 107 105 ··· 135 133 136 134 # Menus(dmenu or/and rofi) 137 135 Key([mod, "shift"], "Return", 138 - lazy.spawn("j4-dmenu-desktop --dmenu=\"dmenu -h 24 -p Run\""), 139 - desc="(j4-dmenu) Program launcher" 136 + lazy.spawn("rofi -show drun"), 137 + desc="(Rofi) Program launcher" 140 138 ), 141 139 Key([mod, "shift"], "apostrophe", 142 - lazy.spawn("dmenu_run -h 24 -p Run"), 143 - desc="(Dmenu) Program launcher" 140 + lazy.spawn("rofi -show run"), 141 + desc="(Rofi) Program launcher" 144 142 ), 145 143 Key([mod],"Escape", 146 144 lazy.spawn(f"/home/{user}/.script/dmenu/dmenu-power.sh"), ··· 243 241 ), 244 242 widget.Prompt(foreground=color[0]), 245 243 widget.WindowName(foreground=color[0]), 246 - widget.KeyboardKbdd( 244 + kblayout.KBLayout( 247 245 foreground=color[5], 248 - configured_keyboards=["us", "ru", "ua"], 249 246 update_interval=0, 250 - fmt=" {}", 247 + fmt=" {}" 251 248 ), 252 249 widget.CurrentLayout( 253 250 foreground=color[8] ··· 285 282 follow_mouse_focus = True 286 283 bring_front_click = False 287 284 cursor_warp = False 288 -floating_layout = layout.Floating(float_rules=[ 289 - {"wmclass": "confirm"}, 290 - {"wmclass": "dialog"}, 291 - {"wmclass": "download"}, 292 - {"wmclass": "error"}, 293 - {"wmclass": "file_progress"}, 294 - {"wmclass": "notification"}, 295 - {"wmclass": "splash"}, 296 - {"wmclass": "toolbar"}, 297 - {"wmclass": "confirmreset"}, 298 - {"wmclass": "makebranch"}, 299 - {"wmclass": "maketag"}, 300 - {"wname": "branchdialog"}, 301 - {"wname": "pinentry"}, 302 - {"wmclass": "ssh-askpass"}, 285 +floating_layout = layout.Floating( 286 + **layout_theme, 287 + float_rules=[ 288 + {"wmclass": "confirm"}, 289 + {"wmclass": "dialog"}, 290 + {"wmclass": "download"}, 291 + {"wmclass": "error"}, 292 + {"wmclass": "file_progress"}, 293 + {"wmclass": "notification"}, 294 + {"wmclass": "splash"}, 295 + {"wmclass": "toolbar"}, 296 + {"wmclass": "confirmreset"}, 297 + {"wmclass": "makebranch"}, 298 + {"wmclass": "maketag"}, 299 + {"wname": "branchdialog"}, 300 + {"wname": "pinentry"}, 301 + {"wmclass": "ssh-askpass"}, 303 302 ]) 304 303 auto_fullscreen = True 305 304 focus_on_window_activation = "smart"
A
config/qtile/kblayout.py
··· 1 +from libqtile.widget import base 2 +import os 3 + 4 + 5 +class KBLayout(base.InLoopPollText): 6 + """Widget for displaying the current keyboard layout 7 + It requires setxkbmap and xkblayout""" 8 + orientations = base.ORIENTATION_HORIZONTAL 9 + defaults = [ 10 + ("background", "#000000", "Backbround color"), 11 + ("foreground", "#ffffff", "Foreground color"), 12 + ] 13 + 14 + def __init__(self, **config): 15 + base.InLoopPollText.__init__(self, **config) 16 + 17 + def get_keyboard(self): 18 + kb = os.popen("xkblayout").read().rstrip("\n") 19 + return kb 20 + 21 + def poll(self): 22 + kb = os.popen(".config/qtile/kblay.sh").read().rstrip('\n').encode('utf-8').decode('utf-8') 23 + return kb
M
config/ranger/rc.conf
··· 24 24 25 25 ### Preview 26 26 set preview_images true 27 -set preview_images_method ueberzug 28 -set w3m_delay 0.02 29 -set w3m_offset 0 27 +set preview_images_method kitty 28 +#set preview_images_method ueberzug 30 29 31 30 set unicode_ellipsis false 32 31 set bidi_support false ··· 89 88 # Command Aliases in the Console 90 89 ################################# 91 90 91 +map E edit 92 +map F set freeze_files! 93 + 92 94 # "a" key 93 95 map a rename_append 94 -map a 95 96 map A eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%")) 96 - 97 - 97 +map as shell zip -rf 'file.zip' %s 98 +map ad shell tar -czvf file.tar.gz %s 99 +map az extract 100 +map ax extract_to_dirs 101 +map ac compress 98 102 99 -map ex extract 100 -map ed extract_to_dirs 101 -map ec compress 103 +# "q"/quit keys 104 +map Q quitall 105 +map q quit 106 +map <C-c> abort 102 107 103 -alias e edit 108 +# quit alias 109 +alias q quit 104 110 alias q quit 105 111 alias q! quit! 106 112 alias qa quitall 107 113 alias qa! quitall! 108 -alias qall quitall 109 -alias qall! quitall! 110 114 alias setl setlocal 115 +alias e edit 111 116 117 +# scout alias 112 118 alias filter scout -prts 113 119 alias find scout -aets 114 120 alias mark scout -mr ··· 117 123 alias search_inc scout -rts 118 124 alias travel scout -aefklst 119 125 120 -map Q quitall 121 -map q quit 122 -copymap q ZZ ZQ 123 - 126 +# Restart/reload fm 124 127 map R reload_cwd 125 -map F set freeze_files! 126 128 map <C-r> reset 129 + 130 +# Modes 131 +map ~ set viewmode! 127 132 map <C-l> redraw_window 128 -map <C-c> abort 129 133 map <esc> change_mode normal 130 -map ~ set viewmode! 131 134 132 135 map i display_file 133 136 map <A-j> scroll_preview 1 ··· 158 161 map MH linemode sizehumanreadablemtime 159 162 map Mt linemode metatitle 160 163 161 -map t tag_toggle 162 -map ut tag_remove 163 -map "<any> tag_toggle tag=%any 164 164 map <Space> mark_files toggle=True 165 165 map v mark_files all=True toggle=True 166 166 map uv mark_files all=True val=False ··· 201 201 map { traverse_backwards 202 202 map ) jump_non 203 203 204 +# Go keys 204 205 map gh cd ~ 205 -map gr cd / 206 -map gd cd ~/code 206 +map gd cd ~/Code 207 +map gd cd ~/Documents 208 +map gb cd ~/Documents/Books 209 +map dl cd ~/.dotfiles 207 210 208 -map E edit 209 211 210 -map cw console rename%space 211 -map I eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"), position=7) 212 + 212 213 214 +# File keys 215 +map dD shell mv %s /home/${USER}/.local/share/Trash/files/ 216 +map dd cut 217 +map ud uncut 218 +map da cut mode=add 219 +map dr cut mode=remove 220 +map dt cut mode=toggle 213 221 map pp paste 214 222 map po paste overwrite=True 215 223 map pP paste append=True ··· 222 230 map p`<any> paste dest=%any_path 223 231 map p'<any> paste dest=%any_path 224 232 225 -#map dD console delete 226 -map dD shell mv %s /home/${USER}/.local/share/Trash/files/ 227 -map dT console trash 228 - 229 -map dd cut 230 -map ud uncut 231 -map da cut mode=add 232 -map dr cut mode=remove 233 -map dt cut mode=toggle 234 233 235 234 map yy copy 236 235 map uy uncut ··· 247 246 map yj eval fm.copy(dirarg=dict(down=1), narg=quantifier) 248 247 map yk eval fm.copy(dirarg=dict(up=1), narg=quantifier) 249 248 249 +# Search keys 250 250 map / console search%space 251 251 map n search_next 252 252 map N search_next forward=False ··· 257 257 map cm search_next order=mtime 258 258 map ca search_next order=atime 259 259 260 +# Tab keys 260 261 map <C-n> tab_new 261 262 map <C-w> tab_close 262 263 map <TAB> tab_move 1 263 264 map <S-TAB> tab_move -1 264 265 map <A-Right> tab_move 1 265 266 map <A-Left> tab_move -1 266 -map gt tab_move 1 267 -map gT tab_move -1 268 -map gn tab_new 269 -map gc tab_close 267 +map tn tab_new 268 +map tc tab_close 269 +map tt tag_toggle 270 +map ut tag_remove 271 +map "<any> tag_toggle tag=%any 270 272 map uq tab_restore 271 273 map <a-1> tab_open 1 272 274 map <a-2> tab_open 2
M
zshrc
··· 1 -export ZSH="/home/sasha/.oh-my-zsh" 1 +export ZSH="$HOME/.oh-my-zsh" 2 +export PATH="$HOME/bin:$PATH" 2 3 source ~/.env 3 4 source ~/.profile 4 5 ··· 41 42 alias tozsh="chsh -s /bin/zsh && echo 'Now log out.'" 42 43 alias tofish="chsh -s /bin/fish && echo 'Now log out.'" 43 44 alias tobash="chsh -s /bin/bash && echo 'Now log out.'" 45 + 46 +### Pfetch ### 47 +pfetch