From a9b2ef65c5269c95ffaaccbb2a80ca19a1c29bed Mon Sep 17 00:00:00 2001 From: Barak Michener Date: Fri, 1 Jun 2018 13:47:37 -0700 Subject: [PATCH 01/25] portia1 --- .config/xfce4/panel/whiskermenu-1.rc | 4 ++-- .config/xfce4/xfconf/xfce-perchannel-xml/displays.xml | 14 +++++++++++++- .config/xfce4/xfconf/xfce-perchannel-xml/thunar.xml | 4 ++-- .config/xfce4/xfconf/xfce-perchannel-xml/xfce4-notifyd.xml | 2 ++ .config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml | 3 ++- .vimrc | 7 +++++++ .xinitrc | 2 +- 7 files changed, 29 insertions(+), 7 deletions(-) diff --git a/.config/xfce4/panel/whiskermenu-1.rc b/.config/xfce4/panel/whiskermenu-1.rc index 13975de..734515c 100644 --- a/.config/xfce4/panel/whiskermenu-1.rc +++ b/.config/xfce4/panel/whiskermenu-1.rc @@ -1,5 +1,5 @@ -favorites=exo-web-browser.desktop,exo-mail-reader.desktop,exo-file-manager.desktop,pidgin.desktop,exo-terminal-emulator.desktop -recent=xfce-mouse-settings.desktop,xfce-ui-settings.desktop,firefox.desktop,exo-terminal-emulator.desktop +favorites=exo-web-browser.desktop,exo-mail-reader.desktop,exo-file-manager.desktop,libreoffice-writer.desktop,libreoffice-calc.desktop,pidgin.desktop,org.gnome.Software.desktop,exo-terminal-emulator.desktop +recent=xfce-session-settings.desktop,xfce-keyboard-settings.desktop,xfce-ui-settings.desktop,firefox.desktop,exo-terminal-emulator.desktop,lightdm-gtk-greeter-settings.desktop button-title=Applications Menu button-icon=xfce4-whiskermenu button-single-row=false diff --git a/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml b/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml index bd82588..1f46710 100644 --- a/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml +++ b/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml @@ -3,7 +3,7 @@ - + @@ -26,5 +26,17 @@ + + + + + + + + + + + + diff --git a/.config/xfce4/xfconf/xfce-perchannel-xml/thunar.xml b/.config/xfce4/xfconf/xfce-perchannel-xml/thunar.xml index 166d8eb..9db6b09 100644 --- a/.config/xfce4/xfconf/xfce-perchannel-xml/thunar.xml +++ b/.config/xfce4/xfconf/xfce-perchannel-xml/thunar.xml @@ -5,7 +5,7 @@ - - + + diff --git a/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-notifyd.xml b/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-notifyd.xml index de6c978..af38a9f 100644 --- a/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-notifyd.xml +++ b/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-notifyd.xml @@ -7,8 +7,10 @@ + + diff --git a/.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml b/.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml index 4189958..e0b54bd 100644 --- a/.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml +++ b/.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml @@ -48,7 +48,7 @@ - + @@ -58,6 +58,7 @@ + diff --git a/.vimrc b/.vimrc index db9465f..e10c880 100644 --- a/.vimrc +++ b/.vimrc @@ -140,6 +140,8 @@ Plug 'tpope/vim-fireplace' Plug 'junegunn/vim-easy-align' Plug 'idris-hackers/idris-vim' +Plug 'ambv/black' + call plug#end() @@ -520,6 +522,11 @@ function AutoTrimWhitespace() endif endfunction + +function InstallEverything() + GoUpdateBinaries + BlackUpgrade +endfunction " ** KEY REMAPPINGS ** " " I used to use tabs, but then I took an arrow to the knee. diff --git a/.xinitrc b/.xinitrc index f14b088..16252d2 100755 --- a/.xinitrc +++ b/.xinitrc @@ -22,7 +22,7 @@ rofi -key-run control-space -fuzzy -terminal run_terminal & nm-applet & gnome-sound-applet & remmina -i & -#setxkbmap -option ctrl:nocaps & +setxkbmap -option ctrl:nocaps & xmodmap ~/.Xmodmap & #synclient PalmDetect=1 From c257164aeef18b6c00b55b53d399fdde46522cbd Mon Sep 17 00:00:00 2001 From: Barak Michener Date: Fri, 1 Jun 2018 13:50:30 -0700 Subject: [PATCH 02/25] vimrc paths --- .vimrc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.vimrc b/.vimrc index e10c880..2cfd066 100644 --- a/.vimrc +++ b/.vimrc @@ -71,12 +71,12 @@ let $RUST_SRC_PATH="/usr/src/rust/src/" "let g:ft_ignore_pat = '.org' " Required: -set runtimepath+=/home/barak/.vim/bundle/repos/github.com/Shougo/dein.vim +set runtimepath+=/home/bmichener/.vim/bundle/repos/github.com/Shougo/dein.vim " Required: -call plug#begin('/home/barak/.vim/bundle') +call plug#begin('/home/bmichener/.vim/bundle') -Plug '/home/barak/.vim/bundle/repos/github.com/Shougo/dein.vim' +Plug '/home/bmichener/.vim/bundle/repos/github.com/Shougo/dein.vim' Plug 'vim-scripts/DrawIt' Plug 'tpope/vim-speeddating' Plug 'vim-scripts/EasyGrep' @@ -655,7 +655,7 @@ endif " ** SEE ALSO ** " filetype.vim -command Comments lexpr system('/home/barak/src/gogh/src/github.com/barakmich/gogh/gogh') +command Comments lexpr system('/home/bmichener/src/gogh/src/github.com/barakmich/gogh/gogh') "call remote#host#RegisterPlugin('python3', '/home/barak/.vim/bundle/deoplete.nvim/rplugin/python3/deoplete', [ From f49657495b72426b6527f74bdd04fc30b585efbc Mon Sep 17 00:00:00 2001 From: Barak Michener Date: Mon, 25 Jun 2018 13:21:31 -0700 Subject: [PATCH 03/25] Adds ALE, LanguageClient, and clang --- .gitconfig | 2 ++ .vim/autoload/plug.vim | 21 +++++++++++---------- .vimrc | 33 +++++++++++++++++++++++++++++++-- 3 files changed, 44 insertions(+), 12 deletions(-) diff --git a/.gitconfig b/.gitconfig index 9cf26ee..34c6993 100644 --- a/.gitconfig +++ b/.gitconfig @@ -34,3 +34,5 @@ default = current [rerere] enabled = true +[url "git@github.com:"] + insteadOf = https://github.com/ diff --git a/.vim/autoload/plug.vim b/.vim/autoload/plug.vim index ceb2762..9dd02c0 100644 --- a/.vim/autoload/plug.vim +++ b/.vim/autoload/plug.vim @@ -605,7 +605,7 @@ function! plug#helptags() return s:err('plug#begin was not called') endif for spec in values(g:plugs) - let docd = join([spec.dir, 'doc'], '/') + let docd = join([s:rtp(spec), 'doc'], '/') if isdirectory(docd) silent! execute 'helptags' s:esc(docd) endif @@ -799,7 +799,7 @@ function! s:bang(cmd, ...) let cmd = a:0 ? s:with_cd(a:cmd, a:1) : a:cmd if s:is_win let batchfile = tempname().'.bat' - call writefile(['@echo off', cmd], batchfile) + call writefile(["@echo off\r", cmd . "\r"], batchfile) let cmd = batchfile endif let g:_plug_bang = (s:is_win && has('gui_running') ? 'silent ' : '').'!'.escape(cmd, '#!%') @@ -908,7 +908,7 @@ function! s:finish(pull) call add(msgs, "Press 'R' to retry.") endif if a:pull && len(s:update.new) < len(filter(getline(5, '$'), - \ "v:val =~ '^- ' && stridx(v:val, 'Already up-to-date') < 0")) + \ "v:val =~ '^- ' && v:val !~# 'Already up.to.date'")) call add(msgs, "Press 'D' to see the updated changes.") endif echo join(msgs, ' ') @@ -1196,7 +1196,7 @@ function! s:spawn(name, cmd, opts) let s:jobs[a:name] = job let cmd = has_key(a:opts, 'dir') ? s:with_cd(a:cmd, a:opts.dir) : a:cmd if !empty(job.batchfile) - call writefile(['@echo off', cmd], job.batchfile) + call writefile(["@echo off\r", cmd . "\r"], job.batchfile) let cmd = job.batchfile endif let argv = add(s:is_win ? ['cmd', '/c'] : ['sh', '-c'], cmd) @@ -2023,7 +2023,7 @@ function! s:system(cmd, ...) let cmd = a:0 > 0 ? s:with_cd(a:cmd, a:1) : a:cmd if s:is_win let batchfile = tempname().'.bat' - call writefile(['@echo off', cmd], batchfile) + call writefile(["@echo off\r", cmd . "\r"], batchfile) let cmd = batchfile endif return system(s:is_win ? '('.cmd.')' : cmd) @@ -2246,15 +2246,16 @@ function! s:status() let unloaded = 0 let [cnt, total] = [0, len(g:plugs)] for [name, spec] in items(g:plugs) + let is_dir = isdirectory(spec.dir) if has_key(spec, 'uri') - if isdirectory(spec.dir) + if is_dir let [err, _] = s:git_validate(spec, 1) let [valid, msg] = [empty(err), empty(err) ? 'OK' : err] else let [valid, msg] = [0, 'Not found. Try PlugInstall.'] endif else - if isdirectory(spec.dir) + if is_dir let [valid, msg] = [1, 'OK'] else let [valid, msg] = [0, 'Not found.'] @@ -2263,7 +2264,7 @@ function! s:status() let cnt += 1 let ecnt += !valid " `s:loaded` entry can be missing if PlugUpgraded - if valid && get(s:loaded, name, -1) == 0 + if is_dir && get(s:loaded, name, -1) == 0 let unloaded = 1 let msg .= ' (not loaded)' endif @@ -2356,7 +2357,7 @@ function! s:preview_commit() let cmd = 'cd '.s:shellesc(g:plugs[name].dir).' && git show --no-color --pretty=medium '.sha if s:is_win let batchfile = tempname().'.bat' - call writefile(['@echo off', cmd], batchfile) + call writefile(["@echo off\r", cmd . "\r"], batchfile) let cmd = batchfile endif execute 'silent %!' cmd @@ -2406,7 +2407,7 @@ function! s:diff() call s:append_ul(2, origin ? 'Pending updates:' : 'Last update:') for [k, v] in plugs let range = origin ? '..origin/'.v.branch : 'HEAD@{1}..' - let diff = s:system_chomp('git log --graph --color=never --pretty=format:"%x01%h%x01%d%x01%s%x01%cr" '.s:shellesc(range), v.dir) + let diff = s:system_chomp('git log --graph --color=never '.join(map(['--pretty=format:%x01%h%x01%d%x01%s%x01%cr', range], 's:shellesc(v:val)')), v.dir) if !empty(diff) let ref = has_key(v, 'tag') ? (' (tag: '.v.tag.')') : has_key(v, 'commit') ? (' '.v.commit) : '' call append(5, extend(['', '- '.k.':'.ref], map(s:lines(diff), 's:format_git_log(v:val)'))) diff --git a/.vimrc b/.vimrc index 2cfd066..dffe5b1 100644 --- a/.vimrc +++ b/.vimrc @@ -1,4 +1,4 @@ - " ___ _ _ _ +" ___ _ _ _ " | _ ) __ _ _ _ __ _| |_( )___ __ _(_)_ __ _ _ __ " | _ \/ _` | '_/ _` | / //(_-< \ V / | ' \| '_/ _| " |___/\__,_|_| \__,_|_\_\ /__/ (_)_/|_|_|_|_|_| \__| @@ -87,7 +87,8 @@ Plug 'sjbach/lusty' Plug 'scrooloose/nerdcommenter' Plug 'scrooloose/nerdtree' Plug 'rstacruz/sparkup' -Plug 'scrooloose/syntastic' +"Plug 'scrooloose/syntastic' +Plug 'w0rp/ale' Plug 'tpope/vim-fugitive' Plug 'airblade/vim-gitgutter' Plug 'lunaru/vim-less' @@ -95,6 +96,7 @@ Plug 'lunaru/vim-less' Plug 'tpope/vim-unimpaired' "Plug 'Valloric/YouCompleteMe' Plug 'Shougo/deoplete.nvim' +Plug 'zchee/deoplete-clang' Plug 'zchee/deoplete-go', {'build': {'unix': 'make'}} Plug 'zchee/deoplete-jedi' Plug 'b4winckler/vim-angry' @@ -139,6 +141,10 @@ Plug 'Shougo/denite.nvim' Plug 'tpope/vim-fireplace' Plug 'junegunn/vim-easy-align' Plug 'idris-hackers/idris-vim' +Plug 'autozimu/LanguageClient-neovim', { + \ 'branch': 'next', + \ 'do': 'bash install.sh', + \ } Plug 'ambv/black' @@ -199,6 +205,13 @@ setlocal cursorline " ** PLUGIN CONFIGURATION ** " +" Change the source rank +call deoplete#custom#option('sources', { + \ 'python': ['LanguageClient'], + \}) +call deoplete#custom#source('buffer', 'rank', 1) +let g:deoplete#sources#clang#libclang_path = '/usr/lib/llvm-6.0/lib/libclang.so' +let g:deoplete#sources#clang#clang_header = '/usr/lib/llvm-6.0/lib/clang' let g:deoplete#enable_at_startup = 1 " * Vim general/Unknown let python_highlight_all = 1 @@ -216,6 +229,22 @@ let g:syntastic_always_populate_loc_list = 1 let g:syntastic_auto_loc_list = 2 let g:syntastic_loc_list_height = 10 " E111 = Spaces should be multiples of 4. I use 2. +" + +" * ALE +let g:airline#extensions#ale#enabled = 1 +let g:ale_set_highlights = 0 + +" * LanguageServer +let g:LanguageClient_serverCommands = { + \ 'python': ['pyls'], + \ } +let g:LanguageClient_diagnosticsDisplay = { + \1: {'name': 'Error', 'texthl': 'ALEError', 'signText': 'E>', 'signTexthl': 'ALEErrorSign',}, + \2: {"name": "Warning", "texthl": "ALEWarning", "signText": "W>", "signTexthl": "ALEWarningSign",}, + \3: {"name": "Information", "texthl": "ALEInfo", "signText": "i-", "signTexthl": "ALEInfoSign",}, + \4: {"name": "Hint", "texthl": "ALEInfo", "signText": "--", "signTexthl": "ALEInfoSign",}, +\} " * Configure browser for haskell_doc.vim let g:haddock_browser = "open" From 4ad34c4e4809d508f76f5ec86ae65791e2f4b126 Mon Sep 17 00:00:00 2001 From: Barak Michener Date: Fri, 29 Jun 2018 15:10:47 -0700 Subject: [PATCH 04/25] add remmina files --- .local/share/remmina/1523485448993.remmina | 47 ++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .local/share/remmina/1523485448993.remmina diff --git a/.local/share/remmina/1523485448993.remmina b/.local/share/remmina/1523485448993.remmina new file mode 100644 index 0000000..23be4c0 --- /dev/null +++ b/.local/share/remmina/1523485448993.remmina @@ -0,0 +1,47 @@ +[remmina] +sound=off +sharefolder= +name=ganymede +cert_ignore=0 +console=0 +ssh_enabled=1 +exec= +clientname= +loadbalanceinfo= +server=127.0.0.1 +colordepth=64 +ssh_auth=3 +postcommand= +group= +sharesmartcard=0 +quality=1 +username=barak +ssh_charset= +ssh_loopback=0 +ssh_username=barak +gateway_password= +gateway_server= +gateway_username= +microphone=0 +execpath= +resolution_width= +gateway_usage=0 +disableautoreconnect=0 +password=. +resolution_height= +security= +domain= +disablepasswordstoring=0 +precommand= +ssh_server=ganymede.fmt.0b100.net:2222 +protocol=RDP +shareprinter=0 +gateway_domain= +disableclipboard=0 +ssh_privatekey= +last_success=20180629 +window_maximize=0 +window_height=1411 +window_width=1276 +viewmode=4 +keyboard_grab=0 From 3758e4cb455fbf933175f263a1476a224b6cf3af Mon Sep 17 00:00:00 2001 From: Barak Michener Date: Thu, 5 Jul 2018 12:59:28 -0700 Subject: [PATCH 05/25] change vimfiler, add remote keybindings for i3 --- .i3/config | 11 +++++++++++ .vimrc | 3 ++- bin/run_terminal | 8 ++++---- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.i3/config b/.i3/config index 2b3db5c..8c3cb96 100644 --- a/.i3/config +++ b/.i3/config @@ -55,6 +55,7 @@ bindsym $mod+d exec i3-dmenu-desktop --dmenu='rofi -dmenu' bindsym $mod+F12 exec xscreensaver-command -lock bindsym $mod+Shift+y exec xinput-toggle -r yubikey -n -e -t 10 bindsym $mod+Shift+f exec --no-startup-id xmodmap ~/.Xmodmap +bindsym $mod+Shift+s exec xfce4-screenshooter # 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. @@ -195,6 +196,16 @@ mode "moveworkspace" { bindsym $mod+t mode "moveworkspace" +mode "goremote" { + bindsym g exec "remmina -c ~/.local/share/remmina/1523485448993.remmina"; mode "default" + bindsym t exec "run_terminal -x ssh -p 2222 barak@rack.0b100.net"; mode "default" + bindsym p exec "run_terminal -x ssh -p 2222 barak@barakmich.com"; mode "default" + bindsym Return mode "default" + bindsym Escape mode "default" +} + +bindsym $mod+Shift+Control+r mode "goremote" + # Start i3bar to display a workspace bar (plus the system information i3status # finds out, if available) #bar { diff --git a/.vimrc b/.vimrc index dffe5b1..eb001b3 100644 --- a/.vimrc +++ b/.vimrc @@ -567,7 +567,8 @@ endfunction " I don't know how I came up with gt for opening the tree, but it stuck. "nmap gt :NERDTreeToggle -nmap gt :VimFilerExplorer -winwidth=40 -toggle -direction=rightbelow -parent -status -force-hide +"nmap gt :VimFilerExplorer -winwidth=40 -toggle -direction=rightbelow -parent -status -force-hide +nmap gt :VimFiler -status -auto-cd -parent " The same for the TagList, useful for large C files. "nmap gb :TlistToggle nmap gb :TagbarToggle diff --git a/bin/run_terminal b/bin/run_terminal index 3a5df40..9ba6097 100755 --- a/bin/run_terminal +++ b/bin/run_terminal @@ -1,11 +1,11 @@ #!/usr/bin/env bash if [ -n "`which terminator`" ]; then - terminator + terminator $@ elif [ -n "`which gnome-terminal`" ]; then - gnome-terminal + gnome-terminal $@ elif [ -n "`which urxvt`" ]; then - urxvt + urxvt $@ else - xterm + xterm $@ fi From a4d3acc92cc4ade9bac78f6cde168c3c2d994bf9 Mon Sep 17 00:00:00 2001 From: Barak Michener Date: Tue, 7 Aug 2018 14:49:43 -0700 Subject: [PATCH 06/25] mutt keybindings --- .muttrc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.muttrc b/.muttrc index c366808..799a5cc 100644 --- a/.muttrc +++ b/.muttrc @@ -24,17 +24,19 @@ set certificate_file=~/.mutt/certificates set signature=~/.sig bind editor noop +bind index,pager g noop bind index,pager c mail #Compose -macro index,pager e "=[Gmail]/All Mail" "Archive" +macro index,pager e "=[Gmail]/All Mail" "Archive" bind generic x tag-entry #Select Conversation bind index x tag-thread #Select Conversation bind pager x tag-message #Select Conversation bind index,pager s flag-message #Star a message -macro index,pager + "=[Gmail]/Important" "Mark as important" -macro index,pager ! "=[Gmail]/Spam" "Report spam" +macro index,pager + "=[Gmail]/Important" "Mark as important" +macro index,pager ! "=[Gmail]/Spam" "Report spam" bind index,pager a group-reply #Reply all bind index,pager \# delete-thread #Delete bind index,pager l copy-message #Label +bind index L limit bind index,pager v save-message #Move to macro index,pager I "O" "Mark as read" macro index,pager U "O" "Mark as unread" @@ -44,6 +46,7 @@ macro index,pager gd "=[Gmail]/Drafts" "Go to 'Drafts'" macro index,pager gl "?" "Go to 'Label'" macro index,pager gi "=INBOX" "Go to inbox" macro index,pager gt "=[Gmail]/Sent Mail" "Go to 'Sent Mail'" +macro pager B "'urlview'" 'Follow links with urlview' folder-hook +INBOX macro index,pager y "e" "Archive" folder-hook "+[Gmail]/Trash" macro index,pager y "=INBOX" "Move to inbox" folder-hook "+[Gmail]/Starred" bind index,pager y flag-message #"Toggle star" @@ -82,7 +85,7 @@ set reverse_name = yes bind index gg first-entry bind index G last-entry -bind index A toggle-read +#bind index A toggle-read bind index n mail macro index c "?" "open a different folder" From 08db411ea4f98349390583481cf55cc3fe70af62 Mon Sep 17 00:00:00 2001 From: Barak Michener Date: Thu, 9 Aug 2018 14:52:49 -0700 Subject: [PATCH 07/25] update vimrc --- .vim/autoload/plug.vim | 11 ++++++--- .vimrc | 66 +++++++++++++++++++++++++++++++------------------- 2 files changed, 49 insertions(+), 28 deletions(-) diff --git a/.vim/autoload/plug.vim b/.vim/autoload/plug.vim index 9dd02c0..52c6b2a 100644 --- a/.vim/autoload/plug.vim +++ b/.vim/autoload/plug.vim @@ -96,7 +96,7 @@ let s:plug_src = 'https://github.com/junegunn/vim-plug.git' let s:plug_tab = get(s:, 'plug_tab', -1) let s:plug_buf = get(s:, 'plug_buf', -1) let s:mac_gui = has('gui_macvim') && has('gui_running') -let s:is_win = has('win32') || has('win64') +let s:is_win = has('win32') let s:nvim = has('nvim-0.2') || (has('nvim') && exists('*jobwait') && !s:is_win) let s:vim8 = has('patch-8.0.0039') && exists('*job_start') let s:me = resolve(expand(':p')) @@ -2426,8 +2426,13 @@ function! s:diff() \ . (cnts[1] ? printf(' %d plugin(s) have pending updates.', cnts[1]) : '')) if cnts[0] || cnts[1] - nnoremap :silent! call preview_commit() - nnoremap o :silent! call preview_commit() + nnoremap (plug-preview) :silent! call preview_commit() + if empty(maparg("\", 'n')) + nmap (plug-preview) + endif + if empty(maparg('o', 'n')) + nmap o (plug-preview) + endif endif if cnts[0] nnoremap X :call revert() diff --git a/.vimrc b/.vimrc index eb001b3..45438e2 100644 --- a/.vimrc +++ b/.vimrc @@ -55,6 +55,7 @@ set completeopt=menu,menuone,longest set t_Co=256 set t_Sf=ESC[3%dm set t_Sb=ESC[4%dm +"set t_SH= "set t_kb= " This is like HiglightTooLongLines below, but for modern vim. The problem is @@ -85,7 +86,7 @@ Plug 'hsitz/VimOrganizer' Plug 'mattn/calendar-vim' Plug 'sjbach/lusty' Plug 'scrooloose/nerdcommenter' -Plug 'scrooloose/nerdtree' +"Plug 'scrooloose/nerdtree' Plug 'rstacruz/sparkup' "Plug 'scrooloose/syntastic' Plug 'w0rp/ale' @@ -103,7 +104,9 @@ Plug 'b4winckler/vim-angry' Plug 'tristen/vim-sparkup' Plug 'vim-airline/vim-airline' Plug 'vim-airline/vim-airline-themes' -Plug 'kien/ctrlp.vim' +"Plug 'kien/ctrlp.vim' +Plug 'junegunn/fzf' +Plug 'junegunn/fzf.vim' Plug 'bling/vim-bufferline' Plug 'majutsushi/tagbar' Plug 'eagletmt/neco-ghc', {'for': 'haskell'} @@ -118,7 +121,7 @@ Plug 'tpope/vim-surround' Plug 'fatih/vim-go' "Plug 't-yuki/vim-go-coverlay' Plug 'tpope/vim-abolish' -Plug 'hylang/vim-hy' +Plug 'hylang/vim-hy', {'for': 'hy'} Plug 'jiangmiao/auto-pairs' Plug 'racer-rust/vim-racer', {'for': 'rust'} Plug 'let-def/vimbufsync' @@ -131,6 +134,7 @@ Plug 'Shougo/context_filetype.vim' Plug 'sheerun/vim-polyglot' Plug 'Shougo/denite.nvim' +Plug 'plytophogy/vim-virtualenv' "Plug 'vim-scripts/fish-syntax' "Plug 'kchmck/vim-coffee-script' "Plug 'rodjek/vim-puppet' @@ -140,7 +144,7 @@ Plug 'Shougo/denite.nvim' "Plug 'HerringtonDarkholme/yats.vim' Plug 'tpope/vim-fireplace' Plug 'junegunn/vim-easy-align' -Plug 'idris-hackers/idris-vim' +Plug 'idris-hackers/idris-vim', {'for': 'idris'} Plug 'autozimu/LanguageClient-neovim', { \ 'branch': 'next', \ 'do': 'bash install.sh', @@ -207,7 +211,7 @@ setlocal cursorline " " Change the source rank call deoplete#custom#option('sources', { - \ 'python': ['LanguageClient'], + \ 'python': ['LanguageClient', 'jedi'], \}) call deoplete#custom#source('buffer', 'rank', 1) let g:deoplete#sources#clang#libclang_path = '/usr/lib/llvm-6.0/lib/libclang.so' @@ -323,6 +327,16 @@ let g:UltiSnipsJumpBackwardTrigger="" let g:CommandTMaxFiles = 1000 let g:CommandTMaxDepth = 7 +" * FZF +let g:rg_command = ' + \ rg --column --line-number --no-heading --fixed-strings --ignore-case --no-ignore --hidden --follow --color "always" + \ -g "*.{js,json,php,md,styl,jade,html,config,py,cpp,c,go,hs,rb,conf}" + \ -g "!{.git,node_modules,vendor}/*" ' + +command! -bang -nargs=* RipGrep call fzf#vim#grep(g:rg_command .shellescape(), 1, 0) + +let g:fzf_buffers_jump = 1 + " * VimOrganizer " default Tag list. Will be changed in near future so " that these are defined by config lines in each .org @@ -551,7 +565,6 @@ function AutoTrimWhitespace() endif endfunction - function InstallEverything() GoUpdateBinaries BlackUpgrade @@ -568,7 +581,7 @@ endfunction " I don't know how I came up with gt for opening the tree, but it stuck. "nmap gt :NERDTreeToggle "nmap gt :VimFilerExplorer -winwidth=40 -toggle -direction=rightbelow -parent -status -force-hide -nmap gt :VimFiler -status -auto-cd -parent +nmap gt :VimFiler -status -auto-cd -parent -force-quit " The same for the TagList, useful for large C files. "nmap gb :TlistToggle nmap gb :TagbarToggle @@ -615,24 +628,24 @@ inoremap $ " Dealing with split windows is a pain. Make it less of a pain, by making " Ctrl-direction appropriate. -nnoremap j -nnoremap k -nnoremap l -nnoremap h -"nnoremap w -"nnoremap W -inoremap j -inoremap k -inoremap l -inoremap h +"nnoremap j +"nnoremap k +"nnoremap l +"nnoremap h +""nnoremap w +""nnoremap W +"inoremap j +"inoremap k +"inoremap l +"inoremap h -if has('nvim') - tnoremap - tnoremap j - tnoremap k - tnoremap l - tnoremap h -endif +"if has('nvim') + "tnoremap + "tnoremap j + "tnoremap k + "tnoremap l + "tnoremap h +"endif " Better fold mappings nnoremap @=(foldlevel('.')?'za':'l') @@ -651,7 +664,7 @@ nnoremap ss :SyntasticSetLoclist nnoremap fn :lnext " Prev quickfix. nnoremap fp :lprev -nnoremap aa :Denite -mode=normal -buffer-name=search-buffer grep +"nnoremap aa :Denite -mode=normal -buffer-name=search-buffer grep nnoremap ac :Denite -resume -mode=normal -buffer-name=search-buffer nnoremap aw :DeniteCursorWord -mode=normal -buffer-name=search-buffer grep call denite#custom#map('insert', '', '') @@ -664,6 +677,9 @@ call denite#custom#var('grep', 'separator', ['--']) call denite#custom#var('grep', 'final_opts', []) call denite#custom#option('search-buffer', 'highlight_matched_char', 'deniteMatchedChar') nnoremap g :Denite -buffer-name=search-buffer grep +nnoremap aa :RipGrep! +nnoremap :Files! `git rev-parse --show-toplevel` +nnoremap :Buffers " For C++ -- A is a great plugin which allows you to jump from the c file to the " header and vice-versa. Mneumonic here is headerheader. nnoremap hh :A From 297f126215dd04383c1c6975f6fe6ef721e95759 Mon Sep 17 00:00:00 2001 From: Barak Michener Date: Thu, 9 Aug 2018 14:53:43 -0700 Subject: [PATCH 08/25] reindent zshrc --- .zshrc | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/.zshrc b/.zshrc index b671463..40a7b6a 100644 --- a/.zshrc +++ b/.zshrc @@ -23,7 +23,7 @@ bindkey -e #ZLS_COLORS=$LS_COLORS -export DISTCC_HOSTS='hyades01 hyades02 hyades03 hyades04' +#export DISTCC_HOSTS='hyades01 hyades02 hyades03 hyades04' #if [[ "$GOROOT" == "" ]]; then #export GOROOT=$HOME/local/go #export GOARCH=amd64 @@ -39,22 +39,22 @@ export DISTCC_HOSTS='hyades01 hyades02 hyades03 hyades04' #fi - setopt prompt_subst +setopt prompt_subst - ### - # See if we can use colors. +### +# See if we can use colors. - autoload colors zsh/terminfo - if [[ "$terminfo[colors]" -ge 8 ]]; then - colors - fi - for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE; do - eval PR_LIGHT_$color='%{$terminfo[bold]$fg[${(L)color}]%}' - eval PR_$color='%{$fg[${(L)color}]%}' - (( count = $count + 1 )) - done - PR_NO_COLOUR="%{$terminfo[sgr0]%}" +autoload colors zsh/terminfo +if [[ "$terminfo[colors]" -ge 8 ]]; then + colors +fi +for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE; do + eval PR_LIGHT_$color='%{$terminfo[bold]$fg[${(L)color}]%}' + eval PR_$color='%{$fg[${(L)color}]%}' + (( count = $count + 1 )) +done +PR_NO_COLOUR="%{$terminfo[sgr0]%}" ### # Decide whether to set a screen title @@ -92,6 +92,12 @@ fasd_cache="$HOME/.fasd-init-zsh" if [ "$(command -v fasd)" -nt "$fasd_cache" -o ! -s "$fasd_cache" ]; then fasd --init posix-alias zsh-hook zsh-ccomp zsh-ccomp-install zsh-wcomp zsh-wcompinstall >| "$fasd_cache" fi + +[ -f ~/.fzf.bash ] && source ~/.fzf.bash +export FZF_DEFAULT_COMMAND='rg --files --no-ignore --hidden --follow -g "!{.git,node_modules}/*" 2> /dev/null' +export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND" +#bind -x '"\C-p": vim $(fzf);' + source "$fasd_cache" unset fasd_cache From 992577be97db1b579384c2ac1e6028f7dd987287 Mon Sep 17 00:00:00 2001 From: Barak Michener Date: Fri, 10 Aug 2018 13:33:41 -0700 Subject: [PATCH 09/25] update mutt and mailcap --- .mailcap | 3 +++ .muttrc | 23 +++++++++++++++++++---- 2 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 .mailcap diff --git a/.mailcap b/.mailcap new file mode 100644 index 0000000..3ba639f --- /dev/null +++ b/.mailcap @@ -0,0 +1,3 @@ +text/html; w3m -I %{charset} -T text/html -cols 150; copiousoutput; +#text/html; pandoc -f html -t markdown; copiousoutput; + diff --git a/.muttrc b/.muttrc index 799a5cc..f449640 100644 --- a/.muttrc +++ b/.muttrc @@ -1,15 +1,17 @@ -set imap_user = "barak@barakmich.com" +set imap_user = "bmichener@lyft.com" #set imap_pass = "secret" +source ~/.mutt/secret -set smtp_url = "smtp://barak@barakmich.com@smtp.gmail.com:587/" +set smtp_url = "smtp://bmichener@lyft.com@smtp.gmail.com:587/" #set smtp_pass = "secret" -set from = "me@barakmich.com" +set from = "barakmich@lyft.com" set realname = "Barak Michener" set folder = "imaps://imap.gmail.com:993" set spoolfile = "+INBOX" set postponed = "+[Gmail]/Drafts" set record="+[Gmail]/Sent Mail" +set copy=no set trash = "imaps://imap.gmail.com/[Gmail]/Trash" # These two lines appear to be needed on some Linux distros, like Arch Linux @@ -34,6 +36,7 @@ bind index,pager s flag-message #Star a message macro index,pager + "=[Gmail]/Important" "Mark as important" macro index,pager ! "=[Gmail]/Spam" "Report spam" bind index,pager a group-reply #Reply all +bind pager A view-attachments #In emails bind index,pager \# delete-thread #Delete bind index,pager l copy-message #Label bind index L limit @@ -72,7 +75,7 @@ set beep_new set sort = reverse-threads set sort_aux = last-date-received -alternative_order text/plain text/html +alternative_order text/plain text/enriched text/html auto_view text/html #set alias_file = ~/.mutt/aliases @@ -87,6 +90,8 @@ bind index gg first-entry bind index G last-entry #bind index A toggle-read bind index n mail +bind index _ collapse-all +bind index - collapse-thread macro index c "?" "open a different folder" macro pager c "?" "open a different folder" @@ -116,3 +121,13 @@ color header brightblue black ^Subject: color body brightred black [\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+ color body brightblue black (https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+ color index brightcyan default ~N + +color index yellow default "~v~(!~N)~(!~F)" # collapsed thread with no New or Flagged +color index red default "~v~(~F)~(!~N)" # collapsed thread with Flagged but no New +color index green default "~v~(~N)" # collapsed thread with New + +folder-hook . exec collapse-all +## TO show the number of messages in a collapsed thread +## you need to add "%M" to the "index_format", eg: +#set index_format="%4C %Z %2M %[!%y%m%d] %-17.17F (%3l) %s" +set index_format="%4C %Z %2M %{%b %d} %-15.15L (%?l?%4l&%4c?) %s" From f784422c1bc4fd9162db9a9028ec71d09a8ebdbf Mon Sep 17 00:00:00 2001 From: Barak Michener Date: Thu, 9 Aug 2018 22:47:57 -0700 Subject: [PATCH 10/25] tmux from 1 --- .tmux.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.tmux.conf b/.tmux.conf index 28d15df..606e899 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -1,5 +1,9 @@ set -g prefix C-a unbind C-b + +set -g base-index 1 +setw -g pane-base-index 1 + bind-key C-o last-window bind-key C-a select-pane -t :.+ bind-key a send-prefix @@ -39,3 +43,4 @@ set -g visual-activity on # Highlighting the active window in status bar setw -g window-status-current-bg red + From f889fc1903e8c115b68e1bef3fd3a3176ed045ba Mon Sep 17 00:00:00 2001 From: Barak Michener Date: Tue, 21 Aug 2018 11:17:08 -0700 Subject: [PATCH 11/25] update portia --- .config/terminator/config | 4 +- .config/xfce4/panel/genmon-13.rc | 6 -- .config/xfce4/panel/whiskermenu-1.rc | 68 ---------------------- .../xfce4/xfconf/xfce-perchannel-xml/displays.xml | 2 +- .../xfconf/xfce-perchannel-xml/xfce4-notifyd.xml | 4 ++ .../xfconf/xfce-perchannel-xml/xfce4-panel.xml | 19 +----- .../xfce-perchannel-xml/xfce4-power-manager.xml | 2 +- .config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml | 2 +- .local/share/remmina/1523485448993.remmina | 4 +- .tmux.conf | 26 +++++++-- .vimrc | 2 + 11 files changed, 36 insertions(+), 103 deletions(-) delete mode 100644 .config/xfce4/panel/genmon-13.rc delete mode 100644 .config/xfce4/panel/whiskermenu-1.rc diff --git a/.config/terminator/config b/.config/terminator/config index fea66b3..8e0bb98 100644 --- a/.config/terminator/config +++ b/.config/terminator/config @@ -7,8 +7,8 @@ title_transmit_bg_color = "#535d6c" [keybindings] close_term = w - cycle_next = j - cycle_prev = k + cycle_next = None + cycle_prev = None paste = Insert split_vert = v [layouts] diff --git a/.config/xfce4/panel/genmon-13.rc b/.config/xfce4/panel/genmon-13.rc deleted file mode 100644 index bd3cdb9..0000000 --- a/.config/xfce4/panel/genmon-13.rc +++ /dev/null @@ -1,6 +0,0 @@ -Command=hostname -s -UseLabel=0 -Text=hostname -UpdatePeriod=60000 -Font=Sans Bold 16 - diff --git a/.config/xfce4/panel/whiskermenu-1.rc b/.config/xfce4/panel/whiskermenu-1.rc deleted file mode 100644 index 734515c..0000000 --- a/.config/xfce4/panel/whiskermenu-1.rc +++ /dev/null @@ -1,68 +0,0 @@ -favorites=exo-web-browser.desktop,exo-mail-reader.desktop,exo-file-manager.desktop,libreoffice-writer.desktop,libreoffice-calc.desktop,pidgin.desktop,org.gnome.Software.desktop,exo-terminal-emulator.desktop -recent=xfce-session-settings.desktop,xfce-keyboard-settings.desktop,xfce-ui-settings.desktop,firefox.desktop,exo-terminal-emulator.desktop,lightdm-gtk-greeter-settings.desktop -button-title=Applications Menu -button-icon=xfce4-whiskermenu -button-single-row=false -show-button-title=false -show-button-icon=true -launcher-show-name=true -launcher-show-description=false -launcher-show-tooltip=true -item-icon-size=1 -hover-switch-category=false -category-show-name=true -category-icon-size=0 -load-hierarchy=true -recent-items-max=10 -favorites-in-recent=true -display-recent-default=false -position-search-alternate=true -position-commands-alternate=false -position-categories-alternate=false -menu-width=400 -menu-height=500 -menu-opacity=100 -command-settings=xfce4-settings-manager -show-command-settings=true -command-lockscreen=xflock4 -show-command-lockscreen=true -command-switchuser=dm-tool switch-to-greeter -show-command-switchuser=false -command-logout=xfce4-session-logout -show-command-logout=true -command-menueditor=menulibre -show-command-menueditor=true -command-profile=mugshot -show-command-profile=true -search-actions=5 - -[action0] -name=Man Pages -pattern=# -command=exo-open --launch TerminalEmulator man %s -regex=false - -[action1] -name=Web Search -pattern=? -command=exo-open --launch WebBrowser https://duckduckgo.com/?q=%u -regex=false - -[action2] -name=Wikipedia -pattern=!w -command=exo-open --launch WebBrowser https://en.wikipedia.org/wiki/%u -regex=false - -[action3] -name=Run in Terminal -pattern=! -command=exo-open --launch TerminalEmulator %s -regex=false - -[action4] -name=Open URI -pattern=^(file|http|https):\\/\\/(.*)$ -command=exo-open \\0 -regex=true - diff --git a/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml b/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml index 1f46710..26ea308 100644 --- a/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml +++ b/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml @@ -3,7 +3,7 @@ - + diff --git a/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-notifyd.xml b/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-notifyd.xml index af38a9f..ff63241 100644 --- a/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-notifyd.xml +++ b/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-notifyd.xml @@ -6,11 +6,15 @@ + + + + diff --git a/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml b/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml index fc5dbfc..9c92c61 100644 --- a/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml +++ b/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml @@ -7,15 +7,11 @@ - - + - - - @@ -31,7 +27,6 @@ - @@ -47,9 +42,9 @@ + - @@ -71,14 +66,6 @@ - - - - - - - - @@ -87,7 +74,7 @@ - + diff --git a/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-power-manager.xml b/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-power-manager.xml index 94a423a..71530e7 100644 --- a/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-power-manager.xml +++ b/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-power-manager.xml @@ -13,7 +13,7 @@ - + diff --git a/.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml b/.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml index e0b54bd..223b052 100644 --- a/.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml +++ b/.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml @@ -48,7 +48,7 @@ - + diff --git a/.local/share/remmina/1523485448993.remmina b/.local/share/remmina/1523485448993.remmina index 23be4c0..f3e84cf 100644 --- a/.local/share/remmina/1523485448993.remmina +++ b/.local/share/remmina/1523485448993.remmina @@ -39,9 +39,9 @@ shareprinter=0 gateway_domain= disableclipboard=0 ssh_privatekey= -last_success=20180629 +last_success=20180809 window_maximize=0 window_height=1411 window_width=1276 viewmode=4 -keyboard_grab=0 +keyboard_grab=1 diff --git a/.tmux.conf b/.tmux.conf index 606e899..a4f192a 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -30,17 +30,31 @@ bind | split-window -h bind - split-window -v # Status Bar -set -g status-bg black +#set -g status-bg black set -g status-fg white set -g status-interval 1 -set -g status-left '#[fg=green]#H#[default]' -set -g status-left-length 20 -set -g status-right '#[fg=green]#(~/src/tpom/tpom) #[fg=cyan,bold]%Y-%m-%d %H:%M:%S#[default]' +#set -g status-left '#[fg=green]#H#[default]' +#set -g status-left-length 20 +#set -g status-right '#[fg=green]#(~/src/tpom/tpom) #[fg=cyan,bold]%Y-%m-%d %H:%M:%S#[default]' +set -g status-justify centre # center align window list +set -g status-fg white +set -g status-bg default + +# default window title colors +set-window-option -g window-status-fg white +set-window-option -g window-status-bg default +set-window-option -g window-status-attr dim + +# active window title colors +set-window-option -g window-status-current-fg cyan +set-window-option -g window-status-current-bg default +set-window-option -g window-status-current-attr bright +set -g status-left '#[fg=green][ #H ][ ' +set -g status-right '#[fg=green]][ #[fg=blue]%Y-%m-%d #[fg=white]%I:%M #[fg=green]]' # Notifying if other windows has activities setw -g monitor-activity on set -g visual-activity on # Highlighting the active window in status bar -setw -g window-status-current-bg red - +#setw -g window-status-current-bg red diff --git a/.vimrc b/.vimrc index 45438e2..22fde15 100644 --- a/.vimrc +++ b/.vimrc @@ -151,6 +151,8 @@ Plug 'autozimu/LanguageClient-neovim', { \ } Plug 'ambv/black' +Plug 'kana/vim-textobj-user' +Plug 'bps/vim-textobj-python' call plug#end() From 5115a6f7f88d2fb2a38c1608b5bb6825faf376e7 Mon Sep 17 00:00:00 2001 From: Barak Michener Date: Tue, 21 Aug 2018 11:17:44 -0700 Subject: [PATCH 12/25] add tunnel program and zotero hookup --- bin/run_zotero | 3 +++ bin/tunnelwrap | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100755 bin/run_zotero create mode 100755 bin/tunnelwrap diff --git a/bin/run_zotero b/bin/run_zotero new file mode 100755 index 0000000..55c0630 --- /dev/null +++ b/bin/run_zotero @@ -0,0 +1,3 @@ +#!/bin/bash + +tunnelwrap -i "$HOME/.ssh/id_ed25519" -p 2222 8082:docdav.dav.svc.k8s.barakmich.com:80 barak@barakmich.com "$HOME/local/Zotero_linux-x86_64/zotero" diff --git a/bin/tunnelwrap b/bin/tunnelwrap new file mode 100755 index 0000000..c2b2238 --- /dev/null +++ b/bin/tunnelwrap @@ -0,0 +1,50 @@ +#!/bin/bash +set -e + +USAGE="Usage: $0 [-p port] " + +if [ $# -lt 2 ]; then + echo "$USAGE" + exit 1 +fi + +OPTIND=1 +PORT="" +KEYFILE="" + +while getopts "h?p:i:" opt; do + case "$opt" in + h|\?) + echo "$USAGE" + exit 1 + ;; + p) PORT=$OPTARG + ;; + i) KEYFILE=$OPTARG + ;; + esac +done + +shift $((OPTIND-1)) + +[ "${1:-}" = "--" ] && shift + +SSH_OPTS="" + +if [ -n "$PORT" ]; then + SSH_OPTS="${SSH_OPTS} -p ${PORT}" +fi + +if [ -n "$KEYFILE" ]; then + SSH_OPTS="${SSH_OPTS} -i ${KEYFILE}" +fi + +CONTROLFILE="/tmp/tunnelwrap.$RANDOM" +PORTFORWARD="$1" +shift +HOSTCONNECTION="$1" +shift + +ssh -M -S $CONTROLFILE -fnNT -L $PORTFORWARD $SSH_OPTS $HOSTCONNECTION +"$@" +ssh -S $CONTROLFILE -O exit $HOSTCONNECTION From b1f0fba89a181e3ba33677c1a5910a047f130862 Mon Sep 17 00:00:00 2001 From: Barak Michener Date: Thu, 13 Sep 2018 16:45:12 -0700 Subject: [PATCH 13/25] add gblame --- bin/gblame | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100755 bin/gblame diff --git a/bin/gblame b/bin/gblame new file mode 100755 index 0000000..be49356 --- /dev/null +++ b/bin/gblame @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 + +import subprocess +import sys +import os + +from typing import List, Dict, Any + +DataLine = Dict[Any, Any] + + +def grab_blame_data() -> List[DataLine]: + p = subprocess.check_output( + ["git", "blame", "--line-porcelain"] + sys.argv[1:], + encoding='utf-8', + ) + data = [] + cur = {} + p = str(p) + in_segment = False + for line in p.splitlines(): + l = line.rstrip() + if len(l) == 0: + continue + if l[0] == '\t': + cur["data"] = l[1:] + data.append(cur) + cur = {} + in_segment = False + continue + d = l.split() + if not in_segment: + cur["sha"] = d[0] + cur["sha8"] = d[0][:8] + in_segment = True + else: + cur[d[0]] = " ".join(d[1:]) + + assert in_segment is False + return data + + +FIELDS = ["sha8", "author", "summary", "data"] + + +def main() -> None: + d = grab_blame_data() + lens = {} + for f in FIELDS: + maxn = 0 + for x in d: + if len(x[f]) > maxn: + maxn = len(x[f]) + lens[f] = maxn + for x in d: + s = "" + for f in FIELDS: + s = s + x[f].ljust(lens[f]) + ' ' + print(s) + + +if __name__ == "__main__": + main() From 9a13fa283d391eb77485409aa2a58cf5673efdd8 Mon Sep 17 00:00:00 2001 From: Barak Michener Date: Tue, 29 Jan 2019 16:02:37 -0800 Subject: [PATCH 14/25] misc work fixes --- .../xfce4/xfconf/xfce-perchannel-xml/displays.xml | 50 ++++++++--------- .../xfce4/xfconf/xfce-perchannel-xml/thunar.xml | 5 +- .../xfconf/xfce-perchannel-xml/xfce4-desktop.xml | 65 ++++++++++++++++++++++ .../xfconf/xfce-perchannel-xml/xfce4-panel.xml | 10 +++- .config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml | 6 +- .../xfce4/xfconf/xfce-perchannel-xml/xsettings.xml | 2 +- .gitconfig | 2 + .i3/config | 5 +- .mailcap | 2 +- .vimrc | 19 +++++-- .zshrc | 2 + 11 files changed, 131 insertions(+), 37 deletions(-) diff --git a/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml b/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml index 26ea308..1c2e786 100644 --- a/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml +++ b/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml @@ -2,41 +2,41 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/.config/xfce4/xfconf/xfce-perchannel-xml/thunar.xml b/.config/xfce4/xfconf/xfce-perchannel-xml/thunar.xml index 9db6b09..ebaedc9 100644 --- a/.config/xfce4/xfconf/xfce-perchannel-xml/thunar.xml +++ b/.config/xfce4/xfconf/xfce-perchannel-xml/thunar.xml @@ -5,7 +5,8 @@ - - + + + diff --git a/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml b/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml index d062b36..c5924c0 100644 --- a/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml +++ b/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml @@ -23,11 +23,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml b/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml index 9c92c61..df6278c 100644 --- a/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml +++ b/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml @@ -10,6 +10,7 @@ + @@ -40,6 +41,7 @@ + @@ -73,8 +75,14 @@ - + + + + + + + diff --git a/.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml b/.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml index 223b052..9c98f52 100644 --- a/.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml +++ b/.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml @@ -48,7 +48,7 @@ - + @@ -59,6 +59,10 @@ + + + + diff --git a/.config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml b/.config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml index 9049b38..b4ace6d 100644 --- a/.config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml +++ b/.config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml @@ -3,7 +3,7 @@ - + diff --git a/.gitconfig b/.gitconfig index 34c6993..ad0f0b1 100644 --- a/.gitconfig +++ b/.gitconfig @@ -16,6 +16,8 @@ ours = "!f() { git checkout --ours $@ && git add $@; }; f" theirs = "!f() { git checkout --theirs $@ && git add $@; }; f" praise = blame + blame = "gblame" + reabsorb = rebase -i --autosquash [diff] renamelimit = 0 diff --git a/.i3/config b/.i3/config index 8c3cb96..7c482e0 100644 --- a/.i3/config +++ b/.i3/config @@ -15,7 +15,7 @@ set $mod Mod1 # is used in the bar {} block below. # This font is widely installed, provides lots of unicode glyphs, right-to-left # text rendering and scalability on retina/hidpi displays (thanks to pango). -font pango:DejaVu Sans Mono 13 +font pango:Droid Sans Mono 11 # Before i3 v4.8, we used to recommend this one as the default: # font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1 # The font above is very space-efficient, that is, it looks good, sharp and @@ -95,6 +95,8 @@ bindsym $mod+v split h # enter fullscreen mode for the focused container bindsym $mod+f fullscreen +bindsym $mod+b fullscreen toggle global + # change container layout (stacked, tabbed, toggle split) bindsym $mod+s layout stacking @@ -195,6 +197,7 @@ mode "moveworkspace" { } bindsym $mod+t mode "moveworkspace" +bindsym $mod+y move workspace to output left mode "goremote" { bindsym g exec "remmina -c ~/.local/share/remmina/1523485448993.remmina"; mode "default" diff --git a/.mailcap b/.mailcap index 3ba639f..fe3a855 100644 --- a/.mailcap +++ b/.mailcap @@ -1,3 +1,3 @@ -text/html; w3m -I %{charset} -T text/html -cols 150; copiousoutput; +text/html; w3m -I %{charset} -T text/html -cols 150 -o display_link_number=1; copiousoutput; #text/html; pandoc -f html -t markdown; copiousoutput; diff --git a/.vimrc b/.vimrc index 22fde15..5990542 100644 --- a/.vimrc +++ b/.vimrc @@ -100,6 +100,7 @@ Plug 'Shougo/deoplete.nvim' Plug 'zchee/deoplete-clang' Plug 'zchee/deoplete-go', {'build': {'unix': 'make'}} Plug 'zchee/deoplete-jedi' +Plug 'davidhalter/jedi-vim' Plug 'b4winckler/vim-angry' Plug 'tristen/vim-sparkup' Plug 'vim-airline/vim-airline' @@ -153,6 +154,7 @@ Plug 'autozimu/LanguageClient-neovim', { Plug 'ambv/black' Plug 'kana/vim-textobj-user' Plug 'bps/vim-textobj-python' +Plug 'dhruvasagar/vim-zoom' call plug#end() @@ -225,6 +227,9 @@ let g:Tb_MaxSize=0 let g:Tb_MapCTabSwitchBufs = 1 let g:UseGooglePythonSettings = 0 +" * Jedi +let g:jedi#goto_command="gd" + " * Eclim let g:EclimCompletionMethod = 'omnifunc' @@ -242,9 +247,9 @@ let g:airline#extensions#ale#enabled = 1 let g:ale_set_highlights = 0 " * LanguageServer -let g:LanguageClient_serverCommands = { - \ 'python': ['pyls'], - \ } +"let g:LanguageClient_serverCommands = { + "\ 'python': ['pyls'], + "\ } let g:LanguageClient_diagnosticsDisplay = { \1: {'name': 'Error', 'texthl': 'ALEError', 'signText': 'E>', 'signTexthl': 'ALEErrorSign',}, \2: {"name": "Warning", "texthl": "ALEWarning", "signText": "W>", "signTexthl": "ALEWarningSign",}, @@ -383,7 +388,7 @@ let g:ctrlp_match_window = 'bottom,order:ttb,min:1,max:15' " * Vim-Go let g:go_fmt_command = "goimports" -let g:go_auto_type_info = 1 +"let g:go_auto_type_info = 1 let g:go_updatetime = 300 "let g:go_bin_path = "$HOME/.go/bin" @@ -403,6 +408,7 @@ set statusline+=%{fugitive#statusline()}\ \ set statusline+=%c, "cursor column set statusline+=%l/%L "cursor line/total lines set statusline+=\ %P "percent through file +set statusline+=%{zoom#statusline()}\ " ** SMALL FUNCTIONS THAT DON'T FIT AS PLUGINS *** @@ -607,7 +613,7 @@ nmap P op " Line-based movement is cute, but it's tricky for files with lines that wrap. " Attune more to what you see on the screen instead of where the lines actually " are. -nnoremap j gj +nnoremap j gj nnoremap k gk xnoremap j gj xnoremap k gk @@ -649,6 +655,9 @@ inoremap $ "tnoremap h "endif +" Make it easier to clear highlighting, with no functionality penalty +nnoremap :noh + " Better fold mappings nnoremap @=(foldlevel('.')?'za':'l') vnoremap zf diff --git a/.zshrc b/.zshrc index 40a7b6a..3e4d2a0 100644 --- a/.zshrc +++ b/.zshrc @@ -131,3 +131,5 @@ if [ -f '/home/barak/local/google-cloud-sdk/path.zsh.inc' ]; then source '/home/ # The next line enables shell command completion for gcloud. if [ -f '/home/barak/local/google-cloud-sdk/completion.zsh.inc' ]; then source '/home/barak/local/google-cloud-sdk/completion.zsh.inc'; fi + +if [ -f "$HOME/.zshrc_work" ]; then source "$HOME/.zshrc_work"; fi From 52f28e2d1b6f8433254b1564f183ed2c2b7ad45c Mon Sep 17 00:00:00 2001 From: Barak Michener Date: Mon, 4 Feb 2019 15:56:13 -0800 Subject: [PATCH 15/25] add tig config --- .config/tig/config | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 .config/tig/config diff --git a/.config/tig/config b/.config/tig/config new file mode 100644 index 0000000..f9a345a --- /dev/null +++ b/.config/tig/config @@ -0,0 +1,76 @@ +# Vim-style keybindings for Tig +# +# To use these keybindings copy the file to your HOME directory and include +# it from your ~/.tigrc file: +# +# $ cp contrib/vim.tigrc ~/.tigrc.vim +# $ echo "source ~/.tigrc.vim" >> ~/.tigrc + +bind generic h scroll-left +bind generic j move-down +bind generic k move-up +bind generic l scroll-right + +bind generic g none +bind generic gg move-first-line +bind generic gj next +bind generic gk previous +bind generic gp parent +bind generic gP back +bind generic gn view-next + +bind main G move-last-line +bind generic G move-last-line + +bind generic move-page-down +bind generic move-page-up + +bind generic v none +bind generic vm view-main +bind generic vd view-diff +bind generic vl view-log +bind generic vt view-tree +bind generic vb view-blob +bind generic vx view-blame +bind generic vr view-refs +bind generic vs view-status +bind generic vu view-stage +bind generic vy view-stash +bind generic vg view-grep +bind generic vp view-pager +bind generic vh view-help + +bind generic o none +bind generic oo :toggle sort-order +bind generic os :toggle sort-field +bind generic on :toggle line-number +bind generic od :toggle date +bind generic oa :toggle author +bind generic og :toggle line-graphics +bind generic of :toggle file-name +bind generic op :toggle ignore-space +bind generic oi :toggle id +bind generic ot :toggle commit-title-overflow +bind generic oF :toggle file-filter +bind generic or :toggle commit-title-refs + +bind generic @ none +bind generic @j :/^@@ +bind generic @k :?^@@ +bind generic @- :toggle diff-context -1 +bind generic @+ :toggle diff-context +1 + +bind status u none +bind stage u none +bind generic uu status-update +bind generic ur status-revert +bind generic um status-merge +bind generic ul stage-update-line +bind generic us stage-split-chunk + +bind generic c none +bind generic cc !git commit +bind generic ca !?@git commit --amend --no-edit + +bind generic K view-help +bind generic view-next From 0b64b1cbe2a20e2f0f798dc2c083f4c8e31b22ed Mon Sep 17 00:00:00 2001 From: Barak Michener Date: Mon, 1 Apr 2019 11:05:32 -0700 Subject: [PATCH 16/25] Institude Filepath, veonim, and git-diff3-style --- .gitconfig | 4 ++++ .vimrc | 13 +++++++++++++ 2 files changed, 17 insertions(+) diff --git a/.gitconfig b/.gitconfig index ad0f0b1..746419b 100644 --- a/.gitconfig +++ b/.gitconfig @@ -22,6 +22,9 @@ [diff] renamelimit = 0 +[merge] + conflictstyle = diff3 + [color] diff = auto interactive = auto @@ -36,5 +39,6 @@ default = current [rerere] enabled = true + [url "git@github.com:"] insteadOf = https://github.com/ diff --git a/.vimrc b/.vimrc index 5990542..dbfbd20 100644 --- a/.vimrc +++ b/.vimrc @@ -70,6 +70,16 @@ set t_Sb=ESC[4%dm let $RUST_SRC_PATH="/usr/src/rust/src/" "let g:ft_ignore_pat = '.org' +" + +if exists('veonim') + let g:vscode_extensions = [ + \'ms-python.python', + \'ms-vscode.go', + \] + set guifont=Droid\ Sans\ Mono\ Dotted:h20 +" set linespace=10 +endif " Required: set runtimepath+=/home/bmichener/.vim/bundle/repos/github.com/Shougo/dein.vim @@ -420,6 +430,9 @@ endif " CD to the path of the file I'm editing. command Cdf :cd %:p:h +" Print path of file +command Filepath :echo expand('%:p') + " Save a vim session! Useful if you want to save buffer states and so on command SaveSession :mksession! ~/.vim_last_session command LoadSession :source ~/.vim_last_session From 144e32baf930f63b28b44b0016136a67397d9785 Mon Sep 17 00:00:00 2001 From: Barak Michener Date: Sun, 19 May 2019 22:16:35 -0700 Subject: [PATCH 17/25] markdown and scala --- .../xfce4/xfconf/xfce-perchannel-xml/displays.xml | 27 +++++++++++----------- .../xfconf/xfce-perchannel-xml/xfce4-notifyd.xml | 1 + .../xfconf/xfce-perchannel-xml/xfce4-panel.xml | 2 +- .local/share/fonts | 2 +- .local/share/remmina/1523485448993.remmina | 6 ++--- .tmux.conf | 1 + .vimrc | 14 +++++++++++ 7 files changed, 35 insertions(+), 18 deletions(-) diff --git a/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml b/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml index 1c2e786..31f0a20 100644 --- a/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml +++ b/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml @@ -14,19 +14,7 @@ - - - - - - - - - - - - - + @@ -38,5 +26,18 @@ + + + + + + + + + + + + + diff --git a/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-notifyd.xml b/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-notifyd.xml index ff63241..bc82c0c 100644 --- a/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-notifyd.xml +++ b/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-notifyd.xml @@ -13,6 +13,7 @@ + diff --git a/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml b/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml index df6278c..d4546b0 100644 --- a/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml +++ b/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml @@ -81,7 +81,7 @@ - + diff --git a/.local/share/fonts b/.local/share/fonts index fe8ce3a..d353033 120000 --- a/.local/share/fonts +++ b/.local/share/fonts @@ -1 +1 @@ -/home/barak/.fonts \ No newline at end of file +/home/bmichener/.fonts \ No newline at end of file diff --git a/.local/share/remmina/1523485448993.remmina b/.local/share/remmina/1523485448993.remmina index f3e84cf..8d4bbef 100644 --- a/.local/share/remmina/1523485448993.remmina +++ b/.local/share/remmina/1523485448993.remmina @@ -8,7 +8,7 @@ ssh_enabled=1 exec= clientname= loadbalanceinfo= -server=127.0.0.1 +server=10.42.1.8 colordepth=64 ssh_auth=3 postcommand= @@ -33,13 +33,13 @@ security= domain= disablepasswordstoring=0 precommand= -ssh_server=ganymede.fmt.0b100.net:2222 +ssh_server=barakmich.com:2222 protocol=RDP shareprinter=0 gateway_domain= disableclipboard=0 ssh_privatekey= -last_success=20180809 +last_success=20190426 window_maximize=0 window_height=1411 window_width=1276 diff --git a/.tmux.conf b/.tmux.conf index a4f192a..9d4871c 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -14,6 +14,7 @@ bind-key l select-pane -R bind-key C-n next-window bind-key C-p previous-window set -g set-titles off +set -g mouse on set -g default-terminal xterm-256color setw -g mode-keys vi new -d diff --git a/.vimrc b/.vimrc index dbfbd20..7649925 100644 --- a/.vimrc +++ b/.vimrc @@ -166,6 +166,10 @@ Plug 'kana/vim-textobj-user' Plug 'bps/vim-textobj-python' Plug 'dhruvasagar/vim-zoom' +Plug 'derekwyatt/vim-scala' +Plug 'ensime/ensime-vim', { 'do': ':UpdateRemotePlugins' } +Plug 'gabrielelana/vim-markdown' + call plug#end() @@ -231,6 +235,10 @@ call deoplete#custom#source('buffer', 'rank', 1) let g:deoplete#sources#clang#libclang_path = '/usr/lib/llvm-6.0/lib/libclang.so' let g:deoplete#sources#clang#clang_header = '/usr/lib/llvm-6.0/lib/clang' let g:deoplete#enable_at_startup = 1 +let g:deoplete#sources = {} +let g:deoplete#sources.scala = ['buffer', 'tags', 'omni'] +let g:deoplete#omni#input_patterns = {} +let g:deoplete#omni#input_patterns.scala = ['[^. *\t0-9]\.\w*',': [A-Z]\w', '[\[\t\( ][A-Za-z]\w*'] " * Vim general/Unknown let python_highlight_all = 1 let g:Tb_MaxSize=0 @@ -340,6 +348,12 @@ let g:UltiSnipsJumpBackwardTrigger="" "let g:miniBufExplModSelTarget = 1 "let g:miniBufExplForceSyntaxEnable = 1 +" Markdown +let g:markdown_enable_folding = 1 +let g:markdown_enable_mappings = 0 +let g:markdown_enable_spell_checking = 0 +let g:markdown_enable_input_abbreviations = 0 + " * CommandT let g:CommandTMaxFiles = 1000 let g:CommandTMaxDepth = 7 From 52c6726aac1ada4cca9fa4088f4ea34d5c55341e Mon Sep 17 00:00:00 2001 From: Barak Michener Date: Mon, 20 May 2019 17:12:17 -0700 Subject: [PATCH 18/25] base latex --- .latex/basehtml.cfg | 10 ++++++++++ .vimrc | 5 ++++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 .latex/basehtml.cfg diff --git a/.latex/basehtml.cfg b/.latex/basehtml.cfg new file mode 100644 index 0000000..34e0fe2 --- /dev/null +++ b/.latex/basehtml.cfg @@ -0,0 +1,10 @@ +\Preamble{html} +\begin{document} +\Css {body { + margin-top: 50px; + margin-left: auto; + margin-right: auto; + width: 1000px; + } + } +\EndPreamble diff --git a/.vimrc b/.vimrc index 7649925..48a4f3c 100644 --- a/.vimrc +++ b/.vimrc @@ -166,9 +166,10 @@ Plug 'kana/vim-textobj-user' Plug 'bps/vim-textobj-python' Plug 'dhruvasagar/vim-zoom' -Plug 'derekwyatt/vim-scala' +Plug 'derekwyatt/vim-scala', {'for': 'scala'} Plug 'ensime/ensime-vim', { 'do': ':UpdateRemotePlugins' } Plug 'gabrielelana/vim-markdown' +Plug 'lervag/vimtex' call plug#end() @@ -259,6 +260,8 @@ let g:syntastic_auto_loc_list = 2 let g:syntastic_loc_list_height = 10 " E111 = Spaces should be multiples of 4. I use 2. " +" * Polyglot +let g:polyglot_disabled = ['latex'] " * ALE let g:airline#extensions#ale#enabled = 1 From f34c23f5327f57fca35f81482cfa9d09d2df5e0b Mon Sep 17 00:00:00 2001 From: Barak Michener Date: Tue, 21 May 2019 14:37:21 -0700 Subject: [PATCH 19/25] reorganize plugins --- .vimrc | 119 +++++++++++++++++++++++++++++++++++++++-------------------------- 1 file changed, 71 insertions(+), 48 deletions(-) diff --git a/.vimrc b/.vimrc index 48a4f3c..6b25717 100644 --- a/.vimrc +++ b/.vimrc @@ -86,66 +86,59 @@ set runtimepath+=/home/bmichener/.vim/bundle/repos/github.com/Shougo/dein.vim " Required: call plug#begin('/home/bmichener/.vim/bundle') +" Aw, fuck, I can't believe you've done this. +" Plugins that must be first Plug '/home/bmichener/.vim/bundle/repos/github.com/Shougo/dein.vim' +Plug 'let-def/vimbufsync' + +" Plugins that I almost never use Plug 'vim-scripts/DrawIt' Plug 'tpope/vim-speeddating' Plug 'vim-scripts/EasyGrep' Plug 'chrisbra/NrrwRgn' -Plug 'hsitz/VimOrganizer' Plug 'mattn/calendar-vim' -Plug 'sjbach/lusty' -Plug 'scrooloose/nerdcommenter' -"Plug 'scrooloose/nerdtree' Plug 'rstacruz/sparkup' -"Plug 'scrooloose/syntastic' -Plug 'w0rp/ale' -Plug 'tpope/vim-fugitive' -Plug 'airblade/vim-gitgutter' -Plug 'lunaru/vim-less' -"Plug 'terryma/vim-multiple-cursors' -Plug 'tpope/vim-unimpaired' -"Plug 'Valloric/YouCompleteMe' -Plug 'Shougo/deoplete.nvim' -Plug 'zchee/deoplete-clang' -Plug 'zchee/deoplete-go', {'build': {'unix': 'make'}} -Plug 'zchee/deoplete-jedi' -Plug 'davidhalter/jedi-vim' -Plug 'b4winckler/vim-angry' Plug 'tristen/vim-sparkup' +Plug 'tpope/vim-fireplace', {'for': 'clojure'} +"Plug 'terryma/vim-multiple-cursors' +Plug 'ambv/black' +Plug 'kana/vim-textobj-user' + +" Plugins I wish I used more +Plug 'hsitz/VimOrganizer' +Plug 'tpope/vim-fugitive' +Plug 'tpope/vim-unimpaired' +Plug 'b4winckler/vim-angry' +Plug 'tpope/vim-surround' +Plug 'junegunn/vim-easy-align' +Plug 'bps/vim-textobj-python' + +" Plugins I NEED +Plug 'scrooloose/nerdcommenter' +Plug 'sjbach/lusty' +Plug 'w0rp/ale' +Plug 'airblade/vim-gitgutter' Plug 'vim-airline/vim-airline' Plug 'vim-airline/vim-airline-themes' -"Plug 'kien/ctrlp.vim' Plug 'junegunn/fzf' Plug 'junegunn/fzf.vim' Plug 'bling/vim-bufferline' Plug 'majutsushi/tagbar' -Plug 'eagletmt/neco-ghc', {'for': 'haskell'} -Plug 'eagletmt/ghcmod-vim', {'for': 'haskell'} -Plug 'Shougo/vimproc.vim' -Plug 'Shougo/vimfiler.vim' -Plug 'Shougo/unite.vim' Plug 'SirVer/ultisnips' Plug 'honza/vim-snippets' -Plug 'tpope/vim-surround' -"Plug 'farseer90718/vim-taskwarrior' Plug 'fatih/vim-go' -"Plug 't-yuki/vim-go-coverlay' -Plug 'tpope/vim-abolish' -Plug 'hylang/vim-hy', {'for': 'hy'} Plug 'jiangmiao/auto-pairs' -Plug 'racer-rust/vim-racer', {'for': 'rust'} -Plug 'let-def/vimbufsync' -"Plug 'lucas8/coquille', {'branch': 'error_on_coq_error', 'for': 'coq'} -Plug 'whonore/coquille', {'branch': 'pathogen-bundle', 'for': 'coq'} - -Plug 'mhartington/nvim-typescript' -Plug 'posva/vim-vue' -Plug 'Shougo/context_filetype.vim' - +Plug 'tpope/vim-abolish' Plug 'sheerun/vim-polyglot' Plug 'Shougo/denite.nvim' Plug 'plytophogy/vim-virtualenv' + + +" Plugins I NEEDED +"Plug 'scrooloose/nerdtree' +"Plug 'scrooloose/syntastic' +"Plug 'Valloric/YouCompleteMe' "Plug 'vim-scripts/fish-syntax' "Plug 'kchmck/vim-coffee-script' "Plug 'rodjek/vim-puppet' @@ -153,24 +146,48 @@ Plug 'plytophogy/vim-virtualenv' "Plug 'rust-lang/rust.vim' "Plug 'hashivim/vim-terraform' "Plug 'HerringtonDarkholme/yats.vim' -Plug 'tpope/vim-fireplace' -Plug 'junegunn/vim-easy-align' +"Plug 'kien/ctrlp.vim' +"Plug 'farseer90718/vim-taskwarrior' +"Plug 't-yuki/vim-go-coverlay' + +" Plugins for syntax +Plug 'lunaru/vim-less' +Plug 'hylang/vim-hy', {'for': 'hy'} +Plug 'mhartington/nvim-typescript' +Plug 'posva/vim-vue' +Plug 'Shougo/context_filetype.vim' Plug 'idris-hackers/idris-vim', {'for': 'idris'} +Plug 'derekwyatt/vim-scala', {'for': 'scala'} + +" Plugins that autocomplete +Plug 'Shougo/deoplete.nvim' +Plug 'zchee/deoplete-clang' +Plug 'zchee/deoplete-go', {'build': {'unix': 'make'}} +Plug 'zchee/deoplete-jedi' +Plug 'davidhalter/jedi-vim' +Plug 'eagletmt/neco-ghc', {'for': 'haskell'} +Plug 'eagletmt/ghcmod-vim', {'for': 'haskell'} +Plug 'racer-rust/vim-racer', {'for': 'rust'} Plug 'autozimu/LanguageClient-neovim', { \ 'branch': 'next', \ 'do': 'bash install.sh', \ } - -Plug 'ambv/black' -Plug 'kana/vim-textobj-user' -Plug 'bps/vim-textobj-python' -Plug 'dhruvasagar/vim-zoom' - -Plug 'derekwyatt/vim-scala', {'for': 'scala'} Plug 'ensime/ensime-vim', { 'do': ':UpdateRemotePlugins' } + +" Plugins that do specific things +Plug 'Shougo/vimproc.vim' +Plug 'Shougo/vimfiler.vim' +Plug 'Shougo/unite.vim' +"Plug 'lucas8/coquille', {'branch': 'error_on_coq_error', 'for': 'coq'} +Plug 'whonore/coquille', {'branch': 'pathogen-bundle', 'for': 'coq'} +"Plug 'dhruvasagar/vim-zoom' Plug 'gabrielelana/vim-markdown' Plug 'lervag/vimtex' + +" Unclear +Plug 'ncm2/float-preview.nvim' + call plug#end() @@ -247,7 +264,8 @@ let g:Tb_MapCTabSwitchBufs = 1 let g:UseGooglePythonSettings = 0 " * Jedi -let g:jedi#goto_command="gd" +let g:jedi#goto_command = "gd" +"let g:jedi#completions_enabled = 0 " * Eclim let g:EclimCompletionMethod = 'omnifunc' @@ -748,3 +766,8 @@ command Comments lexpr system('/home/bmichener/src/gogh/src/github.com/barakmich "call remote#host#RegisterPlugin('python3', '/home/barak/.vim/bundle/deoplete.nvim/rplugin/python3/deoplete', [ "\ {'sync': v:true, 'name': '_deoplete', 'type': 'function', 'opts': {}}, "\ ]) +" +if !empty($VIRTUAL_ENV) +" let g:python_host_prog = $VIRTUAL_ENV . '/bin/python' +" let g:python3_host_prog = $VIRUTAL_ENV . '3/bin/python' +endif From b361bf52e10d43967eb65e21258e5be89d57cd86 Mon Sep 17 00:00:00 2001 From: Barak Michener Date: Wed, 9 Oct 2019 18:45:55 -0700 Subject: [PATCH 20/25] various shell improvements --- .bashrc | 4 +- .config/polybar/config | 435 +++++++++++++++++++++++++++++++++++++++ .config/zsh/fzf-completion.zsh | 199 ++++++++++++++++++ .config/zsh/fzf-key-bindings.zsh | 85 ++++++++ .gitconfig | 1 + .i3/config | 6 +- .vimrc | 8 +- .xinitrc | 2 + .zshrc | 3 + 9 files changed, 735 insertions(+), 8 deletions(-) create mode 100644 .config/polybar/config create mode 100644 .config/zsh/fzf-completion.zsh create mode 100644 .config/zsh/fzf-key-bindings.zsh diff --git a/.bashrc b/.bashrc index f714772..f852401 100644 --- a/.bashrc +++ b/.bashrc @@ -142,8 +142,8 @@ if [ -f /etc/bash_completion ]; then . /etc/bash_completion fi -if [ -f ~/.bash_google ]; then - . ~/.bash_google +if [ -f ~/.bash_work ]; then + . ~/.bash_work fi if [ -n "`which fortune`" ]; then diff --git a/.config/polybar/config b/.config/polybar/config new file mode 100644 index 0000000..8d2e461 --- /dev/null +++ b/.config/polybar/config @@ -0,0 +1,435 @@ +;========================================================== +; +; +; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗ +; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗ +; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝ +; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗ +; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║ +; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ +; +; +; To learn more about how to configure Polybar +; go to https://github.com/polybar/polybar +; +; The README contains a lot of information +; +;========================================================== + +[colors] +;background = ${xrdb:color0:#222} +background = #222 +background-alt = #444 +;background = #404552 +;background-alt = #383c4a +;foreground = ${xrdb:color7:#222} +foreground = #dfdfdf +foreground-alt = #555 +;foreground = #4b5162 +;foreground-alt = #5294e2 +primary = #ffb52a +secondary = #e60053 +alert = #bd2c40 + +[bar/example] +;monitor = ${env:MONITOR:HDMI-1} +width = 100% +height = 27 +;offset-x = 1% +;offset-y = 1% +radius = 6.0 +fixed-center = false + +background = ${colors.background} +foreground = ${colors.foreground} + +line-size = 3 +line-color = #f00 + +border-size = 4 +border-color = #00000000 + +padding-left = 0 +padding-right = 2 + +module-margin-left = 1 +module-margin-right = 2 + +font-0 = fixed:pixelsize=10;1 +font-1 = unifont:fontformat=truetype:size=8:antialias=false;0 +font-2 = siji:pixelsize=10;1 + +modules-left = i3 +modules-center = +modules-right = xbacklight pulseaudio xkeyboard memory cpu wlan eth battery temperature date powermenu + +tray-position = right +tray-padding = 2 +;tray-background = #0063ff + +;wm-restack = bspwm +;wm-restack = i3 + +;override-redirect = true + +;scroll-up = bspwm-desknext +;scroll-down = bspwm-deskprev + +;scroll-up = i3wm-wsnext +;scroll-down = i3wm-wsprev + +cursor-click = pointer +cursor-scroll = ns-resize +enable-ipc = true + +[module/xwindow] +type = internal/xwindow +label = %title:0:30:...% + +[module/xkeyboard] +type = internal/xkeyboard +blacklist-0 = num lock + +format-prefix = " " +format-prefix-foreground = ${colors.foreground-alt} +format-prefix-underline = ${colors.secondary} + +label-layout = %layout% +label-layout-underline = ${colors.secondary} + +label-indicator-padding = 2 +label-indicator-margin = 1 +label-indicator-background = ${colors.secondary} +label-indicator-underline = ${colors.secondary} + +[module/filesystem] +type = internal/fs +interval = 25 + +mount-0 = / + +label-mounted = %{F#0a81f5}%mountpoint%%{F-}: %percentage_used%% +label-unmounted = %mountpoint% not mounted +label-unmounted-foreground = ${colors.foreground-alt} + +[module/bspwm] +type = internal/bspwm + +label-focused = %index% +label-focused-background = ${colors.background-alt} +label-focused-underline= ${colors.primary} +label-focused-padding = 2 + +label-occupied = %index% +label-occupied-padding = 2 + +label-urgent = %index%! +label-urgent-background = ${colors.alert} +label-urgent-padding = 2 + +label-empty = %index% +label-empty-foreground = ${colors.foreground-alt} +label-empty-padding = 2 + +; Separator in between workspaces +; label-separator = | + +[module/i3] +type = internal/i3 +format = +index-sort = true +wrapping-scroll = false + +; Only show workspaces on the same output as the bar +;pin-workspaces = true + +label-mode-padding = 2 +label-mode-foreground = #000 +label-mode-background = ${colors.primary} + +; focused = Active workspace on focused monitor +label-focused = %index% +label-focused-background = ${colors.background-alt} +label-focused-underline= ${colors.primary} +label-focused-padding = 2 + +; unfocused = Inactive workspace on any monitor +label-unfocused = %index% +label-unfocused-padding = 2 + +; visible = Active workspace on unfocused monitor +label-visible = %index% +label-visible-background = ${self.label-focused-background} +label-visible-underline = ${self.label-focused-underline} +label-visible-padding = ${self.label-focused-padding} + +; urgent = Workspace with urgency hint set +label-urgent = %index% +label-urgent-background = ${colors.alert} +label-urgent-padding = 2 + +; Separator in between workspaces +; label-separator = | + + +[module/mpd] +type = internal/mpd +format-online = + +icon-prev =  +icon-stop =  +icon-play =  +icon-pause =  +icon-next =  + +label-song-maxlen = 25 +label-song-ellipsis = true + +[module/xbacklight] +type = internal/xbacklight + +format =