This commit is contained in:
petrucci4prez 2018-07-10 18:59:31 -04:00
parent facba469b6
commit 7bc63f50f9
2 changed files with 131 additions and 61 deletions

67
conf.el
View File

@ -72,6 +72,19 @@
(global-set-key (kbd "<f2>") 'org-capture) (global-set-key (kbd "<f2>") 'org-capture)
(global-set-key (kbd "<f12>") 'global-hl-line-mode) (global-set-key (kbd "<f12>") 'global-hl-line-mode)
(global-set-key (kbd "S-<f12>") 'display-line-numbers-mode) (global-set-key (kbd "S-<f12>") 'display-line-numbers-mode)
(global-set-key (kbd "C-<f12>") 'mu4e)
(use-package evil
:ensure t
:init
;; this is required to make evil collection work
(setq evil-want-integration nil)
:config
(evil-mode 1))
(use-package evil-collection
:ensure t
:after evil)
(use-package delight (use-package delight
:ensure t) :ensure t)
@ -150,22 +163,6 @@
:init :init
:ensure t) :ensure t)
(use-package evil
:ensure t
:config
(evil-mode 1)
(use-package evil-org
:ensure t
:after org
:delight
:config
(add-hook 'org-mode-hook 'evil-org-mode)
(add-hook 'evil-org-mode-hook
(lambda ()
(evil-org-set-key-theme)))
(require 'evil-org-agenda)
(evil-org-agenda-set-keys)))
(use-package undo-tree (use-package undo-tree
:ensure t :ensure t
:delight :delight
@ -293,6 +290,17 @@ event of an error or nonlocal exit."
(setq org-modules '(org-habit org-protocol)) (setq org-modules '(org-habit org-protocol))
(require 'org-protocol) (require 'org-protocol)
(use-package evil-org
:ensure t
:after evil
:after org
:delight
:config
(add-hook 'org-mode-hook 'evil-org-mode)
(add-hook 'evil-org-mode-hook (lambda () (evil-org-set-key-theme)))
(require 'evil-org-agenda)
(evil-org-agenda-set-keys))
(setq org-log-into-drawer "LOGBOOK") (setq org-log-into-drawer "LOGBOOK")
(setq org-log-done t) (setq org-log-done t)
@ -1063,7 +1071,7 @@ set as a text property for further sorting"
(setq org-agenda-custom-commands (setq org-agenda-custom-commands
`(("t" `(("t"
"Task View" "Task View"
((agenda "" ((org-agenda-skip-function '(nd/skip-headings-with-tags '("%inc"))) ((agenda "" ((org-agenda-skip-function '(nd/skip-headings-with-tags '("%inc" "REFILE")))
(org-agenda-include-diary t))) (org-agenda-include-diary t)))
,(nd/agenda-base-task-cmd act-no-rep-match ,(nd/agenda-base-task-cmd act-no-rep-match
"Project Tasks" "Project Tasks"
@ -1101,7 +1109,7 @@ set as a text property for further sorting"
("P" ("P"
"Periodical View" "Periodical View"
((tags ((tags
(concat actionable "-" iterator "+" periodical "-" habit) ,(concat actionable "-" iterator "+" periodical "-" habit)
((org-agenda-overriding-header "Periodical Status") ((org-agenda-overriding-header "Periodical Status")
(org-agenda-skip-function '(nd/skip-non-periodical-parent-headers)) (org-agenda-skip-function '(nd/skip-non-periodical-parent-headers))
(org-agenda-before-sorting-filter-function (org-agenda-before-sorting-filter-function
@ -1299,6 +1307,29 @@ and reverts all todo keywords to TODO"
cfw:fchar-top-left-corner ?┏ cfw:fchar-top-left-corner ?┏
cfw:fchar-top-right-corner ?┓)) cfw:fchar-top-right-corner ?┓))
(require 'mu4e)
(evil-collection-init 'mu4e)
(setq mail-user-agent 'mu4e-user-agent
mu4e-maildir "/mnt/data/Mail"
mu4e-drafts-folder "/gmail/[Gmail].Drafts"
mu4e-sent-folder "/gmail/[Gmail].Sent Mail"
mu4e-trash-folder "/gmail/[Gmail].Trash")
(require 'smtpmail)
(setq message-send-mail-function 'smtpmail-send-it
user-mail-address "natedwarshuis@gmail.com"
user-full-name "Nate Dwarshuis"
mu4e-sent-messages-behavior 'delete
starttls-use-gnutls t
smtpmail-starttls-credentials '(("smtp.gmail.com" 587 nil nil))
smtpmail-auth-credentials '(("smtp.gmail.com" 587
"natedwarshuis@gmail.com" nil))
smtpmail-default-smtp-server "smtp.gmail.com"
smtpmail-smtp-service 587
smtpmail-smtp-server "smtp.gmail.com")
(defvar nd-term-shell "/bin/bash") (defvar nd-term-shell "/bin/bash")
(defadvice ansi-term (before force-bash) (defadvice ansi-term (before force-bash)
(interactive (list nd-term-shell))) (interactive (list nd-term-shell)))

125
conf.org
View File

@ -116,10 +116,48 @@ These are commands that should work in any mode. Make the assumption that functi
(global-set-key (kbd "<f2>") 'org-capture) (global-set-key (kbd "<f2>") 'org-capture)
(global-set-key (kbd "<f12>") 'global-hl-line-mode) (global-set-key (kbd "<f12>") 'global-hl-line-mode)
(global-set-key (kbd "S-<f12>") 'display-line-numbers-mode) (global-set-key (kbd "S-<f12>") 'display-line-numbers-mode)
(global-set-key (kbd "C-<f12>") 'mu4e)
#+END_SRC #+END_SRC
* printing * printing
** **
* packages * packages
** evil
*** packages
#+BEGIN_SRC emacs-lisp
(use-package evil
:ensure t
:init
;; this is required to make evil collection work
(setq evil-want-integration nil)
:config
(evil-mode 1))
(use-package evil-collection
:ensure t
:after evil)
#+END_SRC
*** keybindings
vim is all about escape, not...ctrl+g???
+BEGIN_SRC emacs-lisp
(define-key evil-normal-state-map [escape] 'keyboard-quit)
(define-key evil-visual-state-map [escape] 'keyboard-quit)
;; since ctrl+g and evil make no sense
(defun nd/minibuffer-keyboard-quit ()
"Abort recursive edit.
In Delete Selection mode, if the mark is active, just deactivate it;
then it takes a second \\[keyboard-quit] to abort the minibuffer."
(interactive)
(if (and delete-selection-mode transient-mark-mode mark-active)
(setq deactivate-mark t)
(when (get-buffer "*Completions*") (delete-windows-on "*Completions*"))
(abort-recursive-edit)))
(define-key minibuffer-local-ns-map [escape] 'minibuffer-keyboard-quit)
(define-key minibuffer-local-completion-map [escape] 'minibuffer-keyboard-quit)
(define-key minibuffer-local-must-match-map [escape] 'minibuffer-keyboard-quit)
(define-key minibuffer-local-isearch-map [escape] 'minibuffer-keyboard-quit)
#+END_SRC
** delight ** delight
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package delight (use-package delight
@ -219,47 +257,6 @@ These are commands that should work in any mode. Make the assumption that functi
:init :init
:ensure t) :ensure t)
#+END_SRC #+END_SRC
** evil
*** packages
#+BEGIN_SRC emacs-lisp
(use-package evil
:ensure t
:config
(evil-mode 1)
(use-package evil-org
:ensure t
:after org
:delight
:config
(add-hook 'org-mode-hook 'evil-org-mode)
(add-hook 'evil-org-mode-hook
(lambda ()
(evil-org-set-key-theme)))
(require 'evil-org-agenda)
(evil-org-agenda-set-keys)))
#+END_SRC
*** keybindings
vim is all about escape, not...ctrl+g???
+BEGIN_SRC emacs-lisp
(define-key evil-normal-state-map [escape] 'keyboard-quit)
(define-key evil-visual-state-map [escape] 'keyboard-quit)
;; since ctrl+g and evil make no sense
(defun nd/minibuffer-keyboard-quit ()
"Abort recursive edit.
In Delete Selection mode, if the mark is active, just deactivate it;
then it takes a second \\[keyboard-quit] to abort the minibuffer."
(interactive)
(if (and delete-selection-mode transient-mark-mode mark-active)
(setq deactivate-mark t)
(when (get-buffer "*Completions*") (delete-windows-on "*Completions*"))
(abort-recursive-edit)))
(define-key minibuffer-local-ns-map [escape] 'minibuffer-keyboard-quit)
(define-key minibuffer-local-completion-map [escape] 'minibuffer-keyboard-quit)
(define-key minibuffer-local-must-match-map [escape] 'minibuffer-keyboard-quit)
(define-key minibuffer-local-isearch-map [escape] 'minibuffer-keyboard-quit)
#+END_SRC
** undo tree ** undo tree
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package undo-tree (use-package undo-tree
@ -437,6 +434,19 @@ event of an error or nonlocal exit."
(setq org-modules '(org-habit org-protocol)) (setq org-modules '(org-habit org-protocol))
(require 'org-protocol) (require 'org-protocol)
#+END_SRC #+END_SRC
** evil
#+BEGIN_SRC emacs-lisp
(use-package evil-org
:ensure t
:after evil
:after org
:delight
:config
(add-hook 'org-mode-hook 'evil-org-mode)
(add-hook 'evil-org-mode-hook (lambda () (evil-org-set-key-theme)))
(require 'evil-org-agenda)
(evil-org-agenda-set-keys))
#+END_SRC
** logging ** logging
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(setq org-log-into-drawer "LOGBOOK") (setq org-log-into-drawer "LOGBOOK")
@ -1371,7 +1381,7 @@ set as a text property for further sorting"
(setq org-agenda-custom-commands (setq org-agenda-custom-commands
`(("t" `(("t"
"Task View" "Task View"
((agenda "" ((org-agenda-skip-function '(nd/skip-headings-with-tags '("%inc"))) ((agenda "" ((org-agenda-skip-function '(nd/skip-headings-with-tags '("%inc" "REFILE")))
(org-agenda-include-diary t))) (org-agenda-include-diary t)))
,(nd/agenda-base-task-cmd act-no-rep-match ,(nd/agenda-base-task-cmd act-no-rep-match
"Project Tasks" "Project Tasks"
@ -1409,7 +1419,7 @@ set as a text property for further sorting"
("P" ("P"
"Periodical View" "Periodical View"
((tags ((tags
(concat actionable "-" iterator "+" periodical "-" habit) ,(concat actionable "-" iterator "+" periodical "-" habit)
((org-agenda-overriding-header "Periodical Status") ((org-agenda-overriding-header "Periodical Status")
(org-agenda-skip-function '(nd/skip-non-periodical-parent-headers)) (org-agenda-skip-function '(nd/skip-non-periodical-parent-headers))
(org-agenda-before-sorting-filter-function (org-agenda-before-sorting-filter-function
@ -1629,6 +1639,35 @@ and reverts all todo keywords to TODO"
cfw:fchar-top-left-corner ?┏ cfw:fchar-top-left-corner ?┏
cfw:fchar-top-right-corner ?┓)) cfw:fchar-top-right-corner ?┓))
#+END_SRC #+END_SRC
* mu4e
only for gmail now
** basic
#+BEGIN_SRC emacs-lisp
(require 'mu4e)
(evil-collection-init 'mu4e)
(setq mail-user-agent 'mu4e-user-agent
mu4e-maildir "/mnt/data/Mail"
mu4e-drafts-folder "/gmail/[Gmail].Drafts"
mu4e-sent-folder "/gmail/[Gmail].Sent Mail"
mu4e-trash-folder "/gmail/[Gmail].Trash")
#+END_SRC
** smtp
#+BEGIN_SRC emacs-lisp
(require 'smtpmail)
(setq message-send-mail-function 'smtpmail-send-it
user-mail-address "natedwarshuis@gmail.com"
user-full-name "Nate Dwarshuis"
mu4e-sent-messages-behavior 'delete
starttls-use-gnutls t
smtpmail-starttls-credentials '(("smtp.gmail.com" 587 nil nil))
smtpmail-auth-credentials '(("smtp.gmail.com" 587
"natedwarshuis@gmail.com" nil))
smtpmail-default-smtp-server "smtp.gmail.com"
smtpmail-smtp-service 587
smtpmail-smtp-server "smtp.gmail.com")
#+END_SRC
* shell * shell
#+begin_src emacs-lisp #+begin_src emacs-lisp
(defvar nd-term-shell "/bin/bash") (defvar nd-term-shell "/bin/bash")