summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Xresources/.Xresources/base2
-rwxr-xr-xbin/.local/bin/keyboard15
-rwxr-xr-xbin/.local/bin/workspace7
-rw-r--r--i3/.config/i3/config7
-rwxr-xr-xi3/.config/i3blocks/bin/battery15
-rw-r--r--i3/.config/i3blocks/config5
-rw-r--r--mutt/.gitignore3
-rw-r--r--mutt/.mail/Misc/.gitkeep0
-rw-r--r--mutt/.mail/Personal/.gitkeep0
-rw-r--r--mutt/.mail/Work/.gitkeep0
-rw-r--r--mutt/.mutt/id_personal2
-rw-r--r--mutt/.mutt/id_work8
-rw-r--r--vim/.vim/spell/en.utf-8.add1
-rw-r--r--vim/.vimrc105
-rwxr-xr-xxinit/.xinitrc5
-rw-r--r--zsh/.zshenv3
-rw-r--r--zsh/.zshrc2
17 files changed, 143 insertions, 37 deletions
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/bin/.local/bin/keyboard b/bin/.local/bin/keyboard
index b5d3900..ee1cc61 100755
--- a/bin/.local/bin/keyboard
+++ b/bin/.local/bin/keyboard
@@ -3,8 +3,9 @@
# Key repeat rate
xset r rate 400 50
-# Xcape settings
-killall -9 xcape
+# Kill xcape
+# ('pgrep -l xcape' can be used to list the processes)
+pkill xcape
# Compose key on left control
# https://vi.stackexchange.com/questions/2254/what-is-the-easiest-way-to-insert-unicode-characters-into-a-document
@@ -30,7 +31,7 @@ xcape -e 'Control_L=Escape'
xmodmap -e "keysym Print = Print Caps_Lock"
xmodmap -e "add Lock = Caps_Lock"
-# Make Shift (Shift, :)
+# Make Shift (Shift, :) (for vim)
xcape -e 'Shift_L=Shift_L|semicolon'
# Make Tab (Alt_L, Tab)
@@ -45,10 +46,10 @@ 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
xmodmap -e "keysym XF86Eject = Insert"
diff --git a/bin/.local/bin/workspace b/bin/.local/bin/workspace
index ad378ef..4f2ab67 100755
--- a/bin/.local/bin/workspace
+++ b/bin/.local/bin/workspace
@@ -1,13 +1,14 @@
#!/usr/bin/env bash
-# List of workspaces
+# List of workspaces: (id, number, name)
workspaces=$(i3-msg -t get_workspaces | awk 'BEGIN {
RS="(},{)|(\\[{)|(}\\])";
- FPAT="([^,:]+)|([^,]+{[^}]+})|(\"[^\"]+\")"
+ FPAT="([^,:\"]+)|([^,\"]+:[^,\"]+)|([^,]+{[^}]+})"
}
$0 !~ "^\\s*$" {
gsub(/"/, "", $4)
- print $2, $4, $8, $11
+ print $4, $6
+
}' | sort)
act_on_container() {
diff --git a/i3/.config/i3/config b/i3/.config/i3/config
index dc439fc..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
@@ -215,4 +217,7 @@ gaps outer 5
# Launch compositor
exec compton
+# Kill xcape if bug
+bindsym $mod+F3 exec --no-startup-id killall -9 xcape
+
# vim:filetype=i3
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/i3/.config/i3blocks/config b/i3/.config/i3blocks/config
index e736e7e..0f0c207 100644
--- a/i3/.config/i3blocks/config
+++ b/i3/.config/i3blocks/config
@@ -73,15 +73,16 @@ label=<span color='gray'></span>
command=echo $(free | grep '^Mem' | awk '{ printf "%3.0f%\n", 100*$3/$2 }')
interval=30
+# Requires i3blocks-contrib (AUR)
[diskhome]
label=<span color='gray'></span>
-command=/usr/lib/i3blocks/disk
+command=/usr/lib/i3blocks/disk/disk
instance=/home/urbain
interval=300
[diskroot]
label=<span color='gray'></span>
-command=/usr/lib/i3blocks/disk
+command=/usr/lib/i3blocks/disk/disk
instance=/
interval=300
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/vim/.vim/spell/en.utf-8.add b/vim/.vim/spell/en.utf-8.add
index 999f578..ddbe70a 100644
--- a/vim/.vim/spell/en.utf-8.add
+++ b/vim/.vim/spell/en.utf-8.add
@@ -61,3 +61,4 @@ unitarily
multimodal
Kalman
i.e.
+Stratonovich
diff --git a/vim/.vimrc b/vim/.vimrc
index 9e65bc0..4a3d951 100644
--- a/vim/.vimrc
+++ b/vim/.vimrc
@@ -66,17 +66,22 @@ Plug 'vim-scripts/gmsh.vim'
Plug 'wellle/targets.vim'
" Plug 'zchee/deoplete-clang'
+Plug 'liuchengxu/vim-which-key'
+
if isdirectory($HOME."/dotfiles/plugins")
Plug '~/dotfiles/plugins/vim-remembrall'
Plug '~/dotfiles/plugins/vim-tmux-pilot'
+ Plug '~/dotfiles/plugins/darjeeling'
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 'autozimu/LanguageClient-neovim', { 'do': 'bash install.sh', 'branch': 'next' }
" Plug 'zchee/deoplete-jedi'
- Plug 'hkupty/iron.nvim', { 'branch': 'legacy' }
+ " Plug 'hkupty/iron.nvim', { 'branch': 'legacy' }
+ Plug 'hkupty/iron.nvim'
+ Plug 'neovim/nvim-lsp'
else
Plug 'Shougo/neocomplete.vim'
endif
@@ -91,17 +96,18 @@ Plug 'junegunn/seoul256.vim'
Plug 'romainl/Apprentice'
Plug 'joshdick/onedark.vim'
" Plug 'josuegaleas/jay'
+
+" Plug 'neoclide/coc.nvim', {'branch': 'release'}
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 <nowait> <expr> cp Remembrall('cp')
+nnoremap <expr> cp Remembrall('cp')
" Easy motion
map gs <Plug>(easymotion-prefix)
@@ -137,11 +143,31 @@ nnoremap <silent> gh :set opfunc=Call_heytmux<cr>g@
xnoremap <silent> gh :Heytmux!<cr>
" Iron
+if has("nvim")
+ let g:iron_map_defaults=0
+ let g:iron_map_extended=0
+ nnoremap cpr :IronRepl<cr>
+ nmap yr <Plug>(iron-send-motion)
+ xmap R <Plug>(iron-send-motion)
+ nmap yp <Plug>(iron-repeat-cmd)
+ nmap yrr VR
+
+lua << EOF
+local iron = require("iron")
+
+local open_repl = function(buffer)
+ vim.api.nvim_command('vnew')
+end
+
+iron.core.set_config{
+ preferred = {
+ python = "ipython"
+ },
+ repl_open_cmd = open_repl
+}
+EOF
" 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
+endif
" Easy align
xmap ga <Plug>(EasyAlign)
@@ -161,12 +187,12 @@ nnoremap ,pc :PlugClean<cr>
if &runtimepath =~ 'remembrall'
let g:remembrall_auto_accept = 0
nnoremap <buffer> <nowait> <expr> ,p Remembrall(',p')
- nnoremap <silent> ,, :call remembrall#remind('n', '')<cr>
- nnoremap <silent> y :<c-u>call remembrall#remind('n', 'y')<cr>
+ nnoremap <silent> <expr> ,, Remembrall('')
augroup remembrall
autocmd FileType tex nnoremap <buffer> <silent> <expr> ,l Remembrall(',l')
augroup END
endif
+let g:remembrall_suffixes = [""]
" LanguageClient
if executable('pyls')
@@ -195,6 +221,8 @@ let g:neomake_gcc_args=[
\ '-I.', '-I..', '-I../..'
\ ]
+let g:neomake_python_enabled_makers = ['python', 'pylint']
+
" Deoplete
let g:deoplete#enable_at_startup = 1
let g:deoplete#sources#jedi#show_docstring = 1
@@ -246,6 +274,7 @@ let g:vimtex_syntax_enabled=1
" 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>'
@@ -302,6 +331,7 @@ set foldmethod=marker
set hidden
set ignorecase
set lazyredraw
+set laststatus=2
set mouse=a
set nojoinspaces
set nowrap
@@ -352,7 +382,7 @@ nnoremap ,th :-tabmove<cr>
nnoremap ,t0 :tabmove 0<cr>
nnoremap ,t$ :tabmove<cr>
-nnoremap <Leader>c :!rm ~/.vim/swap/\%*<cr>
+nnoremap <Leader>c :call delete($HOME."/.vim/swap/".substitute(expand('%:p'), '/', '%', 'g').".swp")<cr>
nnoremap <Leader>r :Start %:p<cr>
nnoremap <Leader>R :Start! %:p<cr>
@@ -408,6 +438,7 @@ 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>
+set notermguicolors
colo seoul256
"" Autocommands {{{1
@@ -557,9 +588,10 @@ 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, '&signcolumn', 'no')
+ call setbufvar(buf, '&laststatus', '1')
let height = &lines - 10
let width = float2nr(&columns - (&columns * 2 / 10))
@@ -574,4 +606,53 @@ function! FloatingFZF()
\ }
call nvim_open_win(buf, v:true, opts)
+ call setbufvar(buf, '&laststatus', '2')
endfunction
+
+" highlight default link LspDiagnosticsError Delimiter
+" highlight default link LspDiagnosticsWarning Delimiter
+" lua << EOF
+" require'nvim_lsp'.pyls.setup{}
+" EOF
+
+" Default Values:
+" cmd = { "pyls" }
+" filetypes = { "python" }
+" log_level = 2
+" root_dir = vim's starting directory
+" settings = {}
+
+" 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
+
+" lua <<EOF
+" vim.lsp.start_client({"pyls"})
+" EOF
+" nvim_lsp = require('nvim_lsp')
+" print(nvim_lsp.skeleton)
+
+autocmd Filetype python setl 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>
+
+" 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>
diff --git a/xinit/.xinitrc b/xinit/.xinitrc
index 20b5aee..4a3c018 100755
--- a/xinit/.xinitrc
+++ b/xinit/.xinitrc
@@ -11,12 +11,15 @@ source $HOME/.local/colors.zsh
xrdb $HOME/.Xresources/$COLORSCHEME
# Background
-feh --bg-fill /home/urbain/Documents/wallpapers/pagoda.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 7991bf1..cb36a13 100644
--- a/zsh/.zshenv
+++ b/zsh/.zshenv
@@ -8,6 +8,9 @@ export -U PATH="/usr/local/sbin${PATH:+:}$PATH"
export -U PATH="/usr/bin${PATH:+:}$PATH"
export -U PATH="/usr/local/sbin:/usr/local/bin${PATH:+:}$PATH"
+# Necessary for fenics to work
+export PYTHONPATH="/usr/lib/python3.7/site-packages/:/usr/lib/python3.8/site-packages/"
+
if [[ -d "$HOME/.gem/ruby" ]]; then
export -U PATH=$(echo "$HOME/.gem/ruby/"*"/bin")"${PATH:+:}$PATH"
fi
diff --git a/zsh/.zshrc b/zsh/.zshrc
index cc2e1ad..e54be1c 100644
--- a/zsh/.zshrc
+++ b/zsh/.zshrc
@@ -172,9 +172,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'