From 8df9472e0cdbab0d12211c2bc77918e8f515c409 Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Sat, 8 Aug 2015 20:08:42 +0200 Subject: Improve installation and organization --- .Xresources/base | 53 +++ .Xresources/dark | 28 ++ .Xresources/light | 28 ++ .Xresources/seoul | 29 ++ .bashrc | 117 ++++++ .ctags | 9 + .git_template/hooks/ctags | 8 + .git_template/hooks/post-checkout | 2 + .git_template/hooks/post-commit | 2 + .git_template/hooks/post-merge | 2 + .git_template/hooks/post-rewrite | 4 + .gitconfig | 15 + .gitignore | 34 +- .grmrc | 44 +++ .i3/config | 201 +++++++++++ .i3/config.bak | 156 ++++++++ .i3/config.working | 176 +++++++++ .i3/i3-init | 3 + .inputrc | 2 + .latexmkrc | 5 + .msmtprc | 22 ++ .mutt/.maillog | 230 ++++++++++++ .mutt/alias | 21 ++ .mutt/mailboxes | 1 + .mutt/mailcap | 3 + .mutt/muttrc | 99 +++++ .ncmpcpp/config | 493 +++++++++++++++++++++++++ .ncmpcpp/error.log | 0 .notes/Notes | 23 ++ .offlineimap/offlineimap.py | 12 + .offlineimap/offlineimaprc | 76 ++++ .passwords/gmail.asc | 18 + .passwords/hotmail.asc | 18 + .passwords/imperial.asc | 18 + .passwords/main.asc | 18 + .tmux.conf | 42 +++ .urxvt/ext/clipboard | 115 ++++++ .urxvt/ext/fullscreen | 7 + .urxvt/ext/keyboard-select | 586 ++++++++++++++++++++++++++++++ .urxvt/ext/rotate-colors | 92 +++++ .urxvt/ext/url-select | 403 +++++++++++++++++++++ .uzbl/config | 499 ++++++++++++++++++++++++++ .uzbl/scripts/goup.pl | 24 ++ .uzbl/style.css | 35 ++ .vifm/colors/default | 52 +++ .vifm/colors/matrix | 21 ++ .vifm/colorschemes | 37 ++ .vifm/vifm-help.txt | 226 ++++++++++++ .vifm/vifmrc | 126 +++++++ .vifm/vifmrc.bak | 108 ++++++ .vim/after/ftplugin/tex/folding.vim | 0 .vim/after/ftplugin/tex/mappings.vim | 59 +++ .vim/after/ftplugin/tex/unilatex.vim | 675 +++++++++++++++++++++++++++++++++++ .vim/after/ftplugin/vim/folding.vim | 25 ++ .vim/after/syntax/cpp.vim | 3 + .vim/after/syntax/cpp.vim~ | 0 .vim/after/syntax/tex.vim | 6 + .vim/after/syntax/tex.vim~ | 6 + .vim/colors/mine.vim | 29 ++ .vim/colors/mine.vim~ | 29 ++ .vim/mySnippets/all.snippets | 25 ++ .vim/mySnippets/cpp.snippets | 35 ++ .vim/mySnippets/mail.snippets | 33 ++ .vim/mySnippets/python.snippets | 4 + .vim/mySnippets/tex.snippets | 110 ++++++ .vim/mySnippets/vim.snippets | 0 .vim/spell/en.utf-8.add | 28 ++ .vim/spell/en.utf-8.add.spl | Bin 0 -> 462 bytes .vim/spell/en.utf-8.spl | Bin 0 -> 570549 bytes .vim/spell/en.utf-8.sug | Bin 0 -> 556477 bytes .vim/vimrc | 314 ++++++++++++++++ .xinitrc | 17 + .zathurarc | 2 + .zsh/zsh-aliases | 54 +++ .zsh/zsh-functions | 31 ++ .zsh/zsh-plugins | 59 +++ .zsh/zsh-tmp | 1 + .zsh/zshrc | 77 ++++ Xresources/Xresources | 53 --- Xresources/Xresources.dark | 28 -- Xresources/Xresources.default | 29 -- Xresources/Xresources.light | 28 -- bashrc | 117 ------ config/uzbl/config | 496 ------------------------- config/uzbl/style.css | 35 -- crontab | 1 - ctags | 9 - git_template/hooks/ctags | 8 - git_template/hooks/post-checkout | 2 - git_template/hooks/post-commit | 2 - git_template/hooks/post-merge | 2 - git_template/hooks/post-rewrite | 4 - gitconfig | 15 - i3/config | 201 ----------- i3/config.bak | 156 -------- i3/config.working | 176 --------- i3/i3-init | 3 - inputrc | 2 - install.sh | 114 +++--- latexmkrc | 5 - msmtprc | 22 -- mutt/.maillog | 230 ------------ mutt/mailboxes | 1 - mutt/mailcap | 3 - mutt/muttrc | 99 ----- ncmpcpp/config | 493 ------------------------- ncmpcpp/error.log | 0 notes/Notes | 23 -- nvim | 1 - nvimrc | 1 - offlineimap.py | 12 - offlineimaprc | 76 ---- passwords/gmail.asc | 18 - passwords/hotmail.asc | 18 - passwords/imperial.asc | 18 - passwords/main.asc | 18 - repos.zsh | 44 --- tmux.conf | 42 --- urxvt/ext/clipboard | 115 ------ urxvt/ext/fullscreen | 7 - urxvt/ext/keyboard-select | 586 ------------------------------ urxvt/ext/rotate-colors | 92 ----- urxvt/ext/url-select | 403 --------------------- vifm/colors/default | 52 --- vifm/colors/matrix | 21 -- vifm/colorschemes | 37 -- vifm/vifm-help.txt | 226 ------------ vifm/vifmrc | 126 ------- vifm/vifmrc.bak | 108 ------ vim/after/ftplugin/tex/folding.vim | 0 vim/after/ftplugin/tex/mappings.vim | 59 --- vim/after/ftplugin/tex/unilatex.vim | 675 ----------------------------------- vim/after/ftplugin/vim/folding.vim | 25 -- vim/after/syntax/cpp.vim | 3 - vim/after/syntax/cpp.vim~ | 0 vim/after/syntax/tex.vim | 6 - vim/after/syntax/tex.vim~ | 6 - vim/bundle/vundle | 1 - vim/colors/mine.vim | 29 -- vim/colors/mine.vim~ | 29 -- vim/mySnippets/all.snippets | 25 -- vim/mySnippets/cpp.snippets | 35 -- vim/mySnippets/mail.snippets | 33 -- vim/mySnippets/python.snippets | 4 - vim/mySnippets/tex.snippets | 110 ------ vim/mySnippets/vim.snippets | 0 vim/spell/en.utf-8.add | 28 -- vim/spell/en.utf-8.add.spl | Bin 462 -> 0 bytes vim/spell/en.utf-8.spl | Bin 570549 -> 0 bytes vim/spell/en.utf-8.sug | Bin 556477 -> 0 bytes vimrc | 315 ---------------- xinitrc | 16 - zathurarc | 2 - zsh/zsh-aliases | 54 --- zsh/zsh-functions | 31 -- zsh/zsh-plugins | 59 --- zsh/zsh-tmp | 1 - zshrc | 78 ---- 158 files changed, 6018 insertions(+), 5949 deletions(-) create mode 100644 .Xresources/base create mode 100644 .Xresources/dark create mode 100644 .Xresources/light create mode 100644 .Xresources/seoul create mode 100644 .bashrc create mode 100644 .ctags create mode 100755 .git_template/hooks/ctags create mode 100755 .git_template/hooks/post-checkout create mode 100755 .git_template/hooks/post-commit create mode 100755 .git_template/hooks/post-merge create mode 100755 .git_template/hooks/post-rewrite create mode 100644 .gitconfig create mode 100644 .grmrc create mode 100644 .i3/config create mode 100644 .i3/config.bak create mode 100644 .i3/config.working create mode 100755 .i3/i3-init create mode 100644 .inputrc create mode 100644 .latexmkrc create mode 100644 .msmtprc create mode 100644 .mutt/.maillog create mode 100644 .mutt/alias create mode 100644 .mutt/mailboxes create mode 100644 .mutt/mailcap create mode 100644 .mutt/muttrc create mode 100644 .ncmpcpp/config create mode 100644 .ncmpcpp/error.log create mode 100644 .notes/Notes create mode 100644 .offlineimap/offlineimap.py create mode 100644 .offlineimap/offlineimaprc create mode 100644 .passwords/gmail.asc create mode 100644 .passwords/hotmail.asc create mode 100644 .passwords/imperial.asc create mode 100644 .passwords/main.asc create mode 100644 .tmux.conf create mode 100644 .urxvt/ext/clipboard create mode 100644 .urxvt/ext/fullscreen create mode 100644 .urxvt/ext/keyboard-select create mode 100644 .urxvt/ext/rotate-colors create mode 100644 .urxvt/ext/url-select create mode 100644 .uzbl/config create mode 100755 .uzbl/scripts/goup.pl create mode 100644 .uzbl/style.css create mode 100644 .vifm/colors/default create mode 100644 .vifm/colors/matrix create mode 100644 .vifm/colorschemes create mode 100644 .vifm/vifm-help.txt create mode 100644 .vifm/vifmrc create mode 100644 .vifm/vifmrc.bak create mode 100644 .vim/after/ftplugin/tex/folding.vim create mode 100644 .vim/after/ftplugin/tex/mappings.vim create mode 100644 .vim/after/ftplugin/tex/unilatex.vim create mode 100644 .vim/after/ftplugin/vim/folding.vim create mode 100644 .vim/after/syntax/cpp.vim create mode 100644 .vim/after/syntax/cpp.vim~ create mode 100644 .vim/after/syntax/tex.vim create mode 100644 .vim/after/syntax/tex.vim~ create mode 100644 .vim/colors/mine.vim create mode 100644 .vim/colors/mine.vim~ create mode 100644 .vim/mySnippets/all.snippets create mode 100644 .vim/mySnippets/cpp.snippets create mode 100644 .vim/mySnippets/mail.snippets create mode 100644 .vim/mySnippets/python.snippets create mode 100644 .vim/mySnippets/tex.snippets create mode 100644 .vim/mySnippets/vim.snippets create mode 100644 .vim/spell/en.utf-8.add create mode 100644 .vim/spell/en.utf-8.add.spl create mode 100644 .vim/spell/en.utf-8.spl create mode 100644 .vim/spell/en.utf-8.sug create mode 100644 .vim/vimrc create mode 100755 .xinitrc create mode 100644 .zathurarc create mode 100644 .zsh/zsh-aliases create mode 100644 .zsh/zsh-functions create mode 100644 .zsh/zsh-plugins create mode 100644 .zsh/zsh-tmp create mode 100644 .zsh/zshrc delete mode 100644 Xresources/Xresources delete mode 100644 Xresources/Xresources.dark delete mode 100644 Xresources/Xresources.default delete mode 100644 Xresources/Xresources.light delete mode 100644 bashrc delete mode 100644 config/uzbl/config delete mode 100644 config/uzbl/style.css delete mode 100644 crontab delete mode 100644 ctags delete mode 100755 git_template/hooks/ctags delete mode 100755 git_template/hooks/post-checkout delete mode 100755 git_template/hooks/post-commit delete mode 100755 git_template/hooks/post-merge delete mode 100755 git_template/hooks/post-rewrite delete mode 100644 gitconfig delete mode 100644 i3/config delete mode 100644 i3/config.bak delete mode 100644 i3/config.working delete mode 100755 i3/i3-init delete mode 100644 inputrc delete mode 100644 latexmkrc delete mode 100644 msmtprc delete mode 100644 mutt/.maillog delete mode 100644 mutt/mailboxes delete mode 100644 mutt/mailcap delete mode 100644 mutt/muttrc delete mode 100644 ncmpcpp/config delete mode 100644 ncmpcpp/error.log delete mode 100644 notes/Notes delete mode 120000 nvim delete mode 120000 nvimrc delete mode 100644 offlineimap.py delete mode 100644 offlineimaprc delete mode 100644 passwords/gmail.asc delete mode 100644 passwords/hotmail.asc delete mode 100644 passwords/imperial.asc delete mode 100644 passwords/main.asc delete mode 100644 repos.zsh delete mode 100644 tmux.conf delete mode 100644 urxvt/ext/clipboard delete mode 100644 urxvt/ext/fullscreen delete mode 100644 urxvt/ext/keyboard-select delete mode 100644 urxvt/ext/rotate-colors delete mode 100644 urxvt/ext/url-select delete mode 100644 vifm/colors/default delete mode 100644 vifm/colors/matrix delete mode 100644 vifm/colorschemes delete mode 100644 vifm/vifm-help.txt delete mode 100644 vifm/vifmrc delete mode 100644 vifm/vifmrc.bak delete mode 100644 vim/after/ftplugin/tex/folding.vim delete mode 100644 vim/after/ftplugin/tex/mappings.vim delete mode 100644 vim/after/ftplugin/tex/unilatex.vim delete mode 100644 vim/after/ftplugin/vim/folding.vim delete mode 100644 vim/after/syntax/cpp.vim delete mode 100644 vim/after/syntax/cpp.vim~ delete mode 100644 vim/after/syntax/tex.vim delete mode 100644 vim/after/syntax/tex.vim~ delete mode 160000 vim/bundle/vundle delete mode 100644 vim/colors/mine.vim delete mode 100644 vim/colors/mine.vim~ delete mode 100644 vim/mySnippets/all.snippets delete mode 100644 vim/mySnippets/cpp.snippets delete mode 100644 vim/mySnippets/mail.snippets delete mode 100644 vim/mySnippets/python.snippets delete mode 100644 vim/mySnippets/tex.snippets delete mode 100644 vim/mySnippets/vim.snippets delete mode 100644 vim/spell/en.utf-8.add delete mode 100644 vim/spell/en.utf-8.add.spl delete mode 100644 vim/spell/en.utf-8.spl delete mode 100644 vim/spell/en.utf-8.sug delete mode 100644 vimrc delete mode 100755 xinitrc delete mode 100644 zathurarc delete mode 100644 zsh/zsh-aliases delete mode 100644 zsh/zsh-functions delete mode 100644 zsh/zsh-plugins delete mode 100644 zsh/zsh-tmp delete mode 100644 zshrc diff --git a/.Xresources/base b/.Xresources/base new file mode 100644 index 0000000..96582a7 --- /dev/null +++ b/.Xresources/base @@ -0,0 +1,53 @@ +! XTERM ! + +! Appearance xterm +*xterm*faceName: Monaco +*xterm*faceSize: 11 +*xterm*background: Black +*xterm*foreground: White +*xterm*cursorColor: Green + +! Copy-paste support +XTerm*selectToClipboard: true + +! URXVT ! + +! General settings +URxvt.loginShell : true +URxvt.termName : rxvt-256color + +! Custom META key +URxvt*modifier: alt + +! Copy-paste configuration +URxvt.clipboard.copycmd: xclip -i -selection clipboard +URxvt.clipboard.pastecmd: xclip -o -selection clipboard + +! Perl extensions configuration +URxvt.perl-ext-common: default,clipboard,url-select,keyboard-select,fullscreen +URxvt.url-select.launcher: /usr/bin/uzbl +URxvt.url-select.underline: true + +! Key bindings for extensions +URxvt.keysym.M-Escape: perl:keyboard-select:activate +URxvt.keysym.M-s: perl:keyboard-select:search +URxvt.keysym.M-u: perl:url-select:select_next +URxvt.keysym.M-y: perl:clipboard:copy +URxvt.keysym.M-p: perl:clipboard:paste +URxvt.keysym.F11: perl:fullscreen:switch + +! Appearance +! URxvt*font: xft:DejaVu Sans Mono:size=12 +URxvt*font: xft:monaco:size=11:antialias=false +URxvt*scrollBar: false +URxvt*internalBorder: 0 + +! True transparency +URxvt.depth: 32 + +! Font configuration +! Xft.dpi: 96 +! Xft.antialias: false +! Xft.hinting: true +! Xft.rgba: rgb +! Xft.hintstyle: hintslight diff --git a/.Xresources/dark b/.Xresources/dark new file mode 100644 index 0000000..5f28203 --- /dev/null +++ b/.Xresources/dark @@ -0,0 +1,28 @@ +# include "/home/urbain/.Xresources/base" + +URxvt.borderColor: #002b36 + +*background: #002b36 +*foreground: #839496 +*fadeColor: #002b36 +*cursorColor: #93a1a1 + +*pointerColorBackground: #586e75 +*pointerColorForeground: #93a1a1 + +*color0: #073642 +*color8: #002b36 +*color1: #dc322f +*color9: #cb4b16 +*color2: #859900 +*color10: #586e75 +*color3: #b58900 +*color11: #657b83 +*color4: #268bd2 +*color12: #839496 +*color5: #d33682 +*color13: #6c71c4 +*color6: #2aa198 +*color14: #93a1a1 +*color7: #eee8d5 +*color15: #fdf6e3 diff --git a/.Xresources/light b/.Xresources/light new file mode 100644 index 0000000..f1e1342 --- /dev/null +++ b/.Xresources/light @@ -0,0 +1,28 @@ +# include "/home/urbain/.Xresources/base" + +URxvt.borderColor: #fdf6e3 + +*background: #fdf6e3 +*foreground: #657b83 +*fadeColor: #fdf6e3 +*cursorColor: #586e75 + +*pointerColorBackground: #93a1a1 +*pointerColorForeground: #586e75 + +*color0: #073642 +*color8: #002b36 +*color1: #dc322f +*color9: #cb4b16 +*color2: #859900 +*color10: #586e75 +*color3: #b58900 +*color11: #657b83 +*color4: #268bd2 +*color12: #839496 +*color5: #d33682 +*color13: #6c71c4 +*color6: #2aa198 +*color14: #93a1a1 +*color7: #eee8d5 +*color15: #fdf6e3 diff --git a/.Xresources/seoul b/.Xresources/seoul new file mode 100644 index 0000000..52e17e9 --- /dev/null +++ b/.Xresources/seoul @@ -0,0 +1,29 @@ +# include "/home/urbain/.Xresources/base" + +! Border color +URxvt.borderColor: #3a3a3a + +! Background / Foreground +URxvt*background: #3a3a3a +URxvt*foreground: #d0d0d0 + +! Other colors +URxvt*color0: #4e4e4e +URxvt*color1: #d68787 +URxvt*color2: #5f865f +URxvt*color3: #d8af5f +URxvt*color4: #85add4 +URxvt*color5: #d7afaf +URxvt*color6: #87afaf +URxvt*color7: #d0d0d0 +URxvt*color8: #626262 +URxvt*color9: #d75f87 +URxvt*color10: #87af87 +URxvt*color11: #ffd787 +URxvt*color12: #add4fb +URxvt*color13: #ffafaf +URxvt*color14: #87d7d7 +URxvt*color15: #e4e4e4 +URxvt*cursorColor: #d0d0d0 +URxvt*cursorColor2: #3a3a3a +URxvt*colorBD: #e4e4e4 diff --git a/.bashrc b/.bashrc new file mode 100644 index 0000000..0519eef --- /dev/null +++ b/.bashrc @@ -0,0 +1,117 @@ +# ~/.bashrc: executed by bash(1) for non-login shells. +# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) +# for examples + +# If not running interactively, don't do anything +case $- in + *i*) ;; + *) return;; +esac + +# don't put duplicate lines or lines starting with space in the history. +# See bash(1) for more options +HISTCONTROL=ignoreboth + +# append to the history file, don't overwrite it +shopt -s histappend + +# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) +HISTSIZE=1000 +HISTFILESIZE=2000 + +# check the window size after each command and, if necessary, +# update the values of LINES and COLUMNS. +shopt -s checkwinsize + +# If set, the pattern "**" used in a pathname expansion context will +# match all files and zero or more directories and subdirectories. +#shopt -s globstar + +# make less more friendly for non-text input files, see lesspipe(1) +[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" + +# set variable identifying the chroot you work in (used in the prompt below) +if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then + debian_chroot=$(cat /etc/debian_chroot) +fi + +# set a fancy prompt (non-color, unless we know we "want" color) +case "$TERM" in + xterm-color) color_prompt=yes;; +esac + +# uncomment for a colored prompt, if the terminal has the capability; turned +# off by default to not distract the user: the focus in a terminal window +# should be on the output of commands, not on the prompt +#force_color_prompt=yes + +if [ -n "$force_color_prompt" ]; then + if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then + # We have color support; assume it's compliant with Ecma-48 + # (ISO/IEC-6429). (Lack of such support is extremely rare, and such + # a case would tend to support setf rather than setaf.) + color_prompt=yes + else + color_prompt= + fi +fi + +if [ "$color_prompt" = yes ]; then + PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' +else + PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' +fi +unset color_prompt force_color_prompt + +# If this is an xterm set the title to user@host:dir +case "$TERM" in +xterm*|rxvt*) + PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" + ;; +*) + ;; +esac + +# enable color support of ls and also add handy aliases +if [ -x /usr/bin/dircolors ]; then + test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" + alias ls='ls --color=auto' + #alias dir='dir --color=auto' + #alias vdir='vdir --color=auto' + + alias grep='grep --color=auto' + alias fgrep='fgrep --color=auto' + alias egrep='egrep --color=auto' +fi + +# some more ls aliases +alias ll='ls -alF' +alias la='ls -A' +alias l='ls -CF' + +# Add an "alert" alias for long running commands. Use like so: +# sleep 10; alert +alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' + +# Alias definitions. +# You may want to put all your additions into a separate file like +# ~/.bash_aliases, instead of adding them here directly. +# See /usr/share/doc/bash-doc/examples in the bash-doc package. + +if [ -f ~/.bash_aliases ]; then + . ~/.bash_aliases +fi + +# enable programmable completion features (you don't need to enable +# this, if it's already enabled in /etc/bash.bashrc and /etc/profile +# sources /etc/bash.bashrc). +if ! shopt -oq posix; then + if [ -f /usr/share/bash-completion/bash_completion ]; then + . /usr/share/bash-completion/bash_completion + elif [ -f /etc/bash_completion ]; then + . /etc/bash_completion + fi +fi + +source ~/github/fzf-marks/fzf-marks.plugin.bash +[ -f ~/.fzf.bash ] && source ~/.fzf.bash diff --git a/.ctags b/.ctags new file mode 100644 index 0000000..0c334fb --- /dev/null +++ b/.ctags @@ -0,0 +1,9 @@ +--langdef=latex +--langmap=latex:.tex +--regex-latex=/\\label\{([^}]*)\}/\1/l,label/ +--regex-latex=/\\section\{([^}]*)\}/\1/s,section/ +--regex-latex=/\\subsection\{([^}]*)\}/\1/t,subsection/ +--regex-latex=/\\subsubsection\{([^}]*)\}/\1/u,subsubsection/ +--regex-latex=/\\section\*\{([^}]*)\}/\1/s,section/ +--regex-latex=/\\subsection\*\{([^}]*)\}/\1/t,subsection/ +--regex-latex=/\\subsubsection\*\{([^}]*)\}/\1/u,subsubsection/ diff --git a/.git_template/hooks/ctags b/.git_template/hooks/ctags new file mode 100755 index 0000000..a9a2150 --- /dev/null +++ b/.git_template/hooks/ctags @@ -0,0 +1,8 @@ +#!/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 -L - -f"$dir/$$.tags" --languages=-javascript,sql +mv "$dir/$$.tags" "$dir/tags" + diff --git a/.git_template/hooks/post-checkout b/.git_template/hooks/post-checkout new file mode 100755 index 0000000..84f17ed --- /dev/null +++ b/.git_template/hooks/post-checkout @@ -0,0 +1,2 @@ +#!/bin/sh +.git/hooks/ctags >/dev/null 2>&1 & diff --git a/.git_template/hooks/post-commit b/.git_template/hooks/post-commit new file mode 100755 index 0000000..84f17ed --- /dev/null +++ b/.git_template/hooks/post-commit @@ -0,0 +1,2 @@ +#!/bin/sh +.git/hooks/ctags >/dev/null 2>&1 & diff --git a/.git_template/hooks/post-merge b/.git_template/hooks/post-merge new file mode 100755 index 0000000..84f17ed --- /dev/null +++ b/.git_template/hooks/post-merge @@ -0,0 +1,2 @@ +#!/bin/sh +.git/hooks/ctags >/dev/null 2>&1 & diff --git a/.git_template/hooks/post-rewrite b/.git_template/hooks/post-rewrite new file mode 100755 index 0000000..fe8972d --- /dev/null +++ b/.git_template/hooks/post-rewrite @@ -0,0 +1,4 @@ +#!/bin/sh +case "$1" in + rebase) exec .git/hooks/post-merge ;; +esac diff --git a/.gitconfig b/.gitconfig new file mode 100644 index 0000000..5afe4c8 --- /dev/null +++ b/.gitconfig @@ -0,0 +1,15 @@ +[user] + name = Urbain Vaes + email = u.vaes13@imperial.ac.uk +[init] + templatedir = ~/.git_template +[alias] + ctags = !.git/hooks/ctags +[push] + default = simple +[status] + submodulesummary = 1 +[alias] + sdiff = !git diff && git submodule foreach 'git diff' + spush = push --recurse-submodules=on-demand + supdate = submodule update --remote --merge diff --git a/.gitignore b/.gitignore index 111c00b..5606b25 100644 --- a/.gitignore +++ b/.gitignore @@ -1,17 +1,17 @@ -mutt/cache/ -mutt/cache/ -mutt/cache/headers -mutt/mailboxes/ -mutt/mutt-colors-solarized/ -mutt/temp/ -newsbeuter -vim/netrwhist -vim/autoload/ -vim/plugged/ -vim/vim-plug/ -vim/vimundo/ -vifm/Trash -vifm/vifminfo -vifm/vimfiles -nvim/.netrwhist -vim/.netrwhist +.mutt/cache/ +.mutt/cache/ +.mutt/cache/headers +.mutt/mailboxes/ +.mutt/mutt-colors-solarized/ +.mutt/temp/ +.newsbeuter +.vim/netrwhist +.vim/autoload/ +.vim/plugged/ +.vim/vim-plug/ +.vim/vimundo/ +.vifm/Trash +.vifm/vifminfo +.vifm/vimfiles +.nvim/.netrwhist +.vim/.netrwhist diff --git a/.grmrc b/.grmrc new file mode 100644 index 0000000..95b0fa2 --- /dev/null +++ b/.grmrc @@ -0,0 +1,44 @@ +declare -A repodirs +declare -A install +declare -A uninstall + +# General purpose +repodirs[icholy/ttygif]=/home/urbain/github/ttygif + +# Solarized +repodirs[altercation/mutt-colors-solarized]=/home/urbain/github/mutt-colors-solarized + +# My plugins +repodirs[uvaes/fzf-marks]=/home/urbain/github/fzf-marks +repodirs[uvaes/grm]=/home/urbain/github/grm + +# fzf-related +repodirs[junegunn/fzf]=/home/urbain/.fzf +repodirs[atweiden/fzf-extras]=/home/urbain/github/fzf-extras + +# Plugin managers +repodirs[junegunn/vim-plug]=/home/urbain/.vim/vim-plug +repodirs[tmux-plugins/tpm]=/home/urbain/.tmux/plugins/tpm +# repodirs[tarjoilija/zgen]=/home/urbain/.zgen + +# Experimental +repodirs[adbrebs/taxi]=/home/urbain/github/adbrebs/taxi +repodirs[adbrebs/meg]=/home/urbain/github/adbrebs/meg +repodirs[adbrebs/brain_segmentation]=/home/urbain/github/adbrebs/brain_segmentation + +# Installation +function after_vimplug { + cd .. + rm -rf autoload + mkdir -p autoload + cd autoload + ln -s ../vim-plug/plug.vim; +} + +# Installation instructions +install[icholy/ttygif]='make' +install[junegunn/fzf]='./install' +install[junegunn/vim-plug]='after_vimplug' + +# Uninstall +uninstall[junegunn/fzf]='./uninstall' diff --git a/.i3/config b/.i3/config new file mode 100644 index 0000000..e8b0ff0 --- /dev/null +++ b/.i3/config @@ -0,0 +1,201 @@ +set $w1 1|www +set $w2 2|mail +set $w3 3|latex +set $w4 4|code +set $w5 5|work +set $w6 6|fun +set $w7 7|fun +set $w8 8|work +set $w9 9|todo +set $w10 10|conf + +# This file has been auto-generated by i3-config-wizard(1). +# It will not be overwritten, so edit it as you like. +# +# Should you change your keyboard layout some time, delete +# this file and re-run i3-config-wizard(1). +# + +# i3 config file (v4) +# +# Please see http://i3wm.org/docs/userguide.html for a complete reference! + +set $mod Mod1 + +# Font for window titles. Will also be used by the bar unless a different font +# 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 8 +# 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 +# clear in small sizes. However, its unicode glyph coverage is limited, the old +# X core fonts rendering does not support right-to-left and this being a bitmap +# font, it doesn’t scale on retina/hidpi displays. + +# Use Mouse+$mod to drag floating windows to their wanted position +floating_modifier $mod + +# start a terminal +bindsym $mod+Return exec i3-sensible-terminal + +# kill focused window +bindsym $mod+d kill + +# start dmenu (a program launcher) +bindsym $mod+p exec dmenu_run +# There also is the (new) i3-dmenu-desktop which only displays applications +# shipping a .desktop file. It is a wrapper around dmenu, so you need that +# installed. +# bindsym $mod+p exec --no-startup-id i3-dmenu-desktop + +# change focus +bindsym $mod+h focus left +bindsym $mod+j focus down +bindsym $mod+k focus up +bindsym $mod+l focus right + +# alternatively, you can use the cursor keys: +bindsym $mod+Left focus left +bindsym $mod+Down focus down +bindsym $mod+Up focus up +bindsym $mod+Right focus right + +# move focused window +bindsym $mod+Shift+h move left +bindsym $mod+Shift+j move down +bindsym $mod+Shift+k move up +bindsym $mod+Shift+l move right + +# alternatively, you can use the cursor keys: +bindsym $mod+Shift+Left move left +bindsym $mod+Shift+Down move down +bindsym $mod+Shift+Up move up +bindsym $mod+Shift+Right move right + +# split in horizontal orientation +bindsym $mod+v split h + +# split in vertical orientation +bindsym $mod+w split v + +# enter fullscreen mode for the focused container +bindsym $mod+f fullscreen + +# change container layout (stacked, tabbed, toggle split) +bindsym $mod+g layout stacking +bindsym $mod+t layout tabbed +bindsym $mod+s layout toggle split + +# toggle tiling / floating +bindsym $mod+Shift+space floating toggle + +# change focus between tiling / floating windows +bindsym $mod+space focus mode_toggle + +# focus the parent container +bindsym $mod+a focus parent + +# focus the child container +bindsym $mod+c focus child + +# move the currently focused window to the scratchpad +bindsym $mod+Shift+minus move scratchpad + +# Show the next scratchpad window or hide the focused scratchpad window. +# If there are multiple scratchpad windows, this command cycles through them. +bindsym $mod+minus scratchpad show + +# switch to workspace +bindsym $mod+ampersand workspace $w1 +bindsym $mod+bracketleft workspace $w2 +bindsym $mod+braceleft workspace $w3 +bindsym $mod+braceright workspace $w4 +bindsym $mod+parenleft workspace $w5 +bindsym $mod+equal workspace $w6 +bindsym $mod+asterisk workspace $w7 +bindsym $mod+parenright workspace $w8 +bindsym $mod+plus workspace $w9 +bindsym $mod+bracketright workspace $w10 + +# move focused container to workspace +bindsym $mod+Shift+ampersand move container to workspace $w1 +bindsym $mod+Shift+bracketleft move container to workspace $w2 +bindsym $mod+Shift+braceleft move container to workspace $w3 +bindsym $mod+Shift+braceright move container to workspace $w4 +bindsym $mod+Shift+1 move container to workspace $w5 +bindsym $mod+Shift+equal move container to workspace $w6 +bindsym $mod+Shift+asterisk move container to workspace $w7 +bindsym $mod+Shift+2 move container to workspace $w8 +bindsym $mod+Shift+plus move container to workspace $w9 +bindsym $mod+Shift+bracketright move container to workspace $w10 + +# reload the configuration file +bindsym $mod+Shift+c reload +# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) +bindsym $mod+Shift+r restart +# exit i3 (logs you out of your X session) +bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'" + +# resize window (you can also use the mouse for that) +mode "resize" { + # These bindings trigger as soon as you enter the resize mode + + # Pressing left will shrink the window’s width. + # Pressing right will grow the window’s width. + # Pressing up will shrink the window’s height. + # Pressing down will grow the window’s height. + bindsym h resize shrink width 10 px or 10 ppt + bindsym j resize grow height 10 px or 10 ppt + bindsym k resize shrink height 10 px or 10 ppt + bindsym l resize grow width 10 px or 10 ppt + + # same bindings, but for the arrow keys + bindsym Left resize shrink width 10 px or 10 ppt + bindsym Down resize grow height 10 px or 10 ppt + bindsym Up resize shrink height 10 px or 10 ppt + bindsym Right resize grow width 10 px or 10 ppt + + # back to normal: Enter or Escape + bindsym Return mode "default" + bindsym Escape mode "default" +} + +bindsym $mod+r mode "resize" + +# Start i3bar to display a workspace bar (plus the system information i3status +# finds out, if available) +bar { + status_command i3status +} + +# Workspaces +bindsym $mod+Tab workspace back_and_forth +bindsym $mod+comma workspace prev +bindsym $mod+period workspace next + +# Programs shortcuts +bindsym $mod+b exec uzbl-browser +bindsym $mod+at exec chromium-browser + +# Configuration +bindsym F1 exec $HOME/.xinitrc + +# Font +# font xft:Droid Sans Mono 10 + +# Init script +exec $HOME/.xinitrc + +# Media control +exec --no-startup-id gnome-settings-daemon + +# Pulse Audio controls +bindsym XF86AudioRaiseVolume exec amixer -D pulse sset Master 5%+ +bindsym XF86AudioLowerVolume exec amixer -D pulse sset Master 5%- +bindsym XF86AudioMute exec amixer -D pulse sset Master 0% + +# Sreen brightness controls +bindsym XF86MonBrightnessUp exec xbacklight -inc 10 +bindsym XF86MonBrightnessDown exec xbacklight -dec 10 diff --git a/.i3/config.bak b/.i3/config.bak new file mode 100644 index 0000000..0d02a52 --- /dev/null +++ b/.i3/config.bak @@ -0,0 +1,156 @@ +# This file has been auto-generated by i3-config-wizard(1). +# It will not be overwritten, so edit it as you like. +# +# Should you change your keyboard layout some time, delete +# this file and re-run i3-config-wizard(1). +# + +# i3 config file (v4) +# +# Please see http://i3wm.org/docs/userguide.html for a complete reference! + +set $mod Mod1 + +# Font for window titles. Will also be used by the bar unless a different font +# 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 8 +# 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 +# clear in small sizes. However, its unicode glyph coverage is limited, the old +# X core fonts rendering does not support right-to-left and this being a bitmap +# font, it doesn’t scale on retina/hidpi displays. + +# Use Mouse+$mod to drag floating windows to their wanted position +floating_modifier $mod + +# start a terminal +bindsym $mod+Return exec i3-sensible-terminal + +# kill focused window +bindsym $mod+Shift+Q kill + +# start dmenu (a program launcher) +bindsym $mod+d exec dmenu_run +# There also is the (new) i3-dmenu-desktop which only displays applications +# shipping a .desktop file. It is a wrapper around dmenu, so you need that +# installed. +# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop + +# change focus +bindsym $mod+h focus left +bindsym $mod+t focus down +bindsym $mod+n focus up +bindsym $mod+s focus right + +# alternatively, you can use the cursor keys: +bindsym $mod+Left focus left +bindsym $mod+Down focus down +bindsym $mod+Up focus up +bindsym $mod+Right focus right + +# move focused window +bindsym $mod+Shift+H move left +bindsym $mod+Shift+T move down +bindsym $mod+Shift+N move up +bindsym $mod+Shift+S move right + +# alternatively, you can use the cursor keys: +bindsym $mod+Shift+Left move left +bindsym $mod+Shift+Down move down +bindsym $mod+Shift+Up move up +bindsym $mod+Shift+Right move right + +# split in horizontal orientation +# bindsym $mod+n split h + +# split in vertical orientation +bindsym $mod+v split v + +# enter fullscreen mode for the focused container +bindsym $mod+f fullscreen + +# change container layout (stacked, tabbed, toggle split) +bindsym $mod+r layout stacking +bindsym $mod+w layout tabbed +bindsym $mod+g layout toggle split + +# toggle tiling / floating +bindsym $mod+Shift+space floating toggle + +# change focus between tiling / floating windows +bindsym $mod+space focus mode_toggle + +# focus the parent container +bindsym $mod+a focus parent + +# focus the child container +#bindsym $mod+d focus child + +# switch to workspace +bindsym $mod+1 workspace 1 +bindsym $mod+2 workspace 2 +bindsym $mod+3 workspace 3 +bindsym $mod+4 workspace 4 +bindsym $mod+5 workspace 5 +bindsym $mod+6 workspace 6 +bindsym $mod+7 workspace 7 +bindsym $mod+8 workspace 8 +bindsym $mod+9 workspace 9 +bindsym $mod+0 workspace 10 + +# move focused container to workspace +bindsym $mod+Shift+exclam move container to workspace 1 +bindsym $mod+Shift+at move container to workspace 2 +bindsym $mod+Shift+numbersign move container to workspace 3 +bindsym $mod+Shift+dollar move container to workspace 4 +bindsym $mod+Shift+percent move container to workspace 5 +bindsym $mod+Shift+asciicircum move container to workspace 6 +bindsym $mod+Shift+ampersand move container to workspace 7 +bindsym $mod+Shift+asterisk move container to workspace 8 +bindsym $mod+Shift+parenleft move container to workspace 9 +bindsym $mod+Shift+parenright move container to workspace 10 + +# reload the configuration file +bindsym $mod+Shift+C reload +# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) +bindsym $mod+Shift+R restart +# exit i3 (logs you out of your X session) +bindsym $mod+Shift+E exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'" + +# resize window (you can also use the mouse for that) +mode "resize" { + # These bindings trigger as soon as you enter the resize mode + + # Pressing left will shrink the window’s width. + # Pressing right will grow the window’s width. + # Pressing up will shrink the window’s height. + # Pressing down will grow the window’s height. + bindsym j resize shrink width 10 px or 10 ppt + bindsym k resize grow height 10 px or 10 ppt + bindsym l resize shrink height 10 px or 10 ppt + bindsym semicolon resize grow width 10 px or 10 ppt + + # same bindings, but for the arrow keys + bindsym Left resize shrink width 10 px or 10 ppt + bindsym Down resize grow height 10 px or 10 ppt + bindsym Up resize shrink height 10 px or 10 ppt + bindsym Right resize grow width 10 px or 10 ppt + + # back to normal: Enter or Escape + bindsym Return mode "default" + bindsym Escape mode "default" +} + +# bindsym $mod+r mode "resize" +bindsym $mod+m exec /home/urbain/.i3/winmenu.py + +# Start i3bar to display a workspace bar (plus the system information i3status +# finds out, if available) +bar { + status_command i3status +} + +exec_always i3-init diff --git a/.i3/config.working b/.i3/config.working new file mode 100644 index 0000000..5f657a6 --- /dev/null +++ b/.i3/config.working @@ -0,0 +1,176 @@ +# i3 config file (v4) +# +# Please see http://i3wm.org/docs/userguide.html for a complete reference! +# +# This config file uses keycodes (bindsym) and was written for the QWERTY +# layout. +# +# To get a config file with the same key positions, but for your current +# layout, use the i3-config-wizard +# + +# Font for window titles. Will also be used by the bar unless a different font +# 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 8 +# 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 +# clear in small sizes. However, its unicode glyph coverage is limited, the old +# X core fonts rendering does not support right-to-left and this being a bitmap +# font, it doesn’t scale on retina/hidpi displays. + +# use these keys for focus, movement, and resize directions when reaching for +# the arrows is not convenient +set $up l +set $down k +set $left j +set $right semicolon + +# use Mouse+Mod1 to drag floating windows to their wanted position +floating_modifier Mod1 + +# start a terminal +bindsym Mod1+Return exec i3-sensible-terminal + +# kill focused window +bindsym Mod1+Shift+q kill + +# start dmenu (a program launcher) +# bindsym Mod1+d exec dmenu_run +# There also is the (new) i3-dmenu-desktop which only displays applications +# shipping a .desktop file. It is a wrapper around dmenu, so you need that +# installed. +bindsym Mod1+d exec --no-startup-id i3-dmenu-desktop + +# change focus +bindsym Mod1+$left focus left +bindsym Mod1+$down focus down +bindsym Mod1+$up focus up +bindsym Mod1+$right focus right + +# alternatively, you can use the cursor keys: +bindsym Mod1+Left focus left +bindsym Mod1+Down focus down +bindsym Mod1+Up focus up +bindsym Mod1+Right focus right + +# move focused window +bindsym Mod1+Shift+$left move left +bindsym Mod1+Shift+$down move down +bindsym Mod1+Shift+$up move up +bindsym Mod1+Shift+$right move right + +# alternatively, you can use the cursor keys: +bindsym Mod1+Shift+Left move left +bindsym Mod1+Shift+Down move down +bindsym Mod1+Shift+Up move up +bindsym Mod1+Shift+Right move right + +# split in horizontal orientation +bindsym Mod1+h split h + +# split in vertical orientation +bindsym Mod1+v split v + +# enter fullscreen mode for the focused container +bindsym Mod1+f fullscreen + +# change container layout (stacked, tabbed, toggle split) +bindsym Mod1+s layout stacking +bindsym Mod1+w layout tabbed +bindsym Mod1+e layout toggle split + +# toggle tiling / floating +bindsym Mod1+Shift+space floating toggle + +# change focus between tiling / floating windows +bindsym Mod1+space focus mode_toggle + +# focus the parent container +bindsym Mod1+a focus parent + +# focus the child container +#bindsym Mod1+d focus child + +# move the currently focused window to the scratchpad +bindsym Mod1+Shift+minus move scratchpad + +# Show the next scratchpad window or hide the focused scratchpad window. +# If there are multiple scratchpad windows, this command cycles through them. +bindsym Mod1+minus scratchpad show + +# switch to workspace +bindsym Mod1+1 workspace 1 +bindsym Mod1+2 workspace 2 +bindsym Mod1+3 workspace 3 +bindsym Mod1+4 workspace 4 +bindsym Mod1+5 workspace 5 +bindsym Mod1+6 workspace 6 +bindsym Mod1+7 workspace 7 +bindsym Mod1+8 workspace 8 +bindsym Mod1+9 workspace 9 +bindsym Mod1+0 workspace 10 + +# move focused container to workspace +bindsym Mod1+Shift+1 move container to workspace 1 +bindsym Mod1+Shift+2 move container to workspace 2 +bindsym Mod1+Shift+3 move container to workspace 3 +bindsym Mod1+Shift+4 move container to workspace 4 +bindsym Mod1+Shift+5 move container to workspace 5 +bindsym Mod1+Shift+6 move container to workspace 6 +bindsym Mod1+Shift+7 move container to workspace 7 +bindsym Mod1+Shift+8 move container to workspace 8 +bindsym Mod1+Shift+9 move container to workspace 9 +bindsym Mod1+Shift+0 move container to workspace 10 + +# reload the configuration file +bindsym Mod1+Shift+c reload +# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) +bindsym Mod1+Shift+r restart +# exit i3 (logs you out of your X session) +bindsym Mod1+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'" + +# resize window (you can also use the mouse for that) +mode "resize" { + # These bindings trigger as soon as you enter the resize mode + + # Pressing left will shrink the window’s width. + # Pressing right will grow the window’s width. + # Pressing up will shrink the window’s height. + # Pressing down will grow the window’s height. + bindsym $left resize shrink width 10 px or 10 ppt + bindsym $down resize grow height 10 px or 10 ppt + bindsym $up resize shrink height 10 px or 10 ppt + bindsym $right resize grow width 10 px or 10 ppt + + # same bindings, but for the arrow keys + bindsym Left resize shrink width 10 px or 10 ppt + bindsym Down resize grow height 10 px or 10 ppt + bindsym Up resize shrink height 10 px or 10 ppt + bindsym Right resize grow width 10 px or 10 ppt + + # back to normal: Enter or Escape + bindsym Return mode "default" + bindsym Escape mode "default" +} + +bindsym Mod1+r mode "resize" + +# Start i3bar to display a workspace bar (plus the system information i3status +# finds out, if available) +bar { + status_command i3status +} + +####################################################################### +# automatically start i3-config-wizard to offer the user to create a +# keysym-based config which used his favorite modifier (alt or windows) +# +# i3-config-wizard will not launch if there already is a config file +# in ~/.i3/config. +# +# Please remove the following exec line: +####################################################################### +exec $HOME/.xinitrc diff --git a/.i3/i3-init b/.i3/i3-init new file mode 100755 index 0000000..32193b1 --- /dev/null +++ b/.i3/i3-init @@ -0,0 +1,3 @@ +setxkbmap -layout us -variant dvp +xrdb /home/urbain/.Xresources +/home/urbain/.xmodmap diff --git a/.inputrc b/.inputrc new file mode 100644 index 0000000..1221bb9 --- /dev/null +++ b/.inputrc @@ -0,0 +1,2 @@ +set editing-mode vi +set keymap vi diff --git a/.latexmkrc b/.latexmkrc new file mode 100644 index 0000000..03c512c --- /dev/null +++ b/.latexmkrc @@ -0,0 +1,5 @@ +$pdf_mode = 1; +$pdflatex = 'pdflatex --shell-escape'; +$pdf_previewer = 'zathura -s -x "vim --servername SYNC --remote +%{line} %{input}" %O %S'; +$clean_ext = "synctex.gz bbl pdf dvi"; +$new_viewer_always [0]; diff --git a/.msmtprc b/.msmtprc new file mode 100644 index 0000000..99e0e3e --- /dev/null +++ b/.msmtprc @@ -0,0 +1,22 @@ +defaults +auth on +tls on +tls_trust_file /etc/ssl/certs/ca-certificates.crt +logfile ~/.msmtp.log + +account gmail +host smtp.gmail.com +port 587 +from urbain.p.vaes@gmail.com +user urbain.p.vaes +passwordeval "gpg --use-agent --quiet --for-your-eyes-only --no-tty --decrypt ~/.passwords/main.asc" + +account imperial +host smtp.cc.ic.ac.uk +from u.vaes13@imperial.ac.uk +user uv113 +passwordeval "gpg --use-agent --quiet --for-your-eyes-only --no-tty --decrypt ~/.passwords/imperial.asc" +port 587 + +# Set a default account +account default : imperial diff --git a/.mutt/.maillog b/.mutt/.maillog new file mode 100644 index 0000000..07b9c59 --- /dev/null +++ b/.mutt/.maillog @@ -0,0 +1,230 @@ +Date: Wed Oct 29 13:00:08 2014 +From: Choices Discounts +Subj: Cinema: Price Promotion +File: /home/urbain/.mail (17491) + +Date: Wed Oct 29 14:09:08 2014 +From: "Marshall, Richard L" +Subj: Daiwa Scholarships 2015: Language Learning, Homestay and Work +File: /home/urbain/.mail (7149) + +Date: Wed Oct 29 14:09:12 2014 +From: "Facebook" +Subj: Facebook login from "Chrome on Linux" +File: /home/urbain/.mail (11718) + +Date: Wed Oct 29 16:03:17 2014 +From: "Eggl, Maximilian" +Subj: Chess Club: Match Report +File: /home/urbain/.mail (23181) + +Date: Wed Oct 29 16:03:18 2014 +From: CAREERS +Subj: CAREERS: WorldQuant Imperial College Information Session Monday 3rd +File: /home/urbain/.mail (19493) + +Date: Wed Oct 29 16:03:20 2014 +From: "Facebook" +Subj: Facebook login from "Chrome on Linux" +File: /home/urbain/.mail (11720) + +Date: Wed Oct 29 16:09:55 2014 +From: "Facebook" +Subj: Facebook login from "Chrome on Linux" +File: /home/urbain/.mail (11720) + +Date: Wed Oct 29 16:29:36 2014 +From: "Facebook" +Subj: Facebook login from "Chrome on Linux" +File: /home/urbain/.mail (11717) + +Date: Wed Oct 29 16:56:42 2014 +From: "Facebook" +Subj: Facebook login from "Chrome on Linux" +File: /home/urbain/.mail (11720) + +Date: Wed Oct 29 16:58:14 2014 +From: "Facebook" +Subj: Facebook login from "Chrome on Linux" +File: /home/urbain/.mail (11720) + +Date: Wed Oct 29 20:15:00 2014 +From: Salvador Rodriguez-Lopez +Subj: M2PM1-Tutorial 3 +File: /home/urbain/.mail (6085) + +Date: Wed Oct 29 20:15:02 2014 +From: "Facebook" +Subj: Facebook login from "Chrome on Linux" +File: /home/urbain/.mail (11720) + +Date: Fri Oct 31 10:24:52 2014 +From: James Clear +Subj: Minimalism, Success, and the Curious Writing Habit of George R.R. Martin +File: /home/urbain/.mail (42928) + +Date: Fri Oct 31 10:24:53 2014 +From: An Introduction to Functional Analysis Course Team +Subj: Marking Coursework +File: /home/urbain/.mail (3559) + +Date: Fri Oct 31 10:24:54 2014 +From: Christophe&Nathalie Vaes +Subj: =?utf-8?Q?A_quelle_heure_fait-on_le_Skype,_Urb_ch=C3=A9ri_=3F=3F=3F=3F?= +File: /home/urbain/.mail (3154) + +Date: Fri Oct 31 10:24:55 2014 +From: "Svanidze, Rusudan" +Subj: 3 Months Report - Research Plan Confirmation +File: /home/urbain/.mail (471497) + +Date: Fri Oct 31 10:24:55 2014 +From: "Pryor, Gemma M" +Subj: Buying club membership +File: /home/urbain/.mail (44297) + +Date: Fri Oct 31 10:24:55 2014 +From: "Sisson, Chris D" +Subj: FW: Huxley Emergency toilet closures +File: /home/urbain/.mail (13394) + +Date: Fri Oct 31 10:24:55 2014 +From: Salvador Rodriguez-Lopez +Subj: Re: M2PM1-Tutorial 3 +File: /home/urbain/.mail (141790) + +Date: Fri Oct 31 10:24:57 2014 +From: Grigoriy Volovskiy +Subj: WG: Re: M2PM1-Tutorial 3 +File: /home/urbain/.mail (12907) + +Date: Fri Oct 31 10:24:58 2014 +From: Grigoriy Volovskiy +Subj: WG: Tutorial 3 M2PM1-Real Analysis +File: /home/urbain/.mail (5777) + +Date: Fri Oct 31 10:34:08 2014 +From: Grigoriy Volovskiy +Subj: +File: /home/urbain/.mail (298990) + +Date: Fri Oct 31 12:11:54 2014 +From: Grigoriy Volovskiy +Subj: +File: /home/urbain/.mail (298990) + +Date: Fri Oct 31 12:11:54 2014 +From: "Svanidze, Rusudan" +Subj: FW: Huxley Emergency toilet closures +File: /home/urbain/.mail (26349) + +Date: Fri Oct 31 12:11:54 2014 +From: "Svanidze, Rusudan" +Subj: FW: 3 Months Report - Research Plan Confirmation +File: /home/urbain/.mail (473371) + +Date: Fri Oct 31 13:32:40 2014 +From: "Bright Network" +Subj: Get ahead in Entrepreneurship: Your weekly bulletin +File: /home/urbain/.mail (59613) + +Date: Fri Oct 31 13:32:41 2014 +From: Grigoriy Volovskiy +Subj: +File: /home/urbain/.mail (298990) + +Date: Fri Oct 31 13:32:41 2014 +From: "Svanidze, Rusudan" +Subj: FW: Huxley Emergency toilet closures +File: /home/urbain/.mail (26349) + +Date: Fri Oct 31 13:32:41 2014 +From: "Svanidze, Rusudan" +Subj: FW: 3 Months Report - Research Plan Confirmation +File: /home/urbain/.mail (473371) + +Date: Fri Oct 31 13:32:41 2014 +From: "Svanidze, Rusudan" +Subj: FW: Lost In Fathoms - General Public Seminar on Art & Science, +File: /home/urbain/.mail (23278) + +Date: Fri Oct 31 13:34:04 2014 +From: Grigoriy Volovskiy +Subj: +File: /home/urbain/.mail (298990) + +Date: Fri Oct 31 13:34:04 2014 +From: "Svanidze, Rusudan" +Subj: FW: Huxley Emergency toilet closures +File: /home/urbain/.mail (26349) + +Date: Fri Oct 31 13:34:04 2014 +From: "Svanidze, Rusudan" +Subj: FW: 3 Months Report - Research Plan Confirmation +File: /home/urbain/.mail (473371) + +Date: Fri Oct 31 13:34:04 2014 +From: "Svanidze, Rusudan" +Subj: FW: Lost In Fathoms - General Public Seminar on Art & Science, +File: /home/urbain/.mail (23278) + +Date: Fri Oct 31 14:26:23 2014 +From: "Ingram, Michael" +Subj: [Swim-List] Synchro event +File: /home/urbain/.mail (30387) + +Date: Fri Oct 31 14:26:23 2014 +From: Grigoriy Volovskiy +Subj: +File: /home/urbain/.mail (298990) + +Date: Fri Oct 31 14:26:23 2014 +From: "Svanidze, Rusudan" +Subj: FW: Huxley Emergency toilet closures +File: /home/urbain/.mail (26349) + +Date: Fri Oct 31 14:26:24 2014 +From: "Svanidze, Rusudan" +Subj: FW: 3 Months Report - Research Plan Confirmation +File: /home/urbain/.mail (473371) + +Date: Fri Oct 31 14:26:24 2014 +From: "Svanidze, Rusudan" +Subj: FW: Lost In Fathoms - General Public Seminar on Art & Science, +File: /home/urbain/.mail (23278) + +Date: Fri Oct 31 14:46:10 2014 +From: Grigoriy Volovskiy +Subj: +File: /home/urbain/.mail (298990) + +Date: Fri Oct 31 14:46:10 2014 +From: "Svanidze, Rusudan" +Subj: FW: Huxley Emergency toilet closures +File: /home/urbain/.mail (26349) + +Date: Fri Oct 31 14:46:10 2014 +From: "Svanidze, Rusudan" +Subj: FW: 3 Months Report - Research Plan Confirmation +File: /home/urbain/.mail (473371) + +Date: Fri Oct 31 14:46:10 2014 +From: "Svanidze, Rusudan" +Subj: FW: Lost In Fathoms - General Public Seminar on Art & Science, +File: /home/urbain/.mail (23278) + +Date: Fri Oct 31 14:46:11 2014 +From: "Cannon, Claudia M" +Subj: Seminars and Events Week Commencing Monday 3rd November 2014 +File: /home/urbain/.mail (144591) + diff --git a/.mutt/alias b/.mutt/alias new file mode 100644 index 0000000..295eda9 --- /dev/null +++ b/.mutt/alias @@ -0,0 +1,21 @@ +alias krystle \"Krystle Acquah\" +alias khoi \"Khoi Nguyen\" +alias me \"Urbain Vaes\" +alias amanda \"Amanda Diez\" +alias vaes \"Christophe & Nathalies Vaes\" +alias greg \"Greg Pavliotis\" +alias tina \"Tina\" +alias rusudan \"Svanidze, Rusudan\" +alias mathieu \"Majorel, Mathieu R\" +alias jul Julien Vaes +alias assyr Assyr Abdulle +alias gradschool Graduate school +alias virginie.ledouble Virginie Ledouble +alias anderson.santos \"Santos, Anderson D S\" +alias nick.jones \"Jones, Nick\" +alias pierre.blacque \"Blacque, Pierre\" +alias amanda.diez \"Diez Fernandez, Amanda\" +alias colin.cotter Colin Cotter +alias eric.keaveny \"Keaveny, Eric E\" +alias giuseppe.mallia Giuseppe Mallia +alias luca.mingarelli \"Mingarelli, Luca\" diff --git a/.mutt/mailboxes b/.mutt/mailboxes new file mode 100644 index 0000000..6161f0e --- /dev/null +++ b/.mutt/mailboxes @@ -0,0 +1 @@ +mailboxes "+Gmail/Gmail" "+Imperial/Imperial" "+Main/Drafts" "+Main/Main" "+Main/Sent" diff --git a/.mutt/mailcap b/.mutt/mailcap new file mode 100644 index 0000000..59df58e --- /dev/null +++ b/.mutt/mailcap @@ -0,0 +1,3 @@ +text/html; pandoc -f html -t markdown; copiousoutput; compose=vim %s +image/*; feh %s +application/pdf; zathura %s diff --git a/.mutt/muttrc b/.mutt/muttrc new file mode 100644 index 0000000..fb57f0a --- /dev/null +++ b/.mutt/muttrc @@ -0,0 +1,99 @@ +# General information +set from = "u.vaes13@imperial.ac.uk" +set realname = "Urbain Vaes" +set use_from = yes +set envelope_from = "yes" +set weed + +# Folders +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 signature = ~/.mutt/sig + +# Maildirs +set spoolfile = "+Main/Main" +set record = "+Main/Sent" +set postponed = "+Main/Drafts" + +# Headers +ignore * +unignore from: to: cc: date: subject: +unhdr_order * +hdr_order from: to: cc: date: subject: + +mailboxes +Main/Main \ + +Imperial/Imperial \ + +Hotmail/Hotmail \ + +Gmail/Gmail \ + +Main/Sent \ + +Main/Drafts \ + +# Prompts +set delete = yes +set quit = yes + +# Pager +set pager_index_lines = 10 +set pager_context = 0 +set pager_stop +set reverse_alias +set menu_scroll +set tilde +unset markers +set quote_regexp = "^( {0,4}[>|:#%]| {0,4}[a-z0-9]+[>|]+)+" +alternative_order text/plain text/enriched text/html + +# Editor +set editor="nvim --noplugin" +set include=yes + +# Program to send mails +set sendmail="/usr/bin/msmtp" + +# Sorting options +# set sort = threads +set sort_aux = reverse-last-date-received +# set sort_browser = reverse-date + +# Alias file +source ~/.mutt/alias + +# HTML messages +auto_view text/html + +# Key bindings +bind index,pager \Cf next-page +bind index,pager \Cb previous-page +bind index,pager "}" sidebar-next +bind index,pager "{" sidebar-prev +bind index,pager O sidebar-open + +bind index gg first-entry +bind index G last-entry +bind index i flag-message + +bind pager \Ce next-line +bind pager \Cy previous-line +bind pager j next-entry +bind pager k previous-entry +bind pager R group-reply + +# Source mutt solarized +`[ "$COLORSCHEME" = "light" ] && echo source $HOME/github/mutt-colors-solarized/mutt-colors-solarized-light-16.muttrc || echo set` +`[ "$COLORSCHEME" = "dark" ] && echo source $HOME/github/mutt-colors-solarized/mutt-colors-solarized-dark-16.muttrc || echo set` +`[ "$COLORSCHEME" = "default" ] && echo source $HOME/github/mutt-colors-solarized/mutt-colors-solarized-dark-16.muttrc || echo set` + +color index red default "~F" +color index brightblue default "~f edfenergy" +color index brightblue default "~f terravision" +color index magenta default "~f avaaz" +color index magenta default "~f santos" +color index magenta default "~f rusudan" +color index cyan default "~U" +color index green default "~f pavliotis" +color index green default "~f abdulle" diff --git a/.ncmpcpp/config b/.ncmpcpp/config new file mode 100644 index 0000000..127a875 --- /dev/null +++ b/.ncmpcpp/config @@ -0,0 +1,493 @@ +#################################################### +## this is example configuration file, copy it to ## +## ~/.ncmpcpp/config and set up your preferences ## +#################################################### +# +##### directories ###### +## +## Directory for storing ncmpcpp related files. +## Changing it is useful if you want to store +## everything somewhere else and provide command +## line setting for alternative location to config +## file which defines that while launching ncmpcpp. +## +# +ncmpcpp_directory = "~/.ncmpcpp" +# +## +## Directory for storing downloaded lyrics. It +## defaults to ~/.lyrics since other MPD clients +## (eg. ncmpc) also use that location. +## +# +#lyrics_directory = "~/.lyrics" +# +##### connection settings ##### +# +## set it in order to make tag editor and renaming files work properly +# + +# mpd_host = "192.168.0.20" +mpd_host = "192.168.1.12" +# +mpd_port = "6600" +# +#mpd_music_dir = "" +# +#mpd_connection_timeout = "5" +# +#mpd_crossfade_time = "5" +# +#mpd_communication_mode = "notifications" (polling/notifications) +# +##### music visualizer ##### +## +## Note: In order to make music visualizer work you'll +## need to use mpd fifo output, whose format parameter +## has to be set to 44100:16:1 for mono visualization +## or 44100:16:2 for stereo visualization. Example +## configuration (it has to be put into mpd.conf): +## +## audio_output { +## type "fifo" +## name "My FIFO" +## path "/tmp/mpd.fifo" +## format "44100:16:2" +## } +## +# +## +## If you set format to 44100:16:2, make it 'yes'. +## +# +#visualizer_in_stereo = "no" +# +#visualizer_fifo_path = "" +# +## +## Note: Below parameter is needed for ncmpcpp +## to determine which output provides data for +## visualizer and thus allow syncing between +## visualization and sound as currently there +## are some problems with it. +## +# +#visualizer_output_name = "" +# +## +## Note: Below parameter defines how often ncmpcpp +## has to "synchronize" visualizer and audio outputs. +## 30 seconds is optimal value, but if you experience +## synchronization problems, set it to lower value. +## Keep in mind that sane values start with >=10. +## +# +#visualizer_sync_interval = "30" +# +## +## Note: To enable spectrum frequency visualization +## you need to compile ncmpcpp with fftw3 support. +## +# +#visualizer_type = "wave" (spectrum/wave) +# +#visualizer_look = "◆│" +# +##### system encoding ##### +## +## ncmpcpp should detect your charset encoding +## but if it failed to do so, you can specify +## charset encoding you are using here. +## +## Note: You can see whether your ncmpcpp build +## supports charset detection by checking output +## of `ncmpcpp --version`. +## +## Note: Since MPD uses utf8 by default, setting +## this option makes sense only if your encoding +## is different. +## +# +#system_encoding = "" +# +##### delays ##### +# +## delay after playlist highlighting will be disabled (0 = don't disable) +# +#playlist_disable_highlight_delay = "5" +# +## defines how long various messages are supposed to be visible +# +#message_delay_time = "4" +# +##### song format ##### +## +## for song format you can use: +## +## %l - length +## %f - filename +## %D - directory +## %a - artist +## %A - album artist +## %t - title +## %b - album +## %y - year +## %n - track number (01/12 -> 01) +## %N - full track info (01/12 -> 01/12) +## %g - genre +## %c - composer +## %p - performer +## %d - disc +## %C - comment +## $R - begin right alignment +## +## you can also put them in { } and then it will be displayed +## only if all requested values are available and/or define alternate +## value with { }|{ } eg. {%a - %t}|{%f} +## +## Note: If you want to set limit on maximal length of a tag, just +## put the appropriate number between % and character that defines +## tag type, e.g. to make album take max. 20 terminal cells, use '%20b'. +## +## Note: Format that is similar to "%a - %t" (i.e. without any additional +## braces) is equal to "{%a - %t}", so if one of the tags is missing, +## you'll get nothing. +## +## text can also have different color than the main window has, +## eg. if you want length to be green, write $3%l$9 +## +## available values: +## +## - 0 - default window color (discards all other colors) +## - 1 - black +## - 2 - red +## - 3 - green +## - 4 - yellow +## - 5 - blue +## - 6 - magenta +## - 7 - cyan +## - 8 - white +## - 9 - end of current color +## +## Note: colors can be nested. +## +# +#song_list_format = "{%a - }{%t}|{$8%f$9}$R{$3(%l)$9}" +# +#song_status_format = "{{%a{ \"%b\"{ (%y)}} - }{%t}}|{%f}" +# +#song_library_format = "{%n - }{%t}|{%f}" +# +#tag_editor_album_format = "{(%y) }%b" +# +## +## Note: Below variables are for alternative version of user's interface. +## Their syntax supports all tags and colors listed above plus some extra +## markers used for text attributes. They are followed by character '$'. +## After that you can put: +## +## - b - bold text +## - u - underline text +## - r - reverse colors +## - a - use alternative character set +## +## If you don't want to use an attribute anymore, just put it again, but +## this time insert character '/' between '$' and attribute character, +## e.g. {$b%t$/b}|{$r%f$/r} will display bolded title tag or filename +## with reversed colors. +## +# +#alternative_header_first_line_format = "$b$1$aqqu$/a$9 {%t}|{%f} $1$atqq$/a$9$/b" +# +#alternative_header_second_line_format = "{{$4$b%a$/b$9}{ - $7%b$9}{ ($4%y$9)}}|{%D}" +# +## +## Note: Below variables also supports +## text attributes listed above. +## +# +#now_playing_prefix = "$b" +# +#now_playing_suffix = "$/b" +# +#browser_playlist_prefix = "$2playlist$9 " +# +#selected_item_prefix = "$6" +# +#selected_item_suffix = "$9" +# +## colors are not supported for below variable +# +#song_window_title_format = "{%a - }{%t}|{%f}" +# +##### columns settings ##### +## +## syntax of song columns list format is "column column etc." +## +## - syntax for each column is: +## +## (width of column)[column's color]{displayed tag} +## +## Note: Width is by default in %, if you want a column to +## have fixed size, add 'f' after the value, e.g. (10)[white]{a} +## will be the column that take 10% of screen (so the real column's +## width will depend on actual screen size), whereas (10f)[white]{a} +## will take 10 terminal cells, no matter how wide the screen is. +## +## - color is optional (if you want the default one, type []) +## +## Note: You can give a column additional attributes by putting appropriate +## character after displayed tag character. Available attributes are: +## +## - r - column will be right aligned +## - E - if tag is empty, empty tag marker won't be displayed +## +## You can also: +## +## - give a column custom name by putting it after attributes, +## separated with character ':', e.g. {lr:Length} gives you +## right aligned column of lengths named "Length". +## +## - define sequence of tags, that have to be displayed in case +## predecessor is empty in a way similar to the one in classic +## song format, i.e. using '|' character, e.g. {a|c|p:Owner} +## creates column named "Owner" that tries to display artist +## tag and then composer and performer if previous ones are +## not available. +## +# +#song_columns_list_format = "(7f)[green]{l} (25)[cyan]{a} (40)[]{t|f} (30)[red]{b}" +# +##### various settings ##### +# +## +## Note: Custom command that will be executed each +## time song changes. Useful for notifications etc. +## +## Attention: It doesn't support song format anymore. +## Use `ncmpcpp --now-playing SONG_FORMAT` instead. +## +#execute_on_song_change = "" +# +#playlist_show_remaining_time = "no" +# +#playlist_shorten_total_times = "no" +# +#playlist_separate_albums = "no" +# +#playlist_display_mode = "classic" (classic/columns) +# +#browser_display_mode = "classic" (classic/columns) +# +#search_engine_display_mode = "classic" (classic/columns) +# +#playlist_editor_display_mode = "classic" (classic/columns) +# +#discard_colors_if_item_is_selected = "yes" +# +#incremental_seeking = "yes" +# +#seek_time = "1" +# +#autocenter_mode = "no" +# +#centered_cursor = "no" +# +## +## Note: You can specify third character which will +## be used to build 'empty' part of progressbar. +## +#progressbar_look = "=>" +# +#default_place_to_search_in = "database" (database/playlist) +# +#user_interface = "classic" (classic/alternative) +# +#media_library_left_column = "a" (possible values: a,y,g,c,p, legend above) +# +#default_find_mode = "wrapped" (wrapped/normal) +# +#default_space_mode = "add" (add/select) +# +#default_tag_editor_left_col = "albums" (albums/dirs) +# +#default_tag_editor_pattern = "%n - %t" +# +#header_visibility = "yes" +# +#statusbar_visibility = "yes" +# +#titles_visibility = "yes" +# +#header_text_scrolling = "yes" +# +#fancy_scrolling = "yes" +# +#cyclic_scrolling = "no" +# +#lines_scrolled = "2" +# +#follow_now_playing_lyrics = "no" +# +#fetch_lyrics_for_current_song_in_background = "no" +# +#store_lyrics_in_song_dir = "no" +# +## +## Note: If you set this variable, ncmpcpp will try to +## get info from last.fm in language you set and if it +## fails, it will fall back to english. Otherwise it will +## use english the first time. +## +## Note: Language has to be expressed as an ISO 639 alpha-2 code. +## +#lastfm_preferred_language = "" +# +#ncmpc_like_songs_adding = "no" (enabled - add/remove, disabled - always add) +# +#show_hidden_files_in_local_browser = "no" +# +#display_screens_numbers_on_start = "yes" +# +## +## How shall key_screen_switcher work? +## +## - "previous" - switch between current and last used screen +## - "sequence: 2 -> 9 -> 5" - switch between given sequence of screens. +## +## Screen numbers you can use after 'sequence' keyword are: +## +## - 1 - help +## - 2 - playlist +## - 3 - browser +## - 4 - search engine +## - 5 - media library +## - 6 - playlist editor +## - 7 - tag editor +## - 8 - outputs +## - 9 - visualizer +## - 10 - clock +## +## As you can see, above example will switch between +## playlist, visualizer and media library screens. +## +#screen_switcher_mode = "sequence: 2 -> 3" +# +## +## Default width of locked screen (in %). +## Acceptable values are from 20 to 80. +## +# +#locked_screen_width_part = "50" +# +#ask_for_locked_screen_width_part = "yes" +# +## +## Note: You can define startup screen for ncmpcpp +## by choosing screen number from the list above. +## +#startup_screen = "2" +# +#jump_to_now_playing_song_at_start = "yes" +# +#ask_before_clearing_main_playlist = "no" +# +#clock_display_seconds = "no" +# +#display_volume_level = "yes" +# +#display_bitrate = "no" +# +#display_remaining_time = "no" +# +#regular_expressions = "basic" (basic/extended) +# +## +## Note: If below is enabled, ncmpcpp will ignore leading +## "The" word while sorting items in browser, tags in +## media library, etc. +## +#ignore_leading_the = "no" +# +#block_search_constraints_change_if_items_found = "yes" +# +#mouse_support = "yes" +# +#mouse_list_scroll_whole_page = "yes" +# +#empty_tag_marker = "" +# +#tag_editor_extended_numeration = "no" +# +#media_library_display_date = "yes" +# +#media_library_display_empty_tag = "yes" +# +#media_library_disable_two_column_mode = "no" +# +#enable_window_title = "yes" +# +## +## Note: You can choose default search mode for search +## engine. Available modes are: +## +## - 1 - use mpd built-in searching (no regexes, pattern matching) +## - 2 - use ncmpcpp searching (pattern matching with support for regexes, +## but if your mpd is on a remote machine, downloading big database +## to process it can take a while +## - 3 - match only exact values (this mode uses mpd function for searching +## in database and local one for searching in current playlist) +## +# +#search_engine_default_search_mode = "1" +# +## +## Note: Below variables can allow you to physically +## remove files and directories from your hdd using +## ncmpcpp's browser screen. +## +# +#allow_physical_files_deletion = "no" +# +#allow_physical_directories_deletion = "no" +# +#external_editor = "" +# +#use_console_editor = "no" (set to yes, if your editor is console app) +# +##### colors definitions ##### +# +#colors_enabled = "yes" +# +#empty_tag_color = "cyan" +# +#header_window_color = "default" +# +#volume_color = "default" +# +#state_line_color = "default" +# +#state_flags_color = "default" +# +#main_window_color = "yellow" +# +#color1 = "white" +# +#color2 = "green" +# +#main_window_highlight_color = "yellow" +# +#progressbar_color = "default" +# +#statusbar_color = "default" +# +#alternative_ui_separator_color = "black" +# +#active_column_color = "red" +# +#visualizer_color = "yellow" +# +#window_border_color = "green" +# +#active_window_border = "red" +# diff --git a/.ncmpcpp/error.log b/.ncmpcpp/error.log new file mode 100644 index 0000000..e69de29 diff --git a/.notes/Notes b/.notes/Notes new file mode 100644 index 0000000..6976cf5 --- /dev/null +++ b/.notes/Notes @@ -0,0 +1,23 @@ +Notes + +# Phd Todos + • High priority + ◦ Establish structure of draft paper + ◦ Investigate proof of spectral convergence + • Medium priority + ◦ Implement Smolyak algorithm + ◦ Investigate proof of weak convergence + ◦ Obtain rigourous homogenization result + • Low priority + ◦ Add graphs to program + +# General Todos + • High priority + • Medium priority + ◦ Book ticket to Paris + • Low priority + + * * * + +# Useful info + • Bank number: 930630876 diff --git a/.offlineimap/offlineimap.py b/.offlineimap/offlineimap.py new file mode 100644 index 0000000..c63b82d --- /dev/null +++ b/.offlineimap/offlineimap.py @@ -0,0 +1,12 @@ +#!/usr/bin/env python + +import os +import subprocess +def mailpasswd(acct): + acct = os.path.basename(acct) + path = "/home/urbain/.passwords/%s.asc" % acct + args = ["gpg", "--use-agent", "--quiet", "--batch", "-d", path] + try: + return subprocess.check_output(args).strip() + except subprocess.CalledProcessError: + return "" diff --git a/.offlineimap/offlineimaprc b/.offlineimap/offlineimaprc new file mode 100644 index 0000000..4dc46f1 --- /dev/null +++ b/.offlineimap/offlineimaprc @@ -0,0 +1,76 @@ +[general] +ui = ttyui +pythonfile = /home/urbain/.offlineimap.py +accounts = Imperial, Main, Gmail +maxsyncaccounts = 4 + +[Account Imperial] +localrepository = Imperial-Local +remoterepository = Imperial-Remote +autorefresh = 10 + +[Repository Imperial-Local] +type = Maildir +localfolders = ~/.mail/Imperial +status_backend = sqlite +nametrans = lambda folder : {'Imperial' : 'INBOX'}.get(folder, folder) + +[Repository Imperial-Remote] +type = IMAP +remotehost = exchange.imperial.ac.uk +remoteuser = uv113 +remotepasseval = mailpasswd("imperial") +ssl = yes +nametrans = lambda folder : {'INBOX' : 'Imperial'}.get(folder, folder) +folderfilter = lambda folder: folder in ['INBOX'] +Sslcacertfile = /etc/ssl/certs/ca-certificates.crt + +[Account Main] +localrepository = Main-Local +remoterepository = Main-Remote +autorefresh = 10 + +[Repository Main-Local] +type = Maildir +localfolders = ~/.mail/Main +status_backend = sqlite +nametrans = lambda folder : {'Main' : 'INBOX', 'Sent' : '[Gmail]/Sent Mail', 'Drafts' : '[Gmail]/Drafts'}.get(folder, folder) + +[Repository Main-Remote] +type = Gmail +remoteuser = urbain.p.vaes +remotepasseval = mailpasswd("main") +realdelete = no +maxconnections = 3 +nametrans = lambda folder : {'INBOX' : 'Main', '[Gmail]/Sent Mail' : 'Sent', '[Gmail]/Drafts' : 'Drafts'}.get(folder, folder) +folderfilter = lambda folder: folder in ['INBOX', '[Gmail]/Sent Mail', '[Gmail]/Drafts'] +sslcacertfile = /etc/ssl/certs/ca-certificates.crt + +[Account Gmail] +localrepository = Gmail-Local +remoterepository = Gmail-Remote +autorefresh = 10 + +[Repository Gmail-Local] +type = Maildir +localfolders = ~/.mail/Gmail +status_backend = sqlite +nametrans = lambda folder : {'Gmail' : 'INBOX'}.get(folder, folder) + +[Repository Gmail-Remote] +type = Gmail +remoteuser = urbainvaes90 +remotepasseval = mailpasswd("gmail") +realdelete = no +maxconnections = 3 +nametrans = lambda folder: {'INBOX' : 'Gmail'}.get(folder, folder) +folderfilter = lambda folder: folder in ['INBOX'] +sslcacertfile = /etc/ssl/certs/ca-certificates.crt + +[mbnames] +enabled = yes +filename = ~/.mutt/mailboxes +header = "mailboxes " +peritem = "+%(accountname)s/%(foldername)s" +sep = " " +footer = "\n" diff --git a/.passwords/gmail.asc b/.passwords/gmail.asc new file mode 100644 index 0000000..08de50b --- /dev/null +++ b/.passwords/gmail.asc @@ -0,0 +1,18 @@ +-----BEGIN PGP MESSAGE----- +Version: GnuPG v1 + +hQIMA2AwAsuYqCfXARAAyjVQBvW4y+mrxVRSUFmbRNoKhxaheAiqcFmOxOA41I0o +yXQ2798T46KMeg2hQlq0JgdSKzIx9glZ5vuSYZ2IO7KFqZ+otW3XMh6xqZ/TF68g +kc93FF8bTXHl/oThBJhgkrn1eGu2qwJFeAXWgBE79VBLrJ7dMhyJHpsJzVwW09AP +O5BP89noyqa6qP1seep+/d7AuOoHYmFRF647L1a//mphfit3Z+ckGRaDi3mBEJbm +YRsnJkLGO7Vc22JcgrDu1lsWa4ChXbOg9E1x2+75tIkaUVSq4dH1HII8zhb1pmdL +C1VPS0ndADE9WHAcjvuCVNHlsgRxm0dgnIL06kY5U2LhQ21AARMYNepkl5aHaXZg +mjIOu4qll31RKQtntZ1cc8vVXV+1FLjpYz7GapbqQ+ylVQf4lecSrPioCCtD7TzF +GqHNfS4X1Va3/qMG98cTI3P0RjK1YMvOoqxSrWbQcJTKU8fiq+COQungipq10lpi +/bHbQHVqrbFMI3vzAh6BHdSaIYkuz1fzNNTYbDUyHBV5KDbme8qIQZsIjpJ/yX1H +O2dw6lF3dNo+huf157KfL3pTwD8InyB4Hm6Aa1SQPBCrO495BpyKrZTWTlSO08+4 +ycFX+Xx8F/GN9i0G2IJUCyU/2AV6fLZAStuQIw3AMzwkb1NJ9bMAdSeU9MZR+qjS +TwHNHEP2LonaHTsbogdURSLeK7jtdKiPZYC0bKwQZJxEIwmDZZedweeufs5WLKjf +1Sh3VvJXlruAZJcJw6kGdyv0jddzHT0qu6qQ3V6x0KQ= +=Mfz/ +-----END PGP MESSAGE----- diff --git a/.passwords/hotmail.asc b/.passwords/hotmail.asc new file mode 100644 index 0000000..dd7f078 --- /dev/null +++ b/.passwords/hotmail.asc @@ -0,0 +1,18 @@ +-----BEGIN PGP MESSAGE----- +Version: GnuPG v1 + +hQIMA2AwAsuYqCfXARAAzPBo5qPX17TyoiGz6kls7JMP+7BSbpx5DhKGp6WHinrg +VdR9VmMKN9KpoJvUD7JQpHua1FTBd2m++8npIThxKD7MaJgph+15oqTOuvf6rdrD +3+51UR5bwbknt7BDrvtX0ueMR05TcgCfoC3R6orbesTkbwaiy3uzatpMRlMBf/1c +ntb18Bluqg0KUie73Lpsmc52aRhAJF8dJgEk8qfbhd/sop3wuSbJgBWXxAcukgR6 +dKM7LI9lGu9z39VubRetE+G8fOb/oWGdqfUjHoWM1huMKztnJFS/ftd6zCh8wwDk +NrK+46pOLhi8ARPBEaCg01BK8JT42s+NE7mFneqlnK0g4rAWGDN3GUEGZMxOtUKb +gJlLuaQINKLTwy0Y2W5YUk4vbnRj4J0cs9tW/RyUB0t/o0bwKqB7k8hhmq4MJ5IM +2OzaAapw5ogZtf/+eww8L2UMgS/ESmJaQHl6kTzdsPI/WXpMATNf0qqFZ1FjRC/U +xEudfo60QumvH6JxO9rUR0a+dookI99emaFLyfNH7hIqGP8X6C5vRaruUCZtYufC +o2W3v1rLPAnKvVGli9ZxyetfXeolUwpKxHBwAAv3QNRONrzEfHOifvnCLlR8+n6K +FZvgIxengHKRnTwduJQE4td1LcjgWHhlpmPAcB6y0tddBLFwwUdNtPUSRsNQ/4nS +SQG/+mPrLscTKjxIIzaNUlXWKrrdBTism+ITSq96BKbNILR6M5Am9b5BZPLEY16e +izq7zYPh5PntZIm71rOMHb2GBiKcuH0UjXc= +=QzUQ +-----END PGP MESSAGE----- diff --git a/.passwords/imperial.asc b/.passwords/imperial.asc new file mode 100644 index 0000000..69c898a --- /dev/null +++ b/.passwords/imperial.asc @@ -0,0 +1,18 @@ +-----BEGIN PGP MESSAGE----- +Version: GnuPG v1 + +hQIMA2AwAsuYqCfXAQ/9EvZHVmMGZPRW+046vwxMV8QisZXGfA9BKcR4qAKGaylA +Eb/eJ+XnrVBoqnXdZdNMMeIXPkWGvPI7CEW++h7YOGm3/wgk3hUUIVAK36UwtCtl +DojOHDL4/HUnxFQaDkSuZUjnay9yPWROmUQYSK0O5EcvtuLEwPU6n3wECVb90FLe +GEBsRJJQaJ7dhdBC6/rcVUnaYH2ruzd/skDZRsIrCDyn+Nva5WPhpre3nJeYFfb2 +wwz9nv/2YDvlKahWXrzX8lQlwjBltrHteER/QQxHES6xOgkv0I8frYT+MXlLAVj1 +o6gHGOJiiNugFWr1XO+xrmbUirjxiBh6urIYdey/fJBqc77g8DPpTDD4WuZJoRG6 +5iVqxzoEOwqmtBUoaFuG6Ide5aTUL7SYPZ2nfdqrNYzNCAeLKgKJbbpAWXbzaLOn +04j1S1zPO9hzDPNP9HDu7ZGoHStMaJF2ydA15kK9L7F4oUGb9y2lonGP2N5WNLjy +AY4jlWenXGib+gMNoLQLUarZDcZV1bwTZvTX5fu7XB7634/aC7WOetnCU23VAkvw +DkUHmoMCoH/meTRqNENttRNgQtXd/h5lJotvNINid2PBM2TDGCzzSPluHNPWYdHh +2QjiWU0wZaY3GyNWEE9GDejusw05R+QUkoM+dy6hojHwf/1WkfhZBdH/ivRooavS +TgGPT2dqxi/Ac9mKCbyxA1EdrZ1h/ou3N4UyCTim14wbdjpkg7+CNjGv1CjesdBZ +WqjgZeSeTe9n8qSKlSodhYmSdz/1OlZiBONx58PKwQ== +=Lbhd +-----END PGP MESSAGE----- diff --git a/.passwords/main.asc b/.passwords/main.asc new file mode 100644 index 0000000..e284c92 --- /dev/null +++ b/.passwords/main.asc @@ -0,0 +1,18 @@ +-----BEGIN PGP MESSAGE----- +Version: GnuPG v1 + +hQIMA2AwAsuYqCfXAQ//blWCbEjK0MvbTlB/V6F2S6TmPdnen0CZ9e7l2Ix5Vkd7 +MdUiNVZoIp2dbkw/3S3dxh+v1koMrfuzV4vdRhF0kZyrX4RLRkTQP0B9q8OJYPre +6NY7VS4WWQpiRT4qiFgsMsVvdZp2vqHmVHp2fRwWl3cMNkWNSuBNMoT8a2wA3bMi +4r0RIdKDVa7jM9+g4TwbnuQ0z9jR3NqFMk4lKs7NeRMbg6AotyimKEbm+qbpKxnA +00GeGdV/CbiDfwEUKh+UYLLrD1p9thCsJkO64uVyskmcZHT49k+PXUieESLDSpOP +7nPmS9dGsPmsBmpI2MDei8EEN+6ALdlrxd7FQHc7FTOVOPwLPawS3FKF0GPxDdfq +gW50KFq9lm42wZdcNoai5kLgYlVoyf1WnA7wiIi8pPQZKjSgcLm6mCAV+hehF9vf +t2FUoNx6cMI4+eMWEaoK9lPpVe1Ejxac1NZJCTZt9dqjL6sjZB4h/O9PEPzaJWn7 +O4DbUx+GkiFWYdETa9C1Dhy1fuA12CPGqbM1DP92bCCQXnG3dfjR3AVWbQ4RcjdX +BFE2blsQuP4+/d0DjJdY645wb/m9WS02TYgHuENVXq9LZ5OV3Es6g7xSSEVHhp3a +TN2RPwna2YPjCC45wcqXFdfkT3bQFogOjdYQgWWj1S3PPyI/5+D4aAKqJjNYPu3S +SwH0IjgFdLIBxjm9DJm4u47MKQ3jDFczYIgRl/BrgdldTjTDjQkIP/GyCFv9ODHH +tp3zYiJJLuls3RBiUgqzZvLE1Hw/eIHt/CtVMQ== +=hmGk +-----END PGP MESSAGE----- diff --git a/.tmux.conf b/.tmux.conf new file mode 100644 index 0000000..989a487 --- /dev/null +++ b/.tmux.conf @@ -0,0 +1,42 @@ +# set -g default-terminal "screen-256color" +set -g default-terminal screen +if "[[ ${TERM} =~ 256color || ${TERM} == fbterm ]]" 'set -g default-terminal screen-256color' + +set -g mode-mouse on +set -g mouse-resize-pane on +set -g mouse-select-pane on + +unbind C-b +set -g prefix C-s +bind s send-prefix + +unbind r +bind r source-file ~/.tmux.conf + +set -s escape-time 0 +set-option -g allow-rename off + +set -g @tpm_plugins ' \ + tmux-plugins/tpm \ + tmux-plugins/tmux-sensible \ + tmux-plugins/tmux-resurrect \ +' + +set -g @resurrect-strategy-vim 'session' +set -g @resurrect-save 'S' +set -g @resurrect-restore 'R' +set -g status off + +is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$"' +bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L" +bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D" +bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U" +bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R" + +bind C-n next-window +bind C-p previous-window + +bind-key -n C-S-Left swap-window -t -1 +bind-key -n C-S-Right swap-window -t +1 + +run-shell '~/.tmux/plugins/tpm/tpm' diff --git a/.urxvt/ext/clipboard b/.urxvt/ext/clipboard new file mode 100644 index 0000000..05e1601 --- /dev/null +++ b/.urxvt/ext/clipboard @@ -0,0 +1,115 @@ +#! perl -w +# Author: Bert Muennich +# Website: http://www.github.com/muennich/urxvt-perls +# License: GPLv2 + +# Use keyboard shortcuts to copy the selection to the clipboard and to paste +# the clipboard contents (optionally escaping all special characters). +# Requires xsel to be installed! + +# Usage: put the following lines in your .Xdefaults/.Xresources: +# URxvt.perl-ext-common: ...,clipboard +# URxvt.keysym.M-c: perl:clipboard:copy +# URxvt.keysym.M-v: perl:clipboard:paste +# URxvt.keysym.M-C-v: perl:clipboard:paste_escaped + +# Options: +# URxvt.clipboard.autocopy: If true, PRIMARY overwrites clipboard + +# You can also overwrite the system commands to use for copying/pasting. +# The default ones are: +# URxvt.clipboard.copycmd: xsel -ib +# URxvt.clipboard.pastecmd: xsel -ob +# If you prefer xclip, then put these lines in your .Xdefaults/.Xresources: +# URxvt.clipboard.copycmd: xclip -i -selection clipboard +# URxvt.clipboard.pastecmd: xclip -o -selection clipboard +# On Mac OS X, put these lines in your .Xdefaults/.Xresources: +# URxvt.clipboard.copycmd: pbcopy +# URxvt.clipboard.pastecmd: pbpaste + +# The use of the functions should be self-explanatory! + +use strict; + +sub on_start { + my ($self) = @_; + + $self->{copy_cmd} = $self->x_resource('clipboard.copycmd') || 'xsel -ib'; + $self->{paste_cmd} = $self->x_resource('clipboard.pastecmd') || 'xsel -ob'; + + if ($self->x_resource('clipboard.autocopy') eq 'true') { + $self->enable(sel_grab => \&sel_grab); + } + + () +} + +sub copy { + my ($self) = @_; + + if (open(CLIPBOARD, "| $self->{copy_cmd}")) { + my $sel = $self->selection(); + utf8::encode($sel); + print CLIPBOARD $sel; + close(CLIPBOARD); + } else { + print STDERR "error running '$self->{copy_cmd}': $!\n"; + } + + () +} + +sub paste { + my ($self) = @_; + + my $str = `$self->{paste_cmd}`; + if ($? == 0) { + $self->tt_paste($str); + } else { + print STDERR "error running '$self->{paste_cmd}': $!\n"; + } + + () +} + +sub paste_escaped { + my ($self) = @_; + + my $str = `$self->{paste_cmd}`; + if ($? == 0) { + $str =~ s/([!#\$%&\*\(\) ='"\\\|\[\]`~,<>\?])/\\\1/g; + $self->tt_paste($str); + } else { + print STDERR "error running '$self->{paste_cmd}': $!\n"; + } + + () +} + +sub on_action { + my ($self, $action) = @_; + + on_user_command($self, "clipboard:" . $action); +} + +sub on_user_command { + my ($self, $cmd) = @_; + + if ($cmd eq "clipboard:copy") { + $self->copy; + } elsif ($cmd eq "clipboard:paste") { + $self->paste; + } elsif ($cmd eq "clipboard:paste_escaped") { + $self->paste_escaped; + } + + () +} + +sub sel_grab { + my ($self) = @_; + + $self->copy; + + () +} diff --git a/.urxvt/ext/fullscreen b/.urxvt/ext/fullscreen new file mode 100644 index 0000000..ebed22f --- /dev/null +++ b/.urxvt/ext/fullscreen @@ -0,0 +1,7 @@ +#!perl +sub on_user_command { + my ($self, $cmd) = @_; + if ($cmd eq "fullscreen:switch") { + my $dummy = `wmctrl -r :ACTIVE: -b toggle,fullscreen` ; + } +} diff --git a/.urxvt/ext/keyboard-select b/.urxvt/ext/keyboard-select new file mode 100644 index 0000000..3627360 --- /dev/null +++ b/.urxvt/ext/keyboard-select @@ -0,0 +1,586 @@ +#! perl -w +# Author: Bert Muennich +# Website: http://www.github.com/muennich/urxvt-perls +# License: GPLv2 + +# Use keyboard shortcuts to select and copy text. + +# Usage: put the following lines in your .Xdefaults/.Xresources: +# URxvt.perl-ext-common: ...,keyboard-select +# URxvt.keysym.M-Escape: perl:keyboard-select:activate +# The following line overwrites the default Meta-s binding and allows to +# activate keyboard-select directly in backward search mode: +# URxvt.keysym.M-s: perl:keyboard-select:search + +# Use Meta-Escape to activate selection mode, then use the following keys: +# h/j/k/l: Move cursor left/down/up/right (also with arrow keys) +# g/G/0/^/$/H/M/L/f/F/;/,/w/W/b/B/e/E: More vi-like cursor movement keys +# '/'/?: Start forward/backward search +# n/N: Repeat last search, N: in reverse direction +# Ctrl-f/b: Scroll down/up one screen +# Ctrl-d/u: Scroll down/up half a screen +# v/V/Ctrl-v: Toggle normal/linewise/blockwise selection +# y/Return: Copy selection to primary buffer, Return: deactivate afterwards +# q/Escape: Deactivate keyboard selection mode + + +use strict; + +sub on_start{ + my ($self) = @_; + + $self->{patterns}{'w'} = qr/\w[^\w\s]|\W\w|\s\S/; + $self->{patterns}{'W'} = qr/\s\S/; + $self->{patterns}{'b'} = qr/.*(?:\w[^\w\s]|\W\w|\s\S)/; + $self->{patterns}{'B'} = qr/.*\s\S/; + $self->{patterns}{'e'} = qr/[^\w\s](?=\w)|\w(?=\W)|\S(?=\s|$)/; + $self->{patterns}{'E'} = qr/\S(?=\s|$)/; + + () +} + + +sub on_action { + my ($self, $action) = @_; + + on_user_command($self, "keyboard-select:" . $action); +} + + +sub on_user_command { + my ($self, $cmd) = @_; + + if (not $self->{active}) { + if ($cmd eq 'keyboard-select:activate') { + activate($self); + } elsif ($cmd eq 'keyboard-select:search') { + activate($self, 1); + } + } + + () +} + + +sub key_press { + my ($self, $event, $keysym, $char) = @_; + my $key = chr($keysym); + + if (lc($key) eq 'c' && $event->{state} & urxvt::ControlMask) { + deactivate($self); + } elsif ($self->{search}) { + if ($keysym == 0xff1b) { + if ($self->{search_mode}) { + deactivate($self); + } else { + $self->{search} = ''; + status_area($self); + } + } elsif ($keysym == 0xff08) { + $self->{search} = substr($self->{search}, 0, -1); + if (not $self->{search} and $self->{search_mode}) { + deactivate($self); + } else { + status_area($self); + } + } elsif ($keysym == 0xff0d) { + my $txt = substr($self->{search}, 1); + if ($txt) { + $self->{pattern} = ($txt =~ m/[[:upper:]]/) ? qr/\Q$txt\E/ : + qr/\Q$txt\E/i; + } elsif ($self->{pattern}) { + delete $self->{pattern}; + } + $self->{search} = ''; + $self->screen_cur($self->{srhcr}, $self->{srhcc}); + if (not find_next($self)) { + if ($self->{search_mode}) { + deactivate($self); + } else { + status_area($self); + } + } + } elsif (length($char) > 0) { + $self->{search} .= $self->locale_decode($char); + my $txt = substr($self->{search}, 1); + if ($txt) { + $self->{pattern} = ($txt =~ m/[[:upper:]]/) ? qr/\Q$txt\E/ : + qr/\Q$txt\E/i; + } elsif ($self->{pattern}) { + delete $self->{pattern}; + } + $self->screen_cur($self->{srhcr}, $self->{srhcc}); + find_next($self); + status_area($self); + } + } elsif ($self->{move_to}) { + if ($keysym == 0xff1b) { + $self->{move_to} = 0; + status_area($self); + } elsif (length($char) > 0) { + $self->{move_to} = 0; + $self->{patterns}{'f-1'} = qr/^.*\Q$key\E/; + $self->{patterns}{'f+1'} = qr/^.+?\Q$key\E/; + move_to($self, ';'); + status_area($self); + } + } elsif ($keysym == 0xff1b || lc($key) eq 'q') { + deactivate($self); + } elsif ($key eq 'y' || $keysym == 0xff0d) { + if ($self->{select}) { + if ($self->{select} eq 'b') { + $self->selection($self->{selection}); + $self->selection_grab($event->{time}); + } else { + my ($br, $bc, $er, $ec) = calc_span($self); + $ec = $self->line($er)->l if $self->{select} eq 'l'; + $self->selection_beg($br, $bc); + $self->selection_end($er, $ec); + $self->selection_make($event->{time}); + } + if ($key eq 'y') { + if ($self->{select} ne 'b') { + $self->selection_beg(1, 0); + $self->selection_end(1, 0); + } + $self->{select} = ''; + status_area($self); + $self->want_refresh(); + } else { + deactivate($self); + } + } + } elsif ($key eq 'V') { + toggle_select($self, 'l'); + } elsif ($key eq 'v') { + if ($event->{state} & urxvt::ControlMask) { + toggle_select($self, 'b'); + } else { + toggle_select($self, 'n'); + } + } elsif ($key eq 'k' || $keysym == 0xff52) { + move_cursor($self, 'k'); + } elsif ($key eq 'j' || $keysym == 0xff54) { + move_cursor($self, 'j'); + } elsif ($key eq 'h' || $keysym == 0xff51) { + move_cursor($self, 'h'); + } elsif ($key eq 'l' || $keysym == 0xff53) { + move_cursor($self, 'l'); + } elsif ('gG0^$HML' =~ m/\Q$key\E/ || + ('fbdu' =~ m/\Q$key\E/ && $event->{state} & urxvt::ControlMask)) { + move_cursor($self, $key); + } elsif (lc($key) eq 'f') { + $self->{move_to} = 1; + $self->{move_dir} = $key eq 'F' ? -1 : 1; + status_area($self, $key); + } elsif (';,wWbBeE' =~ m/\Q$key\E/) { + move_to($self, $key); + } elsif ($key eq '/' || $key eq '?') { + $self->{search} = $key; + $self->{search_dir} = $key eq '?' ? -1 : 1; + ($self->{srhcr}, $self->{srhcc}) = $self->screen_cur(); + status_area($self); + } elsif (lc($key) eq 'n') { + find_next($self, $self->{search_dir} * ($key eq 'N' ? -1 : 1)); + } + + return 1; +} + + +sub move_cursor { + my ($self, $key) = @_; + my ($cr, $cc) = $self->screen_cur(); + my $line = $self->line($cr); + + if ($key eq 'k' && $line->beg > $self->top_row) { + $cr = $line->beg - 1; + } elsif ($key eq 'j' && $line->end < $self->nrow - 1) { + $cr = $line->end + 1; + } elsif ($key eq 'h' && $self->{offset} > 0) { + $self->{offset} = $line->offset_of($cr, $cc) - 1; + $self->{dollar} = 0; + } elsif ($key eq 'l' && $self->{offset} < $line->l - 1) { + ++$self->{offset}; + } elsif ($key eq 'f' || $key eq 'd') { + my $vs = $self->view_start() + + ($key eq 'd' ? $self->nrow / 2 : $self->nrow - 1); + $vs = 0 if $vs > 0; + $cr += $vs - $self->view_start($vs); + } elsif ($key eq 'b' || $key eq 'u') { + my $vs = $self->view_start() - + ($key eq 'u' ? $self->nrow / 2 : $self->nrow - 1); + $vs = $self->top_row if $vs < $self->top_row; + $cr += $vs - $self->view_start($vs); + } elsif ($key eq 'g') { + ($cr, $self->{offset}) = ($self->top_row, 0); + $self->{dollar} = 0; + } elsif ($key eq 'G') { + ($cr, $self->{offset}) = ($self->nrow - 1, 0); + $self->{dollar} = 0; + } elsif ($key eq '0') { + $self->{offset} = 0; + $self->{dollar} = 0; + } elsif ($key eq '^') { + my $ltxt = $self->special_decode($line->t); + while ($ltxt =~ s/^( *)\t/$1 . " " x (8 - length($1) % 8)/e) {} + $self->{offset} = $ltxt =~ m/^ +/ ? $+[0] : 0; + $self->{dollar} = 0; + } elsif ($key eq '$') { + my $co = $line->offset_of($cr, $cc); + $self->{dollar} = $co + 1; + $self->{offset} = $line->l - 1; + } elsif ($key eq 'H') { + $cr = $self->view_start(); + } elsif ($key eq 'M') { + $cr = $self->view_start() + $self->nrow / 2; + } elsif ($key eq 'L') { + $cr = $self->view_start() + $self->nrow - 1; + } + + $line = $self->line($cr); + $cc = $self->{dollar} || $self->{offset} >= $line->l ? $line->l - 1 : + $self->{offset}; + $self->screen_cur($line->coord_of($cc)); + + status_area($self); + $self->want_refresh(); + + () +} + + +sub move_to { + my ($self, $key) = @_; + my ($cr, $cc) = $self->screen_cur(); + my $line = $self->line($cr); + my $offset = $self->{offset}; + my ($dir, $pattern); + my ($wrap, $found) = (0, 0); + + if ($key eq ';' || $key eq ',') { + $dir = $self->{move_dir} * ($key eq ',' ? -1 : 1); + $pattern = $self->{patterns}{sprintf('f%+d', $dir)}; + return if not $pattern; + } else { + if (lc($key) eq 'b') { + $dir = -1; + } else { + $dir = 1; + ++$offset if lc($key) eq 'e'; + } + $pattern = $self->{patterns}{$key}; + $wrap = 1; + } + + if ($dir > 0) { + NEXTDOWN: my $text = substr($line->t, $offset); + if ($text =~ m/$pattern/) { + $offset += $+[0] - 1; + $found = 1; + } elsif ($wrap && $line->end + 1 < $self->nrow) { + $cr = $line->end + 1; + $line = $self->line($cr); + $offset = 0; + if (lc($key) eq 'e') { + goto NEXTDOWN; + } else { + $found = 1; + } + } + } elsif ($dir < 0) { + NEXTUP: my $text = substr($line->t, 0, $offset); + if ($text =~ m/$pattern/) { + $offset += $+[0] - length($text) - 1; + $found = 1; + } elsif ($wrap) { + if ($offset > 0) { + $offset = 0; + $found = 1; + } elsif ($line->beg > $self->top_row) { + $cr = $line->beg - 1; + $line = $self->line($cr); + $offset = $line->l; + goto NEXTUP; + } + } + } + + if ($found) { + $self->{dollar} = 0; + $self->{offset} = $offset; + $self->screen_cur($line->coord_of($offset)); + $self->want_refresh(); + } + + () +} + + +sub find_next { + my ($self, $dir) = @_; + + return if not $self->{pattern}; + $dir = $self->{search_dir} if not $dir; + + my ($cr, $cc) = $self->screen_cur(); + my $line = $self->line($cr); + my $offset = $line->offset_of($cr, $cc); + my $text; + my $found = 0; + + ++$offset if $dir > 0; + + while (not $found) { + if ($dir > 0) { + $text = substr($line->t, $offset); + if ($text =~ m/$self->{pattern}/) { + $found = 1; + $offset += $-[0]; + } else { + last if $line->end >= $self->nrow; + $line = $self->line($line->end + 1); + $offset = 0; + } + } else { + $text = substr($line->t, 0, $offset); + if ($text =~ m/$self->{pattern}/) { + $found = 1; + $offset = $-[0] while $text =~ m/$self->{pattern}/g; + } else { + last if $line->beg <= $self->top_row; + $line = $self->line($line->beg - 1); + $offset = $line->l; + } + } + } + + if ($found) { + $self->{dollar} = 0; + $self->{offset} = $offset; + $self->screen_cur($line->coord_of($offset)); + status_area($self); + $self->want_refresh(); + } + + return $found; +} + + +sub tt_write { + return 1; +} + + +sub refresh { + my ($self) = @_; + my $reverse_cursor = $self->{select} ne 'l'; + my ($cr, $cc) = $self->screen_cur(); + + if ($self->{select}) { + my ($br, $bc, $er, $ec) = calc_span($self); + + if ($self->{select} eq 'b') { + delete $self->{selection} if $self->{selection}; + my $co = $self->line($cr)->offset_of($cr, $cc); + my $dollar = $self->{dollar} && $co >= $self->{dollar} - 1; + + my $r = $br; + while ($r <= $er) { + my $line = $self->line($r); + if ($bc < $line->l) { + $ec = $line->l if $dollar; + $self->{selection} .= substr($line->t, $bc, $ec - $bc); + my ($br, $bc) = $line->coord_of($bc); + my ($er, $ec) = $line->coord_of($ec <= $line->l ? $ec : $line->l); + $self->scr_xor_span($br, $bc, $er, $ec, urxvt::RS_RVid); + } elsif ($r == $cr) { + $reverse_cursor = 0; + } + $self->{selection} .= "\n" if $line->end < $er; + $r = $line->end + 1; + } + } else { + $self->scr_xor_span($br, $bc, $er, $ec, urxvt::RS_RVid); + } + + if ($reverse_cursor) { + # make the cursor visible again + $self->scr_xor_span($cr, $cc, $cr, $cc + 1, urxvt::RS_RVid); + } + } + + # scroll the current cursor position into visible area + if ($cr < $self->view_start()) { + $self->view_start($cr); + } elsif ($cr >= $self->view_start() + $self->nrow) { + $self->view_start($cr - $self->nrow + 1); + } + + () +} + + +sub activate { + my ($self, $search) = @_; + + $self->{active} = 1; + + $self->{select} = ''; + $self->{dollar} = 0; + $self->{move_to} = 0; + + if ($search) { + $self->{search} = '?'; + $self->{search_dir} = -1; + $self->{search_mode} = 1; + } else { + $self->{search} = ''; + $self->{search_mode} = 0; + } + + ($self->{oldcr}, $self->{oldcc}) = $self->screen_cur(); + ($self->{srhcr}, $self->{srhcc}) = $self->screen_cur(); + $self->{old_view_start} = $self->view_start(); + $self->{old_pty_ev_events} = $self->pty_ev_events(urxvt::EV_NONE); + + my $line = $self->line($self->{oldcr}); + $self->{offset} = $line->offset_of($self->{oldcr}, $self->{oldcc}); + + $self->selection_beg(1, 0); + $self->selection_end(1, 0); + + $self->enable( + key_press => \&key_press, + refresh_begin => \&refresh, + refresh_end => \&refresh, + tt_write => \&tt_write, + ); + + if ($self->{offset} >= $line->l) { + $self->{offset} = $line->l > 0 ? $line->l - 1 : 0; + $self->screen_cur($line->coord_of($self->{offset})); + $self->want_refresh(); + } + + $self->{overlay_len} = 0; + status_area($self); + + () +} + + +sub deactivate { + my ($self) = @_; + + $self->selection_beg(1, 0); + $self->selection_end(1, 0); + + delete $self->{overlay} if $self->{overlay}; + delete $self->{selection} if $self->{selection}; + + $self->disable("key_press", "refresh_begin", "refresh_end", "tt_write"); + $self->screen_cur($self->{oldcr}, $self->{oldcc}); + $self->view_start($self->{old_view_start}); + $self->pty_ev_events($self->{old_pty_ev_events}); + + $self->want_refresh(); + + $self->{active} = 0; + + () +} + + +sub status_area { + my ($self, $extra) = @_; + my ($stat, $stat_len); + + if ($self->{search}) { + $stat_len = $self->ncol; + $stat = $self->{search} . ' ' x ($stat_len - length($self->{search})); + } else { + if ($self->{select}) { + $stat = "-V" . ($self->{select} ne 'n' ? uc($self->{select}) : "") . "- "; + } + + if ($self->top_row == 0) { + $stat .= "All"; + } elsif ($self->view_start() == $self->top_row) { + $stat .= "Top"; + } elsif ($self->view_start() == 0) { + $stat .= "Bot"; + } else { + $stat .= sprintf("%2d%%", + ($self->top_row - $self->view_start) * 100 / $self->top_row); + } + + $stat = "$extra $stat" if $extra; + $stat_len = length($stat); + } + + if (!$self->{overlay} || $self->{overlay_len} != $stat_len) { + delete $self->{overlay} if $self->{overlay}; + $self->{overlay} = $self->overlay(-1, -1, $stat_len, 1, + urxvt::OVERLAY_RSTYLE, 0); + $self->{overlay_len} = $stat_len; + } + + $self->{overlay}->set(0, 0, $self->special_encode($stat)); + $self->{overlay}->show(); + + () +} + + +sub toggle_select { + my ($self, $mode) = @_; + + if ($self->{select} eq $mode) { + $self->{select} = ''; + } else { + if (not $self->{select}) { + ($self->{ar}, $self->{ac}) = $self->screen_cur(); + } + $self->{select} = $mode; + } + + status_area($self); + $self->want_refresh(); + + () +} + + +sub calc_span { + my ($self) = @_; + my ($cr, $cc) = $self->screen_cur(); + my ($br, $bc, $er, $ec); + + if ($self->{select} eq 'b') { + $br = $self->line($cr)->beg; + $bc = $self->line($cr)->offset_of($cr, $cc); + $er = $self->line($self->{ar})->beg; + $ec = $self->line($self->{ar})->offset_of($self->{ar}, $self->{ac}); + ($br, $er) = ($er, $br) if $br > $er; + ($bc, $ec) = ($ec, $bc) if $bc > $ec; + } else { + if ($cr < $self->{ar}) { + ($br, $bc, $er, $ec) = ($cr, $cc, $self->{ar}, $self->{ac}); + } elsif ($cr > $self->{ar}) { + ($br, $bc, $er, $ec) = ($self->{ar}, $self->{ac}, $cr, $cc); + } else { + ($br, $er) = ($cr, $cr); + ($bc, $ec) = $cc < $self->{ac} ? ($cc, $self->{ac}) : ($self->{ac}, $cc); + } + } + + if ($self->{select} eq 'l') { + ($br, $er) = ($self->line($br)->beg, $self->line($er)->end); + ($bc, $ec) = (0, $self->ncol); + } else { + ++$ec; + } + + return ($br, $bc, $er, $ec); +} diff --git a/.urxvt/ext/rotate-colors b/.urxvt/ext/rotate-colors new file mode 100644 index 0000000..0016d6a --- /dev/null +++ b/.urxvt/ext/rotate-colors @@ -0,0 +1,92 @@ +#! /usr/bin/env perl -w +# Author: John Tyree +# Website: http://github.com/johntyree/urxvt-perls/blob/master/rotate-colors +# License: CCBYNC + +# Use keyboard shortcuts to load colors of the form *.colorN:XXXXXX from a file +# This gives us "on demand" theme switching. + +# Usage: put the following lines in your .Xdefaults/.Xresources: +# URxvt.perl-ext-common: ...,rotate-colors +# URxvt.rotate-colors.files: ~/.Xresources,~/light.txt,~/dark.txt +# URxvt.keysym.M-C-n: perl:rotate-colors:next +# URxvt.keysym.M-C-p: perl:rotate-colors:prev + +use strict; + + +sub on_start { + my ($self) = @_; + $self->{current_index} = -1; + my @arr = split(/,/, $self->x_resource('files') || ''); + $self->{color_files} = \@arr; + + () +} + +sub read_colors { + my $fn = shift; + open my $fin, $fn or print STDERR "Unable to open $fn for reading"; + my %colors; + + while (my $line = <$fin>) { + if ($line =~ /(\w+)\s*:\s*(#[0-9a-fA-F]+)/) { + $colors{$1} = $2; + } + } + + return %colors +} + +sub escape_seq { + my ($k, $v) = @_; + my $cmd = ""; + if ($k =~ /^color(\d+)$/) { + $cmd = "4;$1;$v"; + } elsif ($k =~ /^colorBD$/) { + $cmd = "5;0;$v"; + } elsif ($k =~ /^colorUL$/) { + $cmd = "5;1;$v"; + } elsif ($k =~ /^colorBL$/) { + $cmd = "5;2;$v"; + } elsif ($k =~ /^colorRV$/) { + $cmd = "5;3;$v"; + } elsif ($k =~ /^foreground$/) { + $cmd = "10;$v"; + } elsif ($k =~ /^background$/) { + $cmd = "11;$v"; + } elsif ($k =~ /^cursorColor$/) { + $cmd = "12;$v"; + } elsif ($k =~ /^pointerColor$/) { + $cmd = "13;$v"; + } + + return '\033]'.$cmd.'\007' +} + +sub build_cmd { + my $fn = shift; + my %colors = read_colors($fn); + print $fn."\n"; + my $s = join("", map {escape_seq($_, $colors{$_})} keys %colors); + + return $s +} + +sub on_user_command { + my ($self, $cmd) = @_; + my @fs = @{$self->{color_files}}; + my $len = @fs; + + if ($cmd eq "rotate-colors:next") { + my $idx = $self->{current_index}++; + my $fn = $fs[$idx % scalar(@fs)]; + $self->cmd_parse(build_cmd($fn)); + } elsif ($cmd eq "rotate-colors:prev") { + my $idx = $self->{current_index}--; + my $fn = $fs[$idx % scalar(@fs)]; + $self->cmd_parse(build_cmd($fn)); + } + + () +} diff --git a/.urxvt/ext/url-select b/.urxvt/ext/url-select new file mode 100644 index 0000000..dc80496 --- /dev/null +++ b/.urxvt/ext/url-select @@ -0,0 +1,403 @@ +#! perl -w +# Author: Bert Muennich +# Website: http://www.github.com/muennich/urxvt-perls +# Based on: http://www.jukie.net/~bart/blog/urxvt-url-yank +# License: GPLv2 + +# Use keyboard shortcuts to select URLs. +# This should be used as a replacement for the default matcher extension, +# it also makes URLs clickable with the middle mouse button. + +# Usage: put the following lines in your .Xdefaults/.Xresources: +# URxvt.perl-ext-common: ...,url-select +# URxvt.keysym.M-u: perl:url-select:select_next + +# Use Meta-u to activate URL selection mode, then use the following keys: +# j/k: Select next downward/upward URL (also with arrow keys) +# g/G: Select first/last URL (also with home/end key) +# o/Return: Open selected URL in browser, Return: deactivate afterwards +# y: Copy (yank) selected URL and deactivate selection mode +# q/Escape: Deactivate URL selection mode + +# Options: +# URxvt.url-select.autocopy: If true, selected URLs are copied to PRIMARY +# URvxt.url-select.button: Mouse button to click-open URLs (default: 2) +# URxvt.url-select.launcher: Browser/command to open selected URL with +# URxvt.url-select.underline: If set to true, all URLs get underlined + +use strict; + +# The custom rendition bit to use for marking the cell as being underlined +# by us so we can unset it again after a line has changed. +use constant UNDERLINED => 1<<3; # arbitrarily chosen in hope of no collision + +sub on_start { + my ($self) = @_; + + # read resource settings + if ($self->x_resource('url-select.launcher')) { + @{$self->{browser}} = split /\s+/, $self->x_resource('url-select.launcher'); + } else { + @{$self->{browser}} = ('x-www-browser'); + } + if ($self->x_resource('url-select.underline') eq 'true') { + $self->enable(line_update => \&line_update); + } + if ($self->x_resource('url-select.autocopy') eq 'true') { + $self->{autocopy} = 1; + } + + $self->{state} = 0; + + for my $mod (split '', $self->x_resource("url-select.button") || + $self->x_resource("matcher.button") || 2) { + if ($mod =~ /^\d+$/) { + $self->{button} = $mod; + } elsif ($mod eq "C") { + $self->{state} |= urxvt::ControlMask; + } elsif ($mod eq "S") { + $self->{state} |= urxvt::ShiftMask; + } elsif ($mod eq "M") { + $self->{state} |= $self->ModMetaMask; + } elsif ($mod ne "-" && $mod ne " ") { + warn("invalid button/modifier in $self->{_name}<$self->{argv}[0]>: $mod\n"); + } + } + + if ($self->x_resource('matcher.pattern')) { + @{$self->{pattern}} = ($self->x_resource('matcher.pattern')); + } elsif ($self->x_resource('matcher.pattern.0')) { + my $current = 0; + + while (defined (my $res = $self->x_resource("matcher.pattern.$current"))) { + $res = $self->locale_decode($res); + utf8::encode $res; + push @{$self->{pattern}}, qr($res)x; + $current++; + } + } else { + @{$self->{pattern}} = qr{ + (?:https?://|ftp://|news://|mailto:|file://|\bwww\.) + [\w\-\@;\/?:&=%\$.+!*\x27,~#]* + ( + \([\w\-\@;\/?:&=%\$.+!*\x27,~#]*\) # Allow a pair of matched parentheses + | # + [\w\-\@;\/?:&=%\$+*~] # exclude some trailing characters (heuristic) + )+ + }x; + } + + () +} + + +sub line_update { + my ($self, $row) = @_; + + my $line = $self->line($row); + my $text = $line->t; + my $rend = $line->r; + + # clear all underlines that were set by us + for (@$rend) { + if (urxvt::GET_CUSTOM($_) & UNDERLINED) { + $_ = urxvt::SET_CUSTOM($_, urxvt::GET_CUSTOM($_) & ~UNDERLINED) & + ~urxvt::RS_Uline; + } + } + + for my $pattern (@{$self->{pattern}}) { + while ($text =~ /$pattern/g) { + my $url = $&; + my ($beg, $end) = ($-[0], $+[0] - 1); + + for (@{$rend}[$beg .. $end]) { + unless ($_ & urxvt::RS_Uline) { + $_ = urxvt::SET_CUSTOM($_, urxvt::GET_CUSTOM($_) | UNDERLINED); + $_ |= urxvt::RS_Uline; + } + } + } + } + + $line->r($rend); + + () +} + +sub on_action { + my ($self, $action) = @_; + + on_user_command($self, "url-select:" . $action); +} + + +sub on_user_command { + my ($self, $cmd) = @_; + + if ($cmd eq 'url-select:select_next') { + if (not $self->{active}) { + activate($self); + } + select_next($self, -1); + } + + () +} + + +sub key_press { + my ($self, $event, $keysym) = @_; + my $char = chr($keysym); + + if ($keysym == 0xff1b || lc($char) eq 'q' || + (lc($char) eq 'c' && $event->{state} & urxvt::ControlMask)) { + deactivate($self); + } elsif ($keysym == 0xff0d || $char eq 'o') { + $self->exec_async(@{$self->{browser}}, ${$self->{found}[$self->{n}]}[4]); + deactivate($self) unless $char eq 'o'; + } elsif ($char eq 'y') { + my $found = $self->{found}[$self->{n}]; + $self->selection_beg(${$found}[0], ${$found}[1]); + $self->selection_end(${$found}[2], ${$found}[3]); + $self->selection_make($event->{time}); + $self->selection_beg(1, 0); + $self->selection_end(1, 0); + deactivate($self); + } elsif ($char eq 'k' || $keysym == 0xff52 || $keysym == 0xff51) { + select_next($self, -1, $event); + } elsif ($char eq 'j' || $keysym == 0xff54 || $keysym == 0xff53) { + select_next($self, 1, $event); + } elsif ($char eq 'g' || $keysym == 0xff50) { + $self->{row} = $self->top_row - 1; + delete $self->{found}; + select_next($self, 1, $event); + } elsif ($char eq 'G' || $keysym == 0xff57) { + $self->{row} = $self->nrow; + delete $self->{found}; + select_next($self, -1, $event); + } + + return 1; +} + + +sub on_button_press { + my ($self, $event) = @_; + + my $mask = $self->ModLevel3Mask | $self->ModMetaMask | + urxvt::ShiftMask | urxvt::ControlMask; + + if ($event->{button} == $self->{button} && ($event->{state} & $mask) == $self->{state}) { + my $col = $event->{col}; + my $row = $event->{row}; + my $line = $self->line($row); + my $text = $line->t; + + for my $pattern (@{$self->{pattern}}) { + while ($text =~ /$pattern/g) { + my ($url, $beg, $end) = ($&, $-[0], $+[0]); + --$end if $url =~ s/["')]$//; + + if ($col >= $beg && $col <= $end) { + $self->{button_pressed} = 1; + $self->{button_col} = $col; + $self->{button_row} = $row; + $self->{button_url} = $url; + return 1; + } + } + } + } + + () +} + +sub on_button_release { + my ($self, $event) = @_; + + if ($self->{button_pressed} && $event->{button} == $self->{button}) { + my $col = $event->{col}; + my $row = $event->{row}; + + $self->{button_pressed} = 0; + + if ($col == $self->{button_col} && $row == $self->{button_row}) { + $self->exec_async(@{$self->{browser}}, $self->{button_url}); + return 1; + } + } + + () +} + + +sub select_next { + # $dir < 0: up, > 0: down + my ($self, $dir, $event) = @_; + my $row = $self->{row}; + + if (($dir < 0 && $self->{n} > 0) || + ($dir > 0 && $self->{n} < $#{ $self->{found} })) { + # another url on current line + $self->{n} += $dir; + hilight($self); + if ($self->{autocopy}) { + my $found = $self->{found}[$self->{n}]; + $self->selection_beg(${$found}[0], ${$found}[1]); + $self->selection_end(${$found}[2], ${$found}[3]); + $self->selection_make($event->{time}); + $self->selection_beg(1, 0); + $self->selection_end(1, 0); + } + return; + } + + while (($dir < 0 && $row > $self->top_row) || + ($dir > 0 && $row < $self->nrow - 1)) { + my $line = $self->line($row); + $row = ($dir < 0 ? $line->beg : $line->end) + $dir; + $line = $self->line($row); + my $text = $line->t; + + for my $pattern (@{$self->{pattern}}) { + if ($text =~ /$pattern/g) { + delete $self->{found}; + + do { + my ($beg, $end) = ($-[0], $+[0]); + push @{$self->{found}}, [$line->coord_of($beg), + $line->coord_of($end), substr($text, $beg, $end - $beg)]; + } while ($text =~ /$pattern/g); + + $self->{row} = $row; + $self->{n} = $dir < 0 ? $#{$self->{found}} : 0; + hilight($self); + if ($self->{autocopy}) { + my $found = $self->{found}[$self->{n}]; + $self->selection_beg(${$found}[0], ${$found}[1]); + $self->selection_end(${$found}[2], ${$found}[3]); + $self->selection_make($event->{time}); + $self->selection_beg(1, 0); + $self->selection_end(1, 0); + } + return; + } + } + } + + deactivate($self) unless $self->{found}; + + () +} + + +sub hilight { + my ($self) = @_; + + if ($self->{found}) { + if ($self->{row} < $self->view_start() || + $self->{row} >= $self->view_start() + $self->nrow) { + # scroll selected url into visible area + my $top = $self->{row} - ($self->nrow >> 1); + $self->view_start($top < 0 ? $top : 0); + } + + status_area($self); + $self->want_refresh(); + } + + () +} + + +sub refresh { + my ($self) = @_; + + if ($self->{found}) { + $self->scr_xor_span(@{$self->{found}[$self->{n}]}[0 .. 3], urxvt::RS_RVid); + } + + () +} + + +sub status_area { + my ($self) = @_; + + my $row = $self->{row} < 0 ? + $self->{row} - $self->top_row : abs($self->top_row) + $self->{row}; + my $text = sprintf("%d,%d ", $row + 1, $self->{n} + 1); + + if ($self->top_row == 0) { + $text .= "All"; + } elsif ($self->view_start() == $self->top_row) { + $text .= "Top"; + } elsif ($self->view_start() == 0) { + $text .= "Bot"; + } else { + $text .= sprintf("%2d%", + ($self->top_row - $self->view_start) * 100 / $self->top_row); + } + + my $text_len = length($text); + + if ($self->{overlay_len} != $text_len) { + delete $self->{overlay} if $self->{overlay}; + $self->{overlay} = $self->overlay(-1, -1, $text_len, 1, + urxvt::OVERLAY_RSTYLE, 0); + $self->{overlay_len} = $text_len; + } + + $self->{overlay}->set(0, 0, $self->special_encode($text)); + $self->{overlay}->show(); + + () +} + + +sub tt_write { + return 1; +} + + +sub activate { + my ($self) = @_; + + $self->{active} = 1; + + $self->{row} = $self->view_start() + $self->nrow; + $self->{n} = 0; + $self->{overlay_len} = 0; + $self->{button_pressed} = 0; + + $self->{view_start} = $self->view_start(); + $self->{pty_ev_events} = $self->pty_ev_events(urxvt::EV_NONE); + + $self->enable( + key_press => \&key_press, + refresh_begin => \&refresh, + refresh_end => \&refresh, + tt_write => \&tt_write, + ); + + () +} + + +sub deactivate { + my ($self) = @_; + + $self->disable("key_press", "refresh_begin", "refresh_end", "tt_write"); + $self->view_start($self->{view_start}); + $self->pty_ev_events($self->{pty_ev_events}); + + delete $self->{overlay} if $self->{overlay}; + delete $self->{found} if $self->{found}; + + $self->want_refresh(); + + $self->{active} = 0; + + () +} diff --git a/.uzbl/config b/.uzbl/config new file mode 100644 index 0000000..5539181 --- /dev/null +++ b/.uzbl/config @@ -0,0 +1,499 @@ +## Core settings + +# Common directory locations +set prefix = @(echo $PREFIX)@ +set data_home = @(echo $XDG_DATA_HOME)@ +set cache_home = @(echo $XDG_CACHE_HOME)@ +set config_home = @(echo $XDG_CONFIG_HOME)@ + +# Interface paths +set fifo_dir = /tmp +set socket_dir = /tmp + +# Shell command +set shell_cmd = sh -c + +## General config aliases + +# Config related events (use the request function): + +# request MODE_CONFIG = +set mode_config = request MODE_CONFIG + +# request ON_EVENT +set on_event = request ON_EVENT + +# request ON_SET +set on_set = request ON_SET + +# request MODMAP +set modmap = request MODMAP + +# request IGNORE_KEY +set ignore_key = request IGNORE_KEY + +# request TOGGLE_MODES ... +set toggle_modes = request TOGGLE_MODES + +set set_mode = set mode = +set set_status = set status_message = + +# Spawn path shortcuts. In spawn the first dir+path match is used in "dir1:dir2:dir3:executable" +set scripts_dir = /home/urbain/dotfiles/config/uzbl/scripts:@data_home/uzbl:@prefix/share/uzbl/examples/data:scripts + +## Hardcoded handlers + +# These handlers can't be moved to the new event system yet as we don't +# support events that can wait for a response from a script. +set scheme_handler = sync_spawn @scripts_dir/scheme.py +#set request_handler = sync_spawn @scripts_dir/request.py +set authentication_handler = sync_spawn @scripts_dir/auth.py +set download_handler = sync_spawn @scripts_dir/download.sh + +## Dynamic event handlers + +# What to do when a website wants to open a new window: + +# Open link in new window +@on_event NEW_WINDOW sh 'uzbl-browser ${1:+-u "$1"}' %r +# Open in current window (also see the REQ_NEW_WINDOW event handler below) +#@on_event NEW_WINDOW uri %s +# Open in new tab. Other options are NEW_TAB_NEXT, NEW_BG_TAB and NEW_BG_TAB_NEXT. +#@on_event NEW_WINDOW event NEW_TAB %s + +# What to do when the user requests a new window: +# If your the NEW_WINDOW handler opens the uri in the current window, you'll +# probably want to change this handler to open a new window or tab. +@on_event REQ_NEW_WINDOW event NEW_WINDOW %s + +# Load start handler +@on_event LOAD_START @set_status wait +# Reset the keycmd on navigation +@on_event LOAD_START @set_mode + +# Load commit handlers +@on_event LOAD_COMMIT @set_status recv + + # add some javascript to the page for other 'js' and 'script' commands to access later. +@on_event LOAD_COMMIT js uzbl = {}; +@on_event LOAD_COMMIT script @scripts_dir/formfiller.js +@on_event LOAD_COMMIT script @scripts_dir/follow.js + +# Userscripts/per-site-settings. See the script and the example configuration for details +#@on_event LOAD_COMMIT spawn @scripts_dir/per-site-settings.py @data_home/uzbl/per-site-settings + +# Load finish handlers +@on_event LOAD_FINISH @set_status done +@on_event LOAD_FINISH spawn @scripts_dir/history.sh + +# Switch to insert mode if a (editable) html form is clicked +@on_event FOCUS_ELEMENT sh 'if [ "$1" = INPUT -o "$1" = TEXTAREA -o "$1" = SELECT ]; then echo "@set_mode insert" > $UZBL_FIFO; fi' %s +# Switch to command mode if anything else is clicked +@on_event ROOT_ACTIVE @set_mode command + +# Example CONFIG_CHANGED event handler +#@on_event CONFIG_CHANGED print Config changed: %1 = %2 + +# Scroll percentage calculation +@on_event SCROLL_VERT set scroll_message = \@<(function(curr, min, max, size){if(max == size) return '--'; var p=(curr/(max - size)); return Math.round(10000*p)/100;})(%1,%2,%3,%4)>\@% + +## Behaviour and appearance + +# Custom CSS can be defined here, including link follower hint styles +set stylesheet_uri = file://@config_home/uzbl/style.css + +set show_status = 1 +set status_top = 0 +set status_background = #303030 + +set modcmd_style = weight="bold" foreground="red" +set keycmd_style = weight="light" foreground="red" +set prompt_style = foreground="grey" +set cursor_style = underline="single" +set completion_style = foreground="green" +set hint_style = weight="bold" + +set mode_section = [\@[\@mode_indicator]\@] +set keycmd_section = [\@[\@keycmd_prompt]\@\@modcmd\@keycmd\@completion_list] +set progress_section = \@[\@progress.output]\@ +set scroll_section = \@[\@scroll_message]\@ +set uri_section = \@[\@uri]\@ +set name_section = \@[\@NAME]\@ +set status_section = \@status_message +set selected_section = \@[\@SELECTED_URI]\@ + +set download_section = \@downloads + +set status_format = @mode_section @keycmd_section @progress_section @name_section @status_section @scroll_section @selected_section @download_section +set status_format_right = uri: @uri_section + +set title_format_long = \@keycmd_prompt \@raw_modcmd \@raw_keycmd \@TITLE - Uzbl browser <\@NAME> \@SELECTED_URI + +# Progress bar config +# %d = done, %p = pending %c = percent done, %i = int done, %s = spinner, +# %t = percent pending, %o = int pending, %r = sprite scroll +set progress.width = 8 +set progress.format = [%d>%p]%c +set progress.done = = +set progress.pending = + +## Useragent setup + +set useragent = Uzbl (Webkit @{WEBKIT_MAJOR}.@{WEBKIT_MINOR}) (@(+uname -sm)@ [@ARCH_UZBL]) + +## Configure cookie blacklist + +# Accept 'session cookies' from uzbl.org (when you have a whitelist all other cookies are dropped) +#request WHITELIST_COOKIE domain 'uzbl.org$' expires '^$' + +# Drop google analytics tracking cookies (applied after whitelists if any) +#request BLACKLIST_COOKIE name '^__utm.$' + +## SSL related configuration + +# Set it to certificates store of your distribution, or your own CAfile. +set ssl_ca_file = /etc/ssl/certs/ca-certificates.crt +set ssl_verify = 1 +# Command to toggle ssl_verify value: +@cbind !ssl = chain 'toggle ssl_verify' 'reload' +# Example SSL error handler: +@on_event LOAD_ERROR js var patt=new RegExp('SSL handshake failed'); if (patt.test('%3')) {alert ('%3');} + +## Key binding configuration +# --- Internal modmapping and ignoring --------------------------------------- + +#modmap +@modmap +@modmap +@modmap +@modmap + +#ignore_key +@ignore_key +@ignore_key +@ignore_key +@ignore_key + +# --- Bind aliases ----------------------------------------------------------- + +# request BIND = +set bind = request MODE_BIND global + +# request MODE_BIND = +set mode_bind = request MODE_BIND + +# Insert mode binding alias +set ibind = @mode_bind insert + +# Command mode binding alias +set cbind = @mode_bind command + +# Non-insert mode bindings alias (ebind for edit-bind). +set ebind = @mode_bind global,-insert + +# --- Global & keycmd editing binds ------------------------------------------ + +# Resets keycmd and returns to default mode. +@on_event ESCAPE @set_mode +@on_event ESCAPE event KEYCMD_CLEAR +@on_event ESCAPE js uzbl.follow.clearHints() +@on_event ESCAPE search_clear +@on_event ESCAPE js window.getSelection().removeAllRanges() +@bind = event ESCAPE +@bind [ = event ESCAPE + +# Commands for editing and traversing the keycmd. +@ebind = event KEYCMD_EXEC_CURRENT +@ebind = event SET_CURSOR_POS 0 +@ebind = event SET_CURSOR_POS -1 +@ebind = event SET_CURSOR_POS - +@ebind = event SET_CURSOR_POS + +@ebind = event KEYCMD_BACKSPACE +@ebind = event KEYCMD_DELETE +@ebind = event START_COMPLETION +# Readline-ish bindings. +@ebind w = event KEYCMD_STRIP_WORD \ -./&?= +@ebind u = event SET_KEYCMD +@ebind a = event SET_CURSOR_POS 0 +@ebind e = event SET_CURSOR_POS -1 + +@ebind = event HISTORY_PREV +@ebind = event HISTORY_NEXT +@ebind r_ = event HISTORY_SEARCH %s +# Keycmd injection/append examples. +#@ebind su = event INJECT_KEYCMD \@uri +#@ebind st = event INJECT_KEYCMD \@title +#@ebind du = event APPEND_KEYCMD \@uri +#@ebind dt = event APPEND_KEYCMD \@title + +# --- Mouse bindings --------------------------------------------------------- + +# Middle click open in new window +@bind = sh 'if [ "$1" ]; then echo "event REQ_NEW_WINDOW $1" > "$UZBL_FIFO"; else echo "uri $(xclip -o | sed s/\\\@/%40/g)" > "$UZBL_FIFO"; fi' '\@SELECTED_URI' + +# --- Keyboard bindings ------------------------------------------------------ + +# With this command you can enter in any command at runtime when prefixed with +# a colon. +@cbind ,_ = %s + +# open a new window or a new tab (see the on_event NEW_WINDOW settings above) +@cbind w = event REQ_NEW_WINDOW + +# Page movement binds +@cbind j = scroll vertical 20 +@cbind k = scroll vertical -20 +@cbind h = scroll horizontal -20 +@cbind l = scroll horizontal 20 +@cbind e = scroll vertical 40 +@cbind y = scroll vertical -40 +@cbind f = scroll vertical 100% +@cbind b = scroll vertical -100% +@cbind gg = scroll vertical begin +@cbind G = scroll vertical end +@cbind ^ = scroll horizontal begin +@cbind $ = scroll horizontal end +@cbind = scroll vertical end +@cbind g_ = scroll vertical %r! + +# Navigation binds +@cbind H = back +@cbind L = forward +@cbind S = stop +@cbind r = reload +@cbind R = reload_ign_cache + +# Zoom binds +@cbind + = zoom_in +@cbind - = zoom_out +@cbind T = toggle zoom_type +@cbind 1 = set zoom_level = 1.0 +@cbind 2 = set zoom_level = 2.0 + +# Appearance binds +@cbind s = toggle show_status + +# Page searching binds +@cbind /* = search %s +@cbind ?* = search_reverse %s + +# Jump to next and previous items +@cbind n = search +@cbind N = search_reverse + +# Print pages to a printer +@cbind p = hardcopy + +# Web searching binds +@cbind l_ = uri http://www.google.co.uk/search?q=\@\@ +@cbind ddg_ = uri http://duckduckgo.com/?q=%s +@cbind \\awiki_ = uri http://wiki.archlinux.org/index.php/Special:Search?search=\@\@&go=Go +@cbind \\wiki_ = uri http://en.wikipedia.org/w/index.php?title=Special:Search&search=\@\@&go=Go + +# Handy binds +@cbind s__ = set %1 = %2 +@cbind ZZ = exit + +# Dump config to stdout +@cbind !dump = sh 'echo dump_config > "$UZBL_FIFO"' + +# Reload all variables in the config +@cbind !reload = sh "sed '/^# === Post-load misc commands/,$d' \"$UZBL_CONFIG\" | grep '^set ' > \"$UZBL_FIFO\"" + +# Uri opening prompts +@cbind o_ = uri %s + +# Or have it load the current uri into the keycmd for editing +@cbind O_ = uri %s + +# Mode setting binds +@cbind i = @set_mode insert + +# Hard-bound bookmarks +@cbind gh = uri http://www.google.co.uk + +# New window binds +@cbind t = event REQ_NEW_WINDOW + +# SSL-ify bindings +@cbind zs = uri \@(echo "$UZBL_URI" | sed -e 's/^http:/https:/')\@ +@cbind zS = event REQ_NEW_WINDOW \@(echo "$UZBL_URI" | sed -e 's/^http:/https:/')\@ + +# Yanking & pasting binds +@cbind yu = sh 'echo -n "$UZBL_URI" | xclip' +@cbind yU = sh 'echo -n "$1" | xclip' '\@SELECTED_URI' +@cbind yy = sh 'echo -n "$UZBL_TITLE" | xclip' +@cbind ys = spawn @scripts_dir/follow.sh \@< uzbl.follow.followSelection('returnuri') >\@ clipboard + +# Clone current window +@cbind c = event REQ_NEW_WINDOW \@uri + +# Go the page from primary selection +@cbind p = sh 'echo "uri $(xclip -o | sed s/\\\@/%40/g)" > "$UZBL_FIFO"' + +# Go to the page in clipboard +@cbind P = sh 'echo "uri $(xclip -selection clipboard -o | sed s/\\\@/%40/g)" > "$UZBL_FIFO"' + +# Start a new uzbl instance from the page in primary selection +@cbind 'p = sh 'echo "event REQ_NEW_WINDOW $(xclip -o)" > "$UZBL_FIFO"' + +# paste primary selection into keycmd at the cursor position +@bind = sh 'echo "event INJECT_KEYCMD $(xclip -o | sed s/\\\@/%40/g)" > "$UZBL_FIFO"' + +# Bookmark inserting binds +@cbind m_ = sh 'echo "$UZBL_URI $1" >> "$XDG_DATA_HOME"/uzbl/bookmarks' '%s' + +# Or use a script to insert a bookmark. +@cbind M = spawn @scripts_dir/insert_bookmark.sh + +# Bookmark/history loading +@cbind U = spawn @scripts_dir/load_url_from_history.sh +@cbind u = spawn @scripts_dir/load_url_from_bookmarks.sh + +# Temporary bookmarks +@cbind d = spawn @scripts_dir/insert_temp.sh +@cbind D = spawn @scripts_dir/load_url_from_temps.sh + +set follow_hint_keys = uhetonasidpgcr +@cbind f* = spawn @scripts_dir/follow.sh \@< uzbl.follow("\@follow_hint_keys", "%s", 'click') >\@ +@cbind F* = spawn @scripts_dir/follow.sh \@< uzbl.follow("\@follow_hint_keys", "%s", 'newwindow') >\@ +@cbind fL* = spawn @scripts_dir/follow.sh \@< uzbl.follow("\@follow_hint_keys", "%s", 'returnuri') >\@ set +@cbind FL* = spawn @scripts_dir/follow.sh \@< uzbl.follow("\@follow_hint_keys", "%s", 'returnuri') >\@ clipboard +@cbind fi = spawn @scripts_dir/go_input.sh + +@cbind fs = spawn @scripts_dir/follow.sh \@< uzbl.follow.followSelection('returnuri') >\@ set +@cbind fS = spawn @scripts_dir/follow.sh \@< uzbl.follow.followSelection('click') >\@ +@cbind Fs = spawn @scripts_dir/follow.sh \@< uzbl.follow.followSelection('newwindow') >\@ +@cbind FS = spawn @scripts_dir/follow.sh \@< uzbl.follow.followSelection('returnuri') >\@ clipboard + +@cbind ft* = spawn @scripts_dir/follow.sh \@< uzbl.follow.followTextContent("%s", 'returnuri') >\@ set +@cbind fT* = spawn @scripts_dir/follow.sh \@< uzbl.follow.followTextContent("%s", 'click') >\@ +@cbind Ft* = spawn @scripts_dir/follow.sh \@< uzbl.follow.followTextContent("%s", 'newwindow') >\@ +@cbind FT* = spawn @scripts_dir/follow.sh \@< uzbl.follow.followTextContent("%s", 'returnuri') >\@ clipboard + +@cbind '* = spawn @scripts_dir/follow.sh \@< uzbl.follow.followTextContent("%s", 'click') >\@ + +# Form filler binds +# This script allows you to configure (per domain) values to fill in form +# fields (eg login information) and to fill in these values automatically. +# This implementation allows you to save multiple profiles for each form +# (think about multiple accounts on some website). +set formfiller = spawn @scripts_dir/formfiller.sh +@cbind ze = @formfiller edit +@cbind zn = @formfiller new +@cbind zl = @formfiller load +@cbind zo = @formfiller once + +## Uzbl tabbed binds + +# Tab opening +@cbind gn = event NEW_TAB +@cbind gN = event NEW_TAB_NEXT +@cbind go_ = event NEW_TAB %s +@cbind gO_ = event NEW_TAB_NEXT %s + +# Closing / resting +@cbind gC = exit +@cbind gQ = event CLEAN_TABS + +# Tab navigating +@cbind g< = event FIRST_TAB +@cbind g> = event LAST_TAB +@cbind gt = event NEXT_TAB +@cbind gT = event PREV_TAB +@cbind gi_ = event GOTO_TAB %s + +# Preset loading +set preset = event PRESET_TABS +@cbind gs_ = @preset save %s +@cbind glo_ = @preset load %s +@cbind gd_ = @preset del %s +# This doesn't work right now. +#@cbind gli = @preset list + +## Context menu items + +# Default context menu +menu_add Google = set uri = http://google.co.uk +menu_add Go Home = set uri = http://uzbl.org +menu_separator separator_1 +menu_add Quit uzbl = exit + +# Link context menu +menu_link_add Print Link = print \@SELECTED_URI + +# Go up one dir +@cbind gu = spawn @scripts_dir/goup.pl + +# Mode configuration + +# Define some mode specific uzbl configurations. +set command = @mode_config command +set insert = @mode_config insert +set stack = @mode_config stack + +# Command mode config. +@command keycmd_style = foreground="red" +@command status_background = #202020 +@command mode_indicator = Cmd +@command keycmd_events = 1 +@command forward_keys = 0 +@command modcmd_updates = 1 + +# Insert mode config. +@insert status_background = #303030 +@insert mode_indicator = Ins +@insert forward_keys = 1 +@insert keycmd_events = 0 +@insert modcmd_updates = 0 + +# Multi-stage-binding mode config. +@stack keycmd_style = foreground="red" +@stack status_background = #202020 +@stack mode_indicator = Bnd +@stack prompt_style = foreground="#888" weight="light" +@stack keycmd_events = 1 +@stack modcmd_updates = 1 +@stack forward_keys = 0 + +set default_mode = command + +## Post-load misc commands +sync_spawn_exec @scripts_dir/load_cookies.sh +sync_spawn_exec @scripts_dir/load_cookies.sh @data_home/uzbl/session-cookies.txt + +# Set the "home" page. +set uri = uzbl.org/doesitwork/@COMMIT + +# Custom configuration +bind \sr_ = sh 'echo "set uri = $(surfraw -print %s)" > $4' +bind \gg_ = sh 'echo "set uri = $(surfraw -print $8 %s)" > $4' google +bind \google_ = sh 'echo "set uri = $(surfraw -print $8 %s)" > $4' google +bind \glucky_ = sh 'echo "set uri = $(surfraw -print $8 -l %s)" > $4' google +bind \gi_ = sh 'echo "set uri = $(surfraw -print $8 -search=$9 %s)" > $4' google images +bind \gimage_ = sh 'echo "set uri = $(surfraw -print $8 -search=$9 %s)" > $4' google images +bind \glinux_ = sh 'echo "set uri = $(surfraw -print $8 -search=$9 %s)" > $4' google linux +bind \gbsd_ = sh 'echo "set uri = $(surfraw -print $8 -search=$9 %s)" > $4' google bsd +bind \gusa_ = sh 'echo "set uri = $(surfraw -print $8 -search=$9 %s)" > $4' google unclesam +bind \wiki_ = sh 'echo "set uri = $(surfraw -print $8 %s)" > $4' wikipedia +bind \imdb_ = sh 'echo "set uri = $(surfraw -print $8 %s)" > $4' imdb +bind \aur_ = sh 'echo "set uri = $(surfraw -print $8 %s)" > $4' aur +bind \freshmeat_ = sh 'echo "set uri = $(surfraw -print $8 %s)" > $4' freshmeat +bind \weather_ = sh 'echo "set uri = $(surfraw -print $8 %s)" > $4' weather + +bind 'sr _ = sh 'surfraw -g %s' +bind 'gg _ = sh 'surfraw -g $8 %s' google +bind 'google _ = sh 'surfraw -g $8 %s' google +bind 'glucky _ = sh 'surfraw -g $8 -l %s' google +bind 'gi _ = sh 'surfraw -g $8 -search=$9 %s' google images +bind 'gimage _ = sh 'surfraw -g $8 -search=$9 %s' google images +bind 'glinux _ = sh 'surfraw -g $8 -search=$9 %s' google linux +bind 'gbsd _ = sh 'surfraw -g $8 -search=$9 %s' google bsd +bind 'gusa _ = sh 'surfraw -g $8 -search=$9 %s' google unclesam +bind 'wiki _ = sh 'surfraw -g $8 %s' wikipedia +bind 'imdb _ = sh 'surfraw -g $8 %s' imdb +bind 'aur _ = sh 'surfraw -g $8 %s' aur +bind 'freshmeat _ = sh 'surfraw -g $8 %s' freshmeat +bind 'weather _ = sh 'surfraw -g $8 %s' weather + +# vim: set fdm=syntax: diff --git a/.uzbl/scripts/goup.pl b/.uzbl/scripts/goup.pl new file mode 100755 index 0000000..f7ae275 --- /dev/null +++ b/.uzbl/scripts/goup.pl @@ -0,0 +1,24 @@ +#!/usr/bin/perl + +my ($config,$pid,$xid,$fifo,$socket,$url,$title,$cmd) = @ARGV; +if($fifo eq "") { die "No fifo"; }; + +# Delete last slash +chop($url); + +my $index = index(reverse($url), '/'); + +# if youre already on top of the directory structure +if ($index == -1) +{ + print $url; + exit; +} + +# Workaround for missing reverse index +$url = (substr(reverse($url), $index, length($url) )); +$url = reverse($url); +print $url."\n"; + +# This could look prettier with native fifo access +qx(echo "act uri $url" >> $fifo); diff --git a/.uzbl/style.css b/.uzbl/style.css new file mode 100644 index 0000000..a5fe457 --- /dev/null +++ b/.uzbl/style.css @@ -0,0 +1,35 @@ +#uzbl_link_hints > span { + z-index: 1000 !important; + + background-color: #FFFF00 !important; + margin: 0 !important; + padding: 3px !important; + + color: #000 !important; + font-size: 12px !important; + line-height: 12px !important; + font-weight: bold !important; + font-variant: normal !important; + text-decoration: none !important; + text-transform: uppercase; + + -webkit-transform: translate(-3px,-1px); + opacity: 0.8; + -webkit-border-radius: 6px !important; + /* Play around with this, pretty fun things to do :) */ + /* -webkit-transform: scale(1) rotate(0deg) translate(-6px,-5px) !important; */ +} + +/* we can have different colours for different types of hints! */ +#uzbl_link_hints.new-window > span { + background-color: #ffff00 !important; + color: black !important; +} + +.uzbl-follow-text-match { + outline: 2px solid invert; + background: #333 !important; + color: white !important; +} + +/* vim:set et ts=4: */ diff --git a/.vifm/colors/default b/.vifm/colors/default new file mode 100644 index 0000000..c3c72dd --- /dev/null +++ b/.vifm/colors/default @@ -0,0 +1,52 @@ +" You can edit this file by hand. +" The " character at the beginning of a line comments out the line. +" Blank lines are ignored. + +" The Default color scheme is used for any directory that does not have +" a specified scheme and for parts of user interface like menus. A +" color scheme set for a base directory will also +" be used for the sub directories. + +" The standard ncurses colors are: +" Default = -1 = None, can be used for transparency or default color +" Black = 0 +" Red = 1 +" Green = 2 +" Yellow = 3 +" Blue = 4 +" Magenta = 5 +" Cyan = 6 +" White = 7 + +" Available style values (some of them can be combined): +" bold +" underline +" reverse or inverse +" standout +" none + +" Vifm supports 256 colors you can use color numbers 0-255 +" (requires properly set up terminal: set your TERM environment variable +" (directly or using resources) to some color terminal name (e.g. +" xterm-256color) from /usr/lib/terminfo/; you can check current number +" of colors in your terminal with tput colors command) + +" highlight group cterm=style ctermfg=foreground_color ctermbg=background_color + +highlight Win cterm=none ctermfg=white ctermbg=black +highlight Directory cterm=bold ctermfg=cyan ctermbg=default +highlight Link cterm=bold ctermfg=yellow ctermbg=default +highlight BrokenLink cterm=bold ctermfg=red ctermbg=default +highlight Socket cterm=bold ctermfg=magenta ctermbg=default +highlight Device cterm=bold ctermfg=red ctermbg=default +highlight Fifo cterm=bold ctermfg=cyan ctermbg=default +highlight Executable cterm=bold ctermfg=green ctermbg=default +highlight Selected cterm=bold ctermfg=magenta ctermbg=default +highlight CurrLine cterm=bold ctermfg=default ctermbg=blue +highlight TopLine cterm=none ctermfg=black ctermbg=white +highlight TopLineSel cterm=bold ctermfg=black ctermbg=default +highlight StatusLine cterm=bold ctermfg=black ctermbg=white +highlight WildMenu cterm=underline,reverse ctermfg=white ctermbg=black +highlight CmdLine cterm=none ctermfg=white ctermbg=black +highlight ErrorMsg cterm=none ctermfg=red ctermbg=black +highlight Border cterm=none ctermfg=black ctermbg=white diff --git a/.vifm/colors/matrix b/.vifm/colors/matrix new file mode 100644 index 0000000..70a9f76 --- /dev/null +++ b/.vifm/colors/matrix @@ -0,0 +1,21 @@ +highlight Win cterm=none ctermfg=green ctermbg=black + +highlight TopLine cterm=none ctermfg=green ctermbg=none +highlight TopLineSel cterm=none ctermfg=green ctermbg=none +highlight StatusLine cterm=none ctermfg=green ctermbg=none +highlight Border cterm=none ctermfg=green ctermbg=none + +highlight Selected cterm=bold ctermfg=red ctermbg=default +highlight CurrLine cterm=bold ctermfg=black ctermbg=green + +highlight WildMenu cterm=underline,reverse ctermfg=white ctermbg=black +highlight CmdLine cterm=none ctermfg=white ctermbg=black +highlight ErrorMsg cterm=none ctermfg=red ctermbg=black + +highlight Directory cterm=none ctermfg=blue ctermbg=default +highlight Link cterm=none ctermfg=yellow ctermbg=default +highlight BrokenLink cterm=none ctermfg=red ctermbg=default +highlight Socket cterm=none ctermfg=yellow ctermbg=default +highlight Device cterm=none ctermfg=yellow ctermbg=default +highlight Fifo cterm=none ctermfg=yellow ctermbg=default +highlight Executable cterm=none ctermfg=green ctermbg=default diff --git a/.vifm/colorschemes b/.vifm/colorschemes new file mode 100644 index 0000000..006bb44 --- /dev/null +++ b/.vifm/colorschemes @@ -0,0 +1,37 @@ +# You can edit this file by hand. +# The # character at the beginning of a line comments out the line. +# Blank lines are ignored. + +# The Default color scheme is used for any directory that does not have +# a specified scheme. A color scheme set for a base directory will also +# be used for the sub directories. + +# The standard ncurses colors are: +# Black = 0 +# Red = 1 +# Green = 2 +# Yellow = 3 +# Blue = 4 +# Magenta = 5 +# Cyan = 6 +# White = 7 + +# COLORSCHEME=OneWordDescription +# DIRECTORY=/Full/Path/To/Base/Directory +# COLOR=Window_name=foreground_color_number=background_color_number + + +COLORSCHEME=Default +DIRECTORY=/ +COLOR=MENU=white=black +COLOR=BORDER=black=white +COLOR=WIN=white=black +COLOR=STATUS_BAR=white=black +COLOR=CURR_LINE=white=blue +COLOR=DIRECTORY=cyan=black +COLOR=LINK=yellow=black +COLOR=SOCKET=magenta=black +COLOR=DEVICE=red=black +COLOR=EXECUTABLE=green=black +COLOR=SELECTED=magenta=black +COLOR=CURRENT=blue=black diff --git a/.vifm/vifm-help.txt b/.vifm/vifm-help.txt new file mode 100644 index 0000000..2b6bbba --- /dev/null +++ b/.vifm/vifm-help.txt @@ -0,0 +1,226 @@ +The basic vi key bindings are used to move through the files and popup + windows. + + k is up + j is down + + h is updir + l is handle file and is the same as Return. + + Ctrl-c or the Escape key will cancel most operations. + Ctrl-l will clear and redraw the screen. + + gg top of list + G bottom of list + cw change word is used to rename a file. + m [a-z][A-Z][0-9] to set bookmark + ' letter to goto bookmark + v start or stop visualy selecting files. This works with the j and k keys + for movement. This is different then in vi in that v in visual mode will + leave the selected files highlighted. If you want to clear the selected + files Ctrl-c or Esc will unselect the files. + dd - the default setting is to move the selected files to the trash + directory. + yy - will yank the selected files. + p - will copy the yanked files to the current directory or move the files + to the current directory if they were deleted with dd or :d or if the + files were yanked 'yy' from the Trash directory. + + Space or Tab to switch lists. + + Most movement commands also accept a count 12j would move down 12 lines. + [count] % percent of file list + [count] j or k + [count] G or gg + [count] dd or yy the count is from the current file downward. + :[count] user command is not yet implemented. + :[count] command + The only builtin :[count] command is :[count]d[elete]. :3d would delete + three files starting at the current file position moving down. + + :number - move to the line number :12 would move to the 12th line. + :0 move to the top of the list. + :$ move to the bottom of the list. + + Return or l - handle file + Default file type program or if on a directory enter the directory + + Ctrl-g toggles full file information window. + Ctrl-b - jump back one page. + Ctrl-f - jump forward one page. + + /regular expression pattern - will highlight all files matching the pattern + in the current file list. /\.c$ would highlight all the .c files. + N find previous match. + n find next match. + + Files can also be tagged or selected with 't'. Pressing 't' on a selected + file will unselect it. This can be used by itself to select files or with a + /search pattern or with visually selected files. + + :commands + :com is a menu of user commands + :com name action - will set a new user command + Unlike vim user commands do not have to start with a capital letter. + User commands are run in a shell by default. To run a command in + the background you must set it as a background command with & at the end + of the commands action. + :com rm rm %f & + + :apropos manpage - will create a menu with the results from the + apropos command. + :com! name action - will overwrite a preciously set command. + :delc command_name will remove the command_name user command + :fil regular_expression pattern will filter the files out of the directory + listing that match the regular expression. + :fil \.o$ - would filter all files ending in .o from the filelist. + :empty will permanently remove 'rm -fr' files from the Trash directory. + :locate filename - will create a menu with the results from the locate + command. + :sh will start a shell + :q or :x will exit vifm + :! program will execute the program in a shell + :!command & will run the process in the background. + programs that write to stdout like ls will create an error message + showing partial output of the command. + :!! same as :! but will pause the screen before returning to vifm. + :!!ls -l + :e load file into vi + :only - switch to a one window view. + :pwd - show the present working directory + :ch[ange] - create a menu window to alter a files properties. + :cd - change directory + :cd ~/bin + :s[ort] - popup menu of different sorting methods + :sp[lit] - switch to a two window view. + :his[tory] - popup menu of directories visited + :jobs - shows menu of current backgrounded processes. + :view - toggle on and off the quick file view. + :h[elp] - this crude help file + :marks - popup menu of bookmarks + :screen toggles whether to use the screen program or not. + :sync - change the other panel to the current panel directory. + + +command macros + %a user arguments + %f all of the selected files + %F all of the selected files in the other directory list. + %d current directory name + %D other file list directory name + :com mv mv %f %D + would set the mv command to mv all of the selected files to the other + directory. + + If you want a command to accept arguments you must use %a. + :com mkdir mkdir %a & + :com mygrep vim "+grep %a" + %a is simply replaced with the user arguments and the arguments are + considered to be optional. + :com lsl ls -l %a | less - would run ls -l | less with or without + an argument being given. + +search patterns can be set with :com name /pattern + :com backup /~$ + + + file filters + The basic vim folding key bindings are used for filtering files. + zO show the filtered files + zM Filter the files matching the filename filter. + zo show all the dot files + zm filter all the .dot files + zf filter all the selected files + This will work with all selecting methods. Visually selecting files, + using a / search pattern or in combination with 't'. + :fil[ter] regular expression + :in[vert] invert the filter + All directorys will show the ../ file no matter what the filter setting is + with the exception of the / directory. + Each file list has its own filter. + filtered files are not checked in / search or :commands + + file name filters can be set with :com name fil pattern + :com ofiles fil \.o$ + +Configuration. + + The default configuration file is ~/.vifm/vifmrc. + If you want to change any settings vifm must not be running when you edit + the file as it will overwrite any changes you make when it exits. + + Screen configuration. If you use the screen program, vifm can be configured + to use a new screen window for opening files or running :!programs. + +Misc. + Ctrl-c or Escape to clear all selected files + + vifm.vim is a vim plugin that allows the use of vifm from vim. It is + included in the source tarball but it is not installed by default and must + be manually placed in either the default vim/plugin directory or in + ~/.vim/plugin/ + To use vifm to load a file into a running vim use the following commands: + :Edit - open a file in the current buffer. + :Split - split the buffer and open a file. + :Vsplit - vertically split a buffer and open a file. + :Diff - open a file to compare to the current file using the vim :diff + command. + You can edit the vifm.vim script to change the command name used if they + conflict with other user commands. + + Starting options: + /full/path/to/directoryone - using vifm /usr/local will start vifm + with the /usr/local directory. The default is to start vifm in + the current directory. + /full/path/to/directorytwo - using two full paths will start vifm with + the first path in the left file list and the second path in the right + file list. + --version - will print the version number and exit. + --help - will show help file. + -f - will run vifm but selecting a file will write the file name to + ~/.vifm/vimfiles instead of opening the file. This is used for the + vifm.vim script to load files from vifm into a running vim. + +Menus + bookmarks escape or Ctrl-c to abort j and k to move through + dd on a bookmark to remove. + + sort menu j and k to move - Escape or Ctrl-c to clear - return or l to + select and exit the menu. + +Reserved :commands + ! + change + cd + cmap + com + d + delc + e + empty + fi + fil + file + filter + h + help + his + history + in + invert + map + marks + nmap + pw + pwd + q + s + screen + sh + sort + unmap + view + vifm + vmap + x + diff --git a/.vifm/vifmrc b/.vifm/vifmrc new file mode 100644 index 0000000..b6efb37 --- /dev/null +++ b/.vifm/vifmrc @@ -0,0 +1,126 @@ +" vim: filetype=vifm : +" You can edit this file by hand. +" The " character at the beginning of a line comments out the line. +" Blank lines are ignored. +" The basic format for each item is shown with an example. + +" This is the actual command used to start vi. The default is vim. +" If you would like to use another vi clone such Elvis or Vile +" you will need to change this setting. + +set vicmd=vim +" set vicmd=elvis\ -G\ termcap +" set vicmd=vile + +" Trash Directory +" The default is to move files that are deleted with dd or :d to +" the trash directory. If you change this you will not be able to move +" files by deleting them and then using p to put the file in the new location. +" I recommend not changing this until you are familiar with vifm. +" This probably shouldn't be an option. + +set trash + +" This is how many directories to store in the directory history. + +set history=100 + +" Follow links on l or Enter. + +set followlinks + +" With this option turned on you can run partially entered commands with +" unambiguous beginning using :! (e.g. :!Te instead of :!Terminal or :!Te). + +set nofastrun + +" Natural sort of (version) numbers within text. + +set nosortnumbers + +" Maximum number of changes that can be undone. + +set undolevels=100 + +" If you installed the vim.txt help file set vimhelp. +" If would rather use a plain text help file set novimhelp. + +set novimhelp + +" If you would like to run an executable file when you +" press return on the file name set this. + +set norunexec + +" Use KiB, MiB, ... instead of K, M, ... + +set noiec + +" Selected color scheme + +colorscheme matrix + +" The FUSE_HOME directory will be used as a root dir for all FUSE mounts. +" Unless it exists with write/exec permissions set, vifm will attempt to +" create it. + +set fusehome=/tmp/vifm_FUSE + +" Format for displaying time in file list. For example: +" set timefmt=%m/%d-%H:%M +" See man date or man strftime for details. + +set timefmt=\ %m/%d\ %H:%M + +" :mark mark /full/directory/path [filename] + +" :com[mand] command_name action +" The following macros can be used in a command +" %a is replaced with the user arguments. +" %c the current file under the cursor. +" %C the current file under the cursor in the other directory. +" %f the current selected file, or files. +" %F the current selected file, or files in the other directory. +" %b same as %f %F. +" %d the current directory name. +" %D the other window directory name. +" %m run the command in a menu window + +" The file type is for the default programs to be used with +" a file extension. +" :filetype pattern1,pattern2 defaultprogram,program2 +" :fileviewer pattern1,pattern2 consoleviewer +" The other programs for the file type can be accessed with the :file command +" The command macros %f, %F, %d, %F may be used in the commands. +" The %a macro is ignored. To use a % you must put %%. + +" For automated FUSE mounts, you must register an extension with FILETYPE=.. +" in one of following formats: +" +" :filetype extensions FUSE_MOUNT|some_mount_command using %SOURCE_FILE and %DESTINATION_DIR variables +" %SOURCE_FILE and %DESTINATION_DIR are filled in by vifm at runtime. +" A sample line might look like this: +" :filetype *.zip,*.jar,*.war,*.ear FUSE_MOUNT|fuse-zip %SOURCE_FILE %DESTINATION_DIR +" +" :filetype extensions FUSE_MOUNT2|some_mount_command using %PARAM and %DESTINATION_DIR variables +" %PARAM and %DESTINATION_DIR are filled in by vifm at runtime. +" A sample line might look like this: +" :filetype *.ssh FUSE_MOUNT2|sshfs %PARAM %DESTINATION_DIR +" %PARAM value is filled from the first line of file (whole line). +" Example first line for SshMount filetype: root@127.0.0.1:/ +" +" You can also add %CLEAR if you want to clear screen before running FUSE +" program. + +" What should be saved automatically between vifm runs +" Like in previous versions of vifm +" set vifminfo=options,filetypes,commands,bookmarks,tui,state,cs,chistory,shistory,dirstack,registers,phistory +" Like in vi +set vifminfo=bookmarks,chistory,shistory,phistory + +" Personal additions +map , : +map space +map q :q +filetype *.pdf,*.dvi zathura +set number diff --git a/.vifm/vifmrc.bak b/.vifm/vifmrc.bak new file mode 100644 index 0000000..81f84fa --- /dev/null +++ b/.vifm/vifmrc.bak @@ -0,0 +1,108 @@ +# You can edit this file by hand. +# The # character at the beginning of a line comments out the line. +# Blank lines are ignored. +# The basic format for each item is shown with an example. +# The '=' character is used to separate fields within a single line. +# Most settings are true = 1 or false = 0. + +# This is the actual command used to start vi. The default is vi. +# If you would like to use another vi clone such as Vim, Elvis, or Vile +# you will need to change this setting. + +VI_COMMAND=vim +# VI_COMMAND=vim +# VI_COMMAND=elvis -G termcap +# VI_COMMAND=vile + +# Trash Directory +# The default is to move files that are deleted with dd or :d to +# the trash directory. 1 means use the trash directory 0 means +# just use rm. If you change this you will not be able to move +# files by deleting them and then using p to put the file in the new location. +# I recommend not changing this until you are familiar with vifm. +# This probably shouldn't be an option. + +USE_TRASH=1 + +# Show only one Window +# If you would like to start vifm with only one window set this to 1 + +USE_ONE_WINDOW=0 + +# Screen configuration. If you would like to use vifm with +# the screen program set this to 1. + +USE_SCREEN=0 + +# 1 means use color if the terminal supports it. +# 0 means don't use color even if supported. + +# This is how many files to show in the directory history menu. + +HISTORY_LENGTH=100 + +# The sort type is how the files will be sorted in the file listing. +# Sort by File Extension = 0 +# Sort by File Name = 1 +# Sort by Group ID = 2 +# Sort by Group Name = 3 +# Sort by Mode = 4 +# Sort by Owner ID = 5 +# Sort by Owner Name = 6 +# Sort by Size = 7 +# Sort by Time Accessed =8 +# Sort by Time Changed =9 +# Sort by Time Modified =10 +# This can be set with the :sort command in vifm. + +LEFT_WINDOW_SORT_TYPE=1 + +RIGHT_WINDOW_SORT_TYPE=1 + +# The regular expression used to filter files out of +# the directory listings. +# LWIN_FILTER=\.o$ and LWIN_INVERT=1 would filter out all +# of the .o files from the directory listing. LWIN_INVERT=0 +# would show only the .o files + +LWIN_FILTER=\.o$ +LWIN_INVERT=1 +RWIN_FILTER=\.o$ +RWIN_INVERT=1 + +# If you installed the vim.txt help file change this to 1. +# If would rather use a plain text help file set this to 0. + +USE_VIM_HELP=0 + +# If you would like to run an executable file when you +# press return on the file name set this to 1. + +RUN_EXECUTABLE=0 + +# BOOKMARKS=mark=/full/directory/path=filename + +BOOKMARKS=H=/home/urbain=../ +BOOKMARKS=m=/home/urbain/Dropbox/phd/literature/October 14=Shear_viscosity.pdf +BOOKMARKS=p=/home/urbain/Dropbox/phd=../ +BOOKMARKS=z=/home/urbain/.vifm=../ + +# COMMAND=command_name=action +# The following macros can be used in a command +# %a is replaced with the user arguments. +# %f the current selected file, or files. +# %F the current selected file, or files in the other directoy. +# %d the current directory name. +# %D the other window directory name. +# %m run the command in a menu window + + +# The file type is for the default programs to be used with +# a file extension. +# FILETYPE=description=extension1,extension2=defaultprogram, program2 +# FILETYPE=Web=html,htm,shtml=links,mozilla,elvis +# would set links as the default program for .html .htm .shtml files +# The other programs for the file type can be accessed with the :file command +# The command macros %f, %F, %d, %F may be used in the commands. +# The %a macro is ignored. To use a % you must put %%. + diff --git a/.vim/after/ftplugin/tex/folding.vim b/.vim/after/ftplugin/tex/folding.vim new file mode 100644 index 0000000..e69de29 diff --git a/.vim/after/ftplugin/tex/mappings.vim b/.vim/after/ftplugin/tex/mappings.vim new file mode 100644 index 0000000..e7dd610 --- /dev/null +++ b/.vim/after/ftplugin/tex/mappings.vim @@ -0,0 +1,59 @@ +inoremap (( \left( +inoremap )) \right) +inoremap {{ \left\{ +inoremap }} \right\} +inoremap [[ \left[ +inoremap ]] \right] +inoremap == \,=\, +inoremap >> \,\geq\, +inoremap << \,\leq\, +inoremap ++ \,+\, +inoremap -- \,-\, + +iabbrev ga \alpha +iabbrev gb \beta +iabbrev gg \gamma +iabbrev gd \delta +iabbrev ge \varepsilon +iabbrev gz \zeta +iabbrev gh \eta +iabbrev gt \theta +iabbrev gi \iota +iabbrev gk \kappa +iabbrev gl \lambda +iabbrev gm \mu +iabbrev gn \nu +iabbrev gx \xi +iabbrev gr \rho +iabbrev gs \sigma +iabbrev gf \phi +iabbrev gp \pi +iabbrev gw \omega +iabbrev dd \d + +" function! SynctexShow() +" let synctex = glob("*.synctex.gz") +" if strlen(synctex) == 0 +" echom "no synctex file found" +" else +" let pdffile = substitute(synctex,"synctex.gz","pdf","") +" let execline = printf(":!zathura --synctex-forward %d:%d:%s %s", line('.'), col('.'), shellescape(bufname("%")), shellescape(pdffile)) +" exec execline +" end +" endfunction + +" nnoremap a :call SynctexShow() +" nnoremap i :Latexmk +" nnoremap e :LatexErrors +" nnoremap o :LatexView +" noremap k :LatexmkStop:LatexmkClean +" nnoremap h :split header.sty + + +nnoremap i :VimtexCompile +nnoremap e :VimtexErrors +nnoremap o :VimtexView +nnoremap k :VimtexStop:VimtexClean +nnoremap t :VimtexTocToggle +nnoremap h :split header.sty +nnoremap h :split header.sty diff --git a/.vim/after/ftplugin/tex/unilatex.vim b/.vim/after/ftplugin/tex/unilatex.vim new file mode 100644 index 0000000..69358fc --- /dev/null +++ b/.vim/after/ftplugin/tex/unilatex.vim @@ -0,0 +1,675 @@ +function! UTF8toLaTeX() + " store cursor position + let s:line = line(".") + let s:column = col(".") + silent %s/α/\\alpha/eg + silent %s/β/\\beta/eg + silent %s/γ/\\gamma/eg + silent %s/δ/\\delta/eg + silent %s/∊/\\epsilon/eg + silent %s/ε/\\varepsilon/eg + silent %s/ζ/\\zeta/eg + silent %s/η/\\eta/eg + silent %s/θ/\\theta/eg + silent %s/ϑ/\\vartheta/eg + silent %s/ι/\\iota/eg + silent %s/κ/\\kappa/eg + silent %s/λ/\\lambda/eg + silent %s/μ/\\mu/eg + silent %s/ν/\\nu/eg + silent %s/ξ/\\xi/eg + silent %s/π/\\pi/eg + silent %s/ϖ/\\varpi/eg + silent %s/ρ/\\rho/eg + silent %s/ϱ/\\varrho/eg + silent %s/σ/\\sigma/eg + silent %s/ς/\\varsigma/eg + silent %s/τ/\\tau/eg + silent %s/υ/\\upsilon/eg + silent %s/φ/\\phi/eg + silent %s/ϕ/\\varphi/eg + silent %s/χ/\\chi/eg + silent %s/ψ/\\psi/eg + silent %s/ω/\\omega/eg + silent %s/Γ/\\Gamma/eg + silent %s/Δ/\\Delta/eg + silent %s/Θ/\\Theta/eg + silent %s/Λ/\\Lambda/eg + silent %s/Ξ/\\Xi/eg + silent %s/Π/\\Pi/eg + silent %s/Υ/\\Upsilon/eg + silent %s/Φ/\\Phi/eg + silent %s/Ψ/\\Psi/eg + silent %s/Ω/\\Omega/eg + silent %s/≤/\\leq/eg + silent %s/≪/\\ll/eg + silent %s/≺/\\prec/eg + silent %s/≼/\\preceq/eg + silent %s/⊂/\\subset/eg + silent %s/⊆/\\subseteq/eg + silent %s/⊏/\\sqsubset/eg + silent %s/⊑/\\sqsubseteq/eg + silent %s/∈/\\in/eg + silent %s/⊢/\\vdash/eg + silent %s/∣/\\mid/eg + silent %s/⌣/\\smile/eg + silent %s/≥/\\geq/eg + silent %s/≫/\\gg/eg + silent %s/≻/\\succ/eg + silent %s/≽/\\succeq/eg + silent %s/⊃/\\supset/eg + silent %s/⊇/\\supseteq/eg + silent %s/⊐/\\sqsupset/eg + silent %s/⊒/\\sqsupseteq/eg + silent %s/∋/\\ni/eg + silent %s/⊣/\\dashv/eg + silent %s/∥/\\parallel/eg + silent %s/⌢/\\frown/eg + silent %s/∉/\\notin/eg + silent %s/≡/\\equiv/eg + silent %s/≐/\\doteq/eg + silent %s/∼/\\sim/eg + silent %s/≃/\\simeq/eg + silent %s/≈/\\approx/eg + silent %s/≅/\\cong/eg + silent %s/⋈/\\Join/eg + silent %s/⋈/\\bowtie/eg + silent %s/∝/\\propto/eg + silent %s/⊨/\\models/eg + silent %s/⊥/\\perp/eg + silent %s/≍/\\asymp/eg + silent %s/≠/\\neq/eg + silent %s/±/\\pm/eg + silent %s/⋅/\\cdot/eg + silent %s/×/\\times/eg + silent %s/∪/\\cup/eg + silent %s/⊔/\\sqcup/eg + silent %s/∨/\\vee/eg + silent %s/⊕/\\oplus/eg + silent %s/⊙/\\odot/eg + silent %s/⊗/\\otimes/eg + silent %s/△/\\bigtriangleup/eg + silent %s/⊲/\\lhd/eg + silent %s/⊴/\\unlhd/eg + silent %s/∓/\\mp/eg + silent %s/÷/\\div/eg + silent %s/∖/\\setminus/eg + silent %s/∩/\\cap/eg + silent %s/⊓/\\sqcap/eg + silent %s/∧/\\wedge/eg + silent %s/⊖/\\ominus/eg + silent %s/⊘/\\oslash/eg + silent %s/○/\\bigcirc/eg + silent %s/▽/\\bigtriangledown/eg + silent %s/⊳/\\rhd/eg + silent %s/⊵/\\unrhd/eg + silent %s/◁/\\triangleleft/eg + silent %s/▷/\\triangleright/eg + silent %s/⋆/\\star/eg + silent %s/∗/\\ast/eg + silent %s/∘/\\circ/eg + silent %s/∙/\\bullet/eg + silent %s/⋄/\\diamond/eg + silent %s/⊎/\\uplus/eg + silent %s/†/\\dagger/eg + silent %s/‡/\\ddagger/eg + silent %s/≀/\\wr/eg + silent %s/∑/\\sum/eg + silent %s/∏/\\prod/eg + silent %s/∐/\\coprod/eg + silent %s/∫/\\int/eg + silent %s/⋃/\\bigcup/eg + silent %s/⋂/\\bigcap/eg + silent %s/⊔/\\bigsqcup/eg + silent %s/∮/\\oint/eg + silent %s/⋁/\\bigvee/eg + silent %s/⋀/\\bigwedge/eg + silent %s/⊕/\\bigoplus/eg + silent %s/⊗/\\bigotimes/eg + silent %s/⊙/\\bigodot/eg + silent %s/⊎/\\biguplus/eg + silent %s/←/\\leftarrow/eg + silent %s/→/\\rightarrow/eg + silent %s/↔/\\leftrightarrow/eg + silent %s/⇐/\\Leftarrow/eg + silent %s/⇒/\\Rightarrow/eg + silent %s/⇔/\\Leftrightarrow/eg + silent %s/↦/\\mapsto/eg + silent %s/↩/\\hookleftarrow/eg + silent %s/↼/\\leftharpoonup/eg + silent %s/↽/\\leftharpoondown/eg + silent %s/↪/\\hookrightarrow/eg + silent %s/⇀/\\rightharpoonup/eg + silent %s/⇁/\\rightharpoondown/eg + silent %s/←/\\longleftarrow/eg + silent %s/→/\\longrightarrow/eg + silent %s/↔/\\longleftrightarrow/eg + silent %s/⇐/\\Longleftarrow/eg + silent %s/⇒/\\Longrightarrow/eg + silent %s/⇔/\\Longleftrightarrow/eg + silent %s/⇖/\\longmapsto/eg + silent %s/↑/\\uparrow/eg + silent %s/↓/\\downarrow/eg + silent %s/↕/\\updownarrow/eg + silent %s/⇑/\\Uparrow/eg + silent %s/⇓/\\Downarrow/eg + silent %s/⇕/\\Updownarrow/eg + silent %s/↗/\\nearrow/eg + silent %s/↘/\\searrow/eg + silent %s/↙/\\swarrow/eg + silent %s/↖/\\nwarrow/eg + silent %s/↝/\\leadsto/eg + silent %s/…/\\dots/eg + silent %s/⋯/\\cdots/eg + silent %s/⋮/\\vdots/eg + silent %s/⋱/\\ddots/eg + silent %s/ℏ/\\hbar/eg + silent %s/ℓ/\\ell/eg + silent %s/ℜ/\\Re/eg + silent %s/ℑ/\\Im/eg + silent %s/א/\\aleph/eg + silent %s/℘/\\wp/eg + silent %s/∀/\\forall/eg + silent %s/∃/\\exists/eg + silent %s/℧/\\mho/eg + silent %s/∂/\\partial/eg + silent %s/′/\\prime/eg + silent %s/∅/\\emptyset/eg + silent %s/∞/\\infty/eg + silent %s/∇/\\nabla/eg + silent %s/△/\\triangle/eg + silent %s/□/\\Box/eg + silent %s/◇/\\Diamond/eg + silent %s/⊥/\\bot/eg + silent %s/⊤/\\top/eg + silent %s/∠/\\angle/eg + silent %s/√/\\surd/eg + silent %s/♢/\\diamondsuit/eg + silent %s/♡/\\heartsuit/eg + silent %s/♣/\\clubsuit/eg + silent %s/♠/\\spadesuit/eg + silent %s/¬/\\neg/eg + silent %s/♭/\\flat/eg + silent %s/♮/\\natural/eg + silent %s/♯/\\sharp/eg + silent %s/Ϝ/\\digamma/eg + silent %s/ϰ/\\varkappa/eg + silent %s/ב/\\beth/eg + silent %s/ד/\\daleth/eg + silent %s/ג/\\gimel/eg + silent %s/⋖/\\lessdot/eg + silent %s/≤/\\leqslant/eg + silent %s/≦/\\leqq/eg + silent %s/⋘/\\lll/eg + silent %s/≲/\\lesssim/eg + silent %s/≶/\\lessgtr/eg + silent %s/⋚/\\lesseqgtr/eg + silent %s/≼/\\preccurlyeq/eg + silent %s/⋞/\\curlyeqprec/eg + silent %s/≾/\\precsim/eg + silent %s/⋐/\\Subset/eg + silent %s/⊏/\\sqsubset/eg + silent %s/∴/\\therefore/eg + silent %s/⌣/\\smallsmile/eg + silent %s/⊲/\\vartriangleleft/eg + silent %s/⊴/\\trianglelefteq/eg + silent %s/⋗/\\gtrdot/eg + silent %s/≧/\\geqq/eg + silent %s/⋙/\\ggg/eg + silent %s/≳/\\gtrsim/eg + silent %s/≷/\\gtrless/eg + silent %s/⋛/\\gtreqless/eg + silent %s/≽/\\succcurlyeq/eg + silent %s/⋟/\\curlyeqsucc/eg + silent %s/≿/\\succsim/eg + silent %s/⋑/\\Supset/eg + silent %s/⊐/\\sqsupset/eg + silent %s/∵/\\because/eg + silent %s/∥/\\shortparallel/eg + silent %s/⌢/\\smallfrown/eg + silent %s/⊳/\\vartriangleright/eg + silent %s/⊵/\\trianglerighteq/eg + silent %s/≑/\\doteqdot/eg + silent %s/≓/\\risingdotseq/eg + silent %s/≒/\\fallingdotseq/eg + silent %s/≖/\\eqcirc/eg + silent %s/≗/\\circeq/eg + silent %s/≜/\\triangleq/eg + silent %s/≏/\\bumpeq/eg + silent %s/≎/\\Bumpeq/eg + silent %s/∼/\\thicksim/eg + silent %s/≈/\\thickapprox/eg + silent %s/≊/\\approxeq/eg + silent %s/∽/\\backsim/eg + silent %s/⊨/\\vDash/eg + silent %s/⊩/\\Vdash/eg + silent %s/⊪/\\Vvdash/eg + silent %s/∍/\\backepsilon/eg + silent %s/∝/\\varpropto/eg + silent %s/≬/\\between/eg + silent %s/⋔/\\pitchfork/eg + silent %s/◀/\\blacktriangleleft/eg + silent %s/▷/\\blacktriangleright/eg + silent %s/⇠/\\dashleftarrow/eg + silent %s/⇇/\\leftleftarrows/eg + silent %s/⇆/\\leftrightarrows/eg + silent %s/⇚/\\Lleftarrow/eg + silent %s/↞/\\twoheadleftarrow/eg + silent %s/↢/\\leftarrowtail/eg + silent %s/⇋/\\leftrightharpoons/eg + silent %s/↰/\\Lsh/eg + silent %s/↫/\\looparrowleft/eg + silent %s/↶/\\curvearrowleft/eg + silent %s/↺/\\circlearrowleft/eg + silent %s/⇢/\\dashrightarrow/eg + silent %s/⇉/\\rightrightarrows/eg + silent %s/⇄/\\rightleftarrows/eg + silent %s/⇛/\\Rrightarrow/eg + silent %s/↠/\\twoheadrightarrow/eg + silent %s/↣/\\rightarrowtail/eg + silent %s/⇌/\\rightleftharpoons/eg + silent %s/↱/\\Rsh/eg + silent %s/↬/\\looparrowright/eg + silent %s/↷/\\curvearrowright/eg + silent %s/↻/\\circlearrowright/eg + silent %s/⊸/\\multimap/eg + silent %s/⇈/\\upuparrows/eg + silent %s/⇊/\\downdownarrows/eg + silent %s/↿/\\upharpoonleft/eg + silent %s/↾/\\upharpoonright/eg + silent %s/⇃/\\downharpoonleft/eg + silent %s/⇂/\\downharpoonright/eg + silent %s/⇝/\\rightsquigarrow/eg + silent %s/↭/\\leftrightsquigarrow/eg + silent %s/∔/\\dotplus/eg + silent %s/⋉/\\ltimes/eg + silent %s/⋓/\\Cup/eg + silent %s/⊻/\\veebar/eg + silent %s/⊞/\\boxplus/eg + silent %s/⊠/\\boxtimes/eg + silent %s/⋋/\\leftthreetimes/eg + silent %s/⋎/\\curlyvee/eg + silent %s/⋅/\\centerdot/eg + silent %s/⋈/\\rtimes/eg + silent %s/⋒/\\Cap/eg + silent %s/⊼/\\barwedge/eg + silent %s/⊟/\\boxminus/eg + silent %s/⊡/\\boxdot/eg + silent %s/⋌/\\rightthreetimes/eg + silent %s/⋏/\\curlywedge/eg + silent %s/⊺/\\intercal/eg + silent %s/⋇/\\divideontimes/eg + silent %s/∖/\\smallsetminus/eg + silent %s/⊝/\\circleddash/eg + silent %s/⊚/\\circledcirc/eg + silent %s/⊛/\\circledast/eg + silent %s/ℏ/\\hbar/eg + silent %s/ℏ/\\hslash/eg + silent %s/□/\\square/eg + silent %s/■/\\blacksquare/eg + silent %s/Ⓢ/\\circledS/eg + silent %s/△/\\vartriangle/eg + silent %s/▲/\\blacktriangle/eg + silent %s/∁/\\complement/eg + silent %s/▽/\\triangledown/eg + silent %s/▼/\\blacktriangledown/eg + silent %s/◊/\\lozenge/eg + silent %s/◆/\\blacklozenge/eg + silent %s/★/\\bigstar/eg + silent %s/∠/\\angle/eg + silent %s/∡/\\measuredangle/eg + silent %s/∢/\\sphericalangle/eg + silent %s/‵/\\backprime/eg + silent %s/∄/\\nexists/eg + silent %s/Ⅎ/\\Finv/eg + silent %s/∅/\\varnothing/eg + silent %s/ð/\\eth/eg + silent %s/℧/\\mho/eg + + call cursor(s:line,s:column) +endfunction + +function! LaTeXtoUTF8() + let s:line = line(".") + let s:column = col(".") + + let s:oldencoding = &l:fileencoding + set fileencoding=utf-8 + + " convert latex commands to unicode + silent %s/\\alpha\>/α/eg + silent %s/\\beta\>/β/eg + silent %s/\\gamma\>/γ/eg + silent %s/\\delta\>/δ/eg + silent %s/\\epsilon\>/∊/eg + silent %s/\\varepsilon\>/ε/eg + silent %s/\\zeta\>/ζ/eg + silent %s/\\eta\>/η/eg + silent %s/\\theta\>/θ/eg + silent %s/\\vartheta\>/ϑ/eg + silent %s/\\iota\>/ι/eg + silent %s/\\kappa\>/κ/eg + silent %s/\\lambda\>/λ/eg + silent %s/\\mu\>/μ/eg + silent %s/\\nu\>/ν/eg + silent %s/\\xi\>/ξ/eg + silent %s/\\pi\>/π/eg + silent %s/\\varpi\>/ϖ/eg + silent %s/\\rho\>/ρ/eg + silent %s/\\varrho\>/ϱ/eg + silent %s/\\sigma\>/σ/eg + silent %s/\\varsigma\>/ς/eg + silent %s/\\tau\>/τ/eg + silent %s/\\upsilon\>/υ/eg + silent %s/\\phi\>/φ/eg + silent %s/\\varphi\>/ϕ/eg + silent %s/\\chi\>/χ/eg + silent %s/\\psi\>/ψ/eg + silent %s/\\omega\>/ω/eg + silent %s/\\Gamma\>/Γ/eg + silent %s/\\Delta\>/Δ/eg + silent %s/\\Theta\>/Θ/eg + silent %s/\\Lambda\>/Λ/eg + silent %s/\\Xi\>/Ξ/eg + silent %s/\\Pi\>/Π/eg + silent %s/\\Upsilon\>/Υ/eg + silent %s/\\Phi\>/Φ/eg + silent %s/\\Psi\>/Ψ/eg + silent %s/\\Omega\>/Ω/eg + silent %s/\\leq\>/≤/eg + silent %s/\\ll\>/≪/eg + silent %s/\\prec\>/≺/eg + silent %s/\\preceq\>/≼/eg + silent %s/\\subset\>/⊂/eg + silent %s/\\subseteq\>/⊆/eg + silent %s/\\sqsubset\>/⊏/eg + silent %s/\\sqsubseteq\>/⊑/eg + silent %s/\\in\>/∈/eg + silent %s/\\vdash\>/⊢/eg + silent %s/\\mid\>/∣/eg + silent %s/\\smile\>/⌣/eg + silent %s/\\geq\>/≥/eg + silent %s/\\gg\>/≫/eg + silent %s/\\succ\>/≻/eg + silent %s/\\succeq\>/≽/eg + silent %s/\\supset\>/⊃/eg + silent %s/\\supseteq\>/⊇/eg + silent %s/\\sqsupset\>/⊐/eg + silent %s/\\sqsupseteq\>/⊒/eg + silent %s/\\ni\>/∋/eg + silent %s/\\dashv\>/⊣/eg + silent %s/\\parallel\>/∥/eg + silent %s/\\frown\>/⌢/eg + silent %s/\\notin\>/∉/eg + silent %s/\\equiv\>/≡/eg + silent %s/\\doteq\>/≐/eg + silent %s/\\sim\>/∼/eg + silent %s/\\simeq\>/≃/eg + silent %s/\\approx\>/≈/eg + silent %s/\\cong\>/≅/eg + silent %s/\\Join\>/⋈/eg + silent %s/\\bowtie\>/⋈/eg + silent %s/\\propto\>/∝/eg + silent %s/\\models\>/⊨/eg + silent %s/\\perp\>/⊥/eg + silent %s/\\asymp\>/≍/eg + silent %s/\\neq\>/≠/eg + silent %s/\\pm\>/±/eg + silent %s/\\cdot\>/⋅/eg + silent %s/\\times\>/×/eg + silent %s/\\cup\>/∪/eg + silent %s/\\sqcup\>/⊔/eg + silent %s/\\vee\>/∨/eg + silent %s/\\oplus\>/⊕/eg + silent %s/\\odot\>/⊙/eg + silent %s/\\otimes\>/⊗/eg + silent %s/\\bigtriangleup\>/△/eg + silent %s/\\lhd\>/⊲/eg + silent %s/\\unlhd\>/⊴/eg + silent %s/\\mp\>/∓/eg + silent %s/\\div\>/÷/eg + silent %s/\\setminus\>/∖/eg + silent %s/\\cap\>/∩/eg + silent %s/\\sqcap\>/⊓/eg + silent %s/\\wedge\>/∧/eg + silent %s/\\ominus\>/⊖/eg + silent %s/\\oslash\>/⊘/eg + silent %s/\\bigcirc\>/○/eg + silent %s/\\bigtriangledown\>/▽/eg + silent %s/\\rhd\>/⊳/eg + silent %s/\\unrhd\>/⊵/eg + silent %s/\\triangleleft\>/◁/eg + silent %s/\\triangleright\>/▷/eg + silent %s/\\star\>/⋆/eg + silent %s/\\ast\>/∗/eg + silent %s/\\circ\>/∘/eg + silent %s/\\bullet\>/∙/eg + silent %s/\\diamond\>/⋄/eg + silent %s/\\uplus\>/⊎/eg + silent %s/\\dagger\>/†/eg + silent %s/\\ddagger\>/‡/eg + silent %s/\\wr\>/≀/eg + silent %s/\\sum\>/∑/eg + silent %s/\\prod\>/∏/eg + silent %s/\\coprod\>/∐/eg + silent %s/\\int\>/∫/eg + silent %s/\\bigcup\>/⋃/eg + silent %s/\\bigcap\>/⋂/eg + silent %s/\\bigsqcup\>/⊔/eg + silent %s/\\oint\>/∮/eg + silent %s/\\bigvee\>/⋁/eg + silent %s/\\bigwedge\>/⋀/eg + silent %s/\\bigoplus\>/⊕/eg + silent %s/\\bigotimes\>/⊗/eg + silent %s/\\bigodot\>/⊙/eg + silent %s/\\biguplus\>/⊎/eg + silent %s/\\leftarrow\>/←/eg + silent %s/\\rightarrow\>/→/eg + silent %s/\\leftrightarrow\>/↔/eg + silent %s/\\Leftarrow\>/⇐/eg + silent %s/\\Rightarrow\>/⇒/eg + silent %s/\\Leftrightarrow\>/⇔/eg + silent %s/\\mapsto\>/↦/eg + silent %s/\\hookleftarrow\>/↩/eg + silent %s/\\leftharpoonup\>/↼/eg + silent %s/\\leftharpoondown\>/↽/eg + silent %s/\\hookrightarrow\>/↪/eg + silent %s/\\rightharpoonup\>/⇀/eg + silent %s/\\rightharpoondown\>/⇁/eg + silent %s/\\longleftarrow\>/←/eg + silent %s/\\longrightarrow\>/→/eg + silent %s/\\longleftrightarrow\>/↔/eg + silent %s/\\Longleftarrow\>/⇐/eg + silent %s/\\Longrightarrow\>/⇒/eg + silent %s/\\Longleftrightarrow\>/⇔/eg + silent %s/\\longmapsto\>/⇖/eg + silent %s/\\uparrow\>/↑/eg + silent %s/\\downarrow\>/↓/eg + silent %s/\\updownarrow\>/↕/eg + silent %s/\\Uparrow\>/⇑/eg + silent %s/\\Downarrow\>/⇓/eg + silent %s/\\Updownarrow\>/⇕/eg + silent %s/\\nearrow\>/↗/eg + silent %s/\\searrow\>/↘/eg + silent %s/\\swarrow\>/↙/eg + silent %s/\\nwarrow\>/↖/eg + silent %s/\\leadsto\>/↝/eg + silent %s/\\dots\>/…/eg + silent %s/\\cdots\>/⋯/eg + silent %s/\\vdots\>/⋮/eg + silent %s/\\ddots\>/⋱/eg + silent %s/\\hbar\>/ℏ/eg + silent %s/\\ell\>/ℓ/eg + silent %s/\\Re\>/ℜ/eg + silent %s/\\Im\>/ℑ/eg + silent %s/\\aleph\>/א/eg + silent %s/\\wp\>/℘/eg + silent %s/\\forall\>/∀/eg + silent %s/\\exists\>/∃/eg + silent %s/\\mho\>/℧/eg + silent %s/\\partial\>/∂/eg + silent %s/\\prime\>/′/eg + silent %s/\\emptyset\>/∅/eg + silent %s/\\infty\>/∞/eg + silent %s/\\nabla\>/∇/eg + silent %s/\\triangle\>/△/eg + silent %s/\\Box\>/□/eg + silent %s/\\Diamond\>/◇/eg + silent %s/\\bot\>/⊥/eg + silent %s/\\top\>/⊤/eg + silent %s/\\angle\>/∠/eg + silent %s/\\surd\>/√/eg + silent %s/\\diamondsuit\>/♢/eg + silent %s/\\heartsuit\>/♡/eg + silent %s/\\clubsuit\>/♣/eg + silent %s/\\spadesuit\>/♠/eg + silent %s/\\neg\>/¬/eg + silent %s/\\flat\>/♭/eg + silent %s/\\natural\>/♮/eg + silent %s/\\sharp\>/♯/eg + silent %s/\\digamma\>/Ϝ/eg + silent %s/\\varkappa\>/ϰ/eg + silent %s/\\beth\>/ב/eg + silent %s/\\daleth\>/ד/eg + silent %s/\\gimel\>/ג/eg + silent %s/\\lessdot\>/⋖/eg + silent %s/\\leqslant\>/≤/eg + silent %s/\\leqq\>/≦/eg + silent %s/\\lll\>/⋘/eg + silent %s/\\lesssim\>/≲/eg + silent %s/\\lessgtr\>/≶/eg + silent %s/\\lesseqgtr\>/⋚/eg + silent %s/\\preccurlyeq\>/≼/eg + silent %s/\\curlyeqprec\>/⋞/eg + silent %s/\\precsim\>/≾/eg + silent %s/\\Subset\>/⋐/eg + silent %s/\\sqsubset\>/⊏/eg + silent %s/\\therefore\>/∴/eg + silent %s/\\smallsmile\>/⌣/eg + silent %s/\\vartriangleleft\>/⊲/eg + silent %s/\\trianglelefteq\>/⊴/eg + silent %s/\\gtrdot\>/⋗/eg + silent %s/\\geqq\>/≧/eg + silent %s/\\ggg\>/⋙/eg + silent %s/\\gtrsim\>/≳/eg + silent %s/\\gtrless\>/≷/eg + silent %s/\\gtreqless\>/⋛/eg + silent %s/\\succcurlyeq\>/≽/eg + silent %s/\\curlyeqsucc\>/⋟/eg + silent %s/\\succsim\>/≿/eg + silent %s/\\Supset\>/⋑/eg + silent %s/\\sqsupset\>/⊐/eg + silent %s/\\because\>/∵/eg + silent %s/\\shortparallel\>/∥/eg + silent %s/\\smallfrown\>/⌢/eg + silent %s/\\vartriangleright\>/⊳/eg + silent %s/\\trianglerighteq\>/⊵/eg + silent %s/\\doteqdot\>/≑/eg + silent %s/\\risingdotseq\>/≓/eg + silent %s/\\fallingdotseq\>/≒/eg + silent %s/\\eqcirc\>/≖/eg + silent %s/\\circeq\>/≗/eg + silent %s/\\triangleq\>/≜/eg + silent %s/\\bumpeq\>/≏/eg + silent %s/\\Bumpeq\>/≎/eg + silent %s/\\thicksim\>/∼/eg + silent %s/\\thickapprox\>/≈/eg + silent %s/\\approxeq\>/≊/eg + silent %s/\\backsim\>/∽/eg + silent %s/\\vDash\>/⊨/eg + silent %s/\\Vdash\>/⊩/eg + silent %s/\\Vvdash\>/⊪/eg + silent %s/\\backepsilon\>/∍/eg + silent %s/\\varpropto\>/∝/eg + silent %s/\\between\>/≬/eg + silent %s/\\pitchfork\>/⋔/eg + silent %s/\\blacktriangleleft\>/◀/eg + silent %s/\\blacktriangleright\>/▷/eg + silent %s/\\dashleftarrow\>/⇠/eg + silent %s/\\leftleftarrows\>/⇇/eg + silent %s/\\leftrightarrows\>/⇆/eg + silent %s/\\Lleftarrow\>/⇚/eg + silent %s/\\twoheadleftarrow\>/↞/eg + silent %s/\\leftarrowtail\>/↢/eg + silent %s/\\leftrightharpoons\>/⇋/eg + silent %s/\\Lsh\>/↰/eg + silent %s/\\looparrowleft\>/↫/eg + silent %s/\\curvearrowleft\>/↶/eg + silent %s/\\circlearrowleft\>/↺/eg + silent %s/\\dashrightarrow\>/⇢/eg + silent %s/\\rightrightarrows\>/⇉/eg + silent %s/\\rightleftarrows\>/⇄/eg + silent %s/\\Rrightarrow\>/⇛/eg + silent %s/\\twoheadrightarrow\>/↠/eg + silent %s/\\rightarrowtail\>/↣/eg + silent %s/\\rightleftharpoons\>/⇌/eg + silent %s/\\Rsh\>/↱/eg + silent %s/\\looparrowright\>/↬/eg + silent %s/\\curvearrowright\>/↷/eg + silent %s/\\circlearrowright\>/↻/eg + silent %s/\\multimap\>/⊸/eg + silent %s/\\upuparrows\>/⇈/eg + silent %s/\\downdownarrows\>/⇊/eg + silent %s/\\upharpoonleft\>/↿/eg + silent %s/\\upharpoonright\>/↾/eg + silent %s/\\downharpoonleft\>/⇃/eg + silent %s/\\downharpoonright\>/⇂/eg + silent %s/\\rightsquigarrow\>/⇝/eg + silent %s/\\leftrightsquigarrow\>/↭/eg + silent %s/\\dotplus\>/∔/eg + silent %s/\\ltimes\>/⋉/eg + silent %s/\\Cup\>/⋓/eg + silent %s/\\veebar\>/⊻/eg + silent %s/\\boxplus\>/⊞/eg + silent %s/\\boxtimes\>/⊠/eg + silent %s/\\leftthreetimes\>/⋋/eg + silent %s/\\curlyvee\>/⋎/eg + silent %s/\\centerdot\>/⋅/eg + silent %s/\\rtimes\>/⋈/eg + silent %s/\\Cap\>/⋒/eg + silent %s/\\barwedge\>/⊼/eg + silent %s/\\boxminus\>/⊟/eg + silent %s/\\boxdot\>/⊡/eg + silent %s/\\rightthreetimes\>/⋌/eg + silent %s/\\curlywedge\>/⋏/eg + silent %s/\\intercal\>/⊺/eg + silent %s/\\divideontimes\>/⋇/eg + silent %s/\\smallsetminus\>/∖/eg + silent %s/\\circleddash\>/⊝/eg + silent %s/\\circledcirc\>/⊚/eg + silent %s/\\circledast\>/⊛/eg + silent %s/\\hbar\>/ℏ/eg + silent %s/\\hslash\>/ℏ/eg + silent %s/\\square\>/□/eg + silent %s/\\blacksquare\>/■/eg + silent %s/\\circledS\>/Ⓢ/eg + silent %s/\\vartriangle\>/△/eg + silent %s/\\blacktriangle\>/▲/eg + silent %s/\\complement\>/∁/eg + silent %s/\\triangledown\>/▽/eg + silent %s/\\blacktriangledown\>/▼/eg + silent %s/\\lozenge\>/◊/eg + silent %s/\\blacklozenge\>/◆/eg + silent %s/\\bigstar\>/★/eg + silent %s/\\angle\>/∠/eg + silent %s/\\measuredangle\>/∡/eg + silent %s/\\sphericalangle\>/∢/eg + silent %s/\\backprime\>/‵/eg + silent %s/\\nexists\>/∄/eg + silent %s/\\Finv\>/Ⅎ/eg + silent %s/\\varnothing\>/∅/eg + silent %s/\\eth\>/ð/eg + silent %s/\\mho\>/℧/eg + call cursor(s:line,s:column) +endfunction + +nnoremap cl :call UTF8toLaTeX() +nnoremap cu :call LaTeXtoUTF8() +command! Convert2Latex :call UTF8toLaTeX() +command! Convert2UTF8 :call LaTeXtoUTF8() + +" augroup LaTeX +" au! +" autocmd BufWritePre *.tex :Convert2Latex +" autocmd BufWritePost *.tex :Convert2UTF8 +" augroup END diff --git a/.vim/after/ftplugin/vim/folding.vim b/.vim/after/ftplugin/vim/folding.vim new file mode 100644 index 0000000..1454cbe --- /dev/null +++ b/.vim/after/ftplugin/vim/folding.vim @@ -0,0 +1,25 @@ +function! VimFolds() + let thisline = getline(v:lnum) + if match(thisline,'^"" ') >= 0 + return ">1" + elseif match(thisline,'^" ') >=0 + return ">1" + else + return "=" + endif +endfunction + +function! VimFoldText() + let startline = getline(v:foldstart) + if match(startline,'^"" ') >= 0 + let title = substitute(startline,'^"" \(.*\)$','\1',"") + return '# ' . title + elseif match(startline,'^" ') >=0 + let title = substitute(startline,'^" \(.*\)$','\1',"") + return ' ## ' .title + endif +endfunction + +setlocal foldmethod=expr +setlocal foldexpr=VimFolds() +setlocal foldtext=VimFoldText() diff --git a/.vim/after/syntax/cpp.vim b/.vim/after/syntax/cpp.vim new file mode 100644 index 0000000..4da741d --- /dev/null +++ b/.vim/after/syntax/cpp.vim @@ -0,0 +1,3 @@ +syntax keyword mPigroup pi +hi def link mPigroup Todo + diff --git a/.vim/after/syntax/cpp.vim~ b/.vim/after/syntax/cpp.vim~ new file mode 100644 index 0000000..e69de29 diff --git a/.vim/after/syntax/tex.vim b/.vim/after/syntax/tex.vim new file mode 100644 index 0000000..a40cc30 --- /dev/null +++ b/.vim/after/syntax/tex.vim @@ -0,0 +1,6 @@ +syn match texMathSymbol '\\arr\>' contained conceal cchar=← +syn match texMathSymbol '\\,' contained conceal cchar= +syn match texMathSymbol '\\mathcal' contained conceal cchar= +syn match texMathSymbol '\\text' contained conceal cchar= +syn match texMathSymbol '\\mathbb' contained conceal cchar= +syn match texMathSymbol '\\quad' contained conceal cchar= diff --git a/.vim/after/syntax/tex.vim~ b/.vim/after/syntax/tex.vim~ new file mode 100644 index 0000000..4e1d112 --- /dev/null +++ b/.vim/after/syntax/tex.vim~ @@ -0,0 +1,6 @@ +syn match texMathSymbol '\\arr\>' contained conceal cchar=← +syn match texMathSymbol '\\,' contained conceal cchar= +syn match texMathSymbol '\\mathcal' contained conceal cchar= +syn match texMathSymbol '\\text' contained conceal cchar= +syn match texMathSymbol '\\mathbb' contained conceal cchar= +syn match texMathSymbol '\\quad' contained conceal cchar= diff --git a/.vim/colors/mine.vim b/.vim/colors/mine.vim new file mode 100644 index 0000000..653682e --- /dev/null +++ b/.vim/colors/mine.vim @@ -0,0 +1,29 @@ +" Vim color file +" Maintainer: Urbain +" Last Change: 2002/10/14 Mon 16:41. +" version: 1.0 +" This color scheme uses a light background. + +set background=light +hi clear +if exists("syntax_on") + syntax reset +endif + +let colors_name = "mine" + +" Syntax group +hi Comment gui=none guifg=#af5f00 +hi Normal guibg=white guifg=Black +hi Type gui=none guifg=#005f00 +hi Statement gui=none guifg=#5f0000 +hi Special guifg=Black +hi Constant guifg=Gray +hi Error guifg=Red guibg=White +hi Preproc guifg=Blue "\end +hi Constant guifg=Green "\ $$ +hi Identifier guifg=Blue "\begin +hi LineNr gui=none guifg=Gray +hi FoldColumn guibg=#F5F4FD +hi Todo guibg=white gui=underline,italic guifg=Red +hi Conceal guibg=White guifg=DarkGreen diff --git a/.vim/colors/mine.vim~ b/.vim/colors/mine.vim~ new file mode 100644 index 0000000..653682e --- /dev/null +++ b/.vim/colors/mine.vim~ @@ -0,0 +1,29 @@ +" Vim color file +" Maintainer: Urbain +" Last Change: 2002/10/14 Mon 16:41. +" version: 1.0 +" This color scheme uses a light background. + +set background=light +hi clear +if exists("syntax_on") + syntax reset +endif + +let colors_name = "mine" + +" Syntax group +hi Comment gui=none guifg=#af5f00 +hi Normal guibg=white guifg=Black +hi Type gui=none guifg=#005f00 +hi Statement gui=none guifg=#5f0000 +hi Special guifg=Black +hi Constant guifg=Gray +hi Error guifg=Red guibg=White +hi Preproc guifg=Blue "\end +hi Constant guifg=Green "\ $$ +hi Identifier guifg=Blue "\begin +hi LineNr gui=none guifg=Gray +hi FoldColumn guibg=#F5F4FD +hi Todo guibg=white gui=underline,italic guifg=Red +hi Conceal guibg=White guifg=DarkGreen diff --git a/.vim/mySnippets/all.snippets b/.vim/mySnippets/all.snippets new file mode 100644 index 0000000..8094025 --- /dev/null +++ b/.vim/mySnippets/all.snippets @@ -0,0 +1,25 @@ +global !p +def make_comment(): + b, e = vim.eval("&commentstring").split( '%s' ) + return b, e +endglobal + +snippet todo "A universal TODO reminder" b +`!p +comment = make_comment() +snip.rv = comment[ 0 ] +` TODO: ${1:desc} (`!v $USER`, `!v strftime("%c")`) `!p +comment = make_comment() +snip.rv = comment[ 1 ]` +$0 +endsnippet + +snippet fix "A universal FIXME reminder" b +`!p +comment = make_comment() +snip.rv = comment[ 0 ] +` FIXME: ${1:desc} (`!v $USER`, `!v strftime("%c")`) `!p +comment = make_comment() +snip.rv = comment[ 1 ]` +$0 +endsnippet diff --git a/.vim/mySnippets/cpp.snippets b/.vim/mySnippets/cpp.snippets new file mode 100644 index 0000000..d314641 --- /dev/null +++ b/.vim/mySnippets/cpp.snippets @@ -0,0 +1,35 @@ +snippet print_mat "Print matrix" b +for (unsigned int iii = 0; iii < ${1:mat}.size(); ++iii) { + cout << setw(12) << $1[iii][0]; + for (unsigned int jjj = 1; jjj < $1.size(); ++jjj) { + cout << ", "; + cout << setw(12) << $1[iii][jjj]; + } + cout << endl; +} +$0 +endsnippet + +snippet print_vec "Print vector" b +for (unsigned int iii = 0; iii < ${1:mat}.size(); ++iii) { + cout << setw(12) << $1[iii]; + cout << endl; +} +$0 +endsnippet + +snippet forij "Matrix iteration" b +for (int ${2:i} = 0; $2 < ${1:count}; $2++) { + for (int ${4:j} = 0; $4 < $1; $4++) { + ${5} + } +} +endsnippet + +snippet vec "vector" i +vector<${1:double}> $0 +endsnippet + +snippet mat "matrix" i +vector< vector<${1:double}> > $0 +endsnippet diff --git a/.vim/mySnippets/mail.snippets b/.vim/mySnippets/mail.snippets new file mode 100644 index 0000000..9839916 --- /dev/null +++ b/.vim/mySnippets/mail.snippets @@ -0,0 +1,33 @@ +snippet best "Best wishes" b +Best wishes, + +Urbain +endsnippet + +snippet dear "Email template" b +Dear ${1:Greg}, + +${2:# Body of the message} + +Best wishes, + +${3:Urbain} +endsnippet + +snippet sign "Signature" b +Best wishes, + +Urbain Vaes +Department of Mathematics +Office 6M09 +endsnippet + +snippet bisous "Gros bisous" b +Gros bisous, + +Urbain +endsnippet + +snippet look "I'm looking forward to ..." b +I am looking forward to hearing from you, +endsnippet diff --git a/.vim/mySnippets/python.snippets b/.vim/mySnippets/python.snippets new file mode 100644 index 0000000..6dbc272 --- /dev/null +++ b/.vim/mySnippets/python.snippets @@ -0,0 +1,4 @@ +snippet fori "for loop over range" b +for ${1:i} in range(${2:n}): + ${0:pass} +endsnippet diff --git a/.vim/mySnippets/tex.snippets b/.vim/mySnippets/tex.snippets new file mode 100644 index 0000000..9c74845 --- /dev/null +++ b/.vim/mySnippets/tex.snippets @@ -0,0 +1,110 @@ +snippet real "Field of real numbers" i +\real +endsnippet + +snippet grad "Gradient" i +\grad +endsnippet + +snippet div "Divergence" i +\dive +endsnippet + +snippet new "New command" b +\newcommand{$1}[$2]{$3}$0 +endsnippet + +snippet op "Operator style" i +\op +endsnippet + +snippet pard "Partial derivative" i +\pardl{$1}{$2}$0 +endsnippet + +snippet pardd "Double partial derivative" i +\parddl{$1}{$2}$0 +endsnippet + +snippet herm "Hermite polynomials" i +\hermite +endsnippet + +snippet red "Red text" i +\red{$1}$0 +endsnippet + +snippet sumi "Sum over index set" i +\sum_{${1:i} \in ${2:I}}$0 +endsnippet + +snippet int "Integral" i +\int_{$1} +endsnippet + +snippet ip "Inner product" i +\ip{$1}{$2}$0 +endsnippet + +snippet ipw "Inner product" i +\wip{$1}{$2}{$3}$0 +endsnippet + +snippet norm "Norm" i +\norm{$1}$0 +endsnippet + +snippet normw "Weighted norm" i +\wnorm{$1}{${2:\gamma}} +endsnippet + +snippet test "Test functions" i +\test{${1:\real^n}}$0 +endsnippet + +snippet lp "Lp spaces" w +\lp{${1:exponent}}{${2:domain}}${3/^.+$/[/}${3:weight}${3/^.+$/]/}$0 +endsnippet + +snippet sob "Sobolev spaces" w +\sobolev{${1:exponent}}{${2:domain}}${3/^.+$/[/}${3:weight}${3/^.+$/]/}$0 +endsnippet + +snippet cont "Continuous function" w +\cont{$1}{$2}$0 +endsnippet + +snippet mean "Expectation" w +\expect $0 +endsnippet + +snippet dot "Dot product" w +\dotx +endsnippet + +snippet abs "Absolute value" w +\abs{ $1 }$0 +endsnippet + +snippet sum "Sum" w +\sum_{${1:i=1}}^{${2:n}} +endsnippet + +snippet smooth "Smooth function" w +\smooth{${1:\real^n}} $0 +endsnippet + +snippet ref "Clever reference" w +\cref{$1}$0 +endsnippet + +snippet frame "My frame snippet" b +\begin{frame} + \frametitle{$1} + $0 +\end{frame} +endsnippet + +snippet gauss "Gaussian density" w +\gaussian{${1:\mu}}{${2:\Sigma}}$0 +endsnippet diff --git a/.vim/mySnippets/vim.snippets b/.vim/mySnippets/vim.snippets new file mode 100644 index 0000000..e69de29 diff --git a/.vim/spell/en.utf-8.add b/.vim/spell/en.utf-8.add new file mode 100644 index 0000000..460c1ea --- /dev/null +++ b/.vim/spell/en.utf-8.add @@ -0,0 +1,28 @@ +Plugin +Colorscheme +vim +multiscale +SDEs +SPDEs +Abdulle +Pavliotis +Ornstein +Uhlenbeck +MRes +Galerkin +ODEs +PDEs +Kolmogorov +SDE +Maruyama +advective +eqref +Milgram +Cea's +Lyapunov +Gnuplot +Cholesky +Assyr +EPFL +SymPy +CMake diff --git a/.vim/spell/en.utf-8.add.spl b/.vim/spell/en.utf-8.add.spl new file mode 100644 index 0000000..a300e1e Binary files /dev/null and b/.vim/spell/en.utf-8.add.spl differ diff --git a/.vim/spell/en.utf-8.spl b/.vim/spell/en.utf-8.spl new file mode 100644 index 0000000..a41bf79 Binary files /dev/null and b/.vim/spell/en.utf-8.spl differ diff --git a/.vim/spell/en.utf-8.sug b/.vim/spell/en.utf-8.sug new file mode 100644 index 0000000..b82667d Binary files /dev/null and b/.vim/spell/en.utf-8.sug differ diff --git a/.vim/vimrc b/.vim/vimrc new file mode 100644 index 0000000..13b520a --- /dev/null +++ b/.vim/vimrc @@ -0,0 +1,314 @@ +"" Plugins +call plug#begin('~/.vim/plugged') +Plug 'airblade/vim-gitgutter', { 'on' : 'GitGutterToggle' } +Plug 'altercation/vim-colors-solarized' +Plug 'AndrewRadev/splitjoin.vim' +Plug 'beloglazov/vim-online-thesaurus' +Plug 'benekastah/neomake' , { 'for' : 'cpp' } +Plug 'bling/vim-airline' +Plug 'christoomey/vim-tmux-navigator' +Plug 'freeo/vim-kalisi' +Plug 'godlygeek/tabular' , { 'on' : 'Tab' } +Plug 'gregsexton/gitv', { 'on' : 'Gitv' } +Plug 'honza/vim-snippets' +Plug 'itchyny/calendar.vim', { 'on' : 'Calendar' } +Plug 'klen/python-mode' +Plug 'jamessan/vim-gnupg' +Plug 'junegunn/fzf' +Plug 'junegunn/seoul256.vim' +Plug 'junegunn/vim-pseudocl' +Plug 'junegunn/vim-oblique' +Plug 'junegunn/vim-peekaboo' +Plug 'junegunn/rainbow_parentheses.vim' +Plug 'justinmk/vim-sneak' +Plug 'kassio/neoterm', { 'on' : 'T' } +Plug 'kien/ctrlp.vim' +Plug 'lervag/vimtex' +Plug 'majutsushi/tagbar' +Plug 'mileszs/ack.vim', { 'on' : 'Ack' } +Plug 'rdnetto/YCM-Generator', { 'branch' : 'stable' , 'on' : 'YcmGenerateConfig' } +Plug 'ryanss/vim-hackernews', { 'on' : 'HackerNews' } +Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } +Plug 'scrooloose/syntastic' +Plug 'SirVer/ultisnips' +Plug 'sjl/Gundo.vim', { 'on' : 'GundoToggle' } +Plug 'terryma/vim-multiple-cursors' +Plug 'tomasr/molokai' +Plug 'tommcdo/vim-exchange' +Plug 'ton/vim-bufsurf' +Plug 'tpope/vim-abolish', { 'for' : 'tex' } +Plug 'tpope/vim-commentary' +Plug 'tpope/vim-flagship' +Plug 'tpope/vim-fugitive' +Plug 'tpope/vim-git' +Plug 'tpope/vim-obsession' +Plug 'tpope/vim-repeat' +Plug 'tpope/vim-sensible' +Plug 'tpope/vim-surround' +Plug 'tpope/vim-unimpaired' +Plug 'tpope/vim-vinegar' +Plug 'troydm/zoomwintab.vim' +Plug 'Valloric/YouCompleteMe', { 'do' : './install.sh --clang-completer' } +Plug 'xolox/vim-misc' +Plug 'xolox/vim-notes' +call plug#end() + +let g:vimtex_fold_enabled=0 +let g:vimtex_view_method='zathura' +let g:vimtex_latexmk_continuous=1 +let g:vimtex_quickfix_mode=0 + +let g:UltiSnipsEditSplit="horizontal" +let g:UltiSnipsExpandTrigger="" +let g:UltiSnipsJumpBackwardTrigger="" +let g:UltiSnipsJumpForwardTrigger="" +let g:UltiSnipsListSnippets="" +let g:UltiSnipsSnippetDirectories=['UltiSnips', 'mySnippets'] +let g:UltiSnipsSnippetsDir="~/.vim/mySnippets" + +let g:airline_left_sep='' +let g:airline_right_sep='' +let g:airline_section_c = '%f%m' +let g:airline_section_y = '' +let g:airline_section_z = '%3p%%|%3l|%3c' +let g:airline_theme='solarized' +let g:airline#extensions#tabline#enabled = 0 +let g:airline_exclude_preview = 0 + +let g:bufferline_active_buffer_left = '' +let g:bufferline_active_buffer_right = '' +let g:bufferline_echo = 0 +let g:bufferline_modified = '+' +let g:bufferline_rotate = 0 + +let g:ctrlp_by_filename = 1 +let g:ctrlp_cmd = 'CtrlP' +let g:ctrlp_map = '' +let g:ctrlp_open_new_file = 't' +let g:ctrlp_show_hidden = 1 +let g:ctrlp_user_command = ['.git/', 'git --git-dir=%s/.git ls-files -oc --exclude-standard'] +let g:ctrlp_working_path_mode = 'r' +let g:ctrlp_prompt_mappings = { + \ 'PrtSelectMove("j")': [''], + \ 'PrtSelectMove("k")': [''], + \ 'PrtHistory(-1)': [''], + \ 'PrtHistory(1)': [''],} + +let g:pymode_rope=0 + +let g:syntastic_cpp_compiler = "g++" +let g:syntastic_cpp_compiler_options = "-std=c++11 -Wall -Wextra -Wpedantic" +let g:syntastic_error_symbol = "✗" +let g:syntastic_warning_symbol = "W" + +let g:tagbar_width = 30 +let g:tagbar_show_linenumbers=1 +let g:tagbar_autofocus=1 + + +let g:tex_conceal= 'adgm' +let g:tex_flavor='latex' + let g:tex_fast="1" + +let NERDTreeIgnore=['\.pdf$', '\~$','\.toc$', + \ '\.fls$','\.bbl$','\.blg$', + \ '\.out$', '\.log$','\.aux$','\.sty$', + \ '\.fdb_latexmk$', '\.synctex.gz$','\.latexmain$'] + +let g:ycm_key_list_select_completion = ['', ''] +let g:ycm_key_list_previous_completion = ['', ''] +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 = {} +endif +let g:ycm_semantic_triggers.tex = ['re!\\[A-Za-z]*(ref|cite)[A-Za-z]*([^]]*])?{([^}]*, ?)*' ] + +let g:calendar_google_calendar = 1 +let g:calendar_google_task = 1 + +let g:tabprefix = "" + + +"" Vim options + +" Tabs and indent +set smartindent +set expandtab +set tabstop=4 +set softtabstop=4 +set shiftwidth=4 + +" Folds +set foldcolumn=0 +set nofoldenable +set foldmethod=expr +set foldlevel=0 + +" Back up files +set noswapfile +set nowritebackup +set undofile +set undodir=/home/urbain/.nvim/vimundo/ + +" Layout window +set nonumber +set diffopt=filler,vertical +set listchars=tab:▸\ ,eol:¬,trail:- +set fillchars=fold:\ ,vert:\ , +set breakindent +let &showbreak='--> ' +set colorcolumn=0 +set scrolloff=0 +set t_Co=256 +set guitablabel=%N\ %t\ %M +set showcmd + +" Layout text +set nowrap +set linebreak +set textwidth=0 +set conceallevel=2 +set formatprg=par\ w72 +set guifont=Monaco\ 11 + +" Case and spell +set nospell +" set spellfile="/home/urbain/.vim/spell/en.utf-8.add" +set smartcase +set ignorecase + +" Misc +set noautochdir +set cpoptions+=Iq +set encoding=utf-8 +set mouse=a +set clipboard=unnamedplus +set lazyredraw +set hidden + +" Colorscheme +if $COLORSCHEME=="light" + silent! colo solarized + set background=light +elseif $COLORSCHEME=="dark" + silent! colo solarized + set background=dark +elseif $COLORSCHEME=="default" + silent! colo seoul256 + set background=dark +endif + +highlight Comment cterm=italic +set t_ZH= +set t_ZR= + +"" Maps + +" Definition of leaders +let mapleader = " " +let maplocalleader = "\\" + +" New pages +nnoremap pe :tabedit +nnoremap pn :tabnew +nnoremap po :tabonly + +" Plugin Management +nnoremap pi :PlugInstall +nnoremap pu :PlugUpdate +nnoremap pc :PlugClean +nnoremap pd :PlugDiff +nnoremap ps :PlugStatus + +" Toggles +nnoremap cop :set paste! +nnoremap cof :set foldenable! +nnoremap cpg :GitGutterToggle +nnoremap cpn :NERDTreeToggle +nnoremap cpt :TagbarToggle +nnoremap cpu :GundoToggle + +" Sourcing +nnoremap sv :source ~/.vimrc +nnoremap sc :source % + +" File edits +nnoremap es :UltiSnipsEdit +nnoremap em :e ~/dotfiles/mutt/muttrc +nnoremap en :e ~/dotfiles/nvimrc +nnoremap ev :e ~/dotfiles/vimrc +nnoremap ez :e ~/dotfiles/zshrc +nnoremap et :e ~/dotfiles/tmux.conf + +" Formatting +nnoremap fw :%s/\s\+$// +nnoremap fi zzmxgg=G'x + +" Navigation +nnoremap (( :BufSurfBack +nnoremap )) :BufSurfForward +nnoremap 3 +nnoremap 3 +nnoremap o +nnoremap O + +" Git +nnoremap gs :Gstatus +nnoremap gr :Gread +nnoremap gd :Gdiff +nnoremap gv :Gitv + +" Misc +nnoremap +nnoremap Q :bd! +nnoremap w :w +nnoremap q :q! +nnoremap h :e %:p:s,.hpp$,.X123X,:s,.cpp$,.hpp,:s,.X123X$,.cpp, +nnoremap J mzJ`z +nnoremap Y y$ +nnoremap + za +nnoremap K :OnlineThesaurusCurrentWord + +" Dvorak specific +nnoremap : , +vnoremap : , +nnoremap , : +vnoremap , : + +" Neovim specific +if has("nvim") + tnoremap :ZoomWinTabOut + nnoremap :ZoomWinTabIn:b termi + inoremap :b termi + nnoremap ym :Neomake! +endif + +"" Restore cursor position +augroup vimrc + au! + autocmd BufWritePost *vimrc source % + autocmd BufWritePost *.cpp Neomake! + autocmd BufReadPost * + \ if line("'\"") > 1 && line("'\"") <= line("$") | + \ exe "normal! g`\"" | + \ endif +augroup END + +"" Taken from Junegunn Chong +nnoremap C :call fzf#run({ +\ 'source': +\ map(split(globpath(&rtp, "colors/*.vim"), "\n"), +\ "substitute(fnamemodify(v:val, ':t'), '\\..\\{-}$', '', '')"), +\ 'sink': 'colo', +\ 'options': '+m', +\ 'left': 30, +\ 'launcher': 'iterm2-launcher 20 30 %s' +\ }) + +"" Experimental +let g:notes_directories = ['~/.notes'] +let g:pymode=0 + +" Idea: instant download colorscheme diff --git a/.xinitrc b/.xinitrc new file mode 100755 index 0000000..adc9614 --- /dev/null +++ b/.xinitrc @@ -0,0 +1,17 @@ +#!/bin/bash + +# Key repeat rate +xset r rate 400 50 + +# Load key bindings +$HOME/bin/keyboard.sh + +# Load Xresources to light colorscheme +xrdb $HOME/.Xresources/Xresources.dark + +# Start gpg-agent +killall -9 gpg-agent + +gpg-agent --daemon --enable-ssh-support \ + --write-env-file "${HOME}/.gpg-agent-info" + diff --git a/.zathurarc b/.zathurarc new file mode 100644 index 0000000..543633d --- /dev/null +++ b/.zathurarc @@ -0,0 +1,2 @@ +map scroll down +map scroll up diff --git a/.zsh/zsh-aliases b/.zsh/zsh-aliases new file mode 100644 index 0000000..9d2dbe6 --- /dev/null +++ b/.zsh/zsh-aliases @@ -0,0 +1,54 @@ +# Apps for filetypes +alias -s vim=$EDITOR +alias -s cpp=$EDITOR +alias -s c=$EDITOR +alias -s tex=$EDITOR +alias -s pdf=zathura + +# Directories +alias books='cd ~/Dropbox/phd/books' +alias cdd='cd ~/dotfiles' +alias papers='cd ~/Dropbox/phd/papers' +alias report='cd ~/Dropbox/phd/reports/9\ months' +alias u='cd ~/Dropbox/phd' +alias uc='cd ~/Dropbox/phd/programs' +alias ul='cd ~/Dropbox/phd/literature' +alias up='cd ~/Dropbox/phd/presentations' +alias ur='cd ~/Dropbox/phd/reports' + +# Commands +alias a='vifm' +alias c='clear' +alias ca='printf "\ec"' +alias commit='git commit -a -m' +alias g='git' +alias install='sudo apt-get install' +alias m='mutt' +alias mail='offlineimap -u quiet &' +alias mc='make clean' +alias mca='make clean-all' +alias n='nvim' +alias ns="$EDITOR -S Session.vim" +alias pull='git pull origin master' +alias push='git push origin master' +alias pushs='git push --recurse-submodules=check' +alias update='sudo apt-get update' +alias upgrade='sudo apt-get upgrade' +alias v='vim' +alias x='sh ~/.xmodmap' +alias youtube=mpsyt + +# Configuration +alias em="$EDITOR ~/.mutt/muttrc" +alias en="$EDITOR ~/.nvimrc" +alias eo="$EDITOR ~/.offlineimaprc" +alias et="$EDITOR ~/.tmux.conf" +alias ev="$EDITOR ~/.vimrc" +alias evi="$EDITOR ~/.vifm/vifmrc" +alias ex="$EDITOR ~/.xmodmap" +alias ez="$EDITOR ~/.zshrc" +alias eza="$EDITOR ~/.zathurarc" + +# Tmux +alias son="tmux set -g status on" +alias soff="tmux set -g status off" diff --git a/.zsh/zsh-functions b/.zsh/zsh-functions new file mode 100644 index 0000000..f9f387d --- /dev/null +++ b/.zsh/zsh-functions @@ -0,0 +1,31 @@ +function colo { + + # Change colors for current session + $HOME/.bin/recolor.sh < ~/.Xresources/Xresources.$1 + + # Load Xresources file for future sessions + xrdb ~/.Xresources/Xresources.$1 + + # Change environment variable + export COLORSCHEME=$1 + + # Change default environment variable for future sessions + sed -i --follow-symlinks "s/^export COLORSCHEME=.*$/export COLORSCHEME=$1/g" ~/dotfiles/zshrc +} + +z() { + if [[ -z "$*" ]]; then + cd "$(_z -l 2>&1 | fzf-tmux +s --tac | sed 's/^[0-9,.]* *//')" + else + _z "$@" + fi +} + +fshow() { + git log --graph --color=always \ + --format="%C(auto)%h%d %s %C(black)%C(bold)%cr" "$@" | + fzf --ansi --no-sort --reverse --tiebreak=index --toggle-sort=\` \ + --bind 'ctrl-m:execute: + echo {} | grep -o "[a-f0-9]\{7\}" | + xargs -I % sh -c "git show --color=always % | less -R"' +} diff --git a/.zsh/zsh-plugins b/.zsh/zsh-plugins new file mode 100644 index 0000000..26b5726 --- /dev/null +++ b/.zsh/zsh-plugins @@ -0,0 +1,59 @@ +# Load zgen +source "/home/urbain/.zgen/zgen.zsh" + +# Load plugins +if ! zgen saved; then + + echo "Creating a zgen save" + + # Load oh-my-zsh framework + zgen oh-my-zsh + + # Oh-my-zsh plugins + zgen oh-my-zsh plugins/git + zgen oh-my-zsh plugins/vi-mode + zgen oh-my-zsh plugins/ubuntu + zgen oh-my-zsh plugins/tmux + zgen oh-my-zsh plugins/themes + + # zsh-users plugins + zgen load zsh-users/zsh-completions src + zgen load zsh-users/zsh-syntax-highlighting + + # Appearance + zgen oh-my-zsh themes/eastwood + + # My plugins + zgen load uvaes/fzf-marks + zgen load uvaes/grm + + # Other plugins + zgen load rupa/z + zgen load djui/alias-tips + zgen load tarruda/zsh-autosuggestions + zgen load Tarrasch/zsh-autoenv + zgen load joel-porquet/zsh-dircolors-solarized + + # Save all to init script + zgen save +fi + +# Plugin configuration + +# Autosuggestion +{ + # Environment variables for plugins + AUTOSUGGESTION_HIGHLIGHT_COLOR='fg=6' + + zle-line-init() { + zle autosuggest-start + } + zle -N zle-line-init + + bindkey '^y' autosuggest-execute-suggestion +} + +# GRM +{ + REPOFILE=/home/urbain/.grmrc +} diff --git a/.zsh/zsh-tmp b/.zsh/zsh-tmp new file mode 100644 index 0000000..a5abbce --- /dev/null +++ b/.zsh/zsh-tmp @@ -0,0 +1 @@ +export COLORSCHEME=light diff --git a/.zsh/zshrc b/.zsh/zshrc new file mode 100644 index 0000000..c891760 --- /dev/null +++ b/.zsh/zshrc @@ -0,0 +1,77 @@ +ZSH_PLUGINS="$HOME/.zsh/zsh-plugins" +ZSH_ALIASES="$HOME/.zsh/zsh-aliases" +ZSH_TMP="$HOME/.zsh/zsh-tmp" + +# Source configurations +source $ZSH_PLUGINS +source $ZSH_ALIASES +source $ZSH_TMP + +# Custom key bindings for built-in widgets +bindkey -a 'k' history-beginning-search-backward +bindkey -a 'j' history-beginning-search-forward +bindkey '^P' history-beginning-search-backward +bindkey '^N' history-beginning-search-forward + +# Paths of executables +export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games" +export PATH="$PATH:/home/urbain/.local/bin" + +# Editor +export EDITOR=/usr/bin/nvim + +fshow() { + git log --graph --color=always \ + --format="%C(auto)%h%d %s %C(black)%C(bold)%cr" "$@" | + fzf --ansi --no-sort --reverse --tiebreak=index --toggle-sort=\` \ + --bind 'ctrl-m:execute: + echo {} | grep -o "[a-f0-9]\{7\}" | + xargs -I % sh -c "git show --color=always % | less -R"' +} + +function colo { + +# Change colors for current session +$HOME/.bin/recolor.sh < ~/.Xresources/Xresources.$1 + +# Load Xresources file for future sessions +xrdb ~/.Xresources/Xresources.$1 + +# Change environment variable +export COLORSCHEME=light + +# Change default environment variable for future sessions +sed -i --follow-symlinks "s/^export COLORSCHEME=.*$/export COLORSCHEME=$1/g" ~/dotfiles/zshrc +} + +# Fix tmux colors +if [[ -n ${TMUX} && -n ${commands[tmux]} ]];then + case $(tmux showenv TERM 2>/dev/null) in + *256color) ;& + TERM=fbterm) + TERM=screen-256color ;; + *) + TERM=screen + esac +fi + +# Export GPG-agent related +if [[ -f "${HOME}/.gpg-agent-info" ]]; then + source /home/urbain/.gpg-agent-info + export GPG_AGENT_INFO + export SSH_AUTH_SOCK +fi + + +# Tmux colors fix +if [[ -n ${TMUX} && -n ${commands[tmux]} ]];then + case $(tmux showenv TERM 2>/dev/null) in + *256color) ;& + TERM=fbterm) + TERM=screen-256color ;; + *) + TERM=screen + esac +fi + +[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh diff --git a/Xresources/Xresources b/Xresources/Xresources deleted file mode 100644 index 96582a7..0000000 --- a/Xresources/Xresources +++ /dev/null @@ -1,53 +0,0 @@ -! XTERM ! - -! Appearance xterm -*xterm*faceName: Monaco -*xterm*faceSize: 11 -*xterm*background: Black -*xterm*foreground: White -*xterm*cursorColor: Green - -! Copy-paste support -XTerm*selectToClipboard: true - -! URXVT ! - -! General settings -URxvt.loginShell : true -URxvt.termName : rxvt-256color - -! Custom META key -URxvt*modifier: alt - -! Copy-paste configuration -URxvt.clipboard.copycmd: xclip -i -selection clipboard -URxvt.clipboard.pastecmd: xclip -o -selection clipboard - -! Perl extensions configuration -URxvt.perl-ext-common: default,clipboard,url-select,keyboard-select,fullscreen -URxvt.url-select.launcher: /usr/bin/uzbl -URxvt.url-select.underline: true - -! Key bindings for extensions -URxvt.keysym.M-Escape: perl:keyboard-select:activate -URxvt.keysym.M-s: perl:keyboard-select:search -URxvt.keysym.M-u: perl:url-select:select_next -URxvt.keysym.M-y: perl:clipboard:copy -URxvt.keysym.M-p: perl:clipboard:paste -URxvt.keysym.F11: perl:fullscreen:switch - -! Appearance -! URxvt*font: xft:DejaVu Sans Mono:size=12 -URxvt*font: xft:monaco:size=11:antialias=false -URxvt*scrollBar: false -URxvt*internalBorder: 0 - -! True transparency -URxvt.depth: 32 - -! Font configuration -! Xft.dpi: 96 -! Xft.antialias: false -! Xft.hinting: true -! Xft.rgba: rgb -! Xft.hintstyle: hintslight diff --git a/Xresources/Xresources.dark b/Xresources/Xresources.dark deleted file mode 100644 index 05660f5..0000000 --- a/Xresources/Xresources.dark +++ /dev/null @@ -1,28 +0,0 @@ -# include "/home/urbain/.Xresources/Xresources" - -URxvt.borderColor: #002b36 - -*background: #002b36 -*foreground: #839496 -*fadeColor: #002b36 -*cursorColor: #93a1a1 - -*pointerColorBackground: #586e75 -*pointerColorForeground: #93a1a1 - -*color0: #073642 -*color8: #002b36 -*color1: #dc322f -*color9: #cb4b16 -*color2: #859900 -*color10: #586e75 -*color3: #b58900 -*color11: #657b83 -*color4: #268bd2 -*color12: #839496 -*color5: #d33682 -*color13: #6c71c4 -*color6: #2aa198 -*color14: #93a1a1 -*color7: #eee8d5 -*color15: #fdf6e3 diff --git a/Xresources/Xresources.default b/Xresources/Xresources.default deleted file mode 100644 index f9f6b1b..0000000 --- a/Xresources/Xresources.default +++ /dev/null @@ -1,29 +0,0 @@ -# include "/home/urbain/.Xresources/Xresources" - -! Border color -URxvt.borderColor: #3a3a3a - -! Background / Foreground -URxvt*background: #3a3a3a -URxvt*foreground: #d0d0d0 - -! Other colors -URxvt*color0: #4e4e4e -URxvt*color1: #d68787 -URxvt*color2: #5f865f -URxvt*color3: #d8af5f -URxvt*color4: #85add4 -URxvt*color5: #d7afaf -URxvt*color6: #87afaf -URxvt*color7: #d0d0d0 -URxvt*color8: #626262 -URxvt*color9: #d75f87 -URxvt*color10: #87af87 -URxvt*color11: #ffd787 -URxvt*color12: #add4fb -URxvt*color13: #ffafaf -URxvt*color14: #87d7d7 -URxvt*color15: #e4e4e4 -URxvt*cursorColor: #d0d0d0 -URxvt*cursorColor2: #3a3a3a -URxvt*colorBD: #e4e4e4 diff --git a/Xresources/Xresources.light b/Xresources/Xresources.light deleted file mode 100644 index 993b040..0000000 --- a/Xresources/Xresources.light +++ /dev/null @@ -1,28 +0,0 @@ -# include "/home/urbain/.Xresources/Xresources" - -URxvt.borderColor: #fdf6e3 - -*background: #fdf6e3 -*foreground: #657b83 -*fadeColor: #fdf6e3 -*cursorColor: #586e75 - -*pointerColorBackground: #93a1a1 -*pointerColorForeground: #586e75 - -*color0: #073642 -*color8: #002b36 -*color1: #dc322f -*color9: #cb4b16 -*color2: #859900 -*color10: #586e75 -*color3: #b58900 -*color11: #657b83 -*color4: #268bd2 -*color12: #839496 -*color5: #d33682 -*color13: #6c71c4 -*color6: #2aa198 -*color14: #93a1a1 -*color7: #eee8d5 -*color15: #fdf6e3 diff --git a/bashrc b/bashrc deleted file mode 100644 index 0519eef..0000000 --- a/bashrc +++ /dev/null @@ -1,117 +0,0 @@ -# ~/.bashrc: executed by bash(1) for non-login shells. -# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) -# for examples - -# If not running interactively, don't do anything -case $- in - *i*) ;; - *) return;; -esac - -# don't put duplicate lines or lines starting with space in the history. -# See bash(1) for more options -HISTCONTROL=ignoreboth - -# append to the history file, don't overwrite it -shopt -s histappend - -# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) -HISTSIZE=1000 -HISTFILESIZE=2000 - -# check the window size after each command and, if necessary, -# update the values of LINES and COLUMNS. -shopt -s checkwinsize - -# If set, the pattern "**" used in a pathname expansion context will -# match all files and zero or more directories and subdirectories. -#shopt -s globstar - -# make less more friendly for non-text input files, see lesspipe(1) -[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" - -# set variable identifying the chroot you work in (used in the prompt below) -if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then - debian_chroot=$(cat /etc/debian_chroot) -fi - -# set a fancy prompt (non-color, unless we know we "want" color) -case "$TERM" in - xterm-color) color_prompt=yes;; -esac - -# uncomment for a colored prompt, if the terminal has the capability; turned -# off by default to not distract the user: the focus in a terminal window -# should be on the output of commands, not on the prompt -#force_color_prompt=yes - -if [ -n "$force_color_prompt" ]; then - if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then - # We have color support; assume it's compliant with Ecma-48 - # (ISO/IEC-6429). (Lack of such support is extremely rare, and such - # a case would tend to support setf rather than setaf.) - color_prompt=yes - else - color_prompt= - fi -fi - -if [ "$color_prompt" = yes ]; then - PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' -else - PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' -fi -unset color_prompt force_color_prompt - -# If this is an xterm set the title to user@host:dir -case "$TERM" in -xterm*|rxvt*) - PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" - ;; -*) - ;; -esac - -# enable color support of ls and also add handy aliases -if [ -x /usr/bin/dircolors ]; then - test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" - alias ls='ls --color=auto' - #alias dir='dir --color=auto' - #alias vdir='vdir --color=auto' - - alias grep='grep --color=auto' - alias fgrep='fgrep --color=auto' - alias egrep='egrep --color=auto' -fi - -# some more ls aliases -alias ll='ls -alF' -alias la='ls -A' -alias l='ls -CF' - -# Add an "alert" alias for long running commands. Use like so: -# sleep 10; alert -alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' - -# Alias definitions. -# You may want to put all your additions into a separate file like -# ~/.bash_aliases, instead of adding them here directly. -# See /usr/share/doc/bash-doc/examples in the bash-doc package. - -if [ -f ~/.bash_aliases ]; then - . ~/.bash_aliases -fi - -# enable programmable completion features (you don't need to enable -# this, if it's already enabled in /etc/bash.bashrc and /etc/profile -# sources /etc/bash.bashrc). -if ! shopt -oq posix; then - if [ -f /usr/share/bash-completion/bash_completion ]; then - . /usr/share/bash-completion/bash_completion - elif [ -f /etc/bash_completion ]; then - . /etc/bash_completion - fi -fi - -source ~/github/fzf-marks/fzf-marks.plugin.bash -[ -f ~/.fzf.bash ] && source ~/.fzf.bash diff --git a/config/uzbl/config b/config/uzbl/config deleted file mode 100644 index 7c3614a..0000000 --- a/config/uzbl/config +++ /dev/null @@ -1,496 +0,0 @@ -## Core settings - -# Common directory locations -set prefix = @(echo $PREFIX)@ -set data_home = @(echo $XDG_DATA_HOME)@ -set cache_home = @(echo $XDG_CACHE_HOME)@ -set config_home = @(echo $XDG_CONFIG_HOME)@ - -# Interface paths -set fifo_dir = /tmp -set socket_dir = /tmp - -# Shell command -set shell_cmd = sh -c - -## General config aliases - -# Config related events (use the request function): - -# request MODE_CONFIG = -set mode_config = request MODE_CONFIG - -# request ON_EVENT -set on_event = request ON_EVENT - -# request ON_SET -set on_set = request ON_SET - -# request MODMAP -set modmap = request MODMAP - -# request IGNORE_KEY -set ignore_key = request IGNORE_KEY - -# request TOGGLE_MODES ... -set toggle_modes = request TOGGLE_MODES - -set set_mode = set mode = -set set_status = set status_message = - -# Spawn path shortcuts. In spawn the first dir+path match is used in "dir1:dir2:dir3:executable" -set scripts_dir = @data_home/uzbl:@prefix/share/uzbl/examples/data:scripts - -## Hardcoded handlers - -# These handlers can't be moved to the new event system yet as we don't -# support events that can wait for a response from a script. -set scheme_handler = sync_spawn @scripts_dir/scheme.py -#set request_handler = sync_spawn @scripts_dir/request.py -set authentication_handler = sync_spawn @scripts_dir/auth.py -set download_handler = sync_spawn @scripts_dir/download.sh - -## Dynamic event handlers - -# What to do when a website wants to open a new window: - -# Open link in new window -@on_event NEW_WINDOW sh 'uzbl-browser ${1:+-u "$1"}' %r -# Open in current window (also see the REQ_NEW_WINDOW event handler below) -#@on_event NEW_WINDOW uri %s -# Open in new tab. Other options are NEW_TAB_NEXT, NEW_BG_TAB and NEW_BG_TAB_NEXT. -#@on_event NEW_WINDOW event NEW_TAB %s - -# What to do when the user requests a new window: -# If your the NEW_WINDOW handler opens the uri in the current window, you'll -# probably want to change this handler to open a new window or tab. -@on_event REQ_NEW_WINDOW event NEW_WINDOW %s - -# Load start handler -@on_event LOAD_START @set_status wait -# Reset the keycmd on navigation -@on_event LOAD_START @set_mode - -# Load commit handlers -@on_event LOAD_COMMIT @set_status recv - - # add some javascript to the page for other 'js' and 'script' commands to access later. -@on_event LOAD_COMMIT js uzbl = {}; -@on_event LOAD_COMMIT script @scripts_dir/formfiller.js -@on_event LOAD_COMMIT script @scripts_dir/follow.js - -# Userscripts/per-site-settings. See the script and the example configuration for details -#@on_event LOAD_COMMIT spawn @scripts_dir/per-site-settings.py @data_home/uzbl/per-site-settings - -# Load finish handlers -@on_event LOAD_FINISH @set_status done -@on_event LOAD_FINISH spawn @scripts_dir/history.sh - -# Switch to insert mode if a (editable) html form is clicked -@on_event FOCUS_ELEMENT sh 'if [ "$1" = INPUT -o "$1" = TEXTAREA -o "$1" = SELECT ]; then echo "@set_mode insert" > $UZBL_FIFO; fi' %s -# Switch to command mode if anything else is clicked -@on_event ROOT_ACTIVE @set_mode command - -# Example CONFIG_CHANGED event handler -#@on_event CONFIG_CHANGED print Config changed: %1 = %2 - -# Scroll percentage calculation -@on_event SCROLL_VERT set scroll_message = \@<(function(curr, min, max, size){if(max == size) return '--'; var p=(curr/(max - size)); return Math.round(10000*p)/100;})(%1,%2,%3,%4)>\@% - -## Behaviour and appearance - -# Custom CSS can be defined here, including link follower hint styles -set stylesheet_uri = file://@config_home/uzbl/style.css - -set show_status = 1 -set status_top = 0 -set status_background = #303030 - -set modcmd_style = weight="bold" foreground="red" -set keycmd_style = weight="light" foreground="red" -set prompt_style = foreground="grey" -set cursor_style = underline="single" -set completion_style = foreground="green" -set hint_style = weight="bold" - -set mode_section = [\@[\@mode_indicator]\@] -set keycmd_section = [\@[\@keycmd_prompt]\@\@modcmd\@keycmd\@completion_list] -set progress_section = \@[\@progress.output]\@ -set scroll_section = \@[\@scroll_message]\@ -set uri_section = \@[\@uri]\@ -set name_section = \@[\@NAME]\@ -set status_section = \@status_message -set selected_section = \@[\@SELECTED_URI]\@ - -set download_section = \@downloads - -set status_format = @mode_section @keycmd_section @progress_section @name_section @status_section @scroll_section @selected_section @download_section -set status_format_right = uri: @uri_section - -set title_format_long = \@keycmd_prompt \@raw_modcmd \@raw_keycmd \@TITLE - Uzbl browser <\@NAME> \@SELECTED_URI - -# Progress bar config -# %d = done, %p = pending %c = percent done, %i = int done, %s = spinner, -# %t = percent pending, %o = int pending, %r = sprite scroll -set progress.width = 8 -set progress.format = [%d>%p]%c -set progress.done = = -set progress.pending = - -## Useragent setup - -set useragent = Uzbl (Webkit @{WEBKIT_MAJOR}.@{WEBKIT_MINOR}) (@(+uname -sm)@ [@ARCH_UZBL]) - -## Configure cookie blacklist - -# Accept 'session cookies' from uzbl.org (when you have a whitelist all other cookies are dropped) -#request WHITELIST_COOKIE domain 'uzbl.org$' expires '^$' - -# Drop google analytics tracking cookies (applied after whitelists if any) -#request BLACKLIST_COOKIE name '^__utm.$' - -## SSL related configuration - -# Set it to certificates store of your distribution, or your own CAfile. -set ssl_ca_file = /etc/ssl/certs/ca-certificates.crt -set ssl_verify = 1 -# Command to toggle ssl_verify value: -@cbind !ssl = chain 'toggle ssl_verify' 'reload' -# Example SSL error handler: -@on_event LOAD_ERROR js var patt=new RegExp('SSL handshake failed'); if (patt.test('%3')) {alert ('%3');} - -## Key binding configuration -# --- Internal modmapping and ignoring --------------------------------------- - -#modmap -@modmap -@modmap -@modmap -@modmap - -#ignore_key -@ignore_key -@ignore_key -@ignore_key -@ignore_key - -# --- Bind aliases ----------------------------------------------------------- - -# request BIND = -set bind = request MODE_BIND global - -# request MODE_BIND = -set mode_bind = request MODE_BIND - -# Insert mode binding alias -set ibind = @mode_bind insert - -# Command mode binding alias -set cbind = @mode_bind command - -# Non-insert mode bindings alias (ebind for edit-bind). -set ebind = @mode_bind global,-insert - -# --- Global & keycmd editing binds ------------------------------------------ - -# Resets keycmd and returns to default mode. -@on_event ESCAPE @set_mode -@on_event ESCAPE event KEYCMD_CLEAR -@on_event ESCAPE js uzbl.follow.clearHints() -@on_event ESCAPE search_clear -@on_event ESCAPE js window.getSelection().removeAllRanges() -@bind = event ESCAPE -@bind [ = event ESCAPE - -# Commands for editing and traversing the keycmd. -@ebind = event KEYCMD_EXEC_CURRENT -@ebind = event SET_CURSOR_POS 0 -@ebind = event SET_CURSOR_POS -1 -@ebind = event SET_CURSOR_POS - -@ebind = event SET_CURSOR_POS + -@ebind = event KEYCMD_BACKSPACE -@ebind = event KEYCMD_DELETE -@ebind = event START_COMPLETION -# Readline-ish bindings. -@ebind w = event KEYCMD_STRIP_WORD \ -./&?= -@ebind u = event SET_KEYCMD -@ebind a = event SET_CURSOR_POS 0 -@ebind e = event SET_CURSOR_POS -1 - -@ebind = event HISTORY_PREV -@ebind = event HISTORY_NEXT -@ebind r_ = event HISTORY_SEARCH %s -# Keycmd injection/append examples. -#@ebind su = event INJECT_KEYCMD \@uri -#@ebind st = event INJECT_KEYCMD \@title -#@ebind du = event APPEND_KEYCMD \@uri -#@ebind dt = event APPEND_KEYCMD \@title - -# --- Mouse bindings --------------------------------------------------------- - -# Middle click open in new window -@bind = sh 'if [ "$1" ]; then echo "event REQ_NEW_WINDOW $1" > "$UZBL_FIFO"; else echo "uri $(xclip -o | sed s/\\\@/%40/g)" > "$UZBL_FIFO"; fi' '\@SELECTED_URI' - -# --- Keyboard bindings ------------------------------------------------------ - -# With this command you can enter in any command at runtime when prefixed with -# a colon. -@cbind ,_ = %s - -# open a new window or a new tab (see the on_event NEW_WINDOW settings above) -@cbind w = event REQ_NEW_WINDOW - -# Page movement binds -@cbind j = scroll vertical 20 -@cbind k = scroll vertical -20 -@cbind h = scroll horizontal -20 -@cbind l = scroll horizontal 20 -@cbind e = scroll vertical 40 -@cbind y = scroll vertical -40 -@cbind f = scroll vertical 100% -@cbind b = scroll vertical -100% -@cbind gg = scroll vertical begin -@cbind G = scroll vertical end -@cbind ^ = scroll horizontal begin -@cbind $ = scroll horizontal end -@cbind = scroll vertical end -@cbind g_ = scroll vertical %r! - -# Navigation binds -@cbind H = back -@cbind L = forward -@cbind S = stop -@cbind r = reload -@cbind R = reload_ign_cache - -# Zoom binds -@cbind + = zoom_in -@cbind - = zoom_out -@cbind T = toggle zoom_type -@cbind 1 = set zoom_level = 1.0 -@cbind 2 = set zoom_level = 2.0 - -# Appearance binds -@cbind s = toggle show_status - -# Page searching binds -@cbind /* = search %s -@cbind ?* = search_reverse %s - -# Jump to next and previous items -@cbind n = search -@cbind N = search_reverse - -# Print pages to a printer -@cbind p = hardcopy - -# Web searching binds -@cbind l_ = uri http://www.google.co.uk/search?q=\@\@ -@cbind ddg_ = uri http://duckduckgo.com/?q=%s -@cbind \\awiki_ = uri http://wiki.archlinux.org/index.php/Special:Search?search=\@\@&go=Go -@cbind \\wiki_ = uri http://en.wikipedia.org/w/index.php?title=Special:Search&search=\@\@&go=Go - -# Handy binds -@cbind s__ = set %1 = %2 -@cbind ZZ = exit - -# Dump config to stdout -@cbind !dump = sh 'echo dump_config > "$UZBL_FIFO"' - -# Reload all variables in the config -@cbind !reload = sh "sed '/^# === Post-load misc commands/,$d' \"$UZBL_CONFIG\" | grep '^set ' > \"$UZBL_FIFO\"" - -# Uri opening prompts -@cbind o_ = uri %s - -# Or have it load the current uri into the keycmd for editing -@cbind O_ = uri %s - -# Mode setting binds -@cbind i = @set_mode insert - -# Hard-bound bookmarks -@cbind gh = uri http://www.google.co.uk - -# New window binds -@cbind t = event REQ_NEW_WINDOW - -# SSL-ify bindings -@cbind zs = uri \@(echo "$UZBL_URI" | sed -e 's/^http:/https:/')\@ -@cbind zS = event REQ_NEW_WINDOW \@(echo "$UZBL_URI" | sed -e 's/^http:/https:/')\@ - -# Yanking & pasting binds -@cbind yu = sh 'echo -n "$UZBL_URI" | xclip' -@cbind yU = sh 'echo -n "$1" | xclip' '\@SELECTED_URI' -@cbind yy = sh 'echo -n "$UZBL_TITLE" | xclip' -@cbind ys = spawn @scripts_dir/follow.sh \@< uzbl.follow.followSelection('returnuri') >\@ clipboard - -# Clone current window -@cbind c = event REQ_NEW_WINDOW \@uri - -# Go the page from primary selection -@cbind p = sh 'echo "uri $(xclip -o | sed s/\\\@/%40/g)" > "$UZBL_FIFO"' - -# Go to the page in clipboard -@cbind P = sh 'echo "uri $(xclip -selection clipboard -o | sed s/\\\@/%40/g)" > "$UZBL_FIFO"' - -# Start a new uzbl instance from the page in primary selection -@cbind 'p = sh 'echo "event REQ_NEW_WINDOW $(xclip -o)" > "$UZBL_FIFO"' - -# paste primary selection into keycmd at the cursor position -@bind = sh 'echo "event INJECT_KEYCMD $(xclip -o | sed s/\\\@/%40/g)" > "$UZBL_FIFO"' - -# Bookmark inserting binds -@cbind m_ = sh 'echo "$UZBL_URI $1" >> "$XDG_DATA_HOME"/uzbl/bookmarks' '%s' - -# Or use a script to insert a bookmark. -@cbind M = spawn @scripts_dir/insert_bookmark.sh - -# Bookmark/history loading -@cbind U = spawn @scripts_dir/load_url_from_history.sh -@cbind u = spawn @scripts_dir/load_url_from_bookmarks.sh - -# Temporary bookmarks -@cbind d = spawn @scripts_dir/insert_temp.sh -@cbind D = spawn @scripts_dir/load_url_from_temps.sh - -set follow_hint_keys = uhetonasidpgcr -@cbind f* = spawn @scripts_dir/follow.sh \@< uzbl.follow("\@follow_hint_keys", "%s", 'click') >\@ -@cbind F* = spawn @scripts_dir/follow.sh \@< uzbl.follow("\@follow_hint_keys", "%s", 'newwindow') >\@ -@cbind fL* = spawn @scripts_dir/follow.sh \@< uzbl.follow("\@follow_hint_keys", "%s", 'returnuri') >\@ set -@cbind FL* = spawn @scripts_dir/follow.sh \@< uzbl.follow("\@follow_hint_keys", "%s", 'returnuri') >\@ clipboard -@cbind fi = spawn @scripts_dir/go_input.sh - -@cbind fs = spawn @scripts_dir/follow.sh \@< uzbl.follow.followSelection('returnuri') >\@ set -@cbind fS = spawn @scripts_dir/follow.sh \@< uzbl.follow.followSelection('click') >\@ -@cbind Fs = spawn @scripts_dir/follow.sh \@< uzbl.follow.followSelection('newwindow') >\@ -@cbind FS = spawn @scripts_dir/follow.sh \@< uzbl.follow.followSelection('returnuri') >\@ clipboard - -@cbind ft* = spawn @scripts_dir/follow.sh \@< uzbl.follow.followTextContent("%s", 'returnuri') >\@ set -@cbind fT* = spawn @scripts_dir/follow.sh \@< uzbl.follow.followTextContent("%s", 'click') >\@ -@cbind Ft* = spawn @scripts_dir/follow.sh \@< uzbl.follow.followTextContent("%s", 'newwindow') >\@ -@cbind FT* = spawn @scripts_dir/follow.sh \@< uzbl.follow.followTextContent("%s", 'returnuri') >\@ clipboard - -@cbind '* = spawn @scripts_dir/follow.sh \@< uzbl.follow.followTextContent("%s", 'click') >\@ - -# Form filler binds -# This script allows you to configure (per domain) values to fill in form -# fields (eg login information) and to fill in these values automatically. -# This implementation allows you to save multiple profiles for each form -# (think about multiple accounts on some website). -set formfiller = spawn @scripts_dir/formfiller.sh -@cbind ze = @formfiller edit -@cbind zn = @formfiller new -@cbind zl = @formfiller load -@cbind zo = @formfiller once - -## Uzbl tabbed binds - -# Tab opening -@cbind gn = event NEW_TAB -@cbind gN = event NEW_TAB_NEXT -@cbind go_ = event NEW_TAB %s -@cbind gO_ = event NEW_TAB_NEXT %s - -# Closing / resting -@cbind gC = exit -@cbind gQ = event CLEAN_TABS - -# Tab navigating -@cbind g< = event FIRST_TAB -@cbind g> = event LAST_TAB -@cbind gt = event NEXT_TAB -@cbind gT = event PREV_TAB -@cbind gi_ = event GOTO_TAB %s - -# Preset loading -set preset = event PRESET_TABS -@cbind gs_ = @preset save %s -@cbind glo_ = @preset load %s -@cbind gd_ = @preset del %s -# This doesn't work right now. -#@cbind gli = @preset list - -## Context menu items - -# Default context menu -menu_add Google = set uri = http://google.co.uk -menu_add Go Home = set uri = http://uzbl.org -menu_separator separator_1 -menu_add Quit uzbl = exit - -# Link context menu -menu_link_add Print Link = print \@SELECTED_URI - -# === Mode configuration ===================================================== - -# Define some mode specific uzbl configurations. -set command = @mode_config command -set insert = @mode_config insert -set stack = @mode_config stack - -# Command mode config. -@command keycmd_style = foreground="red" -@command status_background = #202020 -@command mode_indicator = Cmd -@command keycmd_events = 1 -@command forward_keys = 0 -@command modcmd_updates = 1 - -# Insert mode config. -@insert status_background = #303030 -@insert mode_indicator = Ins -@insert forward_keys = 1 -@insert keycmd_events = 0 -@insert modcmd_updates = 0 - -# Multi-stage-binding mode config. -@stack keycmd_style = foreground="red" -@stack status_background = #202020 -@stack mode_indicator = Bnd -@stack prompt_style = foreground="#888" weight="light" -@stack keycmd_events = 1 -@stack modcmd_updates = 1 -@stack forward_keys = 0 - -set default_mode = command - -## Post-load misc commands -sync_spawn_exec @scripts_dir/load_cookies.sh -sync_spawn_exec @scripts_dir/load_cookies.sh @data_home/uzbl/session-cookies.txt - -# Set the "home" page. -set uri = uzbl.org/doesitwork/@COMMIT - -# Custom configuration -bind \sr_ = sh 'echo "set uri = $(surfraw -print %s)" > $4' -bind \gg_ = sh 'echo "set uri = $(surfraw -print $8 %s)" > $4' google -bind \google_ = sh 'echo "set uri = $(surfraw -print $8 %s)" > $4' google -bind \glucky_ = sh 'echo "set uri = $(surfraw -print $8 -l %s)" > $4' google -bind \gi_ = sh 'echo "set uri = $(surfraw -print $8 -search=$9 %s)" > $4' google images -bind \gimage_ = sh 'echo "set uri = $(surfraw -print $8 -search=$9 %s)" > $4' google images -bind \glinux_ = sh 'echo "set uri = $(surfraw -print $8 -search=$9 %s)" > $4' google linux -bind \gbsd_ = sh 'echo "set uri = $(surfraw -print $8 -search=$9 %s)" > $4' google bsd -bind \gusa_ = sh 'echo "set uri = $(surfraw -print $8 -search=$9 %s)" > $4' google unclesam -bind \wiki_ = sh 'echo "set uri = $(surfraw -print $8 %s)" > $4' wikipedia -bind \imdb_ = sh 'echo "set uri = $(surfraw -print $8 %s)" > $4' imdb -bind \aur_ = sh 'echo "set uri = $(surfraw -print $8 %s)" > $4' aur -bind \freshmeat_ = sh 'echo "set uri = $(surfraw -print $8 %s)" > $4' freshmeat -bind \weather_ = sh 'echo "set uri = $(surfraw -print $8 %s)" > $4' weather - -bind 'sr _ = sh 'surfraw -g %s' -bind 'gg _ = sh 'surfraw -g $8 %s' google -bind 'google _ = sh 'surfraw -g $8 %s' google -bind 'glucky _ = sh 'surfraw -g $8 -l %s' google -bind 'gi _ = sh 'surfraw -g $8 -search=$9 %s' google images -bind 'gimage _ = sh 'surfraw -g $8 -search=$9 %s' google images -bind 'glinux _ = sh 'surfraw -g $8 -search=$9 %s' google linux -bind 'gbsd _ = sh 'surfraw -g $8 -search=$9 %s' google bsd -bind 'gusa _ = sh 'surfraw -g $8 -search=$9 %s' google unclesam -bind 'wiki _ = sh 'surfraw -g $8 %s' wikipedia -bind 'imdb _ = sh 'surfraw -g $8 %s' imdb -bind 'aur _ = sh 'surfraw -g $8 %s' aur -bind 'freshmeat _ = sh 'surfraw -g $8 %s' freshmeat -bind 'weather _ = sh 'surfraw -g $8 %s' weather - -# vim: set fdm=syntax: diff --git a/config/uzbl/style.css b/config/uzbl/style.css deleted file mode 100644 index a5fe457..0000000 --- a/config/uzbl/style.css +++ /dev/null @@ -1,35 +0,0 @@ -#uzbl_link_hints > span { - z-index: 1000 !important; - - background-color: #FFFF00 !important; - margin: 0 !important; - padding: 3px !important; - - color: #000 !important; - font-size: 12px !important; - line-height: 12px !important; - font-weight: bold !important; - font-variant: normal !important; - text-decoration: none !important; - text-transform: uppercase; - - -webkit-transform: translate(-3px,-1px); - opacity: 0.8; - -webkit-border-radius: 6px !important; - /* Play around with this, pretty fun things to do :) */ - /* -webkit-transform: scale(1) rotate(0deg) translate(-6px,-5px) !important; */ -} - -/* we can have different colours for different types of hints! */ -#uzbl_link_hints.new-window > span { - background-color: #ffff00 !important; - color: black !important; -} - -.uzbl-follow-text-match { - outline: 2px solid invert; - background: #333 !important; - color: white !important; -} - -/* vim:set et ts=4: */ diff --git a/crontab b/crontab deleted file mode 100644 index 8e35777..0000000 --- a/crontab +++ /dev/null @@ -1 +0,0 @@ -*/5 * * * * sh ~/.xmodmap diff --git a/ctags b/ctags deleted file mode 100644 index 0c334fb..0000000 --- a/ctags +++ /dev/null @@ -1,9 +0,0 @@ ---langdef=latex ---langmap=latex:.tex ---regex-latex=/\\label\{([^}]*)\}/\1/l,label/ ---regex-latex=/\\section\{([^}]*)\}/\1/s,section/ ---regex-latex=/\\subsection\{([^}]*)\}/\1/t,subsection/ ---regex-latex=/\\subsubsection\{([^}]*)\}/\1/u,subsubsection/ ---regex-latex=/\\section\*\{([^}]*)\}/\1/s,section/ ---regex-latex=/\\subsection\*\{([^}]*)\}/\1/t,subsection/ ---regex-latex=/\\subsubsection\*\{([^}]*)\}/\1/u,subsubsection/ diff --git a/git_template/hooks/ctags b/git_template/hooks/ctags deleted file mode 100755 index a9a2150..0000000 --- a/git_template/hooks/ctags +++ /dev/null @@ -1,8 +0,0 @@ -#!/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 -L - -f"$dir/$$.tags" --languages=-javascript,sql -mv "$dir/$$.tags" "$dir/tags" - diff --git a/git_template/hooks/post-checkout b/git_template/hooks/post-checkout deleted file mode 100755 index 84f17ed..0000000 --- a/git_template/hooks/post-checkout +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -.git/hooks/ctags >/dev/null 2>&1 & diff --git a/git_template/hooks/post-commit b/git_template/hooks/post-commit deleted file mode 100755 index 84f17ed..0000000 --- a/git_template/hooks/post-commit +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -.git/hooks/ctags >/dev/null 2>&1 & diff --git a/git_template/hooks/post-merge b/git_template/hooks/post-merge deleted file mode 100755 index 84f17ed..0000000 --- a/git_template/hooks/post-merge +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -.git/hooks/ctags >/dev/null 2>&1 & diff --git a/git_template/hooks/post-rewrite b/git_template/hooks/post-rewrite deleted file mode 100755 index fe8972d..0000000 --- a/git_template/hooks/post-rewrite +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -case "$1" in - rebase) exec .git/hooks/post-merge ;; -esac diff --git a/gitconfig b/gitconfig deleted file mode 100644 index 5afe4c8..0000000 --- a/gitconfig +++ /dev/null @@ -1,15 +0,0 @@ -[user] - name = Urbain Vaes - email = u.vaes13@imperial.ac.uk -[init] - templatedir = ~/.git_template -[alias] - ctags = !.git/hooks/ctags -[push] - default = simple -[status] - submodulesummary = 1 -[alias] - sdiff = !git diff && git submodule foreach 'git diff' - spush = push --recurse-submodules=on-demand - supdate = submodule update --remote --merge diff --git a/i3/config b/i3/config deleted file mode 100644 index e8b0ff0..0000000 --- a/i3/config +++ /dev/null @@ -1,201 +0,0 @@ -set $w1 1|www -set $w2 2|mail -set $w3 3|latex -set $w4 4|code -set $w5 5|work -set $w6 6|fun -set $w7 7|fun -set $w8 8|work -set $w9 9|todo -set $w10 10|conf - -# This file has been auto-generated by i3-config-wizard(1). -# It will not be overwritten, so edit it as you like. -# -# Should you change your keyboard layout some time, delete -# this file and re-run i3-config-wizard(1). -# - -# i3 config file (v4) -# -# Please see http://i3wm.org/docs/userguide.html for a complete reference! - -set $mod Mod1 - -# Font for window titles. Will also be used by the bar unless a different font -# 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 8 -# 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 -# clear in small sizes. However, its unicode glyph coverage is limited, the old -# X core fonts rendering does not support right-to-left and this being a bitmap -# font, it doesn’t scale on retina/hidpi displays. - -# Use Mouse+$mod to drag floating windows to their wanted position -floating_modifier $mod - -# start a terminal -bindsym $mod+Return exec i3-sensible-terminal - -# kill focused window -bindsym $mod+d kill - -# start dmenu (a program launcher) -bindsym $mod+p exec dmenu_run -# There also is the (new) i3-dmenu-desktop which only displays applications -# shipping a .desktop file. It is a wrapper around dmenu, so you need that -# installed. -# bindsym $mod+p exec --no-startup-id i3-dmenu-desktop - -# change focus -bindsym $mod+h focus left -bindsym $mod+j focus down -bindsym $mod+k focus up -bindsym $mod+l focus right - -# alternatively, you can use the cursor keys: -bindsym $mod+Left focus left -bindsym $mod+Down focus down -bindsym $mod+Up focus up -bindsym $mod+Right focus right - -# move focused window -bindsym $mod+Shift+h move left -bindsym $mod+Shift+j move down -bindsym $mod+Shift+k move up -bindsym $mod+Shift+l move right - -# alternatively, you can use the cursor keys: -bindsym $mod+Shift+Left move left -bindsym $mod+Shift+Down move down -bindsym $mod+Shift+Up move up -bindsym $mod+Shift+Right move right - -# split in horizontal orientation -bindsym $mod+v split h - -# split in vertical orientation -bindsym $mod+w split v - -# enter fullscreen mode for the focused container -bindsym $mod+f fullscreen - -# change container layout (stacked, tabbed, toggle split) -bindsym $mod+g layout stacking -bindsym $mod+t layout tabbed -bindsym $mod+s layout toggle split - -# toggle tiling / floating -bindsym $mod+Shift+space floating toggle - -# change focus between tiling / floating windows -bindsym $mod+space focus mode_toggle - -# focus the parent container -bindsym $mod+a focus parent - -# focus the child container -bindsym $mod+c focus child - -# move the currently focused window to the scratchpad -bindsym $mod+Shift+minus move scratchpad - -# Show the next scratchpad window or hide the focused scratchpad window. -# If there are multiple scratchpad windows, this command cycles through them. -bindsym $mod+minus scratchpad show - -# switch to workspace -bindsym $mod+ampersand workspace $w1 -bindsym $mod+bracketleft workspace $w2 -bindsym $mod+braceleft workspace $w3 -bindsym $mod+braceright workspace $w4 -bindsym $mod+parenleft workspace $w5 -bindsym $mod+equal workspace $w6 -bindsym $mod+asterisk workspace $w7 -bindsym $mod+parenright workspace $w8 -bindsym $mod+plus workspace $w9 -bindsym $mod+bracketright workspace $w10 - -# move focused container to workspace -bindsym $mod+Shift+ampersand move container to workspace $w1 -bindsym $mod+Shift+bracketleft move container to workspace $w2 -bindsym $mod+Shift+braceleft move container to workspace $w3 -bindsym $mod+Shift+braceright move container to workspace $w4 -bindsym $mod+Shift+1 move container to workspace $w5 -bindsym $mod+Shift+equal move container to workspace $w6 -bindsym $mod+Shift+asterisk move container to workspace $w7 -bindsym $mod+Shift+2 move container to workspace $w8 -bindsym $mod+Shift+plus move container to workspace $w9 -bindsym $mod+Shift+bracketright move container to workspace $w10 - -# reload the configuration file -bindsym $mod+Shift+c reload -# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) -bindsym $mod+Shift+r restart -# exit i3 (logs you out of your X session) -bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'" - -# resize window (you can also use the mouse for that) -mode "resize" { - # These bindings trigger as soon as you enter the resize mode - - # Pressing left will shrink the window’s width. - # Pressing right will grow the window’s width. - # Pressing up will shrink the window’s height. - # Pressing down will grow the window’s height. - bindsym h resize shrink width 10 px or 10 ppt - bindsym j resize grow height 10 px or 10 ppt - bindsym k resize shrink height 10 px or 10 ppt - bindsym l resize grow width 10 px or 10 ppt - - # same bindings, but for the arrow keys - bindsym Left resize shrink width 10 px or 10 ppt - bindsym Down resize grow height 10 px or 10 ppt - bindsym Up resize shrink height 10 px or 10 ppt - bindsym Right resize grow width 10 px or 10 ppt - - # back to normal: Enter or Escape - bindsym Return mode "default" - bindsym Escape mode "default" -} - -bindsym $mod+r mode "resize" - -# Start i3bar to display a workspace bar (plus the system information i3status -# finds out, if available) -bar { - status_command i3status -} - -# Workspaces -bindsym $mod+Tab workspace back_and_forth -bindsym $mod+comma workspace prev -bindsym $mod+period workspace next - -# Programs shortcuts -bindsym $mod+b exec uzbl-browser -bindsym $mod+at exec chromium-browser - -# Configuration -bindsym F1 exec $HOME/.xinitrc - -# Font -# font xft:Droid Sans Mono 10 - -# Init script -exec $HOME/.xinitrc - -# Media control -exec --no-startup-id gnome-settings-daemon - -# Pulse Audio controls -bindsym XF86AudioRaiseVolume exec amixer -D pulse sset Master 5%+ -bindsym XF86AudioLowerVolume exec amixer -D pulse sset Master 5%- -bindsym XF86AudioMute exec amixer -D pulse sset Master 0% - -# Sreen brightness controls -bindsym XF86MonBrightnessUp exec xbacklight -inc 10 -bindsym XF86MonBrightnessDown exec xbacklight -dec 10 diff --git a/i3/config.bak b/i3/config.bak deleted file mode 100644 index 0d02a52..0000000 --- a/i3/config.bak +++ /dev/null @@ -1,156 +0,0 @@ -# This file has been auto-generated by i3-config-wizard(1). -# It will not be overwritten, so edit it as you like. -# -# Should you change your keyboard layout some time, delete -# this file and re-run i3-config-wizard(1). -# - -# i3 config file (v4) -# -# Please see http://i3wm.org/docs/userguide.html for a complete reference! - -set $mod Mod1 - -# Font for window titles. Will also be used by the bar unless a different font -# 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 8 -# 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 -# clear in small sizes. However, its unicode glyph coverage is limited, the old -# X core fonts rendering does not support right-to-left and this being a bitmap -# font, it doesn’t scale on retina/hidpi displays. - -# Use Mouse+$mod to drag floating windows to their wanted position -floating_modifier $mod - -# start a terminal -bindsym $mod+Return exec i3-sensible-terminal - -# kill focused window -bindsym $mod+Shift+Q kill - -# start dmenu (a program launcher) -bindsym $mod+d exec dmenu_run -# There also is the (new) i3-dmenu-desktop which only displays applications -# shipping a .desktop file. It is a wrapper around dmenu, so you need that -# installed. -# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop - -# change focus -bindsym $mod+h focus left -bindsym $mod+t focus down -bindsym $mod+n focus up -bindsym $mod+s focus right - -# alternatively, you can use the cursor keys: -bindsym $mod+Left focus left -bindsym $mod+Down focus down -bindsym $mod+Up focus up -bindsym $mod+Right focus right - -# move focused window -bindsym $mod+Shift+H move left -bindsym $mod+Shift+T move down -bindsym $mod+Shift+N move up -bindsym $mod+Shift+S move right - -# alternatively, you can use the cursor keys: -bindsym $mod+Shift+Left move left -bindsym $mod+Shift+Down move down -bindsym $mod+Shift+Up move up -bindsym $mod+Shift+Right move right - -# split in horizontal orientation -# bindsym $mod+n split h - -# split in vertical orientation -bindsym $mod+v split v - -# enter fullscreen mode for the focused container -bindsym $mod+f fullscreen - -# change container layout (stacked, tabbed, toggle split) -bindsym $mod+r layout stacking -bindsym $mod+w layout tabbed -bindsym $mod+g layout toggle split - -# toggle tiling / floating -bindsym $mod+Shift+space floating toggle - -# change focus between tiling / floating windows -bindsym $mod+space focus mode_toggle - -# focus the parent container -bindsym $mod+a focus parent - -# focus the child container -#bindsym $mod+d focus child - -# switch to workspace -bindsym $mod+1 workspace 1 -bindsym $mod+2 workspace 2 -bindsym $mod+3 workspace 3 -bindsym $mod+4 workspace 4 -bindsym $mod+5 workspace 5 -bindsym $mod+6 workspace 6 -bindsym $mod+7 workspace 7 -bindsym $mod+8 workspace 8 -bindsym $mod+9 workspace 9 -bindsym $mod+0 workspace 10 - -# move focused container to workspace -bindsym $mod+Shift+exclam move container to workspace 1 -bindsym $mod+Shift+at move container to workspace 2 -bindsym $mod+Shift+numbersign move container to workspace 3 -bindsym $mod+Shift+dollar move container to workspace 4 -bindsym $mod+Shift+percent move container to workspace 5 -bindsym $mod+Shift+asciicircum move container to workspace 6 -bindsym $mod+Shift+ampersand move container to workspace 7 -bindsym $mod+Shift+asterisk move container to workspace 8 -bindsym $mod+Shift+parenleft move container to workspace 9 -bindsym $mod+Shift+parenright move container to workspace 10 - -# reload the configuration file -bindsym $mod+Shift+C reload -# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) -bindsym $mod+Shift+R restart -# exit i3 (logs you out of your X session) -bindsym $mod+Shift+E exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'" - -# resize window (you can also use the mouse for that) -mode "resize" { - # These bindings trigger as soon as you enter the resize mode - - # Pressing left will shrink the window’s width. - # Pressing right will grow the window’s width. - # Pressing up will shrink the window’s height. - # Pressing down will grow the window’s height. - bindsym j resize shrink width 10 px or 10 ppt - bindsym k resize grow height 10 px or 10 ppt - bindsym l resize shrink height 10 px or 10 ppt - bindsym semicolon resize grow width 10 px or 10 ppt - - # same bindings, but for the arrow keys - bindsym Left resize shrink width 10 px or 10 ppt - bindsym Down resize grow height 10 px or 10 ppt - bindsym Up resize shrink height 10 px or 10 ppt - bindsym Right resize grow width 10 px or 10 ppt - - # back to normal: Enter or Escape - bindsym Return mode "default" - bindsym Escape mode "default" -} - -# bindsym $mod+r mode "resize" -bindsym $mod+m exec /home/urbain/.i3/winmenu.py - -# Start i3bar to display a workspace bar (plus the system information i3status -# finds out, if available) -bar { - status_command i3status -} - -exec_always i3-init diff --git a/i3/config.working b/i3/config.working deleted file mode 100644 index 5f657a6..0000000 --- a/i3/config.working +++ /dev/null @@ -1,176 +0,0 @@ -# i3 config file (v4) -# -# Please see http://i3wm.org/docs/userguide.html for a complete reference! -# -# This config file uses keycodes (bindsym) and was written for the QWERTY -# layout. -# -# To get a config file with the same key positions, but for your current -# layout, use the i3-config-wizard -# - -# Font for window titles. Will also be used by the bar unless a different font -# 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 8 -# 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 -# clear in small sizes. However, its unicode glyph coverage is limited, the old -# X core fonts rendering does not support right-to-left and this being a bitmap -# font, it doesn’t scale on retina/hidpi displays. - -# use these keys for focus, movement, and resize directions when reaching for -# the arrows is not convenient -set $up l -set $down k -set $left j -set $right semicolon - -# use Mouse+Mod1 to drag floating windows to their wanted position -floating_modifier Mod1 - -# start a terminal -bindsym Mod1+Return exec i3-sensible-terminal - -# kill focused window -bindsym Mod1+Shift+q kill - -# start dmenu (a program launcher) -# bindsym Mod1+d exec dmenu_run -# There also is the (new) i3-dmenu-desktop which only displays applications -# shipping a .desktop file. It is a wrapper around dmenu, so you need that -# installed. -bindsym Mod1+d exec --no-startup-id i3-dmenu-desktop - -# change focus -bindsym Mod1+$left focus left -bindsym Mod1+$down focus down -bindsym Mod1+$up focus up -bindsym Mod1+$right focus right - -# alternatively, you can use the cursor keys: -bindsym Mod1+Left focus left -bindsym Mod1+Down focus down -bindsym Mod1+Up focus up -bindsym Mod1+Right focus right - -# move focused window -bindsym Mod1+Shift+$left move left -bindsym Mod1+Shift+$down move down -bindsym Mod1+Shift+$up move up -bindsym Mod1+Shift+$right move right - -# alternatively, you can use the cursor keys: -bindsym Mod1+Shift+Left move left -bindsym Mod1+Shift+Down move down -bindsym Mod1+Shift+Up move up -bindsym Mod1+Shift+Right move right - -# split in horizontal orientation -bindsym Mod1+h split h - -# split in vertical orientation -bindsym Mod1+v split v - -# enter fullscreen mode for the focused container -bindsym Mod1+f fullscreen - -# change container layout (stacked, tabbed, toggle split) -bindsym Mod1+s layout stacking -bindsym Mod1+w layout tabbed -bindsym Mod1+e layout toggle split - -# toggle tiling / floating -bindsym Mod1+Shift+space floating toggle - -# change focus between tiling / floating windows -bindsym Mod1+space focus mode_toggle - -# focus the parent container -bindsym Mod1+a focus parent - -# focus the child container -#bindsym Mod1+d focus child - -# move the currently focused window to the scratchpad -bindsym Mod1+Shift+minus move scratchpad - -# Show the next scratchpad window or hide the focused scratchpad window. -# If there are multiple scratchpad windows, this command cycles through them. -bindsym Mod1+minus scratchpad show - -# switch to workspace -bindsym Mod1+1 workspace 1 -bindsym Mod1+2 workspace 2 -bindsym Mod1+3 workspace 3 -bindsym Mod1+4 workspace 4 -bindsym Mod1+5 workspace 5 -bindsym Mod1+6 workspace 6 -bindsym Mod1+7 workspace 7 -bindsym Mod1+8 workspace 8 -bindsym Mod1+9 workspace 9 -bindsym Mod1+0 workspace 10 - -# move focused container to workspace -bindsym Mod1+Shift+1 move container to workspace 1 -bindsym Mod1+Shift+2 move container to workspace 2 -bindsym Mod1+Shift+3 move container to workspace 3 -bindsym Mod1+Shift+4 move container to workspace 4 -bindsym Mod1+Shift+5 move container to workspace 5 -bindsym Mod1+Shift+6 move container to workspace 6 -bindsym Mod1+Shift+7 move container to workspace 7 -bindsym Mod1+Shift+8 move container to workspace 8 -bindsym Mod1+Shift+9 move container to workspace 9 -bindsym Mod1+Shift+0 move container to workspace 10 - -# reload the configuration file -bindsym Mod1+Shift+c reload -# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) -bindsym Mod1+Shift+r restart -# exit i3 (logs you out of your X session) -bindsym Mod1+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'" - -# resize window (you can also use the mouse for that) -mode "resize" { - # These bindings trigger as soon as you enter the resize mode - - # Pressing left will shrink the window’s width. - # Pressing right will grow the window’s width. - # Pressing up will shrink the window’s height. - # Pressing down will grow the window’s height. - bindsym $left resize shrink width 10 px or 10 ppt - bindsym $down resize grow height 10 px or 10 ppt - bindsym $up resize shrink height 10 px or 10 ppt - bindsym $right resize grow width 10 px or 10 ppt - - # same bindings, but for the arrow keys - bindsym Left resize shrink width 10 px or 10 ppt - bindsym Down resize grow height 10 px or 10 ppt - bindsym Up resize shrink height 10 px or 10 ppt - bindsym Right resize grow width 10 px or 10 ppt - - # back to normal: Enter or Escape - bindsym Return mode "default" - bindsym Escape mode "default" -} - -bindsym Mod1+r mode "resize" - -# Start i3bar to display a workspace bar (plus the system information i3status -# finds out, if available) -bar { - status_command i3status -} - -####################################################################### -# automatically start i3-config-wizard to offer the user to create a -# keysym-based config which used his favorite modifier (alt or windows) -# -# i3-config-wizard will not launch if there already is a config file -# in ~/.i3/config. -# -# Please remove the following exec line: -####################################################################### -exec $HOME/.xinitrc diff --git a/i3/i3-init b/i3/i3-init deleted file mode 100755 index 32193b1..0000000 --- a/i3/i3-init +++ /dev/null @@ -1,3 +0,0 @@ -setxkbmap -layout us -variant dvp -xrdb /home/urbain/.Xresources -/home/urbain/.xmodmap diff --git a/inputrc b/inputrc deleted file mode 100644 index 1221bb9..0000000 --- a/inputrc +++ /dev/null @@ -1,2 +0,0 @@ -set editing-mode vi -set keymap vi diff --git a/install.sh b/install.sh index 4417d91..1c358e5 100755 --- a/install.sh +++ b/install.sh @@ -1,42 +1,81 @@ -#!/bin/bash +#!/bin/zsh -home=/home/urbain -dir=$home/dotfiles -olddir=$home/dotfiles_old +HOME=/home/urbain +dotdir=$HOME/dotfiles -function install_dotfiles { - echo -e "\n*** \e[1mInstalling dotfiles\e[0m ***" +unset dotdirs install uninstall +declare -A dotdirs install uninstall - rm -rf $olddir - mkdir -p $olddir +for file in `ls -A --ignore="install.sh" --ignore="README.md" --ignore=".git"`; do + dotdirs[$file]="$HOME/$file" + install[$file]='ln -s $dotdir/$file $(basename $dotdirs[$file])' + uninstall[$file]='rm -rf $dotdirs[$file]' +done - listFiles=`ls --ignore="make" --ignore="README.md"` +install_offlineimap() { + ln -s $dotdir/.offlineimap/offlineimaprc .offlineimaprc + ln -s $dotdir/.offlineimap/offlineimap.py .offlineimap.py +} - cd $dir - for file in $listFiles; do - if [ -e ~/.$file ]; then - mv ~/.$file $olddir - printf '~/.%-15s exists. ' $file - echo -n "Moving it to $olddir. " - fi - ln -s $dir/$file ~/.$file - echo "(Re)-creating symbolic link of $file." - done +install_vim() { + ln -s $dotdir/.vim/vimrc .vimrc + ln -s $dotdir/.vim .vim + ln -s $dotdir/.vim/vimrc .nvimrc + ln -s $dotdir/.vim .nvim + + mkdir -p .vim/vimundo +} + +install_mutt() { + ln -s $dotdir/.mutt .mutt + mkdir -p .mutt/temp + mkdir -p .mutt/cache + mkdir -p .mutt/cache/bodies +} - cd $dir - mkdir -p vim/vimundo - mkdir -p mutt/temp - mkdir -p mutt/cache - mkdir -p mutt/cache/bodies +install_zsh() { + ln -s $dotdir/.zsh/zshrc .zshrc + ln -s $dotdir/.zsh .zsh +} - cd ~/.config/zathura/ - ln -s /home/urbain/dotfiles/zathurarc +uninstall_offlineimap() { + rm -f .offlineimaprc + rm -f .offlineimap.py } -function clean { - echo -e "\n*** \e[1mCleaning dotfiles\e[0m ***" - for file in `ls`; do - rm -rfv ~/.$file +uninstall_vim() { + rm -rf .vim .vimrc .nvim .nvimrc +} + +uninstall_zsh() { + rm -rf .zsh .zshrc +} + +dotdirs[.uzbl]="$HOME/.config/uzbl" +dotdirs[.zathurarc]="$HOME/.config/zathura/zathurarc" + +install[.offlineimap]='install_offlineimap' +install[.vim]='install_vim' +install[.mutt]='install_mutt' +install[.zsh]='install_zsh' + +uninstall[.offlineimap]='uninstall_offlineimap' +uninstall[.vim]='uninstall_vim' +uninstall[.zsh]='uninstall_zsh' + +clean_dotfiles() { + for file in ${(@k)dotdirs}; do + echo "Cleaning $file" + cd $(dirname $dotdirs[$file]) + eval ${uninstall[$file]} + done +} + +install_dotfiles() { + for file in ${(@k)dotdirs}; do + echo "Installing $file" + cd $(dirname $dotdirs[$file]) + eval ${install[$file]} done } @@ -45,18 +84,5 @@ function install_packages { tmux git gcc clang cmake make zathura feh chromium-browser zsh clang xcape } -function update_dotfiles { - cd $dir - echo -e "\n*** \e[1m Updating dotfiles repository\e[0m ***" - git fetch -q origin master - cat <(git log --reverse --pretty=format:"-- %h %s (%cr)" -4); echo -e "\e[36m" - output=$(git log HEAD..origin) - if [[ ! -z $output ]]; then - cat <(git log --reverse --pretty=format:"-- %h %s (%cr)" HEAD..origin); echo -e "\e[0m" - else - echo -e "-- No updates since last pull\e[0m" - fi -} - -update_dotfiles +clean_dotfiles install_dotfiles diff --git a/latexmkrc b/latexmkrc deleted file mode 100644 index 03c512c..0000000 --- a/latexmkrc +++ /dev/null @@ -1,5 +0,0 @@ -$pdf_mode = 1; -$pdflatex = 'pdflatex --shell-escape'; -$pdf_previewer = 'zathura -s -x "vim --servername SYNC --remote +%{line} %{input}" %O %S'; -$clean_ext = "synctex.gz bbl pdf dvi"; -$new_viewer_always [0]; diff --git a/msmtprc b/msmtprc deleted file mode 100644 index 99e0e3e..0000000 --- a/msmtprc +++ /dev/null @@ -1,22 +0,0 @@ -defaults -auth on -tls on -tls_trust_file /etc/ssl/certs/ca-certificates.crt -logfile ~/.msmtp.log - -account gmail -host smtp.gmail.com -port 587 -from urbain.p.vaes@gmail.com -user urbain.p.vaes -passwordeval "gpg --use-agent --quiet --for-your-eyes-only --no-tty --decrypt ~/.passwords/main.asc" - -account imperial -host smtp.cc.ic.ac.uk -from u.vaes13@imperial.ac.uk -user uv113 -passwordeval "gpg --use-agent --quiet --for-your-eyes-only --no-tty --decrypt ~/.passwords/imperial.asc" -port 587 - -# Set a default account -account default : imperial diff --git a/mutt/.maillog b/mutt/.maillog deleted file mode 100644 index 07b9c59..0000000 --- a/mutt/.maillog +++ /dev/null @@ -1,230 +0,0 @@ -Date: Wed Oct 29 13:00:08 2014 -From: Choices Discounts -Subj: Cinema: Price Promotion -File: /home/urbain/.mail (17491) - -Date: Wed Oct 29 14:09:08 2014 -From: "Marshall, Richard L" -Subj: Daiwa Scholarships 2015: Language Learning, Homestay and Work -File: /home/urbain/.mail (7149) - -Date: Wed Oct 29 14:09:12 2014 -From: "Facebook" -Subj: Facebook login from "Chrome on Linux" -File: /home/urbain/.mail (11718) - -Date: Wed Oct 29 16:03:17 2014 -From: "Eggl, Maximilian" -Subj: Chess Club: Match Report -File: /home/urbain/.mail (23181) - -Date: Wed Oct 29 16:03:18 2014 -From: CAREERS -Subj: CAREERS: WorldQuant Imperial College Information Session Monday 3rd -File: /home/urbain/.mail (19493) - -Date: Wed Oct 29 16:03:20 2014 -From: "Facebook" -Subj: Facebook login from "Chrome on Linux" -File: /home/urbain/.mail (11720) - -Date: Wed Oct 29 16:09:55 2014 -From: "Facebook" -Subj: Facebook login from "Chrome on Linux" -File: /home/urbain/.mail (11720) - -Date: Wed Oct 29 16:29:36 2014 -From: "Facebook" -Subj: Facebook login from "Chrome on Linux" -File: /home/urbain/.mail (11717) - -Date: Wed Oct 29 16:56:42 2014 -From: "Facebook" -Subj: Facebook login from "Chrome on Linux" -File: /home/urbain/.mail (11720) - -Date: Wed Oct 29 16:58:14 2014 -From: "Facebook" -Subj: Facebook login from "Chrome on Linux" -File: /home/urbain/.mail (11720) - -Date: Wed Oct 29 20:15:00 2014 -From: Salvador Rodriguez-Lopez -Subj: M2PM1-Tutorial 3 -File: /home/urbain/.mail (6085) - -Date: Wed Oct 29 20:15:02 2014 -From: "Facebook" -Subj: Facebook login from "Chrome on Linux" -File: /home/urbain/.mail (11720) - -Date: Fri Oct 31 10:24:52 2014 -From: James Clear -Subj: Minimalism, Success, and the Curious Writing Habit of George R.R. Martin -File: /home/urbain/.mail (42928) - -Date: Fri Oct 31 10:24:53 2014 -From: An Introduction to Functional Analysis Course Team -Subj: Marking Coursework -File: /home/urbain/.mail (3559) - -Date: Fri Oct 31 10:24:54 2014 -From: Christophe&Nathalie Vaes -Subj: =?utf-8?Q?A_quelle_heure_fait-on_le_Skype,_Urb_ch=C3=A9ri_=3F=3F=3F=3F?= -File: /home/urbain/.mail (3154) - -Date: Fri Oct 31 10:24:55 2014 -From: "Svanidze, Rusudan" -Subj: 3 Months Report - Research Plan Confirmation -File: /home/urbain/.mail (471497) - -Date: Fri Oct 31 10:24:55 2014 -From: "Pryor, Gemma M" -Subj: Buying club membership -File: /home/urbain/.mail (44297) - -Date: Fri Oct 31 10:24:55 2014 -From: "Sisson, Chris D" -Subj: FW: Huxley Emergency toilet closures -File: /home/urbain/.mail (13394) - -Date: Fri Oct 31 10:24:55 2014 -From: Salvador Rodriguez-Lopez -Subj: Re: M2PM1-Tutorial 3 -File: /home/urbain/.mail (141790) - -Date: Fri Oct 31 10:24:57 2014 -From: Grigoriy Volovskiy -Subj: WG: Re: M2PM1-Tutorial 3 -File: /home/urbain/.mail (12907) - -Date: Fri Oct 31 10:24:58 2014 -From: Grigoriy Volovskiy -Subj: WG: Tutorial 3 M2PM1-Real Analysis -File: /home/urbain/.mail (5777) - -Date: Fri Oct 31 10:34:08 2014 -From: Grigoriy Volovskiy -Subj: -File: /home/urbain/.mail (298990) - -Date: Fri Oct 31 12:11:54 2014 -From: Grigoriy Volovskiy -Subj: -File: /home/urbain/.mail (298990) - -Date: Fri Oct 31 12:11:54 2014 -From: "Svanidze, Rusudan" -Subj: FW: Huxley Emergency toilet closures -File: /home/urbain/.mail (26349) - -Date: Fri Oct 31 12:11:54 2014 -From: "Svanidze, Rusudan" -Subj: FW: 3 Months Report - Research Plan Confirmation -File: /home/urbain/.mail (473371) - -Date: Fri Oct 31 13:32:40 2014 -From: "Bright Network" -Subj: Get ahead in Entrepreneurship: Your weekly bulletin -File: /home/urbain/.mail (59613) - -Date: Fri Oct 31 13:32:41 2014 -From: Grigoriy Volovskiy -Subj: -File: /home/urbain/.mail (298990) - -Date: Fri Oct 31 13:32:41 2014 -From: "Svanidze, Rusudan" -Subj: FW: Huxley Emergency toilet closures -File: /home/urbain/.mail (26349) - -Date: Fri Oct 31 13:32:41 2014 -From: "Svanidze, Rusudan" -Subj: FW: 3 Months Report - Research Plan Confirmation -File: /home/urbain/.mail (473371) - -Date: Fri Oct 31 13:32:41 2014 -From: "Svanidze, Rusudan" -Subj: FW: Lost In Fathoms - General Public Seminar on Art & Science, -File: /home/urbain/.mail (23278) - -Date: Fri Oct 31 13:34:04 2014 -From: Grigoriy Volovskiy -Subj: -File: /home/urbain/.mail (298990) - -Date: Fri Oct 31 13:34:04 2014 -From: "Svanidze, Rusudan" -Subj: FW: Huxley Emergency toilet closures -File: /home/urbain/.mail (26349) - -Date: Fri Oct 31 13:34:04 2014 -From: "Svanidze, Rusudan" -Subj: FW: 3 Months Report - Research Plan Confirmation -File: /home/urbain/.mail (473371) - -Date: Fri Oct 31 13:34:04 2014 -From: "Svanidze, Rusudan" -Subj: FW: Lost In Fathoms - General Public Seminar on Art & Science, -File: /home/urbain/.mail (23278) - -Date: Fri Oct 31 14:26:23 2014 -From: "Ingram, Michael" -Subj: [Swim-List] Synchro event -File: /home/urbain/.mail (30387) - -Date: Fri Oct 31 14:26:23 2014 -From: Grigoriy Volovskiy -Subj: -File: /home/urbain/.mail (298990) - -Date: Fri Oct 31 14:26:23 2014 -From: "Svanidze, Rusudan" -Subj: FW: Huxley Emergency toilet closures -File: /home/urbain/.mail (26349) - -Date: Fri Oct 31 14:26:24 2014 -From: "Svanidze, Rusudan" -Subj: FW: 3 Months Report - Research Plan Confirmation -File: /home/urbain/.mail (473371) - -Date: Fri Oct 31 14:26:24 2014 -From: "Svanidze, Rusudan" -Subj: FW: Lost In Fathoms - General Public Seminar on Art & Science, -File: /home/urbain/.mail (23278) - -Date: Fri Oct 31 14:46:10 2014 -From: Grigoriy Volovskiy -Subj: -File: /home/urbain/.mail (298990) - -Date: Fri Oct 31 14:46:10 2014 -From: "Svanidze, Rusudan" -Subj: FW: Huxley Emergency toilet closures -File: /home/urbain/.mail (26349) - -Date: Fri Oct 31 14:46:10 2014 -From: "Svanidze, Rusudan" -Subj: FW: 3 Months Report - Research Plan Confirmation -File: /home/urbain/.mail (473371) - -Date: Fri Oct 31 14:46:10 2014 -From: "Svanidze, Rusudan" -Subj: FW: Lost In Fathoms - General Public Seminar on Art & Science, -File: /home/urbain/.mail (23278) - -Date: Fri Oct 31 14:46:11 2014 -From: "Cannon, Claudia M" -Subj: Seminars and Events Week Commencing Monday 3rd November 2014 -File: /home/urbain/.mail (144591) - diff --git a/mutt/mailboxes b/mutt/mailboxes deleted file mode 100644 index 6161f0e..0000000 --- a/mutt/mailboxes +++ /dev/null @@ -1 +0,0 @@ -mailboxes "+Gmail/Gmail" "+Imperial/Imperial" "+Main/Drafts" "+Main/Main" "+Main/Sent" diff --git a/mutt/mailcap b/mutt/mailcap deleted file mode 100644 index 59df58e..0000000 --- a/mutt/mailcap +++ /dev/null @@ -1,3 +0,0 @@ -text/html; pandoc -f html -t markdown; copiousoutput; compose=vim %s -image/*; feh %s -application/pdf; zathura %s diff --git a/mutt/muttrc b/mutt/muttrc deleted file mode 100644 index fb57f0a..0000000 --- a/mutt/muttrc +++ /dev/null @@ -1,99 +0,0 @@ -# General information -set from = "u.vaes13@imperial.ac.uk" -set realname = "Urbain Vaes" -set use_from = yes -set envelope_from = "yes" -set weed - -# Folders -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 signature = ~/.mutt/sig - -# Maildirs -set spoolfile = "+Main/Main" -set record = "+Main/Sent" -set postponed = "+Main/Drafts" - -# Headers -ignore * -unignore from: to: cc: date: subject: -unhdr_order * -hdr_order from: to: cc: date: subject: - -mailboxes +Main/Main \ - +Imperial/Imperial \ - +Hotmail/Hotmail \ - +Gmail/Gmail \ - +Main/Sent \ - +Main/Drafts \ - -# Prompts -set delete = yes -set quit = yes - -# Pager -set pager_index_lines = 10 -set pager_context = 0 -set pager_stop -set reverse_alias -set menu_scroll -set tilde -unset markers -set quote_regexp = "^( {0,4}[>|:#%]| {0,4}[a-z0-9]+[>|]+)+" -alternative_order text/plain text/enriched text/html - -# Editor -set editor="nvim --noplugin" -set include=yes - -# Program to send mails -set sendmail="/usr/bin/msmtp" - -# Sorting options -# set sort = threads -set sort_aux = reverse-last-date-received -# set sort_browser = reverse-date - -# Alias file -source ~/.mutt/alias - -# HTML messages -auto_view text/html - -# Key bindings -bind index,pager \Cf next-page -bind index,pager \Cb previous-page -bind index,pager "}" sidebar-next -bind index,pager "{" sidebar-prev -bind index,pager O sidebar-open - -bind index gg first-entry -bind index G last-entry -bind index i flag-message - -bind pager \Ce next-line -bind pager \Cy previous-line -bind pager j next-entry -bind pager k previous-entry -bind pager R group-reply - -# Source mutt solarized -`[ "$COLORSCHEME" = "light" ] && echo source $HOME/github/mutt-colors-solarized/mutt-colors-solarized-light-16.muttrc || echo set` -`[ "$COLORSCHEME" = "dark" ] && echo source $HOME/github/mutt-colors-solarized/mutt-colors-solarized-dark-16.muttrc || echo set` -`[ "$COLORSCHEME" = "default" ] && echo source $HOME/github/mutt-colors-solarized/mutt-colors-solarized-dark-16.muttrc || echo set` - -color index red default "~F" -color index brightblue default "~f edfenergy" -color index brightblue default "~f terravision" -color index magenta default "~f avaaz" -color index magenta default "~f santos" -color index magenta default "~f rusudan" -color index cyan default "~U" -color index green default "~f pavliotis" -color index green default "~f abdulle" diff --git a/ncmpcpp/config b/ncmpcpp/config deleted file mode 100644 index 127a875..0000000 --- a/ncmpcpp/config +++ /dev/null @@ -1,493 +0,0 @@ -#################################################### -## this is example configuration file, copy it to ## -## ~/.ncmpcpp/config and set up your preferences ## -#################################################### -# -##### directories ###### -## -## Directory for storing ncmpcpp related files. -## Changing it is useful if you want to store -## everything somewhere else and provide command -## line setting for alternative location to config -## file which defines that while launching ncmpcpp. -## -# -ncmpcpp_directory = "~/.ncmpcpp" -# -## -## Directory for storing downloaded lyrics. It -## defaults to ~/.lyrics since other MPD clients -## (eg. ncmpc) also use that location. -## -# -#lyrics_directory = "~/.lyrics" -# -##### connection settings ##### -# -## set it in order to make tag editor and renaming files work properly -# - -# mpd_host = "192.168.0.20" -mpd_host = "192.168.1.12" -# -mpd_port = "6600" -# -#mpd_music_dir = "" -# -#mpd_connection_timeout = "5" -# -#mpd_crossfade_time = "5" -# -#mpd_communication_mode = "notifications" (polling/notifications) -# -##### music visualizer ##### -## -## Note: In order to make music visualizer work you'll -## need to use mpd fifo output, whose format parameter -## has to be set to 44100:16:1 for mono visualization -## or 44100:16:2 for stereo visualization. Example -## configuration (it has to be put into mpd.conf): -## -## audio_output { -## type "fifo" -## name "My FIFO" -## path "/tmp/mpd.fifo" -## format "44100:16:2" -## } -## -# -## -## If you set format to 44100:16:2, make it 'yes'. -## -# -#visualizer_in_stereo = "no" -# -#visualizer_fifo_path = "" -# -## -## Note: Below parameter is needed for ncmpcpp -## to determine which output provides data for -## visualizer and thus allow syncing between -## visualization and sound as currently there -## are some problems with it. -## -# -#visualizer_output_name = "" -# -## -## Note: Below parameter defines how often ncmpcpp -## has to "synchronize" visualizer and audio outputs. -## 30 seconds is optimal value, but if you experience -## synchronization problems, set it to lower value. -## Keep in mind that sane values start with >=10. -## -# -#visualizer_sync_interval = "30" -# -## -## Note: To enable spectrum frequency visualization -## you need to compile ncmpcpp with fftw3 support. -## -# -#visualizer_type = "wave" (spectrum/wave) -# -#visualizer_look = "◆│" -# -##### system encoding ##### -## -## ncmpcpp should detect your charset encoding -## but if it failed to do so, you can specify -## charset encoding you are using here. -## -## Note: You can see whether your ncmpcpp build -## supports charset detection by checking output -## of `ncmpcpp --version`. -## -## Note: Since MPD uses utf8 by default, setting -## this option makes sense only if your encoding -## is different. -## -# -#system_encoding = "" -# -##### delays ##### -# -## delay after playlist highlighting will be disabled (0 = don't disable) -# -#playlist_disable_highlight_delay = "5" -# -## defines how long various messages are supposed to be visible -# -#message_delay_time = "4" -# -##### song format ##### -## -## for song format you can use: -## -## %l - length -## %f - filename -## %D - directory -## %a - artist -## %A - album artist -## %t - title -## %b - album -## %y - year -## %n - track number (01/12 -> 01) -## %N - full track info (01/12 -> 01/12) -## %g - genre -## %c - composer -## %p - performer -## %d - disc -## %C - comment -## $R - begin right alignment -## -## you can also put them in { } and then it will be displayed -## only if all requested values are available and/or define alternate -## value with { }|{ } eg. {%a - %t}|{%f} -## -## Note: If you want to set limit on maximal length of a tag, just -## put the appropriate number between % and character that defines -## tag type, e.g. to make album take max. 20 terminal cells, use '%20b'. -## -## Note: Format that is similar to "%a - %t" (i.e. without any additional -## braces) is equal to "{%a - %t}", so if one of the tags is missing, -## you'll get nothing. -## -## text can also have different color than the main window has, -## eg. if you want length to be green, write $3%l$9 -## -## available values: -## -## - 0 - default window color (discards all other colors) -## - 1 - black -## - 2 - red -## - 3 - green -## - 4 - yellow -## - 5 - blue -## - 6 - magenta -## - 7 - cyan -## - 8 - white -## - 9 - end of current color -## -## Note: colors can be nested. -## -# -#song_list_format = "{%a - }{%t}|{$8%f$9}$R{$3(%l)$9}" -# -#song_status_format = "{{%a{ \"%b\"{ (%y)}} - }{%t}}|{%f}" -# -#song_library_format = "{%n - }{%t}|{%f}" -# -#tag_editor_album_format = "{(%y) }%b" -# -## -## Note: Below variables are for alternative version of user's interface. -## Their syntax supports all tags and colors listed above plus some extra -## markers used for text attributes. They are followed by character '$'. -## After that you can put: -## -## - b - bold text -## - u - underline text -## - r - reverse colors -## - a - use alternative character set -## -## If you don't want to use an attribute anymore, just put it again, but -## this time insert character '/' between '$' and attribute character, -## e.g. {$b%t$/b}|{$r%f$/r} will display bolded title tag or filename -## with reversed colors. -## -# -#alternative_header_first_line_format = "$b$1$aqqu$/a$9 {%t}|{%f} $1$atqq$/a$9$/b" -# -#alternative_header_second_line_format = "{{$4$b%a$/b$9}{ - $7%b$9}{ ($4%y$9)}}|{%D}" -# -## -## Note: Below variables also supports -## text attributes listed above. -## -# -#now_playing_prefix = "$b" -# -#now_playing_suffix = "$/b" -# -#browser_playlist_prefix = "$2playlist$9 " -# -#selected_item_prefix = "$6" -# -#selected_item_suffix = "$9" -# -## colors are not supported for below variable -# -#song_window_title_format = "{%a - }{%t}|{%f}" -# -##### columns settings ##### -## -## syntax of song columns list format is "column column etc." -## -## - syntax for each column is: -## -## (width of column)[column's color]{displayed tag} -## -## Note: Width is by default in %, if you want a column to -## have fixed size, add 'f' after the value, e.g. (10)[white]{a} -## will be the column that take 10% of screen (so the real column's -## width will depend on actual screen size), whereas (10f)[white]{a} -## will take 10 terminal cells, no matter how wide the screen is. -## -## - color is optional (if you want the default one, type []) -## -## Note: You can give a column additional attributes by putting appropriate -## character after displayed tag character. Available attributes are: -## -## - r - column will be right aligned -## - E - if tag is empty, empty tag marker won't be displayed -## -## You can also: -## -## - give a column custom name by putting it after attributes, -## separated with character ':', e.g. {lr:Length} gives you -## right aligned column of lengths named "Length". -## -## - define sequence of tags, that have to be displayed in case -## predecessor is empty in a way similar to the one in classic -## song format, i.e. using '|' character, e.g. {a|c|p:Owner} -## creates column named "Owner" that tries to display artist -## tag and then composer and performer if previous ones are -## not available. -## -# -#song_columns_list_format = "(7f)[green]{l} (25)[cyan]{a} (40)[]{t|f} (30)[red]{b}" -# -##### various settings ##### -# -## -## Note: Custom command that will be executed each -## time song changes. Useful for notifications etc. -## -## Attention: It doesn't support song format anymore. -## Use `ncmpcpp --now-playing SONG_FORMAT` instead. -## -#execute_on_song_change = "" -# -#playlist_show_remaining_time = "no" -# -#playlist_shorten_total_times = "no" -# -#playlist_separate_albums = "no" -# -#playlist_display_mode = "classic" (classic/columns) -# -#browser_display_mode = "classic" (classic/columns) -# -#search_engine_display_mode = "classic" (classic/columns) -# -#playlist_editor_display_mode = "classic" (classic/columns) -# -#discard_colors_if_item_is_selected = "yes" -# -#incremental_seeking = "yes" -# -#seek_time = "1" -# -#autocenter_mode = "no" -# -#centered_cursor = "no" -# -## -## Note: You can specify third character which will -## be used to build 'empty' part of progressbar. -## -#progressbar_look = "=>" -# -#default_place_to_search_in = "database" (database/playlist) -# -#user_interface = "classic" (classic/alternative) -# -#media_library_left_column = "a" (possible values: a,y,g,c,p, legend above) -# -#default_find_mode = "wrapped" (wrapped/normal) -# -#default_space_mode = "add" (add/select) -# -#default_tag_editor_left_col = "albums" (albums/dirs) -# -#default_tag_editor_pattern = "%n - %t" -# -#header_visibility = "yes" -# -#statusbar_visibility = "yes" -# -#titles_visibility = "yes" -# -#header_text_scrolling = "yes" -# -#fancy_scrolling = "yes" -# -#cyclic_scrolling = "no" -# -#lines_scrolled = "2" -# -#follow_now_playing_lyrics = "no" -# -#fetch_lyrics_for_current_song_in_background = "no" -# -#store_lyrics_in_song_dir = "no" -# -## -## Note: If you set this variable, ncmpcpp will try to -## get info from last.fm in language you set and if it -## fails, it will fall back to english. Otherwise it will -## use english the first time. -## -## Note: Language has to be expressed as an ISO 639 alpha-2 code. -## -#lastfm_preferred_language = "" -# -#ncmpc_like_songs_adding = "no" (enabled - add/remove, disabled - always add) -# -#show_hidden_files_in_local_browser = "no" -# -#display_screens_numbers_on_start = "yes" -# -## -## How shall key_screen_switcher work? -## -## - "previous" - switch between current and last used screen -## - "sequence: 2 -> 9 -> 5" - switch between given sequence of screens. -## -## Screen numbers you can use after 'sequence' keyword are: -## -## - 1 - help -## - 2 - playlist -## - 3 - browser -## - 4 - search engine -## - 5 - media library -## - 6 - playlist editor -## - 7 - tag editor -## - 8 - outputs -## - 9 - visualizer -## - 10 - clock -## -## As you can see, above example will switch between -## playlist, visualizer and media library screens. -## -#screen_switcher_mode = "sequence: 2 -> 3" -# -## -## Default width of locked screen (in %). -## Acceptable values are from 20 to 80. -## -# -#locked_screen_width_part = "50" -# -#ask_for_locked_screen_width_part = "yes" -# -## -## Note: You can define startup screen for ncmpcpp -## by choosing screen number from the list above. -## -#startup_screen = "2" -# -#jump_to_now_playing_song_at_start = "yes" -# -#ask_before_clearing_main_playlist = "no" -# -#clock_display_seconds = "no" -# -#display_volume_level = "yes" -# -#display_bitrate = "no" -# -#display_remaining_time = "no" -# -#regular_expressions = "basic" (basic/extended) -# -## -## Note: If below is enabled, ncmpcpp will ignore leading -## "The" word while sorting items in browser, tags in -## media library, etc. -## -#ignore_leading_the = "no" -# -#block_search_constraints_change_if_items_found = "yes" -# -#mouse_support = "yes" -# -#mouse_list_scroll_whole_page = "yes" -# -#empty_tag_marker = "" -# -#tag_editor_extended_numeration = "no" -# -#media_library_display_date = "yes" -# -#media_library_display_empty_tag = "yes" -# -#media_library_disable_two_column_mode = "no" -# -#enable_window_title = "yes" -# -## -## Note: You can choose default search mode for search -## engine. Available modes are: -## -## - 1 - use mpd built-in searching (no regexes, pattern matching) -## - 2 - use ncmpcpp searching (pattern matching with support for regexes, -## but if your mpd is on a remote machine, downloading big database -## to process it can take a while -## - 3 - match only exact values (this mode uses mpd function for searching -## in database and local one for searching in current playlist) -## -# -#search_engine_default_search_mode = "1" -# -## -## Note: Below variables can allow you to physically -## remove files and directories from your hdd using -## ncmpcpp's browser screen. -## -# -#allow_physical_files_deletion = "no" -# -#allow_physical_directories_deletion = "no" -# -#external_editor = "" -# -#use_console_editor = "no" (set to yes, if your editor is console app) -# -##### colors definitions ##### -# -#colors_enabled = "yes" -# -#empty_tag_color = "cyan" -# -#header_window_color = "default" -# -#volume_color = "default" -# -#state_line_color = "default" -# -#state_flags_color = "default" -# -#main_window_color = "yellow" -# -#color1 = "white" -# -#color2 = "green" -# -#main_window_highlight_color = "yellow" -# -#progressbar_color = "default" -# -#statusbar_color = "default" -# -#alternative_ui_separator_color = "black" -# -#active_column_color = "red" -# -#visualizer_color = "yellow" -# -#window_border_color = "green" -# -#active_window_border = "red" -# diff --git a/ncmpcpp/error.log b/ncmpcpp/error.log deleted file mode 100644 index e69de29..0000000 diff --git a/notes/Notes b/notes/Notes deleted file mode 100644 index 5c69bb3..0000000 --- a/notes/Notes +++ /dev/null @@ -1,23 +0,0 @@ -Notes - -# Phd Todos - - • High priority - ◦ Investigate proof of spectral convergence - • Medium priority - ◦ Implement Smolyak algorithm - ◦ Investigate proof of weak convergence - ◦ Obtain rigourous homogenization result - • Low priority - ◦ Add graphs to program - -# General Todos - • High priority - • Medium priority - ◦ Book ticket to Paris - • Low priority - - * * * - -# Useful info - • Bank number: 930630876 diff --git a/nvim b/nvim deleted file mode 120000 index 7923f59..0000000 --- a/nvim +++ /dev/null @@ -1 +0,0 @@ -vim \ No newline at end of file diff --git a/nvimrc b/nvimrc deleted file mode 120000 index c9a3c9c..0000000 --- a/nvimrc +++ /dev/null @@ -1 +0,0 @@ -vimrc \ No newline at end of file diff --git a/offlineimap.py b/offlineimap.py deleted file mode 100644 index c63b82d..0000000 --- a/offlineimap.py +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env python - -import os -import subprocess -def mailpasswd(acct): - acct = os.path.basename(acct) - path = "/home/urbain/.passwords/%s.asc" % acct - args = ["gpg", "--use-agent", "--quiet", "--batch", "-d", path] - try: - return subprocess.check_output(args).strip() - except subprocess.CalledProcessError: - return "" diff --git a/offlineimaprc b/offlineimaprc deleted file mode 100644 index 4dc46f1..0000000 --- a/offlineimaprc +++ /dev/null @@ -1,76 +0,0 @@ -[general] -ui = ttyui -pythonfile = /home/urbain/.offlineimap.py -accounts = Imperial, Main, Gmail -maxsyncaccounts = 4 - -[Account Imperial] -localrepository = Imperial-Local -remoterepository = Imperial-Remote -autorefresh = 10 - -[Repository Imperial-Local] -type = Maildir -localfolders = ~/.mail/Imperial -status_backend = sqlite -nametrans = lambda folder : {'Imperial' : 'INBOX'}.get(folder, folder) - -[Repository Imperial-Remote] -type = IMAP -remotehost = exchange.imperial.ac.uk -remoteuser = uv113 -remotepasseval = mailpasswd("imperial") -ssl = yes -nametrans = lambda folder : {'INBOX' : 'Imperial'}.get(folder, folder) -folderfilter = lambda folder: folder in ['INBOX'] -Sslcacertfile = /etc/ssl/certs/ca-certificates.crt - -[Account Main] -localrepository = Main-Local -remoterepository = Main-Remote -autorefresh = 10 - -[Repository Main-Local] -type = Maildir -localfolders = ~/.mail/Main -status_backend = sqlite -nametrans = lambda folder : {'Main' : 'INBOX', 'Sent' : '[Gmail]/Sent Mail', 'Drafts' : '[Gmail]/Drafts'}.get(folder, folder) - -[Repository Main-Remote] -type = Gmail -remoteuser = urbain.p.vaes -remotepasseval = mailpasswd("main") -realdelete = no -maxconnections = 3 -nametrans = lambda folder : {'INBOX' : 'Main', '[Gmail]/Sent Mail' : 'Sent', '[Gmail]/Drafts' : 'Drafts'}.get(folder, folder) -folderfilter = lambda folder: folder in ['INBOX', '[Gmail]/Sent Mail', '[Gmail]/Drafts'] -sslcacertfile = /etc/ssl/certs/ca-certificates.crt - -[Account Gmail] -localrepository = Gmail-Local -remoterepository = Gmail-Remote -autorefresh = 10 - -[Repository Gmail-Local] -type = Maildir -localfolders = ~/.mail/Gmail -status_backend = sqlite -nametrans = lambda folder : {'Gmail' : 'INBOX'}.get(folder, folder) - -[Repository Gmail-Remote] -type = Gmail -remoteuser = urbainvaes90 -remotepasseval = mailpasswd("gmail") -realdelete = no -maxconnections = 3 -nametrans = lambda folder: {'INBOX' : 'Gmail'}.get(folder, folder) -folderfilter = lambda folder: folder in ['INBOX'] -sslcacertfile = /etc/ssl/certs/ca-certificates.crt - -[mbnames] -enabled = yes -filename = ~/.mutt/mailboxes -header = "mailboxes " -peritem = "+%(accountname)s/%(foldername)s" -sep = " " -footer = "\n" diff --git a/passwords/gmail.asc b/passwords/gmail.asc deleted file mode 100644 index 08de50b..0000000 --- a/passwords/gmail.asc +++ /dev/null @@ -1,18 +0,0 @@ ------BEGIN PGP MESSAGE----- -Version: GnuPG v1 - -hQIMA2AwAsuYqCfXARAAyjVQBvW4y+mrxVRSUFmbRNoKhxaheAiqcFmOxOA41I0o -yXQ2798T46KMeg2hQlq0JgdSKzIx9glZ5vuSYZ2IO7KFqZ+otW3XMh6xqZ/TF68g -kc93FF8bTXHl/oThBJhgkrn1eGu2qwJFeAXWgBE79VBLrJ7dMhyJHpsJzVwW09AP -O5BP89noyqa6qP1seep+/d7AuOoHYmFRF647L1a//mphfit3Z+ckGRaDi3mBEJbm -YRsnJkLGO7Vc22JcgrDu1lsWa4ChXbOg9E1x2+75tIkaUVSq4dH1HII8zhb1pmdL -C1VPS0ndADE9WHAcjvuCVNHlsgRxm0dgnIL06kY5U2LhQ21AARMYNepkl5aHaXZg -mjIOu4qll31RKQtntZ1cc8vVXV+1FLjpYz7GapbqQ+ylVQf4lecSrPioCCtD7TzF -GqHNfS4X1Va3/qMG98cTI3P0RjK1YMvOoqxSrWbQcJTKU8fiq+COQungipq10lpi -/bHbQHVqrbFMI3vzAh6BHdSaIYkuz1fzNNTYbDUyHBV5KDbme8qIQZsIjpJ/yX1H -O2dw6lF3dNo+huf157KfL3pTwD8InyB4Hm6Aa1SQPBCrO495BpyKrZTWTlSO08+4 -ycFX+Xx8F/GN9i0G2IJUCyU/2AV6fLZAStuQIw3AMzwkb1NJ9bMAdSeU9MZR+qjS -TwHNHEP2LonaHTsbogdURSLeK7jtdKiPZYC0bKwQZJxEIwmDZZedweeufs5WLKjf -1Sh3VvJXlruAZJcJw6kGdyv0jddzHT0qu6qQ3V6x0KQ= -=Mfz/ ------END PGP MESSAGE----- diff --git a/passwords/hotmail.asc b/passwords/hotmail.asc deleted file mode 100644 index dd7f078..0000000 --- a/passwords/hotmail.asc +++ /dev/null @@ -1,18 +0,0 @@ ------BEGIN PGP MESSAGE----- -Version: GnuPG v1 - -hQIMA2AwAsuYqCfXARAAzPBo5qPX17TyoiGz6kls7JMP+7BSbpx5DhKGp6WHinrg -VdR9VmMKN9KpoJvUD7JQpHua1FTBd2m++8npIThxKD7MaJgph+15oqTOuvf6rdrD -3+51UR5bwbknt7BDrvtX0ueMR05TcgCfoC3R6orbesTkbwaiy3uzatpMRlMBf/1c -ntb18Bluqg0KUie73Lpsmc52aRhAJF8dJgEk8qfbhd/sop3wuSbJgBWXxAcukgR6 -dKM7LI9lGu9z39VubRetE+G8fOb/oWGdqfUjHoWM1huMKztnJFS/ftd6zCh8wwDk -NrK+46pOLhi8ARPBEaCg01BK8JT42s+NE7mFneqlnK0g4rAWGDN3GUEGZMxOtUKb -gJlLuaQINKLTwy0Y2W5YUk4vbnRj4J0cs9tW/RyUB0t/o0bwKqB7k8hhmq4MJ5IM -2OzaAapw5ogZtf/+eww8L2UMgS/ESmJaQHl6kTzdsPI/WXpMATNf0qqFZ1FjRC/U -xEudfo60QumvH6JxO9rUR0a+dookI99emaFLyfNH7hIqGP8X6C5vRaruUCZtYufC -o2W3v1rLPAnKvVGli9ZxyetfXeolUwpKxHBwAAv3QNRONrzEfHOifvnCLlR8+n6K -FZvgIxengHKRnTwduJQE4td1LcjgWHhlpmPAcB6y0tddBLFwwUdNtPUSRsNQ/4nS -SQG/+mPrLscTKjxIIzaNUlXWKrrdBTism+ITSq96BKbNILR6M5Am9b5BZPLEY16e -izq7zYPh5PntZIm71rOMHb2GBiKcuH0UjXc= -=QzUQ ------END PGP MESSAGE----- diff --git a/passwords/imperial.asc b/passwords/imperial.asc deleted file mode 100644 index 69c898a..0000000 --- a/passwords/imperial.asc +++ /dev/null @@ -1,18 +0,0 @@ ------BEGIN PGP MESSAGE----- -Version: GnuPG v1 - -hQIMA2AwAsuYqCfXAQ/9EvZHVmMGZPRW+046vwxMV8QisZXGfA9BKcR4qAKGaylA -Eb/eJ+XnrVBoqnXdZdNMMeIXPkWGvPI7CEW++h7YOGm3/wgk3hUUIVAK36UwtCtl -DojOHDL4/HUnxFQaDkSuZUjnay9yPWROmUQYSK0O5EcvtuLEwPU6n3wECVb90FLe -GEBsRJJQaJ7dhdBC6/rcVUnaYH2ruzd/skDZRsIrCDyn+Nva5WPhpre3nJeYFfb2 -wwz9nv/2YDvlKahWXrzX8lQlwjBltrHteER/QQxHES6xOgkv0I8frYT+MXlLAVj1 -o6gHGOJiiNugFWr1XO+xrmbUirjxiBh6urIYdey/fJBqc77g8DPpTDD4WuZJoRG6 -5iVqxzoEOwqmtBUoaFuG6Ide5aTUL7SYPZ2nfdqrNYzNCAeLKgKJbbpAWXbzaLOn -04j1S1zPO9hzDPNP9HDu7ZGoHStMaJF2ydA15kK9L7F4oUGb9y2lonGP2N5WNLjy -AY4jlWenXGib+gMNoLQLUarZDcZV1bwTZvTX5fu7XB7634/aC7WOetnCU23VAkvw -DkUHmoMCoH/meTRqNENttRNgQtXd/h5lJotvNINid2PBM2TDGCzzSPluHNPWYdHh -2QjiWU0wZaY3GyNWEE9GDejusw05R+QUkoM+dy6hojHwf/1WkfhZBdH/ivRooavS -TgGPT2dqxi/Ac9mKCbyxA1EdrZ1h/ou3N4UyCTim14wbdjpkg7+CNjGv1CjesdBZ -WqjgZeSeTe9n8qSKlSodhYmSdz/1OlZiBONx58PKwQ== -=Lbhd ------END PGP MESSAGE----- diff --git a/passwords/main.asc b/passwords/main.asc deleted file mode 100644 index e284c92..0000000 --- a/passwords/main.asc +++ /dev/null @@ -1,18 +0,0 @@ ------BEGIN PGP MESSAGE----- -Version: GnuPG v1 - -hQIMA2AwAsuYqCfXAQ//blWCbEjK0MvbTlB/V6F2S6TmPdnen0CZ9e7l2Ix5Vkd7 -MdUiNVZoIp2dbkw/3S3dxh+v1koMrfuzV4vdRhF0kZyrX4RLRkTQP0B9q8OJYPre -6NY7VS4WWQpiRT4qiFgsMsVvdZp2vqHmVHp2fRwWl3cMNkWNSuBNMoT8a2wA3bMi -4r0RIdKDVa7jM9+g4TwbnuQ0z9jR3NqFMk4lKs7NeRMbg6AotyimKEbm+qbpKxnA -00GeGdV/CbiDfwEUKh+UYLLrD1p9thCsJkO64uVyskmcZHT49k+PXUieESLDSpOP -7nPmS9dGsPmsBmpI2MDei8EEN+6ALdlrxd7FQHc7FTOVOPwLPawS3FKF0GPxDdfq -gW50KFq9lm42wZdcNoai5kLgYlVoyf1WnA7wiIi8pPQZKjSgcLm6mCAV+hehF9vf -t2FUoNx6cMI4+eMWEaoK9lPpVe1Ejxac1NZJCTZt9dqjL6sjZB4h/O9PEPzaJWn7 -O4DbUx+GkiFWYdETa9C1Dhy1fuA12CPGqbM1DP92bCCQXnG3dfjR3AVWbQ4RcjdX -BFE2blsQuP4+/d0DjJdY645wb/m9WS02TYgHuENVXq9LZ5OV3Es6g7xSSEVHhp3a -TN2RPwna2YPjCC45wcqXFdfkT3bQFogOjdYQgWWj1S3PPyI/5+D4aAKqJjNYPu3S -SwH0IjgFdLIBxjm9DJm4u47MKQ3jDFczYIgRl/BrgdldTjTDjQkIP/GyCFv9ODHH -tp3zYiJJLuls3RBiUgqzZvLE1Hw/eIHt/CtVMQ== -=hmGk ------END PGP MESSAGE----- diff --git a/repos.zsh b/repos.zsh deleted file mode 100644 index 95b0fa2..0000000 --- a/repos.zsh +++ /dev/null @@ -1,44 +0,0 @@ -declare -A repodirs -declare -A install -declare -A uninstall - -# General purpose -repodirs[icholy/ttygif]=/home/urbain/github/ttygif - -# Solarized -repodirs[altercation/mutt-colors-solarized]=/home/urbain/github/mutt-colors-solarized - -# My plugins -repodirs[uvaes/fzf-marks]=/home/urbain/github/fzf-marks -repodirs[uvaes/grm]=/home/urbain/github/grm - -# fzf-related -repodirs[junegunn/fzf]=/home/urbain/.fzf -repodirs[atweiden/fzf-extras]=/home/urbain/github/fzf-extras - -# Plugin managers -repodirs[junegunn/vim-plug]=/home/urbain/.vim/vim-plug -repodirs[tmux-plugins/tpm]=/home/urbain/.tmux/plugins/tpm -# repodirs[tarjoilija/zgen]=/home/urbain/.zgen - -# Experimental -repodirs[adbrebs/taxi]=/home/urbain/github/adbrebs/taxi -repodirs[adbrebs/meg]=/home/urbain/github/adbrebs/meg -repodirs[adbrebs/brain_segmentation]=/home/urbain/github/adbrebs/brain_segmentation - -# Installation -function after_vimplug { - cd .. - rm -rf autoload - mkdir -p autoload - cd autoload - ln -s ../vim-plug/plug.vim; -} - -# Installation instructions -install[icholy/ttygif]='make' -install[junegunn/fzf]='./install' -install[junegunn/vim-plug]='after_vimplug' - -# Uninstall -uninstall[junegunn/fzf]='./uninstall' diff --git a/tmux.conf b/tmux.conf deleted file mode 100644 index 989a487..0000000 --- a/tmux.conf +++ /dev/null @@ -1,42 +0,0 @@ -# set -g default-terminal "screen-256color" -set -g default-terminal screen -if "[[ ${TERM} =~ 256color || ${TERM} == fbterm ]]" 'set -g default-terminal screen-256color' - -set -g mode-mouse on -set -g mouse-resize-pane on -set -g mouse-select-pane on - -unbind C-b -set -g prefix C-s -bind s send-prefix - -unbind r -bind r source-file ~/.tmux.conf - -set -s escape-time 0 -set-option -g allow-rename off - -set -g @tpm_plugins ' \ - tmux-plugins/tpm \ - tmux-plugins/tmux-sensible \ - tmux-plugins/tmux-resurrect \ -' - -set -g @resurrect-strategy-vim 'session' -set -g @resurrect-save 'S' -set -g @resurrect-restore 'R' -set -g status off - -is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$"' -bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L" -bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D" -bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U" -bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R" - -bind C-n next-window -bind C-p previous-window - -bind-key -n C-S-Left swap-window -t -1 -bind-key -n C-S-Right swap-window -t +1 - -run-shell '~/.tmux/plugins/tpm/tpm' diff --git a/urxvt/ext/clipboard b/urxvt/ext/clipboard deleted file mode 100644 index 05e1601..0000000 --- a/urxvt/ext/clipboard +++ /dev/null @@ -1,115 +0,0 @@ -#! perl -w -# Author: Bert Muennich -# Website: http://www.github.com/muennich/urxvt-perls -# License: GPLv2 - -# Use keyboard shortcuts to copy the selection to the clipboard and to paste -# the clipboard contents (optionally escaping all special characters). -# Requires xsel to be installed! - -# Usage: put the following lines in your .Xdefaults/.Xresources: -# URxvt.perl-ext-common: ...,clipboard -# URxvt.keysym.M-c: perl:clipboard:copy -# URxvt.keysym.M-v: perl:clipboard:paste -# URxvt.keysym.M-C-v: perl:clipboard:paste_escaped - -# Options: -# URxvt.clipboard.autocopy: If true, PRIMARY overwrites clipboard - -# You can also overwrite the system commands to use for copying/pasting. -# The default ones are: -# URxvt.clipboard.copycmd: xsel -ib -# URxvt.clipboard.pastecmd: xsel -ob -# If you prefer xclip, then put these lines in your .Xdefaults/.Xresources: -# URxvt.clipboard.copycmd: xclip -i -selection clipboard -# URxvt.clipboard.pastecmd: xclip -o -selection clipboard -# On Mac OS X, put these lines in your .Xdefaults/.Xresources: -# URxvt.clipboard.copycmd: pbcopy -# URxvt.clipboard.pastecmd: pbpaste - -# The use of the functions should be self-explanatory! - -use strict; - -sub on_start { - my ($self) = @_; - - $self->{copy_cmd} = $self->x_resource('clipboard.copycmd') || 'xsel -ib'; - $self->{paste_cmd} = $self->x_resource('clipboard.pastecmd') || 'xsel -ob'; - - if ($self->x_resource('clipboard.autocopy') eq 'true') { - $self->enable(sel_grab => \&sel_grab); - } - - () -} - -sub copy { - my ($self) = @_; - - if (open(CLIPBOARD, "| $self->{copy_cmd}")) { - my $sel = $self->selection(); - utf8::encode($sel); - print CLIPBOARD $sel; - close(CLIPBOARD); - } else { - print STDERR "error running '$self->{copy_cmd}': $!\n"; - } - - () -} - -sub paste { - my ($self) = @_; - - my $str = `$self->{paste_cmd}`; - if ($? == 0) { - $self->tt_paste($str); - } else { - print STDERR "error running '$self->{paste_cmd}': $!\n"; - } - - () -} - -sub paste_escaped { - my ($self) = @_; - - my $str = `$self->{paste_cmd}`; - if ($? == 0) { - $str =~ s/([!#\$%&\*\(\) ='"\\\|\[\]`~,<>\?])/\\\1/g; - $self->tt_paste($str); - } else { - print STDERR "error running '$self->{paste_cmd}': $!\n"; - } - - () -} - -sub on_action { - my ($self, $action) = @_; - - on_user_command($self, "clipboard:" . $action); -} - -sub on_user_command { - my ($self, $cmd) = @_; - - if ($cmd eq "clipboard:copy") { - $self->copy; - } elsif ($cmd eq "clipboard:paste") { - $self->paste; - } elsif ($cmd eq "clipboard:paste_escaped") { - $self->paste_escaped; - } - - () -} - -sub sel_grab { - my ($self) = @_; - - $self->copy; - - () -} diff --git a/urxvt/ext/fullscreen b/urxvt/ext/fullscreen deleted file mode 100644 index ebed22f..0000000 --- a/urxvt/ext/fullscreen +++ /dev/null @@ -1,7 +0,0 @@ -#!perl -sub on_user_command { - my ($self, $cmd) = @_; - if ($cmd eq "fullscreen:switch") { - my $dummy = `wmctrl -r :ACTIVE: -b toggle,fullscreen` ; - } -} diff --git a/urxvt/ext/keyboard-select b/urxvt/ext/keyboard-select deleted file mode 100644 index 3627360..0000000 --- a/urxvt/ext/keyboard-select +++ /dev/null @@ -1,586 +0,0 @@ -#! perl -w -# Author: Bert Muennich -# Website: http://www.github.com/muennich/urxvt-perls -# License: GPLv2 - -# Use keyboard shortcuts to select and copy text. - -# Usage: put the following lines in your .Xdefaults/.Xresources: -# URxvt.perl-ext-common: ...,keyboard-select -# URxvt.keysym.M-Escape: perl:keyboard-select:activate -# The following line overwrites the default Meta-s binding and allows to -# activate keyboard-select directly in backward search mode: -# URxvt.keysym.M-s: perl:keyboard-select:search - -# Use Meta-Escape to activate selection mode, then use the following keys: -# h/j/k/l: Move cursor left/down/up/right (also with arrow keys) -# g/G/0/^/$/H/M/L/f/F/;/,/w/W/b/B/e/E: More vi-like cursor movement keys -# '/'/?: Start forward/backward search -# n/N: Repeat last search, N: in reverse direction -# Ctrl-f/b: Scroll down/up one screen -# Ctrl-d/u: Scroll down/up half a screen -# v/V/Ctrl-v: Toggle normal/linewise/blockwise selection -# y/Return: Copy selection to primary buffer, Return: deactivate afterwards -# q/Escape: Deactivate keyboard selection mode - - -use strict; - -sub on_start{ - my ($self) = @_; - - $self->{patterns}{'w'} = qr/\w[^\w\s]|\W\w|\s\S/; - $self->{patterns}{'W'} = qr/\s\S/; - $self->{patterns}{'b'} = qr/.*(?:\w[^\w\s]|\W\w|\s\S)/; - $self->{patterns}{'B'} = qr/.*\s\S/; - $self->{patterns}{'e'} = qr/[^\w\s](?=\w)|\w(?=\W)|\S(?=\s|$)/; - $self->{patterns}{'E'} = qr/\S(?=\s|$)/; - - () -} - - -sub on_action { - my ($self, $action) = @_; - - on_user_command($self, "keyboard-select:" . $action); -} - - -sub on_user_command { - my ($self, $cmd) = @_; - - if (not $self->{active}) { - if ($cmd eq 'keyboard-select:activate') { - activate($self); - } elsif ($cmd eq 'keyboard-select:search') { - activate($self, 1); - } - } - - () -} - - -sub key_press { - my ($self, $event, $keysym, $char) = @_; - my $key = chr($keysym); - - if (lc($key) eq 'c' && $event->{state} & urxvt::ControlMask) { - deactivate($self); - } elsif ($self->{search}) { - if ($keysym == 0xff1b) { - if ($self->{search_mode}) { - deactivate($self); - } else { - $self->{search} = ''; - status_area($self); - } - } elsif ($keysym == 0xff08) { - $self->{search} = substr($self->{search}, 0, -1); - if (not $self->{search} and $self->{search_mode}) { - deactivate($self); - } else { - status_area($self); - } - } elsif ($keysym == 0xff0d) { - my $txt = substr($self->{search}, 1); - if ($txt) { - $self->{pattern} = ($txt =~ m/[[:upper:]]/) ? qr/\Q$txt\E/ : - qr/\Q$txt\E/i; - } elsif ($self->{pattern}) { - delete $self->{pattern}; - } - $self->{search} = ''; - $self->screen_cur($self->{srhcr}, $self->{srhcc}); - if (not find_next($self)) { - if ($self->{search_mode}) { - deactivate($self); - } else { - status_area($self); - } - } - } elsif (length($char) > 0) { - $self->{search} .= $self->locale_decode($char); - my $txt = substr($self->{search}, 1); - if ($txt) { - $self->{pattern} = ($txt =~ m/[[:upper:]]/) ? qr/\Q$txt\E/ : - qr/\Q$txt\E/i; - } elsif ($self->{pattern}) { - delete $self->{pattern}; - } - $self->screen_cur($self->{srhcr}, $self->{srhcc}); - find_next($self); - status_area($self); - } - } elsif ($self->{move_to}) { - if ($keysym == 0xff1b) { - $self->{move_to} = 0; - status_area($self); - } elsif (length($char) > 0) { - $self->{move_to} = 0; - $self->{patterns}{'f-1'} = qr/^.*\Q$key\E/; - $self->{patterns}{'f+1'} = qr/^.+?\Q$key\E/; - move_to($self, ';'); - status_area($self); - } - } elsif ($keysym == 0xff1b || lc($key) eq 'q') { - deactivate($self); - } elsif ($key eq 'y' || $keysym == 0xff0d) { - if ($self->{select}) { - if ($self->{select} eq 'b') { - $self->selection($self->{selection}); - $self->selection_grab($event->{time}); - } else { - my ($br, $bc, $er, $ec) = calc_span($self); - $ec = $self->line($er)->l if $self->{select} eq 'l'; - $self->selection_beg($br, $bc); - $self->selection_end($er, $ec); - $self->selection_make($event->{time}); - } - if ($key eq 'y') { - if ($self->{select} ne 'b') { - $self->selection_beg(1, 0); - $self->selection_end(1, 0); - } - $self->{select} = ''; - status_area($self); - $self->want_refresh(); - } else { - deactivate($self); - } - } - } elsif ($key eq 'V') { - toggle_select($self, 'l'); - } elsif ($key eq 'v') { - if ($event->{state} & urxvt::ControlMask) { - toggle_select($self, 'b'); - } else { - toggle_select($self, 'n'); - } - } elsif ($key eq 'k' || $keysym == 0xff52) { - move_cursor($self, 'k'); - } elsif ($key eq 'j' || $keysym == 0xff54) { - move_cursor($self, 'j'); - } elsif ($key eq 'h' || $keysym == 0xff51) { - move_cursor($self, 'h'); - } elsif ($key eq 'l' || $keysym == 0xff53) { - move_cursor($self, 'l'); - } elsif ('gG0^$HML' =~ m/\Q$key\E/ || - ('fbdu' =~ m/\Q$key\E/ && $event->{state} & urxvt::ControlMask)) { - move_cursor($self, $key); - } elsif (lc($key) eq 'f') { - $self->{move_to} = 1; - $self->{move_dir} = $key eq 'F' ? -1 : 1; - status_area($self, $key); - } elsif (';,wWbBeE' =~ m/\Q$key\E/) { - move_to($self, $key); - } elsif ($key eq '/' || $key eq '?') { - $self->{search} = $key; - $self->{search_dir} = $key eq '?' ? -1 : 1; - ($self->{srhcr}, $self->{srhcc}) = $self->screen_cur(); - status_area($self); - } elsif (lc($key) eq 'n') { - find_next($self, $self->{search_dir} * ($key eq 'N' ? -1 : 1)); - } - - return 1; -} - - -sub move_cursor { - my ($self, $key) = @_; - my ($cr, $cc) = $self->screen_cur(); - my $line = $self->line($cr); - - if ($key eq 'k' && $line->beg > $self->top_row) { - $cr = $line->beg - 1; - } elsif ($key eq 'j' && $line->end < $self->nrow - 1) { - $cr = $line->end + 1; - } elsif ($key eq 'h' && $self->{offset} > 0) { - $self->{offset} = $line->offset_of($cr, $cc) - 1; - $self->{dollar} = 0; - } elsif ($key eq 'l' && $self->{offset} < $line->l - 1) { - ++$self->{offset}; - } elsif ($key eq 'f' || $key eq 'd') { - my $vs = $self->view_start() + - ($key eq 'd' ? $self->nrow / 2 : $self->nrow - 1); - $vs = 0 if $vs > 0; - $cr += $vs - $self->view_start($vs); - } elsif ($key eq 'b' || $key eq 'u') { - my $vs = $self->view_start() - - ($key eq 'u' ? $self->nrow / 2 : $self->nrow - 1); - $vs = $self->top_row if $vs < $self->top_row; - $cr += $vs - $self->view_start($vs); - } elsif ($key eq 'g') { - ($cr, $self->{offset}) = ($self->top_row, 0); - $self->{dollar} = 0; - } elsif ($key eq 'G') { - ($cr, $self->{offset}) = ($self->nrow - 1, 0); - $self->{dollar} = 0; - } elsif ($key eq '0') { - $self->{offset} = 0; - $self->{dollar} = 0; - } elsif ($key eq '^') { - my $ltxt = $self->special_decode($line->t); - while ($ltxt =~ s/^( *)\t/$1 . " " x (8 - length($1) % 8)/e) {} - $self->{offset} = $ltxt =~ m/^ +/ ? $+[0] : 0; - $self->{dollar} = 0; - } elsif ($key eq '$') { - my $co = $line->offset_of($cr, $cc); - $self->{dollar} = $co + 1; - $self->{offset} = $line->l - 1; - } elsif ($key eq 'H') { - $cr = $self->view_start(); - } elsif ($key eq 'M') { - $cr = $self->view_start() + $self->nrow / 2; - } elsif ($key eq 'L') { - $cr = $self->view_start() + $self->nrow - 1; - } - - $line = $self->line($cr); - $cc = $self->{dollar} || $self->{offset} >= $line->l ? $line->l - 1 : - $self->{offset}; - $self->screen_cur($line->coord_of($cc)); - - status_area($self); - $self->want_refresh(); - - () -} - - -sub move_to { - my ($self, $key) = @_; - my ($cr, $cc) = $self->screen_cur(); - my $line = $self->line($cr); - my $offset = $self->{offset}; - my ($dir, $pattern); - my ($wrap, $found) = (0, 0); - - if ($key eq ';' || $key eq ',') { - $dir = $self->{move_dir} * ($key eq ',' ? -1 : 1); - $pattern = $self->{patterns}{sprintf('f%+d', $dir)}; - return if not $pattern; - } else { - if (lc($key) eq 'b') { - $dir = -1; - } else { - $dir = 1; - ++$offset if lc($key) eq 'e'; - } - $pattern = $self->{patterns}{$key}; - $wrap = 1; - } - - if ($dir > 0) { - NEXTDOWN: my $text = substr($line->t, $offset); - if ($text =~ m/$pattern/) { - $offset += $+[0] - 1; - $found = 1; - } elsif ($wrap && $line->end + 1 < $self->nrow) { - $cr = $line->end + 1; - $line = $self->line($cr); - $offset = 0; - if (lc($key) eq 'e') { - goto NEXTDOWN; - } else { - $found = 1; - } - } - } elsif ($dir < 0) { - NEXTUP: my $text = substr($line->t, 0, $offset); - if ($text =~ m/$pattern/) { - $offset += $+[0] - length($text) - 1; - $found = 1; - } elsif ($wrap) { - if ($offset > 0) { - $offset = 0; - $found = 1; - } elsif ($line->beg > $self->top_row) { - $cr = $line->beg - 1; - $line = $self->line($cr); - $offset = $line->l; - goto NEXTUP; - } - } - } - - if ($found) { - $self->{dollar} = 0; - $self->{offset} = $offset; - $self->screen_cur($line->coord_of($offset)); - $self->want_refresh(); - } - - () -} - - -sub find_next { - my ($self, $dir) = @_; - - return if not $self->{pattern}; - $dir = $self->{search_dir} if not $dir; - - my ($cr, $cc) = $self->screen_cur(); - my $line = $self->line($cr); - my $offset = $line->offset_of($cr, $cc); - my $text; - my $found = 0; - - ++$offset if $dir > 0; - - while (not $found) { - if ($dir > 0) { - $text = substr($line->t, $offset); - if ($text =~ m/$self->{pattern}/) { - $found = 1; - $offset += $-[0]; - } else { - last if $line->end >= $self->nrow; - $line = $self->line($line->end + 1); - $offset = 0; - } - } else { - $text = substr($line->t, 0, $offset); - if ($text =~ m/$self->{pattern}/) { - $found = 1; - $offset = $-[0] while $text =~ m/$self->{pattern}/g; - } else { - last if $line->beg <= $self->top_row; - $line = $self->line($line->beg - 1); - $offset = $line->l; - } - } - } - - if ($found) { - $self->{dollar} = 0; - $self->{offset} = $offset; - $self->screen_cur($line->coord_of($offset)); - status_area($self); - $self->want_refresh(); - } - - return $found; -} - - -sub tt_write { - return 1; -} - - -sub refresh { - my ($self) = @_; - my $reverse_cursor = $self->{select} ne 'l'; - my ($cr, $cc) = $self->screen_cur(); - - if ($self->{select}) { - my ($br, $bc, $er, $ec) = calc_span($self); - - if ($self->{select} eq 'b') { - delete $self->{selection} if $self->{selection}; - my $co = $self->line($cr)->offset_of($cr, $cc); - my $dollar = $self->{dollar} && $co >= $self->{dollar} - 1; - - my $r = $br; - while ($r <= $er) { - my $line = $self->line($r); - if ($bc < $line->l) { - $ec = $line->l if $dollar; - $self->{selection} .= substr($line->t, $bc, $ec - $bc); - my ($br, $bc) = $line->coord_of($bc); - my ($er, $ec) = $line->coord_of($ec <= $line->l ? $ec : $line->l); - $self->scr_xor_span($br, $bc, $er, $ec, urxvt::RS_RVid); - } elsif ($r == $cr) { - $reverse_cursor = 0; - } - $self->{selection} .= "\n" if $line->end < $er; - $r = $line->end + 1; - } - } else { - $self->scr_xor_span($br, $bc, $er, $ec, urxvt::RS_RVid); - } - - if ($reverse_cursor) { - # make the cursor visible again - $self->scr_xor_span($cr, $cc, $cr, $cc + 1, urxvt::RS_RVid); - } - } - - # scroll the current cursor position into visible area - if ($cr < $self->view_start()) { - $self->view_start($cr); - } elsif ($cr >= $self->view_start() + $self->nrow) { - $self->view_start($cr - $self->nrow + 1); - } - - () -} - - -sub activate { - my ($self, $search) = @_; - - $self->{active} = 1; - - $self->{select} = ''; - $self->{dollar} = 0; - $self->{move_to} = 0; - - if ($search) { - $self->{search} = '?'; - $self->{search_dir} = -1; - $self->{search_mode} = 1; - } else { - $self->{search} = ''; - $self->{search_mode} = 0; - } - - ($self->{oldcr}, $self->{oldcc}) = $self->screen_cur(); - ($self->{srhcr}, $self->{srhcc}) = $self->screen_cur(); - $self->{old_view_start} = $self->view_start(); - $self->{old_pty_ev_events} = $self->pty_ev_events(urxvt::EV_NONE); - - my $line = $self->line($self->{oldcr}); - $self->{offset} = $line->offset_of($self->{oldcr}, $self->{oldcc}); - - $self->selection_beg(1, 0); - $self->selection_end(1, 0); - - $self->enable( - key_press => \&key_press, - refresh_begin => \&refresh, - refresh_end => \&refresh, - tt_write => \&tt_write, - ); - - if ($self->{offset} >= $line->l) { - $self->{offset} = $line->l > 0 ? $line->l - 1 : 0; - $self->screen_cur($line->coord_of($self->{offset})); - $self->want_refresh(); - } - - $self->{overlay_len} = 0; - status_area($self); - - () -} - - -sub deactivate { - my ($self) = @_; - - $self->selection_beg(1, 0); - $self->selection_end(1, 0); - - delete $self->{overlay} if $self->{overlay}; - delete $self->{selection} if $self->{selection}; - - $self->disable("key_press", "refresh_begin", "refresh_end", "tt_write"); - $self->screen_cur($self->{oldcr}, $self->{oldcc}); - $self->view_start($self->{old_view_start}); - $self->pty_ev_events($self->{old_pty_ev_events}); - - $self->want_refresh(); - - $self->{active} = 0; - - () -} - - -sub status_area { - my ($self, $extra) = @_; - my ($stat, $stat_len); - - if ($self->{search}) { - $stat_len = $self->ncol; - $stat = $self->{search} . ' ' x ($stat_len - length($self->{search})); - } else { - if ($self->{select}) { - $stat = "-V" . ($self->{select} ne 'n' ? uc($self->{select}) : "") . "- "; - } - - if ($self->top_row == 0) { - $stat .= "All"; - } elsif ($self->view_start() == $self->top_row) { - $stat .= "Top"; - } elsif ($self->view_start() == 0) { - $stat .= "Bot"; - } else { - $stat .= sprintf("%2d%%", - ($self->top_row - $self->view_start) * 100 / $self->top_row); - } - - $stat = "$extra $stat" if $extra; - $stat_len = length($stat); - } - - if (!$self->{overlay} || $self->{overlay_len} != $stat_len) { - delete $self->{overlay} if $self->{overlay}; - $self->{overlay} = $self->overlay(-1, -1, $stat_len, 1, - urxvt::OVERLAY_RSTYLE, 0); - $self->{overlay_len} = $stat_len; - } - - $self->{overlay}->set(0, 0, $self->special_encode($stat)); - $self->{overlay}->show(); - - () -} - - -sub toggle_select { - my ($self, $mode) = @_; - - if ($self->{select} eq $mode) { - $self->{select} = ''; - } else { - if (not $self->{select}) { - ($self->{ar}, $self->{ac}) = $self->screen_cur(); - } - $self->{select} = $mode; - } - - status_area($self); - $self->want_refresh(); - - () -} - - -sub calc_span { - my ($self) = @_; - my ($cr, $cc) = $self->screen_cur(); - my ($br, $bc, $er, $ec); - - if ($self->{select} eq 'b') { - $br = $self->line($cr)->beg; - $bc = $self->line($cr)->offset_of($cr, $cc); - $er = $self->line($self->{ar})->beg; - $ec = $self->line($self->{ar})->offset_of($self->{ar}, $self->{ac}); - ($br, $er) = ($er, $br) if $br > $er; - ($bc, $ec) = ($ec, $bc) if $bc > $ec; - } else { - if ($cr < $self->{ar}) { - ($br, $bc, $er, $ec) = ($cr, $cc, $self->{ar}, $self->{ac}); - } elsif ($cr > $self->{ar}) { - ($br, $bc, $er, $ec) = ($self->{ar}, $self->{ac}, $cr, $cc); - } else { - ($br, $er) = ($cr, $cr); - ($bc, $ec) = $cc < $self->{ac} ? ($cc, $self->{ac}) : ($self->{ac}, $cc); - } - } - - if ($self->{select} eq 'l') { - ($br, $er) = ($self->line($br)->beg, $self->line($er)->end); - ($bc, $ec) = (0, $self->ncol); - } else { - ++$ec; - } - - return ($br, $bc, $er, $ec); -} diff --git a/urxvt/ext/rotate-colors b/urxvt/ext/rotate-colors deleted file mode 100644 index 0016d6a..0000000 --- a/urxvt/ext/rotate-colors +++ /dev/null @@ -1,92 +0,0 @@ -#! /usr/bin/env perl -w -# Author: John Tyree -# Website: http://github.com/johntyree/urxvt-perls/blob/master/rotate-colors -# License: CCBYNC - -# Use keyboard shortcuts to load colors of the form *.colorN:XXXXXX from a file -# This gives us "on demand" theme switching. - -# Usage: put the following lines in your .Xdefaults/.Xresources: -# URxvt.perl-ext-common: ...,rotate-colors -# URxvt.rotate-colors.files: ~/.Xresources,~/light.txt,~/dark.txt -# URxvt.keysym.M-C-n: perl:rotate-colors:next -# URxvt.keysym.M-C-p: perl:rotate-colors:prev - -use strict; - - -sub on_start { - my ($self) = @_; - $self->{current_index} = -1; - my @arr = split(/,/, $self->x_resource('files') || ''); - $self->{color_files} = \@arr; - - () -} - -sub read_colors { - my $fn = shift; - open my $fin, $fn or print STDERR "Unable to open $fn for reading"; - my %colors; - - while (my $line = <$fin>) { - if ($line =~ /(\w+)\s*:\s*(#[0-9a-fA-F]+)/) { - $colors{$1} = $2; - } - } - - return %colors -} - -sub escape_seq { - my ($k, $v) = @_; - my $cmd = ""; - if ($k =~ /^color(\d+)$/) { - $cmd = "4;$1;$v"; - } elsif ($k =~ /^colorBD$/) { - $cmd = "5;0;$v"; - } elsif ($k =~ /^colorUL$/) { - $cmd = "5;1;$v"; - } elsif ($k =~ /^colorBL$/) { - $cmd = "5;2;$v"; - } elsif ($k =~ /^colorRV$/) { - $cmd = "5;3;$v"; - } elsif ($k =~ /^foreground$/) { - $cmd = "10;$v"; - } elsif ($k =~ /^background$/) { - $cmd = "11;$v"; - } elsif ($k =~ /^cursorColor$/) { - $cmd = "12;$v"; - } elsif ($k =~ /^pointerColor$/) { - $cmd = "13;$v"; - } - - return '\033]'.$cmd.'\007' -} - -sub build_cmd { - my $fn = shift; - my %colors = read_colors($fn); - print $fn."\n"; - my $s = join("", map {escape_seq($_, $colors{$_})} keys %colors); - - return $s -} - -sub on_user_command { - my ($self, $cmd) = @_; - my @fs = @{$self->{color_files}}; - my $len = @fs; - - if ($cmd eq "rotate-colors:next") { - my $idx = $self->{current_index}++; - my $fn = $fs[$idx % scalar(@fs)]; - $self->cmd_parse(build_cmd($fn)); - } elsif ($cmd eq "rotate-colors:prev") { - my $idx = $self->{current_index}--; - my $fn = $fs[$idx % scalar(@fs)]; - $self->cmd_parse(build_cmd($fn)); - } - - () -} diff --git a/urxvt/ext/url-select b/urxvt/ext/url-select deleted file mode 100644 index dc80496..0000000 --- a/urxvt/ext/url-select +++ /dev/null @@ -1,403 +0,0 @@ -#! perl -w -# Author: Bert Muennich -# Website: http://www.github.com/muennich/urxvt-perls -# Based on: http://www.jukie.net/~bart/blog/urxvt-url-yank -# License: GPLv2 - -# Use keyboard shortcuts to select URLs. -# This should be used as a replacement for the default matcher extension, -# it also makes URLs clickable with the middle mouse button. - -# Usage: put the following lines in your .Xdefaults/.Xresources: -# URxvt.perl-ext-common: ...,url-select -# URxvt.keysym.M-u: perl:url-select:select_next - -# Use Meta-u to activate URL selection mode, then use the following keys: -# j/k: Select next downward/upward URL (also with arrow keys) -# g/G: Select first/last URL (also with home/end key) -# o/Return: Open selected URL in browser, Return: deactivate afterwards -# y: Copy (yank) selected URL and deactivate selection mode -# q/Escape: Deactivate URL selection mode - -# Options: -# URxvt.url-select.autocopy: If true, selected URLs are copied to PRIMARY -# URvxt.url-select.button: Mouse button to click-open URLs (default: 2) -# URxvt.url-select.launcher: Browser/command to open selected URL with -# URxvt.url-select.underline: If set to true, all URLs get underlined - -use strict; - -# The custom rendition bit to use for marking the cell as being underlined -# by us so we can unset it again after a line has changed. -use constant UNDERLINED => 1<<3; # arbitrarily chosen in hope of no collision - -sub on_start { - my ($self) = @_; - - # read resource settings - if ($self->x_resource('url-select.launcher')) { - @{$self->{browser}} = split /\s+/, $self->x_resource('url-select.launcher'); - } else { - @{$self->{browser}} = ('x-www-browser'); - } - if ($self->x_resource('url-select.underline') eq 'true') { - $self->enable(line_update => \&line_update); - } - if ($self->x_resource('url-select.autocopy') eq 'true') { - $self->{autocopy} = 1; - } - - $self->{state} = 0; - - for my $mod (split '', $self->x_resource("url-select.button") || - $self->x_resource("matcher.button") || 2) { - if ($mod =~ /^\d+$/) { - $self->{button} = $mod; - } elsif ($mod eq "C") { - $self->{state} |= urxvt::ControlMask; - } elsif ($mod eq "S") { - $self->{state} |= urxvt::ShiftMask; - } elsif ($mod eq "M") { - $self->{state} |= $self->ModMetaMask; - } elsif ($mod ne "-" && $mod ne " ") { - warn("invalid button/modifier in $self->{_name}<$self->{argv}[0]>: $mod\n"); - } - } - - if ($self->x_resource('matcher.pattern')) { - @{$self->{pattern}} = ($self->x_resource('matcher.pattern')); - } elsif ($self->x_resource('matcher.pattern.0')) { - my $current = 0; - - while (defined (my $res = $self->x_resource("matcher.pattern.$current"))) { - $res = $self->locale_decode($res); - utf8::encode $res; - push @{$self->{pattern}}, qr($res)x; - $current++; - } - } else { - @{$self->{pattern}} = qr{ - (?:https?://|ftp://|news://|mailto:|file://|\bwww\.) - [\w\-\@;\/?:&=%\$.+!*\x27,~#]* - ( - \([\w\-\@;\/?:&=%\$.+!*\x27,~#]*\) # Allow a pair of matched parentheses - | # - [\w\-\@;\/?:&=%\$+*~] # exclude some trailing characters (heuristic) - )+ - }x; - } - - () -} - - -sub line_update { - my ($self, $row) = @_; - - my $line = $self->line($row); - my $text = $line->t; - my $rend = $line->r; - - # clear all underlines that were set by us - for (@$rend) { - if (urxvt::GET_CUSTOM($_) & UNDERLINED) { - $_ = urxvt::SET_CUSTOM($_, urxvt::GET_CUSTOM($_) & ~UNDERLINED) & - ~urxvt::RS_Uline; - } - } - - for my $pattern (@{$self->{pattern}}) { - while ($text =~ /$pattern/g) { - my $url = $&; - my ($beg, $end) = ($-[0], $+[0] - 1); - - for (@{$rend}[$beg .. $end]) { - unless ($_ & urxvt::RS_Uline) { - $_ = urxvt::SET_CUSTOM($_, urxvt::GET_CUSTOM($_) | UNDERLINED); - $_ |= urxvt::RS_Uline; - } - } - } - } - - $line->r($rend); - - () -} - -sub on_action { - my ($self, $action) = @_; - - on_user_command($self, "url-select:" . $action); -} - - -sub on_user_command { - my ($self, $cmd) = @_; - - if ($cmd eq 'url-select:select_next') { - if (not $self->{active}) { - activate($self); - } - select_next($self, -1); - } - - () -} - - -sub key_press { - my ($self, $event, $keysym) = @_; - my $char = chr($keysym); - - if ($keysym == 0xff1b || lc($char) eq 'q' || - (lc($char) eq 'c' && $event->{state} & urxvt::ControlMask)) { - deactivate($self); - } elsif ($keysym == 0xff0d || $char eq 'o') { - $self->exec_async(@{$self->{browser}}, ${$self->{found}[$self->{n}]}[4]); - deactivate($self) unless $char eq 'o'; - } elsif ($char eq 'y') { - my $found = $self->{found}[$self->{n}]; - $self->selection_beg(${$found}[0], ${$found}[1]); - $self->selection_end(${$found}[2], ${$found}[3]); - $self->selection_make($event->{time}); - $self->selection_beg(1, 0); - $self->selection_end(1, 0); - deactivate($self); - } elsif ($char eq 'k' || $keysym == 0xff52 || $keysym == 0xff51) { - select_next($self, -1, $event); - } elsif ($char eq 'j' || $keysym == 0xff54 || $keysym == 0xff53) { - select_next($self, 1, $event); - } elsif ($char eq 'g' || $keysym == 0xff50) { - $self->{row} = $self->top_row - 1; - delete $self->{found}; - select_next($self, 1, $event); - } elsif ($char eq 'G' || $keysym == 0xff57) { - $self->{row} = $self->nrow; - delete $self->{found}; - select_next($self, -1, $event); - } - - return 1; -} - - -sub on_button_press { - my ($self, $event) = @_; - - my $mask = $self->ModLevel3Mask | $self->ModMetaMask | - urxvt::ShiftMask | urxvt::ControlMask; - - if ($event->{button} == $self->{button} && ($event->{state} & $mask) == $self->{state}) { - my $col = $event->{col}; - my $row = $event->{row}; - my $line = $self->line($row); - my $text = $line->t; - - for my $pattern (@{$self->{pattern}}) { - while ($text =~ /$pattern/g) { - my ($url, $beg, $end) = ($&, $-[0], $+[0]); - --$end if $url =~ s/["')]$//; - - if ($col >= $beg && $col <= $end) { - $self->{button_pressed} = 1; - $self->{button_col} = $col; - $self->{button_row} = $row; - $self->{button_url} = $url; - return 1; - } - } - } - } - - () -} - -sub on_button_release { - my ($self, $event) = @_; - - if ($self->{button_pressed} && $event->{button} == $self->{button}) { - my $col = $event->{col}; - my $row = $event->{row}; - - $self->{button_pressed} = 0; - - if ($col == $self->{button_col} && $row == $self->{button_row}) { - $self->exec_async(@{$self->{browser}}, $self->{button_url}); - return 1; - } - } - - () -} - - -sub select_next { - # $dir < 0: up, > 0: down - my ($self, $dir, $event) = @_; - my $row = $self->{row}; - - if (($dir < 0 && $self->{n} > 0) || - ($dir > 0 && $self->{n} < $#{ $self->{found} })) { - # another url on current line - $self->{n} += $dir; - hilight($self); - if ($self->{autocopy}) { - my $found = $self->{found}[$self->{n}]; - $self->selection_beg(${$found}[0], ${$found}[1]); - $self->selection_end(${$found}[2], ${$found}[3]); - $self->selection_make($event->{time}); - $self->selection_beg(1, 0); - $self->selection_end(1, 0); - } - return; - } - - while (($dir < 0 && $row > $self->top_row) || - ($dir > 0 && $row < $self->nrow - 1)) { - my $line = $self->line($row); - $row = ($dir < 0 ? $line->beg : $line->end) + $dir; - $line = $self->line($row); - my $text = $line->t; - - for my $pattern (@{$self->{pattern}}) { - if ($text =~ /$pattern/g) { - delete $self->{found}; - - do { - my ($beg, $end) = ($-[0], $+[0]); - push @{$self->{found}}, [$line->coord_of($beg), - $line->coord_of($end), substr($text, $beg, $end - $beg)]; - } while ($text =~ /$pattern/g); - - $self->{row} = $row; - $self->{n} = $dir < 0 ? $#{$self->{found}} : 0; - hilight($self); - if ($self->{autocopy}) { - my $found = $self->{found}[$self->{n}]; - $self->selection_beg(${$found}[0], ${$found}[1]); - $self->selection_end(${$found}[2], ${$found}[3]); - $self->selection_make($event->{time}); - $self->selection_beg(1, 0); - $self->selection_end(1, 0); - } - return; - } - } - } - - deactivate($self) unless $self->{found}; - - () -} - - -sub hilight { - my ($self) = @_; - - if ($self->{found}) { - if ($self->{row} < $self->view_start() || - $self->{row} >= $self->view_start() + $self->nrow) { - # scroll selected url into visible area - my $top = $self->{row} - ($self->nrow >> 1); - $self->view_start($top < 0 ? $top : 0); - } - - status_area($self); - $self->want_refresh(); - } - - () -} - - -sub refresh { - my ($self) = @_; - - if ($self->{found}) { - $self->scr_xor_span(@{$self->{found}[$self->{n}]}[0 .. 3], urxvt::RS_RVid); - } - - () -} - - -sub status_area { - my ($self) = @_; - - my $row = $self->{row} < 0 ? - $self->{row} - $self->top_row : abs($self->top_row) + $self->{row}; - my $text = sprintf("%d,%d ", $row + 1, $self->{n} + 1); - - if ($self->top_row == 0) { - $text .= "All"; - } elsif ($self->view_start() == $self->top_row) { - $text .= "Top"; - } elsif ($self->view_start() == 0) { - $text .= "Bot"; - } else { - $text .= sprintf("%2d%", - ($self->top_row - $self->view_start) * 100 / $self->top_row); - } - - my $text_len = length($text); - - if ($self->{overlay_len} != $text_len) { - delete $self->{overlay} if $self->{overlay}; - $self->{overlay} = $self->overlay(-1, -1, $text_len, 1, - urxvt::OVERLAY_RSTYLE, 0); - $self->{overlay_len} = $text_len; - } - - $self->{overlay}->set(0, 0, $self->special_encode($text)); - $self->{overlay}->show(); - - () -} - - -sub tt_write { - return 1; -} - - -sub activate { - my ($self) = @_; - - $self->{active} = 1; - - $self->{row} = $self->view_start() + $self->nrow; - $self->{n} = 0; - $self->{overlay_len} = 0; - $self->{button_pressed} = 0; - - $self->{view_start} = $self->view_start(); - $self->{pty_ev_events} = $self->pty_ev_events(urxvt::EV_NONE); - - $self->enable( - key_press => \&key_press, - refresh_begin => \&refresh, - refresh_end => \&refresh, - tt_write => \&tt_write, - ); - - () -} - - -sub deactivate { - my ($self) = @_; - - $self->disable("key_press", "refresh_begin", "refresh_end", "tt_write"); - $self->view_start($self->{view_start}); - $self->pty_ev_events($self->{pty_ev_events}); - - delete $self->{overlay} if $self->{overlay}; - delete $self->{found} if $self->{found}; - - $self->want_refresh(); - - $self->{active} = 0; - - () -} diff --git a/vifm/colors/default b/vifm/colors/default deleted file mode 100644 index c3c72dd..0000000 --- a/vifm/colors/default +++ /dev/null @@ -1,52 +0,0 @@ -" You can edit this file by hand. -" The " character at the beginning of a line comments out the line. -" Blank lines are ignored. - -" The Default color scheme is used for any directory that does not have -" a specified scheme and for parts of user interface like menus. A -" color scheme set for a base directory will also -" be used for the sub directories. - -" The standard ncurses colors are: -" Default = -1 = None, can be used for transparency or default color -" Black = 0 -" Red = 1 -" Green = 2 -" Yellow = 3 -" Blue = 4 -" Magenta = 5 -" Cyan = 6 -" White = 7 - -" Available style values (some of them can be combined): -" bold -" underline -" reverse or inverse -" standout -" none - -" Vifm supports 256 colors you can use color numbers 0-255 -" (requires properly set up terminal: set your TERM environment variable -" (directly or using resources) to some color terminal name (e.g. -" xterm-256color) from /usr/lib/terminfo/; you can check current number -" of colors in your terminal with tput colors command) - -" highlight group cterm=style ctermfg=foreground_color ctermbg=background_color - -highlight Win cterm=none ctermfg=white ctermbg=black -highlight Directory cterm=bold ctermfg=cyan ctermbg=default -highlight Link cterm=bold ctermfg=yellow ctermbg=default -highlight BrokenLink cterm=bold ctermfg=red ctermbg=default -highlight Socket cterm=bold ctermfg=magenta ctermbg=default -highlight Device cterm=bold ctermfg=red ctermbg=default -highlight Fifo cterm=bold ctermfg=cyan ctermbg=default -highlight Executable cterm=bold ctermfg=green ctermbg=default -highlight Selected cterm=bold ctermfg=magenta ctermbg=default -highlight CurrLine cterm=bold ctermfg=default ctermbg=blue -highlight TopLine cterm=none ctermfg=black ctermbg=white -highlight TopLineSel cterm=bold ctermfg=black ctermbg=default -highlight StatusLine cterm=bold ctermfg=black ctermbg=white -highlight WildMenu cterm=underline,reverse ctermfg=white ctermbg=black -highlight CmdLine cterm=none ctermfg=white ctermbg=black -highlight ErrorMsg cterm=none ctermfg=red ctermbg=black -highlight Border cterm=none ctermfg=black ctermbg=white diff --git a/vifm/colors/matrix b/vifm/colors/matrix deleted file mode 100644 index 70a9f76..0000000 --- a/vifm/colors/matrix +++ /dev/null @@ -1,21 +0,0 @@ -highlight Win cterm=none ctermfg=green ctermbg=black - -highlight TopLine cterm=none ctermfg=green ctermbg=none -highlight TopLineSel cterm=none ctermfg=green ctermbg=none -highlight StatusLine cterm=none ctermfg=green ctermbg=none -highlight Border cterm=none ctermfg=green ctermbg=none - -highlight Selected cterm=bold ctermfg=red ctermbg=default -highlight CurrLine cterm=bold ctermfg=black ctermbg=green - -highlight WildMenu cterm=underline,reverse ctermfg=white ctermbg=black -highlight CmdLine cterm=none ctermfg=white ctermbg=black -highlight ErrorMsg cterm=none ctermfg=red ctermbg=black - -highlight Directory cterm=none ctermfg=blue ctermbg=default -highlight Link cterm=none ctermfg=yellow ctermbg=default -highlight BrokenLink cterm=none ctermfg=red ctermbg=default -highlight Socket cterm=none ctermfg=yellow ctermbg=default -highlight Device cterm=none ctermfg=yellow ctermbg=default -highlight Fifo cterm=none ctermfg=yellow ctermbg=default -highlight Executable cterm=none ctermfg=green ctermbg=default diff --git a/vifm/colorschemes b/vifm/colorschemes deleted file mode 100644 index 006bb44..0000000 --- a/vifm/colorschemes +++ /dev/null @@ -1,37 +0,0 @@ -# You can edit this file by hand. -# The # character at the beginning of a line comments out the line. -# Blank lines are ignored. - -# The Default color scheme is used for any directory that does not have -# a specified scheme. A color scheme set for a base directory will also -# be used for the sub directories. - -# The standard ncurses colors are: -# Black = 0 -# Red = 1 -# Green = 2 -# Yellow = 3 -# Blue = 4 -# Magenta = 5 -# Cyan = 6 -# White = 7 - -# COLORSCHEME=OneWordDescription -# DIRECTORY=/Full/Path/To/Base/Directory -# COLOR=Window_name=foreground_color_number=background_color_number - - -COLORSCHEME=Default -DIRECTORY=/ -COLOR=MENU=white=black -COLOR=BORDER=black=white -COLOR=WIN=white=black -COLOR=STATUS_BAR=white=black -COLOR=CURR_LINE=white=blue -COLOR=DIRECTORY=cyan=black -COLOR=LINK=yellow=black -COLOR=SOCKET=magenta=black -COLOR=DEVICE=red=black -COLOR=EXECUTABLE=green=black -COLOR=SELECTED=magenta=black -COLOR=CURRENT=blue=black diff --git a/vifm/vifm-help.txt b/vifm/vifm-help.txt deleted file mode 100644 index 2b6bbba..0000000 --- a/vifm/vifm-help.txt +++ /dev/null @@ -1,226 +0,0 @@ -The basic vi key bindings are used to move through the files and popup - windows. - - k is up - j is down - - h is updir - l is handle file and is the same as Return. - - Ctrl-c or the Escape key will cancel most operations. - Ctrl-l will clear and redraw the screen. - - gg top of list - G bottom of list - cw change word is used to rename a file. - m [a-z][A-Z][0-9] to set bookmark - ' letter to goto bookmark - v start or stop visualy selecting files. This works with the j and k keys - for movement. This is different then in vi in that v in visual mode will - leave the selected files highlighted. If you want to clear the selected - files Ctrl-c or Esc will unselect the files. - dd - the default setting is to move the selected files to the trash - directory. - yy - will yank the selected files. - p - will copy the yanked files to the current directory or move the files - to the current directory if they were deleted with dd or :d or if the - files were yanked 'yy' from the Trash directory. - - Space or Tab to switch lists. - - Most movement commands also accept a count 12j would move down 12 lines. - [count] % percent of file list - [count] j or k - [count] G or gg - [count] dd or yy the count is from the current file downward. - :[count] user command is not yet implemented. - :[count] command - The only builtin :[count] command is :[count]d[elete]. :3d would delete - three files starting at the current file position moving down. - - :number - move to the line number :12 would move to the 12th line. - :0 move to the top of the list. - :$ move to the bottom of the list. - - Return or l - handle file - Default file type program or if on a directory enter the directory - - Ctrl-g toggles full file information window. - Ctrl-b - jump back one page. - Ctrl-f - jump forward one page. - - /regular expression pattern - will highlight all files matching the pattern - in the current file list. /\.c$ would highlight all the .c files. - N find previous match. - n find next match. - - Files can also be tagged or selected with 't'. Pressing 't' on a selected - file will unselect it. This can be used by itself to select files or with a - /search pattern or with visually selected files. - - :commands - :com is a menu of user commands - :com name action - will set a new user command - Unlike vim user commands do not have to start with a capital letter. - User commands are run in a shell by default. To run a command in - the background you must set it as a background command with & at the end - of the commands action. - :com rm rm %f & - - :apropos manpage - will create a menu with the results from the - apropos command. - :com! name action - will overwrite a preciously set command. - :delc command_name will remove the command_name user command - :fil regular_expression pattern will filter the files out of the directory - listing that match the regular expression. - :fil \.o$ - would filter all files ending in .o from the filelist. - :empty will permanently remove 'rm -fr' files from the Trash directory. - :locate filename - will create a menu with the results from the locate - command. - :sh will start a shell - :q or :x will exit vifm - :! program will execute the program in a shell - :!command & will run the process in the background. - programs that write to stdout like ls will create an error message - showing partial output of the command. - :!! same as :! but will pause the screen before returning to vifm. - :!!ls -l - :e load file into vi - :only - switch to a one window view. - :pwd - show the present working directory - :ch[ange] - create a menu window to alter a files properties. - :cd - change directory - :cd ~/bin - :s[ort] - popup menu of different sorting methods - :sp[lit] - switch to a two window view. - :his[tory] - popup menu of directories visited - :jobs - shows menu of current backgrounded processes. - :view - toggle on and off the quick file view. - :h[elp] - this crude help file - :marks - popup menu of bookmarks - :screen toggles whether to use the screen program or not. - :sync - change the other panel to the current panel directory. - - -command macros - %a user arguments - %f all of the selected files - %F all of the selected files in the other directory list. - %d current directory name - %D other file list directory name - :com mv mv %f %D - would set the mv command to mv all of the selected files to the other - directory. - - If you want a command to accept arguments you must use %a. - :com mkdir mkdir %a & - :com mygrep vim "+grep %a" - %a is simply replaced with the user arguments and the arguments are - considered to be optional. - :com lsl ls -l %a | less - would run ls -l | less with or without - an argument being given. - -search patterns can be set with :com name /pattern - :com backup /~$ - - - file filters - The basic vim folding key bindings are used for filtering files. - zO show the filtered files - zM Filter the files matching the filename filter. - zo show all the dot files - zm filter all the .dot files - zf filter all the selected files - This will work with all selecting methods. Visually selecting files, - using a / search pattern or in combination with 't'. - :fil[ter] regular expression - :in[vert] invert the filter - All directorys will show the ../ file no matter what the filter setting is - with the exception of the / directory. - Each file list has its own filter. - filtered files are not checked in / search or :commands - - file name filters can be set with :com name fil pattern - :com ofiles fil \.o$ - -Configuration. - - The default configuration file is ~/.vifm/vifmrc. - If you want to change any settings vifm must not be running when you edit - the file as it will overwrite any changes you make when it exits. - - Screen configuration. If you use the screen program, vifm can be configured - to use a new screen window for opening files or running :!programs. - -Misc. - Ctrl-c or Escape to clear all selected files - - vifm.vim is a vim plugin that allows the use of vifm from vim. It is - included in the source tarball but it is not installed by default and must - be manually placed in either the default vim/plugin directory or in - ~/.vim/plugin/ - To use vifm to load a file into a running vim use the following commands: - :Edit - open a file in the current buffer. - :Split - split the buffer and open a file. - :Vsplit - vertically split a buffer and open a file. - :Diff - open a file to compare to the current file using the vim :diff - command. - You can edit the vifm.vim script to change the command name used if they - conflict with other user commands. - - Starting options: - /full/path/to/directoryone - using vifm /usr/local will start vifm - with the /usr/local directory. The default is to start vifm in - the current directory. - /full/path/to/directorytwo - using two full paths will start vifm with - the first path in the left file list and the second path in the right - file list. - --version - will print the version number and exit. - --help - will show help file. - -f - will run vifm but selecting a file will write the file name to - ~/.vifm/vimfiles instead of opening the file. This is used for the - vifm.vim script to load files from vifm into a running vim. - -Menus - bookmarks escape or Ctrl-c to abort j and k to move through - dd on a bookmark to remove. - - sort menu j and k to move - Escape or Ctrl-c to clear - return or l to - select and exit the menu. - -Reserved :commands - ! - change - cd - cmap - com - d - delc - e - empty - fi - fil - file - filter - h - help - his - history - in - invert - map - marks - nmap - pw - pwd - q - s - screen - sh - sort - unmap - view - vifm - vmap - x - diff --git a/vifm/vifmrc b/vifm/vifmrc deleted file mode 100644 index b6efb37..0000000 --- a/vifm/vifmrc +++ /dev/null @@ -1,126 +0,0 @@ -" vim: filetype=vifm : -" You can edit this file by hand. -" The " character at the beginning of a line comments out the line. -" Blank lines are ignored. -" The basic format for each item is shown with an example. - -" This is the actual command used to start vi. The default is vim. -" If you would like to use another vi clone such Elvis or Vile -" you will need to change this setting. - -set vicmd=vim -" set vicmd=elvis\ -G\ termcap -" set vicmd=vile - -" Trash Directory -" The default is to move files that are deleted with dd or :d to -" the trash directory. If you change this you will not be able to move -" files by deleting them and then using p to put the file in the new location. -" I recommend not changing this until you are familiar with vifm. -" This probably shouldn't be an option. - -set trash - -" This is how many directories to store in the directory history. - -set history=100 - -" Follow links on l or Enter. - -set followlinks - -" With this option turned on you can run partially entered commands with -" unambiguous beginning using :! (e.g. :!Te instead of :!Terminal or :!Te). - -set nofastrun - -" Natural sort of (version) numbers within text. - -set nosortnumbers - -" Maximum number of changes that can be undone. - -set undolevels=100 - -" If you installed the vim.txt help file set vimhelp. -" If would rather use a plain text help file set novimhelp. - -set novimhelp - -" If you would like to run an executable file when you -" press return on the file name set this. - -set norunexec - -" Use KiB, MiB, ... instead of K, M, ... - -set noiec - -" Selected color scheme - -colorscheme matrix - -" The FUSE_HOME directory will be used as a root dir for all FUSE mounts. -" Unless it exists with write/exec permissions set, vifm will attempt to -" create it. - -set fusehome=/tmp/vifm_FUSE - -" Format for displaying time in file list. For example: -" set timefmt=%m/%d-%H:%M -" See man date or man strftime for details. - -set timefmt=\ %m/%d\ %H:%M - -" :mark mark /full/directory/path [filename] - -" :com[mand] command_name action -" The following macros can be used in a command -" %a is replaced with the user arguments. -" %c the current file under the cursor. -" %C the current file under the cursor in the other directory. -" %f the current selected file, or files. -" %F the current selected file, or files in the other directory. -" %b same as %f %F. -" %d the current directory name. -" %D the other window directory name. -" %m run the command in a menu window - -" The file type is for the default programs to be used with -" a file extension. -" :filetype pattern1,pattern2 defaultprogram,program2 -" :fileviewer pattern1,pattern2 consoleviewer -" The other programs for the file type can be accessed with the :file command -" The command macros %f, %F, %d, %F may be used in the commands. -" The %a macro is ignored. To use a % you must put %%. - -" For automated FUSE mounts, you must register an extension with FILETYPE=.. -" in one of following formats: -" -" :filetype extensions FUSE_MOUNT|some_mount_command using %SOURCE_FILE and %DESTINATION_DIR variables -" %SOURCE_FILE and %DESTINATION_DIR are filled in by vifm at runtime. -" A sample line might look like this: -" :filetype *.zip,*.jar,*.war,*.ear FUSE_MOUNT|fuse-zip %SOURCE_FILE %DESTINATION_DIR -" -" :filetype extensions FUSE_MOUNT2|some_mount_command using %PARAM and %DESTINATION_DIR variables -" %PARAM and %DESTINATION_DIR are filled in by vifm at runtime. -" A sample line might look like this: -" :filetype *.ssh FUSE_MOUNT2|sshfs %PARAM %DESTINATION_DIR -" %PARAM value is filled from the first line of file (whole line). -" Example first line for SshMount filetype: root@127.0.0.1:/ -" -" You can also add %CLEAR if you want to clear screen before running FUSE -" program. - -" What should be saved automatically between vifm runs -" Like in previous versions of vifm -" set vifminfo=options,filetypes,commands,bookmarks,tui,state,cs,chistory,shistory,dirstack,registers,phistory -" Like in vi -set vifminfo=bookmarks,chistory,shistory,phistory - -" Personal additions -map , : -map space -map q :q -filetype *.pdf,*.dvi zathura -set number diff --git a/vifm/vifmrc.bak b/vifm/vifmrc.bak deleted file mode 100644 index 81f84fa..0000000 --- a/vifm/vifmrc.bak +++ /dev/null @@ -1,108 +0,0 @@ -# You can edit this file by hand. -# The # character at the beginning of a line comments out the line. -# Blank lines are ignored. -# The basic format for each item is shown with an example. -# The '=' character is used to separate fields within a single line. -# Most settings are true = 1 or false = 0. - -# This is the actual command used to start vi. The default is vi. -# If you would like to use another vi clone such as Vim, Elvis, or Vile -# you will need to change this setting. - -VI_COMMAND=vim -# VI_COMMAND=vim -# VI_COMMAND=elvis -G termcap -# VI_COMMAND=vile - -# Trash Directory -# The default is to move files that are deleted with dd or :d to -# the trash directory. 1 means use the trash directory 0 means -# just use rm. If you change this you will not be able to move -# files by deleting them and then using p to put the file in the new location. -# I recommend not changing this until you are familiar with vifm. -# This probably shouldn't be an option. - -USE_TRASH=1 - -# Show only one Window -# If you would like to start vifm with only one window set this to 1 - -USE_ONE_WINDOW=0 - -# Screen configuration. If you would like to use vifm with -# the screen program set this to 1. - -USE_SCREEN=0 - -# 1 means use color if the terminal supports it. -# 0 means don't use color even if supported. - -# This is how many files to show in the directory history menu. - -HISTORY_LENGTH=100 - -# The sort type is how the files will be sorted in the file listing. -# Sort by File Extension = 0 -# Sort by File Name = 1 -# Sort by Group ID = 2 -# Sort by Group Name = 3 -# Sort by Mode = 4 -# Sort by Owner ID = 5 -# Sort by Owner Name = 6 -# Sort by Size = 7 -# Sort by Time Accessed =8 -# Sort by Time Changed =9 -# Sort by Time Modified =10 -# This can be set with the :sort command in vifm. - -LEFT_WINDOW_SORT_TYPE=1 - -RIGHT_WINDOW_SORT_TYPE=1 - -# The regular expression used to filter files out of -# the directory listings. -# LWIN_FILTER=\.o$ and LWIN_INVERT=1 would filter out all -# of the .o files from the directory listing. LWIN_INVERT=0 -# would show only the .o files - -LWIN_FILTER=\.o$ -LWIN_INVERT=1 -RWIN_FILTER=\.o$ -RWIN_INVERT=1 - -# If you installed the vim.txt help file change this to 1. -# If would rather use a plain text help file set this to 0. - -USE_VIM_HELP=0 - -# If you would like to run an executable file when you -# press return on the file name set this to 1. - -RUN_EXECUTABLE=0 - -# BOOKMARKS=mark=/full/directory/path=filename - -BOOKMARKS=H=/home/urbain=../ -BOOKMARKS=m=/home/urbain/Dropbox/phd/literature/October 14=Shear_viscosity.pdf -BOOKMARKS=p=/home/urbain/Dropbox/phd=../ -BOOKMARKS=z=/home/urbain/.vifm=../ - -# COMMAND=command_name=action -# The following macros can be used in a command -# %a is replaced with the user arguments. -# %f the current selected file, or files. -# %F the current selected file, or files in the other directoy. -# %d the current directory name. -# %D the other window directory name. -# %m run the command in a menu window - - -# The file type is for the default programs to be used with -# a file extension. -# FILETYPE=description=extension1,extension2=defaultprogram, program2 -# FILETYPE=Web=html,htm,shtml=links,mozilla,elvis -# would set links as the default program for .html .htm .shtml files -# The other programs for the file type can be accessed with the :file command -# The command macros %f, %F, %d, %F may be used in the commands. -# The %a macro is ignored. To use a % you must put %%. - diff --git a/vim/after/ftplugin/tex/folding.vim b/vim/after/ftplugin/tex/folding.vim deleted file mode 100644 index e69de29..0000000 diff --git a/vim/after/ftplugin/tex/mappings.vim b/vim/after/ftplugin/tex/mappings.vim deleted file mode 100644 index e7dd610..0000000 --- a/vim/after/ftplugin/tex/mappings.vim +++ /dev/null @@ -1,59 +0,0 @@ -inoremap (( \left( -inoremap )) \right) -inoremap {{ \left\{ -inoremap }} \right\} -inoremap [[ \left[ -inoremap ]] \right] -inoremap == \,=\, -inoremap >> \,\geq\, -inoremap << \,\leq\, -inoremap ++ \,+\, -inoremap -- \,-\, - -iabbrev ga \alpha -iabbrev gb \beta -iabbrev gg \gamma -iabbrev gd \delta -iabbrev ge \varepsilon -iabbrev gz \zeta -iabbrev gh \eta -iabbrev gt \theta -iabbrev gi \iota -iabbrev gk \kappa -iabbrev gl \lambda -iabbrev gm \mu -iabbrev gn \nu -iabbrev gx \xi -iabbrev gr \rho -iabbrev gs \sigma -iabbrev gf \phi -iabbrev gp \pi -iabbrev gw \omega -iabbrev dd \d - -" function! SynctexShow() -" let synctex = glob("*.synctex.gz") -" if strlen(synctex) == 0 -" echom "no synctex file found" -" else -" let pdffile = substitute(synctex,"synctex.gz","pdf","") -" let execline = printf(":!zathura --synctex-forward %d:%d:%s %s", line('.'), col('.'), shellescape(bufname("%")), shellescape(pdffile)) -" exec execline -" end -" endfunction - -" nnoremap a :call SynctexShow() -" nnoremap i :Latexmk -" nnoremap e :LatexErrors -" nnoremap o :LatexView -" noremap k :LatexmkStop:LatexmkClean -" nnoremap h :split header.sty - - -nnoremap i :VimtexCompile -nnoremap e :VimtexErrors -nnoremap o :VimtexView -nnoremap k :VimtexStop:VimtexClean -nnoremap t :VimtexTocToggle -nnoremap h :split header.sty -nnoremap h :split header.sty diff --git a/vim/after/ftplugin/tex/unilatex.vim b/vim/after/ftplugin/tex/unilatex.vim deleted file mode 100644 index 69358fc..0000000 --- a/vim/after/ftplugin/tex/unilatex.vim +++ /dev/null @@ -1,675 +0,0 @@ -function! UTF8toLaTeX() - " store cursor position - let s:line = line(".") - let s:column = col(".") - silent %s/α/\\alpha/eg - silent %s/β/\\beta/eg - silent %s/γ/\\gamma/eg - silent %s/δ/\\delta/eg - silent %s/∊/\\epsilon/eg - silent %s/ε/\\varepsilon/eg - silent %s/ζ/\\zeta/eg - silent %s/η/\\eta/eg - silent %s/θ/\\theta/eg - silent %s/ϑ/\\vartheta/eg - silent %s/ι/\\iota/eg - silent %s/κ/\\kappa/eg - silent %s/λ/\\lambda/eg - silent %s/μ/\\mu/eg - silent %s/ν/\\nu/eg - silent %s/ξ/\\xi/eg - silent %s/π/\\pi/eg - silent %s/ϖ/\\varpi/eg - silent %s/ρ/\\rho/eg - silent %s/ϱ/\\varrho/eg - silent %s/σ/\\sigma/eg - silent %s/ς/\\varsigma/eg - silent %s/τ/\\tau/eg - silent %s/υ/\\upsilon/eg - silent %s/φ/\\phi/eg - silent %s/ϕ/\\varphi/eg - silent %s/χ/\\chi/eg - silent %s/ψ/\\psi/eg - silent %s/ω/\\omega/eg - silent %s/Γ/\\Gamma/eg - silent %s/Δ/\\Delta/eg - silent %s/Θ/\\Theta/eg - silent %s/Λ/\\Lambda/eg - silent %s/Ξ/\\Xi/eg - silent %s/Π/\\Pi/eg - silent %s/Υ/\\Upsilon/eg - silent %s/Φ/\\Phi/eg - silent %s/Ψ/\\Psi/eg - silent %s/Ω/\\Omega/eg - silent %s/≤/\\leq/eg - silent %s/≪/\\ll/eg - silent %s/≺/\\prec/eg - silent %s/≼/\\preceq/eg - silent %s/⊂/\\subset/eg - silent %s/⊆/\\subseteq/eg - silent %s/⊏/\\sqsubset/eg - silent %s/⊑/\\sqsubseteq/eg - silent %s/∈/\\in/eg - silent %s/⊢/\\vdash/eg - silent %s/∣/\\mid/eg - silent %s/⌣/\\smile/eg - silent %s/≥/\\geq/eg - silent %s/≫/\\gg/eg - silent %s/≻/\\succ/eg - silent %s/≽/\\succeq/eg - silent %s/⊃/\\supset/eg - silent %s/⊇/\\supseteq/eg - silent %s/⊐/\\sqsupset/eg - silent %s/⊒/\\sqsupseteq/eg - silent %s/∋/\\ni/eg - silent %s/⊣/\\dashv/eg - silent %s/∥/\\parallel/eg - silent %s/⌢/\\frown/eg - silent %s/∉/\\notin/eg - silent %s/≡/\\equiv/eg - silent %s/≐/\\doteq/eg - silent %s/∼/\\sim/eg - silent %s/≃/\\simeq/eg - silent %s/≈/\\approx/eg - silent %s/≅/\\cong/eg - silent %s/⋈/\\Join/eg - silent %s/⋈/\\bowtie/eg - silent %s/∝/\\propto/eg - silent %s/⊨/\\models/eg - silent %s/⊥/\\perp/eg - silent %s/≍/\\asymp/eg - silent %s/≠/\\neq/eg - silent %s/±/\\pm/eg - silent %s/⋅/\\cdot/eg - silent %s/×/\\times/eg - silent %s/∪/\\cup/eg - silent %s/⊔/\\sqcup/eg - silent %s/∨/\\vee/eg - silent %s/⊕/\\oplus/eg - silent %s/⊙/\\odot/eg - silent %s/⊗/\\otimes/eg - silent %s/△/\\bigtriangleup/eg - silent %s/⊲/\\lhd/eg - silent %s/⊴/\\unlhd/eg - silent %s/∓/\\mp/eg - silent %s/÷/\\div/eg - silent %s/∖/\\setminus/eg - silent %s/∩/\\cap/eg - silent %s/⊓/\\sqcap/eg - silent %s/∧/\\wedge/eg - silent %s/⊖/\\ominus/eg - silent %s/⊘/\\oslash/eg - silent %s/○/\\bigcirc/eg - silent %s/▽/\\bigtriangledown/eg - silent %s/⊳/\\rhd/eg - silent %s/⊵/\\unrhd/eg - silent %s/◁/\\triangleleft/eg - silent %s/▷/\\triangleright/eg - silent %s/⋆/\\star/eg - silent %s/∗/\\ast/eg - silent %s/∘/\\circ/eg - silent %s/∙/\\bullet/eg - silent %s/⋄/\\diamond/eg - silent %s/⊎/\\uplus/eg - silent %s/†/\\dagger/eg - silent %s/‡/\\ddagger/eg - silent %s/≀/\\wr/eg - silent %s/∑/\\sum/eg - silent %s/∏/\\prod/eg - silent %s/∐/\\coprod/eg - silent %s/∫/\\int/eg - silent %s/⋃/\\bigcup/eg - silent %s/⋂/\\bigcap/eg - silent %s/⊔/\\bigsqcup/eg - silent %s/∮/\\oint/eg - silent %s/⋁/\\bigvee/eg - silent %s/⋀/\\bigwedge/eg - silent %s/⊕/\\bigoplus/eg - silent %s/⊗/\\bigotimes/eg - silent %s/⊙/\\bigodot/eg - silent %s/⊎/\\biguplus/eg - silent %s/←/\\leftarrow/eg - silent %s/→/\\rightarrow/eg - silent %s/↔/\\leftrightarrow/eg - silent %s/⇐/\\Leftarrow/eg - silent %s/⇒/\\Rightarrow/eg - silent %s/⇔/\\Leftrightarrow/eg - silent %s/↦/\\mapsto/eg - silent %s/↩/\\hookleftarrow/eg - silent %s/↼/\\leftharpoonup/eg - silent %s/↽/\\leftharpoondown/eg - silent %s/↪/\\hookrightarrow/eg - silent %s/⇀/\\rightharpoonup/eg - silent %s/⇁/\\rightharpoondown/eg - silent %s/←/\\longleftarrow/eg - silent %s/→/\\longrightarrow/eg - silent %s/↔/\\longleftrightarrow/eg - silent %s/⇐/\\Longleftarrow/eg - silent %s/⇒/\\Longrightarrow/eg - silent %s/⇔/\\Longleftrightarrow/eg - silent %s/⇖/\\longmapsto/eg - silent %s/↑/\\uparrow/eg - silent %s/↓/\\downarrow/eg - silent %s/↕/\\updownarrow/eg - silent %s/⇑/\\Uparrow/eg - silent %s/⇓/\\Downarrow/eg - silent %s/⇕/\\Updownarrow/eg - silent %s/↗/\\nearrow/eg - silent %s/↘/\\searrow/eg - silent %s/↙/\\swarrow/eg - silent %s/↖/\\nwarrow/eg - silent %s/↝/\\leadsto/eg - silent %s/…/\\dots/eg - silent %s/⋯/\\cdots/eg - silent %s/⋮/\\vdots/eg - silent %s/⋱/\\ddots/eg - silent %s/ℏ/\\hbar/eg - silent %s/ℓ/\\ell/eg - silent %s/ℜ/\\Re/eg - silent %s/ℑ/\\Im/eg - silent %s/א/\\aleph/eg - silent %s/℘/\\wp/eg - silent %s/∀/\\forall/eg - silent %s/∃/\\exists/eg - silent %s/℧/\\mho/eg - silent %s/∂/\\partial/eg - silent %s/′/\\prime/eg - silent %s/∅/\\emptyset/eg - silent %s/∞/\\infty/eg - silent %s/∇/\\nabla/eg - silent %s/△/\\triangle/eg - silent %s/□/\\Box/eg - silent %s/◇/\\Diamond/eg - silent %s/⊥/\\bot/eg - silent %s/⊤/\\top/eg - silent %s/∠/\\angle/eg - silent %s/√/\\surd/eg - silent %s/♢/\\diamondsuit/eg - silent %s/♡/\\heartsuit/eg - silent %s/♣/\\clubsuit/eg - silent %s/♠/\\spadesuit/eg - silent %s/¬/\\neg/eg - silent %s/♭/\\flat/eg - silent %s/♮/\\natural/eg - silent %s/♯/\\sharp/eg - silent %s/Ϝ/\\digamma/eg - silent %s/ϰ/\\varkappa/eg - silent %s/ב/\\beth/eg - silent %s/ד/\\daleth/eg - silent %s/ג/\\gimel/eg - silent %s/⋖/\\lessdot/eg - silent %s/≤/\\leqslant/eg - silent %s/≦/\\leqq/eg - silent %s/⋘/\\lll/eg - silent %s/≲/\\lesssim/eg - silent %s/≶/\\lessgtr/eg - silent %s/⋚/\\lesseqgtr/eg - silent %s/≼/\\preccurlyeq/eg - silent %s/⋞/\\curlyeqprec/eg - silent %s/≾/\\precsim/eg - silent %s/⋐/\\Subset/eg - silent %s/⊏/\\sqsubset/eg - silent %s/∴/\\therefore/eg - silent %s/⌣/\\smallsmile/eg - silent %s/⊲/\\vartriangleleft/eg - silent %s/⊴/\\trianglelefteq/eg - silent %s/⋗/\\gtrdot/eg - silent %s/≧/\\geqq/eg - silent %s/⋙/\\ggg/eg - silent %s/≳/\\gtrsim/eg - silent %s/≷/\\gtrless/eg - silent %s/⋛/\\gtreqless/eg - silent %s/≽/\\succcurlyeq/eg - silent %s/⋟/\\curlyeqsucc/eg - silent %s/≿/\\succsim/eg - silent %s/⋑/\\Supset/eg - silent %s/⊐/\\sqsupset/eg - silent %s/∵/\\because/eg - silent %s/∥/\\shortparallel/eg - silent %s/⌢/\\smallfrown/eg - silent %s/⊳/\\vartriangleright/eg - silent %s/⊵/\\trianglerighteq/eg - silent %s/≑/\\doteqdot/eg - silent %s/≓/\\risingdotseq/eg - silent %s/≒/\\fallingdotseq/eg - silent %s/≖/\\eqcirc/eg - silent %s/≗/\\circeq/eg - silent %s/≜/\\triangleq/eg - silent %s/≏/\\bumpeq/eg - silent %s/≎/\\Bumpeq/eg - silent %s/∼/\\thicksim/eg - silent %s/≈/\\thickapprox/eg - silent %s/≊/\\approxeq/eg - silent %s/∽/\\backsim/eg - silent %s/⊨/\\vDash/eg - silent %s/⊩/\\Vdash/eg - silent %s/⊪/\\Vvdash/eg - silent %s/∍/\\backepsilon/eg - silent %s/∝/\\varpropto/eg - silent %s/≬/\\between/eg - silent %s/⋔/\\pitchfork/eg - silent %s/◀/\\blacktriangleleft/eg - silent %s/▷/\\blacktriangleright/eg - silent %s/⇠/\\dashleftarrow/eg - silent %s/⇇/\\leftleftarrows/eg - silent %s/⇆/\\leftrightarrows/eg - silent %s/⇚/\\Lleftarrow/eg - silent %s/↞/\\twoheadleftarrow/eg - silent %s/↢/\\leftarrowtail/eg - silent %s/⇋/\\leftrightharpoons/eg - silent %s/↰/\\Lsh/eg - silent %s/↫/\\looparrowleft/eg - silent %s/↶/\\curvearrowleft/eg - silent %s/↺/\\circlearrowleft/eg - silent %s/⇢/\\dashrightarrow/eg - silent %s/⇉/\\rightrightarrows/eg - silent %s/⇄/\\rightleftarrows/eg - silent %s/⇛/\\Rrightarrow/eg - silent %s/↠/\\twoheadrightarrow/eg - silent %s/↣/\\rightarrowtail/eg - silent %s/⇌/\\rightleftharpoons/eg - silent %s/↱/\\Rsh/eg - silent %s/↬/\\looparrowright/eg - silent %s/↷/\\curvearrowright/eg - silent %s/↻/\\circlearrowright/eg - silent %s/⊸/\\multimap/eg - silent %s/⇈/\\upuparrows/eg - silent %s/⇊/\\downdownarrows/eg - silent %s/↿/\\upharpoonleft/eg - silent %s/↾/\\upharpoonright/eg - silent %s/⇃/\\downharpoonleft/eg - silent %s/⇂/\\downharpoonright/eg - silent %s/⇝/\\rightsquigarrow/eg - silent %s/↭/\\leftrightsquigarrow/eg - silent %s/∔/\\dotplus/eg - silent %s/⋉/\\ltimes/eg - silent %s/⋓/\\Cup/eg - silent %s/⊻/\\veebar/eg - silent %s/⊞/\\boxplus/eg - silent %s/⊠/\\boxtimes/eg - silent %s/⋋/\\leftthreetimes/eg - silent %s/⋎/\\curlyvee/eg - silent %s/⋅/\\centerdot/eg - silent %s/⋈/\\rtimes/eg - silent %s/⋒/\\Cap/eg - silent %s/⊼/\\barwedge/eg - silent %s/⊟/\\boxminus/eg - silent %s/⊡/\\boxdot/eg - silent %s/⋌/\\rightthreetimes/eg - silent %s/⋏/\\curlywedge/eg - silent %s/⊺/\\intercal/eg - silent %s/⋇/\\divideontimes/eg - silent %s/∖/\\smallsetminus/eg - silent %s/⊝/\\circleddash/eg - silent %s/⊚/\\circledcirc/eg - silent %s/⊛/\\circledast/eg - silent %s/ℏ/\\hbar/eg - silent %s/ℏ/\\hslash/eg - silent %s/□/\\square/eg - silent %s/■/\\blacksquare/eg - silent %s/Ⓢ/\\circledS/eg - silent %s/△/\\vartriangle/eg - silent %s/▲/\\blacktriangle/eg - silent %s/∁/\\complement/eg - silent %s/▽/\\triangledown/eg - silent %s/▼/\\blacktriangledown/eg - silent %s/◊/\\lozenge/eg - silent %s/◆/\\blacklozenge/eg - silent %s/★/\\bigstar/eg - silent %s/∠/\\angle/eg - silent %s/∡/\\measuredangle/eg - silent %s/∢/\\sphericalangle/eg - silent %s/‵/\\backprime/eg - silent %s/∄/\\nexists/eg - silent %s/Ⅎ/\\Finv/eg - silent %s/∅/\\varnothing/eg - silent %s/ð/\\eth/eg - silent %s/℧/\\mho/eg - - call cursor(s:line,s:column) -endfunction - -function! LaTeXtoUTF8() - let s:line = line(".") - let s:column = col(".") - - let s:oldencoding = &l:fileencoding - set fileencoding=utf-8 - - " convert latex commands to unicode - silent %s/\\alpha\>/α/eg - silent %s/\\beta\>/β/eg - silent %s/\\gamma\>/γ/eg - silent %s/\\delta\>/δ/eg - silent %s/\\epsilon\>/∊/eg - silent %s/\\varepsilon\>/ε/eg - silent %s/\\zeta\>/ζ/eg - silent %s/\\eta\>/η/eg - silent %s/\\theta\>/θ/eg - silent %s/\\vartheta\>/ϑ/eg - silent %s/\\iota\>/ι/eg - silent %s/\\kappa\>/κ/eg - silent %s/\\lambda\>/λ/eg - silent %s/\\mu\>/μ/eg - silent %s/\\nu\>/ν/eg - silent %s/\\xi\>/ξ/eg - silent %s/\\pi\>/π/eg - silent %s/\\varpi\>/ϖ/eg - silent %s/\\rho\>/ρ/eg - silent %s/\\varrho\>/ϱ/eg - silent %s/\\sigma\>/σ/eg - silent %s/\\varsigma\>/ς/eg - silent %s/\\tau\>/τ/eg - silent %s/\\upsilon\>/υ/eg - silent %s/\\phi\>/φ/eg - silent %s/\\varphi\>/ϕ/eg - silent %s/\\chi\>/χ/eg - silent %s/\\psi\>/ψ/eg - silent %s/\\omega\>/ω/eg - silent %s/\\Gamma\>/Γ/eg - silent %s/\\Delta\>/Δ/eg - silent %s/\\Theta\>/Θ/eg - silent %s/\\Lambda\>/Λ/eg - silent %s/\\Xi\>/Ξ/eg - silent %s/\\Pi\>/Π/eg - silent %s/\\Upsilon\>/Υ/eg - silent %s/\\Phi\>/Φ/eg - silent %s/\\Psi\>/Ψ/eg - silent %s/\\Omega\>/Ω/eg - silent %s/\\leq\>/≤/eg - silent %s/\\ll\>/≪/eg - silent %s/\\prec\>/≺/eg - silent %s/\\preceq\>/≼/eg - silent %s/\\subset\>/⊂/eg - silent %s/\\subseteq\>/⊆/eg - silent %s/\\sqsubset\>/⊏/eg - silent %s/\\sqsubseteq\>/⊑/eg - silent %s/\\in\>/∈/eg - silent %s/\\vdash\>/⊢/eg - silent %s/\\mid\>/∣/eg - silent %s/\\smile\>/⌣/eg - silent %s/\\geq\>/≥/eg - silent %s/\\gg\>/≫/eg - silent %s/\\succ\>/≻/eg - silent %s/\\succeq\>/≽/eg - silent %s/\\supset\>/⊃/eg - silent %s/\\supseteq\>/⊇/eg - silent %s/\\sqsupset\>/⊐/eg - silent %s/\\sqsupseteq\>/⊒/eg - silent %s/\\ni\>/∋/eg - silent %s/\\dashv\>/⊣/eg - silent %s/\\parallel\>/∥/eg - silent %s/\\frown\>/⌢/eg - silent %s/\\notin\>/∉/eg - silent %s/\\equiv\>/≡/eg - silent %s/\\doteq\>/≐/eg - silent %s/\\sim\>/∼/eg - silent %s/\\simeq\>/≃/eg - silent %s/\\approx\>/≈/eg - silent %s/\\cong\>/≅/eg - silent %s/\\Join\>/⋈/eg - silent %s/\\bowtie\>/⋈/eg - silent %s/\\propto\>/∝/eg - silent %s/\\models\>/⊨/eg - silent %s/\\perp\>/⊥/eg - silent %s/\\asymp\>/≍/eg - silent %s/\\neq\>/≠/eg - silent %s/\\pm\>/±/eg - silent %s/\\cdot\>/⋅/eg - silent %s/\\times\>/×/eg - silent %s/\\cup\>/∪/eg - silent %s/\\sqcup\>/⊔/eg - silent %s/\\vee\>/∨/eg - silent %s/\\oplus\>/⊕/eg - silent %s/\\odot\>/⊙/eg - silent %s/\\otimes\>/⊗/eg - silent %s/\\bigtriangleup\>/△/eg - silent %s/\\lhd\>/⊲/eg - silent %s/\\unlhd\>/⊴/eg - silent %s/\\mp\>/∓/eg - silent %s/\\div\>/÷/eg - silent %s/\\setminus\>/∖/eg - silent %s/\\cap\>/∩/eg - silent %s/\\sqcap\>/⊓/eg - silent %s/\\wedge\>/∧/eg - silent %s/\\ominus\>/⊖/eg - silent %s/\\oslash\>/⊘/eg - silent %s/\\bigcirc\>/○/eg - silent %s/\\bigtriangledown\>/▽/eg - silent %s/\\rhd\>/⊳/eg - silent %s/\\unrhd\>/⊵/eg - silent %s/\\triangleleft\>/◁/eg - silent %s/\\triangleright\>/▷/eg - silent %s/\\star\>/⋆/eg - silent %s/\\ast\>/∗/eg - silent %s/\\circ\>/∘/eg - silent %s/\\bullet\>/∙/eg - silent %s/\\diamond\>/⋄/eg - silent %s/\\uplus\>/⊎/eg - silent %s/\\dagger\>/†/eg - silent %s/\\ddagger\>/‡/eg - silent %s/\\wr\>/≀/eg - silent %s/\\sum\>/∑/eg - silent %s/\\prod\>/∏/eg - silent %s/\\coprod\>/∐/eg - silent %s/\\int\>/∫/eg - silent %s/\\bigcup\>/⋃/eg - silent %s/\\bigcap\>/⋂/eg - silent %s/\\bigsqcup\>/⊔/eg - silent %s/\\oint\>/∮/eg - silent %s/\\bigvee\>/⋁/eg - silent %s/\\bigwedge\>/⋀/eg - silent %s/\\bigoplus\>/⊕/eg - silent %s/\\bigotimes\>/⊗/eg - silent %s/\\bigodot\>/⊙/eg - silent %s/\\biguplus\>/⊎/eg - silent %s/\\leftarrow\>/←/eg - silent %s/\\rightarrow\>/→/eg - silent %s/\\leftrightarrow\>/↔/eg - silent %s/\\Leftarrow\>/⇐/eg - silent %s/\\Rightarrow\>/⇒/eg - silent %s/\\Leftrightarrow\>/⇔/eg - silent %s/\\mapsto\>/↦/eg - silent %s/\\hookleftarrow\>/↩/eg - silent %s/\\leftharpoonup\>/↼/eg - silent %s/\\leftharpoondown\>/↽/eg - silent %s/\\hookrightarrow\>/↪/eg - silent %s/\\rightharpoonup\>/⇀/eg - silent %s/\\rightharpoondown\>/⇁/eg - silent %s/\\longleftarrow\>/←/eg - silent %s/\\longrightarrow\>/→/eg - silent %s/\\longleftrightarrow\>/↔/eg - silent %s/\\Longleftarrow\>/⇐/eg - silent %s/\\Longrightarrow\>/⇒/eg - silent %s/\\Longleftrightarrow\>/⇔/eg - silent %s/\\longmapsto\>/⇖/eg - silent %s/\\uparrow\>/↑/eg - silent %s/\\downarrow\>/↓/eg - silent %s/\\updownarrow\>/↕/eg - silent %s/\\Uparrow\>/⇑/eg - silent %s/\\Downarrow\>/⇓/eg - silent %s/\\Updownarrow\>/⇕/eg - silent %s/\\nearrow\>/↗/eg - silent %s/\\searrow\>/↘/eg - silent %s/\\swarrow\>/↙/eg - silent %s/\\nwarrow\>/↖/eg - silent %s/\\leadsto\>/↝/eg - silent %s/\\dots\>/…/eg - silent %s/\\cdots\>/⋯/eg - silent %s/\\vdots\>/⋮/eg - silent %s/\\ddots\>/⋱/eg - silent %s/\\hbar\>/ℏ/eg - silent %s/\\ell\>/ℓ/eg - silent %s/\\Re\>/ℜ/eg - silent %s/\\Im\>/ℑ/eg - silent %s/\\aleph\>/א/eg - silent %s/\\wp\>/℘/eg - silent %s/\\forall\>/∀/eg - silent %s/\\exists\>/∃/eg - silent %s/\\mho\>/℧/eg - silent %s/\\partial\>/∂/eg - silent %s/\\prime\>/′/eg - silent %s/\\emptyset\>/∅/eg - silent %s/\\infty\>/∞/eg - silent %s/\\nabla\>/∇/eg - silent %s/\\triangle\>/△/eg - silent %s/\\Box\>/□/eg - silent %s/\\Diamond\>/◇/eg - silent %s/\\bot\>/⊥/eg - silent %s/\\top\>/⊤/eg - silent %s/\\angle\>/∠/eg - silent %s/\\surd\>/√/eg - silent %s/\\diamondsuit\>/♢/eg - silent %s/\\heartsuit\>/♡/eg - silent %s/\\clubsuit\>/♣/eg - silent %s/\\spadesuit\>/♠/eg - silent %s/\\neg\>/¬/eg - silent %s/\\flat\>/♭/eg - silent %s/\\natural\>/♮/eg - silent %s/\\sharp\>/♯/eg - silent %s/\\digamma\>/Ϝ/eg - silent %s/\\varkappa\>/ϰ/eg - silent %s/\\beth\>/ב/eg - silent %s/\\daleth\>/ד/eg - silent %s/\\gimel\>/ג/eg - silent %s/\\lessdot\>/⋖/eg - silent %s/\\leqslant\>/≤/eg - silent %s/\\leqq\>/≦/eg - silent %s/\\lll\>/⋘/eg - silent %s/\\lesssim\>/≲/eg - silent %s/\\lessgtr\>/≶/eg - silent %s/\\lesseqgtr\>/⋚/eg - silent %s/\\preccurlyeq\>/≼/eg - silent %s/\\curlyeqprec\>/⋞/eg - silent %s/\\precsim\>/≾/eg - silent %s/\\Subset\>/⋐/eg - silent %s/\\sqsubset\>/⊏/eg - silent %s/\\therefore\>/∴/eg - silent %s/\\smallsmile\>/⌣/eg - silent %s/\\vartriangleleft\>/⊲/eg - silent %s/\\trianglelefteq\>/⊴/eg - silent %s/\\gtrdot\>/⋗/eg - silent %s/\\geqq\>/≧/eg - silent %s/\\ggg\>/⋙/eg - silent %s/\\gtrsim\>/≳/eg - silent %s/\\gtrless\>/≷/eg - silent %s/\\gtreqless\>/⋛/eg - silent %s/\\succcurlyeq\>/≽/eg - silent %s/\\curlyeqsucc\>/⋟/eg - silent %s/\\succsim\>/≿/eg - silent %s/\\Supset\>/⋑/eg - silent %s/\\sqsupset\>/⊐/eg - silent %s/\\because\>/∵/eg - silent %s/\\shortparallel\>/∥/eg - silent %s/\\smallfrown\>/⌢/eg - silent %s/\\vartriangleright\>/⊳/eg - silent %s/\\trianglerighteq\>/⊵/eg - silent %s/\\doteqdot\>/≑/eg - silent %s/\\risingdotseq\>/≓/eg - silent %s/\\fallingdotseq\>/≒/eg - silent %s/\\eqcirc\>/≖/eg - silent %s/\\circeq\>/≗/eg - silent %s/\\triangleq\>/≜/eg - silent %s/\\bumpeq\>/≏/eg - silent %s/\\Bumpeq\>/≎/eg - silent %s/\\thicksim\>/∼/eg - silent %s/\\thickapprox\>/≈/eg - silent %s/\\approxeq\>/≊/eg - silent %s/\\backsim\>/∽/eg - silent %s/\\vDash\>/⊨/eg - silent %s/\\Vdash\>/⊩/eg - silent %s/\\Vvdash\>/⊪/eg - silent %s/\\backepsilon\>/∍/eg - silent %s/\\varpropto\>/∝/eg - silent %s/\\between\>/≬/eg - silent %s/\\pitchfork\>/⋔/eg - silent %s/\\blacktriangleleft\>/◀/eg - silent %s/\\blacktriangleright\>/▷/eg - silent %s/\\dashleftarrow\>/⇠/eg - silent %s/\\leftleftarrows\>/⇇/eg - silent %s/\\leftrightarrows\>/⇆/eg - silent %s/\\Lleftarrow\>/⇚/eg - silent %s/\\twoheadleftarrow\>/↞/eg - silent %s/\\leftarrowtail\>/↢/eg - silent %s/\\leftrightharpoons\>/⇋/eg - silent %s/\\Lsh\>/↰/eg - silent %s/\\looparrowleft\>/↫/eg - silent %s/\\curvearrowleft\>/↶/eg - silent %s/\\circlearrowleft\>/↺/eg - silent %s/\\dashrightarrow\>/⇢/eg - silent %s/\\rightrightarrows\>/⇉/eg - silent %s/\\rightleftarrows\>/⇄/eg - silent %s/\\Rrightarrow\>/⇛/eg - silent %s/\\twoheadrightarrow\>/↠/eg - silent %s/\\rightarrowtail\>/↣/eg - silent %s/\\rightleftharpoons\>/⇌/eg - silent %s/\\Rsh\>/↱/eg - silent %s/\\looparrowright\>/↬/eg - silent %s/\\curvearrowright\>/↷/eg - silent %s/\\circlearrowright\>/↻/eg - silent %s/\\multimap\>/⊸/eg - silent %s/\\upuparrows\>/⇈/eg - silent %s/\\downdownarrows\>/⇊/eg - silent %s/\\upharpoonleft\>/↿/eg - silent %s/\\upharpoonright\>/↾/eg - silent %s/\\downharpoonleft\>/⇃/eg - silent %s/\\downharpoonright\>/⇂/eg - silent %s/\\rightsquigarrow\>/⇝/eg - silent %s/\\leftrightsquigarrow\>/↭/eg - silent %s/\\dotplus\>/∔/eg - silent %s/\\ltimes\>/⋉/eg - silent %s/\\Cup\>/⋓/eg - silent %s/\\veebar\>/⊻/eg - silent %s/\\boxplus\>/⊞/eg - silent %s/\\boxtimes\>/⊠/eg - silent %s/\\leftthreetimes\>/⋋/eg - silent %s/\\curlyvee\>/⋎/eg - silent %s/\\centerdot\>/⋅/eg - silent %s/\\rtimes\>/⋈/eg - silent %s/\\Cap\>/⋒/eg - silent %s/\\barwedge\>/⊼/eg - silent %s/\\boxminus\>/⊟/eg - silent %s/\\boxdot\>/⊡/eg - silent %s/\\rightthreetimes\>/⋌/eg - silent %s/\\curlywedge\>/⋏/eg - silent %s/\\intercal\>/⊺/eg - silent %s/\\divideontimes\>/⋇/eg - silent %s/\\smallsetminus\>/∖/eg - silent %s/\\circleddash\>/⊝/eg - silent %s/\\circledcirc\>/⊚/eg - silent %s/\\circledast\>/⊛/eg - silent %s/\\hbar\>/ℏ/eg - silent %s/\\hslash\>/ℏ/eg - silent %s/\\square\>/□/eg - silent %s/\\blacksquare\>/■/eg - silent %s/\\circledS\>/Ⓢ/eg - silent %s/\\vartriangle\>/△/eg - silent %s/\\blacktriangle\>/▲/eg - silent %s/\\complement\>/∁/eg - silent %s/\\triangledown\>/▽/eg - silent %s/\\blacktriangledown\>/▼/eg - silent %s/\\lozenge\>/◊/eg - silent %s/\\blacklozenge\>/◆/eg - silent %s/\\bigstar\>/★/eg - silent %s/\\angle\>/∠/eg - silent %s/\\measuredangle\>/∡/eg - silent %s/\\sphericalangle\>/∢/eg - silent %s/\\backprime\>/‵/eg - silent %s/\\nexists\>/∄/eg - silent %s/\\Finv\>/Ⅎ/eg - silent %s/\\varnothing\>/∅/eg - silent %s/\\eth\>/ð/eg - silent %s/\\mho\>/℧/eg - call cursor(s:line,s:column) -endfunction - -nnoremap cl :call UTF8toLaTeX() -nnoremap cu :call LaTeXtoUTF8() -command! Convert2Latex :call UTF8toLaTeX() -command! Convert2UTF8 :call LaTeXtoUTF8() - -" augroup LaTeX -" au! -" autocmd BufWritePre *.tex :Convert2Latex -" autocmd BufWritePost *.tex :Convert2UTF8 -" augroup END diff --git a/vim/after/ftplugin/vim/folding.vim b/vim/after/ftplugin/vim/folding.vim deleted file mode 100644 index 1454cbe..0000000 --- a/vim/after/ftplugin/vim/folding.vim +++ /dev/null @@ -1,25 +0,0 @@ -function! VimFolds() - let thisline = getline(v:lnum) - if match(thisline,'^"" ') >= 0 - return ">1" - elseif match(thisline,'^" ') >=0 - return ">1" - else - return "=" - endif -endfunction - -function! VimFoldText() - let startline = getline(v:foldstart) - if match(startline,'^"" ') >= 0 - let title = substitute(startline,'^"" \(.*\)$','\1',"") - return '# ' . title - elseif match(startline,'^" ') >=0 - let title = substitute(startline,'^" \(.*\)$','\1',"") - return ' ## ' .title - endif -endfunction - -setlocal foldmethod=expr -setlocal foldexpr=VimFolds() -setlocal foldtext=VimFoldText() diff --git a/vim/after/syntax/cpp.vim b/vim/after/syntax/cpp.vim deleted file mode 100644 index 4da741d..0000000 --- a/vim/after/syntax/cpp.vim +++ /dev/null @@ -1,3 +0,0 @@ -syntax keyword mPigroup pi -hi def link mPigroup Todo - diff --git a/vim/after/syntax/cpp.vim~ b/vim/after/syntax/cpp.vim~ deleted file mode 100644 index e69de29..0000000 diff --git a/vim/after/syntax/tex.vim b/vim/after/syntax/tex.vim deleted file mode 100644 index a40cc30..0000000 --- a/vim/after/syntax/tex.vim +++ /dev/null @@ -1,6 +0,0 @@ -syn match texMathSymbol '\\arr\>' contained conceal cchar=← -syn match texMathSymbol '\\,' contained conceal cchar= -syn match texMathSymbol '\\mathcal' contained conceal cchar= -syn match texMathSymbol '\\text' contained conceal cchar= -syn match texMathSymbol '\\mathbb' contained conceal cchar= -syn match texMathSymbol '\\quad' contained conceal cchar= diff --git a/vim/after/syntax/tex.vim~ b/vim/after/syntax/tex.vim~ deleted file mode 100644 index 4e1d112..0000000 --- a/vim/after/syntax/tex.vim~ +++ /dev/null @@ -1,6 +0,0 @@ -syn match texMathSymbol '\\arr\>' contained conceal cchar=← -syn match texMathSymbol '\\,' contained conceal cchar= -syn match texMathSymbol '\\mathcal' contained conceal cchar= -syn match texMathSymbol '\\text' contained conceal cchar= -syn match texMathSymbol '\\mathbb' contained conceal cchar= -syn match texMathSymbol '\\quad' contained conceal cchar= diff --git a/vim/bundle/vundle b/vim/bundle/vundle deleted file mode 160000 index cfd3b2d..0000000 --- a/vim/bundle/vundle +++ /dev/null @@ -1 +0,0 @@ -Subproject commit cfd3b2d388a8c2e9903d7a9d80a65539aabfe933 diff --git a/vim/colors/mine.vim b/vim/colors/mine.vim deleted file mode 100644 index 653682e..0000000 --- a/vim/colors/mine.vim +++ /dev/null @@ -1,29 +0,0 @@ -" Vim color file -" Maintainer: Urbain -" Last Change: 2002/10/14 Mon 16:41. -" version: 1.0 -" This color scheme uses a light background. - -set background=light -hi clear -if exists("syntax_on") - syntax reset -endif - -let colors_name = "mine" - -" Syntax group -hi Comment gui=none guifg=#af5f00 -hi Normal guibg=white guifg=Black -hi Type gui=none guifg=#005f00 -hi Statement gui=none guifg=#5f0000 -hi Special guifg=Black -hi Constant guifg=Gray -hi Error guifg=Red guibg=White -hi Preproc guifg=Blue "\end -hi Constant guifg=Green "\ $$ -hi Identifier guifg=Blue "\begin -hi LineNr gui=none guifg=Gray -hi FoldColumn guibg=#F5F4FD -hi Todo guibg=white gui=underline,italic guifg=Red -hi Conceal guibg=White guifg=DarkGreen diff --git a/vim/colors/mine.vim~ b/vim/colors/mine.vim~ deleted file mode 100644 index 653682e..0000000 --- a/vim/colors/mine.vim~ +++ /dev/null @@ -1,29 +0,0 @@ -" Vim color file -" Maintainer: Urbain -" Last Change: 2002/10/14 Mon 16:41. -" version: 1.0 -" This color scheme uses a light background. - -set background=light -hi clear -if exists("syntax_on") - syntax reset -endif - -let colors_name = "mine" - -" Syntax group -hi Comment gui=none guifg=#af5f00 -hi Normal guibg=white guifg=Black -hi Type gui=none guifg=#005f00 -hi Statement gui=none guifg=#5f0000 -hi Special guifg=Black -hi Constant guifg=Gray -hi Error guifg=Red guibg=White -hi Preproc guifg=Blue "\end -hi Constant guifg=Green "\ $$ -hi Identifier guifg=Blue "\begin -hi LineNr gui=none guifg=Gray -hi FoldColumn guibg=#F5F4FD -hi Todo guibg=white gui=underline,italic guifg=Red -hi Conceal guibg=White guifg=DarkGreen diff --git a/vim/mySnippets/all.snippets b/vim/mySnippets/all.snippets deleted file mode 100644 index 8094025..0000000 --- a/vim/mySnippets/all.snippets +++ /dev/null @@ -1,25 +0,0 @@ -global !p -def make_comment(): - b, e = vim.eval("&commentstring").split( '%s' ) - return b, e -endglobal - -snippet todo "A universal TODO reminder" b -`!p -comment = make_comment() -snip.rv = comment[ 0 ] -` TODO: ${1:desc} (`!v $USER`, `!v strftime("%c")`) `!p -comment = make_comment() -snip.rv = comment[ 1 ]` -$0 -endsnippet - -snippet fix "A universal FIXME reminder" b -`!p -comment = make_comment() -snip.rv = comment[ 0 ] -` FIXME: ${1:desc} (`!v $USER`, `!v strftime("%c")`) `!p -comment = make_comment() -snip.rv = comment[ 1 ]` -$0 -endsnippet diff --git a/vim/mySnippets/cpp.snippets b/vim/mySnippets/cpp.snippets deleted file mode 100644 index d314641..0000000 --- a/vim/mySnippets/cpp.snippets +++ /dev/null @@ -1,35 +0,0 @@ -snippet print_mat "Print matrix" b -for (unsigned int iii = 0; iii < ${1:mat}.size(); ++iii) { - cout << setw(12) << $1[iii][0]; - for (unsigned int jjj = 1; jjj < $1.size(); ++jjj) { - cout << ", "; - cout << setw(12) << $1[iii][jjj]; - } - cout << endl; -} -$0 -endsnippet - -snippet print_vec "Print vector" b -for (unsigned int iii = 0; iii < ${1:mat}.size(); ++iii) { - cout << setw(12) << $1[iii]; - cout << endl; -} -$0 -endsnippet - -snippet forij "Matrix iteration" b -for (int ${2:i} = 0; $2 < ${1:count}; $2++) { - for (int ${4:j} = 0; $4 < $1; $4++) { - ${5} - } -} -endsnippet - -snippet vec "vector" i -vector<${1:double}> $0 -endsnippet - -snippet mat "matrix" i -vector< vector<${1:double}> > $0 -endsnippet diff --git a/vim/mySnippets/mail.snippets b/vim/mySnippets/mail.snippets deleted file mode 100644 index 9839916..0000000 --- a/vim/mySnippets/mail.snippets +++ /dev/null @@ -1,33 +0,0 @@ -snippet best "Best wishes" b -Best wishes, - -Urbain -endsnippet - -snippet dear "Email template" b -Dear ${1:Greg}, - -${2:# Body of the message} - -Best wishes, - -${3:Urbain} -endsnippet - -snippet sign "Signature" b -Best wishes, - -Urbain Vaes -Department of Mathematics -Office 6M09 -endsnippet - -snippet bisous "Gros bisous" b -Gros bisous, - -Urbain -endsnippet - -snippet look "I'm looking forward to ..." b -I am looking forward to hearing from you, -endsnippet diff --git a/vim/mySnippets/python.snippets b/vim/mySnippets/python.snippets deleted file mode 100644 index 6dbc272..0000000 --- a/vim/mySnippets/python.snippets +++ /dev/null @@ -1,4 +0,0 @@ -snippet fori "for loop over range" b -for ${1:i} in range(${2:n}): - ${0:pass} -endsnippet diff --git a/vim/mySnippets/tex.snippets b/vim/mySnippets/tex.snippets deleted file mode 100644 index 9c74845..0000000 --- a/vim/mySnippets/tex.snippets +++ /dev/null @@ -1,110 +0,0 @@ -snippet real "Field of real numbers" i -\real -endsnippet - -snippet grad "Gradient" i -\grad -endsnippet - -snippet div "Divergence" i -\dive -endsnippet - -snippet new "New command" b -\newcommand{$1}[$2]{$3}$0 -endsnippet - -snippet op "Operator style" i -\op -endsnippet - -snippet pard "Partial derivative" i -\pardl{$1}{$2}$0 -endsnippet - -snippet pardd "Double partial derivative" i -\parddl{$1}{$2}$0 -endsnippet - -snippet herm "Hermite polynomials" i -\hermite -endsnippet - -snippet red "Red text" i -\red{$1}$0 -endsnippet - -snippet sumi "Sum over index set" i -\sum_{${1:i} \in ${2:I}}$0 -endsnippet - -snippet int "Integral" i -\int_{$1} -endsnippet - -snippet ip "Inner product" i -\ip{$1}{$2}$0 -endsnippet - -snippet ipw "Inner product" i -\wip{$1}{$2}{$3}$0 -endsnippet - -snippet norm "Norm" i -\norm{$1}$0 -endsnippet - -snippet normw "Weighted norm" i -\wnorm{$1}{${2:\gamma}} -endsnippet - -snippet test "Test functions" i -\test{${1:\real^n}}$0 -endsnippet - -snippet lp "Lp spaces" w -\lp{${1:exponent}}{${2:domain}}${3/^.+$/[/}${3:weight}${3/^.+$/]/}$0 -endsnippet - -snippet sob "Sobolev spaces" w -\sobolev{${1:exponent}}{${2:domain}}${3/^.+$/[/}${3:weight}${3/^.+$/]/}$0 -endsnippet - -snippet cont "Continuous function" w -\cont{$1}{$2}$0 -endsnippet - -snippet mean "Expectation" w -\expect $0 -endsnippet - -snippet dot "Dot product" w -\dotx -endsnippet - -snippet abs "Absolute value" w -\abs{ $1 }$0 -endsnippet - -snippet sum "Sum" w -\sum_{${1:i=1}}^{${2:n}} -endsnippet - -snippet smooth "Smooth function" w -\smooth{${1:\real^n}} $0 -endsnippet - -snippet ref "Clever reference" w -\cref{$1}$0 -endsnippet - -snippet frame "My frame snippet" b -\begin{frame} - \frametitle{$1} - $0 -\end{frame} -endsnippet - -snippet gauss "Gaussian density" w -\gaussian{${1:\mu}}{${2:\Sigma}}$0 -endsnippet diff --git a/vim/mySnippets/vim.snippets b/vim/mySnippets/vim.snippets deleted file mode 100644 index e69de29..0000000 diff --git a/vim/spell/en.utf-8.add b/vim/spell/en.utf-8.add deleted file mode 100644 index 460c1ea..0000000 --- a/vim/spell/en.utf-8.add +++ /dev/null @@ -1,28 +0,0 @@ -Plugin -Colorscheme -vim -multiscale -SDEs -SPDEs -Abdulle -Pavliotis -Ornstein -Uhlenbeck -MRes -Galerkin -ODEs -PDEs -Kolmogorov -SDE -Maruyama -advective -eqref -Milgram -Cea's -Lyapunov -Gnuplot -Cholesky -Assyr -EPFL -SymPy -CMake diff --git a/vim/spell/en.utf-8.add.spl b/vim/spell/en.utf-8.add.spl deleted file mode 100644 index a300e1e..0000000 Binary files a/vim/spell/en.utf-8.add.spl and /dev/null differ diff --git a/vim/spell/en.utf-8.spl b/vim/spell/en.utf-8.spl deleted file mode 100644 index a41bf79..0000000 Binary files a/vim/spell/en.utf-8.spl and /dev/null differ diff --git a/vim/spell/en.utf-8.sug b/vim/spell/en.utf-8.sug deleted file mode 100644 index b82667d..0000000 Binary files a/vim/spell/en.utf-8.sug and /dev/null differ diff --git a/vimrc b/vimrc deleted file mode 100644 index 2558fe1..0000000 --- a/vimrc +++ /dev/null @@ -1,315 +0,0 @@ -"" Plugins -call plug#begin('~/.vim/plugged') -Plug 'airblade/vim-gitgutter', { 'on' : 'GitGutterToggle' } -Plug 'altercation/vim-colors-solarized' -Plug 'AndrewRadev/splitjoin.vim' -Plug 'beloglazov/vim-online-thesaurus' -Plug 'benekastah/neomake' , { 'for' : 'cpp' } -Plug 'bling/vim-airline' -Plug 'christoomey/vim-tmux-navigator' -Plug 'freeo/vim-kalisi' -Plug 'godlygeek/tabular' , { 'on' : 'Tab' } -Plug 'gregsexton/gitv', { 'on' : 'Gitv' } -Plug 'honza/vim-snippets' -Plug 'itchyny/calendar.vim', { 'on' : 'Calendar' } -Plug 'klen/python-mode' -Plug 'jamessan/vim-gnupg' -Plug 'junegunn/fzf' -Plug 'junegunn/seoul256.vim' -Plug 'junegunn/vim-pseudocl' -Plug 'junegunn/vim-oblique' -Plug 'junegunn/vim-peekaboo' -Plug 'junegunn/rainbow_parentheses.vim' -Plug 'justinmk/vim-sneak' -Plug 'kassio/neoterm', { 'on' : 'T' } -Plug 'kien/ctrlp.vim' -Plug 'lervag/vimtex' ", { 'for' : 'tex' } -Plug 'majutsushi/tagbar' -Plug 'mileszs/ack.vim', { 'on' : 'Ack' } -Plug 'rdnetto/YCM-Generator', { 'branch' : 'stable' , 'on' : 'YcmGenerateConfig' } -Plug 'ryanss/vim-hackernews', { 'on' : 'HackerNews' } -Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } -Plug 'scrooloose/syntastic' -Plug 'SirVer/ultisnips' -Plug 'sjl/Gundo.vim', { 'on' : 'GundoToggle' } -Plug 'terryma/vim-multiple-cursors' -Plug 'tomasr/molokai' -Plug 'tommcdo/vim-exchange' -Plug 'ton/vim-bufsurf' -Plug 'tpope/vim-abolish', { 'for' : 'tex' } -Plug 'tpope/vim-commentary' -Plug 'tpope/vim-flagship' -Plug 'tpope/vim-fugitive' -Plug 'tpope/vim-git' -Plug 'tpope/vim-obsession' -Plug 'tpope/vim-repeat' -Plug 'tpope/vim-sensible' -Plug 'tpope/vim-surround' -Plug 'tpope/vim-unimpaired' -Plug 'tpope/vim-vinegar' -Plug 'troydm/zoomwintab.vim' -Plug 'Valloric/YouCompleteMe' -", { 'do' : './install.sh --clang-completer' } -Plug 'xolox/vim-misc' -Plug 'xolox/vim-notes' -call plug#end() - -let g:vimtex_fold_enabled=0 -let g:vimtex_view_method='zathura' -let g:vimtex_latexmk_continuous=1 -let g:vimtex_quickfix_mode=0 - -let g:UltiSnipsEditSplit="horizontal" -let g:UltiSnipsExpandTrigger="" -let g:UltiSnipsJumpBackwardTrigger="" -let g:UltiSnipsJumpForwardTrigger="" -let g:UltiSnipsListSnippets="" -let g:UltiSnipsSnippetDirectories=['UltiSnips', 'mySnippets'] -let g:UltiSnipsSnippetsDir="~/.vim/mySnippets" - -let g:airline_left_sep='' -let g:airline_right_sep='' -let g:airline_section_c = '%f%m' -let g:airline_section_y = '' -let g:airline_section_z = '%3p%%|%3l|%3c' -let g:airline_theme='solarized' -let g:airline#extensions#tabline#enabled = 0 -let g:airline_exclude_preview = 0 - -let g:bufferline_active_buffer_left = '' -let g:bufferline_active_buffer_right = '' -let g:bufferline_echo = 0 -let g:bufferline_modified = '+' -let g:bufferline_rotate = 0 - -let g:ctrlp_by_filename = 1 -let g:ctrlp_cmd = 'CtrlP' -let g:ctrlp_map = '' -let g:ctrlp_open_new_file = 't' -let g:ctrlp_show_hidden = 1 -let g:ctrlp_user_command = ['.git/', 'git --git-dir=%s/.git ls-files -oc --exclude-standard'] -let g:ctrlp_working_path_mode = 'r' -let g:ctrlp_prompt_mappings = { - \ 'PrtSelectMove("j")': [''], - \ 'PrtSelectMove("k")': [''], - \ 'PrtHistory(-1)': [''], - \ 'PrtHistory(1)': [''],} - -let g:pymode_rope=0 - -let g:syntastic_cpp_compiler = "g++" -let g:syntastic_cpp_compiler_options = "-std=c++11 -Wall -Wextra -Wpedantic" -let g:syntastic_error_symbol = "✗" -let g:syntastic_warning_symbol = "W" - -let g:tagbar_width = 30 -let g:tagbar_show_linenumbers=1 -let g:tagbar_autofocus=1 - - -let g:tex_conceal= 'adgm' -let g:tex_flavor='latex' - let g:tex_fast="1" - -let NERDTreeIgnore=['\.pdf$', '\~$','\.toc$', - \ '\.fls$','\.bbl$','\.blg$', - \ '\.out$', '\.log$','\.aux$','\.sty$', - \ '\.fdb_latexmk$', '\.synctex.gz$','\.latexmain$'] - -let g:ycm_key_list_select_completion = ['', ''] -let g:ycm_key_list_previous_completion = ['', ''] -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 = {} -endif -let g:ycm_semantic_triggers.tex = ['re!\\[A-Za-z]*(ref|cite)[A-Za-z]*([^]]*])?{([^}]*, ?)*' ] - -let g:calendar_google_calendar = 1 -let g:calendar_google_task = 1 - -let g:tabprefix = "" - - -"" Vim options - -" Tabs and indent -set smartindent -set expandtab -set tabstop=4 -set softtabstop=4 -set shiftwidth=4 - -" Folds -set foldcolumn=0 -set nofoldenable -set foldmethod=expr -set foldlevel=0 - -" Back up files -set noswapfile -set nowritebackup -set undofile -set undodir=/home/urbain/.nvim/vimundo/ - -" Layout window -set nonumber -set diffopt=filler,vertical -set listchars=tab:▸\ ,eol:¬,trail:- -set fillchars=fold:\ ,vert:\ , -set breakindent -let &showbreak='--> ' -set colorcolumn=0 -set scrolloff=0 -set t_Co=256 -set guitablabel=%N\ %t\ %M -set showcmd - -" Layout text -set nowrap -set linebreak -set textwidth=0 -set conceallevel=2 -set formatprg=par\ w72 -set guifont=Monaco\ 11 - -" Case and spell -set nospell -" set spellfile="/home/urbain/.vim/spell/en.utf-8.add" -set smartcase -set ignorecase - -" Misc -set noautochdir -set cpoptions+=Iq -set encoding=utf-8 -set mouse=a -set clipboard=unnamedplus -set lazyredraw -set hidden - -" Colorscheme -if $COLORSCHEME=="light" - silent! colo solarized - set background=light -elseif $COLORSCHEME=="dark" - silent! colo solarized - set background=dark -elseif $COLORSCHEME=="default" - silent! colo seoul256 - set background=dark -endif - -highlight Comment cterm=italic -set t_ZH= -set t_ZR= - -"" Maps - -" Definition of leaders -let mapleader = " " -let maplocalleader = "\\" - -" New pages -nnoremap pe :tabedit -nnoremap pn :tabnew -nnoremap po :tabonly - -" Plugin Management -nnoremap pi :PlugInstall -nnoremap pu :PlugUpdate -nnoremap pc :PlugClean -nnoremap pd :PlugDiff -nnoremap ps :PlugStatus - -" Toggles -nnoremap cop :set paste! -nnoremap cof :set foldenable! -nnoremap cpg :GitGutterToggle -nnoremap cpn :NERDTreeToggle -nnoremap cpt :TagbarToggle -nnoremap cpu :GundoToggle - -" Sourcing -nnoremap sv :source ~/.vimrc -nnoremap sc :source % - -" File edits -nnoremap es :UltiSnipsEdit -nnoremap em :e ~/dotfiles/mutt/muttrc -nnoremap en :e ~/dotfiles/nvimrc -nnoremap ev :e ~/dotfiles/vimrc -nnoremap ez :e ~/dotfiles/zshrc -nnoremap et :e ~/dotfiles/tmux.conf - -" Formatting -nnoremap fw :%s/\s\+$// -nnoremap fi zzmxgg=G'x - -" Navigation -nnoremap (( :BufSurfBack -nnoremap )) :BufSurfForward -nnoremap 3 -nnoremap 3 -nnoremap o -nnoremap O - -" Git -nnoremap gs :Gstatus -nnoremap gr :Gread -nnoremap gd :Gdiff -nnoremap gv :Gitv - -" Misc -nnoremap -nnoremap Q :bd! -nnoremap w :w -nnoremap q :q! -nnoremap h :e %:p:s,.hpp$,.X123X,:s,.cpp$,.hpp,:s,.X123X$,.cpp, -nnoremap J mzJ`z -nnoremap Y y$ -nnoremap + za -nnoremap K :OnlineThesaurusCurrentWord - -" Dvorak specific -nnoremap : , -vnoremap : , -nnoremap , : -vnoremap , : - -" Neovim specific -if has("nvim") - tnoremap :ZoomWinTabOut - nnoremap :ZoomWinTabIn:b termi - inoremap :b termi - nnoremap ym :Neomake! -endif - -"" Restore cursor position -augroup vimrc - au! - autocmd BufWritePost *vimrc source % - autocmd BufWritePost *.cpp Neomake! - autocmd BufReadPost * - \ if line("'\"") > 1 && line("'\"") <= line("$") | - \ exe "normal! g`\"" | - \ endif -augroup END - -"" Taken from Junegunn Chong -nnoremap C :call fzf#run({ -\ 'source': -\ map(split(globpath(&rtp, "colors/*.vim"), "\n"), -\ "substitute(fnamemodify(v:val, ':t'), '\\..\\{-}$', '', '')"), -\ 'sink': 'colo', -\ 'options': '+m', -\ 'left': 30, -\ 'launcher': 'iterm2-launcher 20 30 %s' -\ }) - -"" Experimental -let g:notes_directories = ['~/dotfiles/notes'] -let g:pymode=0 - -" Idea: instant download colorscheme diff --git a/xinitrc b/xinitrc deleted file mode 100755 index 211eb34..0000000 --- a/xinitrc +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -# Key repeat rate -xset r rate 400 50 - -# Dvorak programer -setxkbmap us -variant dvp - -# Load key bindings -$HOME/.xmodmap - -# Set colorscheme to light -export COLORSCHEME=dark - -# Load Xresources to light colorscheme -xrdb $HOME/.Xresources/Xresources.dark diff --git a/zathurarc b/zathurarc deleted file mode 100644 index 543633d..0000000 --- a/zathurarc +++ /dev/null @@ -1,2 +0,0 @@ -map scroll down -map scroll up diff --git a/zsh/zsh-aliases b/zsh/zsh-aliases deleted file mode 100644 index 9d2dbe6..0000000 --- a/zsh/zsh-aliases +++ /dev/null @@ -1,54 +0,0 @@ -# Apps for filetypes -alias -s vim=$EDITOR -alias -s cpp=$EDITOR -alias -s c=$EDITOR -alias -s tex=$EDITOR -alias -s pdf=zathura - -# Directories -alias books='cd ~/Dropbox/phd/books' -alias cdd='cd ~/dotfiles' -alias papers='cd ~/Dropbox/phd/papers' -alias report='cd ~/Dropbox/phd/reports/9\ months' -alias u='cd ~/Dropbox/phd' -alias uc='cd ~/Dropbox/phd/programs' -alias ul='cd ~/Dropbox/phd/literature' -alias up='cd ~/Dropbox/phd/presentations' -alias ur='cd ~/Dropbox/phd/reports' - -# Commands -alias a='vifm' -alias c='clear' -alias ca='printf "\ec"' -alias commit='git commit -a -m' -alias g='git' -alias install='sudo apt-get install' -alias m='mutt' -alias mail='offlineimap -u quiet &' -alias mc='make clean' -alias mca='make clean-all' -alias n='nvim' -alias ns="$EDITOR -S Session.vim" -alias pull='git pull origin master' -alias push='git push origin master' -alias pushs='git push --recurse-submodules=check' -alias update='sudo apt-get update' -alias upgrade='sudo apt-get upgrade' -alias v='vim' -alias x='sh ~/.xmodmap' -alias youtube=mpsyt - -# Configuration -alias em="$EDITOR ~/.mutt/muttrc" -alias en="$EDITOR ~/.nvimrc" -alias eo="$EDITOR ~/.offlineimaprc" -alias et="$EDITOR ~/.tmux.conf" -alias ev="$EDITOR ~/.vimrc" -alias evi="$EDITOR ~/.vifm/vifmrc" -alias ex="$EDITOR ~/.xmodmap" -alias ez="$EDITOR ~/.zshrc" -alias eza="$EDITOR ~/.zathurarc" - -# Tmux -alias son="tmux set -g status on" -alias soff="tmux set -g status off" diff --git a/zsh/zsh-functions b/zsh/zsh-functions deleted file mode 100644 index f9f387d..0000000 --- a/zsh/zsh-functions +++ /dev/null @@ -1,31 +0,0 @@ -function colo { - - # Change colors for current session - $HOME/.bin/recolor.sh < ~/.Xresources/Xresources.$1 - - # Load Xresources file for future sessions - xrdb ~/.Xresources/Xresources.$1 - - # Change environment variable - export COLORSCHEME=$1 - - # Change default environment variable for future sessions - sed -i --follow-symlinks "s/^export COLORSCHEME=.*$/export COLORSCHEME=$1/g" ~/dotfiles/zshrc -} - -z() { - if [[ -z "$*" ]]; then - cd "$(_z -l 2>&1 | fzf-tmux +s --tac | sed 's/^[0-9,.]* *//')" - else - _z "$@" - fi -} - -fshow() { - git log --graph --color=always \ - --format="%C(auto)%h%d %s %C(black)%C(bold)%cr" "$@" | - fzf --ansi --no-sort --reverse --tiebreak=index --toggle-sort=\` \ - --bind 'ctrl-m:execute: - echo {} | grep -o "[a-f0-9]\{7\}" | - xargs -I % sh -c "git show --color=always % | less -R"' -} diff --git a/zsh/zsh-plugins b/zsh/zsh-plugins deleted file mode 100644 index 23e94cc..0000000 --- a/zsh/zsh-plugins +++ /dev/null @@ -1,59 +0,0 @@ -# Load zgen -source "/home/urbain/.zgen/zgen.zsh" - -# Load plugins -if ! zgen saved; then - - echo "Creating a zgen save" - - # Load oh-my-zsh framework - zgen oh-my-zsh - - # Oh-my-zsh plugins - zgen oh-my-zsh plugins/git - zgen oh-my-zsh plugins/vi-mode - zgen oh-my-zsh plugins/ubuntu - zgen oh-my-zsh plugins/tmux - zgen oh-my-zsh plugins/themes - - # zsh-users plugins - zgen load zsh-users/zsh-completions src - zgen load zsh-users/zsh-syntax-highlighting - - # Appearance - zgen oh-my-zsh themes/eastwood - - # My plugins - zgen load uvaes/fzf-marks - zgen load uvaes/grm - - # Other plugins - zgen load rupa/z - zgen load djui/alias-tips - zgen load tarruda/zsh-autosuggestions - zgen load Tarrasch/zsh-autoenv - zgen load joel-porquet/zsh-dircolors-solarized - - # Save all to init script - zgen save -fi - -# Plugin configuration - -# Autosuggestion -{ - # Environment variables for plugins - AUTOSUGGESTION_HIGHLIGHT_COLOR='fg=6' - - zle-line-init() { - zle autosuggest-start - } - zle -N zle-line-init - - bindkey '^y' autosuggest-execute-suggestion -} - -# GRM -{ - REPOFILE=/home/urbain/dotfiles/repos.zsh -} diff --git a/zsh/zsh-tmp b/zsh/zsh-tmp deleted file mode 100644 index a5abbce..0000000 --- a/zsh/zsh-tmp +++ /dev/null @@ -1 +0,0 @@ -export COLORSCHEME=light diff --git a/zshrc b/zshrc deleted file mode 100644 index dae16bf..0000000 --- a/zshrc +++ /dev/null @@ -1,78 +0,0 @@ -ZSH_PLUGINS="$HOME/.zsh/zsh-plugins" -ZSH_ALIASES="$HOME/.zsh/zsh-aliases" -ZSH_TMP="$HOME/.zsh/zsh-tmp" - -# Source configurations -source $ZSH_PLUGINS -source $ZSH_ALIASES -source $ZSH_TMP - -# Custom key bindings for built-in widgets -bindkey -a 'k' history-beginning-search-backward -bindkey -a 'j' history-beginning-search-forward -bindkey '^P' history-beginning-search-backward -bindkey '^N' history-beginning-search-forward - -# Paths of executables -export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:\ - /usr/bin:/sbin:/bin:/usr/games:/usr/local/games:\ - /home/urbain/bin" - -# Editor -export EDITOR=/usr/bin/nvim - -fshow() { - git log --graph --color=always \ - --format="%C(auto)%h%d %s %C(black)%C(bold)%cr" "$@" | - fzf --ansi --no-sort --reverse --tiebreak=index --toggle-sort=\` \ - --bind 'ctrl-m:execute: - echo {} | grep -o "[a-f0-9]\{7\}" | - xargs -I % sh -c "git show --color=always % | less -R"' -} - -function colo { - -# Change colors for current session -$HOME/.bin/recolor.sh < ~/.Xresources/Xresources.$1 - -# Load Xresources file for future sessions -xrdb ~/.Xresources/Xresources.$1 - -# Change environment variable -export COLORSCHEME=light - -# Change default environment variable for future sessions -sed -i --follow-symlinks "s/^export COLORSCHEME=.*$/export COLORSCHEME=$1/g" ~/dotfiles/zshrc -} - -# Fix tmux colors -if [[ -n ${TMUX} && -n ${commands[tmux]} ]];then - case $(tmux showenv TERM 2>/dev/null) in - *256color) ;& - TERM=fbterm) - TERM=screen-256color ;; - *) - TERM=screen - esac -fi - -# Export GPG-agent related -if [[ -f "${HOME}/.gpg-agent-info" ]]; then - source /home/urbain/.gpg-agent-info - export GPG_AGENT_INFO - export SSH_AUTH_SOCK -fi - - -# Tmux colors fix -if [[ -n ${TMUX} && -n ${commands[tmux]} ]];then - case $(tmux showenv TERM 2>/dev/null) in - *256color) ;& - TERM=fbterm) - TERM=screen-256color ;; - *) - TERM=screen - esac -fi - -[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh -- cgit v1.2.3