From edbcca8cd2b93b8c88eb62c431d04ea832b73180 Mon Sep 17 00:00:00 2001 From: Tharre Date: Fri, 7 Oct 2016 20:53:06 +0000 Subject: Reorganise dotfiles --- .config/user-dirs.dirs | 15 ++ .eclimrc | 3 + .emacs.d/.gitignore | 8 + .emacs.d/custom-var.el | 15 ++ .emacs.d/init.el | 215 ++++++++++++++++++++++ .emacs.d/org-fragments.el | 60 ++++++ .emacs.d/site-lisp/dconf-proxy.el | 14 ++ .emacs.d/site-lisp/site-lisp-autoloads.el | 5 + .emacs.d/site-lisp/util.el | 36 ++++ .emacs.d/site-lisp/with-package.el | 31 ++++ .emacs.d/tools/libs/jpeg62.dll | Bin 0 -> 127488 bytes .emacs.d/tools/libs/libXpm.dll | Bin 0 -> 504492 bytes .emacs.d/tools/libs/libpng-config | 124 +++++++++++++ .emacs.d/tools/libs/libpng12-config | 124 +++++++++++++ .emacs.d/tools/libs/libpng12.dll | Bin 0 -> 260096 bytes .emacs.d/tools/libs/libpng14-14.dll | Bin 0 -> 230529 bytes .emacs.d/tools/libs/libpng3.dll | Bin 0 -> 260096 bytes .emacs.d/tools/libs/libtiff3.dll | Bin 0 -> 376832 bytes .emacs.d/tools/libs/libungif4.dll | Bin 0 -> 31232 bytes .emacs.d/tools/libs/xpm4.dll | Bin 0 -> 52224 bytes .emacs.d/tools/libs/zip.exe | Bin 0 -> 290816 bytes .emacs.d/tools/libs/zlib1.dll | Bin 0 -> 75264 bytes .emacs.d/tools/profiler/profile-dotemacs.el | 200 ++++++++++++++++++++ .emacs.d/tools/profiler/run_profiler.el | 2 + .gdbinit | 1 + .gitconfig | 12 ++ .gitignore | 2 +- .gitmodules | 30 +-- .gnupg/.gitignore | 4 + .gnupg/gpg-agent.conf | 1 + .gnupg/gpg.conf | 5 + .makepkg.conf | 8 + .msmtprc | 12 ++ .mutt/Equifax_Secure_CA.cert | 17 ++ .mutt/colors.muttrc | 65 +++++++ .mutt/gpg.muttrc | 11 ++ .mutt/muttrc | 133 +++++++++++++ .mutt/offlineimap.py | 5 + .mutt/sig | 1 + .mutt/temp/.gitignore | 4 + .offlineimaprc | 43 +++++ .oh-my-zsh | 1 + .tmux.conf | 11 ++ .vim/bundle/ctrlp.vim | 1 + .vim/bundle/gundo.vim | 1 + .vim/bundle/jedi-vim | 1 + .vim/bundle/nerdcommenter | 1 + .vim/bundle/rust.vim | 1 + .vim/bundle/syntastic | 1 + .vim/bundle/vim-airline | 1 + .vim/bundle/vim-distinguished | 1 + .vim/bundle/vim-easy-align | 1 + .vim/bundle/vim-ledger | 1 + .vim/bundle/vim-misc | 1 + .vim/bundle/vim-pathogen | 1 + .vim/bundle/vim-sleuth | 1 + .vim/bundle/vim-surround | 1 + .vimrc | 115 ++++++++++++ .zshrc | 181 ++++++++++++++++++ config/user-dirs.dirs | 15 -- email/_msmtprc | 12 -- email/_mutt/Equifax_Secure_CA.cert | 17 -- email/_mutt/colors.muttrc | 65 ------- email/_mutt/gpg.muttrc | 11 -- email/_mutt/muttrc | 133 ------------- email/_mutt/offlineimap.py | 5 - email/_mutt/sig | 1 - email/_mutt/temp/.gitignore | 4 - email/_offlineimaprc | 43 ----- install.sh | 109 +++++------ shell/_eclimrc | 3 - shell/_emacs.d/.gitignore | 8 - shell/_emacs.d/custom-var.el | 15 -- shell/_emacs.d/init.el | 215 ---------------------- shell/_emacs.d/org-fragments.el | 60 ------ shell/_emacs.d/site-lisp/dconf-proxy.el | 14 -- shell/_emacs.d/site-lisp/site-lisp-autoloads.el | 5 - shell/_emacs.d/site-lisp/util.el | 36 ---- shell/_emacs.d/site-lisp/with-package.el | 31 ---- shell/_emacs.d/tools/libs/jpeg62.dll | Bin 127488 -> 0 bytes shell/_emacs.d/tools/libs/libXpm.dll | Bin 504492 -> 0 bytes shell/_emacs.d/tools/libs/libpng-config | 124 ------------- shell/_emacs.d/tools/libs/libpng12-config | 124 ------------- shell/_emacs.d/tools/libs/libpng12.dll | Bin 260096 -> 0 bytes shell/_emacs.d/tools/libs/libpng14-14.dll | Bin 230529 -> 0 bytes shell/_emacs.d/tools/libs/libpng3.dll | Bin 260096 -> 0 bytes shell/_emacs.d/tools/libs/libtiff3.dll | Bin 376832 -> 0 bytes shell/_emacs.d/tools/libs/libungif4.dll | Bin 31232 -> 0 bytes shell/_emacs.d/tools/libs/xpm4.dll | Bin 52224 -> 0 bytes shell/_emacs.d/tools/libs/zip.exe | Bin 290816 -> 0 bytes shell/_emacs.d/tools/libs/zlib1.dll | Bin 75264 -> 0 bytes shell/_emacs.d/tools/profiler/profile-dotemacs.el | 200 -------------------- shell/_emacs.d/tools/profiler/run_profiler.el | 2 - shell/_gdbinit | 1 - shell/_gitconfig | 12 -- shell/_gnupg/.gitignore | 4 - shell/_gnupg/gpg-agent.conf | 1 - shell/_gnupg/gpg.conf | 5 - shell/_makepkg.conf | 8 - shell/_oh-my-zsh | 1 - shell/_tmux.conf | 11 -- shell/_vim/bundle/ctrlp.vim | 1 - shell/_vim/bundle/gundo.vim | 1 - shell/_vim/bundle/jedi-vim | 1 - shell/_vim/bundle/nerdcommenter | 1 - shell/_vim/bundle/rust.vim | 1 - shell/_vim/bundle/syntastic | 1 - shell/_vim/bundle/vim-airline | 1 - shell/_vim/bundle/vim-distinguished | 1 - shell/_vim/bundle/vim-easy-align | 1 - shell/_vim/bundle/vim-ledger | 1 - shell/_vim/bundle/vim-misc | 1 - shell/_vim/bundle/vim-pathogen | 1 - shell/_vim/bundle/vim-sleuth | 1 - shell/_vim/bundle/vim-surround | 1 - shell/_vimrc | 115 ------------ shell/_zshrc | 180 ------------------ shell/themes/custom.zsh-theme | 30 --- zsh-custom/themes/custom.zsh-theme | 30 +++ 119 files changed, 1586 insertions(+), 1606 deletions(-) create mode 100644 .config/user-dirs.dirs create mode 100644 .eclimrc create mode 100644 .emacs.d/.gitignore create mode 100644 .emacs.d/custom-var.el create mode 100644 .emacs.d/init.el create mode 100644 .emacs.d/org-fragments.el create mode 100644 .emacs.d/site-lisp/dconf-proxy.el create mode 100644 .emacs.d/site-lisp/site-lisp-autoloads.el create mode 100644 .emacs.d/site-lisp/util.el create mode 100644 .emacs.d/site-lisp/with-package.el create mode 100644 .emacs.d/tools/libs/jpeg62.dll create mode 100644 .emacs.d/tools/libs/libXpm.dll create mode 100644 .emacs.d/tools/libs/libpng-config create mode 100644 .emacs.d/tools/libs/libpng12-config create mode 100644 .emacs.d/tools/libs/libpng12.dll create mode 100644 .emacs.d/tools/libs/libpng14-14.dll create mode 100644 .emacs.d/tools/libs/libpng3.dll create mode 100644 .emacs.d/tools/libs/libtiff3.dll create mode 100644 .emacs.d/tools/libs/libungif4.dll create mode 100644 .emacs.d/tools/libs/xpm4.dll create mode 100644 .emacs.d/tools/libs/zip.exe create mode 100644 .emacs.d/tools/libs/zlib1.dll create mode 100644 .emacs.d/tools/profiler/profile-dotemacs.el create mode 100644 .emacs.d/tools/profiler/run_profiler.el create mode 100644 .gdbinit create mode 100644 .gitconfig create mode 100644 .gnupg/.gitignore create mode 100644 .gnupg/gpg-agent.conf create mode 100644 .gnupg/gpg.conf create mode 100644 .makepkg.conf create mode 100644 .msmtprc create mode 100644 .mutt/Equifax_Secure_CA.cert create mode 100644 .mutt/colors.muttrc create mode 100644 .mutt/gpg.muttrc create mode 100644 .mutt/muttrc create mode 100644 .mutt/offlineimap.py create mode 100644 .mutt/sig create mode 100644 .mutt/temp/.gitignore create mode 100644 .offlineimaprc create mode 160000 .oh-my-zsh create mode 100644 .tmux.conf create mode 160000 .vim/bundle/ctrlp.vim create mode 160000 .vim/bundle/gundo.vim create mode 160000 .vim/bundle/jedi-vim create mode 160000 .vim/bundle/nerdcommenter create mode 160000 .vim/bundle/rust.vim create mode 160000 .vim/bundle/syntastic create mode 160000 .vim/bundle/vim-airline create mode 160000 .vim/bundle/vim-distinguished create mode 160000 .vim/bundle/vim-easy-align create mode 160000 .vim/bundle/vim-ledger create mode 160000 .vim/bundle/vim-misc create mode 160000 .vim/bundle/vim-pathogen create mode 160000 .vim/bundle/vim-sleuth create mode 160000 .vim/bundle/vim-surround create mode 100644 .vimrc create mode 100644 .zshrc delete mode 100644 config/user-dirs.dirs delete mode 100644 email/_msmtprc delete mode 100644 email/_mutt/Equifax_Secure_CA.cert delete mode 100644 email/_mutt/colors.muttrc delete mode 100644 email/_mutt/gpg.muttrc delete mode 100644 email/_mutt/muttrc delete mode 100644 email/_mutt/offlineimap.py delete mode 100644 email/_mutt/sig delete mode 100644 email/_mutt/temp/.gitignore delete mode 100644 email/_offlineimaprc delete mode 100644 shell/_eclimrc delete mode 100644 shell/_emacs.d/.gitignore delete mode 100644 shell/_emacs.d/custom-var.el delete mode 100644 shell/_emacs.d/init.el delete mode 100644 shell/_emacs.d/org-fragments.el delete mode 100644 shell/_emacs.d/site-lisp/dconf-proxy.el delete mode 100644 shell/_emacs.d/site-lisp/site-lisp-autoloads.el delete mode 100644 shell/_emacs.d/site-lisp/util.el delete mode 100644 shell/_emacs.d/site-lisp/with-package.el delete mode 100644 shell/_emacs.d/tools/libs/jpeg62.dll delete mode 100644 shell/_emacs.d/tools/libs/libXpm.dll delete mode 100644 shell/_emacs.d/tools/libs/libpng-config delete mode 100644 shell/_emacs.d/tools/libs/libpng12-config delete mode 100644 shell/_emacs.d/tools/libs/libpng12.dll delete mode 100644 shell/_emacs.d/tools/libs/libpng14-14.dll delete mode 100644 shell/_emacs.d/tools/libs/libpng3.dll delete mode 100644 shell/_emacs.d/tools/libs/libtiff3.dll delete mode 100644 shell/_emacs.d/tools/libs/libungif4.dll delete mode 100644 shell/_emacs.d/tools/libs/xpm4.dll delete mode 100644 shell/_emacs.d/tools/libs/zip.exe delete mode 100644 shell/_emacs.d/tools/libs/zlib1.dll delete mode 100644 shell/_emacs.d/tools/profiler/profile-dotemacs.el delete mode 100644 shell/_emacs.d/tools/profiler/run_profiler.el delete mode 100644 shell/_gdbinit delete mode 100644 shell/_gitconfig delete mode 100644 shell/_gnupg/.gitignore delete mode 100644 shell/_gnupg/gpg-agent.conf delete mode 100644 shell/_gnupg/gpg.conf delete mode 100644 shell/_makepkg.conf delete mode 160000 shell/_oh-my-zsh delete mode 100644 shell/_tmux.conf delete mode 160000 shell/_vim/bundle/ctrlp.vim delete mode 160000 shell/_vim/bundle/gundo.vim delete mode 160000 shell/_vim/bundle/jedi-vim delete mode 160000 shell/_vim/bundle/nerdcommenter delete mode 160000 shell/_vim/bundle/rust.vim delete mode 160000 shell/_vim/bundle/syntastic delete mode 160000 shell/_vim/bundle/vim-airline delete mode 160000 shell/_vim/bundle/vim-distinguished delete mode 160000 shell/_vim/bundle/vim-easy-align delete mode 160000 shell/_vim/bundle/vim-ledger delete mode 160000 shell/_vim/bundle/vim-misc delete mode 160000 shell/_vim/bundle/vim-pathogen delete mode 160000 shell/_vim/bundle/vim-sleuth delete mode 160000 shell/_vim/bundle/vim-surround delete mode 100644 shell/_vimrc delete mode 100644 shell/_zshrc delete mode 100644 shell/themes/custom.zsh-theme create mode 100644 zsh-custom/themes/custom.zsh-theme diff --git a/.config/user-dirs.dirs b/.config/user-dirs.dirs new file mode 100644 index 0000000..a3c4c61 --- /dev/null +++ b/.config/user-dirs.dirs @@ -0,0 +1,15 @@ +# This file is written by xdg-user-dirs-update +# If you want to change or add directories, just edit the line you're +# interested in. All local changes will be retained on the next run +# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped +# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an +# absolute path. No other format is supported. +# +XDG_DESKTOP_DIR="$HOME/var/desktop" +XDG_DOWNLOAD_DIR="$HOME/var/downloads" +XDG_TEMPLATES_DIR="$HOME/var/templates" +XDG_PUBLICSHARE_DIR="$HOME/share/public" +XDG_DOCUMENTS_DIR="$HOME/var/documents" +XDG_MUSIC_DIR="$HOME/media/music" +XDG_PICTURES_DIR="$HOME/media/pictures" +XDG_VIDEOS_DIR="$HOME/media/videos" diff --git a/.eclimrc b/.eclimrc new file mode 100644 index 0000000..7b78828 --- /dev/null +++ b/.eclimrc @@ -0,0 +1,3 @@ +# Specifies the workspace directory to use +# See $ECLIPSE_HOME/configuration/config.ini for other osgi properties. +osgi.instance.area.default=@user.home/var/workspace diff --git a/.emacs.d/.gitignore b/.emacs.d/.gitignore new file mode 100644 index 0000000..88f820a --- /dev/null +++ b/.emacs.d/.gitignore @@ -0,0 +1,8 @@ +elpa/ +auto-save-list +.smex-items +ac-comphist.dat +*.elc +emacs.html +*~ +url/ diff --git a/.emacs.d/custom-var.el b/.emacs.d/custom-var.el new file mode 100644 index 0000000..431ff6e --- /dev/null +++ b/.emacs.d/custom-var.el @@ -0,0 +1,15 @@ +(custom-set-variables + ;; custom-set-variables was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(evil-emacs-state-modes (quote (archive-mode bbdb-mode bookmark-bmenu-mode bookmark-edit-annotation-mode browse-kill-ring-mode bzr-annotate-mode calc-mode cfw:calendar-mode completion-list-mode Custom-mode debugger-mode delicious-search-mode desktop-menu-blist-mode desktop-menu-mode doc-view-mode dvc-bookmarks-mode dvc-diff-mode dvc-info-buffer-mode dvc-log-buffer-mode dvc-revlist-mode dvc-revlog-mode dvc-status-mode dvc-tips-mode ediff-mode ediff-meta-mode efs-mode Electric-buffer-menu-mode emms-browser-mode emms-mark-mode emms-metaplaylist-mode emms-playlist-mode etags-select-mode fj-mode gc-issues-mode gdb-breakpoints-mode gdb-disassembly-mode gdb-frames-mode gdb-locals-mode gdb-memory-mode gdb-registers-mode gdb-threads-mode gist-list-mode gnus-article-mode gnus-browse-mode gnus-group-mode gnus-server-mode gnus-summary-mode google-maps-static-mode ibuffer-mode jde-javadoc-checker-report-mode magit-commit-mode magit-diff-mode magit-key-mode magit-log-mode magit-mode magit-reflog-mode magit-show-branches-mode magit-branch-manager-mode magit-stash-mode magit-status-mode magit-wazzup-mode magit-process-mode mh-folder-mode monky-mode mu4e-main-mode mu4e-headers-mode mu4e-view-mode occur-mode org-agenda-mode package-menu-mode proced-mode rcirc-mode rebase-mode recentf-dialog-mode reftex-select-bib-mode reftex-select-label-mode reftex-toc-mode sldb-mode slime-inspector-mode slime-thread-control-mode slime-xref-mode sr-buttons-mode sr-mode sr-tree-mode sr-virtual-mode tar-mode tetris-mode tla-annotate-mode tla-archive-list-mode tla-bconfig-mode tla-bookmarks-mode tla-branch-list-mode tla-browse-mode tla-category-list-mode tla-changelog-mode tla-follow-symlinks-mode tla-inventory-file-mode tla-inventory-mode tla-lint-mode tla-logs-mode tla-revision-list-mode tla-revlog-mode tla-tree-lint-mode tla-version-list-mode twittering-mode urlview-mode vc-annotate-mode vc-dir-mode vc-git-log-view-mode vc-svn-log-view-mode vm-mode vm-summary-mode w3m-mode wab-compilation-mode xgit-annotate-mode xgit-changelog-mode xgit-diff-mode xgit-revlog-mode xhg-annotate-mode xhg-log-mode xhg-mode xhg-mq-mode xhg-mq-sub-mode xhg-status-extra-mode))) + '(evil-motion-state-modes (quote (apropos-mode Buffer-menu-mode calendar-mode color-theme-mode command-history-mode compilation-mode dictionary-mode ert-results-mode help-mode Info-mode Man-mode speedbar-mode undo-tree-visualizer-mode view-mode woman-mode Custom-mode notmuch-hello-mode notmuch-search-mode))) + '(evil-overriding-maps (quote ((Buffer-menu-mode-map) (color-theme-mode-map) (comint-mode-map) (compilation-mode-map) (dictionary-mode-map) (ert-results-mode-map . motion) (Info-mode-map . motion) (speedbar-key-map) (speedbar-file-key-map) (speedbar-buffers-key-map) (custom-mode-key-map) (notmuch-hello-key-map) (notmuch-search-key-map) (notmuch-show-key-map)))) + '(org-file-apps (quote ((auto-mode . emacs) ("\\.mm\\'" . default) ("\\.x?html?\\'" . "chromium %s") ("\\.pdf\\'" . default))))) +(custom-set-faces + ;; custom-set-faces was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + ) diff --git a/.emacs.d/init.el b/.emacs.d/init.el new file mode 100644 index 0000000..921eace --- /dev/null +++ b/.emacs.d/init.el @@ -0,0 +1,215 @@ +;; VERSION: 0.9.0 +;; BUILD: 141 +;; TODO: +;; - Dependencies: +;; - Haskell: ghc-mod; hlint +;; - Python: jedi (pip install jedi epc) +;; - Arch: aspell-de +;; - org-mode +;; - imagemagick +;; - Latex-preview: texlive-core + +;; TODO: eldoc for C looks awesome +;; company for autocompletion? +;;;; comments +;; Fix custom-set-variables +;; need a redo solution +;; align-regexp +;; need to fix color schemes +;; fix evil state in list-packages buffer +;; fix smooth scrolling (no jumps pls) +;; fix jedi +;; checkout evil-exchange https://github.com/Dewdrops/evil-exchange +;; Learn how the minibuffer works + +;; Turn off mouse interface early to avoid momentary display +(if (fboundp 'menu-bar-mode) (menu-bar-mode -1)) +(if (fboundp 'tool-bar-mode) (tool-bar-mode -1)) +(if (fboundp 'scroll-bar-mode) (scroll-bar-mode -1)) + +;; No welcome screen +(setq inhibit-startup-message t) + +;;;; autoloads +(add-to-list 'load-path (concat user-emacs-directory "/site-lisp/")) +(require 'site-lisp-autoloads) + +;;;; general settings +(when window-system + (setq frame-title-format '(buffer-file-name "%f" ("%b"))) + (blink-cursor-mode -1)) + +(setq visible-bell t + ;; color-theme-is-global t + ;; shift-select-mode nil + ;; mouse-yank-at-point t + backup-directory-alist `((".".,(concat user-emacs-directory "backups")))) + +(defalias 'yes-or-no-p 'y-or-n-p) + +;; much better scrolling +(setq scroll-margin 0 + scroll-conservatively 100000 + scroll-preserve-screen-position 1) + +;; Increase memory for tables +(setq max-lisp-eval-depth '40000) +(setq max-specpdl-size '100000) + +(require 'package) +(add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/")) +(add-to-list 'package-archives + '("marmalade" . "http://marmalade-repo.org/packages/")) +(add-to-list 'package-archives + '("melpa" . "http://melpa.milkbox.net/packages/")) +(package-initialize) + +(refresh-proxy-settings) +(when (not package-archive-contents) + (package-refresh-contents)) + +(require 'with-package) + +(with-package (ace-jump-buffer haskell-mode python-mode htmlize + multiple-cursors column-marker + ;; ess ;; statistic + ;; key-chord ;; combination of keys for commands + ;; no-easy-keys + ;; pretty-symbols-mode ;; mode for pretty symbols + ;; auto-complete + ;; auto-complete-clang-async + ;; auto-complete-c-headers + ;; autopair + ;; column-marker + ;; fuzzy ;; better matching + ;; jedi + ;; maxframe + ;; nav + ;; yasnippet + notmuch + midnight + org-plus-contrib +)) + +(with-package* (evil evil-nerd-commenter evil-numbers) + (evil-mode t) + (define-key evil-normal-state-map "m" 'tabbar-forward-tab) + (define-key evil-normal-state-map "M" 'tabbar-backward-tab) + (define-key evil-normal-state-map " " 'ace-jump-buffer) + (define-key evil-normal-state-map (kbd ",ci") + 'evilnc-comment-or-uncomment-lines) + (define-key evil-normal-state-map (kbd ",cl") + 'evilnc-comment-or-uncomment-to-the-line)) + +(define-key evil-normal-state-map (kbd "RET") nil) +(define-key evil-motion-state-map (kbd "RET") nil) + +;; TODO: test this more +(with-package* key-chord + (key-chord-mode t) + (key-chord-define evil-insert-state-map "jk" 'evil-normal-state)) + +;; Evil surround mode. See https://github.com/timcharper/evil-surround +(with-package* surround + (global-surround-mode 1)) + +(with-package* anzu + (global-anzu-mode)) + +(with-package* solarized-theme + (message "Solarized theme loaded!") + (load-theme 'solarized-dark t)) + +;; loading zenburn retriggers this with-package call, so only call it once +;; (with-package* zenburn-theme +;; (unless (symbolp 'zenburn-loaded) +;; (setq 'zenburn-loaded t) +;; (load-theme 'zenburn))) + +(with-package* (ido ido-ubiquitous smex) + (ido-mode t) + (ido-everywhere t) + (setq ido-enable-flex-matching t) + (ido-ubiquitous-mode) + (setq ido-enable-last-directory-history nil + ido-record-commands nil + ido-max-work-directory-list 0 + ido-max-work-file-list 0) + (setq smex-save-file (concat user-emacs-directory ".smex-items")) + (global-set-key (kbd "M-x") 'smex)) + +(with-package* diminish + (diminish 'undo-tree-mode)) + +(show-paren-mode 1) +(global-linum-mode 1) + +;; chmod +x on save if shell script +;; (add-hook 'after-save-hook +;; 'executable-make-buffer-file-executable-if-script-p) + +;; see https://github.com/flycheck/flycheck +;; for all the additional dependencies. +(with-package* (flycheck flycheck-color-mode-line) + (setq flycheck-check-syntax-automatically (quote (save mode-enabled))) + ;; in case cabal isn't in path add path manually + ;; FIXME: don't do this always use -^ + (setq flycheck-haskell-hlint-executable "~/.cabal/bin/hlint") + (global-flycheck-mode t) + (add-hook 'flycheck-mode-hook 'flycheck-color-mode-line-mode)) + +(with-package magit + (define-key magit-status-mode-map (kbd "j") 'magit-goto-next-section) + (define-key magit-status-mode-map (kbd "k") 'magit-goto-previous-section) + (define-key magit-status-mode-map (kbd "n") 'magit-discard-item)) + +;;;; general +(setq tab-width 4) + +;;;; python +;; dependencies: pip install jedi epc +(with-package* jedi + (setq jedi:setup-keys t) + (setq jedi:complete-on-dot t) + (add-hook 'python-mode-hook 'jedi:setup)) + +;;;; C +(setq-default c-basic-offset 4) + +(add-hook 'prog-mode-hook + (lambda () + (font-lock-add-keywords nil + '(("\\<\\(FIX\\(ME\\)?\\|TODO\\|\ HACK\\|REFACTOR\\|NOCOMMIT\\):" + 1 font-lock-warning-face t))))) + +;; highlight with-package* +;; TODO: add-hook to emacs-lisp? +(font-lock-add-keywords + 'emacs-lisp-mode + '(("(\\(with-package\\*?\\)\\(?:\\s-+(?\\([^()]+\\))?\\)?" + (1 'font-lock-keyword-face) + (2 'font-lock-constant-face nil t)))) + +;; eval-and-replace +(global-set-key (kbd "C-c C-e") 'eval-and-replace) + +;; Font size +(define-key global-map (kbd "C-+") 'text-scale-increase) +(define-key global-map (kbd "C--") 'text-scale-decrease) + +;; Show trailing spaces, set whitespace tabs to dim grey and delete trailing +;; whitespaces on save. +;; Note: this will break hard line breaks for markdown. +;; TODO: Add exception for markdown-mode +;; TODO: whitespace cleanup? +;; (setq whitespace-style '(face tabs newline tab-mark) +;; whitespace-line-column 80 +;; whitespace-tab '(:foreground "dim gray" :weight bold)) +;; (global-whitespace-mode t) +;; (add-hook 'before-save-hook 'delete-trailing-whitespace) + +;; Marks the 81st column in a line. +;; (column-marker-1 80) + +(setq custom-file (concat user-emacs-directory "custom-var.el")) +(load custom-file) diff --git a/.emacs.d/org-fragments.el b/.emacs.d/org-fragments.el new file mode 100644 index 0000000..0e145ad --- /dev/null +++ b/.emacs.d/org-fragments.el @@ -0,0 +1,60 @@ + +** org-mode settings + +*** Increase front size of latex previews + +#+BEGIN_SRC emacs-lisp +(setq org-format-latex-options (plist-put 'org-format-latex-options :scale 2.0)) +#+END_SRC + +*** Other customizations +TODO: create subgroups + +#+BEGIN_SRC emacs-lisp +;; org-mode +;; active Babel languages +;; TODO: load on demand + (org-babel-do-load-languages + 'org-babel-load-languages + '((R . t) + (python . t) + )) + +(add-hook 'org-babel-after-execute-hook 'org-display-inline-images) +(add-hook 'org-mode-hook 'org-display-inline-images) +(setq org-confirm-babel-evaluate nil) +(setq org-export-html-validation-link nil) +(setq org-export-allow-BIND t) +(setq org-support-shift-select t) +(setq org-src-fontify-natively t) + + +;; iimage (show images inline) +;; (when window-system +;; (defun iimage-fix-underlining () +;; ;; (set-face-underline-p 'org-link nil) ;; deactivate underlining +;; ) ;; TODO: needing something better aka unclickable links + +;; (defun iimage-refresh-iimages () +;; "Hacked refresh" +;; (clear-image-cache nil) +;; (iimage-mode nil) +;; (iimage-mode t)) + +;; (add-hook 'org-mode-hook 'iimage-mode) +;; (add-hook 'after-save-hook 'iimage-refresh-iimages) +;; (add-hook 'iimage-mode-hook 'iimage-fix-underlining) +;; (iimage-mode nil) +;; (add-to-list 'iimage-mode-image-regex-alist +;; (cons (concat "\\[\\[file:\\(~?" iimage-mode-image-filename-regex +;; "\\)\\]") 1)) +;; ) +#+END_SRC + +** increase memory for tables + +#+BEGIN_SRC emacs-lisp +;; Increase memory for tables +(setq max-lisp-eval-depth '40000) +(setq max-specpdl-size '100000) +#+END_SRC diff --git a/.emacs.d/site-lisp/dconf-proxy.el b/.emacs.d/site-lisp/dconf-proxy.el new file mode 100644 index 0000000..954852a --- /dev/null +++ b/.emacs.d/site-lisp/dconf-proxy.el @@ -0,0 +1,14 @@ +(defun refresh-proxy-settings () + (interactive) + (if (string= (shell-command-to-string "dconf read /system/proxy/http/enabled") "true\n") + (setq url-proxy-services + `(("http" . + ,(concat + (car (split-string-and-unquote ;; split string to remove single quotes and newline + (shell-command-to-string "dconf read /system/proxy/http/host") '"'")) + ":" + (car (split-string-and-unquote ;; split string to remove newline + (shell-command-to-string "dconf read /system/proxy/http/port") '"\n")))))) + (setq url-proxy-services nil))) + +(provide 'dconf-proxy) diff --git a/.emacs.d/site-lisp/site-lisp-autoloads.el b/.emacs.d/site-lisp/site-lisp-autoloads.el new file mode 100644 index 0000000..2b1e039 --- /dev/null +++ b/.emacs.d/site-lisp/site-lisp-autoloads.el @@ -0,0 +1,5 @@ + +(autoload 'refresh-proxy-settings "dconf-proxy" "Refresh proxy settings" t) +(autoload 'eval-and-replace "util" "Eval and replace lisp expression" t) + +(provide 'site-lisp-autoloads) diff --git a/.emacs.d/site-lisp/util.el b/.emacs.d/site-lisp/util.el new file mode 100644 index 0000000..b5bdc10 --- /dev/null +++ b/.emacs.d/site-lisp/util.el @@ -0,0 +1,36 @@ +(defun eval-and-replace () + "Replace the preceding sexp with its value." + (interactive) + (forward-char) ;; for evil normal state + (backward-kill-sexp) + (condition-case nil + (prin1 (eval (read (current-kill 0))) + (current-buffer)) + (error (message "Invalid expression") + (insert (current-kill 0))))) + +(defun lorem () + "Insert a lorem ipsum." + (interactive) + (insert "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do " + "eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim" + "ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut " + "aliquip ex ea commodo consequat. Duis aute irure dolor in " + "reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla " + "pariatur. Excepteur sint occaecat cupidatat non proident, sunt in " + "culpa qui officia deserunt mollit anim id est laborum.")) + +(defun insert-date () + "Insert a time-stamp according to locale's date and time format." + (interactive) + (insert (format-time-string "%c" (current-time)))) + +(defun indent-buffer () + (interactive) + (indent-region (point-min) (point-max))) + +(defun untabify-buffer () + (interactive) + (untabify (point-min) (point-max))) + +(provide 'util) diff --git a/.emacs.d/site-lisp/with-package.el b/.emacs.d/site-lisp/with-package.el new file mode 100644 index 0000000..3dfc52d --- /dev/null +++ b/.emacs.d/site-lisp/with-package.el @@ -0,0 +1,31 @@ +(require 'cl) + +;; will be available at emacs 24.4 +(unless (fboundp 'with-eval-after-load) + "Do magic from the future" + (defmacro with-eval-after-load (file &rest body) + `(eval-after-load ,file + `(funcall (function ,(lambda () ,@body)))))) + +(defmacro with-package (packages &rest body) + "After pkg macro" + (declare (indent defun)) + (when (symbolp packages) ;; make a list if necessary + (setf packages (list packages))) + `(progn + (dolist (p ',packages) + (when (not (package-installed-p p)) + (package-install p)) + (with-eval-after-load p ,@body)))) + +(defmacro with-package* (packages &rest body) + "After pkg macro*" + (declare (indent defun)) + (when (symbolp packages) ;; make a list if necessary + (setf packages (list packages))) + `(prog1 + (with-package ,packages ,@body) + (dolist (p ',packages) + (require p)))) + +(provide 'with-package) diff --git a/.emacs.d/tools/libs/jpeg62.dll b/.emacs.d/tools/libs/jpeg62.dll new file mode 100644 index 0000000..21c03d5 Binary files /dev/null and b/.emacs.d/tools/libs/jpeg62.dll differ diff --git a/.emacs.d/tools/libs/libXpm.dll b/.emacs.d/tools/libs/libXpm.dll new file mode 100644 index 0000000..0dcb292 Binary files /dev/null and b/.emacs.d/tools/libs/libXpm.dll differ diff --git a/.emacs.d/tools/libs/libpng-config b/.emacs.d/tools/libs/libpng-config new file mode 100644 index 0000000..3c39bc9 --- /dev/null +++ b/.emacs.d/tools/libs/libpng-config @@ -0,0 +1,124 @@ +#! /bin/sh + +# libpng-config +# provides configuration info for libpng. + +# Copyright (C) 2002, 2004, 2006, 2007 Glenn Randers-Pehrson +# For conditions of distribution and use, see copyright notice in png.h + +# Modeled after libxml-config. + +version="1.2.37" +prefix="c:/progra~1/libpng" +exec_prefix="${prefix}" +libdir="${exec_prefix}/lib" +includedir="${prefix}/include/libpng12" +libs="-lpng12" +all_libs="-lpng12 -lz +I_opts="-I${includedir}" +L_opts="-L${libdir}" +R_opts="" +cppflags="" +ccopts="" +ldopts="" + +usage() +{ + cat < + +;; This file is NOT part of GNU Emacs. + +;; This program is free software; you can redistribute it and/or +;; modify it under the terms of the GNU General Public License +;; as published by the Free Software Foundation; either version 2 +;; of the License, or (at your option) any later version. +;; +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; This is to easily profile your Emacs init file (or any other +;; script-like Emacs Lisp file, for that matter). + +;; It will go over all sexp's (balanced expressions) in the file and +;; run them through `benchmark-run'. It will then show the file with +;; overlays applied in a way that let you easily find out which sexp's +;; take the most time. Since time is relative, it's not the absolute +;; value that counts but the percentage of the total running time. +;; +;; * All other sexp's with a percentage greater than +;; `profile-dotemacs-low-percentage' will be preceded by a +;; highlighted line, showing the results from `benchmark-run'. +;; Also, the more 'reddish' the background of the sexp, the more +;; time it needs. + +;; * All other sexp's will be grayed out to indicate that their +;; running time is miniscule. You can still see the benchmark +;; results in the minibuffer by hovering over the sexp with the +;; mouse. + +;; You can only benchmark full sexp's, so if you wrapped large parts +;; of your init file in some conditional clause, you'll have to remove +;; that for getting finer granularity. + +;;; Usage: + +;; Start emacs as follows: +;; +;; emacs -Q -l /profile-dotemacs.el -f profile-dotemacs +;; +;; with being the path to where this file resides. + +;;; Caveats (thanks to Raffaele Ricciardi for reporting those): + +;; - The usual `--debug-init' for debugging your init file won't work +;; with profile-dotemacs, so you'll have to call +;; `toggle-debug-on-error', either on the commandline or at the +;; beginning of your init file. +;; - `load-file-name' is nil when the init file is being loaded +;; by the profiler. This might matter if you perform the +;; bulk of initializations in a different file. +;; - Starting external shells like IELM or eshell in your init file +;; might mess with overlay creation, so this must not be done. + +;;; Download: + +;; You can always get the latest version from +;; http://randomsample.de/profile-dotemacs.el + +;;; Code: + +(require 'thingatpt) +(require 'benchmark) + +;; User variables + +(defvar profile-dotemacs-file "~/.emacs" + "File to be profiled.") + +(defvar profile-dotemacs-low-percentage 3 + "Percentage which should be considered low. +All sexp's with a running time below this percentage will be +grayed out.") + +(defface profile-dotemacs-time-face + '((((background dark)) (:background "OrangeRed1")) + (t (:background "red3"))) + "Background color to indicate percentage of total time.") + +(defface profile-dotemacs-low-percentage-face + '((((background dark)) (:foreground "gray25")) + (t (:foreground "gray75"))) + "Face for sexps below `profile-dotemacs-low-percentage'.") + +(defface profile-dotemacs-highlight-face + '((((background dark)) (:background "blue")) + (t (:background "yellow"))) + "Highlight face for benchmark results.") + +;; Main function + +(defun profile-dotemacs () + "Load `profile-dotemacs-file' and benchmark its sexps." + (interactive) + (with-current-buffer (find-file-noselect profile-dotemacs-file t) + (setq buffer-read-only t) ;; just to be sure + (goto-char (point-min)) + (let (start end results) + (while + (< (point) + (setq end (progn + (forward-sexp 1) + (point)))) + (forward-sexp -1) + (setq start (point)) + (add-to-list + 'results + `(,start ,end + ,(benchmark-run + (eval (sexp-at-point))))) + (goto-char end)) + (profile-dotemacs-show-results results) + (switch-to-buffer (current-buffer))))) + +;; Helper functions + +(defun profile-dotemacs-show-results (results) + "Show timings from RESULTS in current buffer." + (let ((totaltime (profile-dotemacs-totaltime results)) + current percentage ov) + (while results + (let* ((current (pop results)) + (ov (make-overlay (car current) (cadr current))) + (current (car (last current))) + (percentage (/ (+ (car current) (nth 2 current)) + totaltime)) + col benchstr lowface) + (setq col + (profile-dotemacs-percentage-color + percentage + (face-background 'default) + (face-background 'profile-dotemacs-time-face))) + (setq percentage (round (* 100 percentage))) + (setq benchstr (profile-dotemacs-make-benchstr current)) + (overlay-put ov 'help-echo benchstr) + (if (and (numberp profile-dotemacs-low-percentage) + (< percentage profile-dotemacs-low-percentage)) + (overlay-put ov 'face 'profile-dotemacs-low-percentage-face) + (overlay-put ov 'before-string + (propertize benchstr + 'face 'profile-dotemacs-highlight-face)) + (overlay-put ov 'face + `(:background ,col))))) + (setq ov (make-overlay (1- (point-max)) (point-max))) + (overlay-put ov 'after-string + (propertize + (format "\n-----------------\nTotal time: %.2fs\n" + totaltime) + 'face 'profile-dotemacs-highlight-face)))) + +(defun profile-dotemacs-totaltime (results) + "Calculate total time of RESULTS." + (let ((totaltime 0)) + (mapc (lambda (x) + (let ((cur (car (last x)))) + (setq totaltime (+ totaltime (car cur) (nth 2 cur))))) + results) + totaltime)) + +(defun profile-dotemacs-percentage-color (percent col-begin col-end) + "Calculate color according to PERCENT between COL-BEGIN and COL-END." + (let* ((col1 (color-values col-begin)) + (col2 (color-values col-end)) + (col + (mapcar (lambda (c) + (round + (+ (* (- 1 percent) (nth c col1)) + (* percent (nth c col2))))) + '(0 1 2)))) + (format "RGB:%04x/%04x/%04x" + (car col) + (nth 1 col) + (nth 2 col)))) + +(defun profile-dotemacs-make-benchstr (timings) + "Create descriptive benchmark string from TIMINGS." + (format + (concat + "\n") + percentage + (car timings) (nth 1 timings) (nth 2 timings))) + + +;; profile-dotemacs.el ends here diff --git a/.emacs.d/tools/profiler/run_profiler.el b/.emacs.d/tools/profiler/run_profiler.el new file mode 100644 index 0000000..39939c2 --- /dev/null +++ b/.emacs.d/tools/profiler/run_profiler.el @@ -0,0 +1,2 @@ +;; won't work unless .emacs exists +(eshell-command "emacs -Q -l ~/.emacs.d/tools/profiler/profile-dotemacs.el -f profile-dotemacs") diff --git a/.gdbinit b/.gdbinit new file mode 100644 index 0000000..9422460 --- /dev/null +++ b/.gdbinit @@ -0,0 +1 @@ +set disassembly-flavor intel diff --git a/.gitconfig b/.gitconfig new file mode 100644 index 0000000..78ac758 --- /dev/null +++ b/.gitconfig @@ -0,0 +1,12 @@ +[user] + name = Tharre + email = tharre3@gmail.com +[push] + default = simple +[alias] + lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%C(bold blue)<%an>%Creset' --abbrev-commit + la = log --oneline --decorate --all --graph +[branch] + autosetuprebase = always +[merge] + tool = vimdiff diff --git a/.gitignore b/.gitignore index dc3bd7d..079e568 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ *.pyc -shell/_vim/.netrwhist +.vim/.netrwhist .updated diff --git a/.gitmodules b/.gitmodules index 483fda4..83a2ad8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,45 +1,45 @@ [submodule "shell/_oh-my-zsh"] - path = shell/_oh-my-zsh + path = .oh-my-zsh url = https://github.com/robbyrussell/oh-my-zsh.git [submodule "shell/_vim/bundle/vim-pathogen"] - path = shell/_vim/bundle/vim-pathogen + path = .vim/bundle/vim-pathogen url = https://github.com/tpope/vim-pathogen.git [submodule "shell/_vim/bundle/vim-misc"] - path = shell/_vim/bundle/vim-misc + path = .vim/bundle/vim-misc url = https://github.com/xolox/vim-misc.git [submodule "shell/_vim/bundle/vim-airline"] - path = shell/_vim/bundle/vim-airline + path = .vim/bundle/vim-airline url = https://github.com/bling/vim-airline.git [submodule "shell/_vim/bundle/syntastic"] - path = shell/_vim/bundle/syntastic + path = .vim/bundle/syntastic url = https://github.com/scrooloose/syntastic.git [submodule "shell/_vim/bundle/nerdcommenter"] - path = shell/_vim/bundle/nerdcommenter + path = .vim/bundle/nerdcommenter url = https://github.com/scrooloose/nerdcommenter.git [submodule "shell/_vim/bundle/vim-surround"] - path = shell/_vim/bundle/vim-surround + path = .vim/bundle/vim-surround url = https://github.com/tpope/vim-surround.git [submodule "shell/_vim/bundle/jedi-vim"] - path = shell/_vim/bundle/jedi-vim + path = .vim/bundle/jedi-vim url = https://github.com/davidhalter/jedi-vim.git [submodule "shell/_vim/bundle/rust.vim"] - path = shell/_vim/bundle/rust.vim + path = .vim/bundle/rust.vim url = https://github.com/wting/rust.vim.git [submodule "shell/_vim/bundle/vim-ledger"] - path = shell/_vim/bundle/vim-ledger + path = .vim/bundle/vim-ledger url = https://github.com/ledger/vim-ledger.git [submodule "shell/_vim/bundle/vim-easy-align"] - path = shell/_vim/bundle/vim-easy-align + path = .vim/bundle/vim-easy-align url = https://github.com/junegunn/vim-easy-align.git [submodule "shell/_vim/bundle/vim-distinguished"] - path = shell/_vim/bundle/vim-distinguished + path = .vim/bundle/vim-distinguished url = https://github.com/Lokaltog/vim-distinguished.git [submodule "shell/_vim/bundle/gundo.vim"] - path = shell/_vim/bundle/gundo.vim + path = .vim/bundle/gundo.vim url = https://github.com/sjl/gundo.vim.git [submodule "shell/_vim/bundle/ctrlp.vim"] - path = shell/_vim/bundle/ctrlp.vim + path = .vim/bundle/ctrlp.vim url = https://github.com/ctrlpvim/ctrlp.vim.git [submodule "shell/_vim/bundle/vim-sleuth"] - path = shell/_vim/bundle/vim-sleuth + path = .vim/bundle/vim-sleuth url = https://github.com/tpope/vim-sleuth.git diff --git a/.gnupg/.gitignore b/.gnupg/.gitignore new file mode 100644 index 0000000..80d294a --- /dev/null +++ b/.gnupg/.gitignore @@ -0,0 +1,4 @@ +* +!.gitignore +!gpg-agent.conf +!gpg.conf diff --git a/.gnupg/gpg-agent.conf b/.gnupg/gpg-agent.conf new file mode 100644 index 0000000..85405bc --- /dev/null +++ b/.gnupg/gpg-agent.conf @@ -0,0 +1 @@ +enable-ssh-support diff --git a/.gnupg/gpg.conf b/.gnupg/gpg.conf new file mode 100644 index 0000000..585e888 --- /dev/null +++ b/.gnupg/gpg.conf @@ -0,0 +1,5 @@ +# needs long keyID, obtained with gpg --list-key --with-colons +trusted-key 5431BDE2C8F0B2F4 + +# store encrypted outgoing mails with my own public key +encrypt-to 0xC8F0B2F4 diff --git a/.makepkg.conf b/.makepkg.conf new file mode 100644 index 0000000..2d44f5a --- /dev/null +++ b/.makepkg.conf @@ -0,0 +1,8 @@ +DLAGENTS+=('hib::/usr/bin/hib-dlagent -u tharre3@gmail.com -o %o %u') + +MAKEFLAGS="-j$(nproc)" + +COMPRESSXZ=(xz -T 0 -c -z -) + +# Don't compress packages +PKGEXT='.pkg.tar' diff --git a/.msmtprc b/.msmtprc new file mode 100644 index 0000000..3887133 --- /dev/null +++ b/.msmtprc @@ -0,0 +1,12 @@ +account gmail +host smtp.gmail.com +port 587 +protocol smtp +auth on +from tharre3@gmail.com +user tharre3@gmail.com +passwordeval "pass email/tharre3@gmail.com" +tls on +tls_trust_file ~/.mutt/Equifax_Secure_CA.cert + +account default : gmail diff --git a/.mutt/Equifax_Secure_CA.cert b/.mutt/Equifax_Secure_CA.cert new file mode 100644 index 0000000..c3e1112 --- /dev/null +++ b/.mutt/Equifax_Secure_CA.cert @@ -0,0 +1,17 @@ +-----BEGIN CERTIFICATE----- +MIIDIDCCAomgAwIBAgIENd70zzANBgkqhkiG9w0BAQUFADBOMQswCQYDVQQGEwJVUzEQMA4GA1UE +ChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2VydGlmaWNhdGUgQXV0aG9yaXR5 +MB4XDTk4MDgyMjE2NDE1MVoXDTE4MDgyMjE2NDE1MVowTjELMAkGA1UEBhMCVVMxEDAOBgNVBAoT +B0VxdWlmYXgxLTArBgNVBAsTJEVxdWlmYXggU2VjdXJlIENlcnRpZmljYXRlIEF1dGhvcml0eTCB +nzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAwV2xWGcIYu6gmi0fCG2RFGiYCh7+2gRvE4RiIcPR +fM6fBeC4AfBONOziipUEZKzxa1NfBbPLZ4C/QgKO/t0BCezhABRP/PvwDN1Dulsr4R+AcJkVV5MW +8Q+XarfCaCMczE1ZMKxRHjuvK9buY0V7xdlfUNLjUA86iOe/FP3gx7kCAwEAAaOCAQkwggEFMHAG +A1UdHwRpMGcwZaBjoGGkXzBdMQswCQYDVQQGEwJVUzEQMA4GA1UEChMHRXF1aWZheDEtMCsGA1UE +CxMkRXF1aWZheCBTZWN1cmUgQ2VydGlmaWNhdGUgQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMBoG +A1UdEAQTMBGBDzIwMTgwODIyMTY0MTUxWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUSOZo+SvS +spXXR9gjIBBPM5iQn9QwHQYDVR0OBBYEFEjmaPkr0rKV10fYIyAQTzOYkJ/UMAwGA1UdEwQFMAMB +Af8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEBBQUAA4GBAFjOKer89961 +zgK5F7WF0bnj4JXMJTENAKaSbn+2kmOeUJXRmm/kEd5jhW6Y7qj/WsjTVbJmcVfewCHrPSqnI0kB +BIZCe/zuf6IWUrVnZ9NA2zsmWLIodz2uFHdh1voqZiegDfqnc1zqcPGUIWVEX/r87yloqaKHee95 +70+sB3c4 +-----END CERTIFICATE----- \ No newline at end of file diff --git a/.mutt/colors.muttrc b/.mutt/colors.muttrc new file mode 100644 index 0000000..25c8dda --- /dev/null +++ b/.mutt/colors.muttrc @@ -0,0 +1,65 @@ +# vim: filetype=muttrc + +# colors: white black green magenta blue cyan yellow red default colorx + +color normal color245 color233 +color error color124 color233 +color tilde color245 color233 +color message yellow color233 +color markers yellow color233 +color attachment color221 color233 +color search color48 color240 # how to hilite search patterns in the pager +color status color42 color237 +color indicator color220 color88 + +# Index +color tree color124 color233 # arrow in threads +color index color184 color233 "~N~p" # message to myself (new) +color index color130 color233 "~p" # message to myself +color index color137 color233 "~Q" # messages replied to +color index color70 color233 "~P" # message from myself +color index color220 color233 ~N # new +color index color208 color233 ~U # unread +color index color142 color233 ~O # old +color index color91 color233 ~T # tagged +color index color238 color233 "~D(!~p|~p)" # deleted +color index color196 color233 ~F # flagged +color index color250 color233 "~A!~N!~T!~p!~Q!~F!~D!~P" # the rest +color index color220 color233 "~A~N!~T!~p!~Q!~F!~D" # the rest +color index color232 color124 ~= # duplicate messages + + +color header color74 color233 "^From" +color header color88 color233 "^Date" +color header color166 color233 "^(Subject)" +color header color244 color233 "^(To|Reply-To|Cc|Bcc):" +color header color245 color233 "^(X-Original-To):" +color header color96 color233 "^(User-Agent|X-Editor|X-Mailer):" +color header cyan color233 "^Organization:" + +# Body +color quoted color24 color233 +color quoted1 color28 color233 +color quoted2 color94 color233 +color quoted3 color88 color233 +color signature color238 color233 +color bold green color233 +color underline color208 color233 +color normal color250 color233 +color body color39 color233 "(finger|ftp|http|news|telnet)://[^ >]*" +color body color39 color233 "" +color body cyan color233 "www\\.[-.a-z0-9]+\\.[a-z][a-z][a-z]?([-_./~a-z0-9]+)?" +color body green color233 "[[:alnum:]][-+.#_[:alnum:]]*@[-+.[:alnum:]]*[[:alnum:]]" +color body brightred color233 "mailto: *[^ ]+\(\\?subject=[^ ]+\)?" +color body color178 color233 "[;:][-o][)/(|]" +color body color178 color233 "[;:][)(|]" +color body color178 color233 "[*]?((N)?ACK|CU|LOL|SCNR|BRB|BTW|CWYL|FWIW|vbg|GD&R|HTH|HTHBE|IMHO|IMNSHO|IRL|RTFM|ROTFL|ROFL|YMMV)[*]?" +color body color178 color233 "[ ][*][^*]*[*][ ]?" +color body color178 color233 "[ ]?[*][^*]*[*][ ]" +color body brightred color233 "(BAD signature)" +color body green color233 "(Good signature)" +color body color208 color233 "(heipei|hackvalue|Jojo|Gilger|Johannes)" + +color hdrdefault color238 color233 +color body color128 color233 '[-.+\w]+@[-.\w]+[^.]' # e-mail addresses +color underline brightgreen color233 diff --git a/.mutt/gpg.muttrc b/.mutt/gpg.muttrc new file mode 100644 index 0000000..bb9a5a7 --- /dev/null +++ b/.mutt/gpg.muttrc @@ -0,0 +1,11 @@ +# Use GPGME +set crypt_use_gpgme = yes + +# Automatically sign all outgoing mails +set crypt_autosign = yes + +# Encrypt replies to encrypted mail +set crypt_replyencrypt = yes + +# Attempt to verify email signatures automatically +set crypt_verify_sig = yes diff --git a/.mutt/muttrc b/.mutt/muttrc new file mode 100644 index 0000000..bd1c83a --- /dev/null +++ b/.mutt/muttrc @@ -0,0 +1,133 @@ +# Paths ---------------------------------------------- +set folder = ~/.mail # mailbox location +set alias_file = ~/.mutt/alias # where to store aliases +set header_cache = ~/.mutt/cache/headers # where to store headers +set message_cachedir = ~/.mutt/cache/bodies # where to store bodies +set certificate_file = ~/.mutt/certificates # where to store certs +set mailcap_path = ~/.mutt/mailcap # entries for filetypes +set tmpdir = ~/.mutt/temp # where to keep temp files +set signature = ~/.mutt/sig # my signature file + +# Basic Options -------------------------------------- +set wait_key = no # shut up, mutt +set mbox_type = Maildir # mailbox type +set timeout = 3 # idle time before scanning +set mail_check = 0 # minimum time between scans +unset move # gmail does that +set delete # don't ask, just do +unset confirmappend # don't ask, just do! +set quit # don't ask, just do!! +unset mark_old # read/new is good enough for me +set beep_new # bell on new mails +set pipe_decode # strip headers and eval mimes when piping +set thorough_search # strip headers and eval mimes before searching + +# Status Bar ----------------------------------------- +set status_chars = " *%A" +set status_format = "───[ Folder: %f ]───[%r%m messages%?n? (%n new)?%?d? (%d to delete)?%?t? (%t tagged)? ]───%>─%?p?( %p postponed )?───" + +# Header Options ------------------------------------- +ignore * # ignore all headers +unignore from: to: cc: date: subject: # show only these +unhdr_order * # some distros order things by default +hdr_order from: to: cc: date: subject: # and in this order + +# Account Settings ----------------------------------- + +# Default inbox. +set spoolfile = "+tharre3@gmail.com/INBOX" + +# Alternate email addresses. +#alternates sjl@pculture.org still\.?life@gmail.com steve@ladyluckblues.com steve@pculture.org + +# Mailboxes to show in the sidebar. +mailboxes +tharre3@gmail.com/INBOX \ + +tharre3@gmail.com/Archives \ + +tharre3@gmail.com/sent \ + +tharre3@gmail.com/drafts \ + +# Other special folders. +set mbox = "+tharre3@gmail.com/Archives" +set postponed = "+tharre3@gmail.com/drafts" + +# Index View Options --------------------------------- +set date_format = "%m/%d" +set index_format = "[%Z] %D %-20.20F %s" +set sort = threads # like gmail +set sort_aux = reverse-last-date-received # like gmail +set uncollapse_jump # don't collapse on an unread message +set sort_re # thread based on regex +set reply_regexp = "^(([Rr][Ee]?(\[[0-9]+\])?: *)?(\[[^]]+\] *)?)*" + +# Index Key Bindings --------------------------------- +bind index gg first-entry +bind index G last-entry + +# don't skip over deleted messages +bind index j next-entry +bind index k previous-entry + +bind index R group-reply +bind index sync-mailbox +bind index collapse-thread + +# Ctrl-R to mark all as read +macro index \Cr "T~UN." "mark all messages as read" + +# Sync email +macro index O "offlineimap" "run offlineimap to sync all mail" +macro index o "offlineimap -qf INBOX" "run offlineimap to sync inbox" + +# Saner copy/move dialogs +macro index C "?" "copy a message to a mailbox" +macro index M "?" "move a message to a mailbox" + +# Pager View Options --------------------------------- +set pager_index_lines = 10 # number of index lines to show +set pager_context = 3 # number of context lines to show +set pager_stop # don't go to next message automatically +set menu_scroll # scroll in menus +set tilde # show tildes like in vim +unset markers # no ugly plus signs + +set quote_regexp = "^( {0,4}[>|:#%]| {0,4}[a-z0-9]+[>|]+)+" +alternative_order text/plain text/enriched text/html + +# Pager Key Bindings --------------------------------- +bind pager k previous-line +bind pager j next-line +bind pager gg top +bind pager G bottom + +bind pager R group-reply + +# View attachments properly. +bind attach view-mailcap + +# Compose View Options ------------------------------- +set realname = "Unkown" # who am i? +set envelope_from # which from? +set sig_dashes # dashes before sig +set edit_headers # show headers when composing +set fast_reply # skip to compose when replying +set askcc # ask for CC: +set fcc_attach # save attachments with the body +unset mime_forward # forward attachments as part of body +set forward_format = "Fwd: %s" # format of subject when forwarding +set forward_decode # decode when forwarding +set attribution = "On %d, %n wrote:" # format of quoting header +set reply_to # reply to Reply to: field +set reverse_name # reply as whomever it was to +set include # include message in replies +set forward_quote # include message in forwards + +# vim FTW +set editor='vim + -c "set textwidth=72 expandtab"' + +set from = "tharre3@gmail.com" +set sendmail = "/usr/bin/msmtp -a gmail" +set sendmail_wait = 0 +unset record + +source ~/.mutt/colors.muttrc +source ~/.mutt/gpg.muttrc diff --git a/.mutt/offlineimap.py b/.mutt/offlineimap.py new file mode 100644 index 0000000..c358caa --- /dev/null +++ b/.mutt/offlineimap.py @@ -0,0 +1,5 @@ +#!/bin/python +from subprocess import check_output + +def get_pass(account): + return check_output("pass email/"+account, shell=True).rstrip() diff --git a/.mutt/sig b/.mutt/sig new file mode 100644 index 0000000..255bdcb --- /dev/null +++ b/.mutt/sig @@ -0,0 +1 @@ +PGP ID: 0xC8F0B2F4 diff --git a/.mutt/temp/.gitignore b/.mutt/temp/.gitignore new file mode 100644 index 0000000..5e7d273 --- /dev/null +++ b/.mutt/temp/.gitignore @@ -0,0 +1,4 @@ +# Ignore everything in this directory +* +# Except this file +!.gitignore diff --git a/.offlineimaprc b/.offlineimaprc new file mode 100644 index 0000000..b74910b --- /dev/null +++ b/.offlineimaprc @@ -0,0 +1,43 @@ +[general] +ui = TTY.TTYUI +accounts = Tharre +pythonfile=~/.mutt/offlineimap.py +fsync = False + +[Account Tharre] +localrepository = Tharre-Local +remoterepository = Tharre-Remote +status_backend = sqlite +postsynchook = notmuch new + +[Repository Tharre-Local] +type = Maildir +localfolders = ~/.mail/tharre3@gmail.com +nametrans = lambda folder: {'drafts': '[Gmail]/Drafts', + 'sent': '[Gmail]/Sent Mail', + 'flagged': '[Gmail]/Starred', + 'trash': '[Gmail]/Trash', + 'archive': '[Gmail]/All Mail', + }.get(folder, folder) + +[Repository Tharre-Remote] +maxconnections = 8 +type = Gmail +remoteuser = tharre3@gmail.com +remotepasseval = get_pass("tharre3@gmail.com") +realdelete = no +# Necessary as of OfflineIMAP 6.5.4 +sslcacertfile = /etc/ssl/certs/ca-certificates.crt +nametrans = lambda folder: {'[Gmail]/Drafts': 'drafts', + '[Gmail]/Sent Mail': 'sent', + '[Gmail]/Starred': 'flagged', + '[Gmail]/Trash': 'trash', + '[Gmail]/All Mail': 'archive', + }.get(folder, folder) +folderfilter = lambda folder: folder not in ['[Gmail]/Trash', + 'Nagios', + 'Django', + 'Flask', + '[Gmail]/Important', + '[Gmail]/Spam', + ] diff --git a/.oh-my-zsh b/.oh-my-zsh new file mode 160000 index 0000000..644bc64 --- /dev/null +++ b/.oh-my-zsh @@ -0,0 +1 @@ +Subproject commit 644bc641ad48c74c88631d79d48ec9b6f3f5a3e5 diff --git a/.tmux.conf b/.tmux.conf new file mode 100644 index 0000000..9ee9f96 --- /dev/null +++ b/.tmux.conf @@ -0,0 +1,11 @@ +set -g prefix C-x +bind C-x send-prefix +unbind C-b + +set -g default-terminal "screen-256color" + +set -g base-index 1 # start window numbering with 1 + +bind-key r source-file ~/.tmux.conf \; display "Config reloaded!" + +if-shell "test -e ~/.tmux.conf.local" "source-file ~/.tmux.conf.local" diff --git a/.vim/bundle/ctrlp.vim b/.vim/bundle/ctrlp.vim new file mode 160000 index 0000000..7a80267 --- /dev/null +++ b/.vim/bundle/ctrlp.vim @@ -0,0 +1 @@ +Subproject commit 7a80267ed061f3dc30bb319f438bdadfd8c7b1fd diff --git a/.vim/bundle/gundo.vim b/.vim/bundle/gundo.vim new file mode 160000 index 0000000..dd5ab1e --- /dev/null +++ b/.vim/bundle/gundo.vim @@ -0,0 +1 @@ +Subproject commit dd5ab1e930deb8c74ea9046654dd0587df0cf459 diff --git a/.vim/bundle/jedi-vim b/.vim/bundle/jedi-vim new file mode 160000 index 0000000..dc23f0b --- /dev/null +++ b/.vim/bundle/jedi-vim @@ -0,0 +1 @@ +Subproject commit dc23f0b859d3b5c087921b68cf7cd66803ecca83 diff --git a/.vim/bundle/nerdcommenter b/.vim/bundle/nerdcommenter new file mode 160000 index 0000000..1f4bfd5 --- /dev/null +++ b/.vim/bundle/nerdcommenter @@ -0,0 +1 @@ +Subproject commit 1f4bfd59920c101a30a74a07b824608a6e65f3fe diff --git a/.vim/bundle/rust.vim b/.vim/bundle/rust.vim new file mode 160000 index 0000000..2450ecf --- /dev/null +++ b/.vim/bundle/rust.vim @@ -0,0 +1 @@ +Subproject commit 2450ecf3091cc7c2711ca9f00eae8e3bedd04376 diff --git a/.vim/bundle/syntastic b/.vim/bundle/syntastic new file mode 160000 index 0000000..06a8469 --- /dev/null +++ b/.vim/bundle/syntastic @@ -0,0 +1 @@ +Subproject commit 06a8469556bca04d2276917b1043e25cfa6ec81c diff --git a/.vim/bundle/vim-airline b/.vim/bundle/vim-airline new file mode 160000 index 0000000..14d14cf --- /dev/null +++ b/.vim/bundle/vim-airline @@ -0,0 +1 @@ +Subproject commit 14d14cf951c08fc88ca6c3e6f28fe47b99421e23 diff --git a/.vim/bundle/vim-distinguished b/.vim/bundle/vim-distinguished new file mode 160000 index 0000000..62b360d --- /dev/null +++ b/.vim/bundle/vim-distinguished @@ -0,0 +1 @@ +Subproject commit 62b360dc81355b53d124cd06218a9ba2496563fc diff --git a/.vim/bundle/vim-easy-align b/.vim/bundle/vim-easy-align new file mode 160000 index 0000000..7cb559e --- /dev/null +++ b/.vim/bundle/vim-easy-align @@ -0,0 +1 @@ +Subproject commit 7cb559eb70600bbd81afbb2d7f60d98334f631e2 diff --git a/.vim/bundle/vim-ledger b/.vim/bundle/vim-ledger new file mode 160000 index 0000000..0ebef8f --- /dev/null +++ b/.vim/bundle/vim-ledger @@ -0,0 +1 @@ +Subproject commit 0ebef8fcb5962602c6062ddbd07bada4df0af8b5 diff --git a/.vim/bundle/vim-misc b/.vim/bundle/vim-misc new file mode 160000 index 0000000..3e6b8fb --- /dev/null +++ b/.vim/bundle/vim-misc @@ -0,0 +1 @@ +Subproject commit 3e6b8fb6f03f13434543ce1f5d24f6a5d3f34f0b diff --git a/.vim/bundle/vim-pathogen b/.vim/bundle/vim-pathogen new file mode 160000 index 0000000..b4174e4 --- /dev/null +++ b/.vim/bundle/vim-pathogen @@ -0,0 +1 @@ +Subproject commit b4174e4d1a16e7f0c5c6dfca923269a20a9f50c2 diff --git a/.vim/bundle/vim-sleuth b/.vim/bundle/vim-sleuth new file mode 160000 index 0000000..a174627 --- /dev/null +++ b/.vim/bundle/vim-sleuth @@ -0,0 +1 @@ +Subproject commit a17462708aa40a7fc0afd4effa559087d8a2c908 diff --git a/.vim/bundle/vim-surround b/.vim/bundle/vim-surround new file mode 160000 index 0000000..2d05440 --- /dev/null +++ b/.vim/bundle/vim-surround @@ -0,0 +1 @@ +Subproject commit 2d05440ad23f97a7874ebd9b5de3a0e65d25d85c diff --git a/.vimrc b/.vimrc new file mode 100644 index 0000000..a73485a --- /dev/null +++ b/.vimrc @@ -0,0 +1,115 @@ +" Plugins for review: +" 'msanders/snipmate.vim' +" 'godlygeek/tabular' +" 'plasticboy/vim-markdown' +" Consider using sections like this: +" Section Name {{{ +" set number "This will be folded +" }}} + +runtime bundle/vim-pathogen/autoload/pathogen.vim +execute pathogen#infect() +execute pathogen#helptags() +set nocompatible " Be iMproved +let mapleader="," " set leader early as otherwise it wouldn't work +filetype plugin indent on + +" ========== general settings ========== +set encoding=utf-8 +set ff=unix +set number +set clipboard=unnamedplus +set showmatch " show matching brackets + +set incsearch " Find as you type search +set hlsearch " Highlight search terms +set ignorecase " Case-insensitive searching. +set smartcase " But case-sensitive if expression contains a capital letter. + +set history=1000 " remember more commands and search history +set undolevels=1000 " use many levels of undo + +set nobackup +set noswapfile + +set tabstop=4 +set shiftwidth=4 +set textwidth=80 +set cc=81 +"set expandtab + +syntax enable +set background=dark +colorscheme distinguished + +set list +set listchars=tab:>-,trail:~ + +set lazyredraw +set wildmenu + +set relativenumber + +set wildignore+=*.a,*.o,*.class +set wildignore+=*.bmp,*.gif,*.ico,*.jpg,*.jpeg,*.png +set wildignore+=.DS_Store,.git,.hg,.svn +set wildignore+=*~,*.swp,*.tmp + +" jk is escape +inoremap jk + +augroup reload_vimrc " { + autocmd! + autocmd BufWritePost $MYVIMRC source $MYVIMRC +augroup END " } + +map 1 :diffget 2 :diffupdate +map 2 :diffget 3 :diffupdate +map 3 :diffget 4 :diffupdate + +map Q @ +map :tabprevious +map m :tabnext + +" remove trailing whitespaces on save +autocmd BufWritePre * :%s/\s\+$//e + +" save file with root permissions +cmap w!! w !sudo tee % >/dev/null + +" turn off search highlight +nnoremap :nohlsearch + +" ========== file specific settings ========== +" Markdown +autocmd BufRead,BufNew *.md set filetype=markdown + +" java +au BufNewFile,BufRead *.java set tabstop=4 softtabstop=4 shiftwidth=4 smarttab autoindent cc=121 + +" ========== plugin settings ========== +" airline +set laststatus=2 +let g:airline_theme = 'powerlineish' +"let g:airline#extensions#tabline#enabled = 1 " make tabs look crazy +" only enable trailing whitespace checking +let g:airline#extensions#whitespace#checks = [ 'trailing' ] +let g:airline#extensions#syntastic#enabled = 0 + +" Start interactive EasyAlign in visual mode (e.g. vip) +vmap (EasyAlign) + +" Start interactive EasyAlign for a motion/text object (e.g. gaip) +nmap ga (EasyAlign) + +" toggle gundo +nnoremap u :GundoToggle + +" eclim +nmap a :JavaImportOrganize +nmap t :ProjectTree +nmap o :ProjectOpen + +" ctrlp +let g:ctrlp_max_files = 1000000 +let g:ctrlp_cmd = 'CtrlPMixed' diff --git a/.zshrc b/.zshrc new file mode 100644 index 0000000..379fa0c --- /dev/null +++ b/.zshrc @@ -0,0 +1,181 @@ +# Path to your oh-my-zsh installation. +export ZSH=$HOME/.oh-my-zsh + +# Set name of the theme to load. +# Look in ~/.oh-my-zsh/themes/ +# Optionally, if you set this to "random", it'll load a random theme each +# time that oh-my-zsh is loaded. +ZSH_THEME="custom" + +# Uncomment the following line to use case-sensitive completion. +# CASE_SENSITIVE="true" + +# Uncomment the following line to use hyphen-insensitive completion. Case +# sensitive completion must be off. _ and - will be interchangeable. +# HYPHEN_INSENSITIVE="true" + +# Uncomment the following line to disable bi-weekly auto-update checks. +DISABLE_AUTO_UPDATE="true" + +# Uncomment the following line to change how often to auto-update (in days). +# export UPDATE_ZSH_DAYS=13 + +# Uncomment the following line to disable colors in ls. +# DISABLE_LS_COLORS="true" + +# Uncomment the following line to disable auto-setting terminal title. +# DISABLE_AUTO_TITLE="true" + +# Uncomment the following line to enable command auto-correction. +# ENABLE_CORRECTION="true" + +# Uncomment the following line to display red dots whilst waiting for completion. +COMPLETION_WAITING_DOTS="true" + +# Uncomment the following line if you want to disable marking untracked files +# under VCS as dirty. This makes repository status check for large repositories +# much, much faster. +# DISABLE_UNTRACKED_FILES_DIRTY="true" + +# Uncomment the following line if you want to change the command execution time +# stamp shown in the history command output. +# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" +# HIST_STAMPS="mm/dd/yyyy" + +# Would you like to use another custom folder than $ZSH/custom? +ZSH_CUSTOM=~/dotfiles/zsh-custom + +# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) +# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ +# Example format: plugins=(rails git textmate ruby lighthouse) +# Add wisely, as too many plugins slow down shell startup. +plugins=(git) + +source $ZSH/oh-my-zsh.sh + +## functions +function noproxy { + unset http_proxy https_proxy HTTP_PROXY HTTPS_PROXY ftp_proxy FTP_PROXY no_proxy + + # change dconf + dconf reset -f /system/proxy/ + + proxy_update +} + + function setproxy { + base_proxy="proxy.domain.com" + base_proxy_port=8080 + + dconf_proxy="'$base_proxy'" + env_proxy="http://$base_proxy:$base_proxy_port" + + http_proxy=$env_proxy + HTTP_PROXY=$env_proxy + https_proxy=$env_proxy + HTTPS_PROXY=$env_proxy + ftp_proxy=$env_proxy + FTP_PROXY=$env_proxy + no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com" + export http_proxy https_proxy HTTP_PROXY HTTPS_PROXY ftp_proxy FTP_PROXY no_proxy + + # change dconf + dconf write /system/proxy/mode "'manual'" + dconf write /system/proxy/ignore-hosts "['localhost', '127.0.0.0/8', '10.0.0.0/8', '192.168.0.0/16', '172.16.0.0/12']" + dconf write /system/proxy/http/enabled true + dconf write /system/proxy/http/host "$dconf_proxy" + dconf write /system/proxy/http/port "$base_proxy_port" + dconf write /system/proxy/https/host "$dconf_proxy" + dconf write /system/proxy/https/port "$base_proxy_port" + dconf write /system/proxy/ftp/host "$dconf_proxy" + dconf write /system/proxy/ftp/port "$base_proxy_port" + + proxy_update +} + +# restart/reload applications for proxy settings to take effect +function proxy_update { + killall -q dropbox + dropbox-cli start +} + +function 256color_test { + ( x=`tput op` y=`printf %$((${COLUMNS}-6))s`; + for i in {0..256}; + do + o=00$i; + echo -e ${o:${#o}-3:3} `tput setaf $i;tput setab $i`${y// /=}$x; + done ) +} + +# requires youtube-dl, mpv +function play { + # Skip DASH manifest for speed purposes. This might actually disable + # being able to specify things like 'bestaudio' as the requested format, + # but try anyway. + # Use "$*" so that quoting the requested song isn't necessary. + mpv $(youtube-dl --default-search=ytsearch: \ + --max-downloads 1 \ + --youtube-skip-dash-manifest \ + --format="bestaudio" \ + -g "$*") +} + +# update +function update_dotfiles() { + dotfiles="$HOME/dotfiles" + epoch_file="$dotfiles/.updated" + epoch_curr=$(date +'%s') + [ -e "$epoch_file" ] && epoch_old=$(<"$epoch_file") + epoch_diff=$(($epoch_curr - ${epoch_old:-0})) + max_time=$((60 * 60 * 24 * 7)) + + if [ $(($epoch_diff / $max_time)) -ne 0 ]; then + echo "Updating dotfiles ..." + + cd "$dotfiles" + git pull --rebase --stat origin master + echo $epoch_curr > "$epoch_file" + ./install.sh + cd - + + echo "Finished." + fi +} + +## PATH +export PATH=$PATH:$HOME/bin + +## alias + +alias xclip="xclip -selection c" +alias open="xdg-open" + +## env +export EDITOR=vim + +# force 256 color mode +if [ -n "$TMUX" ]; then + export TERM=screen-256color +else + export TERM=xterm-256color +fi + +# use gpg-agent as ssh-agent +gpg-connect-agent /bye > /dev/null 2>&1 +export SSH_AUTH_SOCK="$HOME/.gnupg/S.gpg-agent.ssh" + +## zsh options + +bindkey -M viins ' ' magic-space +setopt EXTENDED_GLOB +HISTSIZE=100000000 + +## startup +update_dotfiles + +if type "archey" > /dev/null; then + archey # nice system information and arch logo +fi + +[ -e ~/TODO ] && cat ~/TODO diff --git a/config/user-dirs.dirs b/config/user-dirs.dirs deleted file mode 100644 index a3c4c61..0000000 --- a/config/user-dirs.dirs +++ /dev/null @@ -1,15 +0,0 @@ -# This file is written by xdg-user-dirs-update -# If you want to change or add directories, just edit the line you're -# interested in. All local changes will be retained on the next run -# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped -# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an -# absolute path. No other format is supported. -# -XDG_DESKTOP_DIR="$HOME/var/desktop" -XDG_DOWNLOAD_DIR="$HOME/var/downloads" -XDG_TEMPLATES_DIR="$HOME/var/templates" -XDG_PUBLICSHARE_DIR="$HOME/share/public" -XDG_DOCUMENTS_DIR="$HOME/var/documents" -XDG_MUSIC_DIR="$HOME/media/music" -XDG_PICTURES_DIR="$HOME/media/pictures" -XDG_VIDEOS_DIR="$HOME/media/videos" diff --git a/email/_msmtprc b/email/_msmtprc deleted file mode 100644 index 3887133..0000000 --- a/email/_msmtprc +++ /dev/null @@ -1,12 +0,0 @@ -account gmail -host smtp.gmail.com -port 587 -protocol smtp -auth on -from tharre3@gmail.com -user tharre3@gmail.com -passwordeval "pass email/tharre3@gmail.com" -tls on -tls_trust_file ~/.mutt/Equifax_Secure_CA.cert - -account default : gmail diff --git a/email/_mutt/Equifax_Secure_CA.cert b/email/_mutt/Equifax_Secure_CA.cert deleted file mode 100644 index c3e1112..0000000 --- a/email/_mutt/Equifax_Secure_CA.cert +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDIDCCAomgAwIBAgIENd70zzANBgkqhkiG9w0BAQUFADBOMQswCQYDVQQGEwJVUzEQMA4GA1UE -ChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2VydGlmaWNhdGUgQXV0aG9yaXR5 -MB4XDTk4MDgyMjE2NDE1MVoXDTE4MDgyMjE2NDE1MVowTjELMAkGA1UEBhMCVVMxEDAOBgNVBAoT -B0VxdWlmYXgxLTArBgNVBAsTJEVxdWlmYXggU2VjdXJlIENlcnRpZmljYXRlIEF1dGhvcml0eTCB -nzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAwV2xWGcIYu6gmi0fCG2RFGiYCh7+2gRvE4RiIcPR -fM6fBeC4AfBONOziipUEZKzxa1NfBbPLZ4C/QgKO/t0BCezhABRP/PvwDN1Dulsr4R+AcJkVV5MW -8Q+XarfCaCMczE1ZMKxRHjuvK9buY0V7xdlfUNLjUA86iOe/FP3gx7kCAwEAAaOCAQkwggEFMHAG -A1UdHwRpMGcwZaBjoGGkXzBdMQswCQYDVQQGEwJVUzEQMA4GA1UEChMHRXF1aWZheDEtMCsGA1UE -CxMkRXF1aWZheCBTZWN1cmUgQ2VydGlmaWNhdGUgQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMBoG -A1UdEAQTMBGBDzIwMTgwODIyMTY0MTUxWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUSOZo+SvS -spXXR9gjIBBPM5iQn9QwHQYDVR0OBBYEFEjmaPkr0rKV10fYIyAQTzOYkJ/UMAwGA1UdEwQFMAMB -Af8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEBBQUAA4GBAFjOKer89961 -zgK5F7WF0bnj4JXMJTENAKaSbn+2kmOeUJXRmm/kEd5jhW6Y7qj/WsjTVbJmcVfewCHrPSqnI0kB -BIZCe/zuf6IWUrVnZ9NA2zsmWLIodz2uFHdh1voqZiegDfqnc1zqcPGUIWVEX/r87yloqaKHee95 -70+sB3c4 ------END CERTIFICATE----- \ No newline at end of file diff --git a/email/_mutt/colors.muttrc b/email/_mutt/colors.muttrc deleted file mode 100644 index 25c8dda..0000000 --- a/email/_mutt/colors.muttrc +++ /dev/null @@ -1,65 +0,0 @@ -# vim: filetype=muttrc - -# colors: white black green magenta blue cyan yellow red default colorx - -color normal color245 color233 -color error color124 color233 -color tilde color245 color233 -color message yellow color233 -color markers yellow color233 -color attachment color221 color233 -color search color48 color240 # how to hilite search patterns in the pager -color status color42 color237 -color indicator color220 color88 - -# Index -color tree color124 color233 # arrow in threads -color index color184 color233 "~N~p" # message to myself (new) -color index color130 color233 "~p" # message to myself -color index color137 color233 "~Q" # messages replied to -color index color70 color233 "~P" # message from myself -color index color220 color233 ~N # new -color index color208 color233 ~U # unread -color index color142 color233 ~O # old -color index color91 color233 ~T # tagged -color index color238 color233 "~D(!~p|~p)" # deleted -color index color196 color233 ~F # flagged -color index color250 color233 "~A!~N!~T!~p!~Q!~F!~D!~P" # the rest -color index color220 color233 "~A~N!~T!~p!~Q!~F!~D" # the rest -color index color232 color124 ~= # duplicate messages - - -color header color74 color233 "^From" -color header color88 color233 "^Date" -color header color166 color233 "^(Subject)" -color header color244 color233 "^(To|Reply-To|Cc|Bcc):" -color header color245 color233 "^(X-Original-To):" -color header color96 color233 "^(User-Agent|X-Editor|X-Mailer):" -color header cyan color233 "^Organization:" - -# Body -color quoted color24 color233 -color quoted1 color28 color233 -color quoted2 color94 color233 -color quoted3 color88 color233 -color signature color238 color233 -color bold green color233 -color underline color208 color233 -color normal color250 color233 -color body color39 color233 "(finger|ftp|http|news|telnet)://[^ >]*" -color body color39 color233 "" -color body cyan color233 "www\\.[-.a-z0-9]+\\.[a-z][a-z][a-z]?([-_./~a-z0-9]+)?" -color body green color233 "[[:alnum:]][-+.#_[:alnum:]]*@[-+.[:alnum:]]*[[:alnum:]]" -color body brightred color233 "mailto: *[^ ]+\(\\?subject=[^ ]+\)?" -color body color178 color233 "[;:][-o][)/(|]" -color body color178 color233 "[;:][)(|]" -color body color178 color233 "[*]?((N)?ACK|CU|LOL|SCNR|BRB|BTW|CWYL|FWIW|vbg|GD&R|HTH|HTHBE|IMHO|IMNSHO|IRL|RTFM|ROTFL|ROFL|YMMV)[*]?" -color body color178 color233 "[ ][*][^*]*[*][ ]?" -color body color178 color233 "[ ]?[*][^*]*[*][ ]" -color body brightred color233 "(BAD signature)" -color body green color233 "(Good signature)" -color body color208 color233 "(heipei|hackvalue|Jojo|Gilger|Johannes)" - -color hdrdefault color238 color233 -color body color128 color233 '[-.+\w]+@[-.\w]+[^.]' # e-mail addresses -color underline brightgreen color233 diff --git a/email/_mutt/gpg.muttrc b/email/_mutt/gpg.muttrc deleted file mode 100644 index bb9a5a7..0000000 --- a/email/_mutt/gpg.muttrc +++ /dev/null @@ -1,11 +0,0 @@ -# Use GPGME -set crypt_use_gpgme = yes - -# Automatically sign all outgoing mails -set crypt_autosign = yes - -# Encrypt replies to encrypted mail -set crypt_replyencrypt = yes - -# Attempt to verify email signatures automatically -set crypt_verify_sig = yes diff --git a/email/_mutt/muttrc b/email/_mutt/muttrc deleted file mode 100644 index bd1c83a..0000000 --- a/email/_mutt/muttrc +++ /dev/null @@ -1,133 +0,0 @@ -# Paths ---------------------------------------------- -set folder = ~/.mail # mailbox location -set alias_file = ~/.mutt/alias # where to store aliases -set header_cache = ~/.mutt/cache/headers # where to store headers -set message_cachedir = ~/.mutt/cache/bodies # where to store bodies -set certificate_file = ~/.mutt/certificates # where to store certs -set mailcap_path = ~/.mutt/mailcap # entries for filetypes -set tmpdir = ~/.mutt/temp # where to keep temp files -set signature = ~/.mutt/sig # my signature file - -# Basic Options -------------------------------------- -set wait_key = no # shut up, mutt -set mbox_type = Maildir # mailbox type -set timeout = 3 # idle time before scanning -set mail_check = 0 # minimum time between scans -unset move # gmail does that -set delete # don't ask, just do -unset confirmappend # don't ask, just do! -set quit # don't ask, just do!! -unset mark_old # read/new is good enough for me -set beep_new # bell on new mails -set pipe_decode # strip headers and eval mimes when piping -set thorough_search # strip headers and eval mimes before searching - -# Status Bar ----------------------------------------- -set status_chars = " *%A" -set status_format = "───[ Folder: %f ]───[%r%m messages%?n? (%n new)?%?d? (%d to delete)?%?t? (%t tagged)? ]───%>─%?p?( %p postponed )?───" - -# Header Options ------------------------------------- -ignore * # ignore all headers -unignore from: to: cc: date: subject: # show only these -unhdr_order * # some distros order things by default -hdr_order from: to: cc: date: subject: # and in this order - -# Account Settings ----------------------------------- - -# Default inbox. -set spoolfile = "+tharre3@gmail.com/INBOX" - -# Alternate email addresses. -#alternates sjl@pculture.org still\.?life@gmail.com steve@ladyluckblues.com steve@pculture.org - -# Mailboxes to show in the sidebar. -mailboxes +tharre3@gmail.com/INBOX \ - +tharre3@gmail.com/Archives \ - +tharre3@gmail.com/sent \ - +tharre3@gmail.com/drafts \ - -# Other special folders. -set mbox = "+tharre3@gmail.com/Archives" -set postponed = "+tharre3@gmail.com/drafts" - -# Index View Options --------------------------------- -set date_format = "%m/%d" -set index_format = "[%Z] %D %-20.20F %s" -set sort = threads # like gmail -set sort_aux = reverse-last-date-received # like gmail -set uncollapse_jump # don't collapse on an unread message -set sort_re # thread based on regex -set reply_regexp = "^(([Rr][Ee]?(\[[0-9]+\])?: *)?(\[[^]]+\] *)?)*" - -# Index Key Bindings --------------------------------- -bind index gg first-entry -bind index G last-entry - -# don't skip over deleted messages -bind index j next-entry -bind index k previous-entry - -bind index R group-reply -bind index sync-mailbox -bind index collapse-thread - -# Ctrl-R to mark all as read -macro index \Cr "T~UN." "mark all messages as read" - -# Sync email -macro index O "offlineimap" "run offlineimap to sync all mail" -macro index o "offlineimap -qf INBOX" "run offlineimap to sync inbox" - -# Saner copy/move dialogs -macro index C "?" "copy a message to a mailbox" -macro index M "?" "move a message to a mailbox" - -# Pager View Options --------------------------------- -set pager_index_lines = 10 # number of index lines to show -set pager_context = 3 # number of context lines to show -set pager_stop # don't go to next message automatically -set menu_scroll # scroll in menus -set tilde # show tildes like in vim -unset markers # no ugly plus signs - -set quote_regexp = "^( {0,4}[>|:#%]| {0,4}[a-z0-9]+[>|]+)+" -alternative_order text/plain text/enriched text/html - -# Pager Key Bindings --------------------------------- -bind pager k previous-line -bind pager j next-line -bind pager gg top -bind pager G bottom - -bind pager R group-reply - -# View attachments properly. -bind attach view-mailcap - -# Compose View Options ------------------------------- -set realname = "Unkown" # who am i? -set envelope_from # which from? -set sig_dashes # dashes before sig -set edit_headers # show headers when composing -set fast_reply # skip to compose when replying -set askcc # ask for CC: -set fcc_attach # save attachments with the body -unset mime_forward # forward attachments as part of body -set forward_format = "Fwd: %s" # format of subject when forwarding -set forward_decode # decode when forwarding -set attribution = "On %d, %n wrote:" # format of quoting header -set reply_to # reply to Reply to: field -set reverse_name # reply as whomever it was to -set include # include message in replies -set forward_quote # include message in forwards - -# vim FTW -set editor='vim + -c "set textwidth=72 expandtab"' - -set from = "tharre3@gmail.com" -set sendmail = "/usr/bin/msmtp -a gmail" -set sendmail_wait = 0 -unset record - -source ~/.mutt/colors.muttrc -source ~/.mutt/gpg.muttrc diff --git a/email/_mutt/offlineimap.py b/email/_mutt/offlineimap.py deleted file mode 100644 index c358caa..0000000 --- a/email/_mutt/offlineimap.py +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/python -from subprocess import check_output - -def get_pass(account): - return check_output("pass email/"+account, shell=True).rstrip() diff --git a/email/_mutt/sig b/email/_mutt/sig deleted file mode 100644 index 255bdcb..0000000 --- a/email/_mutt/sig +++ /dev/null @@ -1 +0,0 @@ -PGP ID: 0xC8F0B2F4 diff --git a/email/_mutt/temp/.gitignore b/email/_mutt/temp/.gitignore deleted file mode 100644 index 5e7d273..0000000 --- a/email/_mutt/temp/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Ignore everything in this directory -* -# Except this file -!.gitignore diff --git a/email/_offlineimaprc b/email/_offlineimaprc deleted file mode 100644 index b74910b..0000000 --- a/email/_offlineimaprc +++ /dev/null @@ -1,43 +0,0 @@ -[general] -ui = TTY.TTYUI -accounts = Tharre -pythonfile=~/.mutt/offlineimap.py -fsync = False - -[Account Tharre] -localrepository = Tharre-Local -remoterepository = Tharre-Remote -status_backend = sqlite -postsynchook = notmuch new - -[Repository Tharre-Local] -type = Maildir -localfolders = ~/.mail/tharre3@gmail.com -nametrans = lambda folder: {'drafts': '[Gmail]/Drafts', - 'sent': '[Gmail]/Sent Mail', - 'flagged': '[Gmail]/Starred', - 'trash': '[Gmail]/Trash', - 'archive': '[Gmail]/All Mail', - }.get(folder, folder) - -[Repository Tharre-Remote] -maxconnections = 8 -type = Gmail -remoteuser = tharre3@gmail.com -remotepasseval = get_pass("tharre3@gmail.com") -realdelete = no -# Necessary as of OfflineIMAP 6.5.4 -sslcacertfile = /etc/ssl/certs/ca-certificates.crt -nametrans = lambda folder: {'[Gmail]/Drafts': 'drafts', - '[Gmail]/Sent Mail': 'sent', - '[Gmail]/Starred': 'flagged', - '[Gmail]/Trash': 'trash', - '[Gmail]/All Mail': 'archive', - }.get(folder, folder) -folderfilter = lambda folder: folder not in ['[Gmail]/Trash', - 'Nagios', - 'Django', - 'Flask', - '[Gmail]/Important', - '[Gmail]/Spam', - ] diff --git a/install.sh b/install.sh index 8f39a26..e4601b7 100755 --- a/install.sh +++ b/install.sh @@ -1,69 +1,48 @@ #!/bin/sh -e -dotfiles=$(pwd) - -# make sure all submodules are there -git submodule update --init --recursive - -# [zsh] -ln -sf "$dotfiles/shell/_zshrc" "$HOME/.zshrc" -ln -sfT "$dotfiles/shell/_oh-my-zsh" "$HOME/.oh-my-zsh" -ln -sfT "$dotfiles/shell/themes" "$HOME/.oh-my-zsh/custom/themes" - -# [vim] -ln -sf "$dotfiles/shell/_vimrc" "$HOME/.vimrc" -ln -sfT "$dotfiles/shell/_vim" "$HOME/.vim" - -# [git] -ln -sf "$dotfiles/shell/_gitconfig" "$HOME/.gitconfig" - -# [tmux] -ln -sf "$dotfiles/shell/_tmux.conf" "$HOME/.tmux.conf" - -# [gdb] -ln -sf "$dotfiles/shell/_gdbinit" "$HOME/.gdbinit" - -# [gpg] -ln -sfT "$dotfiles/shell/_gnupg" "$HOME/.gnupg" - -# [emacs] -ln -sfT "$dotfiles/shell/_emacs.d" "$HOME/.emacs.d" - -# [user dirs] -ln -sf "$dotfiles/config/user-dirs.dirs" "$HOME/.config/user-dirs.dirs" - -# [eclim] -ln -sf "$dotfiles/shell/_eclimrc" "$HOME/.eclimrc" - -# create directories -mkdir -p ~/bin -mkdir -p ~/etc -mkdir -p ~/share -mkdir -p ~/media -mkdir -p ~/media/games -mkdir -p ~/media/music -mkdir -p ~/media/pictures -mkdir -p ~/media/videos -mkdir -p ~/var -mkdir -p ~/var/cache -mkdir -p ~/var/downloads -mkdir -p ~/var/log -mkdir -p ~/var/run -mkdir -p ~/var/tmp -mkdir -p ~/var/vim -mkdir -p ~/var/VMs - -if [ "$1" = "arch" ]; then - echo "Performing full installation." - - # [arch linux] - ln -sf "$dotfiles/shell/_makepkg.conf" "$HOME/.makepkg.conf" - - # [email] - ln -sfT "$dotfiles/email/_mutt" "$HOME/.mutt" - ln -sf "$dotfiles/email/_offlineimaprc" "$HOME/.offlineimaprc" - ln -sf "$dotfiles/email/_msmtprc" "$HOME/.msmtprc" +if [ "$#" -ne 1 ]; then + # make sure all submodules are there + git submodule update --init --recursive + + # create directories + mkdir -p ~/bin + mkdir -p ~/etc + mkdir -p ~/share + mkdir -p ~/media + mkdir -p ~/media/games + mkdir -p ~/media/music + mkdir -p ~/media/pictures + mkdir -p ~/media/videos + mkdir -p ~/var + mkdir -p ~/var/cache + mkdir -p ~/var/downloads + mkdir -p ~/var/log + mkdir -p ~/var/run + mkdir -p ~/var/tmp + mkdir -p ~/var/vim + mkdir -p ~/var/VMs mkdir -p ~/.mail -fi -echo "Finished installing dotfiles" + find . -maxdepth 1 ! -path . ! -name .git ! -name .gitmodules \ + ! -name .gitignore ! -name .updated -name '.*' -exec "$0" {} \; + + echo "Finished installing dotfiles" +else + canonical=$(echo $1 | sed "s|^\./||") + target="$HOME/$canonical" + origin="$(pwd)/$canonical" + + if [ ! -e "$target" ] || [ -L "$target" ]; then + # target either doesn't exist or is a symbolic link and can thus be + # safely replaced + ln -sfT "$origin" "$target" + elif [ -d "$target" ]; then + # target is not a symbolic link, but a directory, thus we link + # everything into that directory instead + + find "$canonical" -maxdepth 1 -mindepth 1 ! -name .gitignore \ + -exec "$0" {} \; + else + echo "Target file '$target' is not a symlink but exists, skipping" + fi +fi diff --git a/shell/_eclimrc b/shell/_eclimrc deleted file mode 100644 index 7b78828..0000000 --- a/shell/_eclimrc +++ /dev/null @@ -1,3 +0,0 @@ -# Specifies the workspace directory to use -# See $ECLIPSE_HOME/configuration/config.ini for other osgi properties. -osgi.instance.area.default=@user.home/var/workspace diff --git a/shell/_emacs.d/.gitignore b/shell/_emacs.d/.gitignore deleted file mode 100644 index 88f820a..0000000 --- a/shell/_emacs.d/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -elpa/ -auto-save-list -.smex-items -ac-comphist.dat -*.elc -emacs.html -*~ -url/ diff --git a/shell/_emacs.d/custom-var.el b/shell/_emacs.d/custom-var.el deleted file mode 100644 index 431ff6e..0000000 --- a/shell/_emacs.d/custom-var.el +++ /dev/null @@ -1,15 +0,0 @@ -(custom-set-variables - ;; custom-set-variables was added by Custom. - ;; If you edit it by hand, you could mess it up, so be careful. - ;; Your init file should contain only one such instance. - ;; If there is more than one, they won't work right. - '(evil-emacs-state-modes (quote (archive-mode bbdb-mode bookmark-bmenu-mode bookmark-edit-annotation-mode browse-kill-ring-mode bzr-annotate-mode calc-mode cfw:calendar-mode completion-list-mode Custom-mode debugger-mode delicious-search-mode desktop-menu-blist-mode desktop-menu-mode doc-view-mode dvc-bookmarks-mode dvc-diff-mode dvc-info-buffer-mode dvc-log-buffer-mode dvc-revlist-mode dvc-revlog-mode dvc-status-mode dvc-tips-mode ediff-mode ediff-meta-mode efs-mode Electric-buffer-menu-mode emms-browser-mode emms-mark-mode emms-metaplaylist-mode emms-playlist-mode etags-select-mode fj-mode gc-issues-mode gdb-breakpoints-mode gdb-disassembly-mode gdb-frames-mode gdb-locals-mode gdb-memory-mode gdb-registers-mode gdb-threads-mode gist-list-mode gnus-article-mode gnus-browse-mode gnus-group-mode gnus-server-mode gnus-summary-mode google-maps-static-mode ibuffer-mode jde-javadoc-checker-report-mode magit-commit-mode magit-diff-mode magit-key-mode magit-log-mode magit-mode magit-reflog-mode magit-show-branches-mode magit-branch-manager-mode magit-stash-mode magit-status-mode magit-wazzup-mode magit-process-mode mh-folder-mode monky-mode mu4e-main-mode mu4e-headers-mode mu4e-view-mode occur-mode org-agenda-mode package-menu-mode proced-mode rcirc-mode rebase-mode recentf-dialog-mode reftex-select-bib-mode reftex-select-label-mode reftex-toc-mode sldb-mode slime-inspector-mode slime-thread-control-mode slime-xref-mode sr-buttons-mode sr-mode sr-tree-mode sr-virtual-mode tar-mode tetris-mode tla-annotate-mode tla-archive-list-mode tla-bconfig-mode tla-bookmarks-mode tla-branch-list-mode tla-browse-mode tla-category-list-mode tla-changelog-mode tla-follow-symlinks-mode tla-inventory-file-mode tla-inventory-mode tla-lint-mode tla-logs-mode tla-revision-list-mode tla-revlog-mode tla-tree-lint-mode tla-version-list-mode twittering-mode urlview-mode vc-annotate-mode vc-dir-mode vc-git-log-view-mode vc-svn-log-view-mode vm-mode vm-summary-mode w3m-mode wab-compilation-mode xgit-annotate-mode xgit-changelog-mode xgit-diff-mode xgit-revlog-mode xhg-annotate-mode xhg-log-mode xhg-mode xhg-mq-mode xhg-mq-sub-mode xhg-status-extra-mode))) - '(evil-motion-state-modes (quote (apropos-mode Buffer-menu-mode calendar-mode color-theme-mode command-history-mode compilation-mode dictionary-mode ert-results-mode help-mode Info-mode Man-mode speedbar-mode undo-tree-visualizer-mode view-mode woman-mode Custom-mode notmuch-hello-mode notmuch-search-mode))) - '(evil-overriding-maps (quote ((Buffer-menu-mode-map) (color-theme-mode-map) (comint-mode-map) (compilation-mode-map) (dictionary-mode-map) (ert-results-mode-map . motion) (Info-mode-map . motion) (speedbar-key-map) (speedbar-file-key-map) (speedbar-buffers-key-map) (custom-mode-key-map) (notmuch-hello-key-map) (notmuch-search-key-map) (notmuch-show-key-map)))) - '(org-file-apps (quote ((auto-mode . emacs) ("\\.mm\\'" . default) ("\\.x?html?\\'" . "chromium %s") ("\\.pdf\\'" . default))))) -(custom-set-faces - ;; custom-set-faces was added by Custom. - ;; If you edit it by hand, you could mess it up, so be careful. - ;; Your init file should contain only one such instance. - ;; If there is more than one, they won't work right. - ) diff --git a/shell/_emacs.d/init.el b/shell/_emacs.d/init.el deleted file mode 100644 index 921eace..0000000 --- a/shell/_emacs.d/init.el +++ /dev/null @@ -1,215 +0,0 @@ -;; VERSION: 0.9.0 -;; BUILD: 141 -;; TODO: -;; - Dependencies: -;; - Haskell: ghc-mod; hlint -;; - Python: jedi (pip install jedi epc) -;; - Arch: aspell-de -;; - org-mode -;; - imagemagick -;; - Latex-preview: texlive-core - -;; TODO: eldoc for C looks awesome -;; company for autocompletion? -;;;; comments -;; Fix custom-set-variables -;; need a redo solution -;; align-regexp -;; need to fix color schemes -;; fix evil state in list-packages buffer -;; fix smooth scrolling (no jumps pls) -;; fix jedi -;; checkout evil-exchange https://github.com/Dewdrops/evil-exchange -;; Learn how the minibuffer works - -;; Turn off mouse interface early to avoid momentary display -(if (fboundp 'menu-bar-mode) (menu-bar-mode -1)) -(if (fboundp 'tool-bar-mode) (tool-bar-mode -1)) -(if (fboundp 'scroll-bar-mode) (scroll-bar-mode -1)) - -;; No welcome screen -(setq inhibit-startup-message t) - -;;;; autoloads -(add-to-list 'load-path (concat user-emacs-directory "/site-lisp/")) -(require 'site-lisp-autoloads) - -;;;; general settings -(when window-system - (setq frame-title-format '(buffer-file-name "%f" ("%b"))) - (blink-cursor-mode -1)) - -(setq visible-bell t - ;; color-theme-is-global t - ;; shift-select-mode nil - ;; mouse-yank-at-point t - backup-directory-alist `((".".,(concat user-emacs-directory "backups")))) - -(defalias 'yes-or-no-p 'y-or-n-p) - -;; much better scrolling -(setq scroll-margin 0 - scroll-conservatively 100000 - scroll-preserve-screen-position 1) - -;; Increase memory for tables -(setq max-lisp-eval-depth '40000) -(setq max-specpdl-size '100000) - -(require 'package) -(add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/")) -(add-to-list 'package-archives - '("marmalade" . "http://marmalade-repo.org/packages/")) -(add-to-list 'package-archives - '("melpa" . "http://melpa.milkbox.net/packages/")) -(package-initialize) - -(refresh-proxy-settings) -(when (not package-archive-contents) - (package-refresh-contents)) - -(require 'with-package) - -(with-package (ace-jump-buffer haskell-mode python-mode htmlize - multiple-cursors column-marker - ;; ess ;; statistic - ;; key-chord ;; combination of keys for commands - ;; no-easy-keys - ;; pretty-symbols-mode ;; mode for pretty symbols - ;; auto-complete - ;; auto-complete-clang-async - ;; auto-complete-c-headers - ;; autopair - ;; column-marker - ;; fuzzy ;; better matching - ;; jedi - ;; maxframe - ;; nav - ;; yasnippet - notmuch - midnight - org-plus-contrib -)) - -(with-package* (evil evil-nerd-commenter evil-numbers) - (evil-mode t) - (define-key evil-normal-state-map "m" 'tabbar-forward-tab) - (define-key evil-normal-state-map "M" 'tabbar-backward-tab) - (define-key evil-normal-state-map " " 'ace-jump-buffer) - (define-key evil-normal-state-map (kbd ",ci") - 'evilnc-comment-or-uncomment-lines) - (define-key evil-normal-state-map (kbd ",cl") - 'evilnc-comment-or-uncomment-to-the-line)) - -(define-key evil-normal-state-map (kbd "RET") nil) -(define-key evil-motion-state-map (kbd "RET") nil) - -;; TODO: test this more -(with-package* key-chord - (key-chord-mode t) - (key-chord-define evil-insert-state-map "jk" 'evil-normal-state)) - -;; Evil surround mode. See https://github.com/timcharper/evil-surround -(with-package* surround - (global-surround-mode 1)) - -(with-package* anzu - (global-anzu-mode)) - -(with-package* solarized-theme - (message "Solarized theme loaded!") - (load-theme 'solarized-dark t)) - -;; loading zenburn retriggers this with-package call, so only call it once -;; (with-package* zenburn-theme -;; (unless (symbolp 'zenburn-loaded) -;; (setq 'zenburn-loaded t) -;; (load-theme 'zenburn))) - -(with-package* (ido ido-ubiquitous smex) - (ido-mode t) - (ido-everywhere t) - (setq ido-enable-flex-matching t) - (ido-ubiquitous-mode) - (setq ido-enable-last-directory-history nil - ido-record-commands nil - ido-max-work-directory-list 0 - ido-max-work-file-list 0) - (setq smex-save-file (concat user-emacs-directory ".smex-items")) - (global-set-key (kbd "M-x") 'smex)) - -(with-package* diminish - (diminish 'undo-tree-mode)) - -(show-paren-mode 1) -(global-linum-mode 1) - -;; chmod +x on save if shell script -;; (add-hook 'after-save-hook -;; 'executable-make-buffer-file-executable-if-script-p) - -;; see https://github.com/flycheck/flycheck -;; for all the additional dependencies. -(with-package* (flycheck flycheck-color-mode-line) - (setq flycheck-check-syntax-automatically (quote (save mode-enabled))) - ;; in case cabal isn't in path add path manually - ;; FIXME: don't do this always use -^ - (setq flycheck-haskell-hlint-executable "~/.cabal/bin/hlint") - (global-flycheck-mode t) - (add-hook 'flycheck-mode-hook 'flycheck-color-mode-line-mode)) - -(with-package magit - (define-key magit-status-mode-map (kbd "j") 'magit-goto-next-section) - (define-key magit-status-mode-map (kbd "k") 'magit-goto-previous-section) - (define-key magit-status-mode-map (kbd "n") 'magit-discard-item)) - -;;;; general -(setq tab-width 4) - -;;;; python -;; dependencies: pip install jedi epc -(with-package* jedi - (setq jedi:setup-keys t) - (setq jedi:complete-on-dot t) - (add-hook 'python-mode-hook 'jedi:setup)) - -;;;; C -(setq-default c-basic-offset 4) - -(add-hook 'prog-mode-hook - (lambda () - (font-lock-add-keywords nil - '(("\\<\\(FIX\\(ME\\)?\\|TODO\\|\ HACK\\|REFACTOR\\|NOCOMMIT\\):" - 1 font-lock-warning-face t))))) - -;; highlight with-package* -;; TODO: add-hook to emacs-lisp? -(font-lock-add-keywords - 'emacs-lisp-mode - '(("(\\(with-package\\*?\\)\\(?:\\s-+(?\\([^()]+\\))?\\)?" - (1 'font-lock-keyword-face) - (2 'font-lock-constant-face nil t)))) - -;; eval-and-replace -(global-set-key (kbd "C-c C-e") 'eval-and-replace) - -;; Font size -(define-key global-map (kbd "C-+") 'text-scale-increase) -(define-key global-map (kbd "C--") 'text-scale-decrease) - -;; Show trailing spaces, set whitespace tabs to dim grey and delete trailing -;; whitespaces on save. -;; Note: this will break hard line breaks for markdown. -;; TODO: Add exception for markdown-mode -;; TODO: whitespace cleanup? -;; (setq whitespace-style '(face tabs newline tab-mark) -;; whitespace-line-column 80 -;; whitespace-tab '(:foreground "dim gray" :weight bold)) -;; (global-whitespace-mode t) -;; (add-hook 'before-save-hook 'delete-trailing-whitespace) - -;; Marks the 81st column in a line. -;; (column-marker-1 80) - -(setq custom-file (concat user-emacs-directory "custom-var.el")) -(load custom-file) diff --git a/shell/_emacs.d/org-fragments.el b/shell/_emacs.d/org-fragments.el deleted file mode 100644 index 0e145ad..0000000 --- a/shell/_emacs.d/org-fragments.el +++ /dev/null @@ -1,60 +0,0 @@ - -** org-mode settings - -*** Increase front size of latex previews - -#+BEGIN_SRC emacs-lisp -(setq org-format-latex-options (plist-put 'org-format-latex-options :scale 2.0)) -#+END_SRC - -*** Other customizations -TODO: create subgroups - -#+BEGIN_SRC emacs-lisp -;; org-mode -;; active Babel languages -;; TODO: load on demand - (org-babel-do-load-languages - 'org-babel-load-languages - '((R . t) - (python . t) - )) - -(add-hook 'org-babel-after-execute-hook 'org-display-inline-images) -(add-hook 'org-mode-hook 'org-display-inline-images) -(setq org-confirm-babel-evaluate nil) -(setq org-export-html-validation-link nil) -(setq org-export-allow-BIND t) -(setq org-support-shift-select t) -(setq org-src-fontify-natively t) - - -;; iimage (show images inline) -;; (when window-system -;; (defun iimage-fix-underlining () -;; ;; (set-face-underline-p 'org-link nil) ;; deactivate underlining -;; ) ;; TODO: needing something better aka unclickable links - -;; (defun iimage-refresh-iimages () -;; "Hacked refresh" -;; (clear-image-cache nil) -;; (iimage-mode nil) -;; (iimage-mode t)) - -;; (add-hook 'org-mode-hook 'iimage-mode) -;; (add-hook 'after-save-hook 'iimage-refresh-iimages) -;; (add-hook 'iimage-mode-hook 'iimage-fix-underlining) -;; (iimage-mode nil) -;; (add-to-list 'iimage-mode-image-regex-alist -;; (cons (concat "\\[\\[file:\\(~?" iimage-mode-image-filename-regex -;; "\\)\\]") 1)) -;; ) -#+END_SRC - -** increase memory for tables - -#+BEGIN_SRC emacs-lisp -;; Increase memory for tables -(setq max-lisp-eval-depth '40000) -(setq max-specpdl-size '100000) -#+END_SRC diff --git a/shell/_emacs.d/site-lisp/dconf-proxy.el b/shell/_emacs.d/site-lisp/dconf-proxy.el deleted file mode 100644 index 954852a..0000000 --- a/shell/_emacs.d/site-lisp/dconf-proxy.el +++ /dev/null @@ -1,14 +0,0 @@ -(defun refresh-proxy-settings () - (interactive) - (if (string= (shell-command-to-string "dconf read /system/proxy/http/enabled") "true\n") - (setq url-proxy-services - `(("http" . - ,(concat - (car (split-string-and-unquote ;; split string to remove single quotes and newline - (shell-command-to-string "dconf read /system/proxy/http/host") '"'")) - ":" - (car (split-string-and-unquote ;; split string to remove newline - (shell-command-to-string "dconf read /system/proxy/http/port") '"\n")))))) - (setq url-proxy-services nil))) - -(provide 'dconf-proxy) diff --git a/shell/_emacs.d/site-lisp/site-lisp-autoloads.el b/shell/_emacs.d/site-lisp/site-lisp-autoloads.el deleted file mode 100644 index 2b1e039..0000000 --- a/shell/_emacs.d/site-lisp/site-lisp-autoloads.el +++ /dev/null @@ -1,5 +0,0 @@ - -(autoload 'refresh-proxy-settings "dconf-proxy" "Refresh proxy settings" t) -(autoload 'eval-and-replace "util" "Eval and replace lisp expression" t) - -(provide 'site-lisp-autoloads) diff --git a/shell/_emacs.d/site-lisp/util.el b/shell/_emacs.d/site-lisp/util.el deleted file mode 100644 index b5bdc10..0000000 --- a/shell/_emacs.d/site-lisp/util.el +++ /dev/null @@ -1,36 +0,0 @@ -(defun eval-and-replace () - "Replace the preceding sexp with its value." - (interactive) - (forward-char) ;; for evil normal state - (backward-kill-sexp) - (condition-case nil - (prin1 (eval (read (current-kill 0))) - (current-buffer)) - (error (message "Invalid expression") - (insert (current-kill 0))))) - -(defun lorem () - "Insert a lorem ipsum." - (interactive) - (insert "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do " - "eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim" - "ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut " - "aliquip ex ea commodo consequat. Duis aute irure dolor in " - "reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla " - "pariatur. Excepteur sint occaecat cupidatat non proident, sunt in " - "culpa qui officia deserunt mollit anim id est laborum.")) - -(defun insert-date () - "Insert a time-stamp according to locale's date and time format." - (interactive) - (insert (format-time-string "%c" (current-time)))) - -(defun indent-buffer () - (interactive) - (indent-region (point-min) (point-max))) - -(defun untabify-buffer () - (interactive) - (untabify (point-min) (point-max))) - -(provide 'util) diff --git a/shell/_emacs.d/site-lisp/with-package.el b/shell/_emacs.d/site-lisp/with-package.el deleted file mode 100644 index 3dfc52d..0000000 --- a/shell/_emacs.d/site-lisp/with-package.el +++ /dev/null @@ -1,31 +0,0 @@ -(require 'cl) - -;; will be available at emacs 24.4 -(unless (fboundp 'with-eval-after-load) - "Do magic from the future" - (defmacro with-eval-after-load (file &rest body) - `(eval-after-load ,file - `(funcall (function ,(lambda () ,@body)))))) - -(defmacro with-package (packages &rest body) - "After pkg macro" - (declare (indent defun)) - (when (symbolp packages) ;; make a list if necessary - (setf packages (list packages))) - `(progn - (dolist (p ',packages) - (when (not (package-installed-p p)) - (package-install p)) - (with-eval-after-load p ,@body)))) - -(defmacro with-package* (packages &rest body) - "After pkg macro*" - (declare (indent defun)) - (when (symbolp packages) ;; make a list if necessary - (setf packages (list packages))) - `(prog1 - (with-package ,packages ,@body) - (dolist (p ',packages) - (require p)))) - -(provide 'with-package) diff --git a/shell/_emacs.d/tools/libs/jpeg62.dll b/shell/_emacs.d/tools/libs/jpeg62.dll deleted file mode 100644 index 21c03d5..0000000 Binary files a/shell/_emacs.d/tools/libs/jpeg62.dll and /dev/null differ diff --git a/shell/_emacs.d/tools/libs/libXpm.dll b/shell/_emacs.d/tools/libs/libXpm.dll deleted file mode 100644 index 0dcb292..0000000 Binary files a/shell/_emacs.d/tools/libs/libXpm.dll and /dev/null differ diff --git a/shell/_emacs.d/tools/libs/libpng-config b/shell/_emacs.d/tools/libs/libpng-config deleted file mode 100644 index 3c39bc9..0000000 --- a/shell/_emacs.d/tools/libs/libpng-config +++ /dev/null @@ -1,124 +0,0 @@ -#! /bin/sh - -# libpng-config -# provides configuration info for libpng. - -# Copyright (C) 2002, 2004, 2006, 2007 Glenn Randers-Pehrson -# For conditions of distribution and use, see copyright notice in png.h - -# Modeled after libxml-config. - -version="1.2.37" -prefix="c:/progra~1/libpng" -exec_prefix="${prefix}" -libdir="${exec_prefix}/lib" -includedir="${prefix}/include/libpng12" -libs="-lpng12" -all_libs="-lpng12 -lz -I_opts="-I${includedir}" -L_opts="-L${libdir}" -R_opts="" -cppflags="" -ccopts="" -ldopts="" - -usage() -{ - cat < - -;; This file is NOT part of GNU Emacs. - -;; This program is free software; you can redistribute it and/or -;; modify it under the terms of the GNU General Public License -;; as published by the Free Software Foundation; either version 2 -;; of the License, or (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . - -;;; Commentary: - -;; This is to easily profile your Emacs init file (or any other -;; script-like Emacs Lisp file, for that matter). - -;; It will go over all sexp's (balanced expressions) in the file and -;; run them through `benchmark-run'. It will then show the file with -;; overlays applied in a way that let you easily find out which sexp's -;; take the most time. Since time is relative, it's not the absolute -;; value that counts but the percentage of the total running time. -;; -;; * All other sexp's with a percentage greater than -;; `profile-dotemacs-low-percentage' will be preceded by a -;; highlighted line, showing the results from `benchmark-run'. -;; Also, the more 'reddish' the background of the sexp, the more -;; time it needs. - -;; * All other sexp's will be grayed out to indicate that their -;; running time is miniscule. You can still see the benchmark -;; results in the minibuffer by hovering over the sexp with the -;; mouse. - -;; You can only benchmark full sexp's, so if you wrapped large parts -;; of your init file in some conditional clause, you'll have to remove -;; that for getting finer granularity. - -;;; Usage: - -;; Start emacs as follows: -;; -;; emacs -Q -l /profile-dotemacs.el -f profile-dotemacs -;; -;; with being the path to where this file resides. - -;;; Caveats (thanks to Raffaele Ricciardi for reporting those): - -;; - The usual `--debug-init' for debugging your init file won't work -;; with profile-dotemacs, so you'll have to call -;; `toggle-debug-on-error', either on the commandline or at the -;; beginning of your init file. -;; - `load-file-name' is nil when the init file is being loaded -;; by the profiler. This might matter if you perform the -;; bulk of initializations in a different file. -;; - Starting external shells like IELM or eshell in your init file -;; might mess with overlay creation, so this must not be done. - -;;; Download: - -;; You can always get the latest version from -;; http://randomsample.de/profile-dotemacs.el - -;;; Code: - -(require 'thingatpt) -(require 'benchmark) - -;; User variables - -(defvar profile-dotemacs-file "~/.emacs" - "File to be profiled.") - -(defvar profile-dotemacs-low-percentage 3 - "Percentage which should be considered low. -All sexp's with a running time below this percentage will be -grayed out.") - -(defface profile-dotemacs-time-face - '((((background dark)) (:background "OrangeRed1")) - (t (:background "red3"))) - "Background color to indicate percentage of total time.") - -(defface profile-dotemacs-low-percentage-face - '((((background dark)) (:foreground "gray25")) - (t (:foreground "gray75"))) - "Face for sexps below `profile-dotemacs-low-percentage'.") - -(defface profile-dotemacs-highlight-face - '((((background dark)) (:background "blue")) - (t (:background "yellow"))) - "Highlight face for benchmark results.") - -;; Main function - -(defun profile-dotemacs () - "Load `profile-dotemacs-file' and benchmark its sexps." - (interactive) - (with-current-buffer (find-file-noselect profile-dotemacs-file t) - (setq buffer-read-only t) ;; just to be sure - (goto-char (point-min)) - (let (start end results) - (while - (< (point) - (setq end (progn - (forward-sexp 1) - (point)))) - (forward-sexp -1) - (setq start (point)) - (add-to-list - 'results - `(,start ,end - ,(benchmark-run - (eval (sexp-at-point))))) - (goto-char end)) - (profile-dotemacs-show-results results) - (switch-to-buffer (current-buffer))))) - -;; Helper functions - -(defun profile-dotemacs-show-results (results) - "Show timings from RESULTS in current buffer." - (let ((totaltime (profile-dotemacs-totaltime results)) - current percentage ov) - (while results - (let* ((current (pop results)) - (ov (make-overlay (car current) (cadr current))) - (current (car (last current))) - (percentage (/ (+ (car current) (nth 2 current)) - totaltime)) - col benchstr lowface) - (setq col - (profile-dotemacs-percentage-color - percentage - (face-background 'default) - (face-background 'profile-dotemacs-time-face))) - (setq percentage (round (* 100 percentage))) - (setq benchstr (profile-dotemacs-make-benchstr current)) - (overlay-put ov 'help-echo benchstr) - (if (and (numberp profile-dotemacs-low-percentage) - (< percentage profile-dotemacs-low-percentage)) - (overlay-put ov 'face 'profile-dotemacs-low-percentage-face) - (overlay-put ov 'before-string - (propertize benchstr - 'face 'profile-dotemacs-highlight-face)) - (overlay-put ov 'face - `(:background ,col))))) - (setq ov (make-overlay (1- (point-max)) (point-max))) - (overlay-put ov 'after-string - (propertize - (format "\n-----------------\nTotal time: %.2fs\n" - totaltime) - 'face 'profile-dotemacs-highlight-face)))) - -(defun profile-dotemacs-totaltime (results) - "Calculate total time of RESULTS." - (let ((totaltime 0)) - (mapc (lambda (x) - (let ((cur (car (last x)))) - (setq totaltime (+ totaltime (car cur) (nth 2 cur))))) - results) - totaltime)) - -(defun profile-dotemacs-percentage-color (percent col-begin col-end) - "Calculate color according to PERCENT between COL-BEGIN and COL-END." - (let* ((col1 (color-values col-begin)) - (col2 (color-values col-end)) - (col - (mapcar (lambda (c) - (round - (+ (* (- 1 percent) (nth c col1)) - (* percent (nth c col2))))) - '(0 1 2)))) - (format "RGB:%04x/%04x/%04x" - (car col) - (nth 1 col) - (nth 2 col)))) - -(defun profile-dotemacs-make-benchstr (timings) - "Create descriptive benchmark string from TIMINGS." - (format - (concat - "\n") - percentage - (car timings) (nth 1 timings) (nth 2 timings))) - - -;; profile-dotemacs.el ends here diff --git a/shell/_emacs.d/tools/profiler/run_profiler.el b/shell/_emacs.d/tools/profiler/run_profiler.el deleted file mode 100644 index 39939c2..0000000 --- a/shell/_emacs.d/tools/profiler/run_profiler.el +++ /dev/null @@ -1,2 +0,0 @@ -;; won't work unless .emacs exists -(eshell-command "emacs -Q -l ~/.emacs.d/tools/profiler/profile-dotemacs.el -f profile-dotemacs") diff --git a/shell/_gdbinit b/shell/_gdbinit deleted file mode 100644 index 9422460..0000000 --- a/shell/_gdbinit +++ /dev/null @@ -1 +0,0 @@ -set disassembly-flavor intel diff --git a/shell/_gitconfig b/shell/_gitconfig deleted file mode 100644 index 78ac758..0000000 --- a/shell/_gitconfig +++ /dev/null @@ -1,12 +0,0 @@ -[user] - name = Tharre - email = tharre3@gmail.com -[push] - default = simple -[alias] - lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%C(bold blue)<%an>%Creset' --abbrev-commit - la = log --oneline --decorate --all --graph -[branch] - autosetuprebase = always -[merge] - tool = vimdiff diff --git a/shell/_gnupg/.gitignore b/shell/_gnupg/.gitignore deleted file mode 100644 index 80d294a..0000000 --- a/shell/_gnupg/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -* -!.gitignore -!gpg-agent.conf -!gpg.conf diff --git a/shell/_gnupg/gpg-agent.conf b/shell/_gnupg/gpg-agent.conf deleted file mode 100644 index 85405bc..0000000 --- a/shell/_gnupg/gpg-agent.conf +++ /dev/null @@ -1 +0,0 @@ -enable-ssh-support diff --git a/shell/_gnupg/gpg.conf b/shell/_gnupg/gpg.conf deleted file mode 100644 index 585e888..0000000 --- a/shell/_gnupg/gpg.conf +++ /dev/null @@ -1,5 +0,0 @@ -# needs long keyID, obtained with gpg --list-key --with-colons -trusted-key 5431BDE2C8F0B2F4 - -# store encrypted outgoing mails with my own public key -encrypt-to 0xC8F0B2F4 diff --git a/shell/_makepkg.conf b/shell/_makepkg.conf deleted file mode 100644 index 2d44f5a..0000000 --- a/shell/_makepkg.conf +++ /dev/null @@ -1,8 +0,0 @@ -DLAGENTS+=('hib::/usr/bin/hib-dlagent -u tharre3@gmail.com -o %o %u') - -MAKEFLAGS="-j$(nproc)" - -COMPRESSXZ=(xz -T 0 -c -z -) - -# Don't compress packages -PKGEXT='.pkg.tar' diff --git a/shell/_oh-my-zsh b/shell/_oh-my-zsh deleted file mode 160000 index 644bc64..0000000 --- a/shell/_oh-my-zsh +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 644bc641ad48c74c88631d79d48ec9b6f3f5a3e5 diff --git a/shell/_tmux.conf b/shell/_tmux.conf deleted file mode 100644 index 9ee9f96..0000000 --- a/shell/_tmux.conf +++ /dev/null @@ -1,11 +0,0 @@ -set -g prefix C-x -bind C-x send-prefix -unbind C-b - -set -g default-terminal "screen-256color" - -set -g base-index 1 # start window numbering with 1 - -bind-key r source-file ~/.tmux.conf \; display "Config reloaded!" - -if-shell "test -e ~/.tmux.conf.local" "source-file ~/.tmux.conf.local" diff --git a/shell/_vim/bundle/ctrlp.vim b/shell/_vim/bundle/ctrlp.vim deleted file mode 160000 index 7a80267..0000000 --- a/shell/_vim/bundle/ctrlp.vim +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 7a80267ed061f3dc30bb319f438bdadfd8c7b1fd diff --git a/shell/_vim/bundle/gundo.vim b/shell/_vim/bundle/gundo.vim deleted file mode 160000 index dd5ab1e..0000000 --- a/shell/_vim/bundle/gundo.vim +++ /dev/null @@ -1 +0,0 @@ -Subproject commit dd5ab1e930deb8c74ea9046654dd0587df0cf459 diff --git a/shell/_vim/bundle/jedi-vim b/shell/_vim/bundle/jedi-vim deleted file mode 160000 index dc23f0b..0000000 --- a/shell/_vim/bundle/jedi-vim +++ /dev/null @@ -1 +0,0 @@ -Subproject commit dc23f0b859d3b5c087921b68cf7cd66803ecca83 diff --git a/shell/_vim/bundle/nerdcommenter b/shell/_vim/bundle/nerdcommenter deleted file mode 160000 index 1f4bfd5..0000000 --- a/shell/_vim/bundle/nerdcommenter +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 1f4bfd59920c101a30a74a07b824608a6e65f3fe diff --git a/shell/_vim/bundle/rust.vim b/shell/_vim/bundle/rust.vim deleted file mode 160000 index 2450ecf..0000000 --- a/shell/_vim/bundle/rust.vim +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2450ecf3091cc7c2711ca9f00eae8e3bedd04376 diff --git a/shell/_vim/bundle/syntastic b/shell/_vim/bundle/syntastic deleted file mode 160000 index 06a8469..0000000 --- a/shell/_vim/bundle/syntastic +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 06a8469556bca04d2276917b1043e25cfa6ec81c diff --git a/shell/_vim/bundle/vim-airline b/shell/_vim/bundle/vim-airline deleted file mode 160000 index 14d14cf..0000000 --- a/shell/_vim/bundle/vim-airline +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 14d14cf951c08fc88ca6c3e6f28fe47b99421e23 diff --git a/shell/_vim/bundle/vim-distinguished b/shell/_vim/bundle/vim-distinguished deleted file mode 160000 index 62b360d..0000000 --- a/shell/_vim/bundle/vim-distinguished +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 62b360dc81355b53d124cd06218a9ba2496563fc diff --git a/shell/_vim/bundle/vim-easy-align b/shell/_vim/bundle/vim-easy-align deleted file mode 160000 index 7cb559e..0000000 --- a/shell/_vim/bundle/vim-easy-align +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 7cb559eb70600bbd81afbb2d7f60d98334f631e2 diff --git a/shell/_vim/bundle/vim-ledger b/shell/_vim/bundle/vim-ledger deleted file mode 160000 index 0ebef8f..0000000 --- a/shell/_vim/bundle/vim-ledger +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0ebef8fcb5962602c6062ddbd07bada4df0af8b5 diff --git a/shell/_vim/bundle/vim-misc b/shell/_vim/bundle/vim-misc deleted file mode 160000 index 3e6b8fb..0000000 --- a/shell/_vim/bundle/vim-misc +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 3e6b8fb6f03f13434543ce1f5d24f6a5d3f34f0b diff --git a/shell/_vim/bundle/vim-pathogen b/shell/_vim/bundle/vim-pathogen deleted file mode 160000 index b4174e4..0000000 --- a/shell/_vim/bundle/vim-pathogen +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b4174e4d1a16e7f0c5c6dfca923269a20a9f50c2 diff --git a/shell/_vim/bundle/vim-sleuth b/shell/_vim/bundle/vim-sleuth deleted file mode 160000 index a174627..0000000 --- a/shell/_vim/bundle/vim-sleuth +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a17462708aa40a7fc0afd4effa559087d8a2c908 diff --git a/shell/_vim/bundle/vim-surround b/shell/_vim/bundle/vim-surround deleted file mode 160000 index 2d05440..0000000 --- a/shell/_vim/bundle/vim-surround +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2d05440ad23f97a7874ebd9b5de3a0e65d25d85c diff --git a/shell/_vimrc b/shell/_vimrc deleted file mode 100644 index a73485a..0000000 --- a/shell/_vimrc +++ /dev/null @@ -1,115 +0,0 @@ -" Plugins for review: -" 'msanders/snipmate.vim' -" 'godlygeek/tabular' -" 'plasticboy/vim-markdown' -" Consider using sections like this: -" Section Name {{{ -" set number "This will be folded -" }}} - -runtime bundle/vim-pathogen/autoload/pathogen.vim -execute pathogen#infect() -execute pathogen#helptags() -set nocompatible " Be iMproved -let mapleader="," " set leader early as otherwise it wouldn't work -filetype plugin indent on - -" ========== general settings ========== -set encoding=utf-8 -set ff=unix -set number -set clipboard=unnamedplus -set showmatch " show matching brackets - -set incsearch " Find as you type search -set hlsearch " Highlight search terms -set ignorecase " Case-insensitive searching. -set smartcase " But case-sensitive if expression contains a capital letter. - -set history=1000 " remember more commands and search history -set undolevels=1000 " use many levels of undo - -set nobackup -set noswapfile - -set tabstop=4 -set shiftwidth=4 -set textwidth=80 -set cc=81 -"set expandtab - -syntax enable -set background=dark -colorscheme distinguished - -set list -set listchars=tab:>-,trail:~ - -set lazyredraw -set wildmenu - -set relativenumber - -set wildignore+=*.a,*.o,*.class -set wildignore+=*.bmp,*.gif,*.ico,*.jpg,*.jpeg,*.png -set wildignore+=.DS_Store,.git,.hg,.svn -set wildignore+=*~,*.swp,*.tmp - -" jk is escape -inoremap jk - -augroup reload_vimrc " { - autocmd! - autocmd BufWritePost $MYVIMRC source $MYVIMRC -augroup END " } - -map 1 :diffget 2 :diffupdate -map 2 :diffget 3 :diffupdate -map 3 :diffget 4 :diffupdate - -map Q @ -map :tabprevious -map m :tabnext - -" remove trailing whitespaces on save -autocmd BufWritePre * :%s/\s\+$//e - -" save file with root permissions -cmap w!! w !sudo tee % >/dev/null - -" turn off search highlight -nnoremap :nohlsearch - -" ========== file specific settings ========== -" Markdown -autocmd BufRead,BufNew *.md set filetype=markdown - -" java -au BufNewFile,BufRead *.java set tabstop=4 softtabstop=4 shiftwidth=4 smarttab autoindent cc=121 - -" ========== plugin settings ========== -" airline -set laststatus=2 -let g:airline_theme = 'powerlineish' -"let g:airline#extensions#tabline#enabled = 1 " make tabs look crazy -" only enable trailing whitespace checking -let g:airline#extensions#whitespace#checks = [ 'trailing' ] -let g:airline#extensions#syntastic#enabled = 0 - -" Start interactive EasyAlign in visual mode (e.g. vip) -vmap (EasyAlign) - -" Start interactive EasyAlign for a motion/text object (e.g. gaip) -nmap ga (EasyAlign) - -" toggle gundo -nnoremap u :GundoToggle - -" eclim -nmap a :JavaImportOrganize -nmap t :ProjectTree -nmap o :ProjectOpen - -" ctrlp -let g:ctrlp_max_files = 1000000 -let g:ctrlp_cmd = 'CtrlPMixed' diff --git a/shell/_zshrc b/shell/_zshrc deleted file mode 100644 index 6de5049..0000000 --- a/shell/_zshrc +++ /dev/null @@ -1,180 +0,0 @@ -# Path to your oh-my-zsh installation. -export ZSH=$HOME/.oh-my-zsh - -# Set name of the theme to load. -# Look in ~/.oh-my-zsh/themes/ -# Optionally, if you set this to "random", it'll load a random theme each -# time that oh-my-zsh is loaded. -ZSH_THEME="custom" - -# Uncomment the following line to use case-sensitive completion. -# CASE_SENSITIVE="true" - -# Uncomment the following line to use hyphen-insensitive completion. Case -# sensitive completion must be off. _ and - will be interchangeable. -# HYPHEN_INSENSITIVE="true" - -# Uncomment the following line to disable bi-weekly auto-update checks. -DISABLE_AUTO_UPDATE="true" - -# Uncomment the following line to change how often to auto-update (in days). -# export UPDATE_ZSH_DAYS=13 - -# Uncomment the following line to disable colors in ls. -# DISABLE_LS_COLORS="true" - -# Uncomment the following line to disable auto-setting terminal title. -# DISABLE_AUTO_TITLE="true" - -# Uncomment the following line to enable command auto-correction. -# ENABLE_CORRECTION="true" - -# Uncomment the following line to display red dots whilst waiting for completion. -COMPLETION_WAITING_DOTS="true" - -# Uncomment the following line if you want to disable marking untracked files -# under VCS as dirty. This makes repository status check for large repositories -# much, much faster. -# DISABLE_UNTRACKED_FILES_DIRTY="true" - -# Uncomment the following line if you want to change the command execution time -# stamp shown in the history command output. -# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" -# HIST_STAMPS="mm/dd/yyyy" - -# Would you like to use another custom folder than $ZSH/custom? -# ZSH_CUSTOM=/path/to/new-custom-folder - -# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) -# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ -# Example format: plugins=(rails git textmate ruby lighthouse) -# Add wisely, as too many plugins slow down shell startup. -plugins=(git) - -source $ZSH/oh-my-zsh.sh - -## functions -function noproxy { - unset http_proxy https_proxy HTTP_PROXY HTTPS_PROXY ftp_proxy FTP_PROXY no_proxy - - # change dconf - dconf reset -f /system/proxy/ - - proxy_update -} - - function setproxy { - base_proxy="proxy.domain.com" - base_proxy_port=8080 - - dconf_proxy="'$base_proxy'" - env_proxy="http://$base_proxy:$base_proxy_port" - - http_proxy=$env_proxy - HTTP_PROXY=$env_proxy - https_proxy=$env_proxy - HTTPS_PROXY=$env_proxy - ftp_proxy=$env_proxy - FTP_PROXY=$env_proxy - no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com" - export http_proxy https_proxy HTTP_PROXY HTTPS_PROXY ftp_proxy FTP_PROXY no_proxy - - # change dconf - dconf write /system/proxy/mode "'manual'" - dconf write /system/proxy/ignore-hosts "['localhost', '127.0.0.0/8', '10.0.0.0/8', '192.168.0.0/16', '172.16.0.0/12']" - dconf write /system/proxy/http/enabled true - dconf write /system/proxy/http/host "$dconf_proxy" - dconf write /system/proxy/http/port "$base_proxy_port" - dconf write /system/proxy/https/host "$dconf_proxy" - dconf write /system/proxy/https/port "$base_proxy_port" - dconf write /system/proxy/ftp/host "$dconf_proxy" - dconf write /system/proxy/ftp/port "$base_proxy_port" - - proxy_update -} - -# restart/reload applications for proxy settings to take effect -function proxy_update { - killall -q dropbox - dropbox-cli start -} - -function 256color_test { - ( x=`tput op` y=`printf %$((${COLUMNS}-6))s`; - for i in {0..256}; - do - o=00$i; - echo -e ${o:${#o}-3:3} `tput setaf $i;tput setab $i`${y// /=}$x; - done ) -} - -# requires youtube-dl, mpv -function play { - # Skip DASH manifest for speed purposes. This might actually disable - # being able to specify things like 'bestaudio' as the requested format, - # but try anyway. - # Use "$*" so that quoting the requested song isn't necessary. - mpv $(youtube-dl --default-search=ytsearch: \ - --max-downloads 1 \ - --youtube-skip-dash-manifest \ - --format="bestaudio" \ - -g "$*") -} - -# update -function update_dotfiles() { - dotfiles="$HOME/dotfiles" - epoch_file="$dotfiles/.updated" - epoch_curr=$(date +'%s') - [ -e "$epoch_file" ] && epoch_old=$(<"$epoch_file") - epoch_diff=$(($epoch_curr - ${epoch_old:-0})) - max_time=$((60 * 60 * 24 * 7)) - - if [ $(($epoch_diff / $max_time)) -ne 0 ]; then - echo "Updating dotfiles ..." - - cd "$dotfiles" - git pull --rebase --stat origin master - echo $epoch_curr > "$epoch_file" - cd - - - echo "Finished." - fi -} - -## PATH -export PATH=$PATH:$HOME/bin - -## alias - -alias xclip="xclip -selection c" -alias open="xdg-open" - -## env -export EDITOR=vim - -# force 256 color mode -if [ -n "$TMUX" ]; then - export TERM=screen-256color -else - export TERM=xterm-256color -fi - -# use gpg-agent as ssh-agent -gpg-connect-agent /bye > /dev/null 2>&1 -export SSH_AUTH_SOCK="$HOME/.gnupg/S.gpg-agent.ssh" - -## zsh options - -bindkey -M viins ' ' magic-space -setopt EXTENDED_GLOB -HISTSIZE=100000000 - -## startup -update_dotfiles - -if type "archey" > /dev/null; then - archey # nice system information and arch logo -fi - -[ -e ~/TODO ] && cat ~/TODO diff --git a/shell/themes/custom.zsh-theme b/shell/themes/custom.zsh-theme deleted file mode 100644 index 31ff6c4..0000000 --- a/shell/themes/custom.zsh-theme +++ /dev/null @@ -1,30 +0,0 @@ -# custom.zsh-theme -# based on the af-magic theme - -local return_code="%(?..%{$fg[red]%}:%?%{$reset_color%})" - -# primary prompt -PROMPT='$FG[032]%(8~"[..]/")%7~\ -$(git_prompt_info) \ -$FG[105]%1(j.[%j] .)%(!.#.$)%{$reset_color%} ' -PROMPT2='%{$fg[red]%}\ %{$reset_color%}' -RPS1='${return_code}' - -# color vars -eval my_gray='$FG[237]' -eval my_orange='$FG[214]' - -# right prompt -#if type "virtualenv_prompt_info" > /dev/null -#then - #RPROMPT='$(virtualenv_prompt_info)$my_gray%n@%m%{$reset_color%}%' -#else - #RPROMPT='$my_gray%n@%m%{$reset_color%}%' -#fi - -# git settings -ZSH_THEME_GIT_PROMPT_PREFIX="$FG[075] (" -ZSH_THEME_GIT_PROMPT_CLEAN="" -ZSH_THEME_GIT_PROMPT_DIRTY="$my_orange*%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_SUFFIX="$FG[075])%{$reset_color%}" - diff --git a/zsh-custom/themes/custom.zsh-theme b/zsh-custom/themes/custom.zsh-theme new file mode 100644 index 0000000..31ff6c4 --- /dev/null +++ b/zsh-custom/themes/custom.zsh-theme @@ -0,0 +1,30 @@ +# custom.zsh-theme +# based on the af-magic theme + +local return_code="%(?..%{$fg[red]%}:%?%{$reset_color%})" + +# primary prompt +PROMPT='$FG[032]%(8~"[..]/")%7~\ +$(git_prompt_info) \ +$FG[105]%1(j.[%j] .)%(!.#.$)%{$reset_color%} ' +PROMPT2='%{$fg[red]%}\ %{$reset_color%}' +RPS1='${return_code}' + +# color vars +eval my_gray='$FG[237]' +eval my_orange='$FG[214]' + +# right prompt +#if type "virtualenv_prompt_info" > /dev/null +#then + #RPROMPT='$(virtualenv_prompt_info)$my_gray%n@%m%{$reset_color%}%' +#else + #RPROMPT='$my_gray%n@%m%{$reset_color%}%' +#fi + +# git settings +ZSH_THEME_GIT_PROMPT_PREFIX="$FG[075] (" +ZSH_THEME_GIT_PROMPT_CLEAN="" +ZSH_THEME_GIT_PROMPT_DIRTY="$my_orange*%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_SUFFIX="$FG[075])%{$reset_color%}" + -- cgit v1.2.3-70-g09d2