another update for vim and i3

master
Mike Cugini 3 years ago
parent a4f1b5210a
commit 867f7b8c3b
  1. 2
      Xresources
  2. 39
      i3/config
  3. 19
      i3/i3status.conf
  4. 144
      vimrc
  5. 15
      zshrc

@ -1,5 +1,5 @@
! DPI settings ! DPI settings
Xft.dpi: 276 !Xft.dpi: 276
!Xft.dpi: 220 !Xft.dpi: 220
Xft.autohint: 0 Xft.autohint: 0
Xft.lcdfilter: lcddefault Xft.lcdfilter: lcddefault

@ -11,20 +11,19 @@
set $mod Mod4 set $mod Mod4
exec --no-startup-id /usr/bin/unity-settings-daemon # exec picom -CGb
exec xrandr --dpi 200 #109 #200 # 163
exec compton -CGb
exec --no-startup-id feh --bg-fill ~/Pictures/dark_spots_texture_background_50355_3840x2160.jpg
exec --no-startup-id "xautolock -time 10 -locker 'i3lock -e -i /home/cugini/Pictures/dark_spots_texture_background_50355_3840x2160.png'"
exec synclient TapButton3=2 ClickFinger3=2
exec --no-startup-id nm-applet
exec --no-startup-id udiskie -t exec --no-startup-id udiskie -t
exec --no-startup-id pasystray
exec --no-startup-id dropbox start exec --no-startup-id dropbox start
exec --no-startup-id protonmail-bridge --no-window
exec --no-startup-id /home/mike/bin/vorta
# Font for window titles. Will also be used by the bar unless a different font # Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below. # is used in the bar {} block below.
#font pango:M+ 1m, FontAwesome, monospace 8 #font pango:M+ 1m, FontAwesome, monospace 8
font pango:M+ 1m, FontAwesome, Monotype Noto Sans 8 font pango:M+ 1m, FontAwesome, Noto Sans 8
new_window 1pixel
# This font is widely installed, provides lots of unicode glyphs, right-to-left # This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango). # text rendering and scalability on retina/hidpi displays (thanks to pango).
@ -35,18 +34,14 @@ floating_modifier $mod
# start a terminal # start a terminal
#bindsym $mod+Return exec i3-sensible-terminal #bindsym $mod+Return exec i3-sensible-terminal
bindsym $mod+Return exec st bindsym $mod+Return exec alacritty
# kill focused window # kill focused window
bindsym $mod+Shift+q kill bindsym $mod+Shift+q kill
# start dmenu (a program launcher) # start dmenu (a program launcher)
bindsym $mod+d exec dmenu_run -fn 'Monotype Noto Sans-10' # bindsym $mod+d exec dmenu_run -fn 'Noto Sans-10'
#bindsym $mod+d exec --no-startup-id i3-dmenu-desktop --dmenu="dmenu_run -fn 'Monotype Noto Sans-8'" bindsym $mod+d exec rofi -modi run -show run
# There also is the (new) i3-dmenu-desktop which only displays applications
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
# installed.
# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
# change focus # change focus
bindsym $mod+h focus left bindsym $mod+h focus left
@ -78,6 +73,8 @@ bindsym $mod+Shift+Right move right
# split in vertical orientation # split in vertical orientation
bindsym $mod+v split v bindsym $mod+v split v
bindsym $mod+Shift+w sticky toggle
# enter fullscreen mode for the focused container # enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle bindsym $mod+f fullscreen toggle
@ -170,11 +167,13 @@ mode "resize" {
#bindsym $mod+r mode "resize" #bindsym $mod+r mode "resize"
for_window [class="Keybase"] move position mouse
# Start i3bar to display a workspace bar (plus the system information i3status # Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available) # finds out, if available)
bar { bar {
#status_command i3status status_command i3status
status_command i3status | ~/bin/my_i3status.py # status_command i3status | ~/bin/my_i3status.py
} }
bindsym XF86AudioPlay exec playerctl play-pause && killall -USR1 i3status bindsym XF86AudioPlay exec playerctl play-pause && killall -USR1 i3status
@ -190,7 +189,7 @@ bindsym XF86AudioLowerVolume exec ~/bin/lower_volume && killall -USR1 i3status
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle && killall -USR1 i3status bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle && killall -USR1 i3status
#lock and suspend #lock and suspend
#bindsym $mod+p exec i3lock bindsym $mod+p exec i3lock
# bindsym $mod+p exec xdg-screensaver lock # bindsym $mod+p exec xdg-screensaver lock
bindsym $mod+p exec dm-tool lock # bindsym $mod+p exec dm-tool lock
bindsym $mod+Shift+p exec systemctl suspend # bindsym $mod+Shift+p exec systemctl suspend

@ -12,13 +12,14 @@ general {
interval = 5 interval = 5
} }
order += "volume master" #order += "volume master"
order += "volume komplete"
order += "disk /" order += "disk /"
#order += "run_watch DHCP" #order += "run_watch DHCP"
order += "path_exists VPN" order += "path_exists VPN"
order += "wireless _first_" order += "wireless _first_"
order += "ethernet _first_" order += "ethernet _first_"
order += "battery 0" #order += "battery 0"
order += "load" order += "load"
order += "tztime local" order += "tztime local"
order += "tztime utc" order += "tztime utc"
@ -31,6 +32,20 @@ volume master {
mixer_idx = 0 mixer_idx = 0
} }
volume komplete {
format = " %volume"
format_muted = " %volume"
device = "pulse:alsa_output.usb-Native_Instruments_Komplete_Audio_2_00000181-00.analog-stereo"
}
# volume komplete {
# format = " %volume"
# format_muted = " %volume"
# #device = "hw:2"
# device = "hw:0"
# mixer = "Komplete Audio 2 "
# }
wireless _first_ { wireless _first_ {
#format_up = "W: (%quality at %essid) %ip" #format_up = "W: (%quality at %essid) %ip"
#format_down = "W: down" #format_down = "W: down"

144
vimrc

@ -1,25 +1,57 @@
call plug#begin('~/.local/share/nvim/plugged') call plug#begin('~/.local/share/nvim/plugged')
" general dev tools
Plug 'w0rp/ale' Plug 'w0rp/ale'
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim' Plug 'junegunn/fzf.vim'
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
Plug 'LnL7/vim-nix'
Plug 'morhetz/gruvbox' " go tools
Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' } Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
Plug 'hdima/python-syntax' " rust tools
Plug 'rust-lang/rust.vim' Plug 'rust-lang/rust.vim'
" Plug 'racer-rust/vim-racer'
" reason/bucklescript
Plug 'reasonml-editor/vim-reason-plus'
" git
Plug 'mhinz/vim-signify' Plug 'mhinz/vim-signify'
Plug 'tpope/vim-fugitive' Plug 'tpope/vim-fugitive'
" beautify
Plug 'morhetz/gruvbox'
Plug 'vim-airline/vim-airline' Plug 'vim-airline/vim-airline'
Plug 'liuchengxu/space-vim-theme'
call plug#end() " python tools
" Plug 'deoplete-plugins/deoplete-jedi'
" Plug 'davidhalter/jedi-vim'
" Plug 'hdima/python-syntax'
Plug 'vim-python/python-syntax'
" elm tools
Plug 'andys8/vim-elm-syntax'
" Javascript
Plug 'yuezk/vim-js'
Plug 'maxmellon/vim-jsx-pretty'
" lisps
Plug 'wlangstroth/vim-racket'
Plug 'junegunn/rainbow_parentheses.vim'
" notes and organization
Plug 'vimwiki/vimwiki'
Plug 'autozimu/LanguageClient-neovim', {
\ 'branch': 'next',
\ 'do': 'bash install.sh',
\ }
call plug#end()
set nocompatible set nocompatible
set encoding=utf-8 set encoding=utf-8
@ -36,10 +68,8 @@ if has("termguicolors")
endif endif
set background=dark set background=dark
"colorscheme molokai "gruvbox zenburn " colorscheme gruvbox
" colorscheme material-monokai colorscheme space_vim_theme
"let g:molokai_original = 1
colorscheme gruvbox
"always show status bar "always show status bar
set laststatus=2 set laststatus=2
@ -52,8 +82,9 @@ filetype plugin indent on
"indent and tab "indent and tab
set nowrap set nowrap
set expandtab set expandtab
set tabstop=4 shiftwidth=4 softtabstop=4
set backspace=indent,eol,start set backspace=indent,eol,start
set tabstop=4 shiftwidth=4 softtabstop=4
autocmd FileType javascript setlocal shiftwidth=2 softtabstop=2
"turn paste mode on and off with F3 "turn paste mode on and off with F3
set pastetoggle=<F3> set pastetoggle=<F3>
@ -68,10 +99,6 @@ set smartcase
set wildmenu set wildmenu
set wildmode=longest:full,full set wildmode=longest:full,full
"configure code folding bindings
nnoremap <space> za
vnoremap <space> zf
"Better split navigation "Better split navigation
nnoremap <C-J> <C-W><C-J> nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K> nnoremap <C-K> <C-W><C-K>
@ -85,56 +112,58 @@ set splitright
if executable('rg') if executable('rg')
let g:ctrlp_user_command = 'rg --files %s' let g:ctrlp_user_command = 'rg --files %s'
set grepprg=rg\ --no-heading\ --vimgrep\ --smart-case set grepprg=rg\ --no-heading\ --vimgrep\ --smart-case
elseif executable('ag')
let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""'
set grepprg=ag\ --nogroup\ --nocolor
endif endif
" vim-signify " vim-signify
let g:signify_vcs_list = [ 'git', 'hg' ] let g:signify_vcs_list = [ 'git', 'hg' ]
let g:signify_sign_change = "~" let g:signify_sign_change = "~"
" clojureee
au FileType clojure RainbowParentheses
"Go specific settings "Go specific settings
set rtp+=$GOROOT/misc/vim
au BufRead,BufNewFile *.go set list noexpandtab syntax=go listchars=tab:\|\ ,trail:- au BufRead,BufNewFile *.go set list noexpandtab syntax=go listchars=tab:\|\ ,trail:-
autocmd FileType go map <buffer> <c-d> :GoDoc<CR>
" YAML
" FZF autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab
set rtp+=$HOME/.fzf
command! -bang -nargs=* RgFzf function! CleverTab()
\ call fzf#run(fzf#wrap('rgfzf', {'source': "rg --files"}, <bang>0))
" nmap <c-p> :Files<CR>
nmap <c-p> :RgFzf<CR>
nnoremap <C-g>b :Buffers<CR>
nnoremap <C-g>g :Rg<CR>
nnoremap <C-g>l :BLines<CR>
nnoremap <C-g>c :Commands<CR>
" use ripgrep instead of ag/grep
command! -bang -nargs=* Rg
\ call fzf#vim#grep(
\ 'rg --column --line-number --no-heading --color=always '.shellescape(<q-args>), 1,
\ <bang>0 ? fzf#vim#with_preview('up:60%')
\ : fzf#vim#with_preview('right:50%:hidden', '?'),
\ <bang>0)
function! InsertTabWrapper()
if pumvisible() if pumvisible()
return "\<c-n>" return "\<C-N>"
endif endif
let col = col('.') - 1 if strpart( getline('.'), 0, col('.')-1 ) =~ '^\s*$'
if !col || getline('.')[col - 1] !~ '\k' return "\<Tab>"
return "\<tab>" elseif exists('&omnifunc') && &omnifunc != ''
return "\<C-X>\<C-O>"
else else
return "\<c-x>\<c-o>" return "\<C-N>"
endif endif
endfunction endfunction
inoremap <expr><tab> InsertTabWrapper()
inoremap <expr><s-tab> pumvisible()?"\<c-p>":"\<c-d>" inoremap <Tab> <C-R>=CleverTab()<CR>
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<cr>"
" inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
" inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
" inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<cr>"
let g:ale_fixers = {
\ 'javascript': ['prettier', 'eslint'],
\ 'python': ['black'],
\ }
let g:LanguageClient_serverCommands = {
\ 'rust': ['rust-analyzer'],
\ 'python': ['/usr/local/bin/pyls'],
\ 'reason': ['/home/mike/bin/reason-language-server'],
\ 'javascript': ['/usr/bin/javascript-typescript-stdio'],
\ }
let g:python_highlight_all = 1
let g:go_fmt_command = "goimports" let g:go_fmt_command = "goimports"
let g:syntastic_go_checkers = ['go', 'goimports', 'govet', 'golint'] let g:go_doc_popup_window = 1
let g:go_highlight_functions = 1 let g:go_highlight_functions = 1
let g:go_highlight_function_calls = 1 let g:go_highlight_function_calls = 1
@ -150,26 +179,11 @@ let g:go_highlight_build_constraints = 1
" disable vim-jedi autocomplete as we get it with deoplete-jedi " disable vim-jedi autocomplete as we get it with deoplete-jedi
" but we want all the other functionality " but we want all the other functionality
let g:jedi#completions_enabled = 0 let g:jedi#completions_enabled = 0
let g:jedi#use_splits_not_buffers = 'winwidth' " let g:jedi#use_splits_not_buffers = 'winwidth'
" deoplete configuration " deoplete configuration
let g:deoplete#enable_at_startup = 1 let g:deoplete#enable_at_startup = 1
" deoplete Go
let g:deoplete#sources#go#sort_class = ['package', 'func', 'type', 'var', 'const']
let g:deoplete#sources#go#gocode_binary = '/home/cugini/go/bin/gocode'
let g:deoplete#sources#go#use_cache = 1
let g:deoplete#sources#go#json_directory = '~/.cache/deoplete/go/$GOOS_$GOARCH'
" deoplete Rust
let g:deoplete#sources#rust#racer_binary = '/home/cugini/.cargo/bin/racer'
let g:deoplete#sources#rust#rust_source_path = '/home/cugini/Projects/rust/src'
"configure tagbar
nmap <F8> :TagbarToggle<CR>
let g:tagbar_width = 60
let g:tagbar_sort = 0
if filereadable(expand("~/.vim/local.vim")) if filereadable(expand("~/.vim/local.vim"))
source ~/.vim/local.vim source ~/.vim/local.vim
endif endif

15
zshrc

@ -1,5 +1,6 @@
# load my zsh configs # load my zsh configs
source ~/.zsh/load.sh source ~/.zsh/load.sh
source ~/.nix-profile/etc/profile.d/nix.sh
# turn off mostly unhelpful autocorrect # turn off mostly unhelpful autocorrect
unsetopt correct_all unsetopt correct_all
@ -34,10 +35,18 @@ alias la='ls -a'
bindkey '^R' history-incremental-search-backward bindkey '^R' history-incremental-search-backward
export GOPATH=$HOME/Projects/go export GOPATH=$HOME/Projects/go
export RUST_SRC_PATH=$HOME/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src
export PATH=$HOME/bin:$GOPATH/bin:$PATH export PATH=$HOME/bin:$HOME/.local/bin:$PATH # user custom bins
export PATH=/home/mike/.gem/ruby/2.3.0/bin:$PATH export PATH=$GOPATH/bin:$PATH # go bin
export PATH=/opt/android-studio/bin:/home/mike/.cargo/bin:$PATH export PATH=$HOME/.gem/ruby/2.3.0/bin:$PATH # ruby gem bin
export PATH=$HOME/.cargo/bin:$PATH # rust cargo bin
export PATH=$HOME/Android/Sdk/platform-tools:$PATH # android studio bin
export PATH=$HOME/.poetry/bin:$PATH # android studio bin
# source zsh-syntax-highlighting last # source zsh-syntax-highlighting last
source $ZSH/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh source $ZSH/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source /usr/share/fzf/key-bindings.zsh
eval "$(direnv hook zsh)"
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh

Loading…
Cancel
Save