diff options
author | Urbain Vaes <urbain@vaes.uk> | 2020-10-04 19:13:49 +0100 |
---|---|---|
committer | Urbain Vaes <urbain@vaes.uk> | 2020-10-04 19:13:49 +0100 |
commit | 3a3321af173a73b158c606f0e2c3c3e0dece2cb9 (patch) | |
tree | 00075dc12714c8b128e2327542526ac0676820fc | |
parent | ac7ba6d8aa7eb6ef384f10b7798bd01308beb970 (diff) | |
parent | 2c5e2b7a6667fd4e726bba3e50f9ccf6ce13bab3 (diff) |
Merge branch 'master' of https://github.com/urbainvaes/dotfiles
31 files changed, 204 insertions, 228 deletions
@@ -1 +1,2 @@ plugins/* +tags @@ -11,4 +11,24 @@ push = git push origin master [$HOME/dotfiles/plugins/vim-tmux-pilot] checkout = git clone 'git@github.com:urbainvaes/vim-tmux-pilot.git' update = git pull origin master -push = git saveandsync +push = git push origin master + +[$HOME/dotfiles/plugins/vim-ripple] +checkout = git clone 'git@github.com:urbainvaes/vim-ripple.git' +update = git pull origin master +push = git push origin master + +[$HOME/dotfiles/plugins/vim-darjeeling] +checkout = git clone 'git@github.com:urbainvaes/vim-darjeeling.git' +update = git pull origin master +push = git push origin master + +[$HOME/dotfiles/plugins/vim-macaw] +checkout = git clone 'git@github.com:urbainvaes/vim-macaw.git' +update = git pull origin master +push = git push origin master + +[$HOME/dotfiles/plugins/nvim-i3scratchpad] +checkout = git clone 'git@github.com:urbainvaes/nvim-i3scratchpad.git' +update = git pull origin master +push = git push origin master @@ -1,11 +1,12 @@ # dotfiles This repository contains my configuration files. Whenever possible, I use tools that follow the Unix philosophy. -Being a *vim* user, I find it very convenient to use tools with *vi* keybindings: +I like *vim* for text editing, +and I find it very convenient to use tools with *vi* keybindings: + Window manager: **i3** + File manager: **vifm** -+ Browser: **uzbl** ++ Browser: **qutebrowser** + PDF viewer: **zathura** + Email client: **mutt** diff --git a/Xresources/.Xresources/base b/Xresources/.Xresources/base index b9ff079..ea87784 100644 --- a/Xresources/.Xresources/base +++ b/Xresources/.Xresources/base @@ -28,7 +28,7 @@ URxvt.resize-font.bigger: C-plus ! Appearance /* URxvt*font: xft:DejaVu Sans Mono:size=12 */ -URxvt*font: xft:monaco:size=11.5 +URxvt*font: xft:monaco:size=12 URxvt*scrollBar: false URxvt*internalBorder: 0 URxvt.fading: 35 diff --git a/bash/.bashrc b/bash/.bashrc index 542ce53..b5460fc 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -11,5 +11,5 @@ fi # FZF [ -f ~/.fzf.bash ] && source ~/.fzf.bash -FZF_MARKS_PLUGIN=$HOME/Dropbox/projects/fzf-marks/fzf-marks.plugin.bash +FZF_MARKS_PLUGIN=$HOME/dotfiles/plugins/fzf-marks/fzf-marks.plugin.bash [ -f "$FZF_MARKS_PLUGIN" ] && source "$FZF_MARKS_PLUGIN" diff --git a/bin/.local/bin/keyboard b/bin/.local/bin/keyboard index b7f5e90..59a9ee0 100755 --- a/bin/.local/bin/keyboard +++ b/bin/.local/bin/keyboard @@ -46,13 +46,14 @@ xmodmap -e "keycode any = space" xcape -e 'Super_L=space' # Make return (Control_R, Return) -xmodmap -e "keysym Return = Control_R" -xmodmap -e "add Control = Control_R" -xmodmap -e "keycode any = Return" -xcape -e 'Control_R=Return' +# xmodmap -e "keysym Return = Control_R" +# xmodmap -e "add Control = Control_R" +# xmodmap -e "keycode any = Return" +# xcape -e 'Control_R=Return' -# Make eject an Insert +# Make eject and Home an Insert xmodmap -e "keysym XF86Eject = Insert" +xmodmap -e "keysym Home = Insert" # Numbers xmodmap -e "keysym d = d D 0" diff --git a/bin/.local/bin/keyboard-us b/bin/.local/bin/keyboard-us index 1b6ceba..1b150fc 100755 --- a/bin/.local/bin/keyboard-us +++ b/bin/.local/bin/keyboard-us @@ -13,10 +13,10 @@ setxkbmap us xmodmap -e "clear Lock" xmodmap -e "keysym Caps_Lock = Control_L Control_L" xmodmap -e "add Control = Control_L" -xcape -e 'Control_L=Escape' +# xcape -e 'Control_L=Escape' # Make space (Super_L, space) -xmodmap -e "keysym space = Super_L" -xmodmap -e "add mod4 = Super_L" -xmodmap -e "keycode any = space" +# xmodmap -e "keysym space = Super_L" +# xmodmap -e "add mod4 = Super_L" +# xmodmap -e "keycode any = space" # xcape -e 'Super_L=space' diff --git a/bin/.local/bin/workspace b/bin/.local/bin/workspace index ad378ef..36f09d4 100755 --- a/bin/.local/bin/workspace +++ b/bin/.local/bin/workspace @@ -1,13 +1,13 @@ #!/usr/bin/env bash -# List of workspaces +# List of workspaces: ( number, name, focused) workspaces=$(i3-msg -t get_workspaces | awk 'BEGIN { RS="(},{)|(\\[{)|(}\\])"; - FPAT="([^,:]+)|([^,]+{[^}]+})|(\"[^\"]+\")" + FPAT="([^,:\"]+)|([^,\"]+:[^,\"]+)|([^,]+{[^}]+})" } $0 !~ "^\\s*$" { gsub(/"/, "", $4) - print $2, $4, $8, $11 + print $4, $6, $10 }' | sort) act_on_container() { diff --git a/git/.git_template/hooks/ctags b/git/.git_template/hooks/ctags index a52759d..fe27a19 100755 --- a/git/.git_template/hooks/ctags +++ b/git/.git_template/hooks/ctags @@ -1,7 +1,6 @@ #!/bin/sh set -e PATH="/usr/local/bin:$PATH" -dir="$(git rev-parse --git-dir)" trap 'rm -f "$dir/$$.tags"' EXIT -git ls-files | ctags --tag-relative=yes -L - -f"$dir/$$.tags" --languages=-javascript,sql -mv "$dir/$$.tags" "$dir/tags" +git ls-files | ctags --tag-relative=yes -L - -f"$$.tags" --languages=-javascript,sql +mv "$$.tags" "tags" diff --git a/git/.gitconfig b/git/.gitconfig index 0e7df50..79e64f8 100644 --- a/git/.gitconfig +++ b/git/.gitconfig @@ -4,7 +4,7 @@ [user] name = Urbain Vaes email = urbain@vaes.uk - signingKey = 716064C0 + ; signingKey = 716064C0 [init] templatedir = ~/.git_template [alias] @@ -13,9 +13,11 @@ [http] sslverify = false [commit] - gpgSign = true + ; gpgSign = true verbose = true [push] default = simple [merge] ff = true +[pull] + rebase = false diff --git a/i3/.config/i3/config b/i3/.config/i3/config index 28fd656..e51e8ac 100644 --- a/i3/.config/i3/config +++ b/i3/.config/i3/config @@ -1,7 +1,7 @@ # Modifier set $mod Mod4 -font pango:DejaVu Sans Mono, Awesome 8 +font pango:DejaVu Sans Mono, Awesome 9 # Use Mouse+$mod to drag floating windows to their wanted position floating_modifier $mod @@ -190,6 +190,8 @@ bindsym XF86AudioMute exec amixer -D pulse sset Master 0% # Display bindsym XF86MonBrightnessUp exec light -A 10 bindsym XF86MonBrightnessDown exec light -U 10 +bindsym Prior exec light -A 10 +bindsym Next exec light -U 10 bindsym Shift+XF86AudioRaiseVolume exec light -A 10 bindsym Shift+XF86AudioLowerVolume exec light -U 10 diff --git a/i3/.config/i3blocks/bin/battery b/i3/.config/i3blocks/bin/battery index 378ee3f..0286809 100755 --- a/i3/.config/i3blocks/bin/battery +++ b/i3/.config/i3blocks/bin/battery @@ -5,7 +5,6 @@ if [ ! -d /sys/class/power_supply/BAT0 ]; then exit fi -current_now=$(cat /sys/class/power_supply/BAT0/current_now) charge_now=$(cat /sys/class/power_supply/BAT0/charge_now) charge_full=$(cat /sys/class/power_supply/BAT0/charge_full) bat_status=$(cat /sys/class/power_supply/BAT0/status) @@ -16,7 +15,7 @@ if [ "$bat_status" = "Full" ]; then fi if [ "$bat_status" = "Discharging" ]; then - tot_minutes_remaining=$(( charge_now*60/current_now )) + # tot_minutes_remaining=$(( charge_now*60/current_now )) if [[ $charge_percent -lt 20 ]]; then icon="" @@ -36,14 +35,16 @@ if [ "$bat_status" = "Discharging" ]; then fi elif [ "$bat_status" = "Charging" ]; then - tot_minutes_remaining=$(( (charge_full-charge_now)*60/current_now )) + # current_now=$(cat /sys/class/power_supply/BAT0/current_now) + # tot_minutes_remaining=$(( (charge_full-charge_now)*60/current_now )) icon= color="lightblue" fi -time_remaining=$(printf "%02d:%02d" \ - $(( tot_minutes_remaining/60 )) \ - $(( tot_minutes_remaining - (tot_minutes_remaining/60)*60 ))) +# time_remaining=$(printf "%02d:%02d" \ +# $(( tot_minutes_remaining/60 )) \ +# $(( tot_minutes_remaining - (tot_minutes_remaining/60)*60 ))) -echo "<span color='$color'>$icon</span> $charge_percent% ($time_remaining)" +# echo "<span color='$color'>$icon</span> $charge_percent% ($time_remaining)" +echo "<span color='$color'>$icon</span> $charge_percent%" diff --git a/mutt/.gitignore b/mutt/.gitignore new file mode 100644 index 0000000..f2abc1a --- /dev/null +++ b/mutt/.gitignore @@ -0,0 +1,3 @@ +.mail/Work/* +.mail/Personal/* +.mail/Misc/* diff --git a/mutt/.mail/Misc/.gitkeep b/mutt/.mail/Misc/.gitkeep new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/mutt/.mail/Misc/.gitkeep diff --git a/mutt/.mail/Personal/.gitkeep b/mutt/.mail/Personal/.gitkeep new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/mutt/.mail/Personal/.gitkeep diff --git a/mutt/.mail/Work/.gitkeep b/mutt/.mail/Work/.gitkeep new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/mutt/.mail/Work/.gitkeep diff --git a/mutt/.mutt/id_personal b/mutt/.mutt/id_personal index 8c57cd6..feb81bd 100644 --- a/mutt/.mutt/id_personal +++ b/mutt/.mutt/id_personal @@ -9,3 +9,5 @@ set trash = "+Personal/Personal.bin" macro index,pager gs "<change-folder> $record<enter>" macro index,pager gd "<change-folder> $postponed<enter>" macro index,pager gb "<change-folder> $trash<enter>" + +# vim: ft=muttrc diff --git a/mutt/.mutt/id_work b/mutt/.mutt/id_work index 238cfcb..ac75a03 100644 --- a/mutt/.mutt/id_work +++ b/mutt/.mutt/id_work @@ -2,10 +2,14 @@ set from = "u.vaes13@imperial.ac.uk" set sendmail="/usr/bin/msmtp -a imperial" set spoolfile = "+Work/Work" -set record = "+Work/Work.sent" set postponed = "+Work/Work.drafts" set trash = "+Work/Work.bin" -macro index,pager gs "<change-folder> $record<enter>" +# Record not necessary because outlook saves messages +unset record + +macro index,pager gs "<change-folder> +Work/Work.sent<enter>" macro index,pager gd "<change-folder> $postponed<enter>" macro index,pager gb "<change-folder> $trash<enter>" + +# vim: ft=muttrc diff --git a/mutt/.mutt/muttrc b/mutt/.mutt/muttrc index 95faa6f..7ad8cbf 100644 --- a/mutt/.mutt/muttrc +++ b/mutt/.mutt/muttrc @@ -1,11 +1,11 @@ # Folders -set folder = ~/.mail -set alias_file = ~/.mutt/alias -set header_cache = ~/.mutt/cache/headers +set folder = ~/.mail +set alias_file = ~/.mutt/alias +set header_cache = ~/.mutt/cache/headers set message_cachedir = ~/.mutt/cache/bodies set certificate_file = ~/.mutt/certificates -set mailcap_path = ~/.mutt/mailcap -set tmpdir = ~/.mutt/temp +set mailcap_path = ~/.mutt/mailcap +set tmpdir = ~/.mutt/temp # Source crypto, aliases, mailboxes source ~/.mutt/colors/base.muttrc @@ -64,6 +64,8 @@ alternative_order text/plain text/enriched text/html set editor="$EDITOR" set include=yes +# Index +set index_format="%X %Z %{%b %d} %-15.15L (%?l?%4l&%4c?) %s" # Macros macro index,pager gp "<change-folder> +Personal/Personal<enter>" diff --git a/qutebrowser/.config/qutebrowser/config.py b/qutebrowser/.config/qutebrowser/config.py index f4acf32..e766985 100644 --- a/qutebrowser/.config/qutebrowser/config.py +++ b/qutebrowser/.config/qutebrowser/config.py @@ -1,7 +1,29 @@ +# pylint: disable=C0111 # Documentation: # qute://help/configuring.html # qute://help/settings.html +from qutebrowser.api import interceptor + +c = c +config = config + + +def filter_yt(info: interceptor.Request): + url = info.request_url + if (url.host() == 'www.youtube.com' + and url.path() == '/get_video_info' + and '&adformat=' in url.query()): + info.block() + + +interceptor.register(filter_yt) + + +# Colors +c.colors.tabs.selected.odd.bg = "#875f5f" +c.colors.tabs.selected.even.bg = "#875f5f" + c.content.images = True c.downloads.location.prompt = False c.editor.command = ['urxvt', '-e', 'nvim', '-f', '{}'] @@ -9,7 +31,7 @@ c.fonts.hints = 'bold 12pt monospace' c.hints.chars = 'aoeuidhtns' c.hints.uppercase = True c.tabs.show = 'multiple' -c.tabs.tabs_are_windows = True +c.tabs.tabs_are_windows = False c.url.start_pages = ['file:///home/urbain/personal/index.html'] c.url.default_page = c.url.start_pages[0] c.completion.open_categories = ['bookmarks', 'history'] @@ -30,6 +52,14 @@ config.bind(",o", 'set-cmd-text -s :spawn --userscript url-from-surfraw') config.bind(",O", 'set-cmd-text -s :spawn --userscript url-from-surfraw -t') config.bind("f", 'hint all current') +config.bind("gh", 'tab-move -') +config.bind("gl", 'tab-move +') +# config.bind("gt", 'tab-next') +# config.bind("gT", 'tab-prev') +config.bind("<Ctrl-L>", 'tab-next') +config.bind("<Ctrl-H>", 'tab-prev') +config.bind("<Ctrl-D>", 'tab-close') + # Bindings for insert mode # config.unbind("<Ctrl-A>", mode='insert') config.bind("<Ctrl-A>", 'fake-key <Home>', mode='insert') @@ -50,7 +80,7 @@ config.bind('<Ctrl-N>', 'completion-item-focus next', mode='command') # Search engines c.url.searchengines = { - 'DEFAULT': 'https://startpage.com/do/search?query={}', + 'DEFAULT': 'https://www.ecosia.org/search?q={}', 'amazon': 'https://www.amazon.co.uk/s?k={}', 'aw': 'https://wiki.archlinux.org/index.php?search={}', 'ddg': 'https://duckduckgo.com/?q={}', @@ -74,4 +104,5 @@ c.aliases = { } # Style sheet -c.content.user_stylesheets='/home/urbain/dotfiles/qutebrowser/.config/qutebrowser/style.css' +c.content.user_stylesheets = '/home/urbain/dotfiles/qutebrowser/.config/qutebrowser/style.css' + diff --git a/surfraw/.surfraw.bookmarks b/surfraw/.surfraw.bookmarks deleted file mode 100644 index a46527b..0000000 --- a/surfraw/.surfraw.bookmarks +++ /dev/null @@ -1,2 +0,0 @@ -startpage https://startpage.com/do/search?hmb=1&cat=web&cmd=process_search&language=english_uk&engine0=v1all&query=%s&abp=-1&nj=0&pg=0 -dictionary http://www.dictionary.com/browse/%s diff --git a/surfraw/.surfraw.conf b/surfraw/.surfraw.conf deleted file mode 100644 index 07cedef..0000000 --- a/surfraw/.surfraw.conf +++ /dev/null @@ -1,3 +0,0 @@ -SURFRAW_graphical_browser=/usr/bin/xdg-open -SURFRAW_text_browser=w3m -SURFRAW_graphical=yes diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index c16febc..6259e47 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -22,6 +22,8 @@ set -g pane-border-status off # Alternative: top/bottom/... set -g pane-border-format "#{pane_current_command}" set -g status-justify centre # Center window list set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q' # Get | cursor nvim insert +set -sa terminal-overrides ',xterm*:RGB' +set -sa terminal-overrides ',rxvt*:RGB' set-hook -g session-created "if-shell '[ -n \""'$SSH_CONNECTION'"\" ]' 'set status-bg \"#aa4444\"' 'set status-bg \"green\"'" set-hook -g client-attached "if-shell '[ -n \""'$SSH_CONNECTION'"\" ]' 'set status-bg \"#aa4444\"' 'set status-bg \"green\"'" diff --git a/vifm/.config/vifm/vifmrc b/vifm/.config/vifm/vifmrc index 7a73409..0dd5220 100644 --- a/vifm/.config/vifm/vifmrc +++ b/vifm/.config/vifm/vifmrc @@ -1,11 +1,12 @@ " Command to open files filetype *.JPG feh %f & -filetype *.exe wine %f & +filetype *.exe wine %f & filetype * xdg-open %f & " Options set fastrun set history=100 +set ignorecase set incsearch set sortnumbers set scrolloff=2 @@ -31,6 +32,7 @@ nnoremap gm :bmark<space> nnoremap gb :bmarks<cr> nnoremap g<cr> :!nvim %f<cr> nnoremap r :run<cr> +nnoremap T :tree!<cr> nnoremap ,b :backup<cr> nnoremap ,t :!urxvt &<cr> nnoremap ,l :!less %f<cr> diff --git a/vim/.config/nvim/view b/vim/.config/nvim/view deleted file mode 120000 index fcd4091..0000000 --- a/vim/.config/nvim/view +++ /dev/null @@ -1 +0,0 @@ -../../../../.vim/view
\ No newline at end of file diff --git a/vim/.vim/spell/en.utf-8.add b/vim/.vim/spell/en.utf-8.add index 999f578..dbb52c2 100644 --- a/vim/.vim/spell/en.utf-8.add +++ b/vim/.vim/spell/en.utf-8.add @@ -61,3 +61,12 @@ unitarily multimodal Kalman i.e. +Stratonovich +colorscheme +colorscheme +plugin +hypoellipticity +minorization +perturbative +documentclass +preconditioner diff --git a/vim/.vim/spell/en.utf-8.add.spl b/vim/.vim/spell/en.utf-8.add.spl Binary files differindex e9828ae..c1471ca 100644 --- a/vim/.vim/spell/en.utf-8.add.spl +++ b/vim/.vim/spell/en.utf-8.add.spl @@ -11,17 +11,12 @@ let maplocalleader = "," "" Plugins {{{1 call plug#begin('~/.vim/plugged') -Plug 'LnL7/vim-nix' Plug 'PotatoesMaster/i3-vim-syntax' Plug 'SirVer/ultisnips' Plug 'airblade/vim-gitgutter' Plug 'AndrewRadev/splitjoin.vim' -Plug 'beloglazov/vim-online-thesaurus' Plug 'easymotion/vim-easymotion' -Plug 'holomorph/vim-freefem' Plug 'honza/vim-snippets' -Plug 'inkarkat/vim-SpellCheck' -Plug 'inkarkat/vim-ingo-library' Plug 'jamessan/vim-gnupg' Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } Plug 'junegunn/fzf.vim' @@ -34,16 +29,14 @@ Plug 'junegunn/vim-slash' Plug 'justinmk/vim-dirvish' Plug 'justinmk/vim-sneak' Plug 'kshenoy/vim-signature' -Plug 'lervag/vimtex' +Plug 'lervag/vimtex', {'commit': '8287981'} Plug 'machakann/vim-highlightedyank' Plug 'majutsushi/tagbar' +Plug 'mg979/vim-visual-multi' Plug 'neomake/neomake' -Plug 'scrooloose/nerdtree' Plug 'sjl/Gundo.vim', { 'on' : 'GundoToggle' } -Plug 'terryma/vim-multiple-cursors' Plug 'tommcdo/vim-exchange' Plug 'tommcdo/vim-ninja-feet' -Plug 'ton/vim-bufsurf' Plug 'tpope/vim-abolish' Plug 'tpope/vim-apathy' Plug 'tpope/vim-commentary' @@ -64,65 +57,55 @@ let g:zoomwintab_hidetabbar=0 Plug 'vim-scripts/ReplaceWithRegister' Plug 'vim-scripts/gmsh.vim' Plug 'wellle/targets.vim' -" Plug 'zchee/deoplete-clang' if isdirectory($HOME."/dotfiles/plugins") Plug '~/dotfiles/plugins/vim-remembrall' Plug '~/dotfiles/plugins/vim-tmux-pilot' + Plug '~/dotfiles/plugins/vim-ripple' + Plug '~/dotfiles/plugins/vim-darjeeling' + Plug '~/dotfiles/plugins/vim-macaw' endif if has("nvim") - " Plug 'roxma/nvim-completion-manager' - " Plug 'Shougo/deoplete.nvim', { 'do' : ':UpdateRemotePlugins', 'tag' : '4.1' } - " Plug 'autozimu/LanguageClient-neovim', { 'do': 'bash install.sh', 'branch': 'next' } - " Plug 'zchee/deoplete-jedi' - Plug 'hkupty/iron.nvim', { 'branch': 'legacy' } -else - Plug 'Shougo/neocomplete.vim' + Plug '~/dotfiles/plugins/nvim-i3scratchpad' +endif + +if hostname() != "peuplier" + Plug 'neovim/nvim-lsp' endif " Colors -Plug 'KKPMW/sacredforest-vim' Plug 'altercation/vim-colors-solarized' -Plug 'arcticicestudio/nord-vim' -Plug 'KKPMW/moonshine-vim' Plug 'KKPMW/sacredforest-vim' Plug 'junegunn/seoul256.vim' Plug 'romainl/Apprentice' -Plug 'joshdick/onedark.vim' -" Plug 'josuegaleas/jay' - -" Plug 'neoclide/coc.nvim', {'branch': 'release'} +Plug 'arcticicestudio/nord-vim' +" Plug 'axvr/zepl.vim' call plug#end() "" Plugin configuration {{{1 " Toggles nnoremap cpg :GitGutterToggle<cr> -nnoremap cpr :IronRepl<cr> nnoremap cpn :NERDTreeToggle<cr> nnoremap cpt :TagbarToggle<cr> nnoremap cpu :GundoToggle<cr> nnoremap <expr> cp Remembrall('cp') -" Easy motion -map gs <Plug>(easymotion-prefix) - " Fuzzy finder -nnoremap <c-p>a :Ag -nnoremap <c-p>b :Buffers<cr> -nnoremap <c-p>C :Colors<cr> -nnoremap <c-p>f :Files<cr> -nnoremap <c-p>g :GitFiles<cr> -nnoremap <c-p>r :History<cr> -nnoremap <c-p>: :History:<cr> -nnoremap <c-p>/ :History/<cr> -nnoremap <c-p>l :BLines<cr> -nnoremap <c-p>a :Ag - -nnoremap <a-b> :Buffers<cr> -nnoremap <a-f> :Files<cr> -nnoremap <a-g> :GitFiles<cr> +nnoremap <c-p>a :Ag +nnoremap <c-p>b :Buffers<cr> +nnoremap <c-p>C :Colors<cr> +nnoremap <c-p>f :Files<cr> +nnoremap <c-p>g :GitFiles<cr> +nnoremap <c-p>r :History<cr> +nnoremap <c-p>: :History:<cr> +nnoremap <c-p>/ :History/<cr> +nnoremap <c-p>l :BLines<cr> + +nnoremap <a-b> :Buffers<cr> +nnoremap <a-f> :Files<cr> +nnoremap <a-g> :GitFiles<cr> " Fugitive nnoremap <Leader>gs :Gstatus<cr> @@ -130,6 +113,11 @@ nnoremap <Leader>gc :Gcommit<cr> nnoremap <Leader>gr :Gread<cr> nnoremap <Leader>gd :Gdiff<cr> +" Multiple cursors +let g:VM_maps = {} +let g:VM_maps["Select Cursor Down"] = "<M-j>" +let g:VM_maps["Select Cursor Up"] = "<M-k>" + " Heytmux function! Call_heytmux(vm) call feedkeys(":'[,']Heytmux!
") @@ -138,22 +126,12 @@ endfunction nnoremap <silent> gh :set opfunc=Call_heytmux<cr>g@ xnoremap <silent> gh :Heytmux!<cr> -" Iron -" let g:iron_repl_open_cmd = 'vsplit' -let g:iron_map_defaults=0 -nmap yr <Plug>(iron-send-motion) -xmap R <Plug>(iron-send-motion) -nmap yrr VR - " Easy align xmap ga <Plug>(EasyAlign) nmap ga <Plug>(EasyAlign) xmap gl <Plug>(LiveEasyAlign) nmap gl <Plug>(LiveEasyAlign) -" Online thesaurus -nnoremap cpd :OnlineThesaurusCurrentWord<cr> - " Plug nnoremap ,pi :PlugInstall<cr> nnoremap ,pu :PlugUpdate<cr> @@ -168,16 +146,9 @@ if &runtimepath =~ 'remembrall' autocmd FileType tex nnoremap <buffer> <silent> <expr> ,l Remembrall(',l') augroup END endif - -" LanguageClient -if executable('pyls') - let g:LanguageClient_serverCommands = { 'python': ['pyls'], } -endif - -let g:LanguageClient_diagnosticsEnable = 0 -nnoremap <silent> <leader>lh :call LanguageClient#textDocument_hover()<CR> -nnoremap <silent> <leader>ld :call LanguageClient#textDocument_definition()<CR> -nnoremap <silent> <leader>lr :call LanguageClient#textDocument_rename()<CR> +let g:remembrall_suffixes = [""] +let g:ripple_winpos = "vertical" +let g:ripple_term_name = "term: ripple" " Ultisnips nnoremap cps :UltiSnipsEdit<cr> @@ -196,30 +167,16 @@ let g:neomake_gcc_args=[ \ '-I.', '-I..', '-I../..' \ ] -" Deoplete -let g:deoplete#enable_at_startup = 1 -let g:deoplete#sources#jedi#show_docstring = 1 -if !exists('g:deoplete#omni#input_patterns') - let g:deoplete#omni#input_patterns = {} -endif - -if &runtimepath =~ 'vimtex' - let g:deoplete#omni#input_patterns.tex = g:vimtex#re#deoplete -endif +let g:neomake_python_enabled_makers = ['python', 'pylint'] " FZF.vim +let $FZF_DEFAULT_OPTS='--layout=reverse' let g:fzf_buffers_jump = 1 +let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.6 } } " Gundo let g:gundo_prefer_python3 = 1 -" Localvimrc -let g:localvimrc_sandbox = 0 -let g:localvimrc_whitelist='/home/*' - -" NerdTree -let g:NERDTreeHijackNetrw = 0 - " Ultisnips let g:UltiSnipsEditSplit="horizontal" let g:UltiSnipsExpandTrigger="<tab>" @@ -236,49 +193,24 @@ let g:vimtex_view_method='zathura' let g:vimtex_quickfix_mode=2 let g:vimtex_compiler_progname='nvr' let g:vimtex_syntax_enabled=1 -" let g:vimtex_fold_types = { -" \ 'preamble' : {'enabled' : 0}, -" \ 'envs' : { -" \ 'blacklist' : ['lemma', 'proposition', 'theorem', 'equation'], -" \ 'whitelist' : ['proof'], -" \ }, -" \} +let g:vimtex_toc_config={ + \ 'layer_status': { + \ 'content': 1, + \ 'label': 0, + \ 'todo': 1, + \ 'include': 1 }, + \ 'show_help': 0} " Pilot let g:pilot_boundary='ignore' let g:pilot_mode='wintab' +" let g:pilot_split_or_new='new' " let g:pilot_key_h='<a-h>' " let g:pilot_key_j='<a-j>' " let g:pilot_key_k='<a-k>' " let g:pilot_key_l='<a-l>' " let g:pilot_key_p='<a-\>' -" YouCompleteMe -let g:ycm_key_list_select_completion = ['<C-n>', '<Down>'] -let g:ycm_key_list_previous_completion = ['<C-p>', '<Up>'] -let g:ycm_add_preview_to_completeopt = 0 -let g:ycm_confirm_extra_conf = 0 -let g:ycm_auto_trigger = 1 -if !exists('g:ycm_semantic_triggers') - let g:ycm_semantic_triggers = {} - let g:ycm_semantic_triggers.tex = ['re!\\[A-Za-z]*(ref|cite)[A-Za-z]*([^]]*])?{([^}]*, ?)*' ] -endif - -" Plugins interactions -function! Multiple_cursors_before() - if has("nvim") && &runtimepath =~ 'deoplete' - let b:deoplete_disable_auto_complete = 1 - call deoplete#disable() - endif -endfunction - -function! Multiple_cursors_after() - if has("nvim") && &runtimepath =~ 'deoplete' - let b:deoplete_disable_auto_complete = 0 - call deoplete#enable() - endif -endfunction - "" Vim variables {{{1 let g:netrw_bufsettings='relativenumber' let g:tex_conceal= '' @@ -293,7 +225,7 @@ set undodir^=~/.vim/undo// " ^= : prepends to list " // : store absolute path -set complete+=k +" set complete+=k set conceallevel=2 set cursorline set diffopt=filler,vertical,hiddenoff @@ -303,7 +235,11 @@ set foldmethod=marker set hidden set ignorecase set lazyredraw +set laststatus=2 +set listchars+=eol:$ +set wildcharm=<C-z> set mouse=a +" set noequalalways set nojoinspaces set nowrap set path+=$PWD/** @@ -311,7 +247,7 @@ set shiftwidth=4 set showcmd set splitright set smartcase -set smartindent +set nosmartindent set softtabstop=-1 " set sotftabstop=&shiftwidth " set formatoptions+=orw silent! set breakindent @@ -331,6 +267,8 @@ endif nnoremap <leader>1 m`yypVr=`` nnoremap <leader>2 m`yypVr-`` +nnoremap <leader>m :.m + nnoremap n nzz nnoremap N Nzz @@ -377,12 +315,6 @@ cnoremap <c-n> <down> cnoremap <up> <c-p> cnoremap <down> <c-n> -" Overwrite unimpaired mappings -nnoremap <silent> <b :BufSurfBack<cr> -nnoremap <silent> >b :BufSurfForward<cr> -nnoremap <silent> <B :BufSurfBack<cr>:bd! #<cr> -nnoremap <silent> >B :BufSurfForward<cr>:bd! #<cr> - " Alternate file nnoremap <bs> nnoremap + :Buffers<cr> @@ -403,17 +335,11 @@ nnoremap ,e :E " Unimpaired nmap co yo -"" Colorscheme {{{1 -nnoremap ,c :colorscheme<space> -nnoremap ,cl :set background=light<cr>:colorscheme solarized<cr> -nnoremap ,cl :set background=dark<cr>:colorscheme solarized<cr> -nnoremap ,cs :colorscheme seoul256<cr> -nnoremap ,cn :colorscheme nord<cr> -colo seoul256 - "" Autocommands {{{1 augroup vimrc autocmd! + " autocmd ColorScheme * highlight String ctermfg=192 guifg=#d7ff87 + " autocmd ColorScheme * highlight Folded ctermbg=23 ctermfg=185 guibg=#005f5f guifg=#d7d75f autocmd BufWritePost *vimrc,*exrc :call feedkeys(":source %\<cr>") autocmd BufNewFile,Bufread /tmp/mutt-* setlocal tw=72 autocmd BufWritePre * @@ -443,6 +369,12 @@ augroup vimrc autocmd FileType dirvish silent! unmap <buffer> <C-p> augroup END +"" Colorscheme {{{1 +nnoremap ,cd :colorscheme darjeeling<cr> +nnoremap ,cs :colorscheme seoul256<cr> +set notermguicolors +colo darjeeling + "" My search {{{1 " http://vim.wikia.com/wiki/Searching_for_files @@ -552,52 +484,15 @@ if has("nvim") endif "" Experimental {{{1 -set wildcharm=<C-z> -nnoremap ,e :e **/*<C-z><S-Tab> - -let $FZF_DEFAULT_OPTS='--layout=reverse' -let g:fzf_layout = { 'window': 'call FloatingFZF()' } - -hi Pmenu ctermfg=3 ctermbg=239 -function! FloatingFZF() - let buf = nvim_create_buf(v:false, v:true) - call setbufvar(buf, '&laststatus', '1') - - let height = &lines - 10 - let width = float2nr(&columns - (&columns * 2 / 10)) - let col = float2nr((&columns - width) / 2) - - let opts = { - \ 'relative': 'editor', - \ 'row': 5, - \ 'col': col, - \ 'width': width, - \ 'height': height - \ } - - call nvim_open_win(buf, v:true, opts) -endfunction - -" hi Pmenu ctermfg=3 ctermbg=239 -" let g:remembrall_window = 'call FloatingFZF()' - -" if !exists('g:lsp_config_sourced') -" call lsp#add_filetype_config({ -" \ 'filetype': 'python', -" \ 'name': 'pyls', -" \ 'cmd': 'pyls', -" \ 'callbacks': {} -" \ }) -" autocmd Filetype python setl omnifunc=lsp#omnifunc -" let g:lsp_config_sourced = 1 -" endif - - -" inoremap <c-g><esc>:call remembrall#remind('i', '<c-g>')<cr> -" nnoremap <expr> <c-g> Remembrall('<c-g>') -" nnoremap <c-g>h <esc>:call lsp#text_document_hover()<cr> -" nnoremap <c-g>a <esc>:call lsp#text_document_declaration()<cr> -" nnoremap <c-g>d <esc>:call lsp#text_document_definition()<cr> -" nnoremap <c-g>i <esc>:call lsp#text_document_implementation()<cr> -" nnoremap <c-g>s <esc>:call lsp#text_document_signature_help()<cr> -" nnoremap <c-g>t <esc>:call lsp#text_document_type_definition()<cr> +if has("nvim") && hostname() != "peuplier" + lua require'nvim_lsp'.pyls.setup{} + autocmd Filetype python setlocal omnifunc=v:lua.vim.lsp.omnifunc + nnoremap <expr> <c-g> Remembrall('<c-g>') + nnoremap <silent> <c-g>h <cmd>lua vim.lsp.buf.hover()<cr> + nnoremap <silent> <c-g>a <cmd>lua vim.lsp.buf.declaration()<cr> + nnoremap <silent> <c-g>d <cmd>lua vim.lsp.buf.definition()<cr> + nnoremap <silent> <c-g>i <cmd>lua vim.lsp.buf.implementation()<cr> + nnoremap <silent> <c-g>s <cmd>lua vim.lsp.buf.signature_help()<cr> + nnoremap <silent> <c-g>t <cmd>lua vim.lsp.buf.type_definition()<cr> + nnoremap <silent> <c-g><c-g> <cmd>lua vim.lsp.stop_client(vim.lsp.get_active_clients())<cr> +endif diff --git a/xinit/.xinitrc b/xinit/.xinitrc index a899591..7638f61 100755 --- a/xinit/.xinitrc +++ b/xinit/.xinitrc @@ -12,11 +12,15 @@ xrdb $HOME/.Xresources/$COLORSCHEME # Background feh --bg-fill /usr/share/backgrounds/More_Kamikochi_by_mendhak.jpg +# feh --bg-fill /usr/share/backgrounds/Grand_Canyon_North_Rim_by_Rihards_Vilks.jpg # Disable screen going to sleep xset -dpms xset s off +# Disable bell +xset -b + # SSH agent eval $(ssh-agent) diff --git a/zsh/.zshenv b/zsh/.zshenv index ae9fd6b..cb36a13 100644 --- a/zsh/.zshenv +++ b/zsh/.zshenv @@ -19,5 +19,5 @@ fi [[ -f "$HOME/.pythonrc" ]] && export PYTHONSTARTUP="$HOME/.pythonrc" # Source guix profile -guix_profile=$HOME/.guix-env -[[ -f $guix_profile ]] && . $guix_profile +# guix_profile=$HOME/.guix-env +# [[ -f $guix_profile ]] && . $guix_profile @@ -43,6 +43,7 @@ setopt inc_append_history setopt no_share_history # Completion +autoload -Uz compinit && compinit zstyle ':completion:*' matcher-list 'm:{a-zA-Z-_}={A-Za-z_-}' 'r:|=*' 'l:|=* r:|=*' # Kill word @@ -65,8 +66,8 @@ fi source "$HOME/.zsh/zgen/zgen.zsh" FZF_MARKS_PLUGIN_ZSH=$HOME/dotfiles/plugins/fzf-marks/fzf-marks.plugin.zsh -FZF_MARKS_COMMAND='fzf --height 40% --reverse -e' [ -f "$FZF_MARKS_PLUGIN_ZSH" ] && source "$FZF_MARKS_PLUGIN_ZSH" +FZF_MARKS_COMMAND="$FZF_MARKS_COMMAND -e -n 1 -d ' : '" if ! zgen saved; then echo "Creating a zgen save" @@ -172,9 +173,9 @@ alias mca='make clean-all' # Misc alias a='vifm . .' -alias ff='FreeFem++' alias m='cd ~/.mutt/attachments && mutt && cd -' alias e='nvim' +alias f='fzm' alias mux='tmuxinator' alias email='mbsync -a' alias renet='systemctl restart NetworkManager.service' |