Compare commits

..

13 Commits

Author SHA1 Message Date
Jeremy Isaac Dormitzer
0aee305905 Add pass and aws omz plugins 2024-03-20 12:06:33 -04:00
Jeremy Isaac Dormitzer
29ed040631 Add notion-calendar cask 2024-03-20 12:06:33 -04:00
Jeremy Isaac Dormitzer
76565d4b48 Don't use ssh for straight be default 2024-03-20 12:06:33 -04:00
Jeremy Isaac Dormitzer
3cc63254ae Add vterm binding to send C-g 2024-03-20 12:06:33 -04:00
Jeremy Isaac Dormitzer
3394957063 Suppress message when switching python versions with pyenv 2024-03-20 12:06:33 -04:00
Jeremy Isaac Dormitzer
81d1164f58 Update org notes setup 2024-03-20 12:06:33 -04:00
Jeremy Isaac Dormitzer
a92a1e0eaa Add shut-up package 2024-03-20 12:06:33 -04:00
Jeremy Isaac Dormitzer
3890c5fb90 Set up eglot for ruby and bash 2024-03-20 12:06:33 -04:00
Jeremy Isaac Dormitzer
a3eb134450 Fix corfu move to minibuffer command 2024-03-20 12:06:33 -04:00
Jeremy Isaac Dormitzer
f8772c9120 Don't use custom branch for evil-mode 2024-03-20 12:06:33 -04:00
Jeremy Isaac Dormitzer
7ea370ddec Add hummingbird to email config
Update email setup

Update email for hummingbird
2024-03-20 12:06:19 -04:00
Jeremy Isaac Dormitzer
26c1c7d025 Update aws integration 2024-03-20 12:06:19 -04:00
Jeremy Isaac Dormitzer
c99cf97d63 Set up nix
Add nix-mode

Set up nix

Require nix
2024-03-20 12:06:08 -04:00
15 changed files with 117 additions and 84 deletions

View File

@ -13,12 +13,14 @@
(add-hook 'vterm-mode-hook #'aws-local-profile)
(add-hook 'term-mode-hook #'aws-local-profile)
(add-to-list 'aws-profiles "personal")
(add-to-list 'aws-profiles "lola-cde")
(add-to-list 'aws-profiles "lola-gbt")
(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)))
(defun aws-switch-profile (profile)
(interactive (list (completing-read "Profile: " aws-profiles)))
(interactive (list (completing-read "Profile: " (aws-list-profiles))))
(setenv "AWS_PROFILE" profile)
(when (eq major-mode 'vterm-mode)
(vterm-send-C-e)
@ -26,6 +28,10 @@
(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 (:host github :repo "djcb/mu" :files ("mu4e/*"))
:straight (:local-repo (directory-file-name (file-name-directory (locate-library "mu4e"))) :type built-in)
: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:/jdormitzer-spotify-com/Inbox"
:query "maildir:/jeremy-dormitzer-gmail-com/Inbox OR maildir:/jeremydormitzer-hummingbird-co/Inbox"
:key ?i)
(:name "Unread messages"
:query "flag:unread AND NOT flag:trashed"
@ -44,7 +44,8 @@
;; 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")
mu4e-move-to-trash-patterns '("jeremy-dormitzer-gmail-com",
"jeremydormitzer-hummingbird-co")
;; HTML email rendering
shr-use-colors nil
;; Make sure mu4e knows about my different accounts
@ -52,20 +53,20 @@
mu4e-compose-context-policy 'ask
mu4e-contexts
`(,(make-mu4e-context
:name "Spotify Gmail"
:name "Hummingbird Gmail"
:match-func (lambda (msg)
(when msg
(string-match-p
"jdormitzer-spotify-com"
"jeremydormitzer-hummingbird-co"
(mu4e-message-field msg :path))))
:vars '((user-mail-address . "jdormitzer@spotify.com")
:vars '((user-mail-address . "jeremydormitzer@hummingbird.co")
(mu4e-compose-signature . nil)
(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")
(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")
(message-sendmail-extra-arguments
. ("-a" "jdormitzer-spotify-com"))))
. ("-a" "jeremydormitzer-hummingbird-co"))))
,(make-mu4e-context
:name "Personal Gmail"
:match-func (lambda (msg)

View File

@ -25,7 +25,6 @@
(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,10 +11,11 @@
:config
(defun corfu-move-to-minibuffer ()
(interactive)
(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))))
(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)))))
(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)))
@ -57,6 +58,17 @@
`(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
@ -193,8 +205,12 @@
(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-confirm-server-initiated-edits nil)
(eglot-connect-timeout nil))
;; Some compilation-mode conveniences
(use-package compile

View File

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

View File

@ -0,0 +1,4 @@
;; -*- 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))
("s" "Spotify task" entry
(file+headline ,(expand-file-name "~/org/todo.org") "Spotify")
("h" "Hummingbird task" entry
(file+headline ,(expand-file-name "~/org/todo.org") "Hummingbird")
"* TODO %i%?")
("p" "Personal task" entry
(file+headline ,(expand-file-name "~/org/todo.org") "Personal")
@ -106,17 +106,12 @@
: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")
(:name "Jira" :file-path ,(expand-file-name "~/org/jira")))))
:tag "@personal"))))
;; (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)
(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")))))
(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")))))
(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,11 +38,15 @@
(defun vterm-edit-zsh-command-line ()
"Edit the current command line in a temp buffer."
(interactive)
(vterm-send-C-x)
(vterm-send-C-e))
(vterm-send "C-x")
(vterm-send "C-e"))
(defun vterm-send-C-g ()
(interactive)
(vterm-send "C-g"))
:general
(leader-map "v" #'vterm)
(vterm-mode-map "C-x C-e" #'vterm-edit-zsh-command-line)
(vterm-mode-map "C-x C-e" #'vterm-edit-zsh-command-line
"C-c C-g" #'vterm-send-C-g)
:custom
(vterm-max-scrollback 10000)
(vterm-environment '("TYPEWRITTEN_CURSOR=terminal"))

View File

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

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 jdormitzer-spotify-com
from jdormitzer@spotify.com
user jdormitzer@spotify.com
passwordeval pass show spotify-google-app-password | 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 default : jeremy-dormitzer-gmail-com
account default : jeremy-dormitzer-gmail-com

View File

@ -35,3 +35,9 @@ 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)
plugins=(git direnv pipenv npm nvm rbenv pass aws)
source $ZSH/oh-my-zsh.sh