Compare commits

..

No commits in common. "0aee305905f1c1506e392f759f75e1977ba9ebce" and "3313d963244810b2017b0781bbc62d8a46d254dd" have entirely different histories.

15 changed files with 84 additions and 117 deletions

View File

@ -13,14 +13,12 @@
(add-hook 'vterm-mode-hook #'aws-local-profile)
(add-hook 'term-mode-hook #'aws-local-profile)
(defun aws-list-profiles ()
(when (not (executable-find "aws"))
(user-error "Unable to find executable \"aws\"!"))
(let ((profile-string (shell-command-to-string "aws configure list-profiles")))
(s-split "\n" profile-string)))
(add-to-list 'aws-profiles "personal")
(add-to-list 'aws-profiles "lola-cde")
(add-to-list 'aws-profiles "lola-gbt")
(defun aws-switch-profile (profile)
(interactive (list (completing-read "Profile: " (aws-list-profiles))))
(interactive (list (completing-read "Profile: " aws-profiles)))
(setenv "AWS_PROFILE" profile)
(when (eq major-mode 'vterm-mode)
(vterm-send-C-e)
@ -28,10 +26,6 @@
(vterm-send-string (format "export AWS_PROFILE=%s\n" profile)))
(setq aws-current-profile profile))
(defun aws-sso-login ()
(interactive)
(async-shell-command "AWS_PROFILE=default aws sso login"))
(add-hook 'emacs-startup-hook
(lambda ()
(aws-switch-profile "default")))

View File

@ -1,6 +1,6 @@
;; Email in Emacs via mu4e
(use-package mu4e
:straight (:local-repo (directory-file-name (file-name-directory (locate-library "mu4e"))) :type built-in)
:straight (:host github :repo "djcb/mu" :files ("mu4e/*"))
:if (locate-library "mu4e")
:commands (mu4e mu4e-update-mail-and-index)
:hook (after-init . (lambda () (mu4e t)))
@ -24,7 +24,7 @@
("View in browser" . mu4e-action-view-in-browser))
;; Bookmarked searches
mu4e-bookmarks '((:name "Inbox"
:query "maildir:/jeremy-dormitzer-gmail-com/Inbox OR maildir:/jeremydormitzer-hummingbird-co/Inbox"
:query "maildir:/jeremy-dormitzer-gmail-com/Inbox OR maildir:/jdormitzer-spotify-com/Inbox"
:key ?i)
(:name "Unread messages"
:query "flag:unread AND NOT flag:trashed"
@ -44,8 +44,7 @@
;; Let Gmail handle putting sent messages in the sent folder
mu4e-sent-messages-behavior 'delete
;; Move to trash folder instead of adding trash flag for Gmail mailboxes
mu4e-move-to-trash-patterns '("jeremy-dormitzer-gmail-com",
"jeremydormitzer-hummingbird-co")
mu4e-move-to-trash-patterns '("jeremy-dormitzer-gmail-com")
;; HTML email rendering
shr-use-colors nil
;; Make sure mu4e knows about my different accounts
@ -53,20 +52,20 @@
mu4e-compose-context-policy 'ask
mu4e-contexts
`(,(make-mu4e-context
:name "Hummingbird Gmail"
:name "Spotify Gmail"
:match-func (lambda (msg)
(when msg
(string-match-p
"jeremydormitzer-hummingbird-co"
"jdormitzer-spotify-com"
(mu4e-message-field msg :path))))
:vars '((user-mail-address . "jeremydormitzer@hummingbird.co")
:vars '((user-mail-address . "jdormitzer@spotify.com")
(mu4e-compose-signature . nil)
(mu4e-sent-folder . "/jeremydormitzer-hummingbird-co/Sent")
(mu4e-drafts-folder . "/jeremydormitzer-hummingbird-co/Drafts")
(mu4e-refile-folder . "/jeremydormitzer-hummingbird-co/Archive")
(mu4e-trash-folder . "/jeremydormitzer-hummingbird-co/Trash")
(mu4e-sent-folder . "/jdormitzer-spotify-com/Sent")
(mu4e-drafts-folder . "/jdormitzer-spotify-com/Drafts")
(mu4e-refile-folder . "/jdormitzer-spotify-com/Archive")
(mu4e-trash-folder . "/jdormitzer-spotify-com/Trash")
(message-sendmail-extra-arguments
. ("-a" "jeremydormitzer-hummingbird-co"))))
. ("-a" "jdormitzer-spotify-com"))))
,(make-mu4e-context
:name "Personal Gmail"
:match-func (lambda (msg)

View File

@ -25,6 +25,7 @@
(evil-vsplit-window-right t))
(use-package evil-collection
;; :straight (:host github :repo "meliache/evil-collection" :branch "mu4e-development")
:after evil
:config
(evil-collection-init '(dashboard

View File

@ -11,11 +11,10 @@
:config
(defun corfu-move-to-minibuffer ()
(interactive)
(pcase completion-in-region--data
(`(,beg ,end ,table ,pred ,extras)
(let ((completion-extra-properties extras)
completion-cycle-threshold completion-cycling)
(consult-completion-in-region beg end table pred)))))
(when completion-in-region--data
(let ((completion-extra-properties corfu--extra)
completion-cycle-threshold completion-cycling)
(apply #'consult-completion-in-region completion-in-region--data))))
(defun corfu-enable-in-minibuffer ()
"Enable Corfu in the minibuffer if `completion-at-point' is bound."
(when (where-is-internal #'completion-at-point (list (current-local-map)))
@ -58,17 +57,6 @@
`(html-web-mode . ,(eglot-alternatives
'(("vscode-html-language-server" "--stdio")
("html-languageserver" "--stdio")))))
(add-to-list 'eglot-server-programs
`((ruby-mode ruby-ts-mode) . ,(eglot-alternatives
'(("srb" "typecheck" "--lsp")
("solargraph" "socket" "--port" :autoport)))))
;; Sorbet passes an out-of-spec key in its connection JSON, filter it out to prevent eglot blowing up
(cl-defun jsonrpc-connection-receive--filter-args ((conn foreign-message) &rest args)
(let ((msg (cl-loop for (k v) on foreign-message by #'cddr
if (-contains? '(:method :id :error :params :result :jsonrpc) k)
collect k and collect v)))
(append (list conn msg) args)))
(advice-add 'jsonrpc-connection-receive :filter-args #'jsonrpc-connection-receive--filter-args)
(defvar eglot-java-java-agent nil
"Java agent JVM arg for eglot JDTLS.")
;; Custom eglot java server for deeper customization
@ -205,12 +193,8 @@
(c-mode . eglot-ensure)
(terraform-mode . eglot-ensure)
(ruby-mode . eglot-ensure)
(ruby-ts-mode . eglot-ensure)
(sh-mode . eglot-ensure)
(bash-ts-mode . eglot-ensure)
:custom
(eglot-confirm-server-initiated-edits nil)
(eglot-connect-timeout nil))
(eglot-confirm-server-initiated-edits nil))
;; Some compilation-mode conveniences
(use-package compile

View File

@ -121,9 +121,6 @@
(lambda (elt) (format "%s=%s" (car elt) (cdr elt)))
,env)
process-environment)))
,@body))
(use-package shut-up
:commands (shut-up))
,@body))
(provide 'init-lib)

View File

@ -1,4 +0,0 @@
;; -*- lexical-binding: t; -*-
(use-package nix-mode)
(provide 'init-nix)

View File

@ -57,8 +57,8 @@
(function org-find-daily-note)
"* %<%I:%M %p>")
("n" "Org-roam note" plain (function org-roam-capture))
("h" "Hummingbird task" entry
(file+headline ,(expand-file-name "~/org/todo.org") "Hummingbird")
("s" "Spotify task" entry
(file+headline ,(expand-file-name "~/org/todo.org") "Spotify")
"* TODO %i%?")
("p" "Personal task" entry
(file+headline ,(expand-file-name "~/org/todo.org") "Personal")
@ -106,12 +106,17 @@
:custom
(org-super-agenda-groups `((:name "In progress"
:todo "IN PROGRESS")
(:name "Hummingbird"
:tag "@hummingbird")
(:name "Daily"
:file-path ,(expand-file-name "~/org/daily"))
(:name "Spotify"
:tag "@spotify")
(:name "Lola"
:tag "@lola")
(:name "unifyDB"
:tag "@unifydb")
(:name "Personal"
:tag "@personal"))))
:tag "@personal")
(:name "Jira" :file-path ,(expand-file-name "~/org/jira")))))
;; (use-package org-gcal
;; :commands (org-gcal-sync

View File

@ -65,15 +65,15 @@
(pyenv--call-process "version-alias-file")))
(global-pyenv-mode)
(defun pyenv-switch-buffer-hook (prev curr)
(shut-up (pyenv-use-corresponding)))
;; (defun pyenv-use-corresponding-vterm-hook ()
;; (when (eq major-mode 'vterm-mode)
;; (vterm-send-C-e)
;; (vterm-send-C-u)
;; (vterm-send-string (format "export PYENV_VERSION=%s\n" (getenv "PYENV_VERSION")))))
(pyenv-use-corresponding))
(defun pyenv-use-corresponding-vterm-hook ()
(when (eq major-mode 'vterm-mode)
(vterm-send-C-e)
(vterm-send-C-u)
(vterm-send-string (format "export PYENV_VERSION=%s\n" (getenv "PYENV_VERSION")))))
(add-hook 'switch-buffer-functions #'pyenv-switch-buffer-hook)
(add-hook 'eshell-directory-change-hook #'pyenv-use-corresponding)
;; (add-hook 'pyenv-mode-hook #'pyenv-use-corresponding-vterm-hook)
(add-hook 'pyenv-mode-hook #'pyenv-use-corresponding-vterm-hook)
:custom
(pyenv-show-active-python-in-modeline nil))

View File

@ -38,15 +38,11 @@
(defun vterm-edit-zsh-command-line ()
"Edit the current command line in a temp buffer."
(interactive)
(vterm-send "C-x")
(vterm-send "C-e"))
(defun vterm-send-C-g ()
(interactive)
(vterm-send "C-g"))
(vterm-send-C-x)
(vterm-send-C-e))
:general
(leader-map "v" #'vterm)
(vterm-mode-map "C-x C-e" #'vterm-edit-zsh-command-line
"C-c C-g" #'vterm-send-C-g)
(vterm-mode-map "C-x C-e" #'vterm-edit-zsh-command-line)
:custom
(vterm-max-scrollback 10000)
(vterm-environment '("TYPEWRITTEN_CURSOR=terminal"))

View File

@ -37,6 +37,9 @@
(straight-use-package 'use-package)
(setq straight-use-package-by-default t)
;; Tell straight to use SSH for git connections
(setq straight-vc-git-default-protocol 'ssh)
;; "Garbage Collection Magic Hack"
(use-package gcmh
:demand t
@ -103,7 +106,6 @@
(require 'init-groovy)
(require 'init-terraform)
(require 'init-docker)
(require 'init-nix)
(require 'init-lua)
(require 'init-run-command)
(require 'init-aws)

View File

@ -66,7 +66,6 @@ cask "google-cloud-sdk"
cask "intellij-idea"
cask "iterm2"
cask "notion"
cask "notion-calendar"
cask "railwaycat/emacsmacport/emacs-mac"
cask "rectangle"
cask "slack"

View File

@ -53,53 +53,53 @@ Channel jeremy-dormitzer-gmail-com-drafts
Channel jeremy-dormitzer-gmail-com-sent
Channel jeremy-dormitzer-gmail-com-archive
IMAPAccount jeremydormitzer-hummingbird-co
IMAPAccount jdormitzer-spotify-com
Host imap.gmail.com
User jeremydormitzer@hummingbird.co
PassCmd "pass show hummingbird-gmail-app-password | head -n 1"
User jdormitzer@spotify.com
PassCmd "pass show spotify-google-app-password | head -n 1"
SSLType IMAPS
CertificateFile ~/cert.pem
AuthMechs LOGIN
PipelineDepth 50
IMAPStore jeremydormitzer-hummingbird-co-remote
Account jeremydormitzer-hummingbird-co
IMAPStore jdormitzer-spotify-com-remote
Account jdormitzer-spotify-com
MaxSize 25M
MaildirStore jeremydormitzer-hummingbird-co-local
Path ~/.mail/jeremydormitzer-hummingbird-co/
Inbox ~/.mail/jeremydormitzer-hummingbird-co/Inbox
MaildirStore jdormitzer-spotify-com-local
Path ~/.mail/jdormitzer-spotify-com/
Inbox ~/.mail/jdormitzer-spotify-com/Inbox
SubFolders Verbatim
Channel jeremydormitzer-hummingbird-co-inbox
Master :jeremydormitzer-hummingbird-co-remote:INBOX
Slave :jeremydormitzer-hummingbird-co-local:Inbox
Channel jdormitzer-spotify-com-inbox
Master :jdormitzer-spotify-com-remote:INBOX
Slave :jdormitzer-spotify-com-local:Inbox
Channel jeremydormitzer-hummingbird-co-all
Master :jeremydormitzer-hummingbird-co-remote:
Slave :jeremydormitzer-hummingbird-co-local:
Channel jdormitzer-spotify-com-all
Master :jdormitzer-spotify-com-remote:
Slave :jdormitzer-spotify-com-local:
Patterns * ![Gmail]* !"[Google Mail]*" !INBOX !Inbox !Archive !Trash !Sent !Drafts
Channel jeremydormitzer-hummingbird-co-trash
Master :jeremydormitzer-hummingbird-co-remote:"[Gmail]/Trash"
Slave :jeremydormitzer-hummingbird-co-local:"Trash"
Channel jdormitzer-spotify-com-trash
Master :jdormitzer-spotify-com-remote:"[Gmail]/Trash"
Slave :jdormitzer-spotify-com-local:"Trash"
Channel jeremydormitzer-hummingbird-co-sent
Master :jeremydormitzer-hummingbird-co-remote:"[Gmail]/Sent Mail"
Slave :jeremydormitzer-hummingbird-co-local:"Sent"
Channel jdormitzer-spotify-com-sent
Master :jdormitzer-spotify-com-remote:"[Gmail]/Sent Mail"
Slave :jdormitzer-spotify-com-local:"Sent"
Channel jeremydormitzer-hummingbird-co-drafts
Master :jeremydormitzer-hummingbird-co-remote:"[Gmail]/Drafts"
Slave :jeremydormitzer-hummingbird-co-local:"Drafts"
Channel jdormitzer-spotify-com-drafts
Master :jdormitzer-spotify-com-remote:"[Gmail]/Drafts"
Slave :jdormitzer-spotify-com-local:"Drafts"
Channel jeremydormitzer-hummingbird-co-archive
Master :jeremydormitzer-hummingbird-co-remote:"[Gmail]/All Mail"
Slave :jeremydormitzer-hummingbird-co-local:"Archive"
Channel jdormitzer-spotify-com-archive
Master :jdormitzer-spotify-com-remote:"[Gmail]/All Mail"
Slave :jdormitzer-spotify-com-local:"Archive"
Group jeremydormitzer-hummingbird-co
Channel jeremydormitzer-hummingbird-co-trash
Channel jeremydormitzer-hummingbird-co-inbox
Channel jeremydormitzer-hummingbird-co-all
Channel jeremydormitzer-hummingbird-co-drafts
Channel jeremydormitzer-hummingbird-co-sent
Channel jeremydormitzer-hummingbird-co-archive
Group jdormitzer-spotify-com
Channel jdormitzer-spotify-com-trash
Channel jdormitzer-spotify-com-inbox
Channel jdormitzer-spotify-com-all
Channel jdormitzer-spotify-com-drafts
Channel jdormitzer-spotify-com-sent
Channel jdormitzer-spotify-com-archive

View File

@ -11,9 +11,9 @@ from jeremy.dormitzer@gmail.com
user jeremy.dormitzer@gmail.com
passwordeval pass show imap.gmail.com | head -n 1
account jeremydormitzer-hummingbird-co
from jeremydormitzer@hummingbird.co
user jeremydormitzer@hummingbird.co
passwordeval pass show hummingbird-gmail-app-password | head -n 1
account jdormitzer-spotify-com
from jdormitzer@spotify.com
user jdormitzer@spotify.com
passwordeval pass show spotify-google-app-password | head -n 1
account default : jeremy-dormitzer-gmail-com

View File

@ -35,9 +35,3 @@ if [ -d "/opt/homebrew/Caskroom/google-cloud-sdk" ]; then
fi
[[ -e "$HOME/.cargo/env" ]] && . "$HOME/.cargo/env"
# Nix
if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then
. '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
fi
# End Nix

View File

@ -93,7 +93,7 @@ fi
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git direnv pipenv npm nvm rbenv pass aws)
plugins=(git direnv pipenv npm nvm rbenv)
source $ZSH/oh-my-zsh.sh