From e146e947c52ac4adbe426b3f893faff1e46ed5f8 Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Tue, 19 Apr 2016 15:24:25 +0100 Subject: Use GNU stow for dotfiles management --- .dotmap | 35 - .gitignore | 18 +- Xresources/.Xresources/base | 31 + Xresources/.Xresources/dark | 28 + Xresources/.Xresources/light | 28 + Xresources/.Xresources/seoul | 29 + Xresources/.Xresources/transparent | 5 + Xresources/base | 29 - Xresources/dark | 28 - Xresources/light | 28 - Xresources/seoul | 29 - Xresources/transparent | 5 - bash/.bashrc | 118 ++ bashrc | 118 -- bin/bin/books | 5 + bin/bin/dot | 48 + bin/bin/downloads | 5 + bin/bin/email | 16 + bin/bin/i3-shell | 27 + bin/bin/id | 6 + bin/bin/keyboard | 36 + bin/bin/mystatus | 9 + bin/bin/password | 2 + bin/bin/recolor | 8 + bin/bin/rename_workspace | 12 + bin/bin/run | 5 + bin/bin/swap | 16 + bin/bin/tldr | 246 ++++ bin/bin/tmux_attach | 9 + bin/bin/touchpad | 9 + bin/bin/vimin | 4 + bin/bin/workspace | 33 + bin/books | 5 - bin/dot | 48 - bin/downloads | 5 - bin/email | 16 - bin/i3-shell | 27 - bin/id | 6 - bin/keyboard | 36 - bin/mystatus | 9 - bin/password | 2 - bin/recolor | 8 - bin/rename_workspace | 12 - bin/run | 5 - bin/swap | 16 - bin/tldr | 246 ---- bin/tmux_attach | 9 - bin/touchpad | 9 - bin/vimin | 4 - bin/workspace | 33 - crontab | 1 - dunst/.config/dunst/dunstrc | 245 ++++ dunstrc | 245 ---- git/.git_template/hooks/ctags | 8 + git/.git_template/hooks/post-checkout | 2 + git/.git_template/hooks/post-commit | 2 + git/.git_template/hooks/post-merge | 2 + git/.git_template/hooks/post-rewrite | 4 + git/.gitconfig | 15 + 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/i3/config | 182 +++ i3/.config/i3status/config | 58 + i3/config | 182 --- i3/i3status.conf | 58 - input/inputrc | 2 + inputrc | 2 - latexmk/.latexmkrc | 6 + latexmkrc | 6 - ledgerrc | 2 - mbsync/.mbsyncrc | 62 + mbsyncrc | 62 - misc/.gtkrc-2.0.mine | 5 - misc/20-keyboard.conf | 6 - mr/mrconfig | 20 +- msmtp/.msmtprc | 21 + msmtprc | 21 - mutt/.mutt/.gitignore | 4 + mutt/.mutt/alias | 1 + mutt/.mutt/colors | 23 + mutt/.mutt/crypto | 85 ++ mutt/.mutt/id_personal | 11 + mutt/.mutt/id_work | 11 + mutt/.mutt/mailboxes | 1 + mutt/.mutt/mailcap | 5 + mutt/.mutt/muttrc | 94 ++ mutt/.mutt/signature | 1 + mutt/attachments/.gitkeep | 0 mutt/cache/.gitkeep | 0 mutt/colors | 23 - mutt/crypto | 85 -- mutt/id_personal | 11 - mutt/id_work | 11 - mutt/mailboxes | 1 - mutt/mailcap | 5 - mutt/muttrc | 94 -- mutt/signature | 1 - newsbeuter/.config/newsbeuter/cache.db | Bin 0 -> 71680 bytes newsbeuter/.config/newsbeuter/config | 25 + newsbeuter/.config/newsbeuter/history.cmdline | 3 + newsbeuter/.config/newsbeuter/history.search | 0 newsbeuter/.config/newsbeuter/urls | 1 + newsbeuter/cache.db | Bin 71680 -> 0 bytes newsbeuter/config | 25 - newsbeuter/history.cmdline | 3 - newsbeuter/history.search | 0 newsbeuter/urls | 1 - notes | 1 - nvim/.config/nvim | 1 + qutebrowser/.config/qutebrowser/bookmarks | 1 + qutebrowser/.config/qutebrowser/keys.conf | 638 +++++++++ qutebrowser/.config/qutebrowser/quickmarks | 1 + qutebrowser/.config/qutebrowser/qutebrowser.conf | 1402 ++++++++++++++++++++ .../share/qutebrowser/userscripts/bookmarks-dmenu | 7 + .../share/qutebrowser/userscripts/quickmarks-dmenu | 7 + .../share/qutebrowser/userscripts/url-from-surfraw | 20 + qutebrowser/bookmarks | 1 - qutebrowser/keys.conf | 638 --------- qutebrowser/quickmarks | 1 - qutebrowser/qutebrowser.conf | 1402 -------------------- qutebrowser/userscripts/bookmarks-dmenu | 7 - qutebrowser/userscripts/quickmarks-dmenu | 7 - qutebrowser/userscripts/url-from-surfraw | 20 - surfraw.bookmarks | 1 - surfraw/.surfraw.bookmarks | 1 + tmux.conf | 25 - tmux/.tmux.conf | 25 + urxvt/.urxvt/ext/resize | 155 +++ vifm/.vifm/.gitignore | 3 + vifm/.vifm/colors/default.vifm | 52 + vifm/.vifm/colors/matrix.vifm | 21 + vifm/.vifm/colors/solarized.vifm | 45 + vifm/.vifm/colorschemes | 37 + vifm/.vifm/scripts/README | 6 + vifm/.vifm/vifm-help.txt | 226 ++++ vifm/.vifm/vifmrc | 440 ++++++ vifm/colors/default.vifm | 52 - vifm/colors/matrix.vifm | 21 - vifm/colors/solarized.vifm | 45 - vifm/colorschemes | 37 - vifm/scripts/README | 6 - vifm/vifm-help.txt | 226 ---- vifm/vifmrc | 440 ------ vim/.config/nvim | 1 + vim/.init.vim-rplugin~ | 9 - vim/.vim/.gitignore | 4 + vim/.vim/.init.vim-rplugin~ | 12 + vim/.vim/after/ftplugin/freefem/folding.vim | 20 + vim/.vim/after/ftplugin/tex/mappings.vim | 38 + vim/.vim/after/ftplugin/tex/unilatex.vim | 675 ++++++++++ vim/.vim/after/ftplugin/vim/folding.vim | 25 + vim/.vim/autoload/plug.vim | 1 + vim/.vim/colors/mine.vim | 6 + vim/.vim/init.vim | 1 + vim/.vim/mySnippets | 1 + vim/.vimrc | 292 ++++ vim/after/ftplugin/freefem/folding.vim | 20 - vim/after/ftplugin/tex/mappings.vim | 38 - vim/after/ftplugin/tex/unilatex.vim | 675 ---------- vim/after/ftplugin/vim/folding.vim | 25 - vim/autoload/plug.vim | 1 - vim/colors/mine.vim | 6 - vim/init.vim | 1 - vim/mySnippets | 1 - 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 vim/vimrc | 290 ---- vim/vimundo/.gitkeep | 0 vimperator/.vimperatorrc | 2 + vimperatorrc | 2 - xinit/.xinitrc | 31 + xinitrc | 31 - zathura/.config/zathura/zathurarc | 2 + zathurarc | 2 - zsh/.zsh/.gitignore | 2 + zsh/.zsh/alias | 32 + zsh/.zsh/functions | 16 + zsh/.zsh/plugins | 52 + zsh/.zshrc | 52 + zsh/alias | 32 - zsh/functions | 16 - zsh/plugins | 52 - zsh/zshrc | 52 - 189 files changed, 5975 insertions(+), 5887 deletions(-) delete mode 100644 .dotmap create mode 100644 Xresources/.Xresources/base create mode 100644 Xresources/.Xresources/dark create mode 100644 Xresources/.Xresources/light create mode 100644 Xresources/.Xresources/seoul create mode 100644 Xresources/.Xresources/transparent delete mode 100644 Xresources/base delete mode 100644 Xresources/dark delete mode 100644 Xresources/light delete mode 100644 Xresources/seoul delete mode 100644 Xresources/transparent create mode 100644 bash/.bashrc delete mode 100644 bashrc create mode 100755 bin/bin/books create mode 100755 bin/bin/dot create mode 100755 bin/bin/downloads create mode 100755 bin/bin/email create mode 100755 bin/bin/i3-shell create mode 100755 bin/bin/id create mode 100755 bin/bin/keyboard create mode 100755 bin/bin/mystatus create mode 100755 bin/bin/password create mode 100755 bin/bin/recolor create mode 100755 bin/bin/rename_workspace create mode 100755 bin/bin/run create mode 100755 bin/bin/swap create mode 100755 bin/bin/tldr create mode 100755 bin/bin/tmux_attach create mode 100755 bin/bin/touchpad create mode 100755 bin/bin/vimin create mode 100755 bin/bin/workspace delete mode 100755 bin/books delete mode 100755 bin/dot delete mode 100755 bin/downloads delete mode 100755 bin/email delete mode 100755 bin/i3-shell delete mode 100755 bin/id delete mode 100755 bin/keyboard delete mode 100755 bin/mystatus delete mode 100755 bin/password delete mode 100755 bin/recolor delete mode 100755 bin/rename_workspace delete mode 100755 bin/run delete mode 100755 bin/swap delete mode 100755 bin/tldr delete mode 100755 bin/tmux_attach delete mode 100755 bin/touchpad delete mode 100755 bin/vimin delete mode 100755 bin/workspace delete mode 100644 crontab create mode 100644 dunst/.config/dunst/dunstrc delete mode 100644 dunstrc create mode 100755 git/.git_template/hooks/ctags create mode 100755 git/.git_template/hooks/post-checkout create mode 100755 git/.git_template/hooks/post-commit create mode 100755 git/.git_template/hooks/post-merge create mode 100755 git/.git_template/hooks/post-rewrite create mode 100644 git/.gitconfig 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 create mode 100644 i3/.config/i3/config create mode 100644 i3/.config/i3status/config delete mode 100644 i3/config delete mode 100644 i3/i3status.conf create mode 100644 input/inputrc delete mode 100644 inputrc create mode 100644 latexmk/.latexmkrc delete mode 100644 latexmkrc delete mode 100644 ledgerrc create mode 100644 mbsync/.mbsyncrc delete mode 100644 mbsyncrc delete mode 100644 misc/.gtkrc-2.0.mine delete mode 100644 misc/20-keyboard.conf create mode 100644 msmtp/.msmtprc delete mode 100644 msmtprc create mode 100644 mutt/.mutt/.gitignore create mode 120000 mutt/.mutt/alias create mode 100644 mutt/.mutt/colors create mode 100644 mutt/.mutt/crypto create mode 100644 mutt/.mutt/id_personal create mode 100644 mutt/.mutt/id_work create mode 100644 mutt/.mutt/mailboxes create mode 100644 mutt/.mutt/mailcap create mode 100644 mutt/.mutt/muttrc create mode 100644 mutt/.mutt/signature delete mode 100644 mutt/attachments/.gitkeep delete mode 100644 mutt/cache/.gitkeep delete mode 100644 mutt/colors delete mode 100644 mutt/crypto delete mode 100644 mutt/id_personal delete mode 100644 mutt/id_work delete mode 100644 mutt/mailboxes delete mode 100644 mutt/mailcap delete mode 100644 mutt/muttrc delete mode 100644 mutt/signature create mode 100644 newsbeuter/.config/newsbeuter/cache.db create mode 100644 newsbeuter/.config/newsbeuter/config create mode 100644 newsbeuter/.config/newsbeuter/history.cmdline create mode 100644 newsbeuter/.config/newsbeuter/history.search create mode 120000 newsbeuter/.config/newsbeuter/urls delete mode 100644 newsbeuter/cache.db delete mode 100644 newsbeuter/config delete mode 100644 newsbeuter/history.cmdline delete mode 100644 newsbeuter/history.search delete mode 120000 newsbeuter/urls delete mode 120000 notes create mode 120000 nvim/.config/nvim create mode 120000 qutebrowser/.config/qutebrowser/bookmarks create mode 100644 qutebrowser/.config/qutebrowser/keys.conf create mode 120000 qutebrowser/.config/qutebrowser/quickmarks create mode 100644 qutebrowser/.config/qutebrowser/qutebrowser.conf create mode 100755 qutebrowser/.local/share/qutebrowser/userscripts/bookmarks-dmenu create mode 100755 qutebrowser/.local/share/qutebrowser/userscripts/quickmarks-dmenu create mode 100755 qutebrowser/.local/share/qutebrowser/userscripts/url-from-surfraw delete mode 120000 qutebrowser/bookmarks delete mode 100644 qutebrowser/keys.conf delete mode 120000 qutebrowser/quickmarks delete mode 100644 qutebrowser/qutebrowser.conf delete mode 100755 qutebrowser/userscripts/bookmarks-dmenu delete mode 100755 qutebrowser/userscripts/quickmarks-dmenu delete mode 100755 qutebrowser/userscripts/url-from-surfraw delete mode 100644 surfraw.bookmarks create mode 100644 surfraw/.surfraw.bookmarks delete mode 100644 tmux.conf create mode 100644 tmux/.tmux.conf create mode 100644 urxvt/.urxvt/ext/resize create mode 100644 vifm/.vifm/.gitignore create mode 100644 vifm/.vifm/colors/default.vifm create mode 100644 vifm/.vifm/colors/matrix.vifm create mode 100644 vifm/.vifm/colors/solarized.vifm create mode 100644 vifm/.vifm/colorschemes create mode 100644 vifm/.vifm/scripts/README create mode 100644 vifm/.vifm/vifm-help.txt create mode 100644 vifm/.vifm/vifmrc delete mode 100644 vifm/colors/default.vifm delete mode 100644 vifm/colors/matrix.vifm delete mode 100644 vifm/colors/solarized.vifm delete mode 100644 vifm/colorschemes delete mode 100644 vifm/scripts/README delete mode 100644 vifm/vifm-help.txt delete mode 100644 vifm/vifmrc create mode 120000 vim/.config/nvim delete mode 100644 vim/.init.vim-rplugin~ create mode 100644 vim/.vim/.gitignore create mode 100644 vim/.vim/.init.vim-rplugin~ create mode 100644 vim/.vim/after/ftplugin/freefem/folding.vim create mode 100644 vim/.vim/after/ftplugin/tex/mappings.vim create mode 100644 vim/.vim/after/ftplugin/tex/unilatex.vim create mode 100644 vim/.vim/after/ftplugin/vim/folding.vim create mode 120000 vim/.vim/autoload/plug.vim create mode 100644 vim/.vim/colors/mine.vim create mode 120000 vim/.vim/init.vim create mode 120000 vim/.vim/mySnippets create mode 100644 vim/.vimrc delete mode 100644 vim/after/ftplugin/freefem/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 120000 vim/autoload/plug.vim delete mode 100644 vim/colors/mine.vim delete mode 120000 vim/init.vim delete mode 120000 vim/mySnippets 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 vim/vimrc delete mode 100644 vim/vimundo/.gitkeep create mode 100644 vimperator/.vimperatorrc delete mode 100644 vimperatorrc create mode 100755 xinit/.xinitrc delete mode 100755 xinitrc create mode 100644 zathura/.config/zathura/zathurarc delete mode 100644 zathurarc create mode 100644 zsh/.zsh/.gitignore create mode 100644 zsh/.zsh/alias create mode 100644 zsh/.zsh/functions create mode 100644 zsh/.zsh/plugins create mode 100644 zsh/.zshrc delete mode 100644 zsh/alias delete mode 100644 zsh/functions delete mode 100644 zsh/plugins delete mode 100644 zsh/zshrc diff --git a/.dotmap b/.dotmap deleted file mode 100644 index f3a6946..0000000 --- a/.dotmap +++ /dev/null @@ -1,35 +0,0 @@ -declare -A dotmap -dotmap[$HOME/.bashrc]=$HOME/dotfiles/bashrc -dotmap[$HOME/bin]=$HOME/dotfiles/bin -dotmap[$HOME/.config/dunst/dunstrc]=$HOME/dotfiles/dunstrc -dotmap[$HOME/.config/i3/config]=$HOME/dotfiles/i3/config -dotmap[$HOME/.config/i3status/config]=$HOME/dotfiles/i3/i3status.conf -dotmap[$HOME/.config/newsbeuter]=$HOME/dotfiles/newsbeuter -dotmap[$HOME/.config/nvim]=$HOME/dotfiles/vim -dotmap[$HOME/.config/qutebrowser]=$HOME/dotfiles/qutebrowser -dotmap[$HOME/.config/zathura/zathurarc]=$HOME/dotfiles/zathurarc -dotmap[$HOME/.gitconfig]=$HOME/dotfiles/gitconfig -dotmap[$HOME/.git_template]=$HOME/dotfiles/git_template -dotmap[$HOME/.inputrc]=$HOME/dotfiles/inputrc -dotmap[$HOME/.latexmkrc]=$HOME/dotfiles/latexmkrc -dotmap[$HOME/.ledgerrc]=$HOME/dotfiles/ledgerrc -dotmap[$HOME/.local/share/qutebrowser/userscripts]=$HOME/dotfiles/qutebrowser/userscripts -dotmap[$HOME/.mbsyncrc]=$HOME/dotfiles/mbsyncrc -dotmap[$HOME/.mrconfig]=$HOME/dotfiles/mr/mrconfig -dotmap[$HOME/.mrtrust]=$HOME/dotfiles/mr/mrtrust -dotmap[$HOME/.msmtprc]=$HOME/dotfiles/msmtprc -dotmap[$HOME/.mutt]=$HOME/dotfiles/mutt -dotmap[$HOME/.ncmpcpp]=$HOME/dotfiles/ncmpcpp -dotmap[$HOME/.password-store]=$HOME/dotfiles/passwords -dotmap[$HOME/.surfraw.bookmarks]=$HOME/dotfiles/surfraw.bookmarks -dotmap[$HOME/.tmux.conf]=$HOME/dotfiles/tmux.conf -dotmap[$HOME/.urxvt]=$HOME/dotfiles/urxvt -dotmap[$HOME/.vifm]=$HOME/dotfiles/vifm -dotmap[$HOME/.vim]=$HOME/dotfiles/vim -dotmap[$HOME/.vimperatorrc]=$HOME/dotfiles/vimperatorrc -dotmap[$HOME/.vimrc]=$HOME/dotfiles/vim/vimrc -dotmap[$HOME/.xinitrc]=$HOME/dotfiles/xinitrc -dotmap[$HOME/.Xresources]=$HOME/dotfiles/Xresources -dotmap[$HOME/.zgen]=$HOME/dotfiles/zsh/zgen -dotmap[$HOME/.zsh]=$HOME/dotfiles/zsh -dotmap[$HOME/.zshrc]=$HOME/dotfiles/zsh/zshrc diff --git a/.gitignore b/.gitignore index baaed72..3e76755 100644 --- a/.gitignore +++ b/.gitignore @@ -1,21 +1,9 @@ gitolite ledger -mutt/attachments/* -mutt/cache/* -mutt/solarized -mutt/temp/* passwords personal -qutebrowser/qsettings -urxvt/ext -vifm/Trash -vifm/vifminfo* -vifm/vimfiles -vim/.netrwhist -vim/plugged -vim/vim-plug -vim/vimundo/* -zsh/tmp -zsh/zgen +urxvt/ext/.git +zsh/.zsh/tmp +zsh/.zsh/zgen !*.gitkeep diff --git a/Xresources/.Xresources/base b/Xresources/.Xresources/base new file mode 100644 index 0000000..6a17306 --- /dev/null +++ b/Xresources/.Xresources/base @@ -0,0 +1,31 @@ +! 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,resize +URxvt.url-select.launcher: /usr/bin/qutebrowser +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.resize-font.smaller: C-minus +URxvt.resize-font.bigger: C-plus + +! Appearance +URxvt*font: xft:DejaVu Sans Mono:size=12 +URxvt*scrollBar: false +URxvt*internalBorder: 0 diff --git a/Xresources/.Xresources/dark b/Xresources/.Xresources/dark new file mode 100644 index 0000000..1c51f21 --- /dev/null +++ b/Xresources/.Xresources/dark @@ -0,0 +1,28 @@ +# include ".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/.Xresources/light b/Xresources/.Xresources/light new file mode 100644 index 0000000..c4b962d --- /dev/null +++ b/Xresources/.Xresources/light @@ -0,0 +1,28 @@ +# include ".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/.Xresources/seoul b/Xresources/.Xresources/seoul new file mode 100644 index 0000000..8b282e9 --- /dev/null +++ b/Xresources/.Xresources/seoul @@ -0,0 +1,29 @@ +# include ".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/Xresources/.Xresources/transparent b/Xresources/.Xresources/transparent new file mode 100644 index 0000000..b3c2d8e --- /dev/null +++ b/Xresources/.Xresources/transparent @@ -0,0 +1,5 @@ +# include "dark" + +! True transparency +URxvt.transparent: true +URxvt.shading: 10 diff --git a/Xresources/base b/Xresources/base deleted file mode 100644 index fac93e4..0000000 --- a/Xresources/base +++ /dev/null @@ -1,29 +0,0 @@ -! 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 -URxvt.url-select.launcher: /usr/bin/qutebrowser -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 - -! Appearance -URxvt*font: xft:DejaVu Sans Mono:size=12 -URxvt*scrollBar: false -URxvt*internalBorder: 0 diff --git a/Xresources/dark b/Xresources/dark deleted file mode 100644 index 1c51f21..0000000 --- a/Xresources/dark +++ /dev/null @@ -1,28 +0,0 @@ -# include ".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 deleted file mode 100644 index c4b962d..0000000 --- a/Xresources/light +++ /dev/null @@ -1,28 +0,0 @@ -# include ".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 deleted file mode 100644 index 8b282e9..0000000 --- a/Xresources/seoul +++ /dev/null @@ -1,29 +0,0 @@ -# include ".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/Xresources/transparent b/Xresources/transparent deleted file mode 100644 index b3c2d8e..0000000 --- a/Xresources/transparent +++ /dev/null @@ -1,5 +0,0 @@ -# include "dark" - -! True transparency -URxvt.transparent: true -URxvt.shading: 10 diff --git a/bash/.bashrc b/bash/.bashrc new file mode 100644 index 0000000..e4cd4ff --- /dev/null +++ b/bash/.bashrc @@ -0,0 +1,118 @@ +# ~/.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/bashrc b/bashrc deleted file mode 100644 index e4cd4ff..0000000 --- a/bashrc +++ /dev/null @@ -1,118 +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/bin/bin/books b/bin/bin/books new file mode 100755 index 0000000..8524277 --- /dev/null +++ b/bin/bin/books @@ -0,0 +1,5 @@ +#!/bin/bash +BOOKS_DIR="$HOME/Dropbox/books" +PDF=$(locate "$BOOKS_DIR/*.pdf") +TARGET=$(echo "${PDF//"$BOOKS_DIR/"/}" | dmenu -i -p "Open File:") +[[ -n $TARGET ]] && zathura "$BOOKS_DIR/$TARGET" & diff --git a/bin/bin/dot b/bin/bin/dot new file mode 100755 index 0000000..acb0e64 --- /dev/null +++ b/bin/bin/dot @@ -0,0 +1,48 @@ +#!/usr/bin/env bash + +get_links() +{ + find $HOME -not -path "$HOME/dotfiles/*" -type l | while read line; do + if [[ "$(realpath -q $line)" == "${HOME}/dotfiles/"* ]]; then + echo $line + fi + done +} + +clean() +{ + get_links | while read link; do + rm -v ${link} + done +} + +down() +{ + source $HOME/dotfiles/.dotmap + for link in "${!dotmap[@]}"; do + echo "Removing ${link}." + rm -rf $link + done +} + +up() +{ + source $HOME/dotfiles/.dotmap + for link in "${!dotmap[@]}"; do + target=${dotmap[$link]} + mkdir -p $(dirname ${link}) + echo "Linking $target." + rm -rf $link && ln -s $target $link + done +} + +save() +{ + echo "declare -A dotmap" > .dotmap + get_links | while read link; do + echo "dotmap[$link]=$(readlink -f -q $link)" | sed "s#$HOME#"'$HOME#g' >> .dotmap + done + sort .dotmap -o .dotmap +} + +$1 diff --git a/bin/bin/downloads b/bin/bin/downloads new file mode 100755 index 0000000..c4c306e --- /dev/null +++ b/bin/bin/downloads @@ -0,0 +1,5 @@ +#!/bin/bash +DOWNLOAD_DIR="$HOME/Downloads" +PDF=$(ls -t $DOWNLOAD_DIR/*.pdf) +TARGET=$(echo "${PDF//"$DOWNLOAD_DIR/"/}" | dmenu -i -p "Open File:") +[[ -n $TARGET ]] && zathura "$DOWNLOAD_DIR/$TARGET" & diff --git a/bin/bin/email b/bin/bin/email new file mode 100755 index 0000000..84e923e --- /dev/null +++ b/bin/bin/email @@ -0,0 +1,16 @@ +#! /usr/bin/env bash + +# Necessary to see the notification +export DISPLAY=:0 + +# Get all emails +mbsync -a + +new_mails=$(find $HOME/.mail -path '*/new/*' -type f) +subjects=$(cat $(echo -e ${new_mails/'\n'/' '}) | grep "^Subject: " | sed "s/^Subject: //g") + +if [[ ! -z ${new_mails} ]]; then + /usr/bin/notify-send -t 3 "New mail(s)!" "${subjects}" +fi + +echo "Email last checked on $(date)". diff --git a/bin/bin/i3-shell b/bin/bin/i3-shell new file mode 100755 index 0000000..120e4b4 --- /dev/null +++ b/bin/bin/i3-shell @@ -0,0 +1,27 @@ +#!/bin/bash +# i3 thread: https://faq.i3wm.org/question/150/how-to-launch-a-terminal-from-here/?answer=152#post-id-152 + +CMD=urxvt +CWD='' + +# Get window ID +ID=$(xdpyinfo | grep focus | cut -f4 -d " ") + +# Get PID of process whose window this is +PID=$(xprop -id $ID | grep -m 1 PID | cut -d " " -f 3) + +# Get last child process (shell, vim, etc) +if [ -n "$PID" ]; then + TREE=$(pstree -lpA $PID | tail -n 1) + PID=$(echo $TREE | awk -F'---' '{print $NF}' | sed -re 's/[^0-9]//g') + + # If we find the working directory, run the command in that directory + if [ -e "/proc/$PID/cwd" ]; then + CWD=$(readlink /proc/$PID/cwd) + fi +fi +if [ -n "$CWD" ]; then + cd $CWD && $CMD +else + $CMD +fi diff --git a/bin/bin/id b/bin/bin/id new file mode 100755 index 0000000..7dad85d --- /dev/null +++ b/bin/bin/id @@ -0,0 +1,6 @@ +#! /bin/bash +PWD_DIR="$HOME/.password-store" +[[ ! -z $(readlink ${PWD_DIR}) ]] && PWD_DIR=$(readlink ${PWD_DIR}) +PASSWORDS=$(locate "${PWD_DIR}/**/*.gpg") +TARGET=$(echo "${PASSWORDS//"$PWD_DIR/"/}" | dmenu -i -p "Get identifier for:") +basename $TARGET .gpg | xclip -i diff --git a/bin/bin/keyboard b/bin/bin/keyboard new file mode 100755 index 0000000..5a96bcb --- /dev/null +++ b/bin/bin/keyboard @@ -0,0 +1,36 @@ +# Dvorak programer +setxkbmap us -variant dvp + +# Make caps lock a Control +xmodmap -e "clear Lock" +xmodmap -e "keysym Caps_Lock = Control_L Control_L" +xmodmap -e "add Control = Control_L" + +# Remap modifiers (Keyboard dependent) +xmodmap -e "keycode 94 = Mode_switch" +# xmodmap -e 'keycode 108 = Super_L' + +# Remap modifiers (Keyboard independent) +xmodmap -e 'keysym space = Super_L' +xmodmap -e 'keycode any = space' + +# Numbers +xmodmap -e "keysym d = d D 0" +xmodmap -e "keysym o = o O 1" +xmodmap -e "keysym m = m M 1" +xmodmap -e "keysym e = e E 2" +xmodmap -e "keysym w = w W 2" +xmodmap -e "keysym u = u U 3" +xmodmap -e "keysym v = v V 3" +xmodmap -e "keysym h = h H 4" +xmodmap -e "keysym t = t T 5" +xmodmap -e "keysym n = n N 6" +xmodmap -e "keysym g = g G 7" +xmodmap -e "keysym c = c C 8" +xmodmap -e "keysym r = r R 9" + +# Xcape settings +killall -9 xcape + +xcape -e 'Control_L=Escape' +xcape -e 'Super_L=space' diff --git a/bin/bin/mystatus b/bin/bin/mystatus new file mode 100755 index 0000000..b26e9b6 --- /dev/null +++ b/bin/bin/mystatus @@ -0,0 +1,9 @@ +#!/bin/sh +# shell script to prepend i3status with more stuff + +i3status | while : +do + read line + nmails=$(find $HOME/.mail -path '*/new/*' -type f | wc -l) + echo "Email: ${nmails} | $line" || exit 1 +done diff --git a/bin/bin/password b/bin/bin/password new file mode 100755 index 0000000..065672b --- /dev/null +++ b/bin/bin/password @@ -0,0 +1,2 @@ +#! /bin/bash +passmenu diff --git a/bin/bin/recolor b/bin/bin/recolor new file mode 100755 index 0000000..edd5fa5 --- /dev/null +++ b/bin/bin/recolor @@ -0,0 +1,8 @@ +#!/bin/sh + +tr -d ' \t' | sed -n ' +s/.*background:/\x1b]11;/p +s/.*foreground:/\x1b]10;/p +s/.*borderColor:/\x1b]708;/p +s/.*color\([0-9][^:]*\):/\x1b]4;\1;/p +' | tr \\n \\a diff --git a/bin/bin/rename_workspace b/bin/bin/rename_workspace new file mode 100755 index 0000000..7636fd2 --- /dev/null +++ b/bin/bin/rename_workspace @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +workspace=$(i3-msg -t get_outputs | grep -Po '"current_workspace":"[^\"]*"' | sed 's/"current_workspace":"\([^"]\+\)"/\1/g') +number=$(echo "${workspace//[!0-9]}") + +new_name=$(zenity --entry --title="Rename workspace" --entry-text "$workspace") +if [[ "$new_name" != *:* ]]; then + new_name="$number:$new_name" +fi + +echo $new_name +exec i3-msg rename workspace to "$new_name" diff --git a/bin/bin/run b/bin/bin/run new file mode 100755 index 0000000..8ca03eb --- /dev/null +++ b/bin/bin/run @@ -0,0 +1,5 @@ +#!/bin/bash +SCRIPTS_DIR="$HOME/bin" && cd $SCRIPTS_DIR +SCRIPTS=$(ls -A $SCRIPTS_DIR) +TARGET=$(echo "${SCRIPTS//"$SCRIPTS_DIR/"/}" | dmenu -i -p "Run script:") +[[ -n $TARGET ]] && "$SCRIPTS_DIR/$TARGET" diff --git a/bin/bin/swap b/bin/bin/swap new file mode 100755 index 0000000..4c17dc7 --- /dev/null +++ b/bin/bin/swap @@ -0,0 +1,16 @@ +#!/usr/bin/python + +import i3 +outputs = i3.get_outputs() +print(outputs[0]) + +# set current workspace to output 0 +i3.workspace(outputs[0]['current_workspace']) + +# ..and move it to the other output. +# outputs wrap, so the right of the right is left ;) +i3.command('move', 'workspace to output right') + +# rinse and repeat +i3.workspace(outputs[1]['current_workspace']) +i3.command('move', 'workspace to output right') diff --git a/bin/bin/tldr b/bin/bin/tldr new file mode 100755 index 0000000..2b294c0 --- /dev/null +++ b/bin/bin/tldr @@ -0,0 +1,246 @@ +#!/bin/bash +# tldr client by Ray Lee, http://github.com/raylee/tldr +# a Sunday afternoon's project, I'm sure there's room for improvement. PRs welcome! + +set -uf -o pipefail + +# initialize globals, sanity check the environment, etc. +config() { + init_term_cmds + + if [ -z $(which curl) ]; then + echo "${red}tldr requires \`curl\` installed in your path$reset" + exit 1 + fi + + configdir=~/.tldr + [ -d ~/.config ] && configdir=~/.config/tldr + + platform=$(get_platform) + base_url="https://raw.githubusercontent.com/tldr-pages/tldr/master/pages" + index_url="http://tldr-pages.github.io/assets/index.json" + index="$configdir/index.json" + cache_days=14 + force_update='' + + #check if config folder exists, otherwise create it + [ -d "$configdir" ] || mkdir -p "$configdir" + + [ ! -f $index ] && update_index + auto_update_index +} + +update_index() { + curl -sf -o "$index" "$index_url" + res=$? + if [ $res -eq 22 ]; then + echo "Could not download index from $index_url" + exit 1 + fi +} + +# if the file exists and is more recent than $cache_days old +recent() { + exists=$(find "$1" -mtime -$cache_days 2>/dev/null) + [ -n "$exists" -a -z "$force_update" ] +} + +auto_update_index() { + recent "$index" || update_index +} + +# function contents via http://mywiki.wooledge.org/BashFAQ/037 +init_term_cmds() { + # only set if we're on an interactive session + [[ -t 2 ]] && { + reset=$( tput sgr0 || tput me ) # Reset cursor + bold=$( tput bold || tput md ) # Start bold + under=$( tput smul || tput us ) # Start underline + italic=$( tput sitm || tput ZH ) # Start italic + eitalic=$( tput ritm || tput ZH ) # End italic + default=$( tput op ) + back=$'\b' + + [[ $TERM != *-m ]] && { + black=$( tput setaf 0 || tput AF 0 ) + red=$( tput setaf 1 || tput AF 1 ) + green=$( tput setaf 2 || tput AF 2 ) + yellow=$( tput setaf 3 || tput AF 3 ) + blue=$( tput setaf 4 || tput AF 4 ) + magenta=$( tput setaf 5 || tput AF 5 ) + cyan=$( tput setaf 6 || tput AF 6 ) + white=$( tput setaf 7 || tput AF 7 ) + + onblue=$( tput setab 4 || tput AB 4 ) + ongrey=$( tput setab 7 || tput AB 7 ) + } + } 2>/dev/null ||: + + # osx's termcap doesn't have italics. The below adds support for iTerm2 + # and is harmless on Terminal.app + [ "$(get_platform)" = "osx" ] && { + italic=$(echo -e "\033[3m") + eitalic=$(echo -e "\033[23m") + } +} + +heading() { + local line="$*" + echo "$bold$red${line:2}$reset" +} + +quotation() { + local line="$*" + echo "$under${line:2}$reset" +} + +list_item() { + local line="$*" + echo "$line$reset" +} + +code() { + local line="$*" + # I'm sure there's a better way to strip the first and last characters. + line="${line:1}" + line="${line%\`}" + # convert {{variable}} to italics + line=${line//\{\{/$italic} + line=${line//\}\}/$eitalic} + + echo "$bold$line$reset" +} + +text() { + local line="$*" + echo "$line" +} + +# an idiot-level recognition of tldr's markdown. Needs improvement, or +# subcontracting out to a markdown -> ANSI formatting command +display_tldr() { + # read one line at a time, don't strip whitespace ('IFS='), and process + # last line even if it doesn't have a newline at the end + while IFS= read -r line || [[ -n "$line" ]]; do + start=${line:0:1} # get the first character + case "$start" in + '#') heading "$line" + ;; + '>') quotation "$line" + ;; + '-') list_item "$line" + ;; + '`') code "$line" + ;; + *) text "$line" + ;; + esac + done +} + +# convert the local platorm name to tldr's version +get_platform() { + case `uname -s` in + Darwin) echo "osx" ;; + Linux) echo "linux" ;; + SunOS) echo "sunos" ;; + *) echo "common" ;; + esac +} + +# extract the platform key from index.json, return preferred subpath to tldrpage +path_for_cmd() { + local desc=$(tr '{' '\n' < $index | grep "\"name\":\"$1\"") + # results in, eg, "name":"netstat","platform":["linux","osx"]}, + + [ -z "$desc" ] && return + + # use the platform specific version of the tldr first + if [[ $desc =~ \"$platform\" ]]; then + echo "$platform/$1.md" + elif [[ $desc =~ \"common\" ]]; then + echo "common/$1.md" + else + # take the first one so we can show something, but warn the user + local p=$(echo "$desc" | cut -d '"' -f 8) + >&2 echo -e "${red}tldr page $1 not found in $platform or common, using page from platform $p instead$reset\n" + echo "$p/$1.md" + fi +} + +# return the local cached copy of the tldrpage, or retrieve and cache from github +get_tldr() { + local p="$(path_for_cmd $1)" + cached="$configdir/$p" + recent "$cached" || { + mkdir -p $(dirname $cached) + curl -sf -o "$cached" "$base_url/$p" + } + # if the curl failed for some reason, keep cat from whinging + cat "$cached" 2>/dev/null +} + + +config + +usage() { + cmd=$(basename $0) + cat < + +[options] + -l, --list: show all available pages + -p, --platform: show page from specific platform rather than autodetecting + -u, --update: update, force retrieving latest copies of locally cached files + -h, -?, --help: this help overview + + + Show examples for this command + +The client caches a copy of all pages and the index locally under +$configdir. By default, the cached copies will expire in $cache_days days. + +EOF +exit 0 +} + +while [ $# -gt 0 ] +do + case "$1" in + -l|--list) + >&2 echo -e "Known tldr pages: \n" + tr '{' '\n' < "$configdir/index.json" | cut -d '"' -f4 | column + exit 0 + ;; + -u|--update) + force_update=yes + update_index + ;; + -h|-\?|--help) + usage + ;; + -p|--platform) + shift + platform=$1 + ;; + -*) + usage + ;; + *) + page=${1:-''} + ;; + esac + shift +done + +[ -z ${page:-} ] && usage + +tldr="$(get_tldr $page)" + +if [ -z "$tldr" ]; then + echo "tldr page for command $page not found" + exit 1 +fi + +display_tldr <<< "$tldr" +echo diff --git a/bin/bin/tmux_attach b/bin/bin/tmux_attach new file mode 100755 index 0000000..564e3bb --- /dev/null +++ b/bin/bin/tmux_attach @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +SESSIONS=$(tmux list-sessions | cut -d':' -f1) + +SESSION=$(echo "$SESSIONS" | dmenu -i -p "Session:" | tr -d '[[:space:]]') + +[[ -n $SESSION ]] || exit + +urxvt -e zsh -c "tmux new-session -A -s $SESSION" diff --git a/bin/bin/touchpad b/bin/bin/touchpad new file mode 100755 index 0000000..17649fa --- /dev/null +++ b/bin/bin/touchpad @@ -0,0 +1,9 @@ +#! /usr/bin/env bash + +# Touchpad status +status=$(synclient -l | grep TouchpadOff) +if [[ $status = *1 ]]; then + synclient TouchpadOff=0 +elif [[ $status = *0 ]]; then + synclient TouchpadOff=1 +fi diff --git a/bin/bin/vimin b/bin/bin/vimin new file mode 100755 index 0000000..905b30f --- /dev/null +++ b/bin/bin/vimin @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +tempfile=$(mktemp) +urxvt -e vim ${tempfile} +cat ${tempfile} | xclip -i diff --git a/bin/bin/workspace b/bin/bin/workspace new file mode 100755 index 0000000..a9e4aa0 --- /dev/null +++ b/bin/bin/workspace @@ -0,0 +1,33 @@ +#!/bin/zsh + +# Command to use +[[ $1 = 'n' ]] && cmd="workspace" +[[ $1 = 'm' ]] && cmd="move container to workspace" + +# List of workspaces +workspaces=$(i3-msg -t get_workspaces | grep -Po '"name":.*?[^\\]"' | sed 's/"name":"\([^"]\+\)"/\1/g') + +# Keep only the ones containing : +workspaces=$(echo $workspaces | sed '/:/!d') + +# Get desired workspace +target=$(echo $workspaces | dmenu -b -i -sf green -p "Go to workspace:") + +# Exit if empty +[[ -z $target ]] && exit + +# If new workspace has to be created +if [[ ! $target = [0-9]* ]]; then + + # Calculate number for new workspace + used_numbers=$(echo $workspaces | awk 'BEGIN { FS = ":" } ; { print $1 }') + max_number=$(echo $used_numbers | tail -1) + lowest_gap=$(echo $used_numbers | awk '$1!=p+1{print p+1}{p=$1}' | head -1) + [[ -z $lowest_gap ]] && new_number=$(($max_number + 1)) || new_number=$lowest_gap + + # Add number to workspace name + target=$new_number:$target +fi + +# Execute command +exec i3-msg $cmd $target diff --git a/bin/books b/bin/books deleted file mode 100755 index 8524277..0000000 --- a/bin/books +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -BOOKS_DIR="$HOME/Dropbox/books" -PDF=$(locate "$BOOKS_DIR/*.pdf") -TARGET=$(echo "${PDF//"$BOOKS_DIR/"/}" | dmenu -i -p "Open File:") -[[ -n $TARGET ]] && zathura "$BOOKS_DIR/$TARGET" & diff --git a/bin/dot b/bin/dot deleted file mode 100755 index acb0e64..0000000 --- a/bin/dot +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env bash - -get_links() -{ - find $HOME -not -path "$HOME/dotfiles/*" -type l | while read line; do - if [[ "$(realpath -q $line)" == "${HOME}/dotfiles/"* ]]; then - echo $line - fi - done -} - -clean() -{ - get_links | while read link; do - rm -v ${link} - done -} - -down() -{ - source $HOME/dotfiles/.dotmap - for link in "${!dotmap[@]}"; do - echo "Removing ${link}." - rm -rf $link - done -} - -up() -{ - source $HOME/dotfiles/.dotmap - for link in "${!dotmap[@]}"; do - target=${dotmap[$link]} - mkdir -p $(dirname ${link}) - echo "Linking $target." - rm -rf $link && ln -s $target $link - done -} - -save() -{ - echo "declare -A dotmap" > .dotmap - get_links | while read link; do - echo "dotmap[$link]=$(readlink -f -q $link)" | sed "s#$HOME#"'$HOME#g' >> .dotmap - done - sort .dotmap -o .dotmap -} - -$1 diff --git a/bin/downloads b/bin/downloads deleted file mode 100755 index c4c306e..0000000 --- a/bin/downloads +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -DOWNLOAD_DIR="$HOME/Downloads" -PDF=$(ls -t $DOWNLOAD_DIR/*.pdf) -TARGET=$(echo "${PDF//"$DOWNLOAD_DIR/"/}" | dmenu -i -p "Open File:") -[[ -n $TARGET ]] && zathura "$DOWNLOAD_DIR/$TARGET" & diff --git a/bin/email b/bin/email deleted file mode 100755 index 84e923e..0000000 --- a/bin/email +++ /dev/null @@ -1,16 +0,0 @@ -#! /usr/bin/env bash - -# Necessary to see the notification -export DISPLAY=:0 - -# Get all emails -mbsync -a - -new_mails=$(find $HOME/.mail -path '*/new/*' -type f) -subjects=$(cat $(echo -e ${new_mails/'\n'/' '}) | grep "^Subject: " | sed "s/^Subject: //g") - -if [[ ! -z ${new_mails} ]]; then - /usr/bin/notify-send -t 3 "New mail(s)!" "${subjects}" -fi - -echo "Email last checked on $(date)". diff --git a/bin/i3-shell b/bin/i3-shell deleted file mode 100755 index 120e4b4..0000000 --- a/bin/i3-shell +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -# i3 thread: https://faq.i3wm.org/question/150/how-to-launch-a-terminal-from-here/?answer=152#post-id-152 - -CMD=urxvt -CWD='' - -# Get window ID -ID=$(xdpyinfo | grep focus | cut -f4 -d " ") - -# Get PID of process whose window this is -PID=$(xprop -id $ID | grep -m 1 PID | cut -d " " -f 3) - -# Get last child process (shell, vim, etc) -if [ -n "$PID" ]; then - TREE=$(pstree -lpA $PID | tail -n 1) - PID=$(echo $TREE | awk -F'---' '{print $NF}' | sed -re 's/[^0-9]//g') - - # If we find the working directory, run the command in that directory - if [ -e "/proc/$PID/cwd" ]; then - CWD=$(readlink /proc/$PID/cwd) - fi -fi -if [ -n "$CWD" ]; then - cd $CWD && $CMD -else - $CMD -fi diff --git a/bin/id b/bin/id deleted file mode 100755 index 7dad85d..0000000 --- a/bin/id +++ /dev/null @@ -1,6 +0,0 @@ -#! /bin/bash -PWD_DIR="$HOME/.password-store" -[[ ! -z $(readlink ${PWD_DIR}) ]] && PWD_DIR=$(readlink ${PWD_DIR}) -PASSWORDS=$(locate "${PWD_DIR}/**/*.gpg") -TARGET=$(echo "${PASSWORDS//"$PWD_DIR/"/}" | dmenu -i -p "Get identifier for:") -basename $TARGET .gpg | xclip -i diff --git a/bin/keyboard b/bin/keyboard deleted file mode 100755 index 5a96bcb..0000000 --- a/bin/keyboard +++ /dev/null @@ -1,36 +0,0 @@ -# Dvorak programer -setxkbmap us -variant dvp - -# Make caps lock a Control -xmodmap -e "clear Lock" -xmodmap -e "keysym Caps_Lock = Control_L Control_L" -xmodmap -e "add Control = Control_L" - -# Remap modifiers (Keyboard dependent) -xmodmap -e "keycode 94 = Mode_switch" -# xmodmap -e 'keycode 108 = Super_L' - -# Remap modifiers (Keyboard independent) -xmodmap -e 'keysym space = Super_L' -xmodmap -e 'keycode any = space' - -# Numbers -xmodmap -e "keysym d = d D 0" -xmodmap -e "keysym o = o O 1" -xmodmap -e "keysym m = m M 1" -xmodmap -e "keysym e = e E 2" -xmodmap -e "keysym w = w W 2" -xmodmap -e "keysym u = u U 3" -xmodmap -e "keysym v = v V 3" -xmodmap -e "keysym h = h H 4" -xmodmap -e "keysym t = t T 5" -xmodmap -e "keysym n = n N 6" -xmodmap -e "keysym g = g G 7" -xmodmap -e "keysym c = c C 8" -xmodmap -e "keysym r = r R 9" - -# Xcape settings -killall -9 xcape - -xcape -e 'Control_L=Escape' -xcape -e 'Super_L=space' diff --git a/bin/mystatus b/bin/mystatus deleted file mode 100755 index b26e9b6..0000000 --- a/bin/mystatus +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -# shell script to prepend i3status with more stuff - -i3status | while : -do - read line - nmails=$(find $HOME/.mail -path '*/new/*' -type f | wc -l) - echo "Email: ${nmails} | $line" || exit 1 -done diff --git a/bin/password b/bin/password deleted file mode 100755 index 065672b..0000000 --- a/bin/password +++ /dev/null @@ -1,2 +0,0 @@ -#! /bin/bash -passmenu diff --git a/bin/recolor b/bin/recolor deleted file mode 100755 index edd5fa5..0000000 --- a/bin/recolor +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -tr -d ' \t' | sed -n ' -s/.*background:/\x1b]11;/p -s/.*foreground:/\x1b]10;/p -s/.*borderColor:/\x1b]708;/p -s/.*color\([0-9][^:]*\):/\x1b]4;\1;/p -' | tr \\n \\a diff --git a/bin/rename_workspace b/bin/rename_workspace deleted file mode 100755 index 7636fd2..0000000 --- a/bin/rename_workspace +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -workspace=$(i3-msg -t get_outputs | grep -Po '"current_workspace":"[^\"]*"' | sed 's/"current_workspace":"\([^"]\+\)"/\1/g') -number=$(echo "${workspace//[!0-9]}") - -new_name=$(zenity --entry --title="Rename workspace" --entry-text "$workspace") -if [[ "$new_name" != *:* ]]; then - new_name="$number:$new_name" -fi - -echo $new_name -exec i3-msg rename workspace to "$new_name" diff --git a/bin/run b/bin/run deleted file mode 100755 index 4b57856..0000000 --- a/bin/run +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -SCRIPTS_DIR="$HOME/dotfiles/bin" && cd $SCRIPTS_DIR -SCRIPTS=$(ls -A $SCRIPTS_DIR) -TARGET=$(echo "${SCRIPTS//"$SCRIPTS_DIR/"/}" | dmenu -i -p "Run script:") -[[ -n $TARGET ]] && "$SCRIPTS_DIR/$TARGET" diff --git a/bin/swap b/bin/swap deleted file mode 100755 index 4c17dc7..0000000 --- a/bin/swap +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/python - -import i3 -outputs = i3.get_outputs() -print(outputs[0]) - -# set current workspace to output 0 -i3.workspace(outputs[0]['current_workspace']) - -# ..and move it to the other output. -# outputs wrap, so the right of the right is left ;) -i3.command('move', 'workspace to output right') - -# rinse and repeat -i3.workspace(outputs[1]['current_workspace']) -i3.command('move', 'workspace to output right') diff --git a/bin/tldr b/bin/tldr deleted file mode 100755 index 2b294c0..0000000 --- a/bin/tldr +++ /dev/null @@ -1,246 +0,0 @@ -#!/bin/bash -# tldr client by Ray Lee, http://github.com/raylee/tldr -# a Sunday afternoon's project, I'm sure there's room for improvement. PRs welcome! - -set -uf -o pipefail - -# initialize globals, sanity check the environment, etc. -config() { - init_term_cmds - - if [ -z $(which curl) ]; then - echo "${red}tldr requires \`curl\` installed in your path$reset" - exit 1 - fi - - configdir=~/.tldr - [ -d ~/.config ] && configdir=~/.config/tldr - - platform=$(get_platform) - base_url="https://raw.githubusercontent.com/tldr-pages/tldr/master/pages" - index_url="http://tldr-pages.github.io/assets/index.json" - index="$configdir/index.json" - cache_days=14 - force_update='' - - #check if config folder exists, otherwise create it - [ -d "$configdir" ] || mkdir -p "$configdir" - - [ ! -f $index ] && update_index - auto_update_index -} - -update_index() { - curl -sf -o "$index" "$index_url" - res=$? - if [ $res -eq 22 ]; then - echo "Could not download index from $index_url" - exit 1 - fi -} - -# if the file exists and is more recent than $cache_days old -recent() { - exists=$(find "$1" -mtime -$cache_days 2>/dev/null) - [ -n "$exists" -a -z "$force_update" ] -} - -auto_update_index() { - recent "$index" || update_index -} - -# function contents via http://mywiki.wooledge.org/BashFAQ/037 -init_term_cmds() { - # only set if we're on an interactive session - [[ -t 2 ]] && { - reset=$( tput sgr0 || tput me ) # Reset cursor - bold=$( tput bold || tput md ) # Start bold - under=$( tput smul || tput us ) # Start underline - italic=$( tput sitm || tput ZH ) # Start italic - eitalic=$( tput ritm || tput ZH ) # End italic - default=$( tput op ) - back=$'\b' - - [[ $TERM != *-m ]] && { - black=$( tput setaf 0 || tput AF 0 ) - red=$( tput setaf 1 || tput AF 1 ) - green=$( tput setaf 2 || tput AF 2 ) - yellow=$( tput setaf 3 || tput AF 3 ) - blue=$( tput setaf 4 || tput AF 4 ) - magenta=$( tput setaf 5 || tput AF 5 ) - cyan=$( tput setaf 6 || tput AF 6 ) - white=$( tput setaf 7 || tput AF 7 ) - - onblue=$( tput setab 4 || tput AB 4 ) - ongrey=$( tput setab 7 || tput AB 7 ) - } - } 2>/dev/null ||: - - # osx's termcap doesn't have italics. The below adds support for iTerm2 - # and is harmless on Terminal.app - [ "$(get_platform)" = "osx" ] && { - italic=$(echo -e "\033[3m") - eitalic=$(echo -e "\033[23m") - } -} - -heading() { - local line="$*" - echo "$bold$red${line:2}$reset" -} - -quotation() { - local line="$*" - echo "$under${line:2}$reset" -} - -list_item() { - local line="$*" - echo "$line$reset" -} - -code() { - local line="$*" - # I'm sure there's a better way to strip the first and last characters. - line="${line:1}" - line="${line%\`}" - # convert {{variable}} to italics - line=${line//\{\{/$italic} - line=${line//\}\}/$eitalic} - - echo "$bold$line$reset" -} - -text() { - local line="$*" - echo "$line" -} - -# an idiot-level recognition of tldr's markdown. Needs improvement, or -# subcontracting out to a markdown -> ANSI formatting command -display_tldr() { - # read one line at a time, don't strip whitespace ('IFS='), and process - # last line even if it doesn't have a newline at the end - while IFS= read -r line || [[ -n "$line" ]]; do - start=${line:0:1} # get the first character - case "$start" in - '#') heading "$line" - ;; - '>') quotation "$line" - ;; - '-') list_item "$line" - ;; - '`') code "$line" - ;; - *) text "$line" - ;; - esac - done -} - -# convert the local platorm name to tldr's version -get_platform() { - case `uname -s` in - Darwin) echo "osx" ;; - Linux) echo "linux" ;; - SunOS) echo "sunos" ;; - *) echo "common" ;; - esac -} - -# extract the platform key from index.json, return preferred subpath to tldrpage -path_for_cmd() { - local desc=$(tr '{' '\n' < $index | grep "\"name\":\"$1\"") - # results in, eg, "name":"netstat","platform":["linux","osx"]}, - - [ -z "$desc" ] && return - - # use the platform specific version of the tldr first - if [[ $desc =~ \"$platform\" ]]; then - echo "$platform/$1.md" - elif [[ $desc =~ \"common\" ]]; then - echo "common/$1.md" - else - # take the first one so we can show something, but warn the user - local p=$(echo "$desc" | cut -d '"' -f 8) - >&2 echo -e "${red}tldr page $1 not found in $platform or common, using page from platform $p instead$reset\n" - echo "$p/$1.md" - fi -} - -# return the local cached copy of the tldrpage, or retrieve and cache from github -get_tldr() { - local p="$(path_for_cmd $1)" - cached="$configdir/$p" - recent "$cached" || { - mkdir -p $(dirname $cached) - curl -sf -o "$cached" "$base_url/$p" - } - # if the curl failed for some reason, keep cat from whinging - cat "$cached" 2>/dev/null -} - - -config - -usage() { - cmd=$(basename $0) - cat < - -[options] - -l, --list: show all available pages - -p, --platform: show page from specific platform rather than autodetecting - -u, --update: update, force retrieving latest copies of locally cached files - -h, -?, --help: this help overview - - - Show examples for this command - -The client caches a copy of all pages and the index locally under -$configdir. By default, the cached copies will expire in $cache_days days. - -EOF -exit 0 -} - -while [ $# -gt 0 ] -do - case "$1" in - -l|--list) - >&2 echo -e "Known tldr pages: \n" - tr '{' '\n' < "$configdir/index.json" | cut -d '"' -f4 | column - exit 0 - ;; - -u|--update) - force_update=yes - update_index - ;; - -h|-\?|--help) - usage - ;; - -p|--platform) - shift - platform=$1 - ;; - -*) - usage - ;; - *) - page=${1:-''} - ;; - esac - shift -done - -[ -z ${page:-} ] && usage - -tldr="$(get_tldr $page)" - -if [ -z "$tldr" ]; then - echo "tldr page for command $page not found" - exit 1 -fi - -display_tldr <<< "$tldr" -echo diff --git a/bin/tmux_attach b/bin/tmux_attach deleted file mode 100755 index 564e3bb..0000000 --- a/bin/tmux_attach +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash - -SESSIONS=$(tmux list-sessions | cut -d':' -f1) - -SESSION=$(echo "$SESSIONS" | dmenu -i -p "Session:" | tr -d '[[:space:]]') - -[[ -n $SESSION ]] || exit - -urxvt -e zsh -c "tmux new-session -A -s $SESSION" diff --git a/bin/touchpad b/bin/touchpad deleted file mode 100755 index 17649fa..0000000 --- a/bin/touchpad +++ /dev/null @@ -1,9 +0,0 @@ -#! /usr/bin/env bash - -# Touchpad status -status=$(synclient -l | grep TouchpadOff) -if [[ $status = *1 ]]; then - synclient TouchpadOff=0 -elif [[ $status = *0 ]]; then - synclient TouchpadOff=1 -fi diff --git a/bin/vimin b/bin/vimin deleted file mode 100755 index 905b30f..0000000 --- a/bin/vimin +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash -tempfile=$(mktemp) -urxvt -e vim ${tempfile} -cat ${tempfile} | xclip -i diff --git a/bin/workspace b/bin/workspace deleted file mode 100755 index a22511e..0000000 --- a/bin/workspace +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/zsh - -# Command to use -[[ $1 = 'n' ]] && cmd="workspace" -[[ $1 = 'm' ]] && cmd="move container to workspace" - -# List of workspaces -workspaces=$(i3-msg -t get_workspaces | grep -Po '"name":.*?[^\\]"' | sed 's/"name":"\([^"]\+\)"/\1/g') - -# Keep only the ones containing : -workspaces=$(echo $workspaces | sed '/:/!d') - -# Get desired workspace -target=$(echo $workspaces | dmenu -i -sf green -p "Go to workspace:") - -# Exit if empty -[[ -z $target ]] && exit - -# If new workspace has to be created -if [[ ! $target = [0-9]* ]]; then - - # Calculate number for new workspace - used_numbers=$(echo $workspaces | awk 'BEGIN { FS = ":" } ; { print $1 }') - max_number=$(echo $used_numbers | tail -1) - lowest_gap=$(echo $used_numbers | awk '$1!=p+1{print p+1}{p=$1}' | head -1) - [[ -z $lowest_gap ]] && new_number=$(($max_number + 1)) || new_number=$lowest_gap - - # Add number to workspace name - target=$new_number:$target -fi - -# Execute command -exec i3-msg $cmd $target diff --git a/crontab b/crontab deleted file mode 100644 index 6f1c80a..0000000 --- a/crontab +++ /dev/null @@ -1 +0,0 @@ -*/5 * * * * $HOME/bin/email >> $HOME/.cron_email_log diff --git a/dunst/.config/dunst/dunstrc b/dunst/.config/dunst/dunstrc new file mode 100644 index 0000000..3fcc5be --- /dev/null +++ b/dunst/.config/dunst/dunstrc @@ -0,0 +1,245 @@ +[global] + font = Monospace 8 + + # Allow a small subset of html markup: + # bold + # italic + # strikethrough + # underline + # + # For a complete reference see + # . + # If markup is not allowed, those tags will be stripped out of the + # message. + allow_markup = yes + + # The format of the message. Possible variables are: + # %a appname + # %s summary + # %b body + # %i iconname (including its path) + # %I iconname (without its path) + # %p progress value if set ([ 0%] to [100%]) or nothing + # Markup is allowed + format = "%s\n%b" + + # Sort messages by urgency. + sort = yes + + # Show how many messages are currently hidden (because of geometry). + indicate_hidden = yes + + # Alignment of message text. + # Possible values are "left", "center" and "right". + alignment = left + + # The frequency with wich text that is longer than the notification + # window allows bounces back and forth. + # This option conflicts with "word_wrap". + # Set to 0 to disable. + bounce_freq = 0 + + # Show age of message if message is older than show_age_threshold + # seconds. + # Set to -1 to disable. + show_age_threshold = 60 + + # Split notifications into multiple lines if they don't fit into + # geometry. + word_wrap = yes + + # Ignore newlines '\n' in notifications. + ignore_newline = no + + + # The geometry of the window: + # [{width}]x{height}[+/-{x}+/-{y}] + # The geometry of the message window. + # The height is measured in number of notifications everything else + # in pixels. If the width is omitted but the height is given + # ("-geometry x2"), the message window expands over the whole screen + # (dmenu-like). If width is 0, the window expands to the longest + # message displayed. A positive x is measured from the left, a + # negative from the right side of the screen. Y is measured from + # the top and down respectevly. + # The width can be negative. In this case the actual width is the + # screen width minus the width defined in within the geometry option. + geometry = "300x5-30+20" + + # Shrink window if it's smaller than the width. Will be ignored if + # width is 0. + shrink = no + + # The transparency of the window. Range: [0; 100]. + # This option will only work if a compositing windowmanager is + # present (e.g. xcompmgr, compiz, etc.). + transparency = 0 + + # Don't remove messages, if the user is idle (no mouse or keyboard input) + # for longer than idle_threshold seconds. + # Set to 0 to disable. + idle_threshold = 120 + + # Which monitor should the notifications be displayed on. + monitor = 0 + + # Display notification on focused monitor. Possible modes are: + # mouse: follow mouse pointer + # keyboard: follow window with keyboard focus + # none: don't follow anything + # + # "keyboard" needs a windowmanager that exports the + # _NET_ACTIVE_WINDOW property. + # This should be the case for almost all modern windowmanagers. + # + # If this option is set to mouse or keyboard, the monitor option + # will be ignored. + follow = mouse + + # Should a notification popped up from history be sticky or timeout + # as if it would normally do. + sticky_history = yes + + # Maximum amount of notifications kept in history + history_length = 20 + + # Display indicators for URLs (U) and actions (A). + show_indicators = yes + + # The height of a single line. If the height is smaller than the + # font height, it will get raised to the font height. + # This adds empty space above and under the text. + line_height = 0 + + # Draw a line of "separatpr_height" pixel height between two + # notifications. + # Set to 0 to disable. + separator_height = 2 + + # Padding between text and separator. + padding = 8 + + # Horizontal padding. + horizontal_padding = 8 + + # Define a color for the separator. + # possible values are: + # * auto: dunst tries to find a color fitting to the background; + # * foreground: use the same color as the foreground; + # * frame: use the same color as the frame; + # * anything else will be interpreted as a X color. + separator_color = frame + + # Print a notification on startup. + # This is mainly for error detection, since dbus (re-)starts dunst + # automatically after a crash. + startup_notification = false + + # dmenu path. + dmenu = /usr/bin/dmenu -p dunst: + + # Browser for opening urls in context menu. + browser = /usr/bin/firefox -new-tab + + # Align icons left/right/off + icon_position = off + + # Paths to default icons. + icon_folders = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/ + +[frame] + width = 3 + color = "#aaaaaa" + +[shortcuts] + + # Shortcuts are specified as [modifier+][modifier+]...key + # Available modifiers are "ctrl", "mod1" (the alt-key), "mod2", + # "mod3" and "mod4" (windows-key). + # Xev might be helpful to find names for keys. + + # Close notification. + close = ctrl+space + + # Close all notifications. + close_all = ctrl+shift+space + + # Redisplay last message(s). + # On the US keyboard layout "grave" is normally above TAB and left + # of "1". + history = ctrl+grave + + # Context menu. + context = ctrl+shift+period + +[urgency_low] + # IMPORTANT: colors have to be defined in quotation marks. + # Otherwise the "#" and following would be interpreted as a comment. + background = "#222222" + foreground = "#888888" + timeout = 10 + +[urgency_normal] + background = "#285577" + foreground = "#ffffff" + timeout = 10 + +[urgency_critical] + background = "#900000" + foreground = "#ffffff" + timeout = 0 + + +# Every section that isn't one of the above is interpreted as a rules to +# override settings for certain messages. +# Messages can be matched by "appname", "summary", "body", "icon", "category", +# "msg_urgency" and you can override the "timeout", "urgency", "foreground", +# "background", "new_icon" and "format". +# Shell-like globbing will get expanded. +# +# SCRIPTING +# You can specify a script that gets run when the rule matches by +# setting the "script" option. +# The script will be called as follows: +# script appname summary body icon urgency +# where urgency can be "LOW", "NORMAL" or "CRITICAL". +# +# NOTE: if you don't want a notification to be displayed, set the format +# to "". +# NOTE: It might be helpful to run dunst -print in a terminal in order +# to find fitting options for rules. + +#[espeak] +# summary = "*" +# script = dunst_espeak.sh + +#[script-test] +# summary = "*script*" +# script = dunst_test.sh + +#[ignore] +# # This notification will not be displayed +# summary = "foobar" +# format = "" + +#[signed_on] +# appname = Pidgin +# summary = "*signed on*" +# urgency = low +# +#[signed_off] +# appname = Pidgin +# summary = *signed off* +# urgency = low +# +#[says] +# appname = Pidgin +# summary = *says* +# urgency = critical +# +#[twitter] +# appname = Pidgin +# summary = *twitter.com* +# urgency = normal +# +# vim: ft=cfg diff --git a/dunstrc b/dunstrc deleted file mode 100644 index 3fcc5be..0000000 --- a/dunstrc +++ /dev/null @@ -1,245 +0,0 @@ -[global] - font = Monospace 8 - - # Allow a small subset of html markup: - # bold - # italic - # strikethrough - # underline - # - # For a complete reference see - # . - # If markup is not allowed, those tags will be stripped out of the - # message. - allow_markup = yes - - # The format of the message. Possible variables are: - # %a appname - # %s summary - # %b body - # %i iconname (including its path) - # %I iconname (without its path) - # %p progress value if set ([ 0%] to [100%]) or nothing - # Markup is allowed - format = "%s\n%b" - - # Sort messages by urgency. - sort = yes - - # Show how many messages are currently hidden (because of geometry). - indicate_hidden = yes - - # Alignment of message text. - # Possible values are "left", "center" and "right". - alignment = left - - # The frequency with wich text that is longer than the notification - # window allows bounces back and forth. - # This option conflicts with "word_wrap". - # Set to 0 to disable. - bounce_freq = 0 - - # Show age of message if message is older than show_age_threshold - # seconds. - # Set to -1 to disable. - show_age_threshold = 60 - - # Split notifications into multiple lines if they don't fit into - # geometry. - word_wrap = yes - - # Ignore newlines '\n' in notifications. - ignore_newline = no - - - # The geometry of the window: - # [{width}]x{height}[+/-{x}+/-{y}] - # The geometry of the message window. - # The height is measured in number of notifications everything else - # in pixels. If the width is omitted but the height is given - # ("-geometry x2"), the message window expands over the whole screen - # (dmenu-like). If width is 0, the window expands to the longest - # message displayed. A positive x is measured from the left, a - # negative from the right side of the screen. Y is measured from - # the top and down respectevly. - # The width can be negative. In this case the actual width is the - # screen width minus the width defined in within the geometry option. - geometry = "300x5-30+20" - - # Shrink window if it's smaller than the width. Will be ignored if - # width is 0. - shrink = no - - # The transparency of the window. Range: [0; 100]. - # This option will only work if a compositing windowmanager is - # present (e.g. xcompmgr, compiz, etc.). - transparency = 0 - - # Don't remove messages, if the user is idle (no mouse or keyboard input) - # for longer than idle_threshold seconds. - # Set to 0 to disable. - idle_threshold = 120 - - # Which monitor should the notifications be displayed on. - monitor = 0 - - # Display notification on focused monitor. Possible modes are: - # mouse: follow mouse pointer - # keyboard: follow window with keyboard focus - # none: don't follow anything - # - # "keyboard" needs a windowmanager that exports the - # _NET_ACTIVE_WINDOW property. - # This should be the case for almost all modern windowmanagers. - # - # If this option is set to mouse or keyboard, the monitor option - # will be ignored. - follow = mouse - - # Should a notification popped up from history be sticky or timeout - # as if it would normally do. - sticky_history = yes - - # Maximum amount of notifications kept in history - history_length = 20 - - # Display indicators for URLs (U) and actions (A). - show_indicators = yes - - # The height of a single line. If the height is smaller than the - # font height, it will get raised to the font height. - # This adds empty space above and under the text. - line_height = 0 - - # Draw a line of "separatpr_height" pixel height between two - # notifications. - # Set to 0 to disable. - separator_height = 2 - - # Padding between text and separator. - padding = 8 - - # Horizontal padding. - horizontal_padding = 8 - - # Define a color for the separator. - # possible values are: - # * auto: dunst tries to find a color fitting to the background; - # * foreground: use the same color as the foreground; - # * frame: use the same color as the frame; - # * anything else will be interpreted as a X color. - separator_color = frame - - # Print a notification on startup. - # This is mainly for error detection, since dbus (re-)starts dunst - # automatically after a crash. - startup_notification = false - - # dmenu path. - dmenu = /usr/bin/dmenu -p dunst: - - # Browser for opening urls in context menu. - browser = /usr/bin/firefox -new-tab - - # Align icons left/right/off - icon_position = off - - # Paths to default icons. - icon_folders = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/ - -[frame] - width = 3 - color = "#aaaaaa" - -[shortcuts] - - # Shortcuts are specified as [modifier+][modifier+]...key - # Available modifiers are "ctrl", "mod1" (the alt-key), "mod2", - # "mod3" and "mod4" (windows-key). - # Xev might be helpful to find names for keys. - - # Close notification. - close = ctrl+space - - # Close all notifications. - close_all = ctrl+shift+space - - # Redisplay last message(s). - # On the US keyboard layout "grave" is normally above TAB and left - # of "1". - history = ctrl+grave - - # Context menu. - context = ctrl+shift+period - -[urgency_low] - # IMPORTANT: colors have to be defined in quotation marks. - # Otherwise the "#" and following would be interpreted as a comment. - background = "#222222" - foreground = "#888888" - timeout = 10 - -[urgency_normal] - background = "#285577" - foreground = "#ffffff" - timeout = 10 - -[urgency_critical] - background = "#900000" - foreground = "#ffffff" - timeout = 0 - - -# Every section that isn't one of the above is interpreted as a rules to -# override settings for certain messages. -# Messages can be matched by "appname", "summary", "body", "icon", "category", -# "msg_urgency" and you can override the "timeout", "urgency", "foreground", -# "background", "new_icon" and "format". -# Shell-like globbing will get expanded. -# -# SCRIPTING -# You can specify a script that gets run when the rule matches by -# setting the "script" option. -# The script will be called as follows: -# script appname summary body icon urgency -# where urgency can be "LOW", "NORMAL" or "CRITICAL". -# -# NOTE: if you don't want a notification to be displayed, set the format -# to "". -# NOTE: It might be helpful to run dunst -print in a terminal in order -# to find fitting options for rules. - -#[espeak] -# summary = "*" -# script = dunst_espeak.sh - -#[script-test] -# summary = "*script*" -# script = dunst_test.sh - -#[ignore] -# # This notification will not be displayed -# summary = "foobar" -# format = "" - -#[signed_on] -# appname = Pidgin -# summary = "*signed on*" -# urgency = low -# -#[signed_off] -# appname = Pidgin -# summary = *signed off* -# urgency = low -# -#[says] -# appname = Pidgin -# summary = *says* -# urgency = critical -# -#[twitter] -# appname = Pidgin -# summary = *twitter.com* -# urgency = normal -# -# vim: ft=cfg diff --git a/git/.git_template/hooks/ctags b/git/.git_template/hooks/ctags new file mode 100755 index 0000000..a9a2150 --- /dev/null +++ b/git/.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/.git_template/hooks/post-checkout b/git/.git_template/hooks/post-checkout new file mode 100755 index 0000000..84f17ed --- /dev/null +++ b/git/.git_template/hooks/post-checkout @@ -0,0 +1,2 @@ +#!/bin/sh +.git/hooks/ctags >/dev/null 2>&1 & diff --git a/git/.git_template/hooks/post-commit b/git/.git_template/hooks/post-commit new file mode 100755 index 0000000..84f17ed --- /dev/null +++ b/git/.git_template/hooks/post-commit @@ -0,0 +1,2 @@ +#!/bin/sh +.git/hooks/ctags >/dev/null 2>&1 & diff --git a/git/.git_template/hooks/post-merge b/git/.git_template/hooks/post-merge new file mode 100755 index 0000000..84f17ed --- /dev/null +++ b/git/.git_template/hooks/post-merge @@ -0,0 +1,2 @@ +#!/bin/sh +.git/hooks/ctags >/dev/null 2>&1 & diff --git a/git/.git_template/hooks/post-rewrite b/git/.git_template/hooks/post-rewrite new file mode 100755 index 0000000..fe8972d --- /dev/null +++ b/git/.git_template/hooks/post-rewrite @@ -0,0 +1,4 @@ +#!/bin/sh +case "$1" in + rebase) exec .git/hooks/post-merge ;; +esac diff --git a/git/.gitconfig b/git/.gitconfig new file mode 100644 index 0000000..0e6c6f7 --- /dev/null +++ b/git/.gitconfig @@ -0,0 +1,15 @@ +[user] + name = Urbain Vaes + email = mail@urbainvaes.com +[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/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 0e6c6f7..0000000 --- a/gitconfig +++ /dev/null @@ -1,15 +0,0 @@ -[user] - name = Urbain Vaes - email = mail@urbainvaes.com -[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/i3/config b/i3/.config/i3/config new file mode 100644 index 0000000..ffed0bd --- /dev/null +++ b/i3/.config/i3/config @@ -0,0 +1,182 @@ +# 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 Mod4 + +# 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 --no-startup-id 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 + +# 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 + +# 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 number 1 +bindsym $mod+bracketleft workspace number 2 +bindsym $mod+braceleft workspace number 3 +bindsym $mod+braceright workspace number 4 +bindsym $mod+parenleft workspace number 5 +bindsym $mod+equal workspace number 6 +bindsym $mod+asterisk workspace number 7 +bindsym $mod+parenright workspace number 8 +bindsym $mod+plus workspace number 9 +bindsym $mod+bracketright workspace number 10 + +# move focused container to workspace +bindsym $mod+Shift+ampersand move container to workspace number 1 +bindsym $mod+Shift+bracketleft move container to workspace number 2 +bindsym $mod+Shift+braceleft move container to workspace number 3 +bindsym $mod+Shift+braceright move container to workspace number 4 +bindsym $mod+Shift+1 move container to workspace number 5 +bindsym $mod+Shift+equal move container to workspace number 6 +bindsym $mod+Shift+asterisk move container to workspace number 7 +bindsym $mod+Shift+2 move container to workspace number 8 +bindsym $mod+Shift+plus move container to workspace number 9 +bindsym $mod+Shift+bracketright move container to workspace number 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 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 $HOME/bin/mystatus +} + +# Workspaces +bindsym $mod+Tab workspace back_and_forth +bindsym $mod+comma workspace prev +bindsym $mod+period workspace next + +# Programs shortcuts +bindsym $mod+b exec --no-startup-id qutebrowser +bindsym $mod+i exec $HOME/bin/vimin + +# 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 light -A 10 +bindsym XF86MonBrightnessDown exec light -U 10 + +# Change wallpaper +bindsym F11 exec --no-startup-id feh --bg-fill --randomize /usr/share/backgrounds + +# Custom scripts +bindsym XF86AudioPlay exec $HOME/bin/touchpad +bindsym $mod+n exec $HOME/bin/workspace n +bindsym $mod+Shift+n exec $HOME/bin/workspace m +bindsym $mod+semicolon exec --no-startup-id $HOME/bin/run +bindsym $mod+z exec --no-startup-id $HOME/bin/tmux_attach +bindsym $mod+e exec --no-startup-id $HOME/bin/rename_workspace +bindsym $mod+m exec --no-startup-id $HOME/bin/i3-shell + +for_window [class="^.*"] border pixel 2 diff --git a/i3/.config/i3status/config b/i3/.config/i3status/config new file mode 100644 index 0000000..8561697 --- /dev/null +++ b/i3/.config/i3status/config @@ -0,0 +1,58 @@ +# i3status configuration file. +# see "man i3status" for documentation. + +# It is important that this file is edited as UTF-8. +# The following line should contain a sharp s: +# ß +# If the above line is not correctly displayed, fix your editor first! + +general { + colors = true + interval = 5 + output_format = "none" +} + +# order += "ipv6" +# order += "disk /" +# order += "run_watch DHCP" +# order += "run_watch VPN" +order += "wireless _first_" +order += "ethernet _first_" +order += "battery 0" +# order += "load" +order += "tztime local" + +wireless _first_ { + format_up = "W: (%quality at %essid) %ip" + format_down = "W: down" +} + +ethernet _first_ { + # if you use %speed, i3status requires root privileges + format_up = "E: %ip (%speed)" + format_down = "E: down" +} + +battery 0 { + format = "%status %percentage %remaining" +} + +run_watch DHCP { + pidfile = "/var/run/dhclient*.pid" +} + +run_watch VPN { + pidfile = "/var/run/vpnc/pid" +} + +tztime local { + format = "%Y-%m-%d %H:%M" +} + +load { + format = "%1min" +} + +disk "/" { + format = "%avail" +} diff --git a/i3/config b/i3/config deleted file mode 100644 index ffed0bd..0000000 --- a/i3/config +++ /dev/null @@ -1,182 +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 Mod4 - -# 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 --no-startup-id 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 - -# 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 - -# 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 number 1 -bindsym $mod+bracketleft workspace number 2 -bindsym $mod+braceleft workspace number 3 -bindsym $mod+braceright workspace number 4 -bindsym $mod+parenleft workspace number 5 -bindsym $mod+equal workspace number 6 -bindsym $mod+asterisk workspace number 7 -bindsym $mod+parenright workspace number 8 -bindsym $mod+plus workspace number 9 -bindsym $mod+bracketright workspace number 10 - -# move focused container to workspace -bindsym $mod+Shift+ampersand move container to workspace number 1 -bindsym $mod+Shift+bracketleft move container to workspace number 2 -bindsym $mod+Shift+braceleft move container to workspace number 3 -bindsym $mod+Shift+braceright move container to workspace number 4 -bindsym $mod+Shift+1 move container to workspace number 5 -bindsym $mod+Shift+equal move container to workspace number 6 -bindsym $mod+Shift+asterisk move container to workspace number 7 -bindsym $mod+Shift+2 move container to workspace number 8 -bindsym $mod+Shift+plus move container to workspace number 9 -bindsym $mod+Shift+bracketright move container to workspace number 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 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 $HOME/bin/mystatus -} - -# Workspaces -bindsym $mod+Tab workspace back_and_forth -bindsym $mod+comma workspace prev -bindsym $mod+period workspace next - -# Programs shortcuts -bindsym $mod+b exec --no-startup-id qutebrowser -bindsym $mod+i exec $HOME/bin/vimin - -# 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 light -A 10 -bindsym XF86MonBrightnessDown exec light -U 10 - -# Change wallpaper -bindsym F11 exec --no-startup-id feh --bg-fill --randomize /usr/share/backgrounds - -# Custom scripts -bindsym XF86AudioPlay exec $HOME/bin/touchpad -bindsym $mod+n exec $HOME/bin/workspace n -bindsym $mod+Shift+n exec $HOME/bin/workspace m -bindsym $mod+semicolon exec --no-startup-id $HOME/bin/run -bindsym $mod+z exec --no-startup-id $HOME/bin/tmux_attach -bindsym $mod+e exec --no-startup-id $HOME/bin/rename_workspace -bindsym $mod+m exec --no-startup-id $HOME/bin/i3-shell - -for_window [class="^.*"] border pixel 2 diff --git a/i3/i3status.conf b/i3/i3status.conf deleted file mode 100644 index 8561697..0000000 --- a/i3/i3status.conf +++ /dev/null @@ -1,58 +0,0 @@ -# i3status configuration file. -# see "man i3status" for documentation. - -# It is important that this file is edited as UTF-8. -# The following line should contain a sharp s: -# ß -# If the above line is not correctly displayed, fix your editor first! - -general { - colors = true - interval = 5 - output_format = "none" -} - -# order += "ipv6" -# order += "disk /" -# order += "run_watch DHCP" -# order += "run_watch VPN" -order += "wireless _first_" -order += "ethernet _first_" -order += "battery 0" -# order += "load" -order += "tztime local" - -wireless _first_ { - format_up = "W: (%quality at %essid) %ip" - format_down = "W: down" -} - -ethernet _first_ { - # if you use %speed, i3status requires root privileges - format_up = "E: %ip (%speed)" - format_down = "E: down" -} - -battery 0 { - format = "%status %percentage %remaining" -} - -run_watch DHCP { - pidfile = "/var/run/dhclient*.pid" -} - -run_watch VPN { - pidfile = "/var/run/vpnc/pid" -} - -tztime local { - format = "%Y-%m-%d %H:%M" -} - -load { - format = "%1min" -} - -disk "/" { - format = "%avail" -} diff --git a/input/inputrc b/input/inputrc new file mode 100644 index 0000000..1221bb9 --- /dev/null +++ b/input/inputrc @@ -0,0 +1,2 @@ +set editing-mode vi +set keymap vi 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/latexmk/.latexmkrc b/latexmk/.latexmkrc new file mode 100644 index 0000000..e9b5c76 --- /dev/null +++ b/latexmk/.latexmkrc @@ -0,0 +1,6 @@ +$pdf_mode = 1; +$pdflatex = 'pdflatex --shell-escape'; +$pdf_previewer = 'zathura -s -x "vim --servername SYNC --remote +%{line} %{input}" %O %S'; +$out_dir = 'build'; +$clean_ext = "synctex.gz bbl dvi"; +$new_viewer_always [0]; diff --git a/latexmkrc b/latexmkrc deleted file mode 100644 index e9b5c76..0000000 --- a/latexmkrc +++ /dev/null @@ -1,6 +0,0 @@ -$pdf_mode = 1; -$pdflatex = 'pdflatex --shell-escape'; -$pdf_previewer = 'zathura -s -x "vim --servername SYNC --remote +%{line} %{input}" %O %S'; -$out_dir = 'build'; -$clean_ext = "synctex.gz bbl dvi"; -$new_viewer_always [0]; diff --git a/ledgerrc b/ledgerrc deleted file mode 100644 index 4fb9118..0000000 --- a/ledgerrc +++ /dev/null @@ -1,2 +0,0 @@ ---pager /bin/less ---file ~/dotfiles/ledger/perso.ledger diff --git a/mbsync/.mbsyncrc b/mbsync/.mbsyncrc new file mode 100644 index 0000000..08a006e --- /dev/null +++ b/mbsync/.mbsyncrc @@ -0,0 +1,62 @@ +Create Both +Expunge Both +SyncState * +Sync All + +IMAPAccount Work +Host outlook.office365.com +User uv113@ic.ac.uk +PassCmd "gpg2 -q --for-your-eyes-only --no-tty -d ~/.password-store/email/u.vaes13@imperial.ac.uk.gpg" +SSLType IMAPS +CertificateFile /etc/ssl/certs/ca-certificates.crt + +IMAPAccount Personal +Host box.bknguyen.org +User mail@urbainvaes.com +PassCmd "gpg2 -q --for-your-eyes-only --no-tty -d ~/.password-store/email/mail@urbainvaes.com.gpg" +SSLType IMAPS +CertificateFile /etc/ssl/certs/ca-certificates.crt + +IMAPStore Work-remote +Account Work + +IMAPStore Personal-remote +Account Personal + +MaildirStore Work-local +Path ~/.mail/Work/ + +MaildirStore Personal-local +Path ~/.mail/Personal/ + +Channel Work-inbox +Master :Work-remote:"INBOX" +Slave :Work-local:"Work" + +Channel Work-draft +Master :Work-remote:"Drafts" +Slave :Work-local:"Work.drafts" + +Channel Work-sent +Master :Work-remote:"Sent Items" +Slave :Work-local:"Work.sent" + +Channel Work-bin +Master :Work-remote:"Deleted Items" +Slave :Work-local:"Work.bin" + +Channel Personal-inbox +Master :Personal-remote:"INBOX" +Slave :Personal-local:"Personal" + +Channel Personal-draft +Master :Personal-remote:"Drafts" +Slave :Personal-local:"Personal.drafts" + +Channel Personal-sent +Master :Personal-remote:"Sent" +Slave :Personal-local:"Personal.sent" + +Channel Personal-bin +Master :Personal-remote:"Trash" +Slave :Personal-local:"Personal.bin" diff --git a/mbsyncrc b/mbsyncrc deleted file mode 100644 index 08a006e..0000000 --- a/mbsyncrc +++ /dev/null @@ -1,62 +0,0 @@ -Create Both -Expunge Both -SyncState * -Sync All - -IMAPAccount Work -Host outlook.office365.com -User uv113@ic.ac.uk -PassCmd "gpg2 -q --for-your-eyes-only --no-tty -d ~/.password-store/email/u.vaes13@imperial.ac.uk.gpg" -SSLType IMAPS -CertificateFile /etc/ssl/certs/ca-certificates.crt - -IMAPAccount Personal -Host box.bknguyen.org -User mail@urbainvaes.com -PassCmd "gpg2 -q --for-your-eyes-only --no-tty -d ~/.password-store/email/mail@urbainvaes.com.gpg" -SSLType IMAPS -CertificateFile /etc/ssl/certs/ca-certificates.crt - -IMAPStore Work-remote -Account Work - -IMAPStore Personal-remote -Account Personal - -MaildirStore Work-local -Path ~/.mail/Work/ - -MaildirStore Personal-local -Path ~/.mail/Personal/ - -Channel Work-inbox -Master :Work-remote:"INBOX" -Slave :Work-local:"Work" - -Channel Work-draft -Master :Work-remote:"Drafts" -Slave :Work-local:"Work.drafts" - -Channel Work-sent -Master :Work-remote:"Sent Items" -Slave :Work-local:"Work.sent" - -Channel Work-bin -Master :Work-remote:"Deleted Items" -Slave :Work-local:"Work.bin" - -Channel Personal-inbox -Master :Personal-remote:"INBOX" -Slave :Personal-local:"Personal" - -Channel Personal-draft -Master :Personal-remote:"Drafts" -Slave :Personal-local:"Personal.drafts" - -Channel Personal-sent -Master :Personal-remote:"Sent" -Slave :Personal-local:"Personal.sent" - -Channel Personal-bin -Master :Personal-remote:"Trash" -Slave :Personal-local:"Personal.bin" diff --git a/misc/.gtkrc-2.0.mine b/misc/.gtkrc-2.0.mine deleted file mode 100644 index 4e2ec82..0000000 --- a/misc/.gtkrc-2.0.mine +++ /dev/null @@ -1,5 +0,0 @@ -style "uzbl" { - GtkRange::slider-width = 0 - GtkRange::trough-border = 0 -} -widget "Uzbl*" style "uzbl" diff --git a/misc/20-keyboard.conf b/misc/20-keyboard.conf deleted file mode 100644 index 33cf6ed..0000000 --- a/misc/20-keyboard.conf +++ /dev/null @@ -1,6 +0,0 @@ -Section "InputClass" - Identifier "keyboard" - MatchIsKeyboard "yes" - Option "XkbLayout" "us" - Option "XkbVariant" "dvp" -EndSection diff --git a/mr/mrconfig b/mr/mrconfig index a142ae8..7299c7e 100644 --- a/mr/mrconfig +++ b/mr/mrconfig @@ -1,40 +1,40 @@ -[/home/urbain/dotfiles] +[$HOME/dotfiles] checkout = git clone 'git@urbainvaes.com:dotfiles.git' 'dotfiles' update = git pull origin master push = git push origin master -[/home/urbain/dotfiles/gitolite] +[$HOME/gitolite] checkout = git clone 'git@urbainvaes.com:gitolite-admin.git' 'gitolite' update = git pull origin master push = git push origin master -[/home/urbain/dotfiles/ledger] +[$HOME/ledger] checkout = git clone 'git@urbainvaes.com:private/ledger.git' 'ledger' update = git pull origin master push = git push origin master -[/home/urbain/dotfiles/passwords] -checkout = git clone 'git@urbainvaes.com:private/passwords.git' 'passwords' +[$HOME/.password-store] +checkout = git clone 'git@urbainvaes.com:private/passwords.git' '.password-store' update = git pull origin master push = git push origin master -[/home/urbain/dotfiles/personal] +[$HOME/personal] checkout = git clone 'git@urbainvaes.com:private/personal.git' 'personal' update = git pull origin master push = git push origin master -[/home/urbain/dotfiles/vim/vim-plug] +[$HOME/.vim/vim-plug] checkout = git clone 'https://github.com/junegunn/vim-plug' 'vim-plug' skip = [ "$1" = push ] -[/home/urbain/dotfiles/mutt/solarized] +[$HOME/.mutt/solarized] checkout = git clone 'https://github.com/altercation/mutt-colors-solarized' 'solarized' skip = [ "$1" = push ] -[/home/urbain/dotfiles/zsh/zgen] +[$HOME/.zsh/zgen] checkout = git clone 'https://github.com/tarjoilija/zgen' 'zgen' skip = [ "$1" = push ] -[/home/urbain/dotfiles/urxvt/ext] +[$HOME/.urxvt/ext] checkout = git clone 'https://github.com/muennich/urxvt-perls' 'ext' skip = [ "$1" = push ] diff --git a/msmtp/.msmtprc b/msmtp/.msmtprc new file mode 100644 index 0000000..f056ee7 --- /dev/null +++ b/msmtp/.msmtprc @@ -0,0 +1,21 @@ +defaults +auth on +tls on +tls_trust_file /etc/ssl/certs/ca-certificates.crt +logfile ~/.msmtp.log + +account imperial +host outlook.office365.com +from u.vaes13@imperial.ac.uk +user uv113@ic.ac.uk +passwordeval "gpg --use-agent --quiet --for-your-eyes-only --no-tty --decrypt ~/.password-store/email/u.vaes13@imperial.ac.uk.gpg" +port 587 + +account personal +host box.bknguyen.org +from mail@urbainvaes.com +user mail@urbainvaes.com +passwordeval "gpg --use-agent --quiet --for-your-eyes-only --no-tty --decrypt ~/.password-store/email/mail@urbainvaes.com.gpg" +port 587 + +account default : personal diff --git a/msmtprc b/msmtprc deleted file mode 100644 index f056ee7..0000000 --- a/msmtprc +++ /dev/null @@ -1,21 +0,0 @@ -defaults -auth on -tls on -tls_trust_file /etc/ssl/certs/ca-certificates.crt -logfile ~/.msmtp.log - -account imperial -host outlook.office365.com -from u.vaes13@imperial.ac.uk -user uv113@ic.ac.uk -passwordeval "gpg --use-agent --quiet --for-your-eyes-only --no-tty --decrypt ~/.password-store/email/u.vaes13@imperial.ac.uk.gpg" -port 587 - -account personal -host box.bknguyen.org -from mail@urbainvaes.com -user mail@urbainvaes.com -passwordeval "gpg --use-agent --quiet --for-your-eyes-only --no-tty --decrypt ~/.password-store/email/mail@urbainvaes.com.gpg" -port 587 - -account default : personal diff --git a/mutt/.mutt/.gitignore b/mutt/.mutt/.gitignore new file mode 100644 index 0000000..c3f6190 --- /dev/null +++ b/mutt/.mutt/.gitignore @@ -0,0 +1,4 @@ +attachments/* +cache/* +solarized +temp/* diff --git a/mutt/.mutt/alias b/mutt/.mutt/alias new file mode 120000 index 0000000..1cc59a8 --- /dev/null +++ b/mutt/.mutt/alias @@ -0,0 +1 @@ +../../../personal/mutt/alias \ No newline at end of file diff --git a/mutt/.mutt/colors b/mutt/.mutt/colors new file mode 100644 index 0000000..39b16b2 --- /dev/null +++ b/mutt/.mutt/colors @@ -0,0 +1,23 @@ +# -*-muttrc-*- + +# Palette for use with the Linux console. Black background. + +color hdrdefault blue black +color quoted blue black +color signature blue black +color attachment red black +color prompt brightmagenta black +color message brightred black +color error brightred black +color indicator black red +color status brightgreen blue +color tree white black +color normal white black +color markers red black +color search white black +color tilde brightmagenta black +color index blue black ~F +color index red black "~N|~O" + +# color body brightwhite black '\*+[^*]+\*+' +# color body brightwhite black '_+[^_]+_+' diff --git a/mutt/.mutt/crypto b/mutt/.mutt/crypto new file mode 100644 index 0000000..393820b --- /dev/null +++ b/mutt/.mutt/crypto @@ -0,0 +1,85 @@ +# -*-muttrc-*- +# +# Command formats for gpg. +# +# This version uses gpg-2comp from +# http://70t.de/download/gpg-2comp.tar.gz +# +# $Id$ +# +# %p The empty string when no passphrase is needed, +# the string "PGPPASSFD=0" if one is needed. +# +# This is mostly used in conditional % sequences. +# +# %f Most PGP commands operate on a single file or a file +# containing a message. %f expands to this file's name. +# +# %s When verifying signatures, there is another temporary file +# containing the detached signature. %s expands to this +# file's name. +# +# %a In "signing" contexts, this expands to the value of the +# configuration variable $pgp_sign_as. You probably need to +# use this within a conditional % sequence. +# +# %r In many contexts, mutt passes key IDs to pgp. %r expands to +# a list of key IDs. + +# Note that we explicitly set the comment armor header since GnuPG, when used +# in some localiaztion environments, generates 8bit data in that header, thereby +# breaking PGP/MIME. + +# decode application/pgp +set pgp_decode_command="gpg --status-fd=2 %?p?--passphrase-fd 0? --no-verbose --quiet --batch --output - %f" + +# verify a pgp/mime signature +set pgp_verify_command="gpg --status-fd=2 --no-verbose --quiet --batch --output - --verify %s %f" + +# decrypt a pgp/mime attachment +set pgp_decrypt_command="gpg --status-fd=2 %?p?--passphrase-fd 0? --no-verbose --quiet --batch --output - %f" + +# create a pgp/mime signed attachment +# set pgp_sign_command="gpg-2comp --comment '' --no-verbose --batch --output - %?p?--passphrase-fd 0? --armor --detach-sign --textmode %?a?-u %a? %f" +set pgp_sign_command="gpg --no-verbose --batch --quiet --output - %?p?--passphrase-fd 0? --armor --detach-sign --textmode %?a?-u %a? %f" + +# create a application/pgp signed (old-style) message +# set pgp_clearsign_command="gpg-2comp --comment '' --no-verbose --batch --output - %?p?--passphrase-fd 0? --armor --textmode --clearsign %?a?-u %a? %f" +set pgp_clearsign_command="gpg --no-verbose --batch --quiet --output - %?p?--passphrase-fd 0? --armor --textmode --clearsign %?a?-u %a? %f" + +# create a pgp/mime encrypted attachment +# set pgp_encrypt_only_command="pgpewrap gpg-2comp -v --batch --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f" +set pgp_encrypt_only_command="pgpewrap gpg --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f" + +# create a pgp/mime encrypted and signed attachment +# set pgp_encrypt_sign_command="pgpewrap gpg-2comp %?p?--passphrase-fd 0? -v --batch --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f" +set pgp_encrypt_sign_command="pgpewrap gpg %?p?--passphrase-fd 0? --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f" + +# import a key into the public key ring +set pgp_import_command="gpg --no-verbose --import %f" + +# export a key from the public key ring +set pgp_export_command="gpg --no-verbose --export --armor %r" + +# verify a key +set pgp_verify_key_command="gpg --verbose --batch --fingerprint --check-sigs %r" + +# read in the public key ring +set pgp_list_pubring_command="gpg --no-verbose --batch --quiet --with-colons --list-keys %r" + +# read in the secret key ring +set pgp_list_secring_command="gpg --no-verbose --batch --quiet --with-colons --list-secret-keys %r" + +# fetch keys +# set pgp_getkeys_command="pkspxycwrap %r" + +# pattern for good signature - may need to be adapted to locale! + +# set pgp_good_sign="^gpgv?: Good signature from " + +# OK, here's a version which uses gnupg's message catalog: +# set pgp_good_sign="`gettext -d gnupg -s 'Good signature from "' | tr -d '"'`" + +# This version uses --status-fd messages +set pgp_good_sign="^\\[GNUPG:\\] GOODSIG" + diff --git a/mutt/.mutt/id_personal b/mutt/.mutt/id_personal new file mode 100644 index 0000000..96892b3 --- /dev/null +++ b/mutt/.mutt/id_personal @@ -0,0 +1,11 @@ +set from = "mail@urbainvaes.com" +set sendmail="/usr/bin/msmtp -a personal" + +set spoolfile = "+Personal/Personal" +set record = "+Personal/Personal.sent" +set postponed = "+Personal/Personal.drafts" +set trash = "+Personal/Personal.bin" + +macro index,pager gs " $record" +macro index,pager gd " $postponed" +macro index,pager gb " $trash" diff --git a/mutt/.mutt/id_work b/mutt/.mutt/id_work new file mode 100644 index 0000000..238cfcb --- /dev/null +++ b/mutt/.mutt/id_work @@ -0,0 +1,11 @@ +set from = "u.vaes13@imperial.ac.uk" +set sendmail="/usr/bin/msmtp -a imperial" + +set spoolfile = "+Work/Work" +set record = "+Work/Work.sent" +set postponed = "+Work/Work.drafts" +set trash = "+Work/Work.bin" + +macro index,pager gs " $record" +macro index,pager gd " $postponed" +macro index,pager gb " $trash" diff --git a/mutt/.mutt/mailboxes b/mutt/.mutt/mailboxes new file mode 100644 index 0000000..a4be3a9 --- /dev/null +++ b/mutt/.mutt/mailboxes @@ -0,0 +1 @@ +mailboxes "+Work/Work" "+Work/Work.bin" "+Work/Work.drafts" "+Work/Work.sent" "+Personal/Personal" "+Personal/Personal.bin" "+Personal/Personal.drafts" "+Personal/Personal.sent" diff --git a/mutt/.mutt/mailcap b/mutt/.mutt/mailcap new file mode 100644 index 0000000..dcab31d --- /dev/null +++ b/mutt/.mutt/mailcap @@ -0,0 +1,5 @@ +text/html; mv %s %s.html && qutebrowser %s.html >/dev/null 2>/dev/null; needsterminal; +text/html; w3m -dump %s; nametemplate=%s.html; copiousoutput +text/plain; more %s; +image/*; feh %s +application/pdf; zathura %s diff --git a/mutt/.mutt/muttrc b/mutt/.mutt/muttrc new file mode 100644 index 0000000..2264a95 --- /dev/null +++ b/mutt/.mutt/muttrc @@ -0,0 +1,94 @@ +# 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 signature = ~/.mutt/signature +set mailcap_path = ~/.mutt/mailcap +set tmpdir = ~/.mutt/temp + +# Source crypto, aliases, mailboxes +source ~/.mutt/colors +source ~/.mutt/crypto +source ~/.mutt/alias +source ~/.mutt/mailboxes +source ~/.mutt/id_work + +# General information +set realname = "Urbain Vaes" +set reverse_alias +set sort = reverse-date +set weed +set fcc_clear +unset markers +set sleep_time = 0 + +# Encryption +set crypt_autosign = no +set crypt_replyencrypt = yes +set pgp_auto_decode = yes +set pgp_autosign = no +set pgp_sign_as = 716064C0 +set pgp_use_gpg_agent = yes +set pgp_timeout = 3600 + +# Sidebar +set sidebar_width=26 +set sidebar_visible = yes +set sidebar_delim='|' +set sidebar_shortpath = yes +set sidebar_folderindent = yes +set sidebar_format = "%B%* %?F?[%F]?%?N?(%N)?%4S" +bind index,pager \Cn sidebar-next +bind index,pager \Cp sidebar-prev +bind index,pager O sidebar-open + +# Prompts +set delete = yes +set quit = yes + +# Pager +set pager_stop +set pager_index_lines = 10 + +# HTML messages +auto_view text/html +alternative_order text/plain text/enriched text/html + +# Editor +set editor="$EDITOR" +set include=yes + +# Macros +macro index,pager gp " +Personal/Personal" +macro index,pager gw " +Work/Work" + +# Key bindings +bind attach view-mailcap + +bind index,pager \Cf next-page +bind index,pager \Cb previous-page +bind index,pager \Cu next-unread-mailbox + +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 + +# Hooks +folder-hook 'Work*' 'source ~/.mutt/id_work' +folder-hook 'Personal*' 'source ~/.mutt/id_personal' + +# Source mutt solarized +`[ "$COLORSCHEME" = "light" ] && echo source $HOME/.mutt/solarized/mutt-colors-solarized-light-16.muttrc || echo set` +`[ "$COLORSCHEME" = "dark" ] && echo source $HOME/.mutt/solarized/mutt-colors-solarized-dark-16.muttrc || echo set` + +# Identities +set reverse_name +alternates "*@urbainvaes.com" diff --git a/mutt/.mutt/signature b/mutt/.mutt/signature new file mode 100644 index 0000000..eb52bfb --- /dev/null +++ b/mutt/.mutt/signature @@ -0,0 +1 @@ +Urbain Vaes diff --git a/mutt/attachments/.gitkeep b/mutt/attachments/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/mutt/cache/.gitkeep b/mutt/cache/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/mutt/colors b/mutt/colors deleted file mode 100644 index 39b16b2..0000000 --- a/mutt/colors +++ /dev/null @@ -1,23 +0,0 @@ -# -*-muttrc-*- - -# Palette for use with the Linux console. Black background. - -color hdrdefault blue black -color quoted blue black -color signature blue black -color attachment red black -color prompt brightmagenta black -color message brightred black -color error brightred black -color indicator black red -color status brightgreen blue -color tree white black -color normal white black -color markers red black -color search white black -color tilde brightmagenta black -color index blue black ~F -color index red black "~N|~O" - -# color body brightwhite black '\*+[^*]+\*+' -# color body brightwhite black '_+[^_]+_+' diff --git a/mutt/crypto b/mutt/crypto deleted file mode 100644 index 393820b..0000000 --- a/mutt/crypto +++ /dev/null @@ -1,85 +0,0 @@ -# -*-muttrc-*- -# -# Command formats for gpg. -# -# This version uses gpg-2comp from -# http://70t.de/download/gpg-2comp.tar.gz -# -# $Id$ -# -# %p The empty string when no passphrase is needed, -# the string "PGPPASSFD=0" if one is needed. -# -# This is mostly used in conditional % sequences. -# -# %f Most PGP commands operate on a single file or a file -# containing a message. %f expands to this file's name. -# -# %s When verifying signatures, there is another temporary file -# containing the detached signature. %s expands to this -# file's name. -# -# %a In "signing" contexts, this expands to the value of the -# configuration variable $pgp_sign_as. You probably need to -# use this within a conditional % sequence. -# -# %r In many contexts, mutt passes key IDs to pgp. %r expands to -# a list of key IDs. - -# Note that we explicitly set the comment armor header since GnuPG, when used -# in some localiaztion environments, generates 8bit data in that header, thereby -# breaking PGP/MIME. - -# decode application/pgp -set pgp_decode_command="gpg --status-fd=2 %?p?--passphrase-fd 0? --no-verbose --quiet --batch --output - %f" - -# verify a pgp/mime signature -set pgp_verify_command="gpg --status-fd=2 --no-verbose --quiet --batch --output - --verify %s %f" - -# decrypt a pgp/mime attachment -set pgp_decrypt_command="gpg --status-fd=2 %?p?--passphrase-fd 0? --no-verbose --quiet --batch --output - %f" - -# create a pgp/mime signed attachment -# set pgp_sign_command="gpg-2comp --comment '' --no-verbose --batch --output - %?p?--passphrase-fd 0? --armor --detach-sign --textmode %?a?-u %a? %f" -set pgp_sign_command="gpg --no-verbose --batch --quiet --output - %?p?--passphrase-fd 0? --armor --detach-sign --textmode %?a?-u %a? %f" - -# create a application/pgp signed (old-style) message -# set pgp_clearsign_command="gpg-2comp --comment '' --no-verbose --batch --output - %?p?--passphrase-fd 0? --armor --textmode --clearsign %?a?-u %a? %f" -set pgp_clearsign_command="gpg --no-verbose --batch --quiet --output - %?p?--passphrase-fd 0? --armor --textmode --clearsign %?a?-u %a? %f" - -# create a pgp/mime encrypted attachment -# set pgp_encrypt_only_command="pgpewrap gpg-2comp -v --batch --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f" -set pgp_encrypt_only_command="pgpewrap gpg --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f" - -# create a pgp/mime encrypted and signed attachment -# set pgp_encrypt_sign_command="pgpewrap gpg-2comp %?p?--passphrase-fd 0? -v --batch --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f" -set pgp_encrypt_sign_command="pgpewrap gpg %?p?--passphrase-fd 0? --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f" - -# import a key into the public key ring -set pgp_import_command="gpg --no-verbose --import %f" - -# export a key from the public key ring -set pgp_export_command="gpg --no-verbose --export --armor %r" - -# verify a key -set pgp_verify_key_command="gpg --verbose --batch --fingerprint --check-sigs %r" - -# read in the public key ring -set pgp_list_pubring_command="gpg --no-verbose --batch --quiet --with-colons --list-keys %r" - -# read in the secret key ring -set pgp_list_secring_command="gpg --no-verbose --batch --quiet --with-colons --list-secret-keys %r" - -# fetch keys -# set pgp_getkeys_command="pkspxycwrap %r" - -# pattern for good signature - may need to be adapted to locale! - -# set pgp_good_sign="^gpgv?: Good signature from " - -# OK, here's a version which uses gnupg's message catalog: -# set pgp_good_sign="`gettext -d gnupg -s 'Good signature from "' | tr -d '"'`" - -# This version uses --status-fd messages -set pgp_good_sign="^\\[GNUPG:\\] GOODSIG" - diff --git a/mutt/id_personal b/mutt/id_personal deleted file mode 100644 index 96892b3..0000000 --- a/mutt/id_personal +++ /dev/null @@ -1,11 +0,0 @@ -set from = "mail@urbainvaes.com" -set sendmail="/usr/bin/msmtp -a personal" - -set spoolfile = "+Personal/Personal" -set record = "+Personal/Personal.sent" -set postponed = "+Personal/Personal.drafts" -set trash = "+Personal/Personal.bin" - -macro index,pager gs " $record" -macro index,pager gd " $postponed" -macro index,pager gb " $trash" diff --git a/mutt/id_work b/mutt/id_work deleted file mode 100644 index 238cfcb..0000000 --- a/mutt/id_work +++ /dev/null @@ -1,11 +0,0 @@ -set from = "u.vaes13@imperial.ac.uk" -set sendmail="/usr/bin/msmtp -a imperial" - -set spoolfile = "+Work/Work" -set record = "+Work/Work.sent" -set postponed = "+Work/Work.drafts" -set trash = "+Work/Work.bin" - -macro index,pager gs " $record" -macro index,pager gd " $postponed" -macro index,pager gb " $trash" diff --git a/mutt/mailboxes b/mutt/mailboxes deleted file mode 100644 index a4be3a9..0000000 --- a/mutt/mailboxes +++ /dev/null @@ -1 +0,0 @@ -mailboxes "+Work/Work" "+Work/Work.bin" "+Work/Work.drafts" "+Work/Work.sent" "+Personal/Personal" "+Personal/Personal.bin" "+Personal/Personal.drafts" "+Personal/Personal.sent" diff --git a/mutt/mailcap b/mutt/mailcap deleted file mode 100644 index dcab31d..0000000 --- a/mutt/mailcap +++ /dev/null @@ -1,5 +0,0 @@ -text/html; mv %s %s.html && qutebrowser %s.html >/dev/null 2>/dev/null; needsterminal; -text/html; w3m -dump %s; nametemplate=%s.html; copiousoutput -text/plain; more %s; -image/*; feh %s -application/pdf; zathura %s diff --git a/mutt/muttrc b/mutt/muttrc deleted file mode 100644 index 2264a95..0000000 --- a/mutt/muttrc +++ /dev/null @@ -1,94 +0,0 @@ -# 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 signature = ~/.mutt/signature -set mailcap_path = ~/.mutt/mailcap -set tmpdir = ~/.mutt/temp - -# Source crypto, aliases, mailboxes -source ~/.mutt/colors -source ~/.mutt/crypto -source ~/.mutt/alias -source ~/.mutt/mailboxes -source ~/.mutt/id_work - -# General information -set realname = "Urbain Vaes" -set reverse_alias -set sort = reverse-date -set weed -set fcc_clear -unset markers -set sleep_time = 0 - -# Encryption -set crypt_autosign = no -set crypt_replyencrypt = yes -set pgp_auto_decode = yes -set pgp_autosign = no -set pgp_sign_as = 716064C0 -set pgp_use_gpg_agent = yes -set pgp_timeout = 3600 - -# Sidebar -set sidebar_width=26 -set sidebar_visible = yes -set sidebar_delim='|' -set sidebar_shortpath = yes -set sidebar_folderindent = yes -set sidebar_format = "%B%* %?F?[%F]?%?N?(%N)?%4S" -bind index,pager \Cn sidebar-next -bind index,pager \Cp sidebar-prev -bind index,pager O sidebar-open - -# Prompts -set delete = yes -set quit = yes - -# Pager -set pager_stop -set pager_index_lines = 10 - -# HTML messages -auto_view text/html -alternative_order text/plain text/enriched text/html - -# Editor -set editor="$EDITOR" -set include=yes - -# Macros -macro index,pager gp " +Personal/Personal" -macro index,pager gw " +Work/Work" - -# Key bindings -bind attach view-mailcap - -bind index,pager \Cf next-page -bind index,pager \Cb previous-page -bind index,pager \Cu next-unread-mailbox - -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 - -# Hooks -folder-hook 'Work*' 'source ~/.mutt/id_work' -folder-hook 'Personal*' 'source ~/.mutt/id_personal' - -# Source mutt solarized -`[ "$COLORSCHEME" = "light" ] && echo source $HOME/.mutt/solarized/mutt-colors-solarized-light-16.muttrc || echo set` -`[ "$COLORSCHEME" = "dark" ] && echo source $HOME/.mutt/solarized/mutt-colors-solarized-dark-16.muttrc || echo set` - -# Identities -set reverse_name -alternates "*@urbainvaes.com" diff --git a/mutt/signature b/mutt/signature deleted file mode 100644 index eb52bfb..0000000 --- a/mutt/signature +++ /dev/null @@ -1 +0,0 @@ -Urbain Vaes diff --git a/newsbeuter/.config/newsbeuter/cache.db b/newsbeuter/.config/newsbeuter/cache.db new file mode 100644 index 0000000..a92771b Binary files /dev/null and b/newsbeuter/.config/newsbeuter/cache.db differ diff --git a/newsbeuter/.config/newsbeuter/config b/newsbeuter/.config/newsbeuter/config new file mode 100644 index 0000000..84a1546 --- /dev/null +++ b/newsbeuter/.config/newsbeuter/config @@ -0,0 +1,25 @@ +# Dark solarized color scheme for newsbeuter, based on +# Ethan Schoonover's Solarized. +# +# In order to use this color scheme, you must first configure +# your terminal emulator to use the Solarized palette. +# See for more information. + +color background default default +color listnormal default default +color listfocus black yellow +color info default black +color article default default + +# highlights +highlight article "^(Title):.*$" blue default +highlight article "https?://[^ ]+" red default +highlight article "\\[image\\ [0-9]+\\]" green default + +# vim-like navigation +bind-key j down +bind-key k up +bind-key h left +bind-key l right + +browser "qutebrowser %u" diff --git a/newsbeuter/.config/newsbeuter/history.cmdline b/newsbeuter/.config/newsbeuter/history.cmdline new file mode 100644 index 0000000..aed4974 --- /dev/null +++ b/newsbeuter/.config/newsbeuter/history.cmdline @@ -0,0 +1,3 @@ +q +q +q diff --git a/newsbeuter/.config/newsbeuter/history.search b/newsbeuter/.config/newsbeuter/history.search new file mode 100644 index 0000000..e69de29 diff --git a/newsbeuter/.config/newsbeuter/urls b/newsbeuter/.config/newsbeuter/urls new file mode 120000 index 0000000..777955c --- /dev/null +++ b/newsbeuter/.config/newsbeuter/urls @@ -0,0 +1 @@ +../../../../personal/newsbeuter/urls \ No newline at end of file diff --git a/newsbeuter/cache.db b/newsbeuter/cache.db deleted file mode 100644 index a92771b..0000000 Binary files a/newsbeuter/cache.db and /dev/null differ diff --git a/newsbeuter/config b/newsbeuter/config deleted file mode 100644 index 84a1546..0000000 --- a/newsbeuter/config +++ /dev/null @@ -1,25 +0,0 @@ -# Dark solarized color scheme for newsbeuter, based on -# Ethan Schoonover's Solarized. -# -# In order to use this color scheme, you must first configure -# your terminal emulator to use the Solarized palette. -# See for more information. - -color background default default -color listnormal default default -color listfocus black yellow -color info default black -color article default default - -# highlights -highlight article "^(Title):.*$" blue default -highlight article "https?://[^ ]+" red default -highlight article "\\[image\\ [0-9]+\\]" green default - -# vim-like navigation -bind-key j down -bind-key k up -bind-key h left -bind-key l right - -browser "qutebrowser %u" diff --git a/newsbeuter/history.cmdline b/newsbeuter/history.cmdline deleted file mode 100644 index aed4974..0000000 --- a/newsbeuter/history.cmdline +++ /dev/null @@ -1,3 +0,0 @@ -q -q -q diff --git a/newsbeuter/history.search b/newsbeuter/history.search deleted file mode 100644 index e69de29..0000000 diff --git a/newsbeuter/urls b/newsbeuter/urls deleted file mode 120000 index 63047fb..0000000 --- a/newsbeuter/urls +++ /dev/null @@ -1 +0,0 @@ -../personal/newsbeuter/urls \ No newline at end of file diff --git a/notes b/notes deleted file mode 120000 index 15654b1..0000000 --- a/notes +++ /dev/null @@ -1 +0,0 @@ -personal/notes \ No newline at end of file diff --git a/nvim/.config/nvim b/nvim/.config/nvim new file mode 120000 index 0000000..bf0d817 --- /dev/null +++ b/nvim/.config/nvim @@ -0,0 +1 @@ +../../vim/.vim \ No newline at end of file diff --git a/qutebrowser/.config/qutebrowser/bookmarks b/qutebrowser/.config/qutebrowser/bookmarks new file mode 120000 index 0000000..0a2ba12 --- /dev/null +++ b/qutebrowser/.config/qutebrowser/bookmarks @@ -0,0 +1 @@ +../../../../personal/qutebrowser/bookmarks \ No newline at end of file diff --git a/qutebrowser/.config/qutebrowser/keys.conf b/qutebrowser/.config/qutebrowser/keys.conf new file mode 100644 index 0000000..79a9e13 --- /dev/null +++ b/qutebrowser/.config/qutebrowser/keys.conf @@ -0,0 +1,638 @@ +# vim: ft=conf +# +# In this config file, qutebrowser's key bindings are configured. +# The format looks like this: +# +# [keymode] +# +# command +# keychain +# keychain2 +# ... +# +# All blank lines and lines starting with '#' are ignored. +# Inline-comments are not permitted. +# +# keymode is a comma separated list of modes in which the key binding should be +# active. If keymode starts with !, the key binding is active in all modes +# except the listed modes. +# +# For special keys (can't be part of a keychain), enclose them in `<`...`>`. +# For modifiers, you can use either `-` or `+` as delimiters, and these names: +# +# * Control: `Control`, `Ctrl` +# * Meta: `Meta`, `Windows`, `Mod4` +# * Alt: `Alt`, `Mod1` +# * Shift: `Shift` +# +# For simple keys (no `<>`-signs), a capital letter means the key is pressed +# with Shift. For special keys (with `<>`-signs), you need to explicitly add +# `Shift-` to match a key pressed with shift. You can bind multiple commands +# by separating them with `;;`. +# +# Note that default keybindings are always bound, and need to be explicitly +# unbound if you wish to remove them: +# +# +# keychain +# keychain2 +# ... + +[!normal] + +clear-keychain ;; leave-mode + + + +[normal] +# Keybindings for normal mode. + +clear-keychain ;; search + + +set-cmd-text -s :spawn --userscript url-from-surfraw + o + +set-cmd-text -s :spawn --userscript url-from-surfraw -t + t + +set-cmd-text -s :spawn mpv {url} + y + +set-cmd-text :open {url} + go + +set-cmd-text -s :open -t + O + +set-cmd-text :open -t {url} + gO + +set-cmd-text -s :open -b + xo + +set-cmd-text :open -b {url} + xO + +set-cmd-text -s :open -w + wo + +set-cmd-text :open -w {url} + wO + +open -t + ga + + +tab-close + d + + +tab-close -o + D + +tab-only + co + +tab-focus + J + gt + +tab-move + gm + +tab-move - + gl + +tab-move + + gr + +tab-prev + K + gT + +tab-clone + gC + +reload + r + +reload -f + R + +back + H + +back -t + th + +back -w + wh + +forward + L + +forward -t + tl + +forward -w + wl + +fullscreen + + +hint + f + +hint all tab + F + +hint all window + wf + +hint all tab-bg + ;b + +hint all tab-fg + ;f + +hint all hover + ;h + +hint images + ;i + +hint images tab + ;I + +hint images tab-bg + .i + +hint links fill ":open {hint-url}" + ;o + +hint links fill ":open -t {hint-url}" + ;O + +hint links fill ":open -b {hint-url}" + .o + +hint links yank + ;y + +hint links yank-primary + ;Y + +hint --rapid links tab-bg + ;r + +hint --rapid links window + ;R + +hint links download + ;d + +scroll left + h + +scroll down + j + +scroll up + k + +scroll right + l + +scroll-perc 0 + gg + +scroll-perc + G + +search-next + n + +search-prev + N + +enter-mode insert + i + +enter-mode caret + v + +yank + yy + +yank -s + yY + +yank -t + yt + +yank -ts + yT + +yank -d + yd + +yank -ds + yD + +paste + pp + +paste -s + pP + +paste -t + Pp + +paste -ts + PP + +paste -w + wp + +paste -ws + wP + +quickmark-save + m + +set-cmd-text -s :quickmark-load -t + B + +set-cmd-text -s :quickmark-load -w + wb + +bookmark-add + M + +spawn --userscript quickmarks-dmenu + u + +spawn --userscript bookmarks-dmenu + b + +set-cmd-text -s :bookmark-load -t + gB + +set-cmd-text -s :bookmark-load -w + wB + +save + sf + +set-cmd-text -s :set + ss + +set-cmd-text -s :set -t + sl + +set-cmd-text -s :set keybind + sk + +zoom-out + - + +zoom-in + + + +zoom + = + +navigate prev + [[ + +navigate next + ]] + +navigate prev -t + {{ + +navigate next -t + }} + +navigate up + gu + +navigate up -t + gU + +navigate increment + + +navigate decrement + + +inspector + wi + +download + gd + +download-cancel + ad + +download-clear + cd + +view-source + gf + +tab-focus last + + +enter-mode passthrough + + +quit + + +scroll-page 0 1 + + +scroll-page 0 -1 + + +scroll-page 0 0.5 + + +scroll-page 0 -0.5 + + +tab-focus 1 + + +tab-focus 2 + + +tab-focus 3 + + +tab-focus 4 + + +tab-focus 5 + + +tab-focus 6 + + +tab-focus 7 + + +tab-focus 8 + + +tab-focus 9 + + +home + + +stop + + +print + + +open qute:settings + Ss + +follow-selected + + + + + + +follow-selected -t + + + +set-cmd-text -s :bookmark-load + gb + +undo + + +[insert] +# Keybindings for insert mode. +# Since normal keypresses are passed through, only special keys are +# supported in this mode. +# Useful hidden commands to map in this section: +# * `open-editor`: Open a texteditor with the focused field. +# * `paste-primary`: Paste primary selection at cursor position. + +open-editor + + +paste-primary + + +[hint] +# Keybindings for hint mode. +# Since normal keypresses are passed through, only special keys are +# supported in this mode. +# Useful hidden commands to map in this section: +# * `follow-hint`: Follow the currently selected hint. + +follow-hint + + + + + + +hint --rapid links tab-bg + + +hint links + + +hint all tab-bg + + +[command] +# Keybindings for command mode. +# Since normal keypresses are passed through, only special keys are +# supported in this mode. +# Useful hidden commands to map in this section: +# * `command-history-prev`: Switch to previous command in history. +# * `command-history-next`: Switch to next command in history. +# * `completion-item-prev`: Select previous item in completion. +# * `completion-item-next`: Select next item in completion. +# * `command-accept`: Execute the command currently in the commandline. + +command-history-prev + + + +command-history-next + + + +completion-item-prev + + +completion-item-next + + +completion-item-del + + +command-accept + + + + + + +[prompt] +# Keybindings for prompts in the status line. +# You can bind normal keys in this mode, but they will be only active +# when a yes/no-prompt is asked. For other prompt modes, you can only +# bind special keys. +# Useful hidden commands to map in this section: +# * `prompt-accept`: Confirm the entered value. +# * `prompt-yes`: Answer yes to a yes/no question. +# * `prompt-no`: Answer no to a yes/no question. + +prompt-accept + + + + + + +prompt-yes + y + +prompt-no + n + +[command,prompt] + +rl-backward-char + + +rl-forward-char + + +rl-backward-word + + +rl-forward-word + + +rl-beginning-of-line + + +rl-end-of-line + + +rl-unix-line-discard + + +rl-kill-word + + +rl-unix-word-rubout + + + +rl-yank + + +rl-delete-char + + +rl-backward-delete-char + + +rl-kill-line + + +[caret] + +toggle-selection + v + + +drop-selection + + +enter-mode normal + c + +move-to-next-line + j + +move-to-prev-line + k + +move-to-next-char + l + +move-to-prev-char + h + +move-to-end-of-word + e + +move-to-next-word + w + +move-to-prev-word + b + +move-to-start-of-next-block + ] + +move-to-start-of-prev-block + [ + +move-to-end-of-next-block + } + +move-to-end-of-prev-block + { + +move-to-start-of-line + 0 + +move-to-end-of-line + $ + +move-to-start-of-document + gg + +move-to-end-of-document + G + +yank-selected -p + Y + +yank-selected + y + + + + + + +scroll left + H + +scroll down + J + +scroll up + K + +scroll right + L + diff --git a/qutebrowser/.config/qutebrowser/quickmarks b/qutebrowser/.config/qutebrowser/quickmarks new file mode 120000 index 0000000..b1da307 --- /dev/null +++ b/qutebrowser/.config/qutebrowser/quickmarks @@ -0,0 +1 @@ +../../../../personal/qutebrowser/quickmarks \ No newline at end of file diff --git a/qutebrowser/.config/qutebrowser/qutebrowser.conf b/qutebrowser/.config/qutebrowser/qutebrowser.conf new file mode 100644 index 0000000..9064d48 --- /dev/null +++ b/qutebrowser/.config/qutebrowser/qutebrowser.conf @@ -0,0 +1,1402 @@ +# vim: ft=dosini + +# Configfile for qutebrowser. +# +# This configfile is parsed by python's configparser in extended +# interpolation mode. The format is very INI-like, so there are +# categories like [general] with "key = value"-pairs. +# +# Note that you shouldn't add your own comments, as this file is +# regenerated every time the config is saved. +# +# Interpolation looks like ${value} or ${section:value} and will be +# replaced by the respective value. +# +# Some settings will expand environment variables. Note that, since +# interpolation is run first, you will need to escape the $ char as +# described below. +# +# This is the default config, so if you want to remove anything from +# here (as opposed to change/add), for example a key binding, set it to +# an empty value. +# +# You will need to escape the following values: +# - # at the start of the line (at the first position of the key) (\#) +# - $ in a value ($$) + +[general] +# General/miscellaneous options. +# +# ignore-case (IgnoreCase): +# Whether to find text on a page case-insensitively. +# true: Search case-insensitively +# false: Search case-sensitively +# smart: Search case-sensitively if there are capital chars +# Default: smart +# +# wrap-search (Bool): +# Whether to wrap finding text to the top when arriving at the end. +# Valid values: true, false +# Default: true +# +# startpage (List): +# The default page(s) to open at the start, separated by commas. +# Default: https://duckduckgo.com +# +# default-page (FuzzyUrl): +# The page to open if :open -t/-b/-w is used without URL. Use +# `about:blank` for a blank page. +# Default: ${startpage} +# +# auto-search (AutoSearch): +# Whether to start a search when something else than a URL is +# entered. +# naive: Use simple/naive check. +# dns: Use DNS requests (might be slow!). +# false: Never search automatically. +# Default: naive +# +# auto-save-config (Bool): +# Whether to save the config automatically on quit. +# Valid values: true, false +# Default: true +# +# auto-save-interval (Int): +# How often (in milliseconds) to auto-save config/cookies/etc. +# Default: 15000 +# +# editor (ShellCommand): +# The editor (and arguments) to use for the `open-editor` command. +# The arguments get split like in a shell, so you can use `"` or `'` +# to quote them. +# `{}` gets replaced by the filename of the file to be edited. +# Default: gvim -f "{}" +# +# editor-encoding (Encoding): +# Encoding to use for editor. +# Default: utf-8 +# +# private-browsing (Bool): +# Do not record visited pages in the history or store web page +# icons. +# Valid values: true, false +# Default: false +# +# developer-extras (Bool): +# Enable extra tools for Web developers. +# This needs to be enabled for `:inspector` to work and also adds an +# _Inspect_ entry to the context menu. +# Valid values: true, false +# Default: false +# +# print-element-backgrounds (Bool): +# Whether the background color and images are also drawn when the +# page is printed. +# Valid values: true, false +# Default: true +# +# xss-auditing (Bool): +# Whether load requests should be monitored for cross-site scripting +# attempts. +# Suspicious scripts will be blocked and reported in the inspector's +# JavaScript console. Enabling this feature might have an impact on +# performance. +# Valid values: true, false +# Default: false +# +# site-specific-quirks (Bool): +# Enable workarounds for broken sites. +# Valid values: true, false +# Default: true +# +# default-encoding (String): +# Default encoding to use for websites. +# The encoding must be a string describing an encoding such as +# _utf-8_, _iso-8859-1_, etc. If left empty a default value will be +# used. +# Default: +# +# new-instance-open-target (String): +# How to open links in an existing instance if a new one is +# launched. +# tab: Open a new tab in the existing window and activate the +# window. +# tab-bg: Open a new background tab in the existing window and +# activate the window. +# tab-silent: Open a new tab in the existing window without +# activating the window. +# tab-bg-silent: Open a new background tab in the existing +# window without activating the window. +# window: Open in a new window. +# Default: tab +# +# log-javascript-console (String): +# How to log javascript console messages. +# none: Don't log messages. +# debug: Log messages with debug level. +# info: Log messages with info level. +# Default: debug +# +# save-session (Bool): +# Whether to always save the open pages. +# Valid values: true, false +# Default: false +# +# session-default-name (SessionName): +# The name of the session to save by default, or empty for the last +# loaded session. +# Default: +# +# url-incdec-segments (FlagList): +# The URL segments where `:navigate increment/decrement` will search +# for a number. +# Valid values: host, path, query, anchor +# Default: path,query +ignore-case = smart +wrap-search = true +startpage = about:blank +default-page = https://startpage.com +auto-search = naive +auto-save-config = true +auto-save-interval = 15000 +editor = urxvt -e vim -f "{}" +editor-encoding = utf-8 +private-browsing = false +developer-extras = false +print-element-backgrounds = true +xss-auditing = false +site-specific-quirks = true +default-encoding = +new-instance-open-target = tab +log-javascript-console = debug +save-session = false +session-default-name = +url-incdec-segments = path,query + +[ui] +# General options related to the user interface. +# +# zoom-levels (PercList): +# The available zoom levels, separated by commas. +# Default: +# 25%,33%,50%,67%,75%,90%,100%,110%,125%,150%,175%,200%,250%,300%,400%,500% +# +# default-zoom (Perc): +# The default zoom level. +# Default: 100% +# +# downloads-position (VerticalPosition): +# Where to show the downloaded files. +# Valid values: top, bottom +# Default: top +# +# message-timeout (Int): +# Time (in ms) to show messages in the statusbar for. +# Default: 2000 +# +# message-unfocused (Bool): +# Whether to show messages in unfocused windows. +# Valid values: true, false +# Default: false +# +# confirm-quit (ConfirmQuit): +# Whether to confirm quitting the application. +# always: Always show a confirmation. +# multiple-tabs: Show a confirmation if multiple tabs are +# opened. +# downloads: Show a confirmation if downloads are running +# never: Never show a confirmation. +# Default: never +# +# display-statusbar-messages (Bool): +# Whether to display javascript statusbar messages. +# Valid values: true, false +# Default: false +# +# zoom-text-only (Bool): +# Whether the zoom factor on a frame applies only to the text or to +# all content. +# Valid values: true, false +# Default: false +# +# frame-flattening (Bool): +# Whether to expand each subframe to its contents. +# This will flatten all the frames to become one scrollable page. +# Valid values: true, false +# Default: false +# +# user-stylesheet (UserStyleSheet): +# User stylesheet to use (absolute filename, filename relative to +# the config directory or CSS string). Will expand environment +# variables. +# Default: ::-webkit-scrollbar { width: 0px; height: 0px; } +# +# css-media-type (String): +# Set the CSS media type. +# Default: +# +# smooth-scrolling (Bool): +# Whether to enable smooth scrolling for webpages. +# Valid values: true, false +# Default: false +# +# remove-finished-downloads (Int): +# Number of milliseconds to wait before removing finished downloads. +# Will not be removed if value is -1. +# Default: -1 +# +# hide-statusbar (Bool): +# Whether to hide the statusbar unless a message is shown. +# Valid values: true, false +# Default: false +# +# statusbar-padding (Padding): +# Padding for statusbar (top, bottom, left, right). +# Default: 1,1,0,0 +# +# window-title-format (FormatString): +# The format to use for the window title. The following placeholders +# are defined: +# * `{perc}`: The percentage as a string like `[10%]`. +# * `{perc_raw}`: The raw percentage, e.g. `10` +# * `{title}`: The title of the current web page +# * `{title_sep}`: The string ` - ` if a title is set, empty +# otherwise. +# * `{id}`: The internal window ID of this window. +# * `{scroll_pos}`: The page scroll position. +# Default: {perc}{title}{title_sep}qutebrowser +# +# hide-mouse-cursor (Bool): +# Whether to hide the mouse cursor. +# Valid values: true, false +# Default: false +# +# modal-js-dialog (Bool): +# Use standard JavaScript modal dialog for alert() and confirm() +# Valid values: true, false +# Default: false +# +# hide-wayland-decoration (Bool): +# Hide the window decoration when using wayland (requires restart) +# Valid values: true, false +# Default: false +zoom-levels = 25%,33%,50%,67%,75%,90%,100%,110%,125%,150%,175%,200%,250%,300%,400%,500% +default-zoom = 100% +downloads-position = top +message-timeout = 2000 +message-unfocused = false +confirm-quit = never +display-statusbar-messages = false +zoom-text-only = false +frame-flattening = false +user-stylesheet = ::-webkit-scrollbar { width: 0px; height: 0px; } +css-media-type = +smooth-scrolling = false +remove-finished-downloads = -1 +hide-statusbar = false +statusbar-padding = 1,1,0,0 +window-title-format = {perc}{title}{title_sep}qutebrowser +hide-mouse-cursor = false +modal-js-dialog = false +hide-wayland-decoration = false + +[network] +# Settings related to the network. +# +# do-not-track (Bool): +# Value to send in the `DNT` header. +# Valid values: true, false +# Default: true +# +# accept-language (String): +# Value to send in the `accept-language` header. +# Default: en-US,en +# +# referer-header (String): +# Send the Referer header +# always: Always send. +# never: Never send; this is not recommended, as some sites may +# break. +# same-domain: Only send for the same domain. This will still +# protect your privacy, but shouldn't break any sites. +# Default: same-domain +# +# user-agent (UserAgent): +# User agent to send. Empty to send the default. +# Default: +# +# proxy (Proxy): +# The proxy to use. +# In addition to the listed values, you can use a `socks://...` or +# `http://...` URL. +# system: Use the system wide proxy. +# none: Don't use any proxy +# Default: system +# +# proxy-dns-requests (Bool): +# Whether to send DNS requests over the configured proxy. +# Valid values: true, false +# Default: true +# +# ssl-strict (BoolAsk): +# Whether to validate SSL handshakes. +# Valid values: true, false, ask +# Default: ask +# +# dns-prefetch (Bool): +# Whether to try to pre-fetch DNS entries to speed up browsing. +# Valid values: true, false +# Default: true +do-not-track = true +accept-language = en-US,en +referer-header = same-domain +user-agent = +proxy = system +proxy-dns-requests = true +ssl-strict = ask +dns-prefetch = true + +[completion] +# Options related to completion and command history. +# +# auto-open (Bool): +# Automatically open completion when typing. +# Valid values: true, false +# Default: true +# +# download-path-suggestion (String): +# What to display in the download filename input. +# path: Show only the download path. +# filename: Show only download filename. +# both: Show download path and filename. +# Default: path +# +# timestamp-format (TimestampTemplate): +# How to format timestamps (e.g. for history) +# Default: %Y-%m-%d +# +# show (Bool): +# Whether to show the autocompletion window. +# Valid values: true, false +# Default: true +# +# height (PercOrInt): +# The height of the completion, in px or as percentage of the +# window. +# Default: 50% +# +# cmd-history-max-items (Int): +# How many commands to save in the command history. +# 0: no history / -1: unlimited +# Default: 100 +# +# web-history-max-items (Int): +# How many URLs to show in the web history. +# 0: no history / -1: unlimited +# Default: 1000 +# +# quick-complete (Bool): +# Whether to move on to the next part when there's only one possible +# completion left. +# Valid values: true, false +# Default: true +# +# shrink (Bool): +# Whether to shrink the completion to be smaller than the configured +# size if there are no scrollbars. +# Valid values: true, false +# Default: false +# +# scrollbar-width (Int): +# Width of the scrollbar in the completion window (in px). +# Default: 12 +# +# scrollbar-padding (Int): +# Padding of scrollbar handle in completion window (in px). +# Default: 2 +auto-open = true +download-path-suggestion = path +timestamp-format = %Y-%m-%d +show = true +height = 50% +cmd-history-max-items = 100 +web-history-max-items = 1000 +quick-complete = true +shrink = false +scrollbar-width = 12 +scrollbar-padding = 2 + +[input] +# Options related to input modes. +# +# timeout (Int): +# Timeout for ambiguous key bindings. +# Default: 500 +# +# partial-timeout (Int): +# Timeout for partially typed key bindings. +# Default: 1000 +# +# insert-mode-on-plugins (Bool): +# Whether to switch to insert mode when clicking flash and other +# plugins. +# Valid values: true, false +# Default: false +# +# auto-leave-insert-mode (Bool): +# Whether to leave insert mode if a non-editable element is clicked. +# Valid values: true, false +# Default: true +# +# auto-insert-mode (Bool): +# Whether to automatically enter insert mode if an editable element +# is focused after page load. +# Valid values: true, false +# Default: false +# +# forward-unbound-keys (String): +# Whether to forward unbound keys to the webview in normal mode. +# all: Forward all unbound keys. +# auto: Forward unbound non-alphanumeric keys. +# none: Don't forward any keys. +# Default: auto +# +# spatial-navigation (Bool): +# Enables or disables the Spatial Navigation feature. +# Spatial navigation consists in the ability to navigate between +# focusable elements in a Web page, such as hyperlinks and form +# controls, by using Left, Right, Up and Down arrow keys. For +# example, if a user presses the Right key, heuristics determine +# whether there is an element he might be trying to reach towards +# the right and which element he probably wants. +# Valid values: true, false +# Default: false +# +# links-included-in-focus-chain (Bool): +# Whether hyperlinks should be included in the keyboard focus chain. +# Valid values: true, false +# Default: true +# +# rocker-gestures (Bool): +# Whether to enable Opera-like mouse rocker gestures. This disables +# the context menu. +# Valid values: true, false +# Default: false +# +# mouse-zoom-divider (Int): +# How much to divide the mouse wheel movements to translate them +# into zoom increments. +# Default: 512 +timeout = 500 +partial-timeout = 1000 +insert-mode-on-plugins = false +auto-leave-insert-mode = true +auto-insert-mode = false +forward-unbound-keys = auto +spatial-navigation = false +links-included-in-focus-chain = true +rocker-gestures = false +mouse-zoom-divider = 512 + +[tabs] +# Configuration of the tab bar. +# +# background-tabs (Bool): +# Whether to open new tabs (middleclick/ctrl+click) in background. +# Valid values: true, false +# Default: false +# +# select-on-remove (SelectOnRemove): +# Which tab to select when the focused tab is removed. +# left: Select the tab on the left. +# right: Select the tab on the right. +# previous: Select the previously selected tab. +# Default: right +# +# new-tab-position (NewTabPosition): +# How new tabs are positioned. +# left: On the left of the current tab. +# right: On the right of the current tab. +# first: At the left end. +# last: At the right end. +# Default: right +# +# new-tab-position-explicit (NewTabPosition): +# How new tabs opened explicitly are positioned. +# left: On the left of the current tab. +# right: On the right of the current tab. +# first: At the left end. +# last: At the right end. +# Default: last +# +# last-close (String): +# Behavior when the last tab is closed. +# ignore: Don't do anything. +# blank: Load a blank page. +# startpage: Load the start page. +# default-page: Load the default page. +# close: Close the window. +# Default: ignore +# +# show (String): +# When to show the tab bar +# always: Always show the tab bar. +# never: Always hide the tab bar. +# multiple: Hide the tab bar if only one tab is open. +# switching: Show the tab bar when switching tabs. +# Default: always +# +# show-switching-delay (Int): +# Time to show the tab bar before hiding it when tabs->show is set +# to 'switching'. +# Default: 800 +# +# wrap (Bool): +# Whether to wrap when changing tabs. +# Valid values: true, false +# Default: true +# +# movable (Bool): +# Whether tabs should be movable. +# Valid values: true, false +# Default: true +# +# close-mouse-button (String): +# On which mouse button to close tabs. +# right: Close tabs on right-click. +# middle: Close tabs on middle-click. +# none: Don't close tabs using the mouse. +# Default: middle +# +# position (Position): +# The position of the tab bar. +# Valid values: top, bottom, left, right +# Default: top +# +# show-favicons (Bool): +# Whether to show favicons in the tab bar. +# Valid values: true, false +# Default: true +# +# width (PercOrInt): +# The width of the tab bar if it's vertical, in px or as percentage +# of the window. +# Default: 20% +# +# indicator-width (Int): +# Width of the progress indicator (0 to disable). +# Default: 3 +# +# tabs-are-windows (Bool): +# Whether to open windows instead of tabs. +# Valid values: true, false +# Default: false +# +# title-format (FormatString): +# The format to use for the tab title. The following placeholders +# are defined: +# * `{perc}`: The percentage as a string like `[10%]`. +# * `{perc_raw}`: The raw percentage, e.g. `10` +# * `{title}`: The title of the current web page +# * `{title_sep}`: The string ` - ` if a title is set, empty +# otherwise. +# * `{index}`: The index of this tab. +# * `{id}`: The internal tab ID of this tab. +# * `{scroll_pos}`: The page scroll position. +# Default: {index}: {title} +# +# title-alignment (TextAlignment): +# Alignment of the text inside of tabs +# Valid values: left, right, center +# Default: left +# +# mousewheel-tab-switching (Bool): +# Switch between tabs using the mouse wheel. +# Valid values: true, false +# Default: true +# +# padding (Padding): +# Padding for tabs (top, bottom, left, right). +# Default: 0,0,5,5 +# +# indicator-padding (Padding): +# Padding for indicators (top, bottom, left, right). +# Default: 2,2,0,4 +background-tabs = false +select-on-remove = right +new-tab-position = right +new-tab-position-explicit = last +last-close = ignore +show = multiple +show-switching-delay = 800 +wrap = true +movable = true +close-mouse-button = middle +position = top +show-favicons = false +width = 20% +indicator-width = 3 +tabs-are-windows = true +title-format = {index}: {title} +title-alignment = left +mousewheel-tab-switching = true +padding = 0,0,5,5 +indicator-padding = 2,2,0,4 + +[storage] +# Settings related to cache and storage. +# +# download-directory (Directory): +# The directory to save downloads to. An empty value selects a +# sensible os-specific default. Will expand environment variables. +# Default: +# +# prompt-download-directory (Bool): +# Whether to prompt the user for the download location. +# If set to false, 'download-directory' will be used. +# Valid values: true, false +# Default: true +# +# remember-download-directory (Bool): +# Whether to remember the last used download directory. +# Valid values: true, false +# Default: true +# +# maximum-pages-in-cache (Int): +# The maximum number of pages to hold in the global memory page +# cache. +# The Page Cache allows for a nicer user experience when navigating +# forth or back to pages in the forward/back history, by pausing and +# resuming up to _n_ pages. +# For more information about the feature, please refer to: +# http://webkit.org/blog/427/webkit-page-cache-i-the-basics/ +# Default: +# +# object-cache-capacities (WebKitBytesList): +# The capacities for the global memory cache for dead objects such +# as stylesheets or scripts. Syntax: cacheMinDeadCapacity, +# cacheMaxDead, totalCapacity. +# The _cacheMinDeadCapacity_ specifies the minimum number of bytes +# that dead objects should consume when the cache is under pressure. +# _cacheMaxDead_ is the maximum number of bytes that dead objects +# should consume when the cache is *not* under pressure. +# _totalCapacity_ specifies the maximum number of bytes that the +# cache should consume *overall*. +# Default: +# +# offline-storage-default-quota (WebKitBytes): +# Default quota for new offline storage databases. +# Default: +# +# offline-web-application-cache-quota (WebKitBytes): +# Quota for the offline web application cache. +# Default: +# +# offline-storage-database (Bool): +# Whether support for the HTML 5 offline storage feature is enabled. +# Valid values: true, false +# Default: true +# +# offline-web-application-storage (Bool): +# Whether support for the HTML 5 web application cache feature is +# enabled. +# An application cache acts like an HTTP cache in some sense. For +# documents that use the application cache via JavaScript, the +# loader engine will first ask the application cache for the +# contents, before hitting the network. +# The feature is described in details at: +# http://dev.w3.org/html5/spec/Overview.html#appcache +# Valid values: true, false +# Default: true +# +# local-storage (Bool): +# Whether support for the HTML 5 local storage feature is enabled. +# Valid values: true, false +# Default: true +# +# cache-size (Int): +# Size of the HTTP network cache. +# Default: 52428800 +download-directory = +prompt-download-directory = true +remember-download-directory = true +maximum-pages-in-cache = +object-cache-capacities = +offline-storage-default-quota = +offline-web-application-cache-quota = +offline-storage-database = true +offline-web-application-storage = true +local-storage = true +cache-size = 52428800 + +[content] +# Loaded plugins/scripts and allowed actions. +# +# allow-images (Bool): +# Whether images are automatically loaded in web pages. +# Valid values: true, false +# Default: true +# +# allow-javascript (Bool): +# Enables or disables the running of JavaScript programs. +# Valid values: true, false +# Default: true +# +# allow-plugins (Bool): +# Enables or disables plugins in Web pages. +# Qt plugins with a mimetype such as "application/x-qt-plugin" are +# not affected by this setting. +# Valid values: true, false +# Default: false +# +# webgl (Bool): +# Enables or disables WebGL. +# Valid values: true, false +# Default: true +# +# css-regions (Bool): +# Enable or disable support for CSS regions. +# Valid values: true, false +# Default: true +# +# hyperlink-auditing (Bool): +# Enable or disable hyperlink auditing (). +# Valid values: true, false +# Default: false +# +# geolocation (BoolAsk): +# Allow websites to request geolocations. +# Valid values: true, false, ask +# Default: ask +# +# notifications (BoolAsk): +# Allow websites to show notifications. +# Valid values: true, false, ask +# Default: ask +# +# javascript-can-open-windows (Bool): +# Whether JavaScript programs can open new windows. +# Valid values: true, false +# Default: false +# +# javascript-can-close-windows (Bool): +# Whether JavaScript programs can close windows. +# Valid values: true, false +# Default: false +# +# javascript-can-access-clipboard (Bool): +# Whether JavaScript programs can read or write to the clipboard. +# Valid values: true, false +# Default: false +# +# ignore-javascript-prompt (Bool): +# Whether all javascript prompts should be ignored. +# Valid values: true, false +# Default: false +# +# ignore-javascript-alert (Bool): +# Whether all javascript alerts should be ignored. +# Valid values: true, false +# Default: false +# +# local-content-can-access-remote-urls (Bool): +# Whether locally loaded documents are allowed to access remote +# urls. +# Valid values: true, false +# Default: false +# +# local-content-can-access-file-urls (Bool): +# Whether locally loaded documents are allowed to access other local +# urls. +# Valid values: true, false +# Default: true +# +# cookies-accept (String): +# Control which cookies to accept. +# all: Accept all cookies. +# no-3rdparty: Accept cookies from the same origin only. +# no-unknown-3rdparty: Accept cookies from the same origin only, +# unless a cookie is already set for the domain. +# never: Don't accept cookies at all. +# Default: no-3rdparty +# +# cookies-store (Bool): +# Whether to store cookies. +# Valid values: true, false +# Default: true +# +# host-block-lists (UrlList): +# List of URLs of lists which contain hosts to block. +# The file can be in one of the following formats: +# - An '/etc/hosts'-like file +# - One host per line +# - A zip-file of any of the above, with either only one file, or a +# file named 'hosts' (with any extension). +# Default: +# http://www.malwaredomainlist.com/hostslist/hosts.txt,http://someonewhocares.org/hosts/hosts,http://winhelp2002.mvps.org/hosts.zip,http://malwaredomains.lehigh.edu/files/justdomains.zip,http://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext +# +# host-blocking-enabled (Bool): +# Whether host blocking is enabled. +# Valid values: true, false +# Default: true +# +# host-blocking-whitelist (List): +# List of domains that should always be loaded, despite being +# ad-blocked. +# Domains may contain * and ? wildcards and are otherwise required +# to exactly match the requested domain. +# Local domains are always exempt from hostblocking. +# Default: piwik.org +# +# enable-pdfjs (Bool): +# Enable pdf.js to view PDF files in the browser. +# Note that the files can still be downloaded by clicking the +# download button in the pdf.js viewer. +# Valid values: true, false +# Default: false +allow-images = true +allow-javascript = true +allow-plugins = false +webgl = true +css-regions = true +hyperlink-auditing = false +geolocation = ask +notifications = ask +javascript-can-open-windows = false +javascript-can-close-windows = false +javascript-can-access-clipboard = false +ignore-javascript-prompt = false +ignore-javascript-alert = false +local-content-can-access-remote-urls = false +local-content-can-access-file-urls = true +cookies-accept = no-3rdparty +cookies-store = true +host-block-lists = http://www.malwaredomainlist.com/hostslist/hosts.txt,http://someonewhocares.org/hosts/hosts,http://winhelp2002.mvps.org/hosts.zip,http://malwaredomains.lehigh.edu/files/justdomains.zip,http://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext +host-blocking-enabled = true +host-blocking-whitelist = piwik.org +enable-pdfjs = false + +[hints] +# Hinting settings. +# +# border (String): +# CSS border value for hints. +# Default: 1px solid #E3BE23 +# +# opacity (Float): +# Opacity for hints. +# Default: 0.7 +# +# mode (String): +# Mode to use for hints. +# number: Use numeric hints. +# letter: Use the chars in the hints -> chars setting. +# word: Use hints words based on the html elements and the extra +# words. +# Default: letter +# +# chars (UniqueCharString): +# Chars used for hint strings. +# Default: asdfghjkl +# +# min-chars (Int): +# Minimum number of chars used for hint strings. +# Default: 1 +# +# scatter (Bool): +# Whether to scatter hint key chains (like Vimium) or not (like +# dwb). +# Valid values: true, false +# Default: true +# +# uppercase (Bool): +# Make chars in hint strings uppercase. +# Valid values: true, false +# Default: false +# +# dictionary (File): +# The dictionary file to be used by the word hints. +# Default: /usr/share/dict/words +# +# auto-follow (Bool): +# Follow a hint immediately when the hint text is completely +# matched. +# Valid values: true, false +# Default: true +# +# next-regexes (RegexList): +# A comma-separated list of regexes to use for 'next' links. +# Default: +# \bnext\b,\bmore\b,\bnewer\b,\b[>→≫]\b,\b(>>|»)\b,\bcontinue\b +# +# prev-regexes (RegexList): +# A comma-separated list of regexes to use for 'prev' links. +# Default: \bprev(ious)?\b,\bback\b,\bolder\b,\b[<←≪]\b,\b(<<|«)\b +border = 1px solid #E3BE23 +opacity = 1 +mode = letter +chars = aoeuidhtns +min-chars = 1 +scatter = true +uppercase = true +dictionary = /usr/share/dict/words +auto-follow = true +next-regexes = \bnext\b,\bmore\b,\bnewer\b,\b[>→≫]\b,\b(>>|»)\b,\bcontinue\b +prev-regexes = \bprev(ious)?\b,\bback\b,\bolder\b,\b[<←≪]\b,\b(<<|«)\b + +[searchengines] +# Definitions of search engines which can be used via the address bar. +# The searchengine named `DEFAULT` is used when `general -> auto-search` +# is true and something else than a URL was entered to be opened. Other +# search engines can be used by prepending the search engine name to the +# search term, e.g. `:open google qutebrowser`. The string `{}` will be +# replaced by the search term, use `{{` and `}}` for literal `{`/`}` +# signs. +DEFAULT = https://duckduckgo.com/?q={} + +[aliases] +# Aliases for commands. +# By default, no aliases are defined. Example which adds a new command +# `:qtb` to open qutebrowsers website: +# `qtb = open http://www.qutebrowser.org/` + +[colors] +# Colors used in the UI. +# A value can be in one of the following format: +# * `#RGB`/`#RRGGBB`/`#RRRGGGBBB`/`#RRRRGGGGBBBB` +# * A SVG color name as specified in http://www.w3.org/TR/SVG/types.html#ColorKeywords[the W3C specification]. +# * transparent (no color) +# * `rgb(r, g, b)` / `rgba(r, g, b, a)` (values 0-255 or percentages) +# * `hsv(h, s, v)` / `hsva(h, s, v, a)` (values 0-255, hue 0-359) +# * A gradient as explained in http://doc.qt.io/qt-5/stylesheet-reference.html#list-of-property-types[the Qt documentation] under ``Gradient''. +# A *.system value determines the color system to use for color +# interpolation between similarly-named *.start and *.stop entries, +# regardless of how they are defined in the options. Valid values are +# 'rgb', 'hsv', and 'hsl'. +# The `hints.*` values are a special case as they're real CSS colors, not Qt-CSS colors. There, for a gradient, you need to use `-webkit-gradient`, see https://www.webkit.org/blog/175/introducing-css-gradients/[the WebKit documentation]. +# +# completion.fg (QtColor): +# Text color of the completion widget. +# Default: white +# +# completion.bg (QssColor): +# Background color of the completion widget. +# Default: #333333 +# +# completion.alternate-bg (QssColor): +# Alternating background color of the completion widget. +# Default: #444444 +# +# completion.category.fg (QtColor): +# Foreground color of completion widget category headers. +# Default: white +# +# completion.category.bg (QssColor): +# Background color of the completion widget category headers. +# Default: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #888888, +# stop:1 #505050) +# +# completion.category.border.top (QssColor): +# Top border color of the completion widget category headers. +# Default: black +# +# completion.category.border.bottom (QssColor): +# Bottom border color of the completion widget category headers. +# Default: ${completion.category.border.top} +# +# completion.item.selected.fg (QtColor): +# Foreground color of the selected completion item. +# Default: black +# +# completion.item.selected.bg (QssColor): +# Background color of the selected completion item. +# Default: #e8c000 +# +# completion.item.selected.border.top (QssColor): +# Top border color of the completion widget category headers. +# Default: #bbbb00 +# +# completion.item.selected.border.bottom (QssColor): +# Bottom border color of the selected completion item. +# Default: ${completion.item.selected.border.top} +# +# completion.match.fg (QssColor): +# Foreground color of the matched text in the completion. +# Default: #ff4444 +# +# completion.scrollbar.fg (QssColor): +# Color of the scrollbar handle in completion view. +# Default: ${completion.fg} +# +# completion.scrollbar.bg (QssColor): +# Color of the scrollbar in completion view +# Default: ${completion.bg} +# +# statusbar.fg (QssColor): +# Foreground color of the statusbar. +# Default: white +# +# statusbar.bg (QssColor): +# Background color of the statusbar. +# Default: black +# +# statusbar.fg.error (QssColor): +# Foreground color of the statusbar if there was an error. +# Default: ${statusbar.fg} +# +# statusbar.bg.error (QssColor): +# Background color of the statusbar if there was an error. +# Default: red +# +# statusbar.fg.warning (QssColor): +# Foreground color of the statusbar if there is a warning. +# Default: ${statusbar.fg} +# +# statusbar.bg.warning (QssColor): +# Background color of the statusbar if there is a warning. +# Default: darkorange +# +# statusbar.fg.prompt (QssColor): +# Foreground color of the statusbar if there is a prompt. +# Default: ${statusbar.fg} +# +# statusbar.bg.prompt (QssColor): +# Background color of the statusbar if there is a prompt. +# Default: darkblue +# +# statusbar.fg.insert (QssColor): +# Foreground color of the statusbar in insert mode. +# Default: ${statusbar.fg} +# +# statusbar.bg.insert (QssColor): +# Background color of the statusbar in insert mode. +# Default: darkgreen +# +# statusbar.fg.command (QssColor): +# Foreground color of the statusbar in command mode. +# Default: ${statusbar.fg} +# +# statusbar.bg.command (QssColor): +# Background color of the statusbar in command mode. +# Default: ${statusbar.bg} +# +# statusbar.fg.caret (QssColor): +# Foreground color of the statusbar in caret mode. +# Default: ${statusbar.fg} +# +# statusbar.bg.caret (QssColor): +# Background color of the statusbar in caret mode. +# Default: purple +# +# statusbar.fg.caret-selection (QssColor): +# Foreground color of the statusbar in caret mode with a selection +# Default: ${statusbar.fg} +# +# statusbar.bg.caret-selection (QssColor): +# Background color of the statusbar in caret mode with a selection +# Default: #a12dff +# +# statusbar.progress.bg (QssColor): +# Background color of the progress bar. +# Default: white +# +# statusbar.url.fg (QssColor): +# Default foreground color of the URL in the statusbar. +# Default: ${statusbar.fg} +# +# statusbar.url.fg.success (QssColor): +# Foreground color of the URL in the statusbar on successful load +# (http). +# Default: white +# +# statusbar.url.fg.success.https (QssColor): +# Foreground color of the URL in the statusbar on successful load +# (https). +# Default: lime +# +# statusbar.url.fg.error (QssColor): +# Foreground color of the URL in the statusbar on error. +# Default: orange +# +# statusbar.url.fg.warn (QssColor): +# Foreground color of the URL in the statusbar when there's a +# warning. +# Default: yellow +# +# statusbar.url.fg.hover (QssColor): +# Foreground color of the URL in the statusbar for hovered links. +# Default: aqua +# +# tabs.fg.odd (QtColor): +# Foreground color of unselected odd tabs. +# Default: white +# +# tabs.bg.odd (QtColor): +# Background color of unselected odd tabs. +# Default: grey +# +# tabs.fg.even (QtColor): +# Foreground color of unselected even tabs. +# Default: white +# +# tabs.bg.even (QtColor): +# Background color of unselected even tabs. +# Default: darkgrey +# +# tabs.fg.selected.odd (QtColor): +# Foreground color of selected odd tabs. +# Default: white +# +# tabs.bg.selected.odd (QtColor): +# Background color of selected odd tabs. +# Default: black +# +# tabs.fg.selected.even (QtColor): +# Foreground color of selected even tabs. +# Default: ${tabs.fg.selected.odd} +# +# tabs.bg.selected.even (QtColor): +# Background color of selected even tabs. +# Default: ${tabs.bg.selected.odd} +# +# tabs.bg.bar (QtColor): +# Background color of the tab bar. +# Default: #555555 +# +# tabs.indicator.start (QtColor): +# Color gradient start for the tab indicator. +# Default: #0000aa +# +# tabs.indicator.stop (QtColor): +# Color gradient end for the tab indicator. +# Default: #00aa00 +# +# tabs.indicator.error (QtColor): +# Color for the tab indicator on errors.. +# Default: #ff0000 +# +# tabs.indicator.system (ColorSystem): +# Color gradient interpolation system for the tab indicator. +# rgb: Interpolate in the RGB color system. +# hsv: Interpolate in the HSV color system. +# hsl: Interpolate in the HSL color system. +# none: Don't show a gradient. +# Default: rgb +# +# hints.fg (CssColor): +# Font color for hints. +# Default: black +# +# hints.bg (CssColor): +# Background color for hints. +# Default: -webkit-gradient(linear, left top, left bottom, +# color-stop(0%,#FFF785), color-stop(100%,#FFC542)) +# +# hints.fg.match (CssColor): +# Font color for the matched part of hints. +# Default: green +# +# downloads.bg.bar (QssColor): +# Background color for the download bar. +# Default: black +# +# downloads.fg.start (QtColor): +# Color gradient start for download text. +# Default: white +# +# downloads.bg.start (QtColor): +# Color gradient start for download backgrounds. +# Default: #0000aa +# +# downloads.fg.stop (QtColor): +# Color gradient end for download text. +# Default: ${downloads.fg.start} +# +# downloads.bg.stop (QtColor): +# Color gradient stop for download backgrounds. +# Default: #00aa00 +# +# downloads.fg.system (ColorSystem): +# Color gradient interpolation system for download text. +# rgb: Interpolate in the RGB color system. +# hsv: Interpolate in the HSV color system. +# hsl: Interpolate in the HSL color system. +# none: Don't show a gradient. +# Default: rgb +# +# downloads.bg.system (ColorSystem): +# Color gradient interpolation system for download backgrounds. +# rgb: Interpolate in the RGB color system. +# hsv: Interpolate in the HSV color system. +# hsl: Interpolate in the HSL color system. +# none: Don't show a gradient. +# Default: rgb +# +# downloads.fg.error (QtColor): +# Foreground color for downloads with errors. +# Default: white +# +# downloads.bg.error (QtColor): +# Background color for downloads with errors. +# Default: red +# +# webpage.bg (QtColor): +# Background color for webpages if unset (or empty to use the +# theme's color) +# Default: white +completion.fg = white +completion.bg = #333333 +completion.alternate-bg = #444444 +completion.category.fg = white +completion.category.bg = qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #888888, stop:1 #505050) +completion.category.border.top = black +completion.category.border.bottom = ${completion.category.border.top} +completion.item.selected.fg = black +completion.item.selected.bg = #e8c000 +completion.item.selected.border.top = #bbbb00 +completion.item.selected.border.bottom = ${completion.item.selected.border.top} +completion.match.fg = #ff4444 +completion.scrollbar.fg = ${completion.fg} +completion.scrollbar.bg = ${completion.bg} +statusbar.fg = white +statusbar.bg = black +statusbar.fg.error = ${statusbar.fg} +statusbar.bg.error = red +statusbar.fg.warning = ${statusbar.fg} +statusbar.bg.warning = darkorange +statusbar.fg.prompt = ${statusbar.fg} +statusbar.bg.prompt = darkblue +statusbar.fg.insert = ${statusbar.fg} +statusbar.bg.insert = darkgreen +statusbar.fg.command = ${statusbar.fg} +statusbar.bg.command = ${statusbar.bg} +statusbar.fg.caret = ${statusbar.fg} +statusbar.bg.caret = purple +statusbar.fg.caret-selection = ${statusbar.fg} +statusbar.bg.caret-selection = #a12dff +statusbar.progress.bg = white +statusbar.url.fg = ${statusbar.fg} +statusbar.url.fg.success = white +statusbar.url.fg.success.https = lime +statusbar.url.fg.error = orange +statusbar.url.fg.warn = yellow +statusbar.url.fg.hover = aqua +tabs.fg.odd = white +tabs.bg.odd = grey +tabs.fg.even = white +tabs.bg.even = darkgrey +tabs.fg.selected.odd = white +tabs.bg.selected.odd = black +tabs.fg.selected.even = ${tabs.fg.selected.odd} +tabs.bg.selected.even = ${tabs.bg.selected.odd} +tabs.bg.bar = #555555 +tabs.indicator.start = #0000aa +tabs.indicator.stop = #00aa00 +tabs.indicator.error = #ff0000 +tabs.indicator.system = rgb +hints.fg = black +hints.bg = -webkit-gradient(linear, left top, left bottom, color-stop(0%,#FFF785), color-stop(100%,#FFC542)) +hints.fg.match = green +downloads.bg.bar = black +downloads.fg.start = white +downloads.bg.start = #0000aa +downloads.fg.stop = ${downloads.fg.start} +downloads.bg.stop = #00aa00 +downloads.fg.system = rgb +downloads.bg.system = rgb +downloads.fg.error = white +downloads.bg.error = red +webpage.bg = white + +[fonts] +# Fonts used for the UI, with optional style/weight/size. +# * Style: `normal`/`italic`/`oblique` +# * Weight: `normal`, `bold`, `100`..`900` +# * Size: _number_ `px`/`pt` +# +# _monospace (Font): +# Default monospace fonts. +# Default: Terminus, Monospace, "DejaVu Sans Mono", Monaco, +# "Bitstream Vera Sans Mono", "Andale Mono", "Courier New", Courier, +# "Liberation Mono", monospace, Fixed, Consolas, Terminal +# +# completion (Font): +# Font used in the completion widget. +# Default: 8pt ${_monospace} +# +# tabbar (QtFont): +# Font used in the tab bar. +# Default: 8pt ${_monospace} +# +# statusbar (Font): +# Font used in the statusbar. +# Default: 8pt ${_monospace} +# +# downloads (Font): +# Font used for the downloadbar. +# Default: 8pt ${_monospace} +# +# hints (Font): +# Font used for the hints. +# Default: bold 13px Monospace +# +# debug-console (QtFont): +# Font used for the debugging console. +# Default: 8pt ${_monospace} +# +# web-family-standard (FontFamily): +# Font family for standard fonts. +# Default: +# +# web-family-fixed (FontFamily): +# Font family for fixed fonts. +# Default: +# +# web-family-serif (FontFamily): +# Font family for serif fonts. +# Default: +# +# web-family-sans-serif (FontFamily): +# Font family for sans-serif fonts. +# Default: +# +# web-family-cursive (FontFamily): +# Font family for cursive fonts. +# Default: +# +# web-family-fantasy (FontFamily): +# Font family for fantasy fonts. +# Default: +# +# web-size-minimum (Int): +# The hard minimum font size. +# Default: +# +# web-size-minimum-logical (Int): +# The minimum logical font size that is applied when zooming out. +# Default: +# +# web-size-default (Int): +# The default font size for regular text. +# Default: +# +# web-size-default-fixed (Int): +# The default font size for fixed-pitch text. +# Default: +_monospace = Terminus, Monospace, "DejaVu Sans Mono", Monaco, "Bitstream Vera Sans Mono", "Andale Mono", "Liberation Mono", "Courier New", Courier, monospace, Fixed, Consolas, Terminal +completion = 8pt ${_monospace} +tabbar = 8pt ${_monospace} +statusbar = 8pt ${_monospace} +downloads = 8pt ${_monospace} +hints = bold 13px Monospace +debug-console = 8pt ${_monospace} +web-family-standard = +web-family-fixed = +web-family-serif = +web-family-sans-serif = +web-family-cursive = +web-family-fantasy = +web-size-minimum = +web-size-minimum-logical = +web-size-default = +web-size-default-fixed = diff --git a/qutebrowser/.local/share/qutebrowser/userscripts/bookmarks-dmenu b/qutebrowser/.local/share/qutebrowser/userscripts/bookmarks-dmenu new file mode 100755 index 0000000..0f89413 --- /dev/null +++ b/qutebrowser/.local/share/qutebrowser/userscripts/bookmarks-dmenu @@ -0,0 +1,7 @@ +#!/bin/bash + +url=$(cat ~/.config/qutebrowser/bookmarks/urls | dmenu -i -l 15 | awk '{print $1}') + +[ -z ${url} ] && exit + +echo "open $url" >> "$QUTE_FIFO" diff --git a/qutebrowser/.local/share/qutebrowser/userscripts/quickmarks-dmenu b/qutebrowser/.local/share/qutebrowser/userscripts/quickmarks-dmenu new file mode 100755 index 0000000..354b398 --- /dev/null +++ b/qutebrowser/.local/share/qutebrowser/userscripts/quickmarks-dmenu @@ -0,0 +1,7 @@ +#!/bin/bash + +url=$(cat ~/.config/qutebrowser/quickmarks | dmenu -i -l 15 | awk '{print $NF}') + +[ -z ${url} ] && exit + +echo "open $url" >> "$QUTE_FIFO" diff --git a/qutebrowser/.local/share/qutebrowser/userscripts/url-from-surfraw b/qutebrowser/.local/share/qutebrowser/userscripts/url-from-surfraw new file mode 100755 index 0000000..9bd6795 --- /dev/null +++ b/qutebrowser/.local/share/qutebrowser/userscripts/url-from-surfraw @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +DEFAULT_SEARCH=startpage + +if [[ $1 =~ ^-.$ ]]; then + option="$1" + shift 1 +fi + +is_elvi=$(surfraw -elvi | grep -c "^$1\s") +nbr_words=$(echo $1 | wc -w) + +if [[ $is_elvi -eq 0 && $nbr_words -eq 1 && ($1 == *.* || $1 == *:*) ]]; then + url="$1" +else + [[ $is_elvi -eq 0 ]] && sr="$DEFAULT_SEARCH $*" || sr=$* + url=$(surfraw -print $sr) +fi + +echo "open $option $url" >> $QUTE_FIFO diff --git a/qutebrowser/bookmarks b/qutebrowser/bookmarks deleted file mode 120000 index c3dbda6..0000000 --- a/qutebrowser/bookmarks +++ /dev/null @@ -1 +0,0 @@ -../personal/qutebrowser/bookmarks \ No newline at end of file diff --git a/qutebrowser/keys.conf b/qutebrowser/keys.conf deleted file mode 100644 index 79a9e13..0000000 --- a/qutebrowser/keys.conf +++ /dev/null @@ -1,638 +0,0 @@ -# vim: ft=conf -# -# In this config file, qutebrowser's key bindings are configured. -# The format looks like this: -# -# [keymode] -# -# command -# keychain -# keychain2 -# ... -# -# All blank lines and lines starting with '#' are ignored. -# Inline-comments are not permitted. -# -# keymode is a comma separated list of modes in which the key binding should be -# active. If keymode starts with !, the key binding is active in all modes -# except the listed modes. -# -# For special keys (can't be part of a keychain), enclose them in `<`...`>`. -# For modifiers, you can use either `-` or `+` as delimiters, and these names: -# -# * Control: `Control`, `Ctrl` -# * Meta: `Meta`, `Windows`, `Mod4` -# * Alt: `Alt`, `Mod1` -# * Shift: `Shift` -# -# For simple keys (no `<>`-signs), a capital letter means the key is pressed -# with Shift. For special keys (with `<>`-signs), you need to explicitly add -# `Shift-` to match a key pressed with shift. You can bind multiple commands -# by separating them with `;;`. -# -# Note that default keybindings are always bound, and need to be explicitly -# unbound if you wish to remove them: -# -# -# keychain -# keychain2 -# ... - -[!normal] - -clear-keychain ;; leave-mode - - - -[normal] -# Keybindings for normal mode. - -clear-keychain ;; search - - -set-cmd-text -s :spawn --userscript url-from-surfraw - o - -set-cmd-text -s :spawn --userscript url-from-surfraw -t - t - -set-cmd-text -s :spawn mpv {url} - y - -set-cmd-text :open {url} - go - -set-cmd-text -s :open -t - O - -set-cmd-text :open -t {url} - gO - -set-cmd-text -s :open -b - xo - -set-cmd-text :open -b {url} - xO - -set-cmd-text -s :open -w - wo - -set-cmd-text :open -w {url} - wO - -open -t - ga - - -tab-close - d - - -tab-close -o - D - -tab-only - co - -tab-focus - J - gt - -tab-move - gm - -tab-move - - gl - -tab-move + - gr - -tab-prev - K - gT - -tab-clone - gC - -reload - r - -reload -f - R - -back - H - -back -t - th - -back -w - wh - -forward - L - -forward -t - tl - -forward -w - wl - -fullscreen - - -hint - f - -hint all tab - F - -hint all window - wf - -hint all tab-bg - ;b - -hint all tab-fg - ;f - -hint all hover - ;h - -hint images - ;i - -hint images tab - ;I - -hint images tab-bg - .i - -hint links fill ":open {hint-url}" - ;o - -hint links fill ":open -t {hint-url}" - ;O - -hint links fill ":open -b {hint-url}" - .o - -hint links yank - ;y - -hint links yank-primary - ;Y - -hint --rapid links tab-bg - ;r - -hint --rapid links window - ;R - -hint links download - ;d - -scroll left - h - -scroll down - j - -scroll up - k - -scroll right - l - -scroll-perc 0 - gg - -scroll-perc - G - -search-next - n - -search-prev - N - -enter-mode insert - i - -enter-mode caret - v - -yank - yy - -yank -s - yY - -yank -t - yt - -yank -ts - yT - -yank -d - yd - -yank -ds - yD - -paste - pp - -paste -s - pP - -paste -t - Pp - -paste -ts - PP - -paste -w - wp - -paste -ws - wP - -quickmark-save - m - -set-cmd-text -s :quickmark-load -t - B - -set-cmd-text -s :quickmark-load -w - wb - -bookmark-add - M - -spawn --userscript quickmarks-dmenu - u - -spawn --userscript bookmarks-dmenu - b - -set-cmd-text -s :bookmark-load -t - gB - -set-cmd-text -s :bookmark-load -w - wB - -save - sf - -set-cmd-text -s :set - ss - -set-cmd-text -s :set -t - sl - -set-cmd-text -s :set keybind - sk - -zoom-out - - - -zoom-in - + - -zoom - = - -navigate prev - [[ - -navigate next - ]] - -navigate prev -t - {{ - -navigate next -t - }} - -navigate up - gu - -navigate up -t - gU - -navigate increment - - -navigate decrement - - -inspector - wi - -download - gd - -download-cancel - ad - -download-clear - cd - -view-source - gf - -tab-focus last - - -enter-mode passthrough - - -quit - - -scroll-page 0 1 - - -scroll-page 0 -1 - - -scroll-page 0 0.5 - - -scroll-page 0 -0.5 - - -tab-focus 1 - - -tab-focus 2 - - -tab-focus 3 - - -tab-focus 4 - - -tab-focus 5 - - -tab-focus 6 - - -tab-focus 7 - - -tab-focus 8 - - -tab-focus 9 - - -home - - -stop - - -print - - -open qute:settings - Ss - -follow-selected - - - - - - -follow-selected -t - - - -set-cmd-text -s :bookmark-load - gb - -undo - - -[insert] -# Keybindings for insert mode. -# Since normal keypresses are passed through, only special keys are -# supported in this mode. -# Useful hidden commands to map in this section: -# * `open-editor`: Open a texteditor with the focused field. -# * `paste-primary`: Paste primary selection at cursor position. - -open-editor - - -paste-primary - - -[hint] -# Keybindings for hint mode. -# Since normal keypresses are passed through, only special keys are -# supported in this mode. -# Useful hidden commands to map in this section: -# * `follow-hint`: Follow the currently selected hint. - -follow-hint - - - - - - -hint --rapid links tab-bg - - -hint links - - -hint all tab-bg - - -[command] -# Keybindings for command mode. -# Since normal keypresses are passed through, only special keys are -# supported in this mode. -# Useful hidden commands to map in this section: -# * `command-history-prev`: Switch to previous command in history. -# * `command-history-next`: Switch to next command in history. -# * `completion-item-prev`: Select previous item in completion. -# * `completion-item-next`: Select next item in completion. -# * `command-accept`: Execute the command currently in the commandline. - -command-history-prev - - - -command-history-next - - - -completion-item-prev - - -completion-item-next - - -completion-item-del - - -command-accept - - - - - - -[prompt] -# Keybindings for prompts in the status line. -# You can bind normal keys in this mode, but they will be only active -# when a yes/no-prompt is asked. For other prompt modes, you can only -# bind special keys. -# Useful hidden commands to map in this section: -# * `prompt-accept`: Confirm the entered value. -# * `prompt-yes`: Answer yes to a yes/no question. -# * `prompt-no`: Answer no to a yes/no question. - -prompt-accept - - - - - - -prompt-yes - y - -prompt-no - n - -[command,prompt] - -rl-backward-char - - -rl-forward-char - - -rl-backward-word - - -rl-forward-word - - -rl-beginning-of-line - - -rl-end-of-line - - -rl-unix-line-discard - - -rl-kill-word - - -rl-unix-word-rubout - - - -rl-yank - - -rl-delete-char - - -rl-backward-delete-char - - -rl-kill-line - - -[caret] - -toggle-selection - v - - -drop-selection - - -enter-mode normal - c - -move-to-next-line - j - -move-to-prev-line - k - -move-to-next-char - l - -move-to-prev-char - h - -move-to-end-of-word - e - -move-to-next-word - w - -move-to-prev-word - b - -move-to-start-of-next-block - ] - -move-to-start-of-prev-block - [ - -move-to-end-of-next-block - } - -move-to-end-of-prev-block - { - -move-to-start-of-line - 0 - -move-to-end-of-line - $ - -move-to-start-of-document - gg - -move-to-end-of-document - G - -yank-selected -p - Y - -yank-selected - y - - - - - - -scroll left - H - -scroll down - J - -scroll up - K - -scroll right - L - diff --git a/qutebrowser/quickmarks b/qutebrowser/quickmarks deleted file mode 120000 index 5313215..0000000 --- a/qutebrowser/quickmarks +++ /dev/null @@ -1 +0,0 @@ -../personal/qutebrowser/quickmarks \ No newline at end of file diff --git a/qutebrowser/qutebrowser.conf b/qutebrowser/qutebrowser.conf deleted file mode 100644 index 9064d48..0000000 --- a/qutebrowser/qutebrowser.conf +++ /dev/null @@ -1,1402 +0,0 @@ -# vim: ft=dosini - -# Configfile for qutebrowser. -# -# This configfile is parsed by python's configparser in extended -# interpolation mode. The format is very INI-like, so there are -# categories like [general] with "key = value"-pairs. -# -# Note that you shouldn't add your own comments, as this file is -# regenerated every time the config is saved. -# -# Interpolation looks like ${value} or ${section:value} and will be -# replaced by the respective value. -# -# Some settings will expand environment variables. Note that, since -# interpolation is run first, you will need to escape the $ char as -# described below. -# -# This is the default config, so if you want to remove anything from -# here (as opposed to change/add), for example a key binding, set it to -# an empty value. -# -# You will need to escape the following values: -# - # at the start of the line (at the first position of the key) (\#) -# - $ in a value ($$) - -[general] -# General/miscellaneous options. -# -# ignore-case (IgnoreCase): -# Whether to find text on a page case-insensitively. -# true: Search case-insensitively -# false: Search case-sensitively -# smart: Search case-sensitively if there are capital chars -# Default: smart -# -# wrap-search (Bool): -# Whether to wrap finding text to the top when arriving at the end. -# Valid values: true, false -# Default: true -# -# startpage (List): -# The default page(s) to open at the start, separated by commas. -# Default: https://duckduckgo.com -# -# default-page (FuzzyUrl): -# The page to open if :open -t/-b/-w is used without URL. Use -# `about:blank` for a blank page. -# Default: ${startpage} -# -# auto-search (AutoSearch): -# Whether to start a search when something else than a URL is -# entered. -# naive: Use simple/naive check. -# dns: Use DNS requests (might be slow!). -# false: Never search automatically. -# Default: naive -# -# auto-save-config (Bool): -# Whether to save the config automatically on quit. -# Valid values: true, false -# Default: true -# -# auto-save-interval (Int): -# How often (in milliseconds) to auto-save config/cookies/etc. -# Default: 15000 -# -# editor (ShellCommand): -# The editor (and arguments) to use for the `open-editor` command. -# The arguments get split like in a shell, so you can use `"` or `'` -# to quote them. -# `{}` gets replaced by the filename of the file to be edited. -# Default: gvim -f "{}" -# -# editor-encoding (Encoding): -# Encoding to use for editor. -# Default: utf-8 -# -# private-browsing (Bool): -# Do not record visited pages in the history or store web page -# icons. -# Valid values: true, false -# Default: false -# -# developer-extras (Bool): -# Enable extra tools for Web developers. -# This needs to be enabled for `:inspector` to work and also adds an -# _Inspect_ entry to the context menu. -# Valid values: true, false -# Default: false -# -# print-element-backgrounds (Bool): -# Whether the background color and images are also drawn when the -# page is printed. -# Valid values: true, false -# Default: true -# -# xss-auditing (Bool): -# Whether load requests should be monitored for cross-site scripting -# attempts. -# Suspicious scripts will be blocked and reported in the inspector's -# JavaScript console. Enabling this feature might have an impact on -# performance. -# Valid values: true, false -# Default: false -# -# site-specific-quirks (Bool): -# Enable workarounds for broken sites. -# Valid values: true, false -# Default: true -# -# default-encoding (String): -# Default encoding to use for websites. -# The encoding must be a string describing an encoding such as -# _utf-8_, _iso-8859-1_, etc. If left empty a default value will be -# used. -# Default: -# -# new-instance-open-target (String): -# How to open links in an existing instance if a new one is -# launched. -# tab: Open a new tab in the existing window and activate the -# window. -# tab-bg: Open a new background tab in the existing window and -# activate the window. -# tab-silent: Open a new tab in the existing window without -# activating the window. -# tab-bg-silent: Open a new background tab in the existing -# window without activating the window. -# window: Open in a new window. -# Default: tab -# -# log-javascript-console (String): -# How to log javascript console messages. -# none: Don't log messages. -# debug: Log messages with debug level. -# info: Log messages with info level. -# Default: debug -# -# save-session (Bool): -# Whether to always save the open pages. -# Valid values: true, false -# Default: false -# -# session-default-name (SessionName): -# The name of the session to save by default, or empty for the last -# loaded session. -# Default: -# -# url-incdec-segments (FlagList): -# The URL segments where `:navigate increment/decrement` will search -# for a number. -# Valid values: host, path, query, anchor -# Default: path,query -ignore-case = smart -wrap-search = true -startpage = about:blank -default-page = https://startpage.com -auto-search = naive -auto-save-config = true -auto-save-interval = 15000 -editor = urxvt -e vim -f "{}" -editor-encoding = utf-8 -private-browsing = false -developer-extras = false -print-element-backgrounds = true -xss-auditing = false -site-specific-quirks = true -default-encoding = -new-instance-open-target = tab -log-javascript-console = debug -save-session = false -session-default-name = -url-incdec-segments = path,query - -[ui] -# General options related to the user interface. -# -# zoom-levels (PercList): -# The available zoom levels, separated by commas. -# Default: -# 25%,33%,50%,67%,75%,90%,100%,110%,125%,150%,175%,200%,250%,300%,400%,500% -# -# default-zoom (Perc): -# The default zoom level. -# Default: 100% -# -# downloads-position (VerticalPosition): -# Where to show the downloaded files. -# Valid values: top, bottom -# Default: top -# -# message-timeout (Int): -# Time (in ms) to show messages in the statusbar for. -# Default: 2000 -# -# message-unfocused (Bool): -# Whether to show messages in unfocused windows. -# Valid values: true, false -# Default: false -# -# confirm-quit (ConfirmQuit): -# Whether to confirm quitting the application. -# always: Always show a confirmation. -# multiple-tabs: Show a confirmation if multiple tabs are -# opened. -# downloads: Show a confirmation if downloads are running -# never: Never show a confirmation. -# Default: never -# -# display-statusbar-messages (Bool): -# Whether to display javascript statusbar messages. -# Valid values: true, false -# Default: false -# -# zoom-text-only (Bool): -# Whether the zoom factor on a frame applies only to the text or to -# all content. -# Valid values: true, false -# Default: false -# -# frame-flattening (Bool): -# Whether to expand each subframe to its contents. -# This will flatten all the frames to become one scrollable page. -# Valid values: true, false -# Default: false -# -# user-stylesheet (UserStyleSheet): -# User stylesheet to use (absolute filename, filename relative to -# the config directory or CSS string). Will expand environment -# variables. -# Default: ::-webkit-scrollbar { width: 0px; height: 0px; } -# -# css-media-type (String): -# Set the CSS media type. -# Default: -# -# smooth-scrolling (Bool): -# Whether to enable smooth scrolling for webpages. -# Valid values: true, false -# Default: false -# -# remove-finished-downloads (Int): -# Number of milliseconds to wait before removing finished downloads. -# Will not be removed if value is -1. -# Default: -1 -# -# hide-statusbar (Bool): -# Whether to hide the statusbar unless a message is shown. -# Valid values: true, false -# Default: false -# -# statusbar-padding (Padding): -# Padding for statusbar (top, bottom, left, right). -# Default: 1,1,0,0 -# -# window-title-format (FormatString): -# The format to use for the window title. The following placeholders -# are defined: -# * `{perc}`: The percentage as a string like `[10%]`. -# * `{perc_raw}`: The raw percentage, e.g. `10` -# * `{title}`: The title of the current web page -# * `{title_sep}`: The string ` - ` if a title is set, empty -# otherwise. -# * `{id}`: The internal window ID of this window. -# * `{scroll_pos}`: The page scroll position. -# Default: {perc}{title}{title_sep}qutebrowser -# -# hide-mouse-cursor (Bool): -# Whether to hide the mouse cursor. -# Valid values: true, false -# Default: false -# -# modal-js-dialog (Bool): -# Use standard JavaScript modal dialog for alert() and confirm() -# Valid values: true, false -# Default: false -# -# hide-wayland-decoration (Bool): -# Hide the window decoration when using wayland (requires restart) -# Valid values: true, false -# Default: false -zoom-levels = 25%,33%,50%,67%,75%,90%,100%,110%,125%,150%,175%,200%,250%,300%,400%,500% -default-zoom = 100% -downloads-position = top -message-timeout = 2000 -message-unfocused = false -confirm-quit = never -display-statusbar-messages = false -zoom-text-only = false -frame-flattening = false -user-stylesheet = ::-webkit-scrollbar { width: 0px; height: 0px; } -css-media-type = -smooth-scrolling = false -remove-finished-downloads = -1 -hide-statusbar = false -statusbar-padding = 1,1,0,0 -window-title-format = {perc}{title}{title_sep}qutebrowser -hide-mouse-cursor = false -modal-js-dialog = false -hide-wayland-decoration = false - -[network] -# Settings related to the network. -# -# do-not-track (Bool): -# Value to send in the `DNT` header. -# Valid values: true, false -# Default: true -# -# accept-language (String): -# Value to send in the `accept-language` header. -# Default: en-US,en -# -# referer-header (String): -# Send the Referer header -# always: Always send. -# never: Never send; this is not recommended, as some sites may -# break. -# same-domain: Only send for the same domain. This will still -# protect your privacy, but shouldn't break any sites. -# Default: same-domain -# -# user-agent (UserAgent): -# User agent to send. Empty to send the default. -# Default: -# -# proxy (Proxy): -# The proxy to use. -# In addition to the listed values, you can use a `socks://...` or -# `http://...` URL. -# system: Use the system wide proxy. -# none: Don't use any proxy -# Default: system -# -# proxy-dns-requests (Bool): -# Whether to send DNS requests over the configured proxy. -# Valid values: true, false -# Default: true -# -# ssl-strict (BoolAsk): -# Whether to validate SSL handshakes. -# Valid values: true, false, ask -# Default: ask -# -# dns-prefetch (Bool): -# Whether to try to pre-fetch DNS entries to speed up browsing. -# Valid values: true, false -# Default: true -do-not-track = true -accept-language = en-US,en -referer-header = same-domain -user-agent = -proxy = system -proxy-dns-requests = true -ssl-strict = ask -dns-prefetch = true - -[completion] -# Options related to completion and command history. -# -# auto-open (Bool): -# Automatically open completion when typing. -# Valid values: true, false -# Default: true -# -# download-path-suggestion (String): -# What to display in the download filename input. -# path: Show only the download path. -# filename: Show only download filename. -# both: Show download path and filename. -# Default: path -# -# timestamp-format (TimestampTemplate): -# How to format timestamps (e.g. for history) -# Default: %Y-%m-%d -# -# show (Bool): -# Whether to show the autocompletion window. -# Valid values: true, false -# Default: true -# -# height (PercOrInt): -# The height of the completion, in px or as percentage of the -# window. -# Default: 50% -# -# cmd-history-max-items (Int): -# How many commands to save in the command history. -# 0: no history / -1: unlimited -# Default: 100 -# -# web-history-max-items (Int): -# How many URLs to show in the web history. -# 0: no history / -1: unlimited -# Default: 1000 -# -# quick-complete (Bool): -# Whether to move on to the next part when there's only one possible -# completion left. -# Valid values: true, false -# Default: true -# -# shrink (Bool): -# Whether to shrink the completion to be smaller than the configured -# size if there are no scrollbars. -# Valid values: true, false -# Default: false -# -# scrollbar-width (Int): -# Width of the scrollbar in the completion window (in px). -# Default: 12 -# -# scrollbar-padding (Int): -# Padding of scrollbar handle in completion window (in px). -# Default: 2 -auto-open = true -download-path-suggestion = path -timestamp-format = %Y-%m-%d -show = true -height = 50% -cmd-history-max-items = 100 -web-history-max-items = 1000 -quick-complete = true -shrink = false -scrollbar-width = 12 -scrollbar-padding = 2 - -[input] -# Options related to input modes. -# -# timeout (Int): -# Timeout for ambiguous key bindings. -# Default: 500 -# -# partial-timeout (Int): -# Timeout for partially typed key bindings. -# Default: 1000 -# -# insert-mode-on-plugins (Bool): -# Whether to switch to insert mode when clicking flash and other -# plugins. -# Valid values: true, false -# Default: false -# -# auto-leave-insert-mode (Bool): -# Whether to leave insert mode if a non-editable element is clicked. -# Valid values: true, false -# Default: true -# -# auto-insert-mode (Bool): -# Whether to automatically enter insert mode if an editable element -# is focused after page load. -# Valid values: true, false -# Default: false -# -# forward-unbound-keys (String): -# Whether to forward unbound keys to the webview in normal mode. -# all: Forward all unbound keys. -# auto: Forward unbound non-alphanumeric keys. -# none: Don't forward any keys. -# Default: auto -# -# spatial-navigation (Bool): -# Enables or disables the Spatial Navigation feature. -# Spatial navigation consists in the ability to navigate between -# focusable elements in a Web page, such as hyperlinks and form -# controls, by using Left, Right, Up and Down arrow keys. For -# example, if a user presses the Right key, heuristics determine -# whether there is an element he might be trying to reach towards -# the right and which element he probably wants. -# Valid values: true, false -# Default: false -# -# links-included-in-focus-chain (Bool): -# Whether hyperlinks should be included in the keyboard focus chain. -# Valid values: true, false -# Default: true -# -# rocker-gestures (Bool): -# Whether to enable Opera-like mouse rocker gestures. This disables -# the context menu. -# Valid values: true, false -# Default: false -# -# mouse-zoom-divider (Int): -# How much to divide the mouse wheel movements to translate them -# into zoom increments. -# Default: 512 -timeout = 500 -partial-timeout = 1000 -insert-mode-on-plugins = false -auto-leave-insert-mode = true -auto-insert-mode = false -forward-unbound-keys = auto -spatial-navigation = false -links-included-in-focus-chain = true -rocker-gestures = false -mouse-zoom-divider = 512 - -[tabs] -# Configuration of the tab bar. -# -# background-tabs (Bool): -# Whether to open new tabs (middleclick/ctrl+click) in background. -# Valid values: true, false -# Default: false -# -# select-on-remove (SelectOnRemove): -# Which tab to select when the focused tab is removed. -# left: Select the tab on the left. -# right: Select the tab on the right. -# previous: Select the previously selected tab. -# Default: right -# -# new-tab-position (NewTabPosition): -# How new tabs are positioned. -# left: On the left of the current tab. -# right: On the right of the current tab. -# first: At the left end. -# last: At the right end. -# Default: right -# -# new-tab-position-explicit (NewTabPosition): -# How new tabs opened explicitly are positioned. -# left: On the left of the current tab. -# right: On the right of the current tab. -# first: At the left end. -# last: At the right end. -# Default: last -# -# last-close (String): -# Behavior when the last tab is closed. -# ignore: Don't do anything. -# blank: Load a blank page. -# startpage: Load the start page. -# default-page: Load the default page. -# close: Close the window. -# Default: ignore -# -# show (String): -# When to show the tab bar -# always: Always show the tab bar. -# never: Always hide the tab bar. -# multiple: Hide the tab bar if only one tab is open. -# switching: Show the tab bar when switching tabs. -# Default: always -# -# show-switching-delay (Int): -# Time to show the tab bar before hiding it when tabs->show is set -# to 'switching'. -# Default: 800 -# -# wrap (Bool): -# Whether to wrap when changing tabs. -# Valid values: true, false -# Default: true -# -# movable (Bool): -# Whether tabs should be movable. -# Valid values: true, false -# Default: true -# -# close-mouse-button (String): -# On which mouse button to close tabs. -# right: Close tabs on right-click. -# middle: Close tabs on middle-click. -# none: Don't close tabs using the mouse. -# Default: middle -# -# position (Position): -# The position of the tab bar. -# Valid values: top, bottom, left, right -# Default: top -# -# show-favicons (Bool): -# Whether to show favicons in the tab bar. -# Valid values: true, false -# Default: true -# -# width (PercOrInt): -# The width of the tab bar if it's vertical, in px or as percentage -# of the window. -# Default: 20% -# -# indicator-width (Int): -# Width of the progress indicator (0 to disable). -# Default: 3 -# -# tabs-are-windows (Bool): -# Whether to open windows instead of tabs. -# Valid values: true, false -# Default: false -# -# title-format (FormatString): -# The format to use for the tab title. The following placeholders -# are defined: -# * `{perc}`: The percentage as a string like `[10%]`. -# * `{perc_raw}`: The raw percentage, e.g. `10` -# * `{title}`: The title of the current web page -# * `{title_sep}`: The string ` - ` if a title is set, empty -# otherwise. -# * `{index}`: The index of this tab. -# * `{id}`: The internal tab ID of this tab. -# * `{scroll_pos}`: The page scroll position. -# Default: {index}: {title} -# -# title-alignment (TextAlignment): -# Alignment of the text inside of tabs -# Valid values: left, right, center -# Default: left -# -# mousewheel-tab-switching (Bool): -# Switch between tabs using the mouse wheel. -# Valid values: true, false -# Default: true -# -# padding (Padding): -# Padding for tabs (top, bottom, left, right). -# Default: 0,0,5,5 -# -# indicator-padding (Padding): -# Padding for indicators (top, bottom, left, right). -# Default: 2,2,0,4 -background-tabs = false -select-on-remove = right -new-tab-position = right -new-tab-position-explicit = last -last-close = ignore -show = multiple -show-switching-delay = 800 -wrap = true -movable = true -close-mouse-button = middle -position = top -show-favicons = false -width = 20% -indicator-width = 3 -tabs-are-windows = true -title-format = {index}: {title} -title-alignment = left -mousewheel-tab-switching = true -padding = 0,0,5,5 -indicator-padding = 2,2,0,4 - -[storage] -# Settings related to cache and storage. -# -# download-directory (Directory): -# The directory to save downloads to. An empty value selects a -# sensible os-specific default. Will expand environment variables. -# Default: -# -# prompt-download-directory (Bool): -# Whether to prompt the user for the download location. -# If set to false, 'download-directory' will be used. -# Valid values: true, false -# Default: true -# -# remember-download-directory (Bool): -# Whether to remember the last used download directory. -# Valid values: true, false -# Default: true -# -# maximum-pages-in-cache (Int): -# The maximum number of pages to hold in the global memory page -# cache. -# The Page Cache allows for a nicer user experience when navigating -# forth or back to pages in the forward/back history, by pausing and -# resuming up to _n_ pages. -# For more information about the feature, please refer to: -# http://webkit.org/blog/427/webkit-page-cache-i-the-basics/ -# Default: -# -# object-cache-capacities (WebKitBytesList): -# The capacities for the global memory cache for dead objects such -# as stylesheets or scripts. Syntax: cacheMinDeadCapacity, -# cacheMaxDead, totalCapacity. -# The _cacheMinDeadCapacity_ specifies the minimum number of bytes -# that dead objects should consume when the cache is under pressure. -# _cacheMaxDead_ is the maximum number of bytes that dead objects -# should consume when the cache is *not* under pressure. -# _totalCapacity_ specifies the maximum number of bytes that the -# cache should consume *overall*. -# Default: -# -# offline-storage-default-quota (WebKitBytes): -# Default quota for new offline storage databases. -# Default: -# -# offline-web-application-cache-quota (WebKitBytes): -# Quota for the offline web application cache. -# Default: -# -# offline-storage-database (Bool): -# Whether support for the HTML 5 offline storage feature is enabled. -# Valid values: true, false -# Default: true -# -# offline-web-application-storage (Bool): -# Whether support for the HTML 5 web application cache feature is -# enabled. -# An application cache acts like an HTTP cache in some sense. For -# documents that use the application cache via JavaScript, the -# loader engine will first ask the application cache for the -# contents, before hitting the network. -# The feature is described in details at: -# http://dev.w3.org/html5/spec/Overview.html#appcache -# Valid values: true, false -# Default: true -# -# local-storage (Bool): -# Whether support for the HTML 5 local storage feature is enabled. -# Valid values: true, false -# Default: true -# -# cache-size (Int): -# Size of the HTTP network cache. -# Default: 52428800 -download-directory = -prompt-download-directory = true -remember-download-directory = true -maximum-pages-in-cache = -object-cache-capacities = -offline-storage-default-quota = -offline-web-application-cache-quota = -offline-storage-database = true -offline-web-application-storage = true -local-storage = true -cache-size = 52428800 - -[content] -# Loaded plugins/scripts and allowed actions. -# -# allow-images (Bool): -# Whether images are automatically loaded in web pages. -# Valid values: true, false -# Default: true -# -# allow-javascript (Bool): -# Enables or disables the running of JavaScript programs. -# Valid values: true, false -# Default: true -# -# allow-plugins (Bool): -# Enables or disables plugins in Web pages. -# Qt plugins with a mimetype such as "application/x-qt-plugin" are -# not affected by this setting. -# Valid values: true, false -# Default: false -# -# webgl (Bool): -# Enables or disables WebGL. -# Valid values: true, false -# Default: true -# -# css-regions (Bool): -# Enable or disable support for CSS regions. -# Valid values: true, false -# Default: true -# -# hyperlink-auditing (Bool): -# Enable or disable hyperlink auditing (). -# Valid values: true, false -# Default: false -# -# geolocation (BoolAsk): -# Allow websites to request geolocations. -# Valid values: true, false, ask -# Default: ask -# -# notifications (BoolAsk): -# Allow websites to show notifications. -# Valid values: true, false, ask -# Default: ask -# -# javascript-can-open-windows (Bool): -# Whether JavaScript programs can open new windows. -# Valid values: true, false -# Default: false -# -# javascript-can-close-windows (Bool): -# Whether JavaScript programs can close windows. -# Valid values: true, false -# Default: false -# -# javascript-can-access-clipboard (Bool): -# Whether JavaScript programs can read or write to the clipboard. -# Valid values: true, false -# Default: false -# -# ignore-javascript-prompt (Bool): -# Whether all javascript prompts should be ignored. -# Valid values: true, false -# Default: false -# -# ignore-javascript-alert (Bool): -# Whether all javascript alerts should be ignored. -# Valid values: true, false -# Default: false -# -# local-content-can-access-remote-urls (Bool): -# Whether locally loaded documents are allowed to access remote -# urls. -# Valid values: true, false -# Default: false -# -# local-content-can-access-file-urls (Bool): -# Whether locally loaded documents are allowed to access other local -# urls. -# Valid values: true, false -# Default: true -# -# cookies-accept (String): -# Control which cookies to accept. -# all: Accept all cookies. -# no-3rdparty: Accept cookies from the same origin only. -# no-unknown-3rdparty: Accept cookies from the same origin only, -# unless a cookie is already set for the domain. -# never: Don't accept cookies at all. -# Default: no-3rdparty -# -# cookies-store (Bool): -# Whether to store cookies. -# Valid values: true, false -# Default: true -# -# host-block-lists (UrlList): -# List of URLs of lists which contain hosts to block. -# The file can be in one of the following formats: -# - An '/etc/hosts'-like file -# - One host per line -# - A zip-file of any of the above, with either only one file, or a -# file named 'hosts' (with any extension). -# Default: -# http://www.malwaredomainlist.com/hostslist/hosts.txt,http://someonewhocares.org/hosts/hosts,http://winhelp2002.mvps.org/hosts.zip,http://malwaredomains.lehigh.edu/files/justdomains.zip,http://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext -# -# host-blocking-enabled (Bool): -# Whether host blocking is enabled. -# Valid values: true, false -# Default: true -# -# host-blocking-whitelist (List): -# List of domains that should always be loaded, despite being -# ad-blocked. -# Domains may contain * and ? wildcards and are otherwise required -# to exactly match the requested domain. -# Local domains are always exempt from hostblocking. -# Default: piwik.org -# -# enable-pdfjs (Bool): -# Enable pdf.js to view PDF files in the browser. -# Note that the files can still be downloaded by clicking the -# download button in the pdf.js viewer. -# Valid values: true, false -# Default: false -allow-images = true -allow-javascript = true -allow-plugins = false -webgl = true -css-regions = true -hyperlink-auditing = false -geolocation = ask -notifications = ask -javascript-can-open-windows = false -javascript-can-close-windows = false -javascript-can-access-clipboard = false -ignore-javascript-prompt = false -ignore-javascript-alert = false -local-content-can-access-remote-urls = false -local-content-can-access-file-urls = true -cookies-accept = no-3rdparty -cookies-store = true -host-block-lists = http://www.malwaredomainlist.com/hostslist/hosts.txt,http://someonewhocares.org/hosts/hosts,http://winhelp2002.mvps.org/hosts.zip,http://malwaredomains.lehigh.edu/files/justdomains.zip,http://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext -host-blocking-enabled = true -host-blocking-whitelist = piwik.org -enable-pdfjs = false - -[hints] -# Hinting settings. -# -# border (String): -# CSS border value for hints. -# Default: 1px solid #E3BE23 -# -# opacity (Float): -# Opacity for hints. -# Default: 0.7 -# -# mode (String): -# Mode to use for hints. -# number: Use numeric hints. -# letter: Use the chars in the hints -> chars setting. -# word: Use hints words based on the html elements and the extra -# words. -# Default: letter -# -# chars (UniqueCharString): -# Chars used for hint strings. -# Default: asdfghjkl -# -# min-chars (Int): -# Minimum number of chars used for hint strings. -# Default: 1 -# -# scatter (Bool): -# Whether to scatter hint key chains (like Vimium) or not (like -# dwb). -# Valid values: true, false -# Default: true -# -# uppercase (Bool): -# Make chars in hint strings uppercase. -# Valid values: true, false -# Default: false -# -# dictionary (File): -# The dictionary file to be used by the word hints. -# Default: /usr/share/dict/words -# -# auto-follow (Bool): -# Follow a hint immediately when the hint text is completely -# matched. -# Valid values: true, false -# Default: true -# -# next-regexes (RegexList): -# A comma-separated list of regexes to use for 'next' links. -# Default: -# \bnext\b,\bmore\b,\bnewer\b,\b[>→≫]\b,\b(>>|»)\b,\bcontinue\b -# -# prev-regexes (RegexList): -# A comma-separated list of regexes to use for 'prev' links. -# Default: \bprev(ious)?\b,\bback\b,\bolder\b,\b[<←≪]\b,\b(<<|«)\b -border = 1px solid #E3BE23 -opacity = 1 -mode = letter -chars = aoeuidhtns -min-chars = 1 -scatter = true -uppercase = true -dictionary = /usr/share/dict/words -auto-follow = true -next-regexes = \bnext\b,\bmore\b,\bnewer\b,\b[>→≫]\b,\b(>>|»)\b,\bcontinue\b -prev-regexes = \bprev(ious)?\b,\bback\b,\bolder\b,\b[<←≪]\b,\b(<<|«)\b - -[searchengines] -# Definitions of search engines which can be used via the address bar. -# The searchengine named `DEFAULT` is used when `general -> auto-search` -# is true and something else than a URL was entered to be opened. Other -# search engines can be used by prepending the search engine name to the -# search term, e.g. `:open google qutebrowser`. The string `{}` will be -# replaced by the search term, use `{{` and `}}` for literal `{`/`}` -# signs. -DEFAULT = https://duckduckgo.com/?q={} - -[aliases] -# Aliases for commands. -# By default, no aliases are defined. Example which adds a new command -# `:qtb` to open qutebrowsers website: -# `qtb = open http://www.qutebrowser.org/` - -[colors] -# Colors used in the UI. -# A value can be in one of the following format: -# * `#RGB`/`#RRGGBB`/`#RRRGGGBBB`/`#RRRRGGGGBBBB` -# * A SVG color name as specified in http://www.w3.org/TR/SVG/types.html#ColorKeywords[the W3C specification]. -# * transparent (no color) -# * `rgb(r, g, b)` / `rgba(r, g, b, a)` (values 0-255 or percentages) -# * `hsv(h, s, v)` / `hsva(h, s, v, a)` (values 0-255, hue 0-359) -# * A gradient as explained in http://doc.qt.io/qt-5/stylesheet-reference.html#list-of-property-types[the Qt documentation] under ``Gradient''. -# A *.system value determines the color system to use for color -# interpolation between similarly-named *.start and *.stop entries, -# regardless of how they are defined in the options. Valid values are -# 'rgb', 'hsv', and 'hsl'. -# The `hints.*` values are a special case as they're real CSS colors, not Qt-CSS colors. There, for a gradient, you need to use `-webkit-gradient`, see https://www.webkit.org/blog/175/introducing-css-gradients/[the WebKit documentation]. -# -# completion.fg (QtColor): -# Text color of the completion widget. -# Default: white -# -# completion.bg (QssColor): -# Background color of the completion widget. -# Default: #333333 -# -# completion.alternate-bg (QssColor): -# Alternating background color of the completion widget. -# Default: #444444 -# -# completion.category.fg (QtColor): -# Foreground color of completion widget category headers. -# Default: white -# -# completion.category.bg (QssColor): -# Background color of the completion widget category headers. -# Default: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #888888, -# stop:1 #505050) -# -# completion.category.border.top (QssColor): -# Top border color of the completion widget category headers. -# Default: black -# -# completion.category.border.bottom (QssColor): -# Bottom border color of the completion widget category headers. -# Default: ${completion.category.border.top} -# -# completion.item.selected.fg (QtColor): -# Foreground color of the selected completion item. -# Default: black -# -# completion.item.selected.bg (QssColor): -# Background color of the selected completion item. -# Default: #e8c000 -# -# completion.item.selected.border.top (QssColor): -# Top border color of the completion widget category headers. -# Default: #bbbb00 -# -# completion.item.selected.border.bottom (QssColor): -# Bottom border color of the selected completion item. -# Default: ${completion.item.selected.border.top} -# -# completion.match.fg (QssColor): -# Foreground color of the matched text in the completion. -# Default: #ff4444 -# -# completion.scrollbar.fg (QssColor): -# Color of the scrollbar handle in completion view. -# Default: ${completion.fg} -# -# completion.scrollbar.bg (QssColor): -# Color of the scrollbar in completion view -# Default: ${completion.bg} -# -# statusbar.fg (QssColor): -# Foreground color of the statusbar. -# Default: white -# -# statusbar.bg (QssColor): -# Background color of the statusbar. -# Default: black -# -# statusbar.fg.error (QssColor): -# Foreground color of the statusbar if there was an error. -# Default: ${statusbar.fg} -# -# statusbar.bg.error (QssColor): -# Background color of the statusbar if there was an error. -# Default: red -# -# statusbar.fg.warning (QssColor): -# Foreground color of the statusbar if there is a warning. -# Default: ${statusbar.fg} -# -# statusbar.bg.warning (QssColor): -# Background color of the statusbar if there is a warning. -# Default: darkorange -# -# statusbar.fg.prompt (QssColor): -# Foreground color of the statusbar if there is a prompt. -# Default: ${statusbar.fg} -# -# statusbar.bg.prompt (QssColor): -# Background color of the statusbar if there is a prompt. -# Default: darkblue -# -# statusbar.fg.insert (QssColor): -# Foreground color of the statusbar in insert mode. -# Default: ${statusbar.fg} -# -# statusbar.bg.insert (QssColor): -# Background color of the statusbar in insert mode. -# Default: darkgreen -# -# statusbar.fg.command (QssColor): -# Foreground color of the statusbar in command mode. -# Default: ${statusbar.fg} -# -# statusbar.bg.command (QssColor): -# Background color of the statusbar in command mode. -# Default: ${statusbar.bg} -# -# statusbar.fg.caret (QssColor): -# Foreground color of the statusbar in caret mode. -# Default: ${statusbar.fg} -# -# statusbar.bg.caret (QssColor): -# Background color of the statusbar in caret mode. -# Default: purple -# -# statusbar.fg.caret-selection (QssColor): -# Foreground color of the statusbar in caret mode with a selection -# Default: ${statusbar.fg} -# -# statusbar.bg.caret-selection (QssColor): -# Background color of the statusbar in caret mode with a selection -# Default: #a12dff -# -# statusbar.progress.bg (QssColor): -# Background color of the progress bar. -# Default: white -# -# statusbar.url.fg (QssColor): -# Default foreground color of the URL in the statusbar. -# Default: ${statusbar.fg} -# -# statusbar.url.fg.success (QssColor): -# Foreground color of the URL in the statusbar on successful load -# (http). -# Default: white -# -# statusbar.url.fg.success.https (QssColor): -# Foreground color of the URL in the statusbar on successful load -# (https). -# Default: lime -# -# statusbar.url.fg.error (QssColor): -# Foreground color of the URL in the statusbar on error. -# Default: orange -# -# statusbar.url.fg.warn (QssColor): -# Foreground color of the URL in the statusbar when there's a -# warning. -# Default: yellow -# -# statusbar.url.fg.hover (QssColor): -# Foreground color of the URL in the statusbar for hovered links. -# Default: aqua -# -# tabs.fg.odd (QtColor): -# Foreground color of unselected odd tabs. -# Default: white -# -# tabs.bg.odd (QtColor): -# Background color of unselected odd tabs. -# Default: grey -# -# tabs.fg.even (QtColor): -# Foreground color of unselected even tabs. -# Default: white -# -# tabs.bg.even (QtColor): -# Background color of unselected even tabs. -# Default: darkgrey -# -# tabs.fg.selected.odd (QtColor): -# Foreground color of selected odd tabs. -# Default: white -# -# tabs.bg.selected.odd (QtColor): -# Background color of selected odd tabs. -# Default: black -# -# tabs.fg.selected.even (QtColor): -# Foreground color of selected even tabs. -# Default: ${tabs.fg.selected.odd} -# -# tabs.bg.selected.even (QtColor): -# Background color of selected even tabs. -# Default: ${tabs.bg.selected.odd} -# -# tabs.bg.bar (QtColor): -# Background color of the tab bar. -# Default: #555555 -# -# tabs.indicator.start (QtColor): -# Color gradient start for the tab indicator. -# Default: #0000aa -# -# tabs.indicator.stop (QtColor): -# Color gradient end for the tab indicator. -# Default: #00aa00 -# -# tabs.indicator.error (QtColor): -# Color for the tab indicator on errors.. -# Default: #ff0000 -# -# tabs.indicator.system (ColorSystem): -# Color gradient interpolation system for the tab indicator. -# rgb: Interpolate in the RGB color system. -# hsv: Interpolate in the HSV color system. -# hsl: Interpolate in the HSL color system. -# none: Don't show a gradient. -# Default: rgb -# -# hints.fg (CssColor): -# Font color for hints. -# Default: black -# -# hints.bg (CssColor): -# Background color for hints. -# Default: -webkit-gradient(linear, left top, left bottom, -# color-stop(0%,#FFF785), color-stop(100%,#FFC542)) -# -# hints.fg.match (CssColor): -# Font color for the matched part of hints. -# Default: green -# -# downloads.bg.bar (QssColor): -# Background color for the download bar. -# Default: black -# -# downloads.fg.start (QtColor): -# Color gradient start for download text. -# Default: white -# -# downloads.bg.start (QtColor): -# Color gradient start for download backgrounds. -# Default: #0000aa -# -# downloads.fg.stop (QtColor): -# Color gradient end for download text. -# Default: ${downloads.fg.start} -# -# downloads.bg.stop (QtColor): -# Color gradient stop for download backgrounds. -# Default: #00aa00 -# -# downloads.fg.system (ColorSystem): -# Color gradient interpolation system for download text. -# rgb: Interpolate in the RGB color system. -# hsv: Interpolate in the HSV color system. -# hsl: Interpolate in the HSL color system. -# none: Don't show a gradient. -# Default: rgb -# -# downloads.bg.system (ColorSystem): -# Color gradient interpolation system for download backgrounds. -# rgb: Interpolate in the RGB color system. -# hsv: Interpolate in the HSV color system. -# hsl: Interpolate in the HSL color system. -# none: Don't show a gradient. -# Default: rgb -# -# downloads.fg.error (QtColor): -# Foreground color for downloads with errors. -# Default: white -# -# downloads.bg.error (QtColor): -# Background color for downloads with errors. -# Default: red -# -# webpage.bg (QtColor): -# Background color for webpages if unset (or empty to use the -# theme's color) -# Default: white -completion.fg = white -completion.bg = #333333 -completion.alternate-bg = #444444 -completion.category.fg = white -completion.category.bg = qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #888888, stop:1 #505050) -completion.category.border.top = black -completion.category.border.bottom = ${completion.category.border.top} -completion.item.selected.fg = black -completion.item.selected.bg = #e8c000 -completion.item.selected.border.top = #bbbb00 -completion.item.selected.border.bottom = ${completion.item.selected.border.top} -completion.match.fg = #ff4444 -completion.scrollbar.fg = ${completion.fg} -completion.scrollbar.bg = ${completion.bg} -statusbar.fg = white -statusbar.bg = black -statusbar.fg.error = ${statusbar.fg} -statusbar.bg.error = red -statusbar.fg.warning = ${statusbar.fg} -statusbar.bg.warning = darkorange -statusbar.fg.prompt = ${statusbar.fg} -statusbar.bg.prompt = darkblue -statusbar.fg.insert = ${statusbar.fg} -statusbar.bg.insert = darkgreen -statusbar.fg.command = ${statusbar.fg} -statusbar.bg.command = ${statusbar.bg} -statusbar.fg.caret = ${statusbar.fg} -statusbar.bg.caret = purple -statusbar.fg.caret-selection = ${statusbar.fg} -statusbar.bg.caret-selection = #a12dff -statusbar.progress.bg = white -statusbar.url.fg = ${statusbar.fg} -statusbar.url.fg.success = white -statusbar.url.fg.success.https = lime -statusbar.url.fg.error = orange -statusbar.url.fg.warn = yellow -statusbar.url.fg.hover = aqua -tabs.fg.odd = white -tabs.bg.odd = grey -tabs.fg.even = white -tabs.bg.even = darkgrey -tabs.fg.selected.odd = white -tabs.bg.selected.odd = black -tabs.fg.selected.even = ${tabs.fg.selected.odd} -tabs.bg.selected.even = ${tabs.bg.selected.odd} -tabs.bg.bar = #555555 -tabs.indicator.start = #0000aa -tabs.indicator.stop = #00aa00 -tabs.indicator.error = #ff0000 -tabs.indicator.system = rgb -hints.fg = black -hints.bg = -webkit-gradient(linear, left top, left bottom, color-stop(0%,#FFF785), color-stop(100%,#FFC542)) -hints.fg.match = green -downloads.bg.bar = black -downloads.fg.start = white -downloads.bg.start = #0000aa -downloads.fg.stop = ${downloads.fg.start} -downloads.bg.stop = #00aa00 -downloads.fg.system = rgb -downloads.bg.system = rgb -downloads.fg.error = white -downloads.bg.error = red -webpage.bg = white - -[fonts] -# Fonts used for the UI, with optional style/weight/size. -# * Style: `normal`/`italic`/`oblique` -# * Weight: `normal`, `bold`, `100`..`900` -# * Size: _number_ `px`/`pt` -# -# _monospace (Font): -# Default monospace fonts. -# Default: Terminus, Monospace, "DejaVu Sans Mono", Monaco, -# "Bitstream Vera Sans Mono", "Andale Mono", "Courier New", Courier, -# "Liberation Mono", monospace, Fixed, Consolas, Terminal -# -# completion (Font): -# Font used in the completion widget. -# Default: 8pt ${_monospace} -# -# tabbar (QtFont): -# Font used in the tab bar. -# Default: 8pt ${_monospace} -# -# statusbar (Font): -# Font used in the statusbar. -# Default: 8pt ${_monospace} -# -# downloads (Font): -# Font used for the downloadbar. -# Default: 8pt ${_monospace} -# -# hints (Font): -# Font used for the hints. -# Default: bold 13px Monospace -# -# debug-console (QtFont): -# Font used for the debugging console. -# Default: 8pt ${_monospace} -# -# web-family-standard (FontFamily): -# Font family for standard fonts. -# Default: -# -# web-family-fixed (FontFamily): -# Font family for fixed fonts. -# Default: -# -# web-family-serif (FontFamily): -# Font family for serif fonts. -# Default: -# -# web-family-sans-serif (FontFamily): -# Font family for sans-serif fonts. -# Default: -# -# web-family-cursive (FontFamily): -# Font family for cursive fonts. -# Default: -# -# web-family-fantasy (FontFamily): -# Font family for fantasy fonts. -# Default: -# -# web-size-minimum (Int): -# The hard minimum font size. -# Default: -# -# web-size-minimum-logical (Int): -# The minimum logical font size that is applied when zooming out. -# Default: -# -# web-size-default (Int): -# The default font size for regular text. -# Default: -# -# web-size-default-fixed (Int): -# The default font size for fixed-pitch text. -# Default: -_monospace = Terminus, Monospace, "DejaVu Sans Mono", Monaco, "Bitstream Vera Sans Mono", "Andale Mono", "Liberation Mono", "Courier New", Courier, monospace, Fixed, Consolas, Terminal -completion = 8pt ${_monospace} -tabbar = 8pt ${_monospace} -statusbar = 8pt ${_monospace} -downloads = 8pt ${_monospace} -hints = bold 13px Monospace -debug-console = 8pt ${_monospace} -web-family-standard = -web-family-fixed = -web-family-serif = -web-family-sans-serif = -web-family-cursive = -web-family-fantasy = -web-size-minimum = -web-size-minimum-logical = -web-size-default = -web-size-default-fixed = diff --git a/qutebrowser/userscripts/bookmarks-dmenu b/qutebrowser/userscripts/bookmarks-dmenu deleted file mode 100755 index 0f89413..0000000 --- a/qutebrowser/userscripts/bookmarks-dmenu +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -url=$(cat ~/.config/qutebrowser/bookmarks/urls | dmenu -i -l 15 | awk '{print $1}') - -[ -z ${url} ] && exit - -echo "open $url" >> "$QUTE_FIFO" diff --git a/qutebrowser/userscripts/quickmarks-dmenu b/qutebrowser/userscripts/quickmarks-dmenu deleted file mode 100755 index 354b398..0000000 --- a/qutebrowser/userscripts/quickmarks-dmenu +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -url=$(cat ~/.config/qutebrowser/quickmarks | dmenu -i -l 15 | awk '{print $NF}') - -[ -z ${url} ] && exit - -echo "open $url" >> "$QUTE_FIFO" diff --git a/qutebrowser/userscripts/url-from-surfraw b/qutebrowser/userscripts/url-from-surfraw deleted file mode 100755 index 9bd6795..0000000 --- a/qutebrowser/userscripts/url-from-surfraw +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash - -DEFAULT_SEARCH=startpage - -if [[ $1 =~ ^-.$ ]]; then - option="$1" - shift 1 -fi - -is_elvi=$(surfraw -elvi | grep -c "^$1\s") -nbr_words=$(echo $1 | wc -w) - -if [[ $is_elvi -eq 0 && $nbr_words -eq 1 && ($1 == *.* || $1 == *:*) ]]; then - url="$1" -else - [[ $is_elvi -eq 0 ]] && sr="$DEFAULT_SEARCH $*" || sr=$* - url=$(surfraw -print $sr) -fi - -echo "open $option $url" >> $QUTE_FIFO diff --git a/surfraw.bookmarks b/surfraw.bookmarks deleted file mode 100644 index c18b3d7..0000000 --- a/surfraw.bookmarks +++ /dev/null @@ -1 +0,0 @@ -startpage https://startpage.com/do/search?hmb=1&cat=web&cmd=process_search&language=english_uk&engine0=v1all&query=%s&abp=-1&nj=0&pg=0 diff --git a/surfraw/.surfraw.bookmarks b/surfraw/.surfraw.bookmarks new file mode 100644 index 0000000..c18b3d7 --- /dev/null +++ b/surfraw/.surfraw.bookmarks @@ -0,0 +1 @@ +startpage https://startpage.com/do/search?hmb=1&cat=web&cmd=process_search&language=english_uk&engine0=v1all&query=%s&abp=-1&nj=0&pg=0 diff --git a/tmux.conf b/tmux.conf deleted file mode 100644 index bb603a9..0000000 --- a/tmux.conf +++ /dev/null @@ -1,25 +0,0 @@ -set -g default-terminal xterm-256color -set -g status on -set -g mouse 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 - -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 diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf new file mode 100644 index 0000000..bb603a9 --- /dev/null +++ b/tmux/.tmux.conf @@ -0,0 +1,25 @@ +set -g default-terminal xterm-256color +set -g status on +set -g mouse 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 + +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 diff --git a/urxvt/.urxvt/ext/resize b/urxvt/.urxvt/ext/resize new file mode 100644 index 0000000..f3b34fb --- /dev/null +++ b/urxvt/.urxvt/ext/resize @@ -0,0 +1,155 @@ +# vim:ft=perl:fenc=utf-8 +# Copyright (c) 2009-, Simon Lundström +# Copyright (c) 2014 Maarten de Vries +# +# Permission to use, copy, modify, and/or distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +# Usage: +# Set your font in ~/.Xresources: +# urxvt.font: xft:Inconsolata:pixelsize=12 +# to set it with pixels or +# urxvt.font: xft:Inconsolata:size=12 +# to set it with points. + +# And re-bind some keymappings (if you want, below are the defaults): +# URxvt.resize-font.smaller: C-minus +# URxvt.resize-font.bigger: C-plus +# URxvt.resize-font.reset: C-equal +# URxvt.resize-font.show: C-question +# + +my @fonts = ( + {'name' => 'font', 'code' => 710}, + {'name' => 'boldFont', 'code' => 711}, + {'name' => 'italicFont', 'code' => 712}, + {'name' => 'boldItalicFont', 'code' => 713}, +); + +my @fixed = qw(4x6 5x7 5x8 6x9 6x10 6x12 6x13 7x13 7x14 8x13 8x16 9x15 9x18 10x20 12x24); + +sub on_start { + my ($self) = @_; + + foreach (@fonts) { + $_->{'default'} = $self->resource($_->{'name'}); + } +} + +sub on_init { + my ($self) = @_; + my $commands = { + "smaller" => "C-minus", + "bigger" => "C-plus", + "reset" => "C-equal", + "show" => "C-question", + }; + bind_hotkeys($self, $commands); + + () +} + +sub bind_hotkeys { + my ($self, $commands) = @_; + for (keys %$commands) { + my $hotkey = $self->x_resource("resize-font.$_") || $$commands{$_}; + + $self->parse_keysym($hotkey, "perl:resize-font:$_") or + warn "unable to register '$hotkey' as hotkey for $_\n"; + } +} + +sub on_user_command { + my ($self, $string) = @_; + my $regex = qr"(?!pixelsize=)(\d+)"; + + if ($string =~ /bigger$/) { + foreach (@fonts) { + next if not defined($_->{'default'}); + update_font_size($self, $_, +2); + } + } + elsif ($string =~ /smaller$/) { + foreach (@fonts) { + next if not defined($_->{'default'}); + update_font_size($self, $_, -2); + } + } + elsif ($string =~ /reset$/) { + foreach (@fonts) { + next if not defined($_->{'default'}); + set_font($self, $_, $_->{'default'}); + } + } + elsif ($string =~ /show$/) { + + my $term = $self->{'term'}; + $term->{'resize-font'}{'overlay'} = { + ov => $term->overlay_simple(0, -1, format_font_info($self)), + to => urxvt::timer + ->new + ->start(urxvt::NOW + 1) + ->cb(sub { + delete $term->{'resize-font'}{'overlay'}; + }), + }; + } + + () +} + +sub get_font { + my ($self, $name) = @_; + return $self->resource($name); +} + +sub set_font { + my ($self, $font, $new) = @_; + $self->cmd_parse(sprintf("\33]%d;%s\007", $font->{'code'}, $new)); +} + +sub update_font_size { + my ($self, $font, $delta) = @_; + my $regex = qr"(?<=size=)(\d+)"; + my $current = get_font($self, $font->{'name'}); + + my ($index) = grep { $fixed[$_] eq $current } 0..$#fixed; + if ($index or $index eq 0) { + my $inc = $delta / abs($delta); + $index += $inc; + if ($index < 0) { $index = 0; } + if ($index > $#fixed) { $index = $#fixed; } + $current = $fixed[$index]; + } + else { + $current =~ s/$regex/$1+$delta/e; + } + set_font($self, $font, $current); +} + +sub format_font_info { + my ($self) = @_; + + my $width = 0; + foreach (@fonts) { + my $length = length($_->{'name'}); + $width = $length > $width ? $length : $width; + } + ++$width; + + my $info = ''; + foreach (@fonts) { + $info .= sprintf("%-${width}s %s\n", $_->{'name'} . ':', get_font($self, $_->{'name'})); + } + + return $info; +} diff --git a/vifm/.vifm/.gitignore b/vifm/.vifm/.gitignore new file mode 100644 index 0000000..8c6b1ef --- /dev/null +++ b/vifm/.vifm/.gitignore @@ -0,0 +1,3 @@ +Trash +vifminfo* +vimfiles diff --git a/vifm/.vifm/colors/default.vifm b/vifm/.vifm/colors/default.vifm new file mode 100644 index 0000000..c3c72dd --- /dev/null +++ b/vifm/.vifm/colors/default.vifm @@ -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/.vifm/colors/matrix.vifm b/vifm/.vifm/colors/matrix.vifm new file mode 100644 index 0000000..70a9f76 --- /dev/null +++ b/vifm/.vifm/colors/matrix.vifm @@ -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/.vifm/colors/solarized.vifm b/vifm/.vifm/colors/solarized.vifm new file mode 100644 index 0000000..a792bd9 --- /dev/null +++ b/vifm/.vifm/colors/solarized.vifm @@ -0,0 +1,45 @@ +" VIFM COLORS +" solarized dark +" based on: https://github.com/istib/dotfiles/blob/master/vifm/vifm-colors + +" 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 + +" STYLES +" bold +" underline +" reverse or inverse +" standout +" none + + +highlight clear + +highlight Win cterm=none ctermfg=default ctermbg=none + +highlight TopLine cterm=none ctermfg=blue ctermbg=none +highlight TopLineSel cterm=none ctermfg=blue ctermbg=none +highlight StatusLine cterm=none ctermfg=blue ctermbg=none +highlight Border cterm=none ctermfg=blue ctermbg=none + +highlight Selected cterm=bold ctermfg=magenta ctermbg=default +highlight CurrLine cterm=bold ctermfg=default ctermbg=blue + +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=cyan ctermbg=default +highlight Link cterm=none ctermfg=yellow ctermbg=default +highlight BrokenLink cterm=none ctermfg=red ctermbg=default +highlight Socket cterm=none ctermfg=magenta ctermbg=default +highlight Device cterm=none ctermfg=red ctermbg=default +highlight Fifo cterm=none ctermfg=cyan ctermbg=default +highlight Executable cterm=none ctermfg=green ctermbg=default diff --git a/vifm/.vifm/colorschemes b/vifm/.vifm/colorschemes new file mode 100644 index 0000000..006bb44 --- /dev/null +++ b/vifm/.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/scripts/README b/vifm/.vifm/scripts/README new file mode 100644 index 0000000..8165c2f --- /dev/null +++ b/vifm/.vifm/scripts/README @@ -0,0 +1,6 @@ +This directory is dedicated for user-supplied scripts/executables. +vifm modifies its PATH environment variable to let user run those +scripts without specifying full path. All subdirectories are added +as well. File in a subdirectory overrules file with the same name +in parent directories. Restart might be needed to recognize files +in newly created or renamed subdirectories. diff --git a/vifm/.vifm/vifm-help.txt b/vifm/.vifm/vifm-help.txt new file mode 100644 index 0000000..2b6bbba --- /dev/null +++ b/vifm/.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/.vifm/vifmrc b/vifm/.vifm/vifmrc new file mode 100644 index 0000000..8a301db --- /dev/null +++ b/vifm/.vifm/vifmrc @@ -0,0 +1,440 @@ +" vim: filetype=vifm : +" Sample configuration file for vifm (last updated: 26 Sep, 2015) +" 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 as 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 + +" Automatically resolve symbolic links on l or Enter. + +set nofollowlinks + +" With this option turned on you can run partially entered commands with +" unambiguous beginning using :! (e.g. :!Te instead of :!Terminal or :!Te). + +set fastrun + +" Natural sort of (version) numbers within text. + +set sortnumbers + +" 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 KB, MB, ... + +set noiec + +" Selected color scheme + +colorscheme solarized.vifm + +" 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: +" TIME_STAMP_FORMAT=%m/%d-%H:%M +" See man date or man strftime for details. + +set timefmt=%m/%d\ %H:%M + +" Show list of matches on tab completion in command-line mode + +set wildmenu + +" Ignore case in search patterns unless it contains at least one uppercase +" letter + +set ignorecase +set smartcase + +" Don't highlight search results automatically + +set nohlsearch + +" Use increment searching (search while typing) +set incsearch + +" Try to leave some space from cursor to upper/lower border in lists + +set scrolloff=4 + +" Don't do too many requests to slow file systems + +if !has('win') + set slowfs=curlftpfs +endif + +" Set custom status line look + +set statusline=" %t%= %A %10u:%-7g %15s %20d " + +" ------------------------------------------------------------------------------ + +" :mark mark /full/directory/path [filename] + +mark b ~/bin/ +mark h ~/ + +" ------------------------------------------------------------------------------ + +" :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 + +command! df df -h %m 2> /dev/null +command! diff vim -d %f %F +command! zip zip -r %f.zip %f +command! run !! ./%f +command! make !!make %a +command! mkcd :mkdir %a | cd %a +command! vgrep vim "+grep %a" +command! reload :write | restart +command link ln -s -r %d/%f %D + +" ------------------------------------------------------------------------------ + +" 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 :file[x]type +" 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. + +" Pdf +filextype *.pdf zathura %c %i &, apvlv %c, xpdf %c +fileviewer *.pdf pdftotext -nopgbrk %c - + +" PostScript +filextype *.ps,*.eps,*.ps.gz + \ {View in zathura} + \ zathura %f, + \ {View in gv} + \ gv %c %i &, + +" Djvu +filextype *.djvu + \ {View in zathura} + \ zathura %f, + \ {View in apvlv} + \ apvlv %f, + +" Audio +filetype *.wav,*.mp3,*.flac,*.ogg,*.m4a,*.wma,*.ape,*.ac3 + \ mpv %f, + \ {Play using ffplay} + \ ffplay -nodisp %c, + \ {Play using MPlayer} + \ mplayer %f, + \ ffplay %c, +fileviewer *.mp3 mp3info +fileviewer *.flac soxi + +" Video +filextype *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.vob,*.flv,*.m2v,*.mov,*.webm,*.ts,*.m4v + \ {View using vlc} + \ vlc %c, + \ {View using ffplay} + \ ffplay -fs %c, + \ {View using Dragon} + \ dragon %f, + \ {View using mplayer} + \ mplayer %f, +fileviewer *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.vob,*.flv,*.m2v,*.mov,*.webm,*.ts,*.m4v + \ ffprobe -pretty %c 2>&1 + +" Web +filextype *.html,*.htm + \ {Open with uzbl} + \ qutebrowser %f %i &, + \ {Open with dwb} + \ dwb %f %i &, + \ {Open with firefox} + \ firefox %f &, +filetype *.html,*.htm links, lynx + +" Object +filetype *.o nm %f | less + +" Man page +filetype *.[1-8] man ./%c +fileviewer *.[1-8] man ./%c | col -b + +" Image +filextype *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm + \ {View in feh} + \ feh %d --scale-down --start-at %d/%c 2>/dev/null &, + \ {View in sxiv} + \ sxiv, + \ {View in gpicview} + \ gpicview %c, + \ {View in shotwell} + \ shotwell, +fileviewer *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm convert -identify %f -verbose /dev/null + +" MD5 +filetype *.md5 + \ {Check MD5 hash sum} + \ md5sum -c %f, + +" GPG signature +filetype *.asc + \ {Check signature} + \ !!gpg --verify %c, + +" GMSH file +filetype *.geo, *.msh, *.pos + \ {Open in gmsh} + \ gmsh %d, + +" Torrent +filetype *.torrent ktorrent %f & +fileviewer *.torrent dumptorrent -v %c + +" FuseZipMount +filetype *.zip,*.jar,*.war,*.ear,*.oxt + \ {Mount with fuse-zip} + \ FUSE_MOUNT|fuse-zip %SOURCE_FILE %DESTINATION_DIR, + \ {View contents} + \ zip -sf %c | less, + \ {Extract here} + \ tar -xf %c, +fileviewer *.zip,*.jar,*.war,*.ear,*.oxt zip -sf %c + +" ArchiveMount +filetype *.tar,*.tar.bz2,*.tbz2,*.tgz,*.tar.gz,*.tar.xz,*.txz + \ {Mount with archivemount} + \ FUSE_MOUNT|archivemount %SOURCE_FILE %DESTINATION_DIR, +fileviewer *.tgz,*.tar.gz tar -tzf %c +fileviewer *.tar.bz2,*.tbz2 tar -tjf %c +fileviewer *.tar.txz,*.txz xz --list %c + +" Rar2FsMount and rar archives +filetype *.rar + \ {Mount with rar2fs} + \ FUSE_MOUNT|rar2fs %SOURCE_FILE %DESTINATION_DIR, +fileviewer *.rar unrar v %c + +" IsoMount +filetype *.iso + \ {Mount with fuseiso} + \ FUSE_MOUNT|fuseiso %SOURCE_FILE %DESTINATION_DIR, + +" SshMount +filetype *.ssh + \ {Mount with sshfs} + \ FUSE_MOUNT2|sshfs %PARAM %DESTINATION_DIR, + +" FtpMount +filetype *.ftp + \ {Mount with curlftpfs} + \ FUSE_MOUNT2|curlftpfs -o ftp_port=-,,disable_eprt %PARAM %DESTINATION_DIR, + +" Fuse7z and 7z archives +filetype *.7z + \ {Mount with fuse-7z} + \ FUSE_MOUNT|fuse-7z %SOURCE_FILE %DESTINATION_DIR, +fileviewer *.7z 7z l %c + +" Office files +filextype *.odt,*.doc,*.docx,*.xls,*.xlsx,*.odp,*.pptx libreoffice %f & +fileviewer *.doc catdoc %c +fileviewer *.docx, docx2txt.pl %f - + +" TuDu files +filetype *.tudu tudu -f %c + +" Qt projects +filextype *.pro qtcreator %f & + +" Directories +filextype */ + \ {View in thunar} + \ Thunar %f &, + +" Syntax highlighting in preview +" +" Explicitly set highlight type for some extensions +" +" 256-color terminal +" fileviewer *.[ch],*.[ch]pp highlight -O xterm256 -s dante --syntax c %c +" fileviewer Makefile,Makefile.* highlight -O xterm256 -s dante --syntax make %c +" +" 16-color terminal +" fileviewer *.c,*.h highlight -O ansi -s dante %c +" +" Or leave it for automatic detection +" +" fileviewer *[^/] pygmentize -O style=monokai -f console256 -g + +" Displaying pictures in terminal +" +" fileviewer *.jpg,*.png shellpic %c + +" Open all other files with default system programs (you can also remove all +" :file[x]type commands above to ensure they don't interfere with system-wide +" settings). By default all unknown files are opened with 'vi[x]cmd' +" uncommenting one of lines below will result in ignoring 'vi[x]cmd' option +" for unknown file types. +" For *nix: +" filetype * xdg-open +" For OS X: +" filetype * open +" For Windows: +" filetype * start, explorer + +" ------------------------------------------------------------------------------ + +" What should be saved automatically between vifm runs +" Like in previous versions of vifm +" set vifminfo=options,filetypes,commands,bookmarks,dhistory,state,cs +" Like in vi +set vifminfo=dhistory,savedirs,chistory,state,tui,shistory, + \phistory,fhistory,dirstack,registers,bookmarks,bmarks + +" ------------------------------------------------------------------------------ + +" Examples of configuring both panels + +" Customize view columns a bit (enable ellipsis for truncated file names) +" +" windo set viewcolumns=-{name}..,6{}. + +" Filter-out build and temporary files +" +" windo filter! /^.*\.(lo|o|d|class|py[co])$|.*~$/ + +" ------------------------------------------------------------------------------ + +" Sample mappings + +" Start shell in current directory +nnoremap s :shell + +" Display sorting dialog +nnoremap S :sort + +" Toggle visibility of preview window +nnoremap w :view +vnoremap w :viewgv + +" Open file in existing instance of gvim +nnoremap o :!gvim --remote-tab-silent %f +" Open file in new instance of gvim +nnoremap O :!gvim %f + +" Open file in the background using its default program +nnoremap gb :file &l + +" Yank current directory path into the clipboard +nnoremap yd :!echo %d | xclip %i + +" Yank current file path into the clipboard +nnoremap yf :!echo %c:p | xclip %i + +" Mappings for faster renaming +nnoremap I cw +nnoremap cc cw +nnoremap A cw + +" Open console in current directory +nnoremap ,t :!xterm & + +" Open vim to edit vifmrc and apply settings after returning to vifm +nnoremap ,c :write | execute ':!vim $MYVIFMRC' | restart +" Open gvim to edit vifmrc +nnoremap ,C :!gvim --remote-tab-silent $MYVIFMRC & + +" Toggle wrap setting on ,w key +nnoremap ,w :set wrap! + +" Example of standard two-panel file managers mappings +nnoremap :!less %f +nnoremap :edit +nnoremap :copy +nnoremap :move +nnoremap :mkdir +nnoremap :delete + +" ------------------------------------------------------------------------------ + +" Various customization examples + +" Use ag (the silver searcher) instead of grep +" +" set grepprg=ag\ --line-numbers\ %i\ %a\ %s + +" Add additional place to look for executables +" +" let $PATH=$HOME.'/bin/fuse:'.$PATH + +" Block particular shortcut +" +" nnoremap + +" My settings +set relativenumber diff --git a/vifm/colors/default.vifm b/vifm/colors/default.vifm deleted file mode 100644 index c3c72dd..0000000 --- a/vifm/colors/default.vifm +++ /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.vifm b/vifm/colors/matrix.vifm deleted file mode 100644 index 70a9f76..0000000 --- a/vifm/colors/matrix.vifm +++ /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/colors/solarized.vifm b/vifm/colors/solarized.vifm deleted file mode 100644 index a792bd9..0000000 --- a/vifm/colors/solarized.vifm +++ /dev/null @@ -1,45 +0,0 @@ -" VIFM COLORS -" solarized dark -" based on: https://github.com/istib/dotfiles/blob/master/vifm/vifm-colors - -" 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 - -" STYLES -" bold -" underline -" reverse or inverse -" standout -" none - - -highlight clear - -highlight Win cterm=none ctermfg=default ctermbg=none - -highlight TopLine cterm=none ctermfg=blue ctermbg=none -highlight TopLineSel cterm=none ctermfg=blue ctermbg=none -highlight StatusLine cterm=none ctermfg=blue ctermbg=none -highlight Border cterm=none ctermfg=blue ctermbg=none - -highlight Selected cterm=bold ctermfg=magenta ctermbg=default -highlight CurrLine cterm=bold ctermfg=default ctermbg=blue - -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=cyan ctermbg=default -highlight Link cterm=none ctermfg=yellow ctermbg=default -highlight BrokenLink cterm=none ctermfg=red ctermbg=default -highlight Socket cterm=none ctermfg=magenta ctermbg=default -highlight Device cterm=none ctermfg=red ctermbg=default -highlight Fifo cterm=none ctermfg=cyan 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/scripts/README b/vifm/scripts/README deleted file mode 100644 index 8165c2f..0000000 --- a/vifm/scripts/README +++ /dev/null @@ -1,6 +0,0 @@ -This directory is dedicated for user-supplied scripts/executables. -vifm modifies its PATH environment variable to let user run those -scripts without specifying full path. All subdirectories are added -as well. File in a subdirectory overrules file with the same name -in parent directories. Restart might be needed to recognize files -in newly created or renamed subdirectories. 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 8a301db..0000000 --- a/vifm/vifmrc +++ /dev/null @@ -1,440 +0,0 @@ -" vim: filetype=vifm : -" Sample configuration file for vifm (last updated: 26 Sep, 2015) -" 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 as 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 - -" Automatically resolve symbolic links on l or Enter. - -set nofollowlinks - -" With this option turned on you can run partially entered commands with -" unambiguous beginning using :! (e.g. :!Te instead of :!Terminal or :!Te). - -set fastrun - -" Natural sort of (version) numbers within text. - -set sortnumbers - -" 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 KB, MB, ... - -set noiec - -" Selected color scheme - -colorscheme solarized.vifm - -" 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: -" TIME_STAMP_FORMAT=%m/%d-%H:%M -" See man date or man strftime for details. - -set timefmt=%m/%d\ %H:%M - -" Show list of matches on tab completion in command-line mode - -set wildmenu - -" Ignore case in search patterns unless it contains at least one uppercase -" letter - -set ignorecase -set smartcase - -" Don't highlight search results automatically - -set nohlsearch - -" Use increment searching (search while typing) -set incsearch - -" Try to leave some space from cursor to upper/lower border in lists - -set scrolloff=4 - -" Don't do too many requests to slow file systems - -if !has('win') - set slowfs=curlftpfs -endif - -" Set custom status line look - -set statusline=" %t%= %A %10u:%-7g %15s %20d " - -" ------------------------------------------------------------------------------ - -" :mark mark /full/directory/path [filename] - -mark b ~/bin/ -mark h ~/ - -" ------------------------------------------------------------------------------ - -" :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 - -command! df df -h %m 2> /dev/null -command! diff vim -d %f %F -command! zip zip -r %f.zip %f -command! run !! ./%f -command! make !!make %a -command! mkcd :mkdir %a | cd %a -command! vgrep vim "+grep %a" -command! reload :write | restart -command link ln -s -r %d/%f %D - -" ------------------------------------------------------------------------------ - -" 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 :file[x]type -" 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. - -" Pdf -filextype *.pdf zathura %c %i &, apvlv %c, xpdf %c -fileviewer *.pdf pdftotext -nopgbrk %c - - -" PostScript -filextype *.ps,*.eps,*.ps.gz - \ {View in zathura} - \ zathura %f, - \ {View in gv} - \ gv %c %i &, - -" Djvu -filextype *.djvu - \ {View in zathura} - \ zathura %f, - \ {View in apvlv} - \ apvlv %f, - -" Audio -filetype *.wav,*.mp3,*.flac,*.ogg,*.m4a,*.wma,*.ape,*.ac3 - \ mpv %f, - \ {Play using ffplay} - \ ffplay -nodisp %c, - \ {Play using MPlayer} - \ mplayer %f, - \ ffplay %c, -fileviewer *.mp3 mp3info -fileviewer *.flac soxi - -" Video -filextype *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.vob,*.flv,*.m2v,*.mov,*.webm,*.ts,*.m4v - \ {View using vlc} - \ vlc %c, - \ {View using ffplay} - \ ffplay -fs %c, - \ {View using Dragon} - \ dragon %f, - \ {View using mplayer} - \ mplayer %f, -fileviewer *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.vob,*.flv,*.m2v,*.mov,*.webm,*.ts,*.m4v - \ ffprobe -pretty %c 2>&1 - -" Web -filextype *.html,*.htm - \ {Open with uzbl} - \ qutebrowser %f %i &, - \ {Open with dwb} - \ dwb %f %i &, - \ {Open with firefox} - \ firefox %f &, -filetype *.html,*.htm links, lynx - -" Object -filetype *.o nm %f | less - -" Man page -filetype *.[1-8] man ./%c -fileviewer *.[1-8] man ./%c | col -b - -" Image -filextype *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm - \ {View in feh} - \ feh %d --scale-down --start-at %d/%c 2>/dev/null &, - \ {View in sxiv} - \ sxiv, - \ {View in gpicview} - \ gpicview %c, - \ {View in shotwell} - \ shotwell, -fileviewer *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm convert -identify %f -verbose /dev/null - -" MD5 -filetype *.md5 - \ {Check MD5 hash sum} - \ md5sum -c %f, - -" GPG signature -filetype *.asc - \ {Check signature} - \ !!gpg --verify %c, - -" GMSH file -filetype *.geo, *.msh, *.pos - \ {Open in gmsh} - \ gmsh %d, - -" Torrent -filetype *.torrent ktorrent %f & -fileviewer *.torrent dumptorrent -v %c - -" FuseZipMount -filetype *.zip,*.jar,*.war,*.ear,*.oxt - \ {Mount with fuse-zip} - \ FUSE_MOUNT|fuse-zip %SOURCE_FILE %DESTINATION_DIR, - \ {View contents} - \ zip -sf %c | less, - \ {Extract here} - \ tar -xf %c, -fileviewer *.zip,*.jar,*.war,*.ear,*.oxt zip -sf %c - -" ArchiveMount -filetype *.tar,*.tar.bz2,*.tbz2,*.tgz,*.tar.gz,*.tar.xz,*.txz - \ {Mount with archivemount} - \ FUSE_MOUNT|archivemount %SOURCE_FILE %DESTINATION_DIR, -fileviewer *.tgz,*.tar.gz tar -tzf %c -fileviewer *.tar.bz2,*.tbz2 tar -tjf %c -fileviewer *.tar.txz,*.txz xz --list %c - -" Rar2FsMount and rar archives -filetype *.rar - \ {Mount with rar2fs} - \ FUSE_MOUNT|rar2fs %SOURCE_FILE %DESTINATION_DIR, -fileviewer *.rar unrar v %c - -" IsoMount -filetype *.iso - \ {Mount with fuseiso} - \ FUSE_MOUNT|fuseiso %SOURCE_FILE %DESTINATION_DIR, - -" SshMount -filetype *.ssh - \ {Mount with sshfs} - \ FUSE_MOUNT2|sshfs %PARAM %DESTINATION_DIR, - -" FtpMount -filetype *.ftp - \ {Mount with curlftpfs} - \ FUSE_MOUNT2|curlftpfs -o ftp_port=-,,disable_eprt %PARAM %DESTINATION_DIR, - -" Fuse7z and 7z archives -filetype *.7z - \ {Mount with fuse-7z} - \ FUSE_MOUNT|fuse-7z %SOURCE_FILE %DESTINATION_DIR, -fileviewer *.7z 7z l %c - -" Office files -filextype *.odt,*.doc,*.docx,*.xls,*.xlsx,*.odp,*.pptx libreoffice %f & -fileviewer *.doc catdoc %c -fileviewer *.docx, docx2txt.pl %f - - -" TuDu files -filetype *.tudu tudu -f %c - -" Qt projects -filextype *.pro qtcreator %f & - -" Directories -filextype */ - \ {View in thunar} - \ Thunar %f &, - -" Syntax highlighting in preview -" -" Explicitly set highlight type for some extensions -" -" 256-color terminal -" fileviewer *.[ch],*.[ch]pp highlight -O xterm256 -s dante --syntax c %c -" fileviewer Makefile,Makefile.* highlight -O xterm256 -s dante --syntax make %c -" -" 16-color terminal -" fileviewer *.c,*.h highlight -O ansi -s dante %c -" -" Or leave it for automatic detection -" -" fileviewer *[^/] pygmentize -O style=monokai -f console256 -g - -" Displaying pictures in terminal -" -" fileviewer *.jpg,*.png shellpic %c - -" Open all other files with default system programs (you can also remove all -" :file[x]type commands above to ensure they don't interfere with system-wide -" settings). By default all unknown files are opened with 'vi[x]cmd' -" uncommenting one of lines below will result in ignoring 'vi[x]cmd' option -" for unknown file types. -" For *nix: -" filetype * xdg-open -" For OS X: -" filetype * open -" For Windows: -" filetype * start, explorer - -" ------------------------------------------------------------------------------ - -" What should be saved automatically between vifm runs -" Like in previous versions of vifm -" set vifminfo=options,filetypes,commands,bookmarks,dhistory,state,cs -" Like in vi -set vifminfo=dhistory,savedirs,chistory,state,tui,shistory, - \phistory,fhistory,dirstack,registers,bookmarks,bmarks - -" ------------------------------------------------------------------------------ - -" Examples of configuring both panels - -" Customize view columns a bit (enable ellipsis for truncated file names) -" -" windo set viewcolumns=-{name}..,6{}. - -" Filter-out build and temporary files -" -" windo filter! /^.*\.(lo|o|d|class|py[co])$|.*~$/ - -" ------------------------------------------------------------------------------ - -" Sample mappings - -" Start shell in current directory -nnoremap s :shell - -" Display sorting dialog -nnoremap S :sort - -" Toggle visibility of preview window -nnoremap w :view -vnoremap w :viewgv - -" Open file in existing instance of gvim -nnoremap o :!gvim --remote-tab-silent %f -" Open file in new instance of gvim -nnoremap O :!gvim %f - -" Open file in the background using its default program -nnoremap gb :file &l - -" Yank current directory path into the clipboard -nnoremap yd :!echo %d | xclip %i - -" Yank current file path into the clipboard -nnoremap yf :!echo %c:p | xclip %i - -" Mappings for faster renaming -nnoremap I cw -nnoremap cc cw -nnoremap A cw - -" Open console in current directory -nnoremap ,t :!xterm & - -" Open vim to edit vifmrc and apply settings after returning to vifm -nnoremap ,c :write | execute ':!vim $MYVIFMRC' | restart -" Open gvim to edit vifmrc -nnoremap ,C :!gvim --remote-tab-silent $MYVIFMRC & - -" Toggle wrap setting on ,w key -nnoremap ,w :set wrap! - -" Example of standard two-panel file managers mappings -nnoremap :!less %f -nnoremap :edit -nnoremap :copy -nnoremap :move -nnoremap :mkdir -nnoremap :delete - -" ------------------------------------------------------------------------------ - -" Various customization examples - -" Use ag (the silver searcher) instead of grep -" -" set grepprg=ag\ --line-numbers\ %i\ %a\ %s - -" Add additional place to look for executables -" -" let $PATH=$HOME.'/bin/fuse:'.$PATH - -" Block particular shortcut -" -" nnoremap - -" My settings -set relativenumber diff --git a/vim/.config/nvim b/vim/.config/nvim new file mode 120000 index 0000000..815cbcc --- /dev/null +++ b/vim/.config/nvim @@ -0,0 +1 @@ +../.vim \ No newline at end of file diff --git a/vim/.init.vim-rplugin~ b/vim/.init.vim-rplugin~ deleted file mode 100644 index 98ed46e..0000000 --- a/vim/.init.vim-rplugin~ +++ /dev/null @@ -1,9 +0,0 @@ -" python3 plugins -call remote#host#RegisterPlugin('python3', '/home/urbain/.vim/plugged/deoplete.nvim/rplugin/python3/deoplete.py', [ - \ {'sync': 1, 'name': '_deoplete', 'opts': {}, 'type': 'function'}, - \ ]) - - -" python plugins - - diff --git a/vim/.vim/.gitignore b/vim/.vim/.gitignore new file mode 100644 index 0000000..ea8b046 --- /dev/null +++ b/vim/.vim/.gitignore @@ -0,0 +1,4 @@ +.netrwhist +plugged +vim-plug +vimundo/* diff --git a/vim/.vim/.init.vim-rplugin~ b/vim/.vim/.init.vim-rplugin~ new file mode 100644 index 0000000..e1137d2 --- /dev/null +++ b/vim/.vim/.init.vim-rplugin~ @@ -0,0 +1,12 @@ +" python3 plugins +call remote#host#RegisterPlugin('python3', '/home/urbain/.vim/plugged/deoplete.nvim/rplugin/python3/deoplete', [ + \ {'sync': 1, 'name': '_deoplete', 'type': 'function', 'opts': {}}, + \ ]) + + +" ruby plugins + + +" python plugins + + diff --git a/vim/.vim/after/ftplugin/freefem/folding.vim b/vim/.vim/after/ftplugin/freefem/folding.vim new file mode 100644 index 0000000..7d2f6fd --- /dev/null +++ b/vim/.vim/after/ftplugin/freefem/folding.vim @@ -0,0 +1,20 @@ +function! FreeFemFolds() + let thisline = getline(v:lnum) + if match(thisline,'^/// ') >= 0 + return ">1" + else + return "=" + endif +endfunction + +function! FreeFemFoldText() + let startline = getline(v:foldstart) + if match(startline,'^/// ') >= 0 + let title = substitute(startline,'^/// \(.*\)$','\1',"") + return '# ' . title + endif +endfunction + +setlocal foldmethod=expr +setlocal foldexpr=FreeFemFolds() +setlocal foldtext=FreeFemFoldText() diff --git a/vim/.vim/after/ftplugin/tex/mappings.vim b/vim/.vim/after/ftplugin/tex/mappings.vim new file mode 100644 index 0000000..1c4625d --- /dev/null +++ b/vim/.vim/after/ftplugin/tex/mappings.vim @@ -0,0 +1,38 @@ +iabbrev (( \left( +iabbrev )) \right) +iabbrev {{ \left\{ +iabbrev }} \right\} +iabbrev [[ \left[ +iabbrev ]] \right] +iabbrev == \,=\, +iabbrev >> \,\geq\, +iabbrev << \,\leq\, +iabbrev ++ \,+\, +iabbrev -- \,-\, + +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 + +nnoremap i :VimtexCompile +nnoremap e :VimtexErrors +nnoremap o :VimtexView +nnoremap k :VimtexStop:VimtexClean +nnoremap t :VimtexTocToggle +nnoremap h :split header.sty diff --git a/vim/.vim/after/ftplugin/tex/unilatex.vim b/vim/.vim/after/ftplugin/tex/unilatex.vim new file mode 100644 index 0000000..69358fc --- /dev/null +++ b/vim/.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/.vim/after/ftplugin/vim/folding.vim b/vim/.vim/after/ftplugin/vim/folding.vim new file mode 100644 index 0000000..1454cbe --- /dev/null +++ b/vim/.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/.vim/autoload/plug.vim b/vim/.vim/autoload/plug.vim new file mode 120000 index 0000000..6c4bafe --- /dev/null +++ b/vim/.vim/autoload/plug.vim @@ -0,0 +1 @@ +../vim-plug/plug.vim \ No newline at end of file diff --git a/vim/.vim/colors/mine.vim b/vim/.vim/colors/mine.vim new file mode 100644 index 0000000..25d8a97 --- /dev/null +++ b/vim/.vim/colors/mine.vim @@ -0,0 +1,6 @@ +set background=dark + +hi clear +syntax reset + +hi Error ctermbg=None diff --git a/vim/.vim/init.vim b/vim/.vim/init.vim new file mode 120000 index 0000000..f67022e --- /dev/null +++ b/vim/.vim/init.vim @@ -0,0 +1 @@ +../.vimrc \ No newline at end of file diff --git a/vim/.vim/mySnippets b/vim/.vim/mySnippets new file mode 120000 index 0000000..ad5268e --- /dev/null +++ b/vim/.vim/mySnippets @@ -0,0 +1 @@ +../../../personal/vim/mySnippets \ No newline at end of file diff --git a/vim/.vimrc b/vim/.vimrc new file mode 100644 index 0000000..0132d45 --- /dev/null +++ b/vim/.vimrc @@ -0,0 +1,292 @@ +" Definition of leaders +let mapleader = " " +let maplocalleader = "\\" + +"" Plugins +call plug#begin('~/.vim/plugged') +Plug 'airblade/vim-gitgutter' +Plug 'altercation/vim-colors-solarized' +Plug 'beloglazov/vim-online-thesaurus' +nnoremap K :OnlineThesaurusCurrentWord + +Plug 'christoomey/vim-tmux-navigator' +Plug 'embear/vim-localvimrc' +let g:localvimrc_ask = 0 +let g:localvimrc_sandbox = 0 + +Plug 'gregsexton/gitv', { 'on' : 'Gitv' } +Plug 'honza/vim-snippets' +Plug 'jamessan/vim-gnupg' +Plug 'junegunn/goyo.vim' +Plug 'junegunn/fzf.vim' +Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } +let g:fzf_buffers_jump = 1 +if has("nvim") + nnoremap :Buffers + nnoremap :Files + nnoremap :History + nnoremap :GitFiles + nnoremap :Colors + nnoremap :History: +else + nnoremap b :Buffers + nnoremap f :Files + nnoremap r :History + nnoremap g :GitFiles + nnoremap c :Colors + nnoremap h :History: +endif + +imap (fzf-complete-line) +imap (fzf-complete-file) + +Plug 'junegunn/seoul256.vim' +Plug 'junegunn/vim-easy-align' +xmap ga (EasyAlign) +nmap ga (EasyAlign) +xmap gl (LiveEasyAlign) +nmap gl (LiveEasyAlign) + +Plug 'junegunn/vim-peekaboo' +Plug 'junegunn/vim-pseudocl' +Plug 'junegunn/vim-oblique' +Plug 'justinmk/vim-sneak' +Plug 'klen/python-mode' +let g:pymode_rope=0 + +Plug 'ledger/vim-ledger' +Plug 'lervag/vimtex' +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:vimtex_latexmk_build_dir='build' +let g:vimtex_latexmk_progname='nvr' + +Plug 'majutsushi/tagbar' +let g:tagbar_width = 30 +let g:tagbar_show_linenumbers = 1 +let g:tagbar_autofocus = 1 + +Plug 'mileszs/ack.vim', { 'on' : 'Ack' } +Plug 'rdnetto/YCM-Generator', { 'branch' : 'stable' , 'on' : 'YcmGenerateConfig' } +Plug 'scrooloose/nerdtree' + +Plug 'SirVer/ultisnips' +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:UltiSnipsUsePythonVersion=3 +nnoremap es :UltiSnipsEdit + +Plug 'sjl/Gundo.vim', { 'on' : 'GundoToggle' } +Plug 'terryma/vim-multiple-cursors' +Plug 'tomasr/molokai' +Plug 'tommcdo/vim-exchange' +Plug 'ton/vim-bufsurf' +nnoremap (( :BufSurfBack +nnoremap )) :BufSurfForward + +Plug 'tpope/vim-commentary' +Plug 'tpope/vim-dispatch' +Plug 'tpope/vim-eunuch' +Plug 'tpope/vim-flagship' +let g:tabprefix = "" +let g:tablabel = "%N%{flagship#tabmodified()} %{flagship#tabcwds('shorten',',')}" + +function! Mixed_indent() + let l:spaces=search('\v(^ +)','n') + let l:tabs=search('\v(^\t+)','n') + return (l:spaces * l:tabs > 0) +endfunction + +augroup myflags + autocmd! + autocmd BufEnter,BufWritePost * let b:trailing=search('\s\+$','n') + autocmd BufEnter,BufWritePost * let b:mixed=Mixed_indent() + autocmd User Flags call Hoist("window", "SyntasticStatuslineFlag") + autocmd User Flags call Hoist("window", "%{b:trailing?'[tw]':''}") + autocmd User Flags call Hoist("window", "%{b:mixed?'[mixed]':''}") + autocmd User Flags call Hoist("window", "%{&paste?'[paste]':''}") +augroup END + +Plug 'tpope/vim-fugitive' +nnoremap gs :Gstatus +nnoremap gr :Gread +nnoremap gd :Gdiff +nnoremap gv :Gitv + +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 'vim-scripts/gmsh.vim' +Plug 'holomorph/vim-freefem' +Plug 'nanotech/jellybeans.vim' + +if has("nvim") + Plug 'benekastah/neomake' + let g:neomake_freefem_ff_maker = { + \ 'exe': 'FreeFem++', + \ 'args': '-ne', + \ 'errorformat': ' Error line number %l\, in file %f\,%m', + \ } + nnoremap gm :Neomake! + + Plug 'Shougo/deoplete.nvim' + let g:deoplete#enable_at_startup = 1 + let g:deoplete#omni#input_patterns={} + let g:deoplete#omni#input_patterns.ledger = ':\w*' + let g:deoplete#omni#input_patterns.tex = ['cite.\w*', 'ref.\w*'] +else + Plug 'Valloric/YouCompleteMe', { 'do' : 'python2 install.py --clang-completer' } + 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 = {} + let g:ycm_semantic_triggers.tex = ['re!\\[A-Za-z]*(ref|cite)[A-Za-z]*([^]]*])?{([^}]*, ?)*' ] + endif + + Plug 'scrooloose/syntastic' + 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" +endif +call plug#end() + +let g:tex_conceal= 'adgm' +let g:tex_flavor='latex' + +"" 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/.vim/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 guifont=Monaco\ 11 +set nojoinspaces + +" Case and spell +set nospell +" set spellfile="$HOME/.vim/spell/en.utf-8.add" +set smartcase +set ignorecase + +" Misc +set clipboard=unnamedplus +set noautochdir +set cpoptions+=Iq +set encoding=utf-8 +set mouse=a +set lazyredraw +set hidden + +" mutt +au BufNewFile,Bufread /tmp/mutt-* setlocal tw=72 +au BufNewFile,BufRead *.edp comp freefem +au BufNewFile,BufRead *.geo setf gmsh + +" Colorscheme +if $COLORSCHEME=="light" + silent! colo solarized + set background=light +elseif $COLORSCHEME=="dark" + silent! colo solarized + set background=dark +elseif $COLORSCHEME=="seoul" + silent! colo seoul256 +elseif $COLORSCHEME=="molokai" + silent! colo molokai +else + silent! colo solarized + set background=dark +endif + +highlight Comment cterm=italic +set t_ZH= +set t_ZR= + +"" Maps + +" Toggles +nnoremap cop :set paste! +nnoremap cof :set foldenable! +nnoremap cpg :GitGutterToggle +nnoremap cpn :NERDTreeToggle +nnoremap cpt :TagbarToggle +nnoremap cpu :GundoToggle + +" File edits + +" Formatting +nnoremap fw :%s/\s\+$// + +" Navigation +nnoremap 3 +nnoremap 3 +nnoremap o + +" 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 + +" Neovim specific +if has("nvim") + tnoremap :ZoomWinTabOut + nnoremap :ZoomWinTabIn:b termi + inoremap :b termi + nnoremap :w + nnoremap :q + nnoremap :tabnew + nmap h +endif diff --git a/vim/after/ftplugin/freefem/folding.vim b/vim/after/ftplugin/freefem/folding.vim deleted file mode 100644 index 7d2f6fd..0000000 --- a/vim/after/ftplugin/freefem/folding.vim +++ /dev/null @@ -1,20 +0,0 @@ -function! FreeFemFolds() - let thisline = getline(v:lnum) - if match(thisline,'^/// ') >= 0 - return ">1" - else - return "=" - endif -endfunction - -function! FreeFemFoldText() - let startline = getline(v:foldstart) - if match(startline,'^/// ') >= 0 - let title = substitute(startline,'^/// \(.*\)$','\1',"") - return '# ' . title - endif -endfunction - -setlocal foldmethod=expr -setlocal foldexpr=FreeFemFolds() -setlocal foldtext=FreeFemFoldText() diff --git a/vim/after/ftplugin/tex/mappings.vim b/vim/after/ftplugin/tex/mappings.vim deleted file mode 100644 index 1c4625d..0000000 --- a/vim/after/ftplugin/tex/mappings.vim +++ /dev/null @@ -1,38 +0,0 @@ -iabbrev (( \left( -iabbrev )) \right) -iabbrev {{ \left\{ -iabbrev }} \right\} -iabbrev [[ \left[ -iabbrev ]] \right] -iabbrev == \,=\, -iabbrev >> \,\geq\, -iabbrev << \,\leq\, -iabbrev ++ \,+\, -iabbrev -- \,-\, - -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 - -nnoremap i :VimtexCompile -nnoremap e :VimtexErrors -nnoremap o :VimtexView -nnoremap k :VimtexStop:VimtexClean -nnoremap t :VimtexTocToggle -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/autoload/plug.vim b/vim/autoload/plug.vim deleted file mode 120000 index 6c4bafe..0000000 --- a/vim/autoload/plug.vim +++ /dev/null @@ -1 +0,0 @@ -../vim-plug/plug.vim \ No newline at end of file diff --git a/vim/colors/mine.vim b/vim/colors/mine.vim deleted file mode 100644 index 25d8a97..0000000 --- a/vim/colors/mine.vim +++ /dev/null @@ -1,6 +0,0 @@ -set background=dark - -hi clear -syntax reset - -hi Error ctermbg=None diff --git a/vim/init.vim b/vim/init.vim deleted file mode 120000 index c9a3c9c..0000000 --- a/vim/init.vim +++ /dev/null @@ -1 +0,0 @@ -vimrc \ No newline at end of file diff --git a/vim/mySnippets b/vim/mySnippets deleted file mode 120000 index ccab7d4..0000000 --- a/vim/mySnippets +++ /dev/null @@ -1 +0,0 @@ -../personal/vim/mySnippets \ No newline at end of file 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/vim/vimrc b/vim/vimrc deleted file mode 100644 index c91a1ac..0000000 --- a/vim/vimrc +++ /dev/null @@ -1,290 +0,0 @@ -" Definition of leaders -let mapleader = " " -let maplocalleader = "\\" - -"" Plugins -call plug#begin('~/.vim/plugged') -Plug 'airblade/vim-gitgutter' -Plug 'altercation/vim-colors-solarized' -Plug 'beloglazov/vim-online-thesaurus' -nnoremap K :OnlineThesaurusCurrentWord - -Plug 'christoomey/vim-tmux-navigator' -Plug 'embear/vim-localvimrc' -let g:localvimrc_ask = 0 -let g:localvimrc_sandbox = 0 - -Plug 'gregsexton/gitv', { 'on' : 'Gitv' } -Plug 'honza/vim-snippets' -Plug 'jamessan/vim-gnupg' -Plug 'junegunn/fzf.vim' -Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } -let g:fzf_buffers_jump = 1 -if has("nvim") - nnoremap :Buffers - nnoremap :Files - nnoremap :History - nnoremap :GitFiles - nnoremap :Colors - nnoremap :History: -else - nnoremap b :Buffers - nnoremap f :Files - nnoremap r :History - nnoremap g :GitFiles - nnoremap c :Colors - nnoremap h :History: -endif - -imap (fzf-complete-line) -imap (fzf-complete-file) - -Plug 'junegunn/seoul256.vim' -Plug 'junegunn/vim-easy-align' -xmap ga (EasyAlign) -nmap ga (EasyAlign) - -Plug 'junegunn/vim-peekaboo' -Plug 'junegunn/vim-pseudocl' -Plug 'junegunn/vim-oblique' -Plug 'justinmk/vim-sneak' -Plug 'klen/python-mode' -let g:pymode_rope=0 - -Plug 'ledger/vim-ledger' -Plug 'lervag/vimtex' -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:vimtex_latexmk_build_dir='build' -let g:vimtex_latexmk_progname='nvr' - -Plug 'majutsushi/tagbar' -let g:tagbar_width = 30 -let g:tagbar_show_linenumbers = 1 -let g:tagbar_autofocus = 1 - -Plug 'mileszs/ack.vim', { 'on' : 'Ack' } -Plug 'rdnetto/YCM-Generator', { 'branch' : 'stable' , 'on' : 'YcmGenerateConfig' } -Plug 'scrooloose/nerdtree' - -Plug 'SirVer/ultisnips' -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:UltiSnipsUsePythonVersion=3 -nnoremap es :UltiSnipsEdit - -Plug 'sjl/Gundo.vim', { 'on' : 'GundoToggle' } -Plug 'terryma/vim-multiple-cursors' -Plug 'tomasr/molokai' -Plug 'tommcdo/vim-exchange' -Plug 'ton/vim-bufsurf' -nnoremap (( :BufSurfBack -nnoremap )) :BufSurfForward - -Plug 'tpope/vim-commentary' -Plug 'tpope/vim-dispatch' -Plug 'tpope/vim-eunuch' -Plug 'tpope/vim-flagship' -let g:tabprefix = "" -let g:tablabel = "%N%{flagship#tabmodified()} %{flagship#tabcwds('shorten',',')}" - -function! Mixed_indent() - let l:spaces=search('\v(^ +)','n') - let l:tabs=search('\v(^\t+)','n') - return (l:spaces * l:tabs > 0) -endfunction - -augroup myflags - autocmd! - autocmd BufEnter,BufWritePost * let b:trailing=search('\s\+$','n') - autocmd BufEnter,BufWritePost * let b:mixed=Mixed_indent() - autocmd User Flags call Hoist("window", "SyntasticStatuslineFlag") - autocmd User Flags call Hoist("window", "%{b:trailing?'[tw]':''}") - autocmd User Flags call Hoist("window", "%{b:mixed?'[mixed]':''}") - autocmd User Flags call Hoist("window", "%{&paste?'[paste]':''}") -augroup END - -Plug 'tpope/vim-fugitive' -nnoremap gs :Gstatus -nnoremap gr :Gread -nnoremap gd :Gdiff -nnoremap gv :Gitv - -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 'vim-scripts/gmsh.vim' -Plug 'holomorph/vim-freefem' -Plug 'nanotech/jellybeans.vim' - -if has("nvim") - Plug 'benekastah/neomake' - let g:neomake_freefem_ff_maker = { - \ 'exe': 'FreeFem++', - \ 'args': '-ne', - \ 'errorformat': ' Error line number %l\, in file %f\,%m', - \ } - nnoremap gm :Neomake! - - Plug 'Shougo/deoplete.nvim' - let g:deoplete#enable_at_startup = 1 - let g:deoplete#omni#input_patterns={} - let g:deoplete#omni#input_patterns.ledger = ':\w*' - let g:deoplete#omni#input_patterns.tex = ['cite.\w*', 'ref.\w*'] -else - Plug 'Valloric/YouCompleteMe', { 'do' : 'python2 install.py --clang-completer' } - 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 = {} - let g:ycm_semantic_triggers.tex = ['re!\\[A-Za-z]*(ref|cite)[A-Za-z]*([^]]*])?{([^}]*, ?)*' ] - endif - - Plug 'scrooloose/syntastic' - 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" -endif -call plug#end() - -let g:tex_conceal= 'adgm' -let g:tex_flavor='latex' - -"" 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/.vim/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 guifont=Monaco\ 11 -set nojoinspaces - -" Case and spell -set nospell -" set spellfile="$HOME/.vim/spell/en.utf-8.add" -set smartcase -set ignorecase - -" Misc -set clipboard=unnamedplus -set noautochdir -set cpoptions+=Iq -set encoding=utf-8 -set mouse=a -set lazyredraw -set hidden - -" mutt -au BufNewFile,Bufread /tmp/mutt-* setlocal tw=72 -au BufNewFile,BufRead *.edp comp freefem -au BufNewFile,BufRead *.geo setf gmsh - -" Colorscheme -if $COLORSCHEME=="light" - silent! colo solarized - set background=light -elseif $COLORSCHEME=="dark" - silent! colo solarized - set background=dark -elseif $COLORSCHEME=="seoul" - silent! colo seoul256 -elseif $COLORSCHEME=="molokai" - silent! colo molokai -else - silent! colo solarized - set background=dark -endif - -highlight Comment cterm=italic -set t_ZH= -set t_ZR= - -"" Maps - -" Toggles -nnoremap cop :set paste! -nnoremap cof :set foldenable! -nnoremap cpg :GitGutterToggle -nnoremap cpn :NERDTreeToggle -nnoremap cpt :TagbarToggle -nnoremap cpu :GundoToggle - -" File edits - -" Formatting -nnoremap fw :%s/\s\+$// - -" Navigation -nnoremap 3 -nnoremap 3 -nnoremap o - -" 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 gm :Make -nnoremap J mzJ`z -nnoremap Y y$ -nnoremap + za - -" Neovim specific -if has("nvim") - tnoremap :ZoomWinTabOut - nnoremap :ZoomWinTabIn:b termi - inoremap :b termi - nnoremap :w - nnoremap :q - nnoremap :tabnew - nmap h -endif diff --git a/vim/vimundo/.gitkeep b/vim/vimundo/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/vimperator/.vimperatorrc b/vimperator/.vimperatorrc new file mode 100644 index 0000000..1944fc6 --- /dev/null +++ b/vimperator/.vimperatorrc @@ -0,0 +1,2 @@ +highlight Hint font-size:100%;color:black;background-color:yellow;padding:2px;text-transform:uppercase; +set hintchars=uhetonasidcrpg diff --git a/vimperatorrc b/vimperatorrc deleted file mode 100644 index f3168e3..0000000 --- a/vimperatorrc +++ /dev/null @@ -1,2 +0,0 @@ -highlight Hint font-size:100%;color:black;background-color:yellow;padding:2px;text-transform:uppercase; -set hintchars=uhetonasid.c,rpg diff --git a/xinit/.xinitrc b/xinit/.xinitrc new file mode 100755 index 0000000..9118272 --- /dev/null +++ b/xinit/.xinitrc @@ -0,0 +1,31 @@ +#!/bin/bash + +# Key repeat rate +xset r rate 400 50 + +# Load key bindings +$HOME/bin/keyboard + +# Load Xresources to light colorscheme +xrdb -I$HOME ~/.Xresources/dark + +# Background +feh --bg-fill --randomize /usr/share/backgrounds + +# Synchronise primary and clipboard +autocutsel -fork & +autocutsel -selection PRIMARY -fork & + +# Disable screen going blank +xset -dpms +xset s off + +# SSH agent +eval $(ssh-agent) + +# Programs to start +nm-applet & +dropbox & +dunst & + +exec i3 diff --git a/xinitrc b/xinitrc deleted file mode 100755 index 9118272..0000000 --- a/xinitrc +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - -# Key repeat rate -xset r rate 400 50 - -# Load key bindings -$HOME/bin/keyboard - -# Load Xresources to light colorscheme -xrdb -I$HOME ~/.Xresources/dark - -# Background -feh --bg-fill --randomize /usr/share/backgrounds - -# Synchronise primary and clipboard -autocutsel -fork & -autocutsel -selection PRIMARY -fork & - -# Disable screen going blank -xset -dpms -xset s off - -# SSH agent -eval $(ssh-agent) - -# Programs to start -nm-applet & -dropbox & -dunst & - -exec i3 diff --git a/zathura/.config/zathura/zathurarc b/zathura/.config/zathura/zathurarc new file mode 100644 index 0000000..543633d --- /dev/null +++ b/zathura/.config/zathura/zathurarc @@ -0,0 +1,2 @@ +map scroll down +map scroll up 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/.gitignore b/zsh/.zsh/.gitignore new file mode 100644 index 0000000..8ca273a --- /dev/null +++ b/zsh/.zsh/.gitignore @@ -0,0 +1,2 @@ +tmp +zgen diff --git a/zsh/.zsh/alias b/zsh/.zsh/alias new file mode 100644 index 0000000..7da7fb5 --- /dev/null +++ b/zsh/.zsh/alias @@ -0,0 +1,32 @@ +#!/bin/zsh + +# Commands +alias c='clear' +alias ca='printf "\ec"' +alias cdd='cd ~/dotfiles' + +# Shortcut to files +alias notes='vim ~/dotfiles/.notes' +alias el='nvim ~/dotfiles/ledger/perso.ledger' + +# Programs +alias a='vifm . .' +alias ff='FreeFem++' +alias g='git' +alias l='ledger' +alias m='cd ~/.mutt/attachments && mutt && cd -' +alias e='nvim' +alias n='nvim' +alias ns='nvim -S Session.vim' +alias v='vim' +alias vs="vim -S Session.vim" + +# Build +alias mc='make clean' +alias mca='make clean-all' + +# Tmux +alias son="tmux set -g status on" +alias soff="tmux set -g status off" + +unalias ag diff --git a/zsh/.zsh/functions b/zsh/.zsh/functions new file mode 100644 index 0000000..7c2b49a --- /dev/null +++ b/zsh/.zsh/functions @@ -0,0 +1,16 @@ +#!/bin/zsh + +function colo { + + # Change colors for current session + $HOME/bin/recolor < ~/.Xresources/$1 + + # Load Xresources file for future sessions + xrdb -I$HOME ~/.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" ~/.zsh/tmp +} diff --git a/zsh/.zsh/plugins b/zsh/.zsh/plugins new file mode 100644 index 0000000..1016b88 --- /dev/null +++ b/zsh/.zsh/plugins @@ -0,0 +1,52 @@ +#! /bin/zsh + +# Load zgen +source "$HOME/.zsh/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/archlinux + 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 + + # Navigation plugins + zgen load uvaes/fzf-marks + + # Other plugins + zgen load rupa/z + zgen load supercrabtree/k + zgen load djui/alias-tips + zgen load tarruda/zsh-autosuggestions + zgen load joel-porquet/zsh-dircolors-solarized + + # Save all to init script + zgen save +fi + +# Plugins configuration + +# Autosuggestion +{ + ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=6' + bindkey '^y' autosuggest-accept +} + +# Z +export _Z_EXCLUDE_DIRS=("$HOME/sshfs", "$HOME/nfs") diff --git a/zsh/.zshrc b/zsh/.zshrc new file mode 100644 index 0000000..fe44e9e --- /dev/null +++ b/zsh/.zshrc @@ -0,0 +1,52 @@ +# Write tmp file if it doesn't exist +[[ ! -f ~/.zsh/tmp ]] && echo "export COLORSCHEME=dark" > ~/.zsh/tmp + +# Source configuration files +source "$HOME/.zsh/plugins" +source "$HOME/.zsh/functions" +source "$HOME/.zsh/alias" +source "$HOME/.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:/usr/bin/core_perl:$HOME/bin" + +# Editor +export EDITOR=/usr/bin/nvim + +# 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}/.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/zsh/alias b/zsh/alias deleted file mode 100644 index 7da7fb5..0000000 --- a/zsh/alias +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/zsh - -# Commands -alias c='clear' -alias ca='printf "\ec"' -alias cdd='cd ~/dotfiles' - -# Shortcut to files -alias notes='vim ~/dotfiles/.notes' -alias el='nvim ~/dotfiles/ledger/perso.ledger' - -# Programs -alias a='vifm . .' -alias ff='FreeFem++' -alias g='git' -alias l='ledger' -alias m='cd ~/.mutt/attachments && mutt && cd -' -alias e='nvim' -alias n='nvim' -alias ns='nvim -S Session.vim' -alias v='vim' -alias vs="vim -S Session.vim" - -# Build -alias mc='make clean' -alias mca='make clean-all' - -# Tmux -alias son="tmux set -g status on" -alias soff="tmux set -g status off" - -unalias ag diff --git a/zsh/functions b/zsh/functions deleted file mode 100644 index 7c2b49a..0000000 --- a/zsh/functions +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/zsh - -function colo { - - # Change colors for current session - $HOME/bin/recolor < ~/.Xresources/$1 - - # Load Xresources file for future sessions - xrdb -I$HOME ~/.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" ~/.zsh/tmp -} diff --git a/zsh/plugins b/zsh/plugins deleted file mode 100644 index 43b2916..0000000 --- a/zsh/plugins +++ /dev/null @@ -1,52 +0,0 @@ -#! /bin/zsh - -# Load zgen -source "$HOME/.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/archlinux - 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 - - # Navigation plugins - zgen load uvaes/fzf-marks - - # Other plugins - zgen load rupa/z - zgen load supercrabtree/k - zgen load djui/alias-tips - zgen load tarruda/zsh-autosuggestions - zgen load joel-porquet/zsh-dircolors-solarized - - # Save all to init script - zgen save -fi - -# Plugins configuration - -# Autosuggestion -{ - ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=6' - bindkey '^y' autosuggest-accept -} - -# Z -export _Z_EXCLUDE_DIRS=("$HOME/sshfs", "$HOME/nfs") diff --git a/zsh/zshrc b/zsh/zshrc deleted file mode 100644 index fe44e9e..0000000 --- a/zsh/zshrc +++ /dev/null @@ -1,52 +0,0 @@ -# Write tmp file if it doesn't exist -[[ ! -f ~/.zsh/tmp ]] && echo "export COLORSCHEME=dark" > ~/.zsh/tmp - -# Source configuration files -source "$HOME/.zsh/plugins" -source "$HOME/.zsh/functions" -source "$HOME/.zsh/alias" -source "$HOME/.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:/usr/bin/core_perl:$HOME/bin" - -# Editor -export EDITOR=/usr/bin/nvim - -# 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}/.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